1
0
Fork 0

ChibiOS 21.11.1 update. (#16251)

* ChibiOS 21.11.1 update.

* `uf2-tinyuf2` => `tinyuf2`

* Updated chibios-contrib, fixup preprocessor for tinyuf2 bootloader.

* Fixup keychron L433 boards.

* Makefile cleanup.

* RISC-V build fixes.

* Fixup RISC-V build.
This commit is contained in:
Nick Brassel 2022-03-07 21:04:22 +11:00 committed by GitHub
parent 5de515526d
commit 44f1bd9b3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 681 additions and 243 deletions

View file

@ -139,7 +139,33 @@ void ws2812_init(void) {
#endif // WS2812_SPI_SCK_PIN
// TODO: more dynamic baudrate
static const SPIConfig spicfg = {WS2812_SPI_BUFFER_MODE, NULL, PAL_PORT(RGB_DI_PIN), PAL_PAD(RGB_DI_PIN), WS2812_SPI_DIVISOR_CR1_BR_X};
static const SPIConfig spicfg = {
#ifndef HAL_LLD_SELECT_SPI_V2
// HAL_SPI_V1
# if SPI_SUPPORTS_CIRCULAR == TRUE
WS2812_SPI_BUFFER_MODE,
# endif
NULL, // end_cb
PAL_PORT(RGB_DI_PIN),
PAL_PAD(RGB_DI_PIN),
WS2812_SPI_DIVISOR_CR1_BR_X,
0
#else
// HAL_SPI_V2
# if SPI_SUPPORTS_CIRCULAR == TRUE
WS2812_SPI_BUFFER_MODE,
# endif
# if SPI_SUPPORTS_SLAVE_MODE == TRUE
false,
# endif
NULL, // data_cb
NULL, // error_cb
PAL_PORT(RGB_DI_PIN),
PAL_PAD(RGB_DI_PIN),
WS2812_SPI_DIVISOR_CR1_BR_X,
0
#endif
};
spiAcquireBus(&WS2812_SPI); /* Acquire ownership of the bus. */
spiStart(&WS2812_SPI, &spicfg); /* Setup transfer parameters. */