bluetooth control motor

Dependents:   BLE_LED_IDB0XA1_demo MOTOR_BLE_V2 Motor_Ble_v1 Motor_Ble_v10223 ... more

Fork of X_NUCLEO_IDB0XA1 by ST

Committer:
barry210110
Date:
Sun Feb 04 06:55:14 2018 +0000
Revision:
309:492635ae323d
Parent:
297:c26445716704
final

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