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