Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
nvic.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020, Linaro Ltd.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_ARCH_ARM_AARCH32_CORTEX_M_NVIC_H_
8#define ZEPHYR_INCLUDE_ARCH_ARM_AARCH32_CORTEX_M_NVIC_H_
9
10#if defined(CONFIG_ARMV8_1_M_MAINLINE)
11/* The order here is on purpose since ARMv8.1-M SoCs may define
12 * CONFIG_ARMV6_M_ARMV8_M_BASELINE, CONFIG_ARMV7_M_ARMV8_M_MAINLINE or
13 * CONFIG_ARMV8_M_MAINLINE so we want to check for ARMv8.1-M first.
14 */
15#define NVIC_NODEID DT_INST(0, arm_v8_1m_nvic)
16#elif defined(CONFIG_ARMV8_M_BASELINE) || defined(CONFIG_ARMV8_M_MAINLINE)
17#define NVIC_NODEID DT_INST(0, arm_v8m_nvic)
18#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE)
19#define NVIC_NODEID DT_INST(0, arm_v7m_nvic)
20#elif defined(CONFIG_ARMV6_M_ARMV8_M_BASELINE)
21#define NVIC_NODEID DT_INST(0, arm_v6m_nvic)
22#endif
23
24#define NUM_IRQ_PRIO_BITS DT_PROP(NVIC_NODEID, arm_num_irq_priority_bits)
25
26#endif /* ZEPHYR_INCLUDE_ARCH_ARM_AARCH32_CORTEX_M_NVIC_H_ */