#include "at_ble_api.h"
#include "platform.h"
#include "interface.h"
#include "gapm_task.h"
#include "dbg_task.h"
#include "gapc_task.h"
#include "error.h"
#include "device.h"
Macros | |
#define | gapm_set_address_type(type) ((type>0 && type <4)?1:0) |
Enumerations | |
enum | { LLM_ADV_CONN_UNDIR = 0x00, LLM_ADV_CONN_DIR, LLM_ADV_NONCONN_UNDIR, LLM_SCAN_REQ, LLM_SCAN_RSP, LLM_CONNECT_REQ, LLM_ADV_DISC_UNDIR, LLM_ADV_END } |
Functions | |
at_ble_status_t | gapm_addr_solved_ind_handler (uint8_t *data, at_ble_resolv_rand_addr_status_t *params) |
at_ble_status_t | gapm_adv_report_evt_handler (uint8_t *data, at_ble_scan_info_t *param) |
at_ble_status_t | gapm_cancel_cmd_handler (void) |
at_ble_events_t | gapm_cmp_evt (uint8_t *data, void *params) |
at_ble_status_t | gapm_connection_cfm_handler (uint8_t *pu8PeerBdAddr, uint8_t u8PeerAddrType, uint16_t u16ConIntvMin, uint16_t u16ConIntvMax, uint16_t u16ConLatency, uint16_t u16SupervTO, uint16_t u16CeMin, uint16_t u16CeMAx) |
at_ble_status_t | gapm_dev_bdaddr_ind_handler (uint8_t *data, at_ble_rand_addr_changed_t *param) |
static uint8_t | gapm_get_address_type (uint8_t *pu8Addr, uint8_t u8AddrType) |
at_ble_status_t | gapm_reset_req_handler (void) |
at_ble_status_t | gapm_resolv_addr_cmd_handler (uint8_t nb_key, uint8_t *rand_addr, uint8_t *irk) |
at_ble_status_t | gapm_set_dev_config_cmd_handler (uint8_t u8Role, uint8_t *pu8Key, uint16_t u16Appearance, uint8_t u8AppWrPerm, uint8_t u8NameWrPerm, uint16_t u16MaxMTU, uint16_t u16ConIntMin, uint16_t u16ConIntMax, uint16_t u16ConLatency, uint16_t u16SupervTo, uint8_t u8Flags) |
at_ble_status_t | gapm_set_dev_name_handler (uint8_t len, uint8_t *name) |
at_ble_status_t | gapm_start_adv_cmd_handler (uint8_t u8OpCode, uint8_t u8AddrSrc, uint16_t u16RenewDur, uint8_t *pu8BdAddr, uint8_t peer_addr_type, uint8_t *peerBdAddr, uint16_t u16MinIntv, uint16_t u16MaxIntv, uint8_t u8ChnlMap, uint8_t u8Mode, uint8_t u8AdvFiltPolicy, uint8_t u8AdvDataLen, uint8_t *pu8AdvData, uint8_t u8ScnRespLen, uint8_t *pu8ScnRespData) |
at_ble_status_t | gapm_start_connection_cmd_handler (uint8_t u8OpCode, uint8_t u8AddrType, uint16_t u16RenewDur, uint8_t *pu8BdAddr, uint16_t u16ScanInterval, uint16_t u16ScanWin, uint16_t u16ConIntvMin, uint16_t u16ConIntvMax, uint16_t u16ConLatency, uint16_t u16SupervTO, uint16_t u16CeMin, uint16_t u16CeMAx, uint8_t u8NbOfPeers, at_ble_addr_t *peers) |
at_ble_status_t | gapm_start_scan_cmd_handler (uint8_t u8OpCode, uint8_t u8AddrType, uint16_t u16RenewDur, uint8_t *pu8BdAddr, uint16_t u16ScanInterval, uint16_t u16ScanWin, uint8_t u8ScanMode, uint8_t u8FiltPolicy, uint8_t u8FilterDuplic) |
at_ble_status_t | gapm_white_list_mgm_cmd (uint8_t operation, uint8_t addr_type, uint8_t *address) |
#define gapm_set_address_type | ( | type | ) | ((type>0 && type <4)?1:0) |
Referenced by gapm_start_connection_cmd_handler().
anonymous enum |
at_ble_status_t gapm_addr_solved_ind_handler | ( | uint8_t * | data, |
at_ble_resolv_rand_addr_status_t * | params | ||
) |
at_ble_status_t gapm_adv_report_evt_handler | ( | uint8_t * | data, |
at_ble_scan_info_t * | param | ||
) |
References at_ble_addr_t::addr, ADV_CONN_DIR, ADV_CONN_UNDIR, at_ble_scan_info_t::adv_data, at_ble_scan_info_t::adv_data_len, ADV_DISC_UNDIR, ADV_NONCONN_UNDIR, AT_BLE_ADDR_LEN, AT_BLE_ADV_MAX_SIZE, AT_BLE_ADV_TYPE_DIRECTED, AT_BLE_ADV_TYPE_NONCONN_UNDIRECTED, AT_BLE_ADV_TYPE_SCAN_RESPONSE, AT_BLE_ADV_TYPE_SCANNABLE_UNDIRECTED, AT_BLE_ADV_TYPE_UNDIRECTED, AT_BLE_SUCCESS, at_ble_scan_info_t::dev_addr, gapm_get_address_type(), INTERFACE_UNPACK_BLOCK, INTERFACE_UNPACK_DONE, INTERFACE_UNPACK_INIT, INTERFACE_UNPACK_SKIP, INTERFACE_UNPACK_UINT8, LLM_SCAN_RSP, at_ble_scan_info_t::rssi, at_ble_addr_t::type, and at_ble_scan_info_t::type.
Referenced by handle_ble_event().
at_ble_status_t gapm_cancel_cmd_handler | ( | void | ) |
References GAPM_CANCEL, GAPM_CANCEL_CMD, INTERFACE_MSG_DONE, INTERFACE_MSG_INIT, INTERFACE_PACK_ARG_UINT8, INTERFACE_SEND_NO_WAIT, and TASK_GAPM.
Referenced by at_ble_adv_stop(), at_ble_connect_cancel(), and at_ble_scan_stop().
at_ble_events_t gapm_cmp_evt | ( | uint8_t * | data, |
void * | params | ||
) |
References at_ble_addr_t::addr, AT_BLE_ADDR_LEN, AT_BLE_CONNECTED, at_ble_gap_error(), AT_BLE_RESOLV_RAND_ADDR_STATUS, AT_BLE_SCAN_REPORT, AT_BLE_SUCCESS, AT_BLE_UNDEFINED_EVENT, device_info::conn_handle, at_ble_connected_t::conn_status, device, GAP_ERR_NO_ERROR, GAP_ERR_TIMEOUT, GAPM_ADV_DIRECT, GAPM_ADV_UNDIRECT, GAPM_CONNECTION_AUTO, gapm_get_address_type(), GAPM_RESOLV_ADDR, GAPM_SCAN_ACTIVE, GAPM_SCAN_PASSIVE, at_ble_connected_t::handle, INTERFACE_UNPACK_DONE, INTERFACE_UNPACK_INIT, INTERFACE_UNPACK_UINT8, device_info::peer_addr, at_ble_connected_t::peer_addr, at_ble_scan_report_t::status, at_ble_resolv_rand_addr_status_t::status, and at_ble_addr_t::type.
Referenced by handle_ble_event().
at_ble_status_t gapm_connection_cfm_handler | ( | uint8_t * | pu8PeerBdAddr, |
uint8_t | u8PeerAddrType, | ||
uint16_t | u16ConIntvMin, | ||
uint16_t | u16ConIntvMax, | ||
uint16_t | u16ConLatency, | ||
uint16_t | u16SupervTO, | ||
uint16_t | u16CeMin, | ||
uint16_t | u16CeMAx | ||
) |
at_ble_status_t gapm_dev_bdaddr_ind_handler | ( | uint8_t * | data, |
at_ble_rand_addr_changed_t * | param | ||
) |
References at_ble_rand_addr_changed_t::addr, AT_BLE_ADDR_LEN, AT_BLE_SUCCESS, INTERFACE_UNPACK_BLOCK, INTERFACE_UNPACK_DONE, and INTERFACE_UNPACK_INIT.
Referenced by handle_ble_event().
|
static |
at_ble_status_t gapm_reset_req_handler | ( | void | ) |
References AT_BLE_FAILURE, AT_BLE_SUCCESS, GAPM_CMP_EVT, GAPM_RESET, GAPM_RESET_CMD, INTERFACE_MSG_DONE, INTERFACE_MSG_INIT, INTERFACE_PACK_ARG_UINT8, INTERFACE_SEND_WAIT, INTERFACE_UNPACK_UINT8, and TASK_GAPM.
Referenced by at_ble_init().
at_ble_status_t gapm_resolv_addr_cmd_handler | ( | uint8_t | nb_key, |
uint8_t * | rand_addr, | ||
uint8_t * | irk | ||
) |
at_ble_status_t gapm_set_dev_config_cmd_handler | ( | uint8_t | u8Role, |
uint8_t * | pu8Key, | ||
uint16_t | u16Appearance, | ||
uint8_t | u8AppWrPerm, | ||
uint8_t | u8NameWrPerm, | ||
uint16_t | u16MaxMTU, | ||
uint16_t | u16ConIntMin, | ||
uint16_t | u16ConIntMax, | ||
uint16_t | u16ConLatency, | ||
uint16_t | u16SupervTo, | ||
uint8_t | u8Flags | ||
) |
References AT_BLE_FAILURE, AT_BLE_SUCCESS, GAP_PERIPHERAL_SLV, GAPM_CMP_EVT, GAPM_SET_DEV_CONFIG, GAPM_SET_DEV_CONFIG_CMD, INTERFACE_MSG_DONE, INTERFACE_MSG_INIT, INTERFACE_PACK_ARG_BLOCK, INTERFACE_PACK_ARG_UINT16, INTERFACE_PACK_ARG_UINT8, INTERFACE_SEND_WAIT, INTERFACE_UNPACK_UINT8, KEY_LEN, and TASK_GAPM.
Referenced by at_ble_set_dev_config().
at_ble_status_t gapm_set_dev_name_handler | ( | uint8_t | len, |
uint8_t * | name | ||
) |
at_ble_status_t gapm_start_adv_cmd_handler | ( | uint8_t | u8OpCode, |
uint8_t | u8AddrSrc, | ||
uint16_t | u16RenewDur, | ||
uint8_t * | pu8BdAddr, | ||
uint8_t | peer_addr_type, | ||
uint8_t * | peerBdAddr, | ||
uint16_t | u16MinIntv, | ||
uint16_t | u16MaxIntv, | ||
uint8_t | u8ChnlMap, | ||
uint8_t | u8Mode, | ||
uint8_t | u8AdvFiltPolicy, | ||
uint8_t | u8AdvDataLen, | ||
uint8_t * | pu8AdvData, | ||
uint8_t | u8ScnRespLen, | ||
uint8_t * | pu8ScnRespData | ||
) |
References ADV_DATA_MAX_SIZE, AT_BLE_ADDR_LEN, GAPM_ADV_DIRECT, GAPM_START_ADVERTISE_CMD, INTERFACE_MSG_DONE, INTERFACE_MSG_INIT, INTERFACE_PACK_ARG_BLOCK, INTERFACE_PACK_ARG_DUMMY, INTERFACE_PACK_ARG_UINT16, INTERFACE_PACK_ARG_UINT8, INTERFACE_SEND_NO_WAIT, NULL, SCAN_RESP_DATA_MAX_SIZE, and TASK_GAPM.
Referenced by at_ble_adv_start().
at_ble_status_t gapm_start_connection_cmd_handler | ( | uint8_t | u8OpCode, |
uint8_t | u8AddrType, | ||
uint16_t | u16RenewDur, | ||
uint8_t * | pu8BdAddr, | ||
uint16_t | u16ScanInterval, | ||
uint16_t | u16ScanWin, | ||
uint16_t | u16ConIntvMin, | ||
uint16_t | u16ConIntvMax, | ||
uint16_t | u16ConLatency, | ||
uint16_t | u16SupervTO, | ||
uint16_t | u16CeMin, | ||
uint16_t | u16CeMAx, | ||
uint8_t | u8NbOfPeers, | ||
at_ble_addr_t * | peers | ||
) |
References at_ble_addr_t::addr, BD_ADDR_LEN, gapm_set_address_type, GAPM_START_CONNECTION_CMD, INTERFACE_MSG_DONE, INTERFACE_MSG_INIT, INTERFACE_PACK_ARG_BLOCK, INTERFACE_PACK_ARG_UINT16, INTERFACE_PACK_ARG_UINT8, INTERFACE_SEND_NO_WAIT, TASK_GAPM, and at_ble_addr_t::type.
Referenced by at_ble_connect().
at_ble_status_t gapm_start_scan_cmd_handler | ( | uint8_t | u8OpCode, |
uint8_t | u8AddrType, | ||
uint16_t | u16RenewDur, | ||
uint8_t * | pu8BdAddr, | ||
uint16_t | u16ScanInterval, | ||
uint16_t | u16ScanWin, | ||
uint8_t | u8ScanMode, | ||
uint8_t | u8FiltPolicy, | ||
uint8_t | u8FilterDuplic | ||
) |
References BD_ADDR_LEN, GAPM_START_SCAN_CMD, INTERFACE_MSG_DONE, INTERFACE_MSG_INIT, INTERFACE_PACK_ARG_BLOCK, INTERFACE_PACK_ARG_UINT16, INTERFACE_PACK_ARG_UINT8, INTERFACE_SEND_NO_WAIT, and TASK_GAPM.
Referenced by at_ble_scan_start().
at_ble_status_t gapm_white_list_mgm_cmd | ( | uint8_t | operation, |
uint8_t | addr_type, | ||
uint8_t * | address | ||
) |
Number of device information present in command
References AT_BLE_ADDR_LEN, GAPM_ADD_DEV_IN_WLIST, GAPM_CMP_EVT, GAPM_WHITE_LIST_MGT_CMD, INTERFACE_MSG_DONE, INTERFACE_MSG_INIT, INTERFACE_PACK_ARG_BLOCK, INTERFACE_PACK_ARG_UINT8, INTERFACE_SEND_WAIT, NULL, and TASK_GAPM.
Referenced by at_ble_whitelist_add(), at_ble_whitelist_clear(), and at_ble_whitelist_remove().