Bluetooth: Controller: change condition in while to Boolean

Use `do { ... } while (false)` instead of `do { ... } while (0)`.

Signed-off-by: frei tycho <tfrei@baumer.com>
This commit is contained in:
frei tycho 2024-06-07 15:29:10 +00:00 committed by Carles Cufí
parent f0dae15356
commit 3603d831fd
3 changed files with 25 additions and 25 deletions

View File

@ -104,7 +104,7 @@
do { \
DEBUG_PORT->DIRSET = DEBUG_PIN_MASK; \
DEBUG_PORT->OUTCLR = DEBUG_PIN_MASK; \
} while (0)
} while (false)
#define DEBUG_CPU_SLEEP(flag) \
do { \
@ -115,7 +115,7 @@
DEBUG_PORT->OUTCLR = DEBUG_PIN0; \
DEBUG_PORT->OUTSET = DEBUG_PIN0; \
} \
} while (0)
} while (false)
#define DEBUG_TICKER_ISR(flag) \
do { \
@ -126,7 +126,7 @@
DEBUG_PORT->OUTSET = DEBUG_PIN1; \
DEBUG_PORT->OUTCLR = DEBUG_PIN1; \
} \
} while (0)
} while (false)
#define DEBUG_TICKER_TASK(flag) \
do { \
@ -137,7 +137,7 @@
DEBUG_PORT->OUTSET = DEBUG_PIN1; \
DEBUG_PORT->OUTCLR = DEBUG_PIN1; \
} \
} while (0)
} while (false)
#define DEBUG_TICKER_JOB(flag) \
do { \
@ -148,7 +148,7 @@
DEBUG_PORT->OUTSET = DEBUG_PIN2; \
DEBUG_PORT->OUTCLR = DEBUG_PIN2; \
} \
} while (0)
} while (false)
#define DEBUG_RADIO_ISR(flag) \
do { \
@ -159,7 +159,7 @@
DEBUG_PORT->OUTSET = DEBUG_PIN7; \
DEBUG_PORT->OUTCLR = DEBUG_PIN7; \
} \
} while (0)
} while (false)
#define DEBUG_RADIO_XTAL(flag) \
do { \
@ -170,7 +170,7 @@
DEBUG_PORT->OUTSET = DEBUG_PIN8; \
DEBUG_PORT->OUTCLR = DEBUG_PIN8; \
} \
} while (0)
} while (false)
#define DEBUG_RADIO_ACTIVE(flag) \
do { \
@ -181,7 +181,7 @@
DEBUG_PORT->OUTSET = DEBUG_PIN9; \
DEBUG_PORT->OUTCLR = DEBUG_PIN9; \
} \
} while (0)
} while (false)
#define DEBUG_RADIO_CLOSE(flag) \
do { \
@ -191,7 +191,7 @@
} else { \
DEBUG_PORT->OUTCLR = DEBUG_CLOSE_MASK; \
} \
} while (0)
} while (false)
#define DEBUG_RADIO_PREPARE_A(flag) \
do { \
@ -202,7 +202,7 @@
DEBUG_PORT->OUTCLR = DEBUG_PIN3; \
DEBUG_PORT->OUTSET = DEBUG_PIN3; \
} \
} while (0)
} while (false)
#define DEBUG_RADIO_START_A(flag) \
do { \
@ -213,7 +213,7 @@
DEBUG_PORT->OUTCLR = DEBUG_PIN3; \
DEBUG_PORT->OUTSET = DEBUG_PIN3; \
} \
} while (0)
} while (false)
#define DEBUG_RADIO_CLOSE_A(flag) \
do { \
@ -223,7 +223,7 @@
} else { \
DEBUG_PORT->OUTCLR = DEBUG_PIN3; \
} \
} while (0)
} while (false)
#define DEBUG_RADIO_PREPARE_S(flag) \
do { \
@ -234,7 +234,7 @@
DEBUG_PORT->OUTCLR = DEBUG_PIN4; \
DEBUG_PORT->OUTSET = DEBUG_PIN4; \
} \
} while (0)
} while (false)
#define DEBUG_RADIO_START_S(flag) \
do { \
@ -245,7 +245,7 @@
DEBUG_PORT->OUTCLR = DEBUG_PIN4; \
DEBUG_PORT->OUTSET = DEBUG_PIN4; \
} \
} while (0)
} while (false)
#define DEBUG_RADIO_CLOSE_S(flag) \
do { \
@ -255,7 +255,7 @@
} else { \
DEBUG_PORT->OUTCLR = DEBUG_PIN4; \
} \
} while (0)
} while (false)
#define DEBUG_RADIO_PREPARE_O(flag) \
do { \
@ -266,7 +266,7 @@
DEBUG_PORT->OUTCLR = DEBUG_PIN5; \
DEBUG_PORT->OUTSET = DEBUG_PIN5; \
} \
} while (0)
} while (false)
#define DEBUG_RADIO_START_O(flag) \
do { \
@ -277,7 +277,7 @@
DEBUG_PORT->OUTCLR = DEBUG_PIN5; \
DEBUG_PORT->OUTSET = DEBUG_PIN5; \
} \
} while (0)
} while (false)
#define DEBUG_RADIO_CLOSE_O(flag) \
do { \
@ -287,7 +287,7 @@
} else { \
DEBUG_PORT->OUTCLR = DEBUG_PIN5; \
} \
} while (0)
} while (false)
#define DEBUG_RADIO_PREPARE_M(flag) \
do { \
@ -298,7 +298,7 @@
DEBUG_PORT->OUTCLR = DEBUG_PIN6; \
DEBUG_PORT->OUTSET = DEBUG_PIN6; \
} \
} while (0)
} while (false)
#define DEBUG_RADIO_START_M(flag) \
do { \
@ -309,7 +309,7 @@
DEBUG_PORT->OUTCLR = DEBUG_PIN6; \
DEBUG_PORT->OUTSET = DEBUG_PIN6; \
} \
} while (0)
} while (false)
#define DEBUG_RADIO_CLOSE_M(flag) \
do { \
@ -319,7 +319,7 @@
} else { \
DEBUG_PORT->OUTCLR = DEBUG_PIN6; \
} \
} while (0)
} while (false)
#else
#define DEBUG_SETUP()

View File

@ -85,7 +85,7 @@ static uint8_t force_md_cnt;
if (force_md_cnt) { \
force_md_cnt--; \
} \
} while (0)
} while (false)
#define FORCE_MD_CNT_GET() force_md_cnt
@ -95,7 +95,7 @@ static uint8_t force_md_cnt;
(trx_cnt >= ((CONFIG_BT_BUF_ACL_TX_COUNT) - 1))) { \
force_md_cnt = BT_CTLR_FORCE_MD_COUNT; \
} \
} while (0)
} while (false)
#else /* !CONFIG_BT_CTLR_FORCE_MD_COUNT */
#define FORCE_MD_CNT_INIT()

View File

@ -102,7 +102,7 @@ extern const struct device *vega_debug_portd;
\
gpio_pin_set(DEBUG0_PORT, DEBUG0_PIN, 1); \
gpio_pin_set(DEBUG0_PORT, DEBUG0_PIN, 0); \
} while (0)
} while (false)
#define DEBUG_CPU_SLEEP(flag) gpio_pin_set(DEBUG0_PORT, DEBUG0_PIN, flag)
@ -126,7 +126,7 @@ extern const struct device *vega_debug_portd;
gpio_pin_set(DEBUG5_PORT, DEBUG5_PIN, flag); \
gpio_pin_set(DEBUG6_PORT, DEBUG6_PIN, flag); \
} \
} while (0)
} while (false)
#define DEBUG_RADIO_PREPARE_A(flag) \
gpio_pin_set(DEBUG3_PORT, DEBUG3_PIN, flag)