13 #ifndef IN_BLE_PRF_BAS_H 14 #define IN_BLE_PRF_BAS_H 26 #include "./ble/in_ble_prf.h" 27 #include "ble/in_ble_evt.h" 28 #define BLE_BASS_INSTANCES_MAX (2) 38 BASC_EVT_CODE = BAS_EVT_CODE +1,
43 BASS_EVT_CODE = BAS_EVT_CODE + 0x10,
104 } ble_evt_basc_batt_level_ind_t;
112 } ble_evt_bass_level_ntf_cfg_ind_t;
127 } ble_basc_content_t;
166 uint8_t features[BLE_BASS_INSTANCES_MAX];
177 uint8_t old_batt_lvl[BLE_BASS_INSTANCES_MAX];
216 int in_ble_basc_enable(
void *hdl,
int conidx,
int con_type, uint8_t bas_nb, ble_basc_content_t content[], comp_cb callback);
245 int in_ble_basc_ntf_req(
void *hdl, uint8_t conidx, uint8_t bas_nb, uint16_t ntf_cfg, comp_cb callback);
Battery Level Characteristic support notifications.
Definition: in_ble_prf_bas.h:68
Battery Level.
Definition: in_ble_prf_bas.h:75
Parameters for the database creation.
Definition: in_ble_prf_bas.h:150
characteristic presentation information
Definition: in_ble_prf.h:111
characteristic description
Definition: in_ble_prf.h:208
uint8_t bas_nb
Battery Service Instance - From 0 to BASC_NB_BAS_INSTANCES_MAX-1.
Definition: in_ble_prf_bas.h:135
Parameters of the BASS_ENABLE_REQ message.
Definition: in_ble_prf_bas.h:172
ble_att_perm
Definition: in_ble_att.h:63
bool check_enc_key_size
If let the service check whether encryption key size is 16bytes (more security).
Definition: in_ble_prf_bas.h:158
characteristic info
Definition: in_ble_prf.h:195
ble_bass_char_type
Battery Service Characteristics.
Definition: in_ble_prf_bas.h:72
Battery Level Characteristic Presentation Format.
Definition: in_ble_prf_bas.h:84
int in_ble_basc_add(void *hdl, ble_bas_prf_t *p_prf, comp_cb callback)
Add Battery Client Service.
service handles
Definition: in_ble_prf.h:171
uint8_t batt_level
Battery Level - if info = BASC_BATT_LVL_VAL.
Definition: in_ble_prf_bas.h:141
Parameters of the BASC_READ_INFO_RSP message.
Definition: in_ble_prf_bas.h:130
bool multi_instance
If the service is multi-instance.
Definition: in_ble_prf_bas.h:153
int in_ble_bass_enable(void *hdl, int conidx, ble_bass_enable_req_t *p_req, comp_cb callback)
Enable BAS server service.
uint16_t ntf_cfg
Notification Configuration Value - if info = BASC_NTF_CFG.
Definition: in_ble_prf_bas.h:143
uint8_t info
Characteristic info.
Definition: in_ble_prf_bas.h:133
Indicate that the Battery Level value has been received,.
Definition: in_ble_prf_bas.h:41
int in_ble_basc_read_info_req(void *hdl, int conidx, int bas_nb, int basc_info, ble_basc_read_info_rsp_t *rsp, comp_cb callback)
Read peer info.
int in_ble_bass_batt_level_upd_req(void *hdl, int conidx, uint8_t instance, uint8_t batt_lvl, comp_cb callback)
Update battery level request.
Inform that Battery Level Notification Configuration has been changed - use to update bond data...
Definition: in_ble_prf_bas.h:46
Battery Level Client Characteristic Configuration.
Definition: in_ble_prf_bas.h:55
ble_basc_info
Peer battery info that can be read.
Definition: in_ble_prf_bas.h:50
ble_char_pres_fmt_t char_pres_format
Characteristic Presentation Format - if info = BASC_BATT_LVL_PRES_FORMAT.
Definition: in_ble_prf_bas.h:145
ble_bass_desc_type
Battery Service Descriptors.
Definition: in_ble_prf_bas.h:81
ble_bas_evt
Events defines for Battery Services.
Definition: in_ble_prf_bas.h:36
Battery Level Characteristic Presentation Format.
Definition: in_ble_prf_bas.h:57
uint8_t bas_nb
Number of BAS to add.
Definition: in_ble_prf_bas.h:164
int in_ble_basc_ntf_req(void *hdl, uint8_t conidx, uint8_t bas_nb, uint16_t ntf_cfg, comp_cb callback)
Configure notification.
Battery Level Characteristic doesn't support notifications.
Definition: in_ble_prf_bas.h:66
ble_bass_features
Features Flag Masks.
Definition: in_ble_prf_bas.h:63
Battery Level value.
Definition: in_ble_prf_bas.h:53
Battery Level Client Characteristic Configuration.
Definition: in_ble_prf_bas.h:86
int in_ble_bass_add(void *hdl, ble_bas_prf_t *p_prf, comp_cb callback)
Add Battery Server Service.
uint8_t ntf_cfg
Client Notification Configuration,.
Definition: in_ble_prf_bas.h:175
int in_ble_basc_enable(void *hdl, int conidx, int con_type, uint8_t bas_nb, ble_basc_content_t content[], comp_cb callback)
Enable BAS client service.