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.
hci/inc/hal_types.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 : hal_types.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 : This header file defines the basic data types used by the |
sjallouli | 0:a948f5f3904c | 7 | * 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 | #ifndef __HAL_TYPES_H__ |
sjallouli | 0:a948f5f3904c | 17 | #define __HAL_TYPES_H__ |
sjallouli | 0:a948f5f3904c | 18 | |
sjallouli | 0:a948f5f3904c | 19 | #include <stdint.h> |
sjallouli | 0:a948f5f3904c | 20 | |
sjallouli | 0:a948f5f3904c | 21 | #ifndef NULL |
sjallouli | 0:a948f5f3904c | 22 | #define NULL ((void *)0) |
sjallouli | 0:a948f5f3904c | 23 | #endif |
sjallouli | 0:a948f5f3904c | 24 | |
sjallouli | 0:a948f5f3904c | 25 | /* Byte order conversions */ |
sjallouli | 0:a948f5f3904c | 26 | #if __BYTE_ORDER == __LITTLE_ENDIAN |
sjallouli | 0:a948f5f3904c | 27 | #define htobs(d) (d) |
sjallouli | 0:a948f5f3904c | 28 | #define htobl(d) (d) |
sjallouli | 0:a948f5f3904c | 29 | #define btohs(d) (d) |
sjallouli | 0:a948f5f3904c | 30 | #define btohl(d) (d) |
sjallouli | 0:a948f5f3904c | 31 | #elif __BYTE_ORDER == __BIG_ENDIAN |
sjallouli | 0:a948f5f3904c | 32 | #define htobs(d) bswap_16(d) |
sjallouli | 0:a948f5f3904c | 33 | #define htobl(d) bswap_32(d) |
sjallouli | 0:a948f5f3904c | 34 | #define btohs(d) bswap_16(d) |
sjallouli | 0:a948f5f3904c | 35 | #define btohl(d) bswap_32(d) |
sjallouli | 0:a948f5f3904c | 36 | #else |
sjallouli | 0:a948f5f3904c | 37 | #error "Unknown byte order" |
sjallouli | 0:a948f5f3904c | 38 | #endif |
sjallouli | 0:a948f5f3904c | 39 | |
sjallouli | 0:a948f5f3904c | 40 | /** |
sjallouli | 0:a948f5f3904c | 41 | * Integer type : Machines natural word size |
sjallouli | 0:a948f5f3904c | 42 | */ |
sjallouli | 0:a948f5f3904c | 43 | typedef int tHalInt; |
sjallouli | 0:a948f5f3904c | 44 | |
sjallouli | 0:a948f5f3904c | 45 | /** |
sjallouli | 0:a948f5f3904c | 46 | * Unsigned Integer type : Machines natural word size |
sjallouli | 0:a948f5f3904c | 47 | */ |
sjallouli | 0:a948f5f3904c | 48 | typedef unsigned int tHalUint; |
sjallouli | 0:a948f5f3904c | 49 | |
sjallouli | 0:a948f5f3904c | 50 | /** |
sjallouli | 0:a948f5f3904c | 51 | * signed 32-bit |
sjallouli | 0:a948f5f3904c | 52 | */ |
sjallouli | 0:a948f5f3904c | 53 | typedef int tHalInt32; |
sjallouli | 0:a948f5f3904c | 54 | |
sjallouli | 0:a948f5f3904c | 55 | /** |
sjallouli | 0:a948f5f3904c | 56 | * unsigned 32-bit |
sjallouli | 0:a948f5f3904c | 57 | */ |
sjallouli | 0:a948f5f3904c | 58 | typedef unsigned int tHalUint32; |
sjallouli | 0:a948f5f3904c | 59 | |
sjallouli | 0:a948f5f3904c | 60 | /** |
sjallouli | 0:a948f5f3904c | 61 | * signed 16-bit |
sjallouli | 0:a948f5f3904c | 62 | */ |
sjallouli | 0:a948f5f3904c | 63 | typedef short tHalInt16; |
sjallouli | 0:a948f5f3904c | 64 | |
sjallouli | 0:a948f5f3904c | 65 | /** |
sjallouli | 0:a948f5f3904c | 66 | * unsigned 16-bit |
sjallouli | 0:a948f5f3904c | 67 | */ |
sjallouli | 0:a948f5f3904c | 68 | typedef unsigned short tHalUint16; |
sjallouli | 0:a948f5f3904c | 69 | |
sjallouli | 0:a948f5f3904c | 70 | /** |
sjallouli | 0:a948f5f3904c | 71 | * signed 8-bit |
sjallouli | 0:a948f5f3904c | 72 | */ |
sjallouli | 0:a948f5f3904c | 73 | typedef signed char tHalInt8; |
sjallouli | 0:a948f5f3904c | 74 | |
sjallouli | 0:a948f5f3904c | 75 | /** |
sjallouli | 0:a948f5f3904c | 76 | * unsigned 8-bit |
sjallouli | 0:a948f5f3904c | 77 | */ |
sjallouli | 0:a948f5f3904c | 78 | typedef unsigned char tHalUint8; |
sjallouli | 0:a948f5f3904c | 79 | |
sjallouli | 0:a948f5f3904c | 80 | /** |
sjallouli | 0:a948f5f3904c | 81 | * Boolean: smallest value. |
sjallouli | 0:a948f5f3904c | 82 | */ |
sjallouli | 0:a948f5f3904c | 83 | typedef char tHalBool; |
sjallouli | 0:a948f5f3904c | 84 | |
sjallouli | 0:a948f5f3904c | 85 | #ifndef TRUE |
sjallouli | 0:a948f5f3904c | 86 | #define TRUE (1) |
sjallouli | 0:a948f5f3904c | 87 | #endif |
sjallouli | 0:a948f5f3904c | 88 | |
sjallouli | 0:a948f5f3904c | 89 | #ifndef FALSE |
sjallouli | 0:a948f5f3904c | 90 | #define FALSE (0) |
sjallouli | 0:a948f5f3904c | 91 | #endif |
sjallouli | 0:a948f5f3904c | 92 | |
sjallouli | 0:a948f5f3904c | 93 | |
sjallouli | 0:a948f5f3904c | 94 | |
sjallouli | 0:a948f5f3904c | 95 | #endif /* __HAL_TYPES_H__ */ |
sjallouli | 0:a948f5f3904c | 96 |