File tree Expand file tree Collapse file tree 2 files changed +15
-15
lines changed Expand file tree Collapse file tree 2 files changed +15
-15
lines changed Original file line number Diff line number Diff line change 23
23
#include " platform/NonCopyable.h"
24
24
#include " hal/lp_ticker_api.h"
25
25
26
+ /* *
27
+ * Number of microseconds in a second
28
+ */
29
+ #define MICROSECONDS_IN_SECOND (us_timestamp_t )1000000
30
+
31
+ /* *
32
+ * Converts seconds to microseconds
33
+ */
34
+ #define SECONDS_TO_MICROSECONDS (SECONDS ) (us_timestamp_t )(MICROSECONDS_IN_SECOND * SECONDS)
35
+
36
+ /* *
37
+ * Converts microseconds to seconds
38
+ */
39
+ #define MICROSECONDS_TO_SECONDS (MICROSECONDS ) (s_timestamp_t )(MICROSECONDS / MICROSECONDS_IN_SECOND)
40
+
26
41
namespace mbed {
27
42
/* *
28
43
* \addtogroup drivers_Ticker Ticker class
Original file line number Diff line number Diff line change 24
24
#include <stdbool.h>
25
25
#include "device.h"
26
26
27
- /**
28
- * Number of microseconds in a second
29
- */
30
- #define MICROSECONDS_IN_SECOND (us_timestamp_t)1000000
31
-
32
- /**
33
- * Converts seconds to microseconds
34
- */
35
- #define SECONDS_TO_MICROSECONDS (SECONDS ) (us_timestamp_t)(MICROSECONDS_IN_SECOND * SECONDS)
36
-
37
- /**
38
- * Converts microseconds to seconds
39
- */
40
- #define MICROSECONDS_TO_SECONDS (MICROSECONDS ) (s_timestamp_t)(MICROSECONDS / MICROSECONDS_IN_SECOND)
41
-
42
27
/**
43
28
* Legacy format representing a timestamp in us.
44
29
* Given it is modeled as a 32 bit integer, this type can represent timestamp
You can’t perform that action at this time.
0 commit comments