BLE shield
Fork of X_NUCLEO_IDB0XA1 by
Embed:
(wiki syntax)
Show/hide line numbers
link_layer.h
00001 /******************** (C) COPYRIGHT 2012 STMicroelectronics ******************** 00002 * File Name : link_layer.h 00003 * Author : AMS - HEA&RF BU 00004 * Version : V1.0.0 00005 * Date : 19-July-2012 00006 * Description : Header file for BlueNRG's link layer. It contains 00007 * definition of functions for link layer, most of which are 00008 * mapped to HCI commands. 00009 ******************************************************************************** 00010 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS 00011 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. 00012 * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, 00013 * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE 00014 * CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING 00015 * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. 00016 *******************************************************************************/ 00017 00018 #ifndef _LINK_LAYER_H 00019 #define _LINK_LAYER_H 00020 00021 #include <ble_status.h> 00022 00023 /** 00024 *@addtogroup GAP GAP 00025 *@brief API for GAP layer. 00026 *@{ 00027 */ 00028 00029 /** 00030 *@name Advertising filter 00031 *Advertising policy for filtering (white list related) 00032 *@{ 00033 */ 00034 #define NO_WHITE_LIST_USE (0x00) /**< Process scan and connection requests from all devices (i.e., the White List is not in use) */ 00035 #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 */ 00036 #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 */ 00037 #define WHITE_LIST_FOR_ALL (0x03) /**< Process scan and connection requests only from devices in the White List. */ 00038 /** 00039 * @} 00040 */ 00041 00042 00043 /** 00044 * Bluetooth 48 bit address (in little-endian order). 00045 */ 00046 typedef uint8_t tBDAddr[6]; 00047 00048 00049 /** 00050 *@name Bluetooth address types 00051 * Bluetooth address types 00052 *@{ 00053 */ 00054 #define PUBLIC_ADDR (0) 00055 #define RANDOM_ADDR (1) 00056 #define STATIC_RANDOM_ADDR (1) 00057 #define RESOLVABLE_PRIVATE_ADDR (2) 00058 #define NON_RESOLVABLE_PRIVATE_ADDR (3) 00059 /** 00060 * @} 00061 */ 00062 00063 /** 00064 *@name Directed advertising types 00065 * Type of advertising during directed advertising 00066 *@{ 00067 */ 00068 #define HIGH_DUTY_CYCLE_DIRECTED_ADV (1) 00069 #define LOW_DUTY_CYCLE_DIRECTED_ADV (4) 00070 /** 00071 * @} 00072 */ 00073 00074 /** 00075 * @name Advertising type 00076 * @{ 00077 */ 00078 00079 /** 00080 * undirected scannable and connectable 00081 */ 00082 #define ADV_IND (0x00) 00083 00084 /** 00085 * directed non scannable 00086 */ 00087 #define ADV_DIRECT_IND (0x01) 00088 00089 /** 00090 * scannable non connectable 00091 */ 00092 #define ADV_SCAN_IND (0x02) 00093 00094 /** 00095 * non-connectable and no scan response (used for passive scan) 00096 */ 00097 #define ADV_NONCONN_IND (0x03) 00098 00099 /** 00100 * scan response 00101 */ 00102 #define SCAN_RSP (0x04) 00103 00104 /** 00105 * @} 00106 */ 00107 00108 /* 0X05-0XFF RESERVED */ 00109 00110 /** 00111 * @name Advertising ranges 00112 * @{ 00113 */ 00114 00115 /** 00116 * lowest allowed interval value for connectable types(20ms)..multiple of 625us 00117 */ 00118 #define ADV_INTERVAL_LOWEST_CONN (0X0020) 00119 00120 /** 00121 * highest allowed interval value (10.24s)..multiple of 625us. 00122 */ 00123 #define ADV_INTERVAL_HIGHEST (0X4000) 00124 00125 /** 00126 * lowest allowed interval value for non connectable types 00127 * (100ms)..multiple of 625us. 00128 */ 00129 #define ADV_INTERVAL_LOWEST_NONCONN (0X00a0) 00130 00131 /** 00132 * @} 00133 */ 00134 00135 /** 00136 * @name Advertising channels 00137 * @{ 00138 */ 00139 #define ADV_CH_37 0x01 00140 #define ADV_CH_38 0x02 00141 #define ADV_CH_39 0x04 00142 /** 00143 * @} 00144 */ 00145 00146 /** 00147 * @name Scan_types Scan types 00148 * @{ 00149 */ 00150 #define PASSIVE_SCAN 0 00151 #define ACTIVE_SCAN 1 00152 /** 00153 * @} 00154 */ 00155 00156 /** 00157 * @} 00158 */ 00159 00160 00161 #endif /* _LINK_LAYER_H */
Generated on Tue Jul 12 2022 19:27:29 by 1.7.2