BLE_BlueNRG for Nucleo board
Dependents: Nucleo_BLE_HeartRate Nucleo_BLE_UART Nucleo_BLE_UART
Warning: Deprecated!
Supported drivers and applications can be found at this link.
platform/inc/clock.h@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 | /******************** (C) COPYRIGHT 2012 STMicroelectronics ******************** |
sjallouli | 0:a948f5f3904c | 2 | * File Name : clock.h |
sjallouli | 0:a948f5f3904c | 3 | * Author : AMS - HEA&RF BU |
sjallouli | 0:a948f5f3904c | 4 | * Version : V1.0.0 |
sjallouli | 0:a948f5f3904c | 5 | * Date : 19-July-2012 |
sjallouli | 0:a948f5f3904c | 6 | * Description : Header file for clock library, that gives a simple time |
sjallouli | 0:a948f5f3904c | 7 | * reference to the BLE Stack. |
sjallouli | 0:a948f5f3904c | 8 | ******************************************************************************** |
sjallouli | 0:a948f5f3904c | 9 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS |
sjallouli | 0:a948f5f3904c | 10 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. |
sjallouli | 0:a948f5f3904c | 11 | * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, |
sjallouli | 0:a948f5f3904c | 12 | * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE |
sjallouli | 0:a948f5f3904c | 13 | * CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING |
sjallouli | 0:a948f5f3904c | 14 | * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. |
sjallouli | 0:a948f5f3904c | 15 | *******************************************************************************/ |
sjallouli | 0:a948f5f3904c | 16 | |
sjallouli | 0:a948f5f3904c | 17 | #ifndef __CLOCK_H__ |
sjallouli | 0:a948f5f3904c | 18 | #define __CLOCK_H__ |
sjallouli | 0:a948f5f3904c | 19 | |
sjallouli | 0:a948f5f3904c | 20 | //#include <hal_types.h> |
sjallouli | 0:a948f5f3904c | 21 | #include <stdint.h> |
sjallouli | 0:a948f5f3904c | 22 | |
sjallouli | 0:a948f5f3904c | 23 | /** |
sjallouli | 0:a948f5f3904c | 24 | * Number of clocks in one seconds. |
sjallouli | 0:a948f5f3904c | 25 | * This value must be set by each platorm implementation, basing on its needs. |
sjallouli | 0:a948f5f3904c | 26 | */ |
sjallouli | 0:a948f5f3904c | 27 | extern const uint32_t CLOCK_SECOND; |
sjallouli | 0:a948f5f3904c | 28 | |
sjallouli | 0:a948f5f3904c | 29 | typedef uint32_t tClockTime; |
sjallouli | 0:a948f5f3904c | 30 | |
sjallouli | 0:a948f5f3904c | 31 | /** |
sjallouli | 0:a948f5f3904c | 32 | * This function initializes the clock library and should be called before |
sjallouli | 0:a948f5f3904c | 33 | * any other Stack functions. |
sjallouli | 0:a948f5f3904c | 34 | * |
sjallouli | 0:a948f5f3904c | 35 | */ |
sjallouli | 0:a948f5f3904c | 36 | void Clock_Init(void); |
sjallouli | 0:a948f5f3904c | 37 | |
sjallouli | 0:a948f5f3904c | 38 | /** |
sjallouli | 0:a948f5f3904c | 39 | * This function returns the current system clock time. it is used by |
sjallouli | 0:a948f5f3904c | 40 | * the host stack and has to be implemented. |
sjallouli | 0:a948f5f3904c | 41 | * |
sjallouli | 0:a948f5f3904c | 42 | * @return The current clock time, measured in system ticks. |
sjallouli | 0:a948f5f3904c | 43 | */ |
sjallouli | 0:a948f5f3904c | 44 | tClockTime Clock_Time(void); |
sjallouli | 0:a948f5f3904c | 45 | |
sjallouli | 0:a948f5f3904c | 46 | /** |
sjallouli | 0:a948f5f3904c | 47 | * This function waits for a given number of milliseconds. |
sjallouli | 0:a948f5f3904c | 48 | * |
sjallouli | 0:a948f5f3904c | 49 | */ |
sjallouli | 0:a948f5f3904c | 50 | void Clock_Wait(int i); |
sjallouli | 0:a948f5f3904c | 51 | |
sjallouli | 0:a948f5f3904c | 52 | |
sjallouli | 0:a948f5f3904c | 53 | #endif /* __CLOCK_H__ */ |
sjallouli | 0:a948f5f3904c | 54 | |
sjallouli | 0:a948f5f3904c | 55 | |
sjallouli | 0:a948f5f3904c | 56 |