Telink TLSR8232 BLE SDK Developer Handbook
AN-19112700-E1
62
Ver.1.0.0
3.2.7 Telink Defined Event
Besides the standard Controller HCI event, SDK also provides Telink defined event, the
architecture is shown below.
In terms of user application, events are from Host and Controller (equivalent to the whole
BLE stack). Most events are from Controller, and will be introduced in this section. The
Host part will introduce a few events from Host.
Application
BLE Host +
BLE Controller
cmd
data
data
Telink
defined
event
Figure 3-19 Architecture of Telink Defined Event
Up to 20 Telink defined events are supported, which are defined by using macros in
“stack/ble//ll/ll.h”.
Current new SDK supports the following callback events.
“BLT_EV_FLAG_CONNECT/BLT_EV_FLAG_TERMINATE” has the same function as
“HCI_SUB_EVT_LE_CONNECTION_COMPLETE” and
“HCI_EVT_DISCONNECTION_COMPLETE” in HCI event, but data definition of these
events are different.
#define
BLT_EV_FLAG_ADV
0
#define
BLT_EV_FLAG_ADV_DURATION_TIMEOUT
1
#define
BLT_EV_FLAG_SCAN_RSP
2
#define
BLT_EV_FLAG_CONNECT
3
#define
BLT_EV_FLAG_TERMINATE
4
#define
BLT_EV_FLAG_PAIRING_BEGIN
5
#define
BLT_EV_FLAG_PAIRING_END
6
#define
BLT_EV_FLAG_ENCRYPTION_CONN_DONE 7
#define
BLT_EV_FLAG_DATA_LENGTH_EXCHANGE
8
#define
BLT_EV_FLAG_GPIO_EARLY_WAKEUP
9
#define
BLT_EV_FLAG_CHN_MAP_REQ
10
#define
BLT_EV_FLAG_CONN_PARA_REQ
11
#define
BLT_EV_FLAG_CHN_MAP_UPDATE
12
#define
BLT_EV_FLAG_CONN_PARA_UPDATE
13
#define
BLT_EV_FLAG_SUSPEND_ENTER
14
#define
BLT_EV_FLAG_SUSPEND_EXIT
15