drivers: dma: stm32: convert global conversion tables to functions
Convert global conversion tables for id-to-stream and slot-to-channel to functions that use local const static conversion tables. Signed-off-by: Erwin Rol <erwin@erwinrol.com>
This commit is contained in:
parent
67f68e68f1
commit
b05dc440e0
4 changed files with 84 additions and 61 deletions
|
@ -44,7 +44,11 @@ struct dma_stm32_config {
|
|||
#define STREAM_OFFSET 1
|
||||
#endif /* CONFIG_DMA_STM32_V1 */
|
||||
|
||||
extern uint32_t table_ll_stream[];
|
||||
uint32_t dma_stm32_id_to_stream(uint32_t id);
|
||||
#ifdef CONFIG_DMA_STM32_V1
|
||||
uint32_t dma_stm32_slot_to_channel(uint32_t id);
|
||||
#endif
|
||||
|
||||
extern uint32_t (*func_ll_is_active_tc[])(DMA_TypeDef *DMAx);
|
||||
extern void (*func_ll_clear_tc[])(DMA_TypeDef *DMAx);
|
||||
extern uint32_t (*func_ll_is_active_ht[])(DMA_TypeDef *DMAx);
|
||||
|
@ -53,9 +57,6 @@ extern void (*func_ll_clear_ht[])(DMA_TypeDef *DMAx);
|
|||
extern uint32_t (*func_ll_is_active_gi[])(DMA_TypeDef *DMAx);
|
||||
extern void (*func_ll_clear_gi[])(DMA_TypeDef *DMAx);
|
||||
#endif
|
||||
#ifdef CONFIG_DMA_STM32_V1
|
||||
extern uint32_t table_ll_channel[];
|
||||
#endif
|
||||
|
||||
bool stm32_dma_is_irq_active(DMA_TypeDef *dma, uint32_t id);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue