![]() |
Bluetooth LE Profile API document
Bluetooth LE Profile API document Rev.1.00 [May 22, 2020]
|
This is the client for the Battery Service Service. More...
This is the client for the Battery Service Service.
Data Structures | |
struct | st_ble_bac_battery_level_presn_format_t |
Characteristic Presentation Format value structure. More... | |
struct | st_ble_bac_battery_level_attr_hdl_t |
Battery Level attribute handle value. More... | |
struct | st_ble_bac_evt_data_t |
Battery Service client event data. More... | |
Enumerations | |
enum | e_ble_bac_char_idx_t { BLE_BAC_BATTERY_LEVEL_IDX, BLE_BAC_BATTERY_LEVEL_PRESN_FORMAT_IDX, BLE_BAC_BATTERY_LEVEL_CLI_CNFG_IDX } |
Battery Service characteristic ID. More... | |
enum | e_ble_bac_event_t { BLE_BAC_EVENT_BATTERY_LEVEL_READ_RSP = BLE_SERVC_ATTR_EVENT(BLE_BAC_BATTERY_LEVEL_IDX, BLE_SERVC_READ_RSP), BLE_BAC_EVENT_BATTERY_LEVEL_HDL_VAL_NTF = BLE_SERVC_ATTR_EVENT(BLE_BAC_BATTERY_LEVEL_IDX, BLE_SERVC_HDL_VAL_NTF), BLE_BAC_EVENT_BATTERY_LEVEL_PRESN_FORMAT_READ_RSP = BLE_SERVC_ATTR_EVENT(BLE_BAC_BATTERY_LEVEL_PRESN_FORMAT_IDX, BLE_SERVC_READ_RSP), BLE_BAC_EVENT_BATTERY_LEVEL_CLI_CNFG_READ_RSP = BLE_SERVC_ATTR_EVENT(BLE_BAC_BATTERY_LEVEL_CLI_CNFG_IDX, BLE_SERVC_READ_RSP), BLE_BAC_EVENT_BATTERY_LEVEL_CLI_CNFG_WRITE_RSP = BLE_SERVC_ATTR_EVENT(BLE_BAC_BATTERY_LEVEL_CLI_CNFG_IDX, BLE_SERVC_WRITE_RSP) } |
Battery Service client event type. More... | |
Functions | |
ble_status_t | R_BLE_BAC_ReadBatteryLevelPresnFormat (uint16_t conn_hdl) |
Read Battery Level characteristic Characteristic Presentation Format descriptor value from the remote GATT database. More... | |
ble_status_t | R_BLE_BAC_ReadBatteryLevelCliCnfg (uint16_t conn_hdl) |
Read Battery Level characteristic Client Characteristic Configuration descriptor value from the remote GATT database. More... | |
ble_status_t | R_BLE_BAC_WriteBatteryLevelCliCnfg (uint16_t conn_hdl, const uint16_t *p_value) |
Write Battery Level characteristic Client Characteristic Configuration descriptor value to remote GATT database. More... | |
ble_status_t | R_BLE_BAC_ReadBatteryLevel (uint16_t conn_hdl) |
Read Battery Level characteristic value from the remote GATT database. More... | |
void | R_BLE_BAC_GetBatteryLevelAttrHdl (const st_ble_dev_addr_t *p_addr, st_ble_bac_battery_level_attr_hdl_t *p_hdl) |
Get Battery Level attribute handles. More... | |
ble_status_t | R_BLE_BAC_Init (ble_servc_app_cb_t cb) |
Initialize Battery Service client. More... | |
void | R_BLE_BAC_ServDiscCb (uint16_t conn_hdl, uint8_t serv_idx, uint16_t type, void *p_param) |
Battery Service client discovery callback. More... | |
void | R_BLE_BAC_GetServAttrHdl (const st_ble_dev_addr_t *p_addr, st_ble_gatt_hdl_range_t *p_hdl) |
Get Battery Service client attribute handle. More... | |
enum e_ble_bac_char_idx_t |
Battery Service characteristic ID.
enum e_ble_bac_event_t |
Battery Service client event type.
ble_status_t R_BLE_BAC_ReadBatteryLevelPresnFormat | ( | uint16_t | conn_hdl | ) |
Read Battery Level characteristic Characteristic Presentation Format descriptor value from the remote GATT database.
[in] | conn_hdl | Connection handle. |
ble_status_t R_BLE_BAC_ReadBatteryLevelCliCnfg | ( | uint16_t | conn_hdl | ) |
Read Battery Level characteristic Client Characteristic Configuration descriptor value from the remote GATT database.
[in] | conn_hdl | Connection handle. |
ble_status_t R_BLE_BAC_WriteBatteryLevelCliCnfg | ( | uint16_t | conn_hdl, |
const uint16_t * | p_value | ||
) |
Write Battery Level characteristic Client Characteristic Configuration descriptor value to remote GATT database.
[in] | conn_hdl | Connection handle. |
[in] | p_value | Battery Level characteristic Client Characteristic Configuration descriptor value to write. |
ble_status_t R_BLE_BAC_ReadBatteryLevel | ( | uint16_t | conn_hdl | ) |
Read Battery Level characteristic value from the remote GATT database.
[in] | conn_hdl | Connection handle. |
void R_BLE_BAC_GetBatteryLevelAttrHdl | ( | const st_ble_dev_addr_t * | p_addr, |
st_ble_bac_battery_level_attr_hdl_t * | p_hdl | ||
) |
Get Battery Level attribute handles.
[in] | p_addr | Bluetooth device address for the attribute handles. |
[out] | p_hdl | The pointer to store the retrieved attribute handles. |
ble_status_t R_BLE_BAC_Init | ( | ble_servc_app_cb_t | cb | ) |
void R_BLE_BAC_ServDiscCb | ( | uint16_t | conn_hdl, |
uint8_t | serv_idx, | ||
uint16_t | type, | ||
void * | p_param | ||
) |
Battery Service client discovery callback.
[in] | conn_hdl | Connection handle |
[in] | serv_idx | Service instance index. |
[in] | type | Service discovery event type. |
[in] | p_param | Service discovery event parameter. |
void R_BLE_BAC_GetServAttrHdl | ( | const st_ble_dev_addr_t * | p_addr, |
st_ble_gatt_hdl_range_t * | p_hdl | ||
) |
Get Battery Service client attribute handle.
[in] | p_addr | Bluetooth device address for the attribute handles. |
[out] | p_hdl | The pointer to store the retrieved attribute handles. |