Example for Bluetooth low energy interface
Dependencies: mbed HC_SR04_Ultrasonic_Library
BlueNRG_F4_BSP/inc/clock.h@3:829f081fde15, 2015-05-19 (annotated)
- Committer:
- julientiron
- Date:
- Tue May 19 20:42:25 2015 +0000
- Revision:
- 3:829f081fde15
- Parent:
- 0:3d641e170a74
hihi;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
julientiron | 0:3d641e170a74 | 1 | /******************** (C) COPYRIGHT 2012 STMicroelectronics ******************** |
julientiron | 0:3d641e170a74 | 2 | * File Name : clock.h |
julientiron | 0:3d641e170a74 | 3 | * Author : AMS - HEA&RF BU |
julientiron | 0:3d641e170a74 | 4 | * Version : V1.0.0 |
julientiron | 0:3d641e170a74 | 5 | * Date : 19-July-2012 |
julientiron | 0:3d641e170a74 | 6 | * Description : Header file for clock library, that gives a simple time |
julientiron | 0:3d641e170a74 | 7 | * reference to the BLE Stack. |
julientiron | 0:3d641e170a74 | 8 | ******************************************************************************** |
julientiron | 0:3d641e170a74 | 9 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS |
julientiron | 0:3d641e170a74 | 10 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. |
julientiron | 0:3d641e170a74 | 11 | * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, |
julientiron | 0:3d641e170a74 | 12 | * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE |
julientiron | 0:3d641e170a74 | 13 | * CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING |
julientiron | 0:3d641e170a74 | 14 | * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. |
julientiron | 0:3d641e170a74 | 15 | *******************************************************************************/ |
julientiron | 0:3d641e170a74 | 16 | |
julientiron | 0:3d641e170a74 | 17 | #ifndef __CLOCK_H__ |
julientiron | 0:3d641e170a74 | 18 | #define __CLOCK_H__ |
julientiron | 0:3d641e170a74 | 19 | |
julientiron | 0:3d641e170a74 | 20 | #include <hal_types.h> |
julientiron | 0:3d641e170a74 | 21 | |
julientiron | 0:3d641e170a74 | 22 | /** |
julientiron | 0:3d641e170a74 | 23 | * Number of clocks in one seconds. |
julientiron | 0:3d641e170a74 | 24 | * This value must be set by each platorm implementation, basing on its needs. |
julientiron | 0:3d641e170a74 | 25 | */ |
julientiron | 0:3d641e170a74 | 26 | extern const tHalUint32 CLOCK_SECOND; |
julientiron | 0:3d641e170a74 | 27 | |
julientiron | 0:3d641e170a74 | 28 | typedef tHalUint32 tClockTime; |
julientiron | 0:3d641e170a74 | 29 | |
julientiron | 0:3d641e170a74 | 30 | /** |
julientiron | 0:3d641e170a74 | 31 | * This function initializes the clock library and should be called before |
julientiron | 0:3d641e170a74 | 32 | * any other Stack functions. |
julientiron | 0:3d641e170a74 | 33 | * |
julientiron | 0:3d641e170a74 | 34 | */ |
julientiron | 0:3d641e170a74 | 35 | void Clock_Init(void); |
julientiron | 0:3d641e170a74 | 36 | |
julientiron | 0:3d641e170a74 | 37 | /** |
julientiron | 0:3d641e170a74 | 38 | * This function returns the current system clock time. it is used by |
julientiron | 0:3d641e170a74 | 39 | * the host stack and has to be implemented. |
julientiron | 0:3d641e170a74 | 40 | * |
julientiron | 0:3d641e170a74 | 41 | * @return The current clock time, measured in system ticks. |
julientiron | 0:3d641e170a74 | 42 | */ |
julientiron | 0:3d641e170a74 | 43 | tClockTime Clock_Time(void); |
julientiron | 0:3d641e170a74 | 44 | |
julientiron | 0:3d641e170a74 | 45 | /** |
julientiron | 0:3d641e170a74 | 46 | * This function waits for a given number of milliseconds. |
julientiron | 0:3d641e170a74 | 47 | * |
julientiron | 0:3d641e170a74 | 48 | */ |
julientiron | 0:3d641e170a74 | 49 | void Clock_Wait(int i); |
julientiron | 0:3d641e170a74 | 50 | |
julientiron | 0:3d641e170a74 | 51 | |
julientiron | 0:3d641e170a74 | 52 | #endif /* __CLOCK_H__ */ |
julientiron | 0:3d641e170a74 | 53 |