10#ifndef __XC_GAP_API_H__
11#define __XC_GAP_API_H__
24#define DEVICE_NAME_MAX_LEN 18
434 uint16_t latency, uint16_t time_out);
516void xc_ble_bond(
int conidx,
struct gapc_bond_cmd *p_param);
void xc_ble_gen_random_addr(struct gapm_gen_rand_addr_cmd *p_param)
Generate a random device address without starting any air operation. This can be useful for privacy i...
void xc_ble_gapm_reset(void)
Called only in the app_init(). It's used to reset the device but setting device configuration is sti...
void xc_ble_set_pkt_size(int conidx, uint16_t tx_octets, uint16_t tx_time)
This operation to define the preferred packet length to be used by the controller
void xc_ble_update_param(int conidx, uint16_t intv_min, uint16_t intv_max, uint16_t latency, uint16_t time_out)
Update connection paramters
void xc_ble_get_ral_addr(struct gapm_get_ral_addr_cmd *p_param)
Get local or peer resolvable private address
void xc_ble_scan_create(struct gapm_activity_create_cmd *scan_creat_param)
Create a scanning activity.
void xc_ble_bond_cfm(int conidx, struct gapc_bond_cfm *p_param)
Confirm bond request.
void xc_ble_advertise_create(struct gapm_activity_create_adv_cmd *adv_creat_param)
Create an advertising activity.
void xc_ble_activity_delete(int actv_idx)
Delete an activity or all activities
void xc_ble_get_pub_key(void)
Read the local P-256 Public Key. This key is renewed each time this command is called by requester a...
void xc_ble_conn_cfm(int conidx, struct gapc_connection_cfm *p_cfm)
Confirm connection request Set specific link security configuration and bonding data,...
void xc_ble_set_white_list(uint8_t size, gap_bdaddr_t *wl_info)
Request to set the content of the White List. The current content of the indicated list will be clear...
void xc_ble_set_ral_list(uint8_t size, struct gap_ral_dev_info *ral_info)
Request to set the content of the Resolving List. The current content of the indicated list will be c...
void xc_ble_set_adv_data(uint8_t actv_idx, uint16_t adv_data_length, uint8_t *p_adv_data)
Set advertising data for a given previously created advertising activity identified by its activity ...
void xc_ble_set_channel_map(struct gapm_set_channel_map_cmd *p_param)
This operation can be requested only by master of the link in order to set the channel map of the dev...
void xc_ble_advertise_start(struct gapm_activity_start_cmd *adv_start_param)
Start an advertising activity.
void xc_ble_scan_start(struct gapm_activity_start_cmd *scan_start_param)
Start a scanning activity.
void xc_ble_get_dev_info_cfm(int conidx, struct gapc_get_dev_info_cfm *p_param)
Called when the peer device obtains information about the local device. Device Name,...
void xc_ble_set_dev_config(struct gapm_set_dev_config_cmd *cfg_param)
Set the device configuration such as: Device role Manage device address type: Public,...
void xc_ble_set_dev_info_cfm(int conidx, struct gapc_set_dev_info_cfm *p_param)
Send the write confirmation to the stack.
void xc_ble_req_security(int conidx, uint8_t sec_auth)
This operation can be requested only by slave of the link in order to initiate security request proce...
void xc_ble_encrypt(int conidx, struct gapc_encrypt_cmd *p_param)
This operation can be requested only by master of the link in order to initiate encryption procedure....
void xc_ble_activity_stop(int actv_idx)
Stop an activity or all activities.
void xc_ble_param_update_cfm(int conidx, struct gapc_param_update_cfm *update_cfm)
Used by to accept or refuse connection parameters proposed by peer device.
void xc_ble_set_scan_rsp_data(uint8_t actv_idx, uint16_t scan_rsp_data_length, uint8_t *p_scan_rsp_data)
Set Scan response data for a given previously created advertising activity identified by its activit...
void xc_ble_encrypt_cfm(int conidx, struct gapc_encrypt_cfm *p_param)
Confirmation message to send after receiving a GAPC_ENCRYPT_REQ_IND message This message can is used...
void xc_ble_gen_random_nb(void)
Used to generate an 8-byte random number. This can be useful to generate LTK random number before di...
void xc_ble_init_start(struct gapm_activity_start_cmd *init_start_param)
Start a initiating activity.
void xc_ble_set_irk(gap_sec_key_t *irk)
Command to change the current IRK for a renewed one, it can be used every time no air operation is b...
void xc_ble_resolve_addr(uint8_t nb_key, gap_addr_t *addr, uint8_t *irk)
Resolve provided random address using array of Identity Resolution Key (IRK) exchanged and bonded wit...
void xc_ble_bond(int conidx, struct gapc_bond_cmd *p_param)
Requested by master of the link in order to initiate the bond procedure. It contains pairing require...
void xc_ble_get_dev_info(struct gapm_get_dev_info_cmd *cmd)
Get information about local device such as: Local Device Name Local Device Version Local Device Pu...
void xc_ble_init_create(struct gapm_activity_create_cmd *init_create_param)
Create a initiating activity.
void xc_ble_get_peer_info(int conidx, struct gapc_get_info_cmd *get_info)
Retrieve information about peer device or about the current active link.
void xc_ble_disconnect(int conidx, uint32_t reason)
Request for disconnection of the link. This can be requested by master or slave of the connection.