mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards/esp32s2-devkit: enable RGB LED support
This commit is contained in:
parent
f7c7337efb
commit
2ff7ae5de7
@ -102,8 +102,7 @@ see section \ref esp32_mcu_esp32 "ESP32 SoC Series".
|
|||||||
### Board Configuration {#esp32s2_devkit_board_configuration}
|
### Board Configuration {#esp32s2_devkit_board_configuration}
|
||||||
|
|
||||||
ESP32-S2-DevKit boards have no special hardware on board with the exception
|
ESP32-S2-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:
|
||||||
@ -150,11 +149,12 @@ Function | GPIOs | Remarks | Configuration
|
|||||||
:---------------|:-------|:--------|:----------------------------------
|
:---------------|:-------|:--------|:----------------------------------
|
||||||
BUTTON0 | GPIO0 | | |
|
BUTTON0 | GPIO0 | | |
|
||||||
ADC_LINE(n) | GPIO1 ... GPIO10 | | \ref esp32_adc_channels "ADC Channels"
|
ADC_LINE(n) | GPIO1 ... GPIO10 | | \ref esp32_adc_channels "ADC Channels"
|
||||||
DAC_LINE(n) | GPIO17, GPIO18 | | \ref esp32_dac_channels "DAC Channels"
|
DAC_LINE(n) | GPIO17, GPIO18 | GPIO18 is connected to RGB-LED | \ref esp32_dac_channels "DAC Channels"
|
||||||
I2C_DEV(0) SCL | GPIO9 | | \ref esp32_i2c_interfaces "I2C Interfaces"
|
I2C_DEV(0) SCL | GPIO9 | | \ref esp32_i2c_interfaces "I2C Interfaces"
|
||||||
I2C_DEV(0) SDA | GPIO8 | | \ref esp32_i2c_interfaces "I2C Interfaces"
|
I2C_DEV(0) SDA | GPIO8 | | \ref esp32_i2c_interfaces "I2C Interfaces"
|
||||||
PWM_DEV(0) | GPIO11, GPIO12, GPIO13, GPIO14 | - | \ref esp32_pwm_channels "PWM Channels"
|
PWM_DEV(0) | GPIO11, GPIO12, GPIO13, GPIO14 | - | \ref esp32_pwm_channels "PWM Channels"
|
||||||
PWM_DEV(1) | GPIO15, GPIO16 | if module `esp_rtc_timer_32k` is not used | \ref esp32_pwm_channels "PWM Channels"
|
PWM_DEV(1) | GPIO15, GPIO16 | if module `esp_rtc_timer_32k` is not used | \ref esp32_pwm_channels "PWM Channels"
|
||||||
|
RGB-LED | GPIO18 | supported by driver module `ws281x` | |
|
||||||
SPI_DEV(0) CLK | GPIO12 | SPI2_HOST (FSPI) is used | \ref esp32_spi_interfaces "SPI Interfaces"
|
SPI_DEV(0) CLK | GPIO12 | SPI2_HOST (FSPI) is used | \ref esp32_spi_interfaces "SPI Interfaces"
|
||||||
SPI_DEV(0) MISO | GPIO13 | SPI2_HOST (FSPI) is used | \ref esp32_spi_interfaces "SPI Interfaces"
|
SPI_DEV(0) MISO | GPIO13 | SPI2_HOST (FSPI) is used | \ref esp32_spi_interfaces "SPI Interfaces"
|
||||||
SPI_DEV(0) MOSI | GPIO11 | SPI2_HOST (FSPI) is used | \ref esp32_spi_interfaces "SPI Interfaces"
|
SPI_DEV(0) MOSI | GPIO11 | SPI2_HOST (FSPI) is used | \ref esp32_spi_interfaces "SPI Interfaces"
|
||||||
|
@ -75,11 +75,19 @@
|
|||||||
* @name LED (on-board) configuration
|
* @name LED (on-board) configuration
|
||||||
*
|
*
|
||||||
* ESP32-S2-DevKit boards have a SK68XXMINI-HS smart RGB-LED connected to
|
* ESP32-S2-DevKit boards have a SK68XXMINI-HS smart RGB-LED connected to
|
||||||
* GPIO18 on-board. This RGB-LEDs uses a special bit-oriented protocol to
|
* GPIO18 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.
|
* @note GPIO18 is also be defined as DAC channel. The RGB-LED can be
|
||||||
|
* used as long as GPIO18 is not initialized as DAC channel with the
|
||||||
|
* function `dac_init`.
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
#ifndef WS281X_PARAM_PIN
|
||||||
|
#define WS281X_PARAM_PIN (GPIO18) /**< 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 */
|
||||||
|
Loading…
Reference in New Issue
Block a user