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/link_layer.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 : link_layer.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 BlueNRG's link layer. It contains |
sjallouli | 0:a948f5f3904c | 7 | * definition of functions for link layer, most of which are |
sjallouli | 0:a948f5f3904c | 8 | * mapped to HCI commands. |
sjallouli | 0:a948f5f3904c | 9 | ******************************************************************************** |
sjallouli | 0:a948f5f3904c | 10 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS |
sjallouli | 0:a948f5f3904c | 11 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. |
sjallouli | 0:a948f5f3904c | 12 | * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, |
sjallouli | 0:a948f5f3904c | 13 | * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE |
sjallouli | 0:a948f5f3904c | 14 | * CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING |
sjallouli | 0:a948f5f3904c | 15 | * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. |
sjallouli | 0:a948f5f3904c | 16 | *******************************************************************************/ |
sjallouli | 0:a948f5f3904c | 17 | |
sjallouli | 0:a948f5f3904c | 18 | #ifndef _LINK_LAYER_H |
sjallouli | 0:a948f5f3904c | 19 | #define _LINK_LAYER_H |
sjallouli | 0:a948f5f3904c | 20 | |
sjallouli | 0:a948f5f3904c | 21 | #include <ble_status.h> |
sjallouli | 0:a948f5f3904c | 22 | |
sjallouli | 0:a948f5f3904c | 23 | /****************************************************************************** |
sjallouli | 0:a948f5f3904c | 24 | * Types |
sjallouli | 0:a948f5f3904c | 25 | *****************************************************************************/ |
sjallouli | 0:a948f5f3904c | 26 | |
sjallouli | 0:a948f5f3904c | 27 | /** |
sjallouli | 0:a948f5f3904c | 28 | * advertising policy for filtering (white list related) |
sjallouli | 0:a948f5f3904c | 29 | */ |
sjallouli | 0:a948f5f3904c | 30 | typedef tHalUint8 tAdvPolicy; |
sjallouli | 0:a948f5f3904c | 31 | #define NO_WHITE_LIST_USE (0X00) |
sjallouli | 0:a948f5f3904c | 32 | #define WHITE_LIST_FOR_ONLY_SCAN (0X01) |
sjallouli | 0:a948f5f3904c | 33 | #define WHITE_LIST_FOR_ONLY_CONN (0X02) |
sjallouli | 0:a948f5f3904c | 34 | #define WHITE_LIST_FOR_ALL (0X03) |
sjallouli | 0:a948f5f3904c | 35 | |
sjallouli | 0:a948f5f3904c | 36 | /** |
sjallouli | 0:a948f5f3904c | 37 | * Bluetooth 48 bit address (in little-endian order). |
sjallouli | 0:a948f5f3904c | 38 | */ |
sjallouli | 0:a948f5f3904c | 39 | typedef tHalUint8 tBDAddr[6]; |
sjallouli | 0:a948f5f3904c | 40 | |
sjallouli | 0:a948f5f3904c | 41 | |
sjallouli | 0:a948f5f3904c | 42 | /** |
sjallouli | 0:a948f5f3904c | 43 | * Bluetooth address type |
sjallouli | 0:a948f5f3904c | 44 | */ |
sjallouli | 0:a948f5f3904c | 45 | typedef tHalUint8 tAddrType; |
sjallouli | 0:a948f5f3904c | 46 | #define RANDOM_ADDR (1) |
sjallouli | 0:a948f5f3904c | 47 | #define PUBLIC_ADDR (0) |
sjallouli | 0:a948f5f3904c | 48 | |
sjallouli | 0:a948f5f3904c | 49 | /** |
sjallouli | 0:a948f5f3904c | 50 | * Advertising type |
sjallouli | 0:a948f5f3904c | 51 | */ |
sjallouli | 0:a948f5f3904c | 52 | typedef tHalUint8 tAdvType; |
sjallouli | 0:a948f5f3904c | 53 | /** |
sjallouli | 0:a948f5f3904c | 54 | * undirected scannable and connectable |
sjallouli | 0:a948f5f3904c | 55 | */ |
sjallouli | 0:a948f5f3904c | 56 | #define ADV_IND (0x00) |
sjallouli | 0:a948f5f3904c | 57 | |
sjallouli | 0:a948f5f3904c | 58 | /** |
sjallouli | 0:a948f5f3904c | 59 | * directed non scannable |
sjallouli | 0:a948f5f3904c | 60 | */ |
sjallouli | 0:a948f5f3904c | 61 | #define ADV_DIRECT_IND (0x01) |
sjallouli | 0:a948f5f3904c | 62 | |
sjallouli | 0:a948f5f3904c | 63 | /** |
sjallouli | 0:a948f5f3904c | 64 | * scannable non connectable |
sjallouli | 0:a948f5f3904c | 65 | */ |
sjallouli | 0:a948f5f3904c | 66 | #define ADV_SCAN_IND (0x02) |
sjallouli | 0:a948f5f3904c | 67 | |
sjallouli | 0:a948f5f3904c | 68 | /** |
sjallouli | 0:a948f5f3904c | 69 | * non-connectable and no scan response (used for passive scan) |
sjallouli | 0:a948f5f3904c | 70 | */ |
sjallouli | 0:a948f5f3904c | 71 | #define ADV_NONCONN_IND (0x03) |
sjallouli | 0:a948f5f3904c | 72 | |
sjallouli | 0:a948f5f3904c | 73 | |
sjallouli | 0:a948f5f3904c | 74 | /* 0X04-0XFF RESERVED */ |
sjallouli | 0:a948f5f3904c | 75 | |
sjallouli | 0:a948f5f3904c | 76 | |
sjallouli | 0:a948f5f3904c | 77 | /** |
sjallouli | 0:a948f5f3904c | 78 | * lowest allowed interval value for connectable types(20ms)..multiple of 625us |
sjallouli | 0:a948f5f3904c | 79 | */ |
sjallouli | 0:a948f5f3904c | 80 | #define ADV_INTERVAL_LOWEST_CONN (0X0020) |
sjallouli | 0:a948f5f3904c | 81 | |
sjallouli | 0:a948f5f3904c | 82 | /** |
sjallouli | 0:a948f5f3904c | 83 | * highest allowed interval value (10.24s)..multiple of 625us. |
sjallouli | 0:a948f5f3904c | 84 | */ |
sjallouli | 0:a948f5f3904c | 85 | #define ADV_INTERVAL_HIGHEST (0X4000) |
sjallouli | 0:a948f5f3904c | 86 | |
sjallouli | 0:a948f5f3904c | 87 | /** |
sjallouli | 0:a948f5f3904c | 88 | * lowest allowed interval value for non connectable types |
sjallouli | 0:a948f5f3904c | 89 | * (100ms)..multiple of 625us. |
sjallouli | 0:a948f5f3904c | 90 | */ |
sjallouli | 0:a948f5f3904c | 91 | #define ADV_INTERVAL_LOWEST_NONCONN (0X00a0) |
sjallouli | 0:a948f5f3904c | 92 | |
sjallouli | 0:a948f5f3904c | 93 | /** |
sjallouli | 0:a948f5f3904c | 94 | * Default value of advertising interval for both min/max values. |
sjallouli | 0:a948f5f3904c | 95 | * This will be used if host does not specify any advertising parameters |
sjallouli | 0:a948f5f3904c | 96 | * including advIntervalMax and advIntervalMin |
sjallouli | 0:a948f5f3904c | 97 | * value = 1.28 sec (in units of 625 us) |
sjallouli | 0:a948f5f3904c | 98 | */ |
sjallouli | 0:a948f5f3904c | 99 | #define ADV_INTERVAL_DEFAULT (0x0800) |
sjallouli | 0:a948f5f3904c | 100 | |
sjallouli | 0:a948f5f3904c | 101 | #define ADV_CH_37 0x01 |
sjallouli | 0:a948f5f3904c | 102 | #define ADV_CH_38 0x02 |
sjallouli | 0:a948f5f3904c | 103 | #define ADV_CH_39 0x04 |
sjallouli | 0:a948f5f3904c | 104 | |
sjallouli | 0:a948f5f3904c | 105 | |
sjallouli | 0:a948f5f3904c | 106 | |
sjallouli | 0:a948f5f3904c | 107 | #endif /* _LINK_LAYER_H */ |