Skip to content
Permalink
Browse files

drivers: interupt_controller: stm32 Move exti_irq_table to const

Save few RAM bytes by declaring exti_irq_table as const.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
  • Loading branch information...
erwango authored and nashif committed Jun 11, 2019
1 parent 959c2d5 commit a32de02147dfa5871f638f69e6537e1aacccb94a
Showing with 6 additions and 6 deletions.
  1. +6 −6 drivers/interrupt_controller/exti_stm32.c
@@ -23,7 +23,7 @@

#if defined(CONFIG_SOC_SERIES_STM32F0X) || \
defined(CONFIG_SOC_SERIES_STM32L0X)
IRQn_Type exti_irq_table[] = {
const IRQn_Type exti_irq_table[] = {
EXTI0_1_IRQn, EXTI0_1_IRQn, EXTI2_3_IRQn, EXTI2_3_IRQn,
EXTI4_15_IRQn, EXTI4_15_IRQn, EXTI4_15_IRQn, EXTI4_15_IRQn,
EXTI4_15_IRQn, EXTI4_15_IRQn, EXTI4_15_IRQn, EXTI4_15_IRQn,
@@ -33,22 +33,22 @@ IRQn_Type exti_irq_table[] = {
defined(CONFIG_SOC_SERIES_STM32L1X) || \
defined(CONFIG_SOC_SERIES_STM32L4X) || \
defined(CONFIG_SOC_SERIES_STM32WBX)
IRQn_Type exti_irq_table[] = {
const IRQn_Type exti_irq_table[] = {
EXTI0_IRQn, EXTI1_IRQn, EXTI2_IRQn, EXTI3_IRQn,
EXTI4_IRQn, EXTI9_5_IRQn, EXTI9_5_IRQn, EXTI9_5_IRQn,
EXTI9_5_IRQn, EXTI9_5_IRQn, EXTI15_10_IRQn, EXTI15_10_IRQn,
EXTI15_10_IRQn, EXTI15_10_IRQn, EXTI15_10_IRQn, EXTI15_10_IRQn
};
#elif defined(CONFIG_SOC_SERIES_STM32F3X)
IRQn_Type exti_irq_table[] = {
const IRQn_Type exti_irq_table[] = {
EXTI0_IRQn, EXTI1_IRQn, EXTI2_TSC_IRQn, EXTI3_IRQn,
EXTI4_IRQn, EXTI9_5_IRQn, EXTI9_5_IRQn, EXTI9_5_IRQn,
EXTI9_5_IRQn, EXTI9_5_IRQn, EXTI15_10_IRQn, EXTI15_10_IRQn,
EXTI15_10_IRQn, EXTI15_10_IRQn, EXTI15_10_IRQn, EXTI15_10_IRQn
};
#elif defined(CONFIG_SOC_SERIES_STM32F2X) || \
defined(CONFIG_SOC_SERIES_STM32F4X)
IRQn_Type exti_irq_table[] = {
const IRQn_Type exti_irq_table[] = {
EXTI0_IRQn, EXTI1_IRQn, EXTI2_IRQn, EXTI3_IRQn,
EXTI4_IRQn, EXTI9_5_IRQn, EXTI9_5_IRQn, EXTI9_5_IRQn,
EXTI9_5_IRQn, EXTI9_5_IRQn, EXTI15_10_IRQn, EXTI15_10_IRQn,
@@ -57,7 +57,7 @@ IRQn_Type exti_irq_table[] = {
0xFF, TAMP_STAMP_IRQn, RTC_WKUP_IRQn
};
#elif defined(CONFIG_SOC_SERIES_STM32F7X)
IRQn_Type exti_irq_table[] = {
const IRQn_Type exti_irq_table[] = {
EXTI0_IRQn, EXTI1_IRQn, EXTI2_IRQn, EXTI3_IRQn,
EXTI4_IRQn, EXTI9_5_IRQn, EXTI9_5_IRQn, EXTI9_5_IRQn,
EXTI9_5_IRQn, EXTI9_5_IRQn, EXTI15_10_IRQn, EXTI15_10_IRQn,
@@ -66,7 +66,7 @@ IRQn_Type exti_irq_table[] = {
0xFF, TAMP_STAMP_IRQn, RTC_WKUP_IRQn, LPTIM1_IRQn
};
#elif defined(CONFIG_SOC_SERIES_STM32MP1X)
IRQn_Type exti_irq_table[] = {
const IRQn_Type exti_irq_table[] = {
EXTI0_IRQn, EXTI1_IRQn, EXTI2_IRQn, EXTI3_IRQn,
EXTI4_IRQn, EXTI5_IRQn, EXTI6_IRQn, EXTI7_IRQn,
EXTI8_IRQn, EXTI9_IRQn, EXTI10_IRQn, EXTI11_IRQn,

0 comments on commit a32de02

Please sign in to comment.
You can’t perform that action at this time.