drivers: Cleans variable scopes for STM32 drivers
Fix the scope of some variables in various STM32 drivers including: - SDMMC - DMA - OSPI/QSPI Flash - Interrupt controller The variables are set static instead of global and const if appropriate. Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
This commit is contained in:
parent
9c3f190721
commit
aba432348b
6 changed files with 21 additions and 19 deletions
|
@ -49,25 +49,27 @@ LOG_MODULE_REGISTER(flash_stm32_qspi, CONFIG_FLASH_LOG_LEVEL);
|
|||
|
||||
#if DT_HAS_COMPAT_STATUS_OKAY(st_stm32_qspi_nor)
|
||||
|
||||
uint32_t table_m_size[] = {
|
||||
#if STM32_QSPI_USE_DMA
|
||||
static const uint32_t table_m_size[] = {
|
||||
LL_DMA_MDATAALIGN_BYTE,
|
||||
LL_DMA_MDATAALIGN_HALFWORD,
|
||||
LL_DMA_MDATAALIGN_WORD,
|
||||
};
|
||||
|
||||
uint32_t table_p_size[] = {
|
||||
static const uint32_t table_p_size[] = {
|
||||
LL_DMA_PDATAALIGN_BYTE,
|
||||
LL_DMA_PDATAALIGN_HALFWORD,
|
||||
LL_DMA_PDATAALIGN_WORD,
|
||||
};
|
||||
|
||||
/* Lookup table to set dma priority from the DTS */
|
||||
uint32_t table_priority[] = {
|
||||
static const uint32_t table_priority[] = {
|
||||
DMA_PRIORITY_LOW,
|
||||
DMA_PRIORITY_MEDIUM,
|
||||
DMA_PRIORITY_HIGH,
|
||||
DMA_PRIORITY_VERY_HIGH,
|
||||
};
|
||||
#endif /* STM32_QSPI_USE_DMA */
|
||||
|
||||
typedef void (*irq_config_func_t)(const struct device *dev);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue