Compilation fix for newer mbed-os
Fork of X_NUCLEO_IDB0XA1 by
x-nucleo-idb0xa1/bluenrg-hci/ble_link_layer.h@280:fbee0e3444be, 2016-09-15 (annotated)
- Committer:
- Vincent Coubard
- Date:
- Thu Sep 15 10:51:47 2016 +0100
- Branch:
- 34e2f6254ad7de7fc7f377a0614c3a672cf7cd5c
- Revision:
- 280:fbee0e3444be
- Parent:
- x-nucleo-idb0xa1/bluenrg-hci/link_layer.h@132:51056160fa4a
Sync with 34e2f6254ad7de7fc7f377a0614c3a672cf7cd5c
2016-07-28 15:27:24+02:00: Andrea Palmieri
Add ble_ prefix to filename
Signed-off-by: Andrea Palmieri <andrea.palmieri@st.com>
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Wolfgang Betz |
132:51056160fa4a | 1 | /******************** (C) COPYRIGHT 2012 STMicroelectronics ******************** |
Wolfgang Betz |
132:51056160fa4a | 2 | * File Name : link_layer.h |
Wolfgang Betz |
132:51056160fa4a | 3 | * Author : AMS - HEA&RF BU |
Wolfgang Betz |
132:51056160fa4a | 4 | * Version : V1.0.0 |
Wolfgang Betz |
132:51056160fa4a | 5 | * Date : 19-July-2012 |
Wolfgang Betz |
132:51056160fa4a | 6 | * Description : Header file for BlueNRG's link layer. It contains |
Wolfgang Betz |
132:51056160fa4a | 7 | * definition of functions for link layer, most of which are |
Wolfgang Betz |
132:51056160fa4a | 8 | * mapped to HCI commands. |
Wolfgang Betz |
132:51056160fa4a | 9 | ******************************************************************************** |
Wolfgang Betz |
132:51056160fa4a | 10 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS |
Wolfgang Betz |
132:51056160fa4a | 11 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. |
Wolfgang Betz |
132:51056160fa4a | 12 | * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, |
Wolfgang Betz |
132:51056160fa4a | 13 | * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE |
Wolfgang Betz |
132:51056160fa4a | 14 | * CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING |
Wolfgang Betz |
132:51056160fa4a | 15 | * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. |
Wolfgang Betz |
132:51056160fa4a | 16 | *******************************************************************************/ |
Wolfgang Betz |
132:51056160fa4a | 17 | |
Wolfgang Betz |
132:51056160fa4a | 18 | #ifndef _LINK_LAYER_H |
Wolfgang Betz |
132:51056160fa4a | 19 | #define _LINK_LAYER_H |
Wolfgang Betz |
132:51056160fa4a | 20 | |
Wolfgang Betz |
132:51056160fa4a | 21 | #include <ble_status.h> |
Wolfgang Betz |
132:51056160fa4a | 22 | |
Wolfgang Betz |
132:51056160fa4a | 23 | /** |
Wolfgang Betz |
132:51056160fa4a | 24 | *@addtogroup GAP GAP |
Wolfgang Betz |
132:51056160fa4a | 25 | *@brief API for GAP layer. |
Wolfgang Betz |
132:51056160fa4a | 26 | *@{ |
Wolfgang Betz |
132:51056160fa4a | 27 | */ |
Wolfgang Betz |
132:51056160fa4a | 28 | |
Wolfgang Betz |
132:51056160fa4a | 29 | /** |
Wolfgang Betz |
132:51056160fa4a | 30 | *@name Advertising filter |
Wolfgang Betz |
132:51056160fa4a | 31 | *Advertising policy for filtering (white list related) |
Wolfgang Betz |
132:51056160fa4a | 32 | *@{ |
Wolfgang Betz |
132:51056160fa4a | 33 | */ |
Wolfgang Betz |
132:51056160fa4a | 34 | #define NO_WHITE_LIST_USE (0x00) /**< Process scan and connection requests from all devices (i.e., the White List is not in use) */ |
Wolfgang Betz |
132:51056160fa4a | 35 | #define WHITE_LIST_FOR_ONLY_SCAN (0x01) /**< Process connection requests from all devices and only scan requests from devices that are in the White List */ |
Wolfgang Betz |
132:51056160fa4a | 36 | #define WHITE_LIST_FOR_ONLY_CONN (0x02) /**< Process scan requests from all devices and only connection requests from devices that are in the White List */ |
Wolfgang Betz |
132:51056160fa4a | 37 | #define WHITE_LIST_FOR_ALL (0x03) /**< Process scan and connection requests only from devices in the White List. */ |
Wolfgang Betz |
132:51056160fa4a | 38 | /** |
Wolfgang Betz |
132:51056160fa4a | 39 | * @} |
Wolfgang Betz |
132:51056160fa4a | 40 | */ |
Wolfgang Betz |
132:51056160fa4a | 41 | |
Wolfgang Betz |
132:51056160fa4a | 42 | |
Wolfgang Betz |
132:51056160fa4a | 43 | /** |
Wolfgang Betz |
132:51056160fa4a | 44 | * Bluetooth 48 bit address (in little-endian order). |
Wolfgang Betz |
132:51056160fa4a | 45 | */ |
Wolfgang Betz |
132:51056160fa4a | 46 | typedef uint8_t tBDAddr[6]; |
Wolfgang Betz |
132:51056160fa4a | 47 | |
Wolfgang Betz |
132:51056160fa4a | 48 | |
Wolfgang Betz |
132:51056160fa4a | 49 | /** |
Wolfgang Betz |
132:51056160fa4a | 50 | *@name Bluetooth address types |
Wolfgang Betz |
132:51056160fa4a | 51 | * Bluetooth address types |
Wolfgang Betz |
132:51056160fa4a | 52 | *@{ |
Wolfgang Betz |
132:51056160fa4a | 53 | */ |
Wolfgang Betz |
132:51056160fa4a | 54 | #define PUBLIC_ADDR (0) |
Wolfgang Betz |
132:51056160fa4a | 55 | #define RANDOM_ADDR (1) |
Wolfgang Betz |
132:51056160fa4a | 56 | #define STATIC_RANDOM_ADDR (1) |
Wolfgang Betz |
132:51056160fa4a | 57 | #define RESOLVABLE_PRIVATE_ADDR (2) |
Wolfgang Betz |
132:51056160fa4a | 58 | #define NON_RESOLVABLE_PRIVATE_ADDR (3) |
Wolfgang Betz |
132:51056160fa4a | 59 | /** |
Wolfgang Betz |
132:51056160fa4a | 60 | * @} |
Wolfgang Betz |
132:51056160fa4a | 61 | */ |
Wolfgang Betz |
132:51056160fa4a | 62 | |
Wolfgang Betz |
132:51056160fa4a | 63 | /** |
Wolfgang Betz |
132:51056160fa4a | 64 | *@name Directed advertising types |
Wolfgang Betz |
132:51056160fa4a | 65 | * Type of advertising during directed advertising |
Wolfgang Betz |
132:51056160fa4a | 66 | *@{ |
Wolfgang Betz |
132:51056160fa4a | 67 | */ |
Wolfgang Betz |
132:51056160fa4a | 68 | #define HIGH_DUTY_CYCLE_DIRECTED_ADV (1) |
Wolfgang Betz |
132:51056160fa4a | 69 | #define LOW_DUTY_CYCLE_DIRECTED_ADV (4) |
Wolfgang Betz |
132:51056160fa4a | 70 | /** |
Wolfgang Betz |
132:51056160fa4a | 71 | * @} |
Wolfgang Betz |
132:51056160fa4a | 72 | */ |
Wolfgang Betz |
132:51056160fa4a | 73 | |
Wolfgang Betz |
132:51056160fa4a | 74 | /** |
Wolfgang Betz |
132:51056160fa4a | 75 | * @name Advertising type |
Wolfgang Betz |
132:51056160fa4a | 76 | * @{ |
Wolfgang Betz |
132:51056160fa4a | 77 | */ |
Wolfgang Betz |
132:51056160fa4a | 78 | |
Wolfgang Betz |
132:51056160fa4a | 79 | /** |
Wolfgang Betz |
132:51056160fa4a | 80 | * undirected scannable and connectable |
Wolfgang Betz |
132:51056160fa4a | 81 | */ |
Wolfgang Betz |
132:51056160fa4a | 82 | #define ADV_IND (0x00) |
Wolfgang Betz |
132:51056160fa4a | 83 | |
Wolfgang Betz |
132:51056160fa4a | 84 | /** |
Wolfgang Betz |
132:51056160fa4a | 85 | * directed non scannable |
Wolfgang Betz |
132:51056160fa4a | 86 | */ |
Wolfgang Betz |
132:51056160fa4a | 87 | #define ADV_DIRECT_IND (0x01) |
Wolfgang Betz |
132:51056160fa4a | 88 | |
Wolfgang Betz |
132:51056160fa4a | 89 | /** |
Wolfgang Betz |
132:51056160fa4a | 90 | * scannable non connectable |
Wolfgang Betz |
132:51056160fa4a | 91 | */ |
Wolfgang Betz |
132:51056160fa4a | 92 | #define ADV_SCAN_IND (0x02) |
Wolfgang Betz |
132:51056160fa4a | 93 | |
Wolfgang Betz |
132:51056160fa4a | 94 | /** |
Wolfgang Betz |
132:51056160fa4a | 95 | * non-connectable and no scan response (used for passive scan) |
Wolfgang Betz |
132:51056160fa4a | 96 | */ |
Wolfgang Betz |
132:51056160fa4a | 97 | #define ADV_NONCONN_IND (0x03) |
Wolfgang Betz |
132:51056160fa4a | 98 | |
Wolfgang Betz |
132:51056160fa4a | 99 | /** |
Wolfgang Betz |
132:51056160fa4a | 100 | * scan response |
Wolfgang Betz |
132:51056160fa4a | 101 | */ |
Wolfgang Betz |
132:51056160fa4a | 102 | #define SCAN_RSP (0x04) |
Wolfgang Betz |
132:51056160fa4a | 103 | |
Wolfgang Betz |
132:51056160fa4a | 104 | /** |
Wolfgang Betz |
132:51056160fa4a | 105 | * @} |
Wolfgang Betz |
132:51056160fa4a | 106 | */ |
Wolfgang Betz |
132:51056160fa4a | 107 | |
Wolfgang Betz |
132:51056160fa4a | 108 | /* 0X05-0XFF RESERVED */ |
Wolfgang Betz |
132:51056160fa4a | 109 | |
Wolfgang Betz |
132:51056160fa4a | 110 | /** |
Wolfgang Betz |
132:51056160fa4a | 111 | * @name Advertising ranges |
Wolfgang Betz |
132:51056160fa4a | 112 | * @{ |
Wolfgang Betz |
132:51056160fa4a | 113 | */ |
Wolfgang Betz |
132:51056160fa4a | 114 | |
Wolfgang Betz |
132:51056160fa4a | 115 | /** |
Wolfgang Betz |
132:51056160fa4a | 116 | * lowest allowed interval value for connectable types(20ms)..multiple of 625us |
Wolfgang Betz |
132:51056160fa4a | 117 | */ |
Wolfgang Betz |
132:51056160fa4a | 118 | #define ADV_INTERVAL_LOWEST_CONN (0X0020) |
Wolfgang Betz |
132:51056160fa4a | 119 | |
Wolfgang Betz |
132:51056160fa4a | 120 | /** |
Wolfgang Betz |
132:51056160fa4a | 121 | * highest allowed interval value (10.24s)..multiple of 625us. |
Wolfgang Betz |
132:51056160fa4a | 122 | */ |
Wolfgang Betz |
132:51056160fa4a | 123 | #define ADV_INTERVAL_HIGHEST (0X4000) |
Wolfgang Betz |
132:51056160fa4a | 124 | |
Wolfgang Betz |
132:51056160fa4a | 125 | /** |
Wolfgang Betz |
132:51056160fa4a | 126 | * lowest allowed interval value for non connectable types |
Wolfgang Betz |
132:51056160fa4a | 127 | * (100ms)..multiple of 625us. |
Wolfgang Betz |
132:51056160fa4a | 128 | */ |
Wolfgang Betz |
132:51056160fa4a | 129 | #define ADV_INTERVAL_LOWEST_NONCONN (0X00a0) |
Wolfgang Betz |
132:51056160fa4a | 130 | |
Wolfgang Betz |
132:51056160fa4a | 131 | /** |
Wolfgang Betz |
132:51056160fa4a | 132 | * @} |
Wolfgang Betz |
132:51056160fa4a | 133 | */ |
Wolfgang Betz |
132:51056160fa4a | 134 | |
Wolfgang Betz |
132:51056160fa4a | 135 | /** |
Wolfgang Betz |
132:51056160fa4a | 136 | * @name Advertising channels |
Wolfgang Betz |
132:51056160fa4a | 137 | * @{ |
Wolfgang Betz |
132:51056160fa4a | 138 | */ |
Wolfgang Betz |
132:51056160fa4a | 139 | #define ADV_CH_37 0x01 |
Wolfgang Betz |
132:51056160fa4a | 140 | #define ADV_CH_38 0x02 |
Wolfgang Betz |
132:51056160fa4a | 141 | #define ADV_CH_39 0x04 |
Wolfgang Betz |
132:51056160fa4a | 142 | /** |
Wolfgang Betz |
132:51056160fa4a | 143 | * @} |
Wolfgang Betz |
132:51056160fa4a | 144 | */ |
Wolfgang Betz |
132:51056160fa4a | 145 | |
Wolfgang Betz |
132:51056160fa4a | 146 | /** |
Wolfgang Betz |
132:51056160fa4a | 147 | * @name Scan_types Scan types |
Wolfgang Betz |
132:51056160fa4a | 148 | * @{ |
Wolfgang Betz |
132:51056160fa4a | 149 | */ |
Wolfgang Betz |
132:51056160fa4a | 150 | #define PASSIVE_SCAN 0 |
Wolfgang Betz |
132:51056160fa4a | 151 | #define ACTIVE_SCAN 1 |
Wolfgang Betz |
132:51056160fa4a | 152 | /** |
Wolfgang Betz |
132:51056160fa4a | 153 | * @} |
Wolfgang Betz |
132:51056160fa4a | 154 | */ |
Wolfgang Betz |
132:51056160fa4a | 155 | |
Wolfgang Betz |
132:51056160fa4a | 156 | /** |
Wolfgang Betz |
132:51056160fa4a | 157 | * @} |
Wolfgang Betz |
132:51056160fa4a | 158 | */ |
Wolfgang Betz |
132:51056160fa4a | 159 | |
Wolfgang Betz |
132:51056160fa4a | 160 | |
Wolfgang Betz |
132:51056160fa4a | 161 | #endif /* _LINK_LAYER_H */ |