Skip to content

Instantly share code, notes, and snippets.

@tridge
Created September 19, 2021 07:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tridge/df7d06f5c4264d8921975cff8a8ad530 to your computer and use it in GitHub Desktop.
Save tridge/df7d06f5c4264d8921975cff8a8ad530 to your computer and use it in GitHub Desktop.
#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(2, 0)
#define STM32_ADC_ADC1_DMA_CHAN 0
#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) // shared I2C1_RX,UART8_TX
#define STM32_I2C_I2C1_RX_DMA_CHAN 1
#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) // shared I2C1_TX,USART2_TX,TIM4_UP
#define STM32_I2C_I2C1_TX_DMA_CHAN 1
#define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) // shared SPI2_RX,I2C2_RX
#define STM32_I2C_I2C2_RX_DMA_CHAN 7
#define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
#define STM32_I2C_I2C2_TX_DMA_CHAN 7
#define STM32_SDC_SDIO_DMA_STREAM STM32_DMA_STREAM_ID(2, 6)
#define STM32_SDC_SDIO_DMA_CHAN 4
#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2)
#define STM32_SPI_SPI1_RX_DMA_CHAN 3
#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) // shared SPI1_TX,TIM1_UP
#define STM32_SPI_SPI1_TX_DMA_CHAN 3
#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) // shared SPI2_RX,I2C2_RX
#define STM32_SPI_SPI2_RX_DMA_CHAN 0
#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) // shared SPI2_TX,UART4_TX,USART3_TX
#define STM32_SPI_SPI2_TX_DMA_CHAN 0
#define STM32_SPI_SPI4_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3)
#define STM32_SPI_SPI4_RX_DMA_CHAN 5
#define STM32_SPI_SPI4_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 4)
#define STM32_SPI_SPI4_TX_DMA_CHAN 5
#define STM32_TIM_TIM1_UP_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) // shared SPI1_TX,TIM1_UP
#define STM32_TIM_TIM1_UP_DMA_CHAN 6
#define STM32_TIM_TIM4_UP_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) // shared I2C1_TX,USART2_TX,TIM4_UP
#define STM32_TIM_TIM4_UP_DMA_CHAN 2
#define STM32_UART_UART4_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2)
#define STM32_UART_UART4_RX_DMA_CHAN 4
#define STM32_UART_UART4_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) // shared SPI2_TX,UART4_TX,USART3_TX
#define STM32_UART_UART4_TX_DMA_CHAN 4
#define STM32_UART_UART8_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) // shared I2C1_RX,UART8_TX
#define STM32_UART_UART8_TX_DMA_CHAN 5
#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
#define STM32_UART_USART2_RX_DMA_CHAN 4
#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) // shared I2C1_TX,USART2_TX,TIM4_UP
#define STM32_UART_USART2_TX_DMA_CHAN 4
#define STM32_UART_USART3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 1)
#define STM32_UART_USART3_RX_DMA_CHAN 4
#define STM32_UART_USART3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) // shared SPI2_TX,UART4_TX,USART3_TX
#define STM32_UART_USART3_TX_DMA_CHAN 7
#define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 1)
#define STM32_UART_USART6_RX_DMA_CHAN 5
#define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7)
#define STM32_UART_USART6_TX_DMA_CHAN 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment