Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cellframe-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
17
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cellframe
cellframe-sdk
Commits
fea8646c
Commit
fea8646c
authored
4 years ago
by
dmitriy.gerasimov
Browse files
Options
Downloads
Plain Diff
Merge branch 'features-4674' into 'master'
Features 4674 See merge request
!262
parents
fe619958
48b60acb
No related branches found
No related tags found
2 merge requests
!263
Master
,
!262
Features 4674
Pipeline
#6657
passed with stage
in 15 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dap-sdk/core/include/dap_common.h
+10
-0
10 additions, 0 deletions
dap-sdk/core/include/dap_common.h
dap-sdk/core/src/dap_common.c
+10
-0
10 additions, 0 deletions
dap-sdk/core/src/dap_common.c
with
20 additions
and
0 deletions
dap-sdk/core/include/dap_common.h
+
10
−
0
View file @
fea8646c
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
#include
<stdint.h>
#include
<stdint.h>
#include
<stdlib.h>
#include
<stdlib.h>
#include
<stdio.h>
#include
<stdio.h>
#include
<time.h>
#ifndef __cplusplus
#ifndef __cplusplus
# include <stdatomic.h>
# include <stdatomic.h>
...
@@ -50,6 +51,7 @@
...
@@ -50,6 +51,7 @@
#define pipe(pfds) _pipe(pfds, 4096, _O_BINARY)
#define pipe(pfds) _pipe(pfds, 4096, _O_BINARY)
#define strerror_r(arg1, arg2, arg3) strerror_s(arg2, arg3, arg1)
#define strerror_r(arg1, arg2, arg3) strerror_s(arg2, arg3, arg1)
#define ctime_r(arg1, arg2) ctime_s(arg2, sizeof(arg2), arg1)
#define ctime_r(arg1, arg2) ctime_s(arg2, sizeof(arg2), arg1)
#define asctime_r(arg1, arg2) asctime_s(arg2, sizeof(arg2), arg1)
#endif
#endif
#ifdef __MACH__
#ifdef __MACH__
#include
<dispatch/dispatch.h>
#include
<dispatch/dispatch.h>
...
@@ -453,6 +455,14 @@ void dap_lendian_put64(uint8_t *a_buf, uint64_t a_val);
...
@@ -453,6 +455,14 @@ void dap_lendian_put64(uint8_t *a_buf, uint64_t a_val);
#define DAP_USEC_PER_SEC 1000000
#define DAP_USEC_PER_SEC 1000000
void
dap_usleep
(
time_t
a_microseconds
);
void
dap_usleep
(
time_t
a_microseconds
);
/**
* @brief dap_ctime_r This function does the same as ctime_r, but if it returns (null), a line break is added.
* @param a_time
* @param a_buf The minimum buffer size is 26 elements.
* @return
*/
char
*
dap_ctime_r
(
time_t
*
a_time
,
char
*
a_buf
);
#ifdef __MINGW32__
#ifdef __MINGW32__
...
...
This diff is collapsed.
Click to expand it.
dap-sdk/core/src/dap_common.c
+
10
−
0
View file @
fea8646c
...
@@ -1066,3 +1066,13 @@ void dap_usleep(time_t a_microseconds)
...
@@ -1066,3 +1066,13 @@ void dap_usleep(time_t a_microseconds)
#endif
#endif
}
}
char
*
dap_ctime_r
(
time_t
*
a_time
,
char
*
a_buf
){
struct
tm
*
l_time
=
localtime
(
a_time
);
char
*
l_str_time
=
asctime_r
(
l_time
,
a_buf
);
if
(
l_str_time
)
return
l_str_time
;
else
return
"(null)
\n
"
;
// localtime_r()
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment