X_NUCLEO_IDB05A1
Dependencies: mbed-os-example-ble-Advertising
source/platform/ble_clock.c@308:51c158b772b1, 23 months ago (annotated)
- Committer:
- divyarehani
- Date:
- Fri Sep 02 09:56:16 2022 +0000
- Revision:
- 308:51c158b772b1
- Parent:
- 297:c26445716704
hi;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Wolfgang Betz |
132:51056160fa4a | 1 | |
Vincent Coubard |
297:c26445716704 | 2 | #include "ble_clock.h" |
Vincent Coubard |
274:4826afdae563 | 3 | #ifdef YOTTA_CFG_MBED_OS |
Vincent Coubard |
274:4826afdae563 | 4 | #include "mbed-drivers/wait_api.h" |
Vincent Coubard |
274:4826afdae563 | 5 | #include "mbed-drivers/rtc_time.h" |
Vincent Coubard |
274:4826afdae563 | 6 | #else |
Vincent Coubard |
274:4826afdae563 | 7 | #include "wait_api.h" |
Vincent Coubard |
274:4826afdae563 | 8 | #include "rtc_time.h" |
Vincent Coubard |
274:4826afdae563 | 9 | #endif |
Wolfgang Betz |
132:51056160fa4a | 10 | |
Wolfgang Betz |
132:51056160fa4a | 11 | const uint32_t CLOCK_SECOND = 1000; |
Wolfgang Betz |
132:51056160fa4a | 12 | |
Wolfgang Betz |
132:51056160fa4a | 13 | /*---------------------------------------------------------------------------*/ |
Wolfgang Betz |
132:51056160fa4a | 14 | |
Wolfgang Betz |
132:51056160fa4a | 15 | void Clock_Init(void) |
Wolfgang Betz |
132:51056160fa4a | 16 | { |
Wolfgang Betz |
132:51056160fa4a | 17 | //Not Used |
Wolfgang Betz |
132:51056160fa4a | 18 | } |
Wolfgang Betz |
132:51056160fa4a | 19 | |
Wolfgang Betz |
132:51056160fa4a | 20 | /*---------------------------------------------------------------------------*/ |
Wolfgang Betz |
132:51056160fa4a | 21 | |
Wolfgang Betz |
132:51056160fa4a | 22 | tClockTime Clock_Time(void) |
Wolfgang Betz |
132:51056160fa4a | 23 | { |
Wolfgang Betz |
132:51056160fa4a | 24 | return clock(); |
Wolfgang Betz |
132:51056160fa4a | 25 | } |
Wolfgang Betz |
132:51056160fa4a | 26 | |
Wolfgang Betz |
132:51056160fa4a | 27 | /*---------------------------------------------------------------------------*/ |
Wolfgang Betz |
132:51056160fa4a | 28 | /** |
Wolfgang Betz |
132:51056160fa4a | 29 | * Wait for a multiple of 1 ms. |
Wolfgang Betz |
132:51056160fa4a | 30 | * |
Wolfgang Betz |
132:51056160fa4a | 31 | */ |
Wolfgang Betz |
132:51056160fa4a | 32 | void Clock_Wait(uint32_t i) |
Wolfgang Betz |
132:51056160fa4a | 33 | { |
Wolfgang Betz |
132:51056160fa4a | 34 | wait_ms(i); |
Wolfgang Betz |
132:51056160fa4a | 35 | } |
Vincent Coubard |
274:4826afdae563 | 36 | /*---------------------------------------------------------------------------*/ |