109 #include "bt_system.h" 111 #include "bt_gatts.h" 112 #include "bt_gap_le.h" 113 #include "bt_platform.h" 124 typedef uint16_t ble_bas_event_t;
125 #define BLE_BAS_EVENT_BATTRY_LEVEL_READ 0x00 126 #define BLE_BAS_EVENT_CCCD_READ 0x01 127 #define BLE_BAS_EVENT_CCCD_WRITE 0x02 uint16_t bt_handle_t
Define the connection handle type.
Definition: bt_type.h:85
uint8_t ble_bas_read_callback(ble_bas_event_t event, bt_handle_t conn_handle)
This function is a user-defined callback for the application to listen to the read event of Battery L...
bt_status_t ble_bas_notify_battery_level(bt_handle_t conn_handle, uint8_t battery_level)
This function sends a notification to a peer device about the current battery level.
int32_t bt_status_t
Define the status type, returned from the APIs, and defined as BT_STATUS_XXX.
Definition: bt_type.h:173
void ble_bas_write_callback(ble_bas_event_t event, bt_handle_t conn_handle, void *data)
This function is a user-defined callback for the application to listen to the write event of Client C...
Service structure of the GATTS.
Definition: bt_gatts.h:245