drivers: Add interrupt controller API #152924
Annotations
5 errors, 4 warnings, and 10 notices
Run Compliance Tests
Process completed with exit code 4.
|
check-warns:
Checkpatch.txt#L1
See https://docs.zephyrproject.org/latest/contribute/guidelines.html#coding-style for more details.
MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided
File:drivers/gpio/gpio_nrfx.c
Line:487
MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided
File:include/zephyr/sys/irq.h
Line:148
MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided
File:include/zephyr/sys/irq.h
Line:191
|
check-warns:
Kconfig.txt#L1
See https://docs.zephyrproject.org/latest/build/kconfig/tips.html for more details.
Boolean option 'POWER' prompt must not start with 'Enable...'. Please
check Kconfig guidelines.
Boolean option 'POWER_NRF' prompt must not start with 'Enable...'. Please
check Kconfig guidelines.
|
check-warns:
KconfigBasicNoModules.txt#L1
See https://docs.zephyrproject.org/latest/build/kconfig/tips.html for more details.
Boolean option 'POWER' prompt must not start with 'Enable...'. Please
check Kconfig guidelines.
Boolean option 'POWER_NRF' prompt must not start with 'Enable...'. Please
check Kconfig guidelines.
|
check-warns
Process completed with exit code 1.
|
Run Compliance Tests:
drivers/gpio/gpio_nrfx.c#L487
drivers/gpio/gpio_nrfx.c:487 Macros with flow control statements should be avoided
|
Run Compliance Tests:
include/zephyr/sys/irq.h#L148
include/zephyr/sys/irq.h:148 Macros with flow control statements should be avoided
|
Run Compliance Tests:
include/zephyr/sys/irq.h#L191
include/zephyr/sys/irq.h:191 Macros with flow control statements should be avoided
|
check-warns:
ClangFormat.txt#L1
See https://docs.zephyrproject.org/latest/contribute/guidelines.html#clang-format for more details.
You may want to run clang-format on this change:
- sys_irq_configure(SYS_DT_IRQN(DT_NODELABEL(clock)),
- SYS_DT_IRQ_FLAGS(DT_NODELABEL(clock)));
+ sys_irq_configure(SYS_DT_IRQN(DT_NODELABEL(clock)), SYS_DT_IRQ_FLAGS(DT_NODELABEL(clock)));
File:drivers/clock_control/clock_control_nrf.c
Line:685
You may want to run clang-format on this change:
-#define GPIOTE_NRF_ISR_SYM(node_id) \
- NRFX_CONCAT( \
- nrfx_gpiote_, \
- DT_PROP(node_id, instance), \
- _irq_handler \
- )
-
-#define GPIOTE_NRF_ISR_WRAP_SYM(node_id) \
- _CONCAT_3( \
- gpiote_nrf_, \
- DT_PROP(node_id, instance), \
- _isr_wrapper \
- )
-
-#define GPIOTE_NRF_DEFINE_IRQ_HANDLER(node_id) \
- static int GPIOTE_NRF_ISR_WRAP_SYM(node_id)(const void *data) \
- { \
- GPIOTE_NRF_ISR_SYM(node_id)(); \
- return SYS_IRQ_HANDLED; \
- } \
- \
- SYS_DT_DEFINE_IRQ_HANDLER( \
- node_id, \
- GPIOTE_NRF_ISR_WRAP_SYM(node_id), \
- NULL \
- )
+#define GPIOTE_NRF_ISR_SYM(node_id) \
+ NRFX_CONCAT(nrfx_gpiote_, DT_PROP(node_id, instance), _irq_handler)
+
+#define GPIOTE_NRF_ISR_WRAP_SYM(node_id) \
+ _CONCAT_3(gpiote_nrf_, DT_PROP(node_id, instance), _isr_wrapper)
+
+#define GPIOTE_NRF_DEFINE_IRQ_HANDLER(node_id) \
+ static int GPIOTE_NRF_ISR_WRAP_SYM(node_id)(const void *data) \
+ { \
+ GPIOTE_NRF_ISR_SYM(node_id)(); \
+ return SYS_IRQ_HANDLED; \
+ } \
+ \
+ SYS_DT_DEFINE_IRQ_HANDLER(node_id, GPIOTE_NRF_ISR_WRAP_SYM(node_id), NULL)
File:drivers/gpio/gpio_nrfx.c
Line:499
You may want to run clang-format on this change:
-#define ARM_V7M_NVIC_VECTOR_DEFINE(inst, intln) \
- __attribute__((interrupt("IRQ"))) \
- __weak void INTC_DT_INST_VECTOR_SYMBOL(inst, intln)(void) \
- { \
- arm_v7m_nvic_vector_enter(); \
- INTC_DT_INST_INTL_HANDLER_SYMBOL(inst, intln)(); \
- arm_v7m_nvic_vector_exit(); \
+#define ARM_V7M_NVIC_VECTOR_DEFINE(inst, intln) \
+ __attribute__((interrupt("IRQ"))) __weak void INTC_DT_INST_VECTOR_SYMBOL(inst, \
+ intln)(void) \
+ { \
+ arm_v7m_nvic_vector_enter(); \
+ INTC_DT_INST_INTL_HANDLER_SYMBOL(inst, intln)(); \
+ arm_v7m_nvic_vector_exit(); \
}
-#define ARM_V7M_NVIC_VECTORS_DEFINE(inst) \
- _Pragma("GCC diagnostic push") \
- _Pragma("GCC diagnostic ignored \"-Wattributes\"") \
- INTC_DT_INST_FOREACH_INTL(inst, ARM_V7M_NVIC_VECTOR_DEFINE) \
- _Pragma("GCC diagnostic pop")
+#define ARM_V7M_NVIC_VECTORS_DEFINE(inst) \
+ _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wattributes\"") \
+ INTC_DT_INST_FOREACH_INTL(inst, ARM_V7M_NVIC_VECTOR_DEFINE) \
+ _Pragma("GCC diagnostic pop")
-#define ARM_V7M_NVIC_VECTOR_TABLE_ENTRY_DEFINE(inst, intln) \
- INTC_DT_INST_VECTOR_SYMBOL(inst, intln)
+#define ARM_V7M_NVIC_VECTOR_TABLE_ENTRY_DEFINE(inst, intln) INTC_DT_INST_VECTOR_SYMBOL(inst, intln)
-#define ARM_V7M_NVIC_VECTOR_TABLE_ENTRIES_DEFINE(inst) \
- INTC_DT_INST_FOREACH_INTL_SEP(inst, ARM_V7M_NVIC_VECTOR_T
|
Run Compliance Tests:
drivers/clock_control/clock_control_nrf.c#L685
drivers/clock_control/clock_control_nrf.c:685
- sys_irq_configure(SYS_DT_IRQN(DT_NODELABEL(clock)),
- SYS_DT_IRQ_FLAGS(DT_NODELABEL(clock)));
+ sys_irq_configure(SYS_DT_IRQN(DT_NODELABEL(clock)), SYS_DT_IRQ_FLAGS(DT_NODELABEL(clock)));
|
Run Compliance Tests:
drivers/gpio/gpio_nrfx.c#L499
drivers/gpio/gpio_nrfx.c:499
-#define GPIOTE_NRF_ISR_SYM(node_id) \
- NRFX_CONCAT( \
- nrfx_gpiote_, \
- DT_PROP(node_id, instance), \
- _irq_handler \
- )
-
-#define GPIOTE_NRF_ISR_WRAP_SYM(node_id) \
- _CONCAT_3( \
- gpiote_nrf_, \
- DT_PROP(node_id, instance), \
- _isr_wrapper \
- )
-
-#define GPIOTE_NRF_DEFINE_IRQ_HANDLER(node_id) \
- static int GPIOTE_NRF_ISR_WRAP_SYM(node_id)(const void *data) \
- { \
- GPIOTE_NRF_ISR_SYM(node_id)(); \
- return SYS_IRQ_HANDLED; \
- } \
- \
- SYS_DT_DEFINE_IRQ_HANDLER( \
- node_id, \
- GPIOTE_NRF_ISR_WRAP_SYM(node_id), \
- NULL \
- )
+#define GPIOTE_NRF_ISR_SYM(node_id) \
+ NRFX_CONCAT(nrfx_gpiote_, DT_PROP(node_id, instance), _irq_handler)
+
+#define GPIOTE_NRF_ISR_WRAP_SYM(node_id) \
+ _CONCAT_3(gpiote_nrf_, DT_PROP(node_id, instance), _isr_wrapper)
+
+#define GPIOTE_NRF_DEFINE_IRQ_HANDLER(node_id) \
+ static int GPIOTE_NRF_ISR_WRAP_SYM(node_id)(const void *data) \
+ { \
+ GPIOTE_NRF_ISR_SYM(node_id)(); \
+ return SYS_IRQ_HANDLED; \
+ } \
+ \
+ SYS_DT_DEFINE_IRQ_HANDLER(node_id, GPIOTE_NRF_ISR_WRAP_SYM(node_id), NULL)
|
Run Compliance Tests:
drivers/intc/intc_arm_v7m_nvic/arm_v7m_nvic.c#L138
drivers/intc/intc_arm_v7m_nvic/arm_v7m_nvic.c:138
-#define ARM_V7M_NVIC_VECTOR_DEFINE(inst, intln) \
- __attribute__((interrupt("IRQ"))) \
- __weak void INTC_DT_INST_VECTOR_SYMBOL(inst, intln)(void) \
- { \
- arm_v7m_nvic_vector_enter(); \
- INTC_DT_INST_INTL_HANDLER_SYMBOL(inst, intln)(); \
- arm_v7m_nvic_vector_exit(); \
+#define ARM_V7M_NVIC_VECTOR_DEFINE(inst, intln) \
+ __attribute__((interrupt("IRQ"))) __weak void INTC_DT_INST_VECTOR_SYMBOL(inst, \
+ intln)(void) \
+ { \
+ arm_v7m_nvic_vector_enter(); \
+ INTC_DT_INST_INTL_HANDLER_SYMBOL(inst, intln)(); \
+ arm_v7m_nvic_vector_exit(); \
}
-#define ARM_V7M_NVIC_VECTORS_DEFINE(inst) \
- _Pragma("GCC diagnostic push") \
- _Pragma("GCC diagnostic ignored \"-Wattributes\"") \
- INTC_DT_INST_FOREACH_INTL(inst, ARM_V7M_NVIC_VECTOR_DEFINE) \
- _Pragma("GCC diagnostic pop")
+#define ARM_V7M_NVIC_VECTORS_DEFINE(inst) \
+ _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wattributes\"") \
+ INTC_DT_INST_FOREACH_INTL(inst, ARM_V7M_NVIC_VECTOR_DEFINE) \
+ _Pragma("GCC diagnostic pop")
-#define ARM_V7M_NVIC_VECTOR_TABLE_ENTRY_DEFINE(inst, intln) \
- INTC_DT_INST_VECTOR_SYMBOL(inst, intln)
+#define ARM_V7M_NVIC_VECTOR_TABLE_ENTRY_DEFINE(inst, intln) INTC_DT_INST_VECTOR_SYMBOL(inst, intln)
-#define ARM_V7M_NVIC_VECTOR_TABLE_ENTRIES_DEFINE(inst) \
- INTC_DT_INST_FOREACH_INTL_SEP(inst, ARM_V7M_NVIC_VECTOR_TABLE_ENTRY_DEFINE, (,))
+#define ARM_V7M_NVIC_VECTOR_TABLE_ENTRIES_DEFINE(inst) \
+ INTC_DT_INST_FOREACH_INTL_SEP(inst, ARM_V7M_NVIC_VECTOR_TABLE_ENTRY_DEFINE, (, ))
ARM_V7M_NVIC_VECTORS_DEFINE(0)
intc_vector_t __irq_vector_table __used _irq_vector_table[] = {
- ARM_V7M_NVIC_VECTOR_TABLE_ENTRIES_DEFINE(0)
-};
+ ARM_V7M_NVIC_VECTOR_TABLE_ENTRIES_DEFINE(0)};
|
Run Compliance Tests:
drivers/intc/intc_arm_v8m_nvic/arm_v8m_nvic.c#L138
drivers/intc/intc_arm_v8m_nvic/arm_v8m_nvic.c:138
-#define ARM_V8M_NVIC_VECTOR_DEFINE(inst, intln) \
- __attribute__((interrupt("IRQ"))) \
- __weak void INTC_DT_INST_VECTOR_SYMBOL(inst, intln)(void) \
- { \
- arm_v8m_nvic_vector_enter(); \
- INTC_DT_INST_INTL_HANDLER_SYMBOL(inst, intln)(); \
- arm_v8m_nvic_vector_exit(); \
+#define ARM_V8M_NVIC_VECTOR_DEFINE(inst, intln) \
+ __attribute__((interrupt("IRQ"))) __weak void INTC_DT_INST_VECTOR_SYMBOL(inst, \
+ intln)(void) \
+ { \
+ arm_v8m_nvic_vector_enter(); \
+ INTC_DT_INST_INTL_HANDLER_SYMBOL(inst, intln)(); \
+ arm_v8m_nvic_vector_exit(); \
}
-#define ARM_V8M_NVIC_VECTORS_DEFINE(inst) \
- _Pragma("GCC diagnostic push") \
- _Pragma("GCC diagnostic ignored \"-Wattributes\"") \
- INTC_DT_INST_FOREACH_INTL(inst, ARM_V8M_NVIC_VECTOR_DEFINE) \
- _Pragma("GCC diagnostic pop")
+#define ARM_V8M_NVIC_VECTORS_DEFINE(inst) \
+ _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wattributes\"") \
+ INTC_DT_INST_FOREACH_INTL(inst, ARM_V8M_NVIC_VECTOR_DEFINE) \
+ _Pragma("GCC diagnostic pop")
-#define ARM_V8M_NVIC_VECTOR_TABLE_ENTRY_DEFINE(inst, intln) \
- INTC_DT_INST_VECTOR_SYMBOL(inst, intln)
+#define ARM_V8M_NVIC_VECTOR_TABLE_ENTRY_DEFINE(inst, intln) INTC_DT_INST_VECTOR_SYMBOL(inst, intln)
-#define ARM_V8M_NVIC_VECTOR_TABLE_ENTRIES_DEFINE(inst) \
- INTC_DT_INST_FOREACH_INTL_SEP(inst, ARM_V8M_NVIC_VECTOR_TABLE_ENTRY_DEFINE, (,))
+#define ARM_V8M_NVIC_VECTOR_TABLE_ENTRIES_DEFINE(inst) \
+ INTC_DT_INST_FOREACH_INTL_SEP(inst, ARM_V8M_NVIC_VECTOR_TABLE_ENTRY_DEFINE, (, ))
ARM_V8M_NVIC_VECTORS_DEFINE(0)
intc_vector_t __irq_vector_table __used _irq_vector_table[] = {
- ARM_V8M_NVIC_VECTOR_TABLE_ENTRIES_DEFINE(0)
-};
+ ARM_V8M_NVIC_VECTOR_TABLE_ENTRIES_DEFINE(0)};
|
Run Compliance Tests:
drivers/serial/uart_nrfx_uarte.c#L1968
drivers/serial/uart_nrfx_uarte.c:1968
-#define UARTE_DEFINE_ASYNC_IRQ_HANDLER(idx) \
- SYS_DT_DEFINE_IRQ_HANDLER( \
- UARTE(idx), \
- uarte_nrfx_isr_async_wrapper, \
- DEVICE_DT_GET(UARTE(idx)) \
- )
+#define UARTE_DEFINE_ASYNC_IRQ_HANDLER(idx) \
+ SYS_DT_DEFINE_IRQ_HANDLER(UARTE(idx), uarte_nrfx_isr_async_wrapper, \
+ DEVICE_DT_GET(UARTE(idx)))
|
Run Compliance Tests:
drivers/serial/uart_nrfx_uarte.c#L1985
drivers/serial/uart_nrfx_uarte.c:1985
-#define UARTE_DEFINE_INT_IRQ_HANDLER(idx) \
- SYS_DT_DEFINE_IRQ_HANDLER( \
- UARTE(idx), \
- uarte_nrfx_isr_int_wrapper, \
- DEVICE_DT_GET(UARTE(idx)) \
- )
-
-#define UARTE_IRQ_CONFIGURE(idx) \
- sys_irq_configure(SYS_DT_IRQN(UARTE(idx)), \
- SYS_DT_IRQ_FLAGS(UARTE(idx))); \
+#define UARTE_DEFINE_INT_IRQ_HANDLER(idx) \
+ SYS_DT_DEFINE_IRQ_HANDLER(UARTE(idx), uarte_nrfx_isr_int_wrapper, DEVICE_DT_GET(UARTE(idx)))
+
+#define UARTE_IRQ_CONFIGURE(idx) \
+ sys_irq_configure(SYS_DT_IRQN(UARTE(idx)), SYS_DT_IRQ_FLAGS(UARTE(idx))); \
|
Run Compliance Tests:
drivers/serial/uart_nrfx_uarte.c#L2101
drivers/serial/uart_nrfx_uarte.c:2101
-#define UART_NRF_UARTE_DEVICE(idx) \
- NRF_DT_CHECK_NODE_HAS_PINCTRL_SLEEP(UARTE(idx)); \
- UARTE_INT_DRIVEN(idx); \
- PINCTRL_DT_DEFINE(UARTE(idx)); \
+#define UART_NRF_UARTE_DEVICE(idx) \
+ NRF_DT_CHECK_NODE_HAS_PINCTRL_SLEEP(UARTE(idx)); \
+ UARTE_INT_DRIVEN(idx); \
+ PINCTRL_DT_DEFINE(UARTE(idx)); \
IF_ENABLED(CONFIG_UART_##idx##_ASYNC, ( \
static uint8_t \
uarte##idx##_tx_cache[CONFIG_UART_ASYNC_TX_CACHE_SIZE] \
UARTE_MEMORY_SECTION(idx); \
- struct uarte_async_cb uarte##idx##_async;)) \
- static uint8_t uarte##idx##_char_out UARTE_MEMORY_SECTION(idx); \
- static uint8_t uarte##idx##_rx_data UARTE_MEMORY_SECTION(idx); \
- static struct uarte_nrfx_data uarte_##idx##_data = { \
- .char_out = &uarte##idx##_char_out, \
- .rx_data = &uarte##idx##_rx_data, \
+ struct uarte_async_cb uarte##idx##_async;)) \
+ static uint8_t uarte##idx##_char_out UARTE_MEMORY_SECTION(idx); \
+ static uint8_t uarte##idx##_rx_data UARTE_MEMORY_SECTION(idx); \
+ static struct uarte_nrfx_data uarte_##idx##_data = { \
+ .char_out = &uarte##idx##_char_out, \
+ .rx_data = &uarte##idx##_rx_data, \
IF_ENABLED(CONFIG_UART_USE_RUNTIME_CONFIGURE, \
- (.uart_config = UARTE_CONFIG(idx),)) \
- IF_ENABLED(CONFIG_UART_##idx##_ASYNC, \
- (.async = &uarte##idx##_async,)) \
- IF_ENABLED(CONFIG_UART_##idx##_INTERRUPT_DRIVEN, \
- (.int_driven = &uarte##idx##_int_driven,)) \
- }; \
+ (.uart_config = UARTE_CONFIG(idx),)) \
+ IF_ENABLED(CONFIG_UART_##idx##_ASYNC, \
+ (.async = &uarte##idx##_async,)) \
+ IF_ENABLED(CONFIG_UART_##idx##_INTERRUPT_DRIVEN, \
+ (.int_driven = &uarte##idx##_int_driven,)) }; \
COND_CODE_1(CONFIG_UART_USE_RUNTIME_CONFIGURE, (), \
(BUILD_ASSERT(NRF_BAUDRATE(UARTE_PROP(idx, current_speed)) > 0,\
- "Unsupported baudrate");)) \
- static const struct uarte_nrfx_config uarte_##idx##z_config = { \
- COND_CODE_1(CONFIG_UART_USE_RUNTIME_CONFIGURE, (), \
+ "Unsupported baudrate");)) \
+ static const struct uarte_nrfx_config uarte_##idx##z_config = {COND_CODE_1(CONFIG_UART_USE_RUNTIME_CONFIGURE, (), \
(.baudrate = UARTE_GET_BAUDRATE(idx), \
- .hw_config = UARTE_NRF_CONFIG(idx),)) \
- .pcfg = PINCTRL_DT_DEV_CONFIG_GET(UARTE(idx)), \
- .uarte_regs = _CONCAT(NRF_UARTE, idx), \
- .flags = \
- (IS_ENABLED(CONFIG_UART_##idx##_ENHANCED_POLL_OUT) ? \
- UARTE_CFG_FLAG_PPI_ENDTX : 0) | \
- (IS_ENABLED(CONFIG_UART_##idx##_NRF_HW_ASYNC) ? \
- UARTE_CFG_FLAG_HW_BYTE_COUNTING : 0) | \
- USE_LOW_POWER(idx), \
- UARTE_DISABLE_RX_INIT(UARTE(idx)), \
- IF_ENABLED(CONFIG_UART_##idx##_ASYNC, \
- (.tx_cache = uarte##idx##_tx_cache,)) \
- IF_ENABLED(CONFIG_UART_##idx##_NRF_HW_ASYNC, \
+ .hw_config = UARTE_NRF_CONFIG(idx),)) .pcfg = \
+ PINCTRL_DT_DEV_CONFIG_GET(UARTE(idx)), \
+ .uarte_regs = _CONCAT(NRF_UARTE, idx), \
+ .flags = (IS_ENABLED(CONFIG_UART_##idx##_ENHANCED_POLL_OUT) \
+ ? UARTE_CFG_FLAG_PPI_ENDTX \
+ : 0) | \
+ (IS_ENA
|
Run Compliance Tests:
drivers/timer/nrf_rtc_timer.c#L36
drivers/timer/nrf_rtc_timer.c:36
-#define RTC_NODE DT_NODELABEL(RTC_LABEL)
+#define RTC_NODE DT_NODELABEL(RTC_LABEL)
#define CHAN_COUNT_MAX (RTC1_CC_NUM - (RTC_PRETICK ? 1 : 0))
BUILD_ASSERT(CHAN_COUNT <= CHAN_COUNT_MAX, "Not enough compare channels");
/* Ensure that counter driver for RTC1 is not enabled. */
-BUILD_ASSERT(DT_NODE_HAS_STATUS(RTC_NODE, reserved),
- "Counter for RTC1 must be reserved");
+BUILD_ASSERT(DT_NODE_HAS_STATUS(RTC_NODE, reserved), "Counter for RTC1 must be reserved");
|
Run Compliance Tests:
drivers/timer/nrf_rtc_timer.c#L758
drivers/timer/nrf_rtc_timer.c:758
- sys_irq_configure(SYS_DT_IRQN(RTC_NODE),
- SYS_DT_IRQ_FLAGS(RTC_NODE));
+ sys_irq_configure(SYS_DT_IRQN(RTC_NODE), SYS_DT_IRQ_FLAGS(RTC_NODE));
|
Run Compliance Tests:
include/zephyr/arch/arm/irq.h#L196
include/zephyr/arch/arm/irq.h:196
-#define ARCH_ISR_DIRECT_DECLARE(name) \
- static inline int UTIL_CAT(name, _body)(void); \
- ARCH_ISR_DIAG_OFF \
- __attribute__ ((interrupt ("IRQ"))) void name(void) \
- { \
- int check_reschedule; \
- ISR_DIRECT_HEADER(); \
- check_reschedule = UTIL_CAT(name, _body)(); \
- ISR_DIRECT_FOOTER(check_reschedule); \
- } \
- ARCH_ISR_DIAG_ON \
+#define ARCH_ISR_DIRECT_DECLARE(name) \
+ static inline int UTIL_CAT(name, _body)(void); \
+ ARCH_ISR_DIAG_OFF \
+ __attribute__((interrupt("IRQ"))) void name(void) \
+ { \
+ int check_reschedule; \
+ ISR_DIRECT_HEADER(); \
+ check_reschedule = UTIL_CAT(name, _body)(); \
+ ISR_DIRECT_FOOTER(check_reschedule); \
+ } \
+ ARCH_ISR_DIAG_ON \
|
Loading