BLE UART example
Fork of Nucleo_BLE_BlueNRG by
platform/src/clock.c@0:a948f5f3904c, 2014-12-19 (annotated)
- Committer:
- sjallouli
- Date:
- Fri Dec 19 18:56:07 2014 +0000
- Revision:
- 0:a948f5f3904c
BLE_BlueNRG for Nucleo board
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sjallouli | 0:a948f5f3904c | 1 | |
sjallouli | 0:a948f5f3904c | 2 | #include "clock.h" |
sjallouli | 0:a948f5f3904c | 3 | #include "wait_api.h" |
sjallouli | 0:a948f5f3904c | 4 | #include "rtc_time.h" |
sjallouli | 0:a948f5f3904c | 5 | |
sjallouli | 0:a948f5f3904c | 6 | const uint32_t CLOCK_SECOND = 1000; |
sjallouli | 0:a948f5f3904c | 7 | |
sjallouli | 0:a948f5f3904c | 8 | /*---------------------------------------------------------------------------*/ |
sjallouli | 0:a948f5f3904c | 9 | |
sjallouli | 0:a948f5f3904c | 10 | void Clock_Init(void) |
sjallouli | 0:a948f5f3904c | 11 | { |
sjallouli | 0:a948f5f3904c | 12 | //Not Used |
sjallouli | 0:a948f5f3904c | 13 | } |
sjallouli | 0:a948f5f3904c | 14 | |
sjallouli | 0:a948f5f3904c | 15 | /*---------------------------------------------------------------------------*/ |
sjallouli | 0:a948f5f3904c | 16 | |
sjallouli | 0:a948f5f3904c | 17 | tClockTime Clock_Time(void) |
sjallouli | 0:a948f5f3904c | 18 | { |
sjallouli | 0:a948f5f3904c | 19 | return clock(); |
sjallouli | 0:a948f5f3904c | 20 | } |
sjallouli | 0:a948f5f3904c | 21 | |
sjallouli | 0:a948f5f3904c | 22 | /*---------------------------------------------------------------------------*/ |
sjallouli | 0:a948f5f3904c | 23 | /** |
sjallouli | 0:a948f5f3904c | 24 | * Wait for a multiple of 1 ms. |
sjallouli | 0:a948f5f3904c | 25 | * |
sjallouli | 0:a948f5f3904c | 26 | */ |
sjallouli | 0:a948f5f3904c | 27 | void Clock_Wait(int i) |
sjallouli | 0:a948f5f3904c | 28 | { |
sjallouli | 0:a948f5f3904c | 29 | wait_ms(i); |
sjallouli | 0:a948f5f3904c | 30 | } |
sjallouli | 0:a948f5f3904c | 31 | /*---------------------------------------------------------------------------*/ |
sjallouli | 0:a948f5f3904c | 32 | |
sjallouli | 0:a948f5f3904c | 33 | |
sjallouli | 0:a948f5f3904c | 34 |