Infineon Logo AIROC BTSDK v4.9 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
wiced_bt_battery_client.h File Reference

Provides definitions of the Battery Client (BAC) library interface. More...

Data Structures

struct  wiced_bt_battery_client_discovery_complete_t
 Data associated with WICED_BT_BAC_EVENT_DISCOVERY_COMPLETE. More...
 
struct  wiced_bt_battery_client_data_t
 event Data More...
 
union  wiced_bt_battery_client_event_data_t
 Union of data associated with BAC events. More...
 

Macros

#define UUID_CHARACTERISTIC_BATTERY_LEVEL_STATUS   0x7F90
 
#define UUID_CHARACTERISTIC_BATTERY_ESTIMATED_SERVICE_DATE   0x7F91
 
#define UUID_CHARACTERISTIC_BATTERY_CRITICAL_STATUS   0x7F92
 
#define UUID_CHARACTERISTIC_BATTERY_ENERGY_STATUS   0x7F93
 
#define UUID_CHARACTERISTIC_BATTERY_TIME_STATUS   0x7F94
 
#define UUID_CHARACTERISTIC_BATTERY_HEALTH_STATUS   0x7F95
 
#define UUID_CHARACTERISTIC_BATTERY_HEALTH_INFO   0x7F96
 
#define UUID_CHARACTERISTIC_BATTERY_INFO   0x7F97
 
#define UUID_CHARACTERISTIC_BATTERY_MANUFACTURE_NAME   0x2A29
 
#define UUID_CHARACTERISTIC_BATTERY_MANUFACTURE_NUMBER   0x2A24
 
#define UUID_CHARACTERISTIC_BATTERY_SERIAL_NUMBER   0x2A25
 
#define UUID_CHARACTERISTIC_BATTERY_FORMAT_PRESENTATION   0x2904
 

Typedefs

typedef void( wiced_bt_battery_client_callback_t )(wiced_bt_battery_client_event_t event, wiced_bt_battery_client_event_data_t *p_data)
 BAC Callback function type wiced_bt_battery_client_callback_t. More...
 

Enumerations

enum  wiced_bt_battery_client_event_t { WICED_BT_BAC_EVENT_DISCOVERY_COMPLETE = 1, WICED_BT_BAC_EVENT_RSP, WICED_BT_BAC_EVENT_NOTIFICATION, WICED_BT_BAC_EVENT_INDICATION }
 BAC Events received by the applicaton's BAC callback (see wiced_bt_battery_client_callback_t) More...
 

Functions

char * wiced_bt_battery_client_uuid_to_str (uint16_t uuid)
 This function returns supported BAS v1.1 characteristic service name by given uuid. More...
 
wiced_result_t wiced_bt_battery_client_init (wiced_bt_battery_client_callback_t *p_callback)
 The application calls this function to initialize the Battery Client profile. More...
 
wiced_bt_gatt_status_t wiced_bt_battery_client_discover (uint16_t conn_id, uint16_t start_handle, uint16_t end_handle)
 The application calls this function to performs Battery Service characteristics discovery and characteristic descriptor discovery. More...
 
void wiced_bt_battery_client_discovery_result (wiced_bt_gatt_discovery_result_t *p_data)
 The application calls this API during GATT discovery to pass discovery results for the BAC service to the BAC Library. More...
 
void wiced_bt_battery_client_discovery_complete (wiced_bt_gatt_discovery_complete_t *p_data)
 The application calls this API during GATT discovery to pass discovery complete information for the BAC service to the BAC Library. More...
 
wiced_bt_gatt_status_t wiced_bt_battery_client_read (uint16_t conn_id)
 If a discovery complete is a success, the application can read the battery level provided by the server. More...
 
void wiced_bt_battery_client_enable (uint16_t conn_id)
 Writes a client characteristic configuration descriptor to receive battery level notifications from the server. More...
 
void wiced_bt_battery_client_disable (uint16_t conn_id)
 Writes a client characteristic configuration descriptor to stop receiving battery level notifications from the server. More...
 
void wiced_bt_battery_client_read_rsp (wiced_bt_gatt_operation_complete_t *p_data)
 The application calls this function when it receives GATT Read Response for the attribute handle that belongs to the BAC service. More...
 
void wiced_bt_battery_client_process_notification (wiced_bt_gatt_operation_complete_t *p_data)
 The application calls this when it receives notification from the server. More...
 
void wiced_bt_battery_client_process_indication (wiced_bt_gatt_operation_complete_t *p_data)
 The application calls this when it receives notification from the server. More...
 
void wiced_bt_battery_client_connection_up (wiced_bt_gatt_connection_status_t *p_conn_status)
 The application calls this function when LE connection with a peer device established. More...
 
void wiced_bt_battery_client_connection_down (wiced_bt_gatt_connection_status_t *p_conn_status)
 The application calls this function when LE connection with a peer device disconnected. More...
 

Detailed Description

Provides definitions of the Battery Client (BAC) library interface.