ble

Dependencies:   HC_SR04_Ultrasonic_Library Servo mbed

Fork of FIP_REV1 by Robotique FIP

Committer:
julientiron
Date:
Thu Jul 09 13:33:36 2015 +0000
Revision:
4:69a35a56ac48
Parent:
0:3d641e170a74
BLE

Who changed what in which revision?

UserRevisionLine numberNew contents of line
julientiron 0:3d641e170a74 1 #include "cube_hal.h"
julientiron 0:3d641e170a74 2 #include "clock.h"
julientiron 0:3d641e170a74 3
julientiron 0:3d641e170a74 4
julientiron 0:3d641e170a74 5 const tHalUint32 CLOCK_SECOND = 1000;
julientiron 0:3d641e170a74 6
julientiron 0:3d641e170a74 7 /*---------------------------------------------------------------------------*/
julientiron 0:3d641e170a74 8
julientiron 0:3d641e170a74 9 void Clock_Init(void)
julientiron 0:3d641e170a74 10 {
julientiron 0:3d641e170a74 11 // FIXME: as long as Cube HAL is initialized this is OK
julientiron 0:3d641e170a74 12 // Cube HAL default is one clock each 1 ms
julientiron 0:3d641e170a74 13 }
julientiron 0:3d641e170a74 14
julientiron 0:3d641e170a74 15 /*---------------------------------------------------------------------------*/
julientiron 0:3d641e170a74 16
julientiron 0:3d641e170a74 17 tClockTime Clock_Time(void)
julientiron 0:3d641e170a74 18 {
julientiron 0:3d641e170a74 19 return HAL_GetTick();
julientiron 0:3d641e170a74 20 }
julientiron 0:3d641e170a74 21
julientiron 0:3d641e170a74 22 /*---------------------------------------------------------------------------*/
julientiron 0:3d641e170a74 23 /**
julientiron 0:3d641e170a74 24 * Wait for a multiple of 1 ms.
julientiron 0:3d641e170a74 25 *
julientiron 0:3d641e170a74 26 */
julientiron 0:3d641e170a74 27 void Clock_Wait(int i)
julientiron 0:3d641e170a74 28 {
julientiron 0:3d641e170a74 29 HAL_Delay(i);
julientiron 0:3d641e170a74 30 }
julientiron 0:3d641e170a74 31 /*---------------------------------------------------------------------------*/
julientiron 0:3d641e170a74 32