mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-17 13:12:08 +00:00
Fixed lint issues.
This commit is contained in:
parent
2cee261355
commit
1fd04ca78a
@ -311,11 +311,11 @@ bool spi_start_extended(spi_start_config_t *start_config) {
|
|||||||
switch (roundedDivisor) {
|
switch (roundedDivisor) {
|
||||||
case 2:
|
case 2:
|
||||||
break;
|
break;
|
||||||
#if defined(AT32F402_405)
|
# if defined(AT32F402_405)
|
||||||
case 3:
|
case 3:
|
||||||
spiConfig.ctrl2 |= SPI_CTRL2_MDIV3EN;
|
spiConfig.ctrl2 |= SPI_CTRL2_MDIV3EN;
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
case 4:
|
case 4:
|
||||||
spiConfig.ctrl1 |= SPI_CTRL1_MDIV_0;
|
spiConfig.ctrl1 |= SPI_CTRL1_MDIV_0;
|
||||||
break;
|
break;
|
||||||
|
@ -41,13 +41,13 @@
|
|||||||
# error "please consult your MCU's datasheet and specify in your config.h: #define WS2812_PWM_DMAMUX_ID STM32_DMAMUX1_TIM?_UP"
|
# error "please consult your MCU's datasheet and specify in your config.h: #define WS2812_PWM_DMAMUX_ID STM32_DMAMUX1_TIM?_UP"
|
||||||
#endif
|
#endif
|
||||||
#if defined(AT32F415)
|
#if defined(AT32F415)
|
||||||
#if (AT32_DMA_SUPPORTS_DMAMUX == TRUE) && !defined(WS2812_PWM_DMAMUX_CHANNEL) && !defined(WS2812_PWM_DMAMUX_ID)
|
# if (AT32_DMA_SUPPORTS_DMAMUX == TRUE) && !defined(WS2812_PWM_DMAMUX_CHANNEL) && !defined(WS2812_PWM_DMAMUX_ID)
|
||||||
# error "please consult your MCU's datasheet and specify in your config.h: #define WS2812_PWM_DMAMUX_CHANNEL 1, #define WS2812_PWM_DMAMUX_ID AT32_DMAMUX_TMR?_OVERFLOW"
|
# error "please consult your MCU's datasheet and specify in your config.h: #define WS2812_PWM_DMAMUX_CHANNEL 1, #define WS2812_PWM_DMAMUX_ID AT32_DMAMUX_TMR?_OVERFLOW"
|
||||||
#endif
|
# endif
|
||||||
#else
|
#else
|
||||||
#if (AT32_DMA_SUPPORTS_DMAMUX == TRUE) && !defined(WS2812_PWM_DMAMUX_ID)
|
# if (AT32_DMA_SUPPORTS_DMAMUX == TRUE) && !defined(WS2812_PWM_DMAMUX_ID)
|
||||||
# error "please consult your MCU's datasheet and specify in your config.h: #define WS2812_PWM_DMAMUX_ID AT32_DMAMUX_TMR?_OVERFLOW"
|
# error "please consult your MCU's datasheet and specify in your config.h: #define WS2812_PWM_DMAMUX_ID AT32_DMAMUX_TMR?_OVERFLOW"
|
||||||
#endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Summarize https://www.st.com/resource/en/application_note/an4013-stm32-crossseries-timer-overview-stmicroelectronics.pdf to
|
/* Summarize https://www.st.com/resource/en/application_note/an4013-stm32-crossseries-timer-overview-stmicroelectronics.pdf to
|
||||||
@ -363,15 +363,15 @@ void ws2812_init(void) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(AT32F415)
|
#if defined(AT32F415)
|
||||||
#if (AT32_DMA_SUPPORTS_DMAMUX == TRUE)
|
# if (AT32_DMA_SUPPORTS_DMAMUX == TRUE)
|
||||||
// If the MCU has a DMAMUX we need to assign the correct resource
|
// If the MCU has a DMAMUX we need to assign the correct resource
|
||||||
dmaSetRequestSource(WS2812_PWM_DMA_STREAM, WS2812_PWM_DMAMUX_CHANNEL, WS2812_PWM_DMAMUX_ID);
|
dmaSetRequestSource(WS2812_PWM_DMA_STREAM, WS2812_PWM_DMAMUX_CHANNEL, WS2812_PWM_DMAMUX_ID);
|
||||||
#endif
|
# endif
|
||||||
#else
|
#else
|
||||||
#if (AT32_DMA_SUPPORTS_DMAMUX == TRUE)
|
# if (AT32_DMA_SUPPORTS_DMAMUX == TRUE)
|
||||||
// If the MCU has a DMAMUX we need to assign the correct resource
|
// If the MCU has a DMAMUX we need to assign the correct resource
|
||||||
dmaSetRequestSource(WS2812_PWM_DMA_STREAM, WS2812_PWM_DMAMUX_ID);
|
dmaSetRequestSource(WS2812_PWM_DMA_STREAM, WS2812_PWM_DMAMUX_ID);
|
||||||
#endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Start DMA
|
// Start DMA
|
||||||
|
@ -43,10 +43,10 @@
|
|||||||
#if defined(AT32F402_405) || defined(AT32F415)
|
#if defined(AT32F402_405) || defined(AT32F415)
|
||||||
# if WS2812_SPI_DIVISOR == 2
|
# if WS2812_SPI_DIVISOR == 2
|
||||||
# define WS2812_SPI_DIVISOR_CTRL1_MDIV_X (0)
|
# define WS2812_SPI_DIVISOR_CTRL1_MDIV_X (0)
|
||||||
#if defined(AT32F402_405)
|
# if defined(AT32F402_405)
|
||||||
# elif WS2812_SPI_DIVISOR == 3
|
# elif WS2812_SPI_DIVISOR == 3
|
||||||
# define WS2812_SPI_DIVISOR_CTRL2_MDIV_X (SPI_CTRL2_MDIV3EN)
|
# define WS2812_SPI_DIVISOR_CTRL2_MDIV_X (SPI_CTRL2_MDIV3EN)
|
||||||
#endif
|
# endif
|
||||||
# elif WS2812_SPI_DIVISOR == 4
|
# elif WS2812_SPI_DIVISOR == 4
|
||||||
# define WS2812_SPI_DIVISOR_CTRL1_MDIV_X (SPI_CTRL1_MDIV_0)
|
# define WS2812_SPI_DIVISOR_CTRL1_MDIV_X (SPI_CTRL1_MDIV_0)
|
||||||
# elif WS2812_SPI_DIVISOR == 8
|
# elif WS2812_SPI_DIVISOR == 8
|
||||||
|
Loading…
Reference in New Issue
Block a user