adaptation for bkap

Fork of X_NUCLEO_IDB0XA1 by ST

Committer:
vrou44
Date:
Mon May 14 12:32:41 2018 +0000
Revision:
308:36435ab0e5b2
Parent:
297:c26445716704
Changes for Book And Plug Proto

Who changed what in which revision?

UserRevisionLine numberNew 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 /*---------------------------------------------------------------------------*/