From: Chris Manton Date: Sun, 30 Aug 2020 03:47:05 +0000 (-0700) Subject: enum-ify tBTM_BLE_CONN_ST X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=218716ea2579230714ddd6ba0e819a0ce05cdf64;p=android-x86%2Fsystem-bt.git enum-ify tBTM_BLE_CONN_ST Towards readable code Bug: 163134718 Tag: #refactor Test: compile & verify basic functions working Change-Id: I6abd2e511178562e5bc199e60bcd4b167c601a54 --- diff --git a/stack/btm/btm_ble_int_types.h b/stack/btm/btm_ble_int_types.h index 7f0fb95f6..8c3131ce7 100644 --- a/stack/btm/btm_ble_int_types.h +++ b/stack/btm/btm_ble_int_types.h @@ -167,10 +167,11 @@ constexpr uint8_t BTM_BLE_WL_INIT = 1; typedef uint8_t tBTM_BLE_RL_STATE; /* BLE connection state */ -#define BLE_CONN_IDLE 0 -#define BLE_CONNECTING 2 -#define BLE_CONN_CANCEL 3 -typedef uint8_t tBTM_BLE_CONN_ST; +typedef enum : uint8_t { + BLE_CONN_IDLE = 0, + BLE_CONNECTING = 2, + BLE_CONN_CANCEL = 3, +} tBTM_BLE_CONN_ST; typedef struct { void* p_param; } tBTM_BLE_CONN_REQ;