BLE fota Robot Demo

Dependencies:   mbed-rtos mbed mbed_fota_fan_control

Fork of mbed_fota_lamp_control by KIM HyoengJun

Committer:
dudnwjs
Date:
Mon Jul 13 06:32:05 2015 +0000
Revision:
5:e11b23f9aacc
Parent:
4:60be78a172c2
Child:
9:fcf91f563147
Fota Service Add complete

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dudnwjs 3:1e70387e1337 1 #ifndef GAPM_TASK_H
dudnwjs 3:1e70387e1337 2 #define GAPM_TASK_H
dudnwjs 3:1e70387e1337 3
dudnwjs 4:60be78a172c2 4 #include "dialog_fota_config.h"
dudnwjs 5:e11b23f9aacc 5 #include "gap.h"
dudnwjs 4:60be78a172c2 6
dudnwjs 3:1e70387e1337 7 namespace sevencore_fota{
dudnwjs 3:1e70387e1337 8
dudnwjs 4:60be78a172c2 9 /// Advertising or scanning report information event
dudnwjs 4:60be78a172c2 10 struct gapm_adv_report_ind
dudnwjs 4:60be78a172c2 11 {
dudnwjs 4:60be78a172c2 12 /// Advertising report structure
dudnwjs 4:60be78a172c2 13 struct adv_report report;
dudnwjs 4:60be78a172c2 14 };
dudnwjs 4:60be78a172c2 15
dudnwjs 3:1e70387e1337 16 /// Reset link layer and the host command
dudnwjs 3:1e70387e1337 17 struct gapm_reset_cmd
dudnwjs 3:1e70387e1337 18 {
dudnwjs 3:1e70387e1337 19 /// GAPM requested operation:
dudnwjs 3:1e70387e1337 20 /// - GAPM_RESET: Reset BLE subsystem: LL and HL.
dudnwjs 3:1e70387e1337 21 uint8_t operation;
dudnwjs 3:1e70387e1337 22 };
dudnwjs 4:60be78a172c2 23 /// Command complete event data structure
dudnwjs 4:60be78a172c2 24 struct gapm_cmp_evt
dudnwjs 4:60be78a172c2 25 {
dudnwjs 4:60be78a172c2 26 /// GAP requested operation
dudnwjs 4:60be78a172c2 27 uint8_t operation;
dudnwjs 4:60be78a172c2 28 /// Status of the request
dudnwjs 4:60be78a172c2 29 uint8_t status;
dudnwjs 4:60be78a172c2 30 };
dudnwjs 4:60be78a172c2 31
dudnwjs 4:60be78a172c2 32 /// Air operation default parameters
dudnwjs 4:60be78a172c2 33 struct gapm_air_operation
dudnwjs 4:60be78a172c2 34 {
dudnwjs 4:60be78a172c2 35 /// Operation code.
dudnwjs 4:60be78a172c2 36 uint8_t code;
dudnwjs 4:60be78a172c2 37
dudnwjs 4:60be78a172c2 38
dudnwjs 4:60be78a172c2 39 /** Own BD address source of the device:
dudnwjs 4:60be78a172c2 40 * - GAPM_PUBLIC_ADDR: Public Address
dudnwjs 4:60be78a172c2 41 * - GAPM_PROVIDED_RND_ADDR: Provided random address
dudnwjs 4:60be78a172c2 42 * - GAPM_GEN_STATIC_RND_ADDR: Generated static random address
dudnwjs 4:60be78a172c2 43 * - GAPM_GEN_RSLV_ADDR: Generated resolvable private random address
dudnwjs 4:60be78a172c2 44 * - GAPM_GEN_NON_RSLV_ADDR: Generated non-resolvable private random address
dudnwjs 4:60be78a172c2 45 * - GAPM_PROVIDED_RECON_ADDR: Provided Reconnection address (only for GAPM_ADV_DIRECT)
dudnwjs 4:60be78a172c2 46 */
dudnwjs 4:60be78a172c2 47 uint8_t addr_src;
dudnwjs 4:60be78a172c2 48
dudnwjs 4:60be78a172c2 49 /// Dummy data use to retrieve internal operation state (should be set to 0).
dudnwjs 4:60be78a172c2 50 uint16_t state;
dudnwjs 4:60be78a172c2 51
dudnwjs 4:60be78a172c2 52 /// Duration of resolvable address before regenerate it.
dudnwjs 4:60be78a172c2 53 uint16_t renew_dur;
dudnwjs 4:60be78a172c2 54
dudnwjs 4:60be78a172c2 55 /// Provided own static private random address (addr_src = 1 or 5)
dudnwjs 4:60be78a172c2 56 struct bd_addr addr;
dudnwjs 4:60be78a172c2 57 };
dudnwjs 4:60be78a172c2 58
dudnwjs 4:60be78a172c2 59 /// Advertising data that contains information set by host.
dudnwjs 4:60be78a172c2 60 struct gapm_adv_host
dudnwjs 4:60be78a172c2 61 {
dudnwjs 4:60be78a172c2 62 /// Advertising mode :
dudnwjs 4:60be78a172c2 63 /// - GAP_NON_DISCOVERABLE: Non discoverable mode
dudnwjs 4:60be78a172c2 64 /// - GAP_GEN_DISCOVERABLE: General discoverable mode
dudnwjs 4:60be78a172c2 65 /// - GAP_LIM_DISCOVERABLE: Limited discoverable mode
dudnwjs 4:60be78a172c2 66 /// - GAP_BROADCASTER_MODE: Broadcaster mode
dudnwjs 4:60be78a172c2 67 uint8_t mode;
dudnwjs 4:60be78a172c2 68
dudnwjs 4:60be78a172c2 69 /// Advertising filter policy:
dudnwjs 4:60be78a172c2 70 /// - ADV_ALLOW_SCAN_ANY_CON_ANY: Allow both scan and connection requests from anyone
dudnwjs 4:60be78a172c2 71 /// - ADV_ALLOW_SCAN_WLST_CON_ANY: Allow both scan req from White List devices only and
dudnwjs 4:60be78a172c2 72 /// connection req from anyone
dudnwjs 4:60be78a172c2 73 /// - ADV_ALLOW_SCAN_ANY_CON_WLST: Allow both scan req from anyone and connection req
dudnwjs 4:60be78a172c2 74 /// from White List devices only
dudnwjs 4:60be78a172c2 75 /// - ADV_ALLOW_SCAN_WLST_CON_WLST: Allow scan and connection requests from White List
dudnwjs 4:60be78a172c2 76 /// devices only
dudnwjs 4:60be78a172c2 77 uint8_t adv_filt_policy;
dudnwjs 4:60be78a172c2 78
dudnwjs 4:60be78a172c2 79 /// Advertising data length - maximum 28 bytes, 3 bytes are reserved to set
dudnwjs 4:60be78a172c2 80 /// Advertising AD type flags, shall not be set in advertising data
dudnwjs 4:60be78a172c2 81 uint8_t adv_data_len;
dudnwjs 4:60be78a172c2 82 /// Advertising data
dudnwjs 4:60be78a172c2 83 uint8_t adv_data[ADV_DATA_LEN-3];
dudnwjs 4:60be78a172c2 84 /// Scan response data length- maximum 31 bytes
dudnwjs 4:60be78a172c2 85 uint8_t scan_rsp_data_len;
dudnwjs 4:60be78a172c2 86 /// Scan response data
dudnwjs 4:60be78a172c2 87 uint8_t scan_rsp_data[SCAN_RSP_DATA_LEN];
dudnwjs 4:60be78a172c2 88 };
dudnwjs 4:60be78a172c2 89
dudnwjs 4:60be78a172c2 90
dudnwjs 4:60be78a172c2 91
dudnwjs 4:60be78a172c2 92
dudnwjs 4:60be78a172c2 93 /// Set advertising mode Command
dudnwjs 4:60be78a172c2 94 struct gapm_start_advertise_cmd
dudnwjs 4:60be78a172c2 95 {
dudnwjs 4:60be78a172c2 96 /// GAPM requested operation:
dudnwjs 4:60be78a172c2 97 /// - GAPM_ADV_NON_CONN: Start non connectable advertising
dudnwjs 4:60be78a172c2 98 /// - GAPM_ADV_UNDIRECT: Start undirected connectable advertising
dudnwjs 4:60be78a172c2 99 /// - GAPM_ADV_DIRECT: Start directed connectable advertising
dudnwjs 4:60be78a172c2 100 struct gapm_air_operation op;
dudnwjs 4:60be78a172c2 101
dudnwjs 4:60be78a172c2 102 /// Minimum interval for advertising
dudnwjs 4:60be78a172c2 103 uint16_t intv_min;
dudnwjs 4:60be78a172c2 104 /// Maximum interval for advertising
dudnwjs 4:60be78a172c2 105 uint16_t intv_max;
dudnwjs 4:60be78a172c2 106
dudnwjs 4:60be78a172c2 107 ///Advertising channel map
dudnwjs 4:60be78a172c2 108 uint8_t channel_map;
dudnwjs 4:60be78a172c2 109
dudnwjs 4:60be78a172c2 110 /// Advertising information
dudnwjs 4:60be78a172c2 111 union gapm_adv_info
dudnwjs 4:60be78a172c2 112 {
dudnwjs 4:60be78a172c2 113 /// Host information advertising data (GAPM_ADV_NON_CONN and GAPM_ADV_UNDIRECT)
dudnwjs 4:60be78a172c2 114 struct gapm_adv_host host;
dudnwjs 4:60be78a172c2 115 /// Direct address information (GAPM_ADV_DIRECT)
dudnwjs 4:60be78a172c2 116 /// (used only if reconnection address isn't set or privacy disabled)
dudnwjs 4:60be78a172c2 117 struct gap_bdaddr direct;
dudnwjs 4:60be78a172c2 118 } info;
dudnwjs 4:60be78a172c2 119 };
dudnwjs 4:60be78a172c2 120
dudnwjs 4:60be78a172c2 121
dudnwjs 4:60be78a172c2 122 /// Set device configuration command
dudnwjs 4:60be78a172c2 123 struct gapm_set_dev_config_cmd
dudnwjs 4:60be78a172c2 124 {
dudnwjs 4:60be78a172c2 125 /// GAPM requested operation:
dudnwjs 4:60be78a172c2 126 /// - GAPM_SET_DEV_CONFIG: Set device configuration
dudnwjs 4:60be78a172c2 127 uint8_t operation;
dudnwjs 4:60be78a172c2 128 /// Device Role: Central, Peripheral, Observer or Broadcaster
dudnwjs 4:60be78a172c2 129 uint8_t role;
dudnwjs 4:60be78a172c2 130 /// Device IRK used for resolvable random BD address generation (LSB first)
dudnwjs 4:60be78a172c2 131 struct gap_sec_key irk;
dudnwjs 4:60be78a172c2 132
dudnwjs 4:60be78a172c2 133 /// Device Appearance (0x0000 - Unknown appearance)
dudnwjs 4:60be78a172c2 134 uint16_t appearance;
dudnwjs 4:60be78a172c2 135 /// Device Appearance write permission requirements for peer device (@see gapm_write_att_perm)
dudnwjs 4:60be78a172c2 136 uint8_t appearance_write_perm;
dudnwjs 4:60be78a172c2 137 /// Device Name write permission requirements for peer device (@see gapm_write_att_perm)
dudnwjs 4:60be78a172c2 138 uint8_t name_write_perm;
dudnwjs 4:60be78a172c2 139
dudnwjs 4:60be78a172c2 140 /// Maximal MTU
dudnwjs 4:60be78a172c2 141 uint16_t max_mtu;
dudnwjs 4:60be78a172c2 142
dudnwjs 4:60be78a172c2 143 /// Peripheral only: *****************************************************************
dudnwjs 4:60be78a172c2 144 /// Slave preferred Minimum of connection interval
dudnwjs 4:60be78a172c2 145 uint16_t con_intv_min;
dudnwjs 4:60be78a172c2 146 /// Slave preferred Maximum of connection interval
dudnwjs 4:60be78a172c2 147 uint16_t con_intv_max;
dudnwjs 4:60be78a172c2 148 /// Slave preferred Connection latency
dudnwjs 4:60be78a172c2 149 uint16_t con_latency;
dudnwjs 4:60be78a172c2 150 /// Slave preferred Link supervision timeout
dudnwjs 4:60be78a172c2 151 uint16_t superv_to;
dudnwjs 4:60be78a172c2 152
dudnwjs 4:60be78a172c2 153 /// Privacy settings bit field (0b1 = enabled, 0b0 = disabled)
dudnwjs 4:60be78a172c2 154 /// - [bit 0]: Privacy Support
dudnwjs 4:60be78a172c2 155 /// - [bit 1]: Multiple Bond Support (Peripheral only); If enabled, privacy flag is
dudnwjs 4:60be78a172c2 156 /// read only.
dudnwjs 4:60be78a172c2 157 /// - [bit 2]: Reconnection address visible.
dudnwjs 4:60be78a172c2 158 uint8_t flags;
dudnwjs 4:60be78a172c2 159 };
dudnwjs 4:60be78a172c2 160
dudnwjs 3:1e70387e1337 161
dudnwjs 3:1e70387e1337 162
dudnwjs 3:1e70387e1337 163 /// GAP Manager Message Interface
dudnwjs 3:1e70387e1337 164 enum gapm_msg_id
dudnwjs 3:1e70387e1337 165 {
dudnwjs 3:1e70387e1337 166 /* Default event */
dudnwjs 3:1e70387e1337 167 /// Command Complete event
dudnwjs 3:1e70387e1337 168 GAPM_CMP_EVT = 13312,
dudnwjs 3:1e70387e1337 169 /// Event triggered to inform that lower layers are ready
dudnwjs 3:1e70387e1337 170 GAPM_DEVICE_READY_IND,
dudnwjs 3:1e70387e1337 171
dudnwjs 3:1e70387e1337 172 /* Default commands */
dudnwjs 3:1e70387e1337 173 /// Reset link layer and the host command
dudnwjs 3:1e70387e1337 174 GAPM_RESET_CMD,
dudnwjs 3:1e70387e1337 175 /// Cancel ongoing operation
dudnwjs 3:1e70387e1337 176 GAPM_CANCEL_CMD,
dudnwjs 3:1e70387e1337 177
dudnwjs 3:1e70387e1337 178 /* Device Configuration */
dudnwjs 3:1e70387e1337 179 /// Set device configuration command
dudnwjs 3:1e70387e1337 180 GAPM_SET_DEV_CONFIG_CMD,
dudnwjs 3:1e70387e1337 181 /// Set device name command
dudnwjs 3:1e70387e1337 182 GAPM_SET_DEV_NAME_CMD,
dudnwjs 3:1e70387e1337 183 /// Set device channel map
dudnwjs 3:1e70387e1337 184 GAPM_SET_CHANNEL_MAP_CMD,
dudnwjs 3:1e70387e1337 185
dudnwjs 3:1e70387e1337 186 /* Local device information */
dudnwjs 3:1e70387e1337 187 /// Get local device info command
dudnwjs 3:1e70387e1337 188 GAPM_GET_DEV_INFO_CMD,
dudnwjs 3:1e70387e1337 189 /// Local device name indication event
dudnwjs 3:1e70387e1337 190 GAPM_DEV_NAME_IND,
dudnwjs 3:1e70387e1337 191 /// Local device appearance indication event
dudnwjs 3:1e70387e1337 192 GAPM_APPEARANCE_IND,
dudnwjs 3:1e70387e1337 193 /// Local device version indication event
dudnwjs 3:1e70387e1337 194 GAPM_DEV_VERSION_IND,
dudnwjs 3:1e70387e1337 195 /// Local device BD Address indication event
dudnwjs 3:1e70387e1337 196 GAPM_DEV_BDADDR_IND,
dudnwjs 3:1e70387e1337 197
dudnwjs 3:1e70387e1337 198 /* White List */
dudnwjs 3:1e70387e1337 199 /// White List Management Command
dudnwjs 3:1e70387e1337 200 GAPM_WHITE_LIST_MGT_CMD,
dudnwjs 3:1e70387e1337 201 /// White List Size indication event
dudnwjs 3:1e70387e1337 202 GAPM_WHITE_LIST_SIZE_IND,
dudnwjs 3:1e70387e1337 203
dudnwjs 3:1e70387e1337 204 /* Air Operations */
dudnwjs 3:1e70387e1337 205 /// Set advertising mode Command
dudnwjs 3:1e70387e1337 206 GAPM_START_ADVERTISE_CMD,
dudnwjs 3:1e70387e1337 207
dudnwjs 3:1e70387e1337 208 /// Set Scan mode Command
dudnwjs 3:1e70387e1337 209 GAPM_START_SCAN_CMD,
dudnwjs 3:1e70387e1337 210 /// Advertising or scanning report information event
dudnwjs 3:1e70387e1337 211 GAPM_ADV_REPORT_IND,
dudnwjs 3:1e70387e1337 212
dudnwjs 3:1e70387e1337 213 /// Set connection initialization Command
dudnwjs 3:1e70387e1337 214 GAPM_START_CONNECTION_CMD,
dudnwjs 3:1e70387e1337 215 /// Name of peer device indication
dudnwjs 3:1e70387e1337 216 GAPM_PEER_NAME_IND,
dudnwjs 3:1e70387e1337 217 /// Confirm connection to a specific device (Connection Operation in Selective mode)
dudnwjs 3:1e70387e1337 218 GAPM_CONNECTION_CFM,
dudnwjs 3:1e70387e1337 219
dudnwjs 3:1e70387e1337 220 /* Privacy update events */
dudnwjs 3:1e70387e1337 221 /// Privacy flag value has been updated
dudnwjs 3:1e70387e1337 222 GAPM_UPDATED_PRIVACY_IND,
dudnwjs 3:1e70387e1337 223 /// Reconnection address has been updated
dudnwjs 3:1e70387e1337 224 GAPM_UPDATED_RECON_ADDR_IND,
dudnwjs 3:1e70387e1337 225
dudnwjs 3:1e70387e1337 226 /* Security / Encryption Toolbox */
dudnwjs 3:1e70387e1337 227 /// Resolve address command
dudnwjs 3:1e70387e1337 228 GAPM_RESOLV_ADDR_CMD,
dudnwjs 3:1e70387e1337 229 /// Indicate that resolvable random address has been solved
dudnwjs 3:1e70387e1337 230 GAPM_ADDR_SOLVED_IND,
dudnwjs 3:1e70387e1337 231 /// Generate a random address.
dudnwjs 3:1e70387e1337 232 GAPM_GEN_RAND_ADDR_CMD,
dudnwjs 3:1e70387e1337 233 /// Use the AES-128 block in the controller
dudnwjs 3:1e70387e1337 234 GAPM_USE_ENC_BLOCK_CMD,
dudnwjs 3:1e70387e1337 235 /// AES-128 block result indication
dudnwjs 3:1e70387e1337 236 GAPM_USE_ENC_BLOCK_IND,
dudnwjs 3:1e70387e1337 237 /// Generate a 8-byte random number
dudnwjs 3:1e70387e1337 238 GAPM_GEN_RAND_NB_CMD,
dudnwjs 3:1e70387e1337 239 /// Random Number Indication
dudnwjs 3:1e70387e1337 240 GAPM_GEN_RAND_NB_IND,
dudnwjs 3:1e70387e1337 241
dudnwjs 3:1e70387e1337 242 /* Debug */
dudnwjs 3:1e70387e1337 243 /// Indication containing information about memory usage.
dudnwjs 3:1e70387e1337 244 GAPM_DBG_MEM_INFO_IND,
dudnwjs 3:1e70387e1337 245
dudnwjs 3:1e70387e1337 246 /* Local device information -cont */
dudnwjs 3:1e70387e1337 247 /// Advertising channel Tx power level
dudnwjs 3:1e70387e1337 248 GAPM_DEV_ADV_TX_POWER_IND,
dudnwjs 3:1e70387e1337 249
dudnwjs 3:1e70387e1337 250 /* Internal messages for timer events, not part of API*/
dudnwjs 3:1e70387e1337 251 /// Limited discoverable timeout indication
dudnwjs 3:1e70387e1337 252 GAPM_LIM_DISC_TO_IND,
dudnwjs 3:1e70387e1337 253 /// Scan timeout indication
dudnwjs 3:1e70387e1337 254 GAPM_SCAN_TO_IND,
dudnwjs 3:1e70387e1337 255 /// Address renewal timeout indication
dudnwjs 3:1e70387e1337 256 GAPM_ADDR_RENEW_TO_IND,
dudnwjs 3:1e70387e1337 257 };
dudnwjs 3:1e70387e1337 258
dudnwjs 3:1e70387e1337 259 /// GAP Manager operation type - application interface
dudnwjs 3:1e70387e1337 260 enum gapm_operation
dudnwjs 3:1e70387e1337 261 {
dudnwjs 3:1e70387e1337 262 /* No Operation (if nothing has been requested) */
dudnwjs 3:1e70387e1337 263 /* ************************************************ */
dudnwjs 3:1e70387e1337 264 /// No operation.
dudnwjs 3:1e70387e1337 265 GAPM_NO_OP = 0x00,
dudnwjs 3:1e70387e1337 266
dudnwjs 3:1e70387e1337 267 /* Default operations */
dudnwjs 3:1e70387e1337 268 /* ************************************************ */
dudnwjs 3:1e70387e1337 269 /// Reset BLE subsystem: LL and HL.
dudnwjs 3:1e70387e1337 270 GAPM_RESET,
dudnwjs 3:1e70387e1337 271 /// Cancel currently executed operation.
dudnwjs 3:1e70387e1337 272 GAPM_CANCEL,
dudnwjs 3:1e70387e1337 273
dudnwjs 3:1e70387e1337 274 /* Configuration operations */
dudnwjs 3:1e70387e1337 275 /* ************************************************ */
dudnwjs 3:1e70387e1337 276 /// Set device configuration
dudnwjs 3:1e70387e1337 277 GAPM_SET_DEV_CONFIG,
dudnwjs 3:1e70387e1337 278 /// Set device name
dudnwjs 3:1e70387e1337 279 GAPM_SET_DEV_NAME,
dudnwjs 3:1e70387e1337 280 /// Set device channel map
dudnwjs 3:1e70387e1337 281 GAPM_SET_CHANNEL_MAP,
dudnwjs 3:1e70387e1337 282
dudnwjs 3:1e70387e1337 283 /* Retrieve device information */
dudnwjs 3:1e70387e1337 284 /* ************************************************ */
dudnwjs 3:1e70387e1337 285 /// Get Local device name
dudnwjs 3:1e70387e1337 286 GAPM_GET_DEV_NAME,
dudnwjs 3:1e70387e1337 287 /// Get Local device version
dudnwjs 3:1e70387e1337 288 GAPM_GET_DEV_VERSION,
dudnwjs 3:1e70387e1337 289 /// Get Local device BD Address
dudnwjs 3:1e70387e1337 290 GAPM_GET_DEV_BDADDR,
dudnwjs 3:1e70387e1337 291
dudnwjs 3:1e70387e1337 292 /* Operation on White list */
dudnwjs 3:1e70387e1337 293 /* ************************************************ */
dudnwjs 3:1e70387e1337 294 /// Get White List Size.
dudnwjs 3:1e70387e1337 295 GAPM_GET_WLIST_SIZE,
dudnwjs 3:1e70387e1337 296 /// Add devices in white list.
dudnwjs 3:1e70387e1337 297 GAPM_ADD_DEV_IN_WLIST,
dudnwjs 3:1e70387e1337 298 /// Remove devices form white list.
dudnwjs 3:1e70387e1337 299 GAPM_RMV_DEV_FRM_WLIST,
dudnwjs 3:1e70387e1337 300 /// Clear all devices from white list.
dudnwjs 3:1e70387e1337 301 GAPM_CLEAR_WLIST,
dudnwjs 3:1e70387e1337 302
dudnwjs 3:1e70387e1337 303 /* Advertise mode operations */
dudnwjs 3:1e70387e1337 304 /* ************************************************ */
dudnwjs 3:1e70387e1337 305 /// Start non connectable advertising
dudnwjs 3:1e70387e1337 306 GAPM_ADV_NON_CONN,
dudnwjs 3:1e70387e1337 307 /// Start undirected connectable advertising
dudnwjs 3:1e70387e1337 308 GAPM_ADV_UNDIRECT,
dudnwjs 3:1e70387e1337 309 /// Start directed connectable advertising
dudnwjs 3:1e70387e1337 310 GAPM_ADV_DIRECT,
dudnwjs 3:1e70387e1337 311
dudnwjs 3:1e70387e1337 312 /* Scan mode operations */
dudnwjs 3:1e70387e1337 313 /* ************************************************ */
dudnwjs 3:1e70387e1337 314 /// Start active scan operation
dudnwjs 3:1e70387e1337 315 GAPM_SCAN_ACTIVE,
dudnwjs 3:1e70387e1337 316 /// Start passive scan operation
dudnwjs 3:1e70387e1337 317 GAPM_SCAN_PASSIVE,
dudnwjs 3:1e70387e1337 318
dudnwjs 3:1e70387e1337 319 /* Connection mode operations */
dudnwjs 3:1e70387e1337 320 /* ************************************************ */
dudnwjs 3:1e70387e1337 321 /// Direct connection operation
dudnwjs 3:1e70387e1337 322 GAPM_CONNECTION_DIRECT,
dudnwjs 3:1e70387e1337 323 /// Automatic connection operation
dudnwjs 3:1e70387e1337 324 GAPM_CONNECTION_AUTO,
dudnwjs 3:1e70387e1337 325 /// Selective connection operation
dudnwjs 3:1e70387e1337 326 GAPM_CONNECTION_SELECTIVE,
dudnwjs 3:1e70387e1337 327 /// Name Request operation (requires to start a direct connection)
dudnwjs 3:1e70387e1337 328 GAPM_CONNECTION_NAME_REQUEST,
dudnwjs 3:1e70387e1337 329
dudnwjs 3:1e70387e1337 330 /* Security / Encryption Toolbox */
dudnwjs 3:1e70387e1337 331 /* ************************************************ */
dudnwjs 3:1e70387e1337 332 /// Resolve device address
dudnwjs 3:1e70387e1337 333 GAPM_RESOLV_ADDR,
dudnwjs 3:1e70387e1337 334 /// Generate a random address
dudnwjs 3:1e70387e1337 335 GAPM_GEN_RAND_ADDR,
dudnwjs 3:1e70387e1337 336 /// Use the controller's AES-128 block
dudnwjs 3:1e70387e1337 337 GAPM_USE_ENC_BLOCK,
dudnwjs 3:1e70387e1337 338 /// Generate a 8-byte random number
dudnwjs 3:1e70387e1337 339 GAPM_GEN_RAND_NB,
dudnwjs 3:1e70387e1337 340
dudnwjs 3:1e70387e1337 341 /* DEBUG */
dudnwjs 3:1e70387e1337 342 /* ************************************************ */
dudnwjs 3:1e70387e1337 343 /// Get memory usage
dudnwjs 3:1e70387e1337 344 GAPM_DBG_GET_MEM_INFO,
dudnwjs 3:1e70387e1337 345 /// Perform a platform reset
dudnwjs 3:1e70387e1337 346 GAPM_PLF_RESET,
dudnwjs 3:1e70387e1337 347
dudnwjs 3:1e70387e1337 348 /* Retrieve device information - cont */
dudnwjs 3:1e70387e1337 349 /* ************************************************ */
dudnwjs 3:1e70387e1337 350 /// Get device advertising power level
dudnwjs 3:1e70387e1337 351 GAPM_GET_DEV_ADV_TX_POWER,
dudnwjs 3:1e70387e1337 352
dudnwjs 3:1e70387e1337 353 /// Last GAPM operation flag
dudnwjs 3:1e70387e1337 354 GAPM_LAST
dudnwjs 3:1e70387e1337 355 };
dudnwjs 3:1e70387e1337 356
dudnwjs 4:60be78a172c2 357 /// Own BD address source of the device
dudnwjs 4:60be78a172c2 358 enum gapm_own_addr_src
dudnwjs 4:60be78a172c2 359 {
dudnwjs 4:60be78a172c2 360 /// Public Address
dudnwjs 4:60be78a172c2 361 GAPM_PUBLIC_ADDR,
dudnwjs 4:60be78a172c2 362 /// Provided random address
dudnwjs 4:60be78a172c2 363 GAPM_PROVIDED_RND_ADDR,
dudnwjs 4:60be78a172c2 364 /// Provided static random address
dudnwjs 4:60be78a172c2 365 GAPM_GEN_STATIC_RND_ADDR,
dudnwjs 4:60be78a172c2 366 /// Generated resolvable private random address
dudnwjs 4:60be78a172c2 367 GAPM_GEN_RSLV_ADDR,
dudnwjs 4:60be78a172c2 368 /// Generated non-resolvable private random address
dudnwjs 4:60be78a172c2 369 GAPM_GEN_NON_RSLV_ADDR,
dudnwjs 4:60be78a172c2 370 /// Provided Reconnection address
dudnwjs 4:60be78a172c2 371 GAPM_PROVIDED_RECON_ADDR,
dudnwjs 4:60be78a172c2 372 };
dudnwjs 4:60be78a172c2 373
dudnwjs 4:60be78a172c2 374 /// Device Attribute write permission requirement
dudnwjs 4:60be78a172c2 375 enum gapm_write_att_perm
dudnwjs 4:60be78a172c2 376 {
dudnwjs 4:60be78a172c2 377 /// Disable write access
dudnwjs 4:60be78a172c2 378 GAPM_WRITE_DISABLE = 0,
dudnwjs 4:60be78a172c2 379 /// Enable write access
dudnwjs 4:60be78a172c2 380 GAPM_WRITE_ENABLE = 8,
dudnwjs 4:60be78a172c2 381 /// Write access requires unauthenticated link
dudnwjs 4:60be78a172c2 382 GAPM_WRITE_UNAUTH = 16,
dudnwjs 4:60be78a172c2 383 /// Write access requires authenticated link
dudnwjs 4:60be78a172c2 384 GAPM_WRITE_AUTH = 24,
dudnwjs 4:60be78a172c2 385 };
dudnwjs 4:60be78a172c2 386
dudnwjs 3:1e70387e1337 387 }//namespace
dudnwjs 3:1e70387e1337 388
dudnwjs 3:1e70387e1337 389 #endif//GAPM_TASK_H