chip/stm32/registers.h: Format with clang-format
BRANCH=none
TEST=none
Tricium: disable
#include "common.h"
#include "compile_time_macros.h"
-
#ifndef __ASSEMBLER__
/* Register definitions */
/* --- TIMERS --- */
#define STM32_TIM_BASE(n) CONCAT3(STM32_TIM, n, _BASE)
-#define STM32_TIM_REG(n, offset) \
- REG16(STM32_TIM_BASE(n) + (offset))
-#define STM32_TIM_REG32(n, offset) \
- REG32(STM32_TIM_BASE(n) + (offset))
+#define STM32_TIM_REG(n, offset) REG16(STM32_TIM_BASE(n) + (offset))
+#define STM32_TIM_REG32(n, offset) REG32(STM32_TIM_BASE(n) + (offset))
#define STM32_TIM_CR1(n) STM32_TIM_REG(n, 0x00)
#define STM32_TIM_CR1_CEN BIT(0)
@@ -187,7 +184,6 @@ typedef volatile struct timer_ctlr timer_ctlr_t;
#define UNIMPLEMENTED_GPIO_BANK GPIO_A
-
/* --- I2C --- */
#define STM32_I2C1_PORT 0
#define STM32_I2C2_PORT 1
@@ -443,8 +439,8 @@ typedef volatile struct timer_ctlr timer_ctlr_t;
#define EP_TX_RX_NAK (EP_TX_NAK | EP_RX_NAK)
#define STM32_TOGGLE_EP(n, mask, val, flags) \
- STM32_USB_EP(n) = (((STM32_USB_EP(n) & (EP_MASK | (mask))) \
- ^ (val)) | (flags))
+ STM32_USB_EP(n) = \
+ (((STM32_USB_EP(n) & (EP_MASK | (mask))) ^ (val)) | (flags))
/* --- TRNG --- */
#define STM32_RNG_CR REG32(STM32_RNG_BASE + 0x0)
@@ -458,8 +454,7 @@ typedef volatile struct timer_ctlr timer_ctlr_t;
/* --- AXI interconnect --- */
/* STM32H7: AXI_TARGx_FN_MOD exists for masters x = 1, 2 and 7 */
-#define STM32_AXI_TARG_FN_MOD(x) REG32(STM32_GPV_BASE + 0x1108 + \
- 0x1000 * (x))
+#define STM32_AXI_TARG_FN_MOD(x) REG32(STM32_GPV_BASE + 0x1108 + 0x1000 * (x))
#define WRITE_ISS_OVERRIDE BIT(1)
#define READ_ISS_OVERRIDE BIT(0)
