File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change 21
21
#include < stdint.h>
22
22
#include " objects.h" // TODO: Replace by the proper target config file
23
23
24
+ // provide default values for the config
25
+ #ifndef YOTTA_CFG_MINAR_PLATFORM_TIME_MASK
26
+ # define YOTTA_CFG_MINAR_PLATFORM_TIME_MASK 0xFFFFFFFFu
27
+ #endif
28
+ #ifndef YOTTA_CFG_MINAR_PLATFORM_TIME_BASE
29
+ # define YOTTA_CFG_MINAR_PLATFORM_TIME_BASE 1000
30
+ #endif
31
+ #ifndef YOTTA_CFG_MINAR_PLATFORM_MINIMUM_SLEEP
32
+ # define YOTTA_CFG_MINAR_PLATFORM_MINIMUM_SLEEP 1
33
+ #endif
34
+
35
+ #define MINAR_PLATFORM_TIME_MASK YOTTA_CFG_MINAR_PLATFORM_TIME_MASK
36
+ // backwards compatible guard for definition in `mbed-hal-<chip>/target_config.h`
37
+ #ifndef MINAR_PLATFORM_TIME_BASE
38
+ # define MINAR_PLATFORM_TIME_BASE YOTTA_CFG_MINAR_PLATFORM_TIME_BASE
39
+ #endif
40
+ #ifndef MINAR_PLATFORM_MINIMUM_SLEEP
41
+ # define MINAR_PLATFORM_MINIMUM_SLEEP YOTTA_CFG_MINAR_PLATFORM_MINIMUM_SLEEP
42
+ #endif
43
+
44
+
24
45
namespace minar {
25
46
namespace platform {
26
47
@@ -33,7 +54,7 @@ enum Constants{
33
54
Time_Mask = YOTTA_CFG_MINAR_TEST_CLOCK_OVERFLOW
34
55
#else
35
56
// 32 bits of time for mbed platforms
36
- Time_Mask = 0xFFFFFFFFu
57
+ Time_Mask = MINAR_PLATFORM_TIME_MASK
37
58
#endif
38
59
};
39
60
You can’t perform that action at this time.
0 commit comments