Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08dc55ca authored by Chris Manton's avatar Chris Manton
Browse files

enum-ify BTM_BLE_ events

Towards readable code

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ica632f9050ac8efeaa67a3178286015b2bec2a4b
parent 78342d3d
Loading
Loading
Loading
Loading
+13 −10
Original line number Diff line number Diff line
@@ -26,16 +26,19 @@
#define CHNL_MAP_LEN 5
typedef uint8_t tBTM_BLE_CHNL_MAP[CHNL_MAP_LEN];

enum : uint8_t {
  /* 0x00-0x04 only used for set advertising parameter command */
#define BTM_BLE_CONNECT_EVT 0x00
  BTM_BLE_CONNECT_EVT = 0x00,
  /* Connectable directed advertising */
#define BTM_BLE_CONNECT_DIR_EVT 0x01
  BTM_BLE_CONNECT_DIR_EVT = 0x01,
  /* Scannable undirected advertising */
#define BTM_BLE_DISCOVER_EVT 0x02
  BTM_BLE_DISCOVER_EVT = 0x02,
  /* Non connectable undirected advertising */
#define BTM_BLE_NON_CONNECT_EVT 0x03
  BTM_BLE_NON_CONNECT_EVT = 0x03,
  /* Connectable low duty cycle directed advertising  */
#define BTM_BLE_CONNECT_LO_DUTY_DIR_EVT 0x04
  BTM_BLE_CONNECT_LO_DUTY_DIR_EVT = 0x04,
};

/* 0x00 - 0x04 can be received on adv event type */
#define BTM_BLE_ADV_IND_EVT  0x00
#define BTM_BLE_ADV_DIRECT_IND_EVT  0x01