nRF Connect SDK Bare Metal API 2.0.99
Loading...
Searching...
No Matches
Battery Service

Battery Service. More...

Data Structures

struct  ble_bas_evt
 Battery service event. More...
 
struct  ble_bas_config
 Battery service configuration. More...
 
struct  ble_bas
 Battery Service structure. More...
 

Macros

#define BLE_BAS_DEF(_name)
 Define a Battery service instance.
 
#define BLE_BAS_CONFIG_SEC_MODE_DEFAULT
 Default security configuration.
 
#define BLE_BAS_BATTERY_LEVEL_LAST   ((uint8_t)0xFF)
 Notify the last battery level. Do not update the value.
 

Typedefs

typedef void(* ble_bas_evt_handler_t) (struct ble_bas *bas, const struct ble_bas_evt *evt)
 Battery service event handler type.
 

Enumerations

enum  ble_bas_evt_type { BLE_BAS_EVT_NOTIFICATION_ENABLED , BLE_BAS_EVT_NOTIFICATION_DISABLED , BLE_BAS_EVT_ERROR }
 Battery service event types. More...
 

Functions

uint32_t ble_bas_init (struct ble_bas *bas, const struct ble_bas_config *bas_config)
 Initialize the battery service.
 
uint32_t ble_bas_battery_level_update (struct ble_bas *bas, uint16_t conn_handle, uint8_t battery_level)
 Update battery level.
 
void ble_bas_on_ble_evt (const ble_evt_t *ble_evt, void *ble_bas)
 Bluetooth LE event handler for the Battery Service.
 

Detailed Description

Battery Service.