1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

boards/esp32c3-devkit: enable RGB LED support

This commit is contained in:
Gunar Schorcht 2023-03-18 13:36:26 +01:00
parent c4400e8964
commit f7c7337efb
3 changed files with 10 additions and 6 deletions

View File

@ -62,8 +62,7 @@ see section \ref esp32_mcu_esp32 "ESP32 SoC Series".
### Board Configuration {#esp32c3_devkit_board_configuration} ### Board Configuration {#esp32c3_devkit_board_configuration}
ESP32-C3-DevKit boards have no special hardware on board with the exception ESP32-C3-DevKit boards have no special hardware on board with the exception
of a single pin RGB-LED that uses a special bit-oriented protocol to of a single pin RGB-LED.
control the RGB-LED by 24-bit RGB values which is not supported yet.
All GPIOs are simply broken out for flexibility. Therefore, the board All GPIOs are simply broken out for flexibility. Therefore, the board
configuration is the most flexible one which provides: configuration is the most flexible one which provides:
@ -108,6 +107,7 @@ ADC | GPIO0, GPIO1, GPIO2, GPIO3, GPIO4, GPIO5 | | see \ref esp32_ad
PWM_DEV(0) | GPIO3, GPIO4 | - | \ref esp32_pwm_channels "PWM Channels" PWM_DEV(0) | GPIO3, GPIO4 | - | \ref esp32_pwm_channels "PWM Channels"
I2C_DEV(0):SCL | GPIO4 | | \ref esp32_i2c_interfaces "I2C Interfaces" I2C_DEV(0):SCL | GPIO4 | | \ref esp32_i2c_interfaces "I2C Interfaces"
I2C_DEV(0):SDA | GPIO5 | | \ref esp32_i2c_interfaces "I2C Interfaces" I2C_DEV(0):SDA | GPIO5 | | \ref esp32_i2c_interfaces "I2C Interfaces"
RGB-LED | GPIO8 | supported by driver module `ws281x` | |
SPI_DEV(0):CLK | GPIO6 | SPI2_HOST (FSPI) is used | \ref esp32_spi_interfaces "SPI Interfaces" SPI_DEV(0):CLK | GPIO6 | SPI2_HOST (FSPI) is used | \ref esp32_spi_interfaces "SPI Interfaces"
SPI_DEV(0):MISO | GPIO2 | SPI2_HOST (FSPI) is used | \ref esp32_spi_interfaces "SPI Interfaces" SPI_DEV(0):MISO | GPIO2 | SPI2_HOST (FSPI) is used | \ref esp32_spi_interfaces "SPI Interfaces"
SPI_DEV(0):MOSI | GPIO7 | SPI2_HOST (FSPI) is used | \ref esp32_spi_interfaces "SPI Interfaces" SPI_DEV(0):MOSI | GPIO7 | SPI2_HOST (FSPI) is used | \ref esp32_spi_interfaces "SPI Interfaces"

View File

@ -73,11 +73,15 @@
* @name LED (on-board) configuration * @name LED (on-board) configuration
* *
* ESP32-C3-DevKit boards have a SK68XXMINI-HS smart RGB-LED connected to * ESP32-C3-DevKit boards have a SK68XXMINI-HS smart RGB-LED connected to
* GPIO8 on-board. This RGB-LEDs uses a special bit-oriented protocol to * GPIO8 on-board. The WS281x driver module `ws281x` can be used to control it.
* control the RGB-LED by 24-bit RGB values. Therefore, it can't be used as
* default LED definition for RIOT.
* @{ * @{
*/ */
#ifndef WS281X_PARAM_PIN
#define WS281X_PARAM_PIN (GPIO8) /**< GPIO pin connected to the data pin */
#endif
#ifndef WS281X_PARAM_NUMOF
#define WS281X_PARAM_NUMOF (1U) /**< Number of LEDs chained */
#endif
/** @} */ /** @} */
/* include common board definitions as last step */ /* include common board definitions as last step */

View File

@ -69,7 +69,7 @@ extern "C" {
* *
* @note As long as the GPIOs listed in DAC_GPIOS are not initialized as DAC * @note As long as the GPIOs listed in DAC_GPIOS are not initialized as DAC
* channels with the `dac_init` function, they can be used for other * channels with the `dac_init` function, they can be used for other
* purposes. * purposes. GPIO18 is also used for the RGB-LED.
*/ */
#ifndef DAC_GPIOS #ifndef DAC_GPIOS
#define DAC_GPIOS { GPIO17, GPIO18 } #define DAC_GPIOS { GPIO17, GPIO18 }