Collaboration diagram for Functions:Functions | |
| uint16_t | ble_gatts_enh_prf_add (ble_gatts_create_db_t *p_gatts_db, ble_evt_handler_t evt_handler) |
| Add a server profile by providing its detailed information, including manager callback functions and GATT server callback functions. More... | |
| uint16_t | ble_gatts_enh_read_cfm (uint8_t conn_idx, uint16_t cid, const ble_gatts_read_cfm_t *p_param) |
| Respond to an attribute read request. More... | |
| uint16_t | ble_gatts_enh_write_cfm (uint8_t conn_idx, uint16_t cid, const ble_gatts_write_cfm_t *p_param) |
| Respond to an attribute write request. More... | |
| uint16_t | ble_gatts_enh_prepare_write_cfm (uint8_t conn_idx, uint16_t cid, const ble_gatts_prep_write_cfm_t *p_param) |
| Respond to an attribute prepare write request. More... | |
| uint16_t | ble_gatts_enh_noti_ind (uint8_t conn_idx, uint16_t cid, const ble_gatts_noti_ind_t *p_param) |
| Send out a notification or an indication. More... | |
| uint16_t | ble_gatts_enh_mult_noti (uint8_t conn_idx, uint16_t cid, const ble_gatts_noti_multiple_t *p_param) |
| Send out Multiple Variable Length Notifications. More... | |
| uint16_t | ble_gatts_prf_add (ble_gatts_create_db_t *p_gatts_db, ble_evt_handler_t evt_handler) |
| Add a server profile by providing its detailed information. More... | |
| uint16_t | ble_gattc_prf_add (ble_uuid_t *p_uuid, ble_evt_handler_t evt_handler) |
| Add a client profile by providing its detail information. More... | |
| uint16_t ble_gattc_prf_add | ( | ble_uuid_t * | p_uuid, |
| ble_evt_handler_t | evt_handler | ||
| ) |
Add a client profile by providing its detail information.
| [in] | p_uuid | Pointer to the target service uuid. See ble_uuid_t. |
| [out] | evt_handler | Pointer to ble events handler.. |
| SDK_SUCCESS | The profile info is recorded successfully, and the profile ENV will be initialized in profile initialization callback function. |
| SDK_ERR_POINTER_NULL | The parameter p_uuid or evt_handler is NULL, or input parameters that prf_info points to are invalid. |
| SDK_ERR_NO_RESOURCES | The profile number is up to the maximum number the system can support. |
| uint16_t ble_gatts_enh_mult_noti | ( | uint8_t | conn_idx, |
| uint16_t | cid, | ||
| const ble_gatts_noti_multiple_t * | p_param | ||
| ) |
Send out Multiple Variable Length Notifications.
The execution status of sending notification or indication will be retrieved in the event BLE_GATTS_EVT_ENH_MULT_NTF
| [in] | conn_idx | Current connection index. |
| [in] | cid | The local channel ID. |
| [in] | p_param | Pointer to the parameters filled by profile. see ble_gatts_noti_multiple_t. |
| SDK_SUCCESS | Send Notification or Indication event to stack successfully. |
| SDK_ERR_POINTER_NULL | Param is NULL. |
| SDK_ERR_INVALID_CONN_IDX | Conidx is invalid. |
| SDK_ERR_INVALID_PARAM | Type is invalid. |
| SDK_ERR_INVALID_HANDLE | Handle not exist in the database. |
| SDK_ERR_NO_RESOURCES | Not enough resources. |
| uint16_t ble_gatts_enh_noti_ind | ( | uint8_t | conn_idx, |
| uint16_t | cid, | ||
| const ble_gatts_noti_ind_t * | p_param | ||
| ) |
Send out a notification or an indication.
The execution status of sending notification or indication will be retrieved in the event BLE_GATTS_EVT_ENH_NTF_IND.
| [in] | conn_idx | Current connection index. |
| [in] | cid | The local channel ID. |
| [in] | p_param | Pointer to the parameters filled by profile. see ble_gatts_noti_ind_t. |
| SDK_SUCCESS | Send Notification or Indication event to stack successfully. |
| SDK_ERR_POINTER_NULL | Param is NULL. |
| SDK_ERR_INVALID_CONN_IDX | Conidx is invalid. |
| SDK_ERR_INVALID_PARAM | Type is invalid. |
| SDK_ERR_INVALID_HANDLE | Handle not exist in the database. |
| SDK_ERR_NO_RESOURCES | Not enough resources. |
| uint16_t ble_gatts_enh_prepare_write_cfm | ( | uint8_t | conn_idx, |
| uint16_t | cid, | ||
| const ble_gatts_prep_write_cfm_t * | p_param | ||
| ) |
Respond to an attribute prepare write request.
It is used in gatts event handler function BLE_GATTS_EVT_ENH_PREP_WRITE_REQUEST to send prepare write operation status to stack.
| [in] | conn_idx | Current connection index. |
| [in] | cid | The local channel ID. |
| [in] | p_param | Pointer to the parameters filled by profile. see ble_gatts_prep_write_cfm_t. |
| SDK_SUCCESS | Send prepare write confirm status to stack successfully. |
| SDK_ERR_POINTER_NULL | Param is NULL. |
| SDK_ERR_INVALID_CONN_IDX | Conidx is invalid. |
| SDK_ERR_NO_RESOURCES | Not enough resources. |
| uint16_t ble_gatts_enh_prf_add | ( | ble_gatts_create_db_t * | p_gatts_db, |
| ble_evt_handler_t | evt_handler | ||
| ) |
Add a server profile by providing its detailed information, including manager callback functions and GATT server callback functions.
This API should be called in application initialization function.
| [in] | p_gatts_db | Pointer to the database info. See ble_gatts_create_db_t. |
| [in] | evt_handler | Event handler. See ble_evt_handler_t. |
| SDK_SUCCESS | The profile info is recorded successfully, and the database will be created in profile initialization callback function. |
| SDK_ERR_POINTER_NULL | The parameter prf_info is NULL, or input parameters that prf_info points to are invalid. |
| SDK_ERR_NO_RESOURCES | The profile number is up to the maximum number the system can support. |
| uint16_t ble_gatts_enh_read_cfm | ( | uint8_t | conn_idx, |
| uint16_t | cid, | ||
| const ble_gatts_read_cfm_t * | p_param | ||
| ) |
Respond to an attribute read request.
It is used in gatts event handle function BLE_GATTS_EVT_ENH_READ_REQUEST to send attribute value to stack which is saved in user space.
| [in] | conn_idx | Current connection index. |
| [in] | cid | The local channel ID. |
| [in] | p_param | Pointer to the parameters filled by profile. See ble_gatts_read_cfm_t. |
| SDK_SUCCESS | Send read confirm value to stack successfully. |
| SDK_ERR_POINTER_NULL | Param is NULL. |
| SDK_ERR_INVALID_CONN_IDX | Conidx is invalid. |
| SDK_ERR_NO_RESOURCES | Not enough resources. |
| uint16_t ble_gatts_enh_write_cfm | ( | uint8_t | conn_idx, |
| uint16_t | cid, | ||
| const ble_gatts_write_cfm_t * | p_param | ||
| ) |
Respond to an attribute write request.
It is used in gatts event handler function BLE_GATTS_EVT_ENH_WRITE_REQUEST to send write operation status to stack.
| [in] | conn_idx | Current connection index. |
| [in] | cid | The local channel ID. |
| [in] | p_param | Pointer to the parameters filled by profile. see ble_gatts_write_cfm_t. |
| SDK_SUCCESS | Send write confirm status to stack successfully. |
| SDK_ERR_POINTER_NULL | Param is NULL. |
| SDK_ERR_INVALID_CONN_IDX | Conidx is invalid. |
| SDK_ERR_NO_RESOURCES | Not enough resources. |
| uint16_t ble_gatts_prf_add | ( | ble_gatts_create_db_t * | p_gatts_db, |
| ble_evt_handler_t | evt_handler | ||
| ) |
Add a server profile by providing its detailed information.
| [in] | p_gatts_db | Pointer to the prf_info. See ble_gatts_create_db_t. |
| [in] | evt_handler | Pointer to ble events handler. |
| SDK_SUCCESS | The profile info is recorded successfully, and the database will be created in profile initialization callback function. |
| SDK_ERR_POINTER_NULL | The parameter p_gatts_db or evt_handler is NULL. |
| SDK_ERR_NO_RESOURCES | The profile number is up to the maximum number the system can support. |