38 #define GAPROLE_PROFILEROLE 0x300 39 #define GAPROLE_IRK 0x301 40 #define GAPROLE_SRK 0x302 41 #define GAPROLE_SIGNCOUNTER 0x303 42 #define GAPROLE_BD_ADDR 0x304 43 #define GAPROLE_ADVERT_ENABLED 0x305 44 #define GAPROLE_ADVERT_OFF_TIME 0x306 45 #define GAPROLE_ADVERT_DATA 0x307 46 #define GAPROLE_SCAN_RSP_DATA 0x308 47 #define GAPROLE_ADV_EVENT_TYPE 0x309 48 #define GAPROLE_ADV_DIRECT_TYPE 0x30A 49 #define GAPROLE_ADV_DIRECT_ADDR 0x30B 50 #define GAPROLE_ADV_CHANNEL_MAP 0x30C 51 #define GAPROLE_ADV_FILTER_POLICY 0x30D 52 #define GAPROLE_CONNHANDLE 0x30E 53 #define GAPROLE_RSSI_READ_RATE 0x30F 54 #define GAPROLE_PARAM_UPDATE_ENABLE 0x310 55 #define GAPROLE_MIN_CONN_INTERVAL 0x311 56 #define GAPROLE_MAX_CONN_INTERVAL 0x312 57 #define GAPROLE_SLAVE_LATENCY 0x313 58 #define GAPROLE_TIMEOUT_MULTIPLIER 0x314 59 #define GAPROLE_CONN_BD_ADDR 0x315 60 #define GAPROLE_CONN_INTERVAL 0x316 61 #define GAPROLE_CONN_LATENCY 0x317 62 #define GAPROLE_CONN_TIMEOUT 0x318 63 #define GAPROLE_PARAM_UPDATE_REQ 0x319 64 #define GAPROLE_STATE 0x31A 65 #define GAPROLE_ADV_NONCONN_ENABLED 0x31B 66 #define GAPROLE_BD_ADDR_TYPE 0x31C 67 #define GAPROLE_CONN_TERM_REASON 0x31D 84 GAPROLE_ADVERTISING_NONCONN,
86 GAPROLE_WAITING_AFTER_TIMEOUT,
88 GAPROLE_CONNECTED_ADV,
100 #define GAPROLE_NO_ACTION 0 // Take no action upon unsuccessful parameter updates 101 #define GAPROLE_RESEND_PARAM_UPDATE 1 // Continue to resend request until successful update 102 #define GAPROLE_TERMINATE_LINK 2 // Terminate link upon unsuccessful parameter updates 108 #define GAPROLE_LINK_PARAM_UPDATE_WAIT_REMOTE_PARAMS 0 // Wait for parameter update request, respond with remote's requested parameters. 109 #define GAPROLE_LINK_PARAM_UPDATE_INITIATE_BOTH_PARAMS 1 // Initiate parameter update request, respond with best combination of local and remote parameters. 110 #define GAPROLE_LINK_PARAM_UPDATE_INITIATE_APP_PARAMS 2 // Initiate parameter update request, respond with local requested parameters only. 111 #define GAPROLE_LINK_PARAM_UPDATE_WAIT_APP_PARAMS 3 // Wait for parameter update request, respond with local requested parameters only. 112 #define GAPROLE_LINK_PARAM_UPDATE_WAIT_BOTH_PARAMS 4 // Wait for parameter update request, respond with best combination of local and remote parameters. 113 #define GAPROLE_LINK_PARAM_UPDATE_REJECT_REQUEST 5 // Reject all parameter update requests. 114 #define GAPROLE_LINK_PARAM_UPDATE_NUM_OPTIONS 6 // Used for parameter checking. 126 typedef void (*gapRolesParamUpdateCB_t)(uint16_t connInterval,
127 uint16_t connSlaveLatency,
128 uint16_t connTimeout);
134 typedef void (*gapRolesStateNotify_t)(gaprole_States_t newState);
227 uint16_t maxConnInterval,
228 uint16_t latency, uint16_t connTimeout,
229 uint8_t handleFailure);
256 extern void GAPRole_createTask(
void);
bStatus_t GAPRole_SendUpdateParam(uint16_t minConnInterval, uint16_t maxConnInterval, uint16_t latency, uint16_t connTimeout, uint8_t handleFailure)
Update the parameters of an existing connection.
Definition: peripheral.h:140
bStatus_t GAPRole_GetParameter(uint16_t param, void *pValue)
Get a GAP Role parameter.
void GAPRole_RegisterAppCBs(gapRolesParamUpdateCB_t *pParamUpdateCB)
Register application's callbacks.
Status_t bStatus_t
BLE Generic Status return: BLE Default BLE Status Values.
Definition: bcomdef.h:244
bStatus_t GAPRole_SetParameter(uint16_t param, uint8_t len, void *pValue)
Set a GAP Role parameter.
gapRolesStateNotify_t pfnStateChange
Whenever the device changes state.
Definition: peripheral.h:142
bStatus_t GAPRole_StartDevice(gapRolesCBs_t *pAppCallbacks)
Does the device initialization. Only call this function once.
bStatus_t GAPRole_TerminateConnection(void)
Terminates the existing connection.