BLE_API wrapper library for STMicroelectronics' BlueNRG Bluetooth Low Energy expansion board shield

Fork of X_NUCLEO_IDB0XA1 by ST Expansion SW Team

Committer:
Wolfgang Betz
Date:
Wed Oct 07 08:39:04 2015 +0200
Revision:
132:51056160fa4a
Andrea's version as of mail from 10/06/2015 05:56 PM

From: Andrea PALMIERI <andrea.palmieri@st.com>
To: Wolfgang BETZ <wolfgang.betz@st.com>, Rohit Grover <rohit.grover@arm.com>,
Antonio VILEI <antonio.vilei@st.com>, Mihail Stoyanov
<Mihail.Stoyanov@arm.com>
CC: Nicola CAPOVILLA <nicola.capovilla@st.com>, Silvio Lucio OLIVA
<silvio.oliva@st.com>, "jonathan.austin@arm.com" <jonathan.austin@arm.com>
Content-Class: urn:content-classes:message
Date: Tue, 6 Oct 2015 17:56:34 +0200
Subject: RE: Arduino Compatibility of X-NUCLEO-IDB04A1

Who changed what in which revision?

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