Bluetooth LE Profile API document
Bluetooth LE Profile API document Rev.1.00 [May 22, 2020]

Macro definition. More...

Detailed Description

Macro definition.

Macros

#define BLE_SERVS_MULTI_ATTR_EVENT(attr_idx, inst_idx, evt_idx)   ((uint16_t)((attr_idx << 10) | (inst_idx << 6) | (evt_idx << 0)))
 Event type used in callback. This macro is used if same service is used. More...
 
#define BLE_SERVS_ATTR_EVENT(attr_idx, evt_idx)   BLE_SERVS_MULTI_ATTR_EVENT(attr_idx, 0, evt_idx)
 Event type used in callback. More...
 

Enumerations

enum  e_ble_servs_event_t {
  BLE_SERVS_WRITE_REQ = 0x00,
  BLE_SERVS_WRITE_CMD = 0x01,
  BLE_SERVS_WRITE_COMP = 0x02,
  BLE_SERVS_READ_REQ = 0x03,
  BLE_SERVS_HDL_VAL_CNF = 0x04
}
 Server callback events. More...
 

Macro Definition Documentation

◆ BLE_SERVS_MULTI_ATTR_EVENT

#define BLE_SERVS_MULTI_ATTR_EVENT (   attr_idx,
  inst_idx,
  evt_idx 
)    ((uint16_t)((attr_idx << 10) | (inst_idx << 6) | (evt_idx << 0)))

Event type used in callback. This macro is used if same service is used.

Parameters
[in]attr_idxAttribute index. 6bit is used.
[in]inst_idxService index. 4bit is used.
[in]evt_idxEvent index. 5bit is used.

◆ BLE_SERVS_ATTR_EVENT

#define BLE_SERVS_ATTR_EVENT (   attr_idx,
  evt_idx 
)    BLE_SERVS_MULTI_ATTR_EVENT(attr_idx, 0, evt_idx)

Event type used in callback.

Parameters
[in]attr_idxAttribute index. 6bit is used.
[in]evt_idxEvent index. 5bit is used.

Enumeration Type Documentation

◆ e_ble_servs_event_t

Server callback events.

Enumerator
BLE_SERVS_WRITE_REQ 

Receive a write request

BLE_SERVS_WRITE_CMD 

Receive a write command

BLE_SERVS_WRITE_COMP 

Send a write response

BLE_SERVS_READ_REQ 

Receive a read request

BLE_SERVS_HDL_VAL_CNF 

Receive a confirmation