mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-27 07:21:18 +01:00
boards/common/esp32x: add RMT configuration
This commit is contained in:
parent
d4d4bc4df1
commit
b2f9cdac23
@ -251,6 +251,40 @@ static const pwm_config_t pwm_config[] =
|
||||
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name RMT configuration
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief RMT channel configuration
|
||||
*
|
||||
* For the moment, the only RMT channel configuration used is for the WS2812
|
||||
* driver. To override this default configuration by a board definition, add
|
||||
* ```
|
||||
* #define HAVE_RMT_CHANNEL_CONFIG
|
||||
* ```
|
||||
* before including this file and define an according `rmt_channel_config`
|
||||
* after including this file.
|
||||
*/
|
||||
#ifndef HAVE_RMT_CHANNEL_CONFIG
|
||||
static const rmt_channel_config_t rmt_channel_config[] = {
|
||||
#ifdef WS281X_PARAM_PIN
|
||||
{ 0, WS281X_PARAM_PIN },
|
||||
#else
|
||||
/* default for boards that don't define WS281X_PARAM_PIN */
|
||||
{ 0, GPIO0 },
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Number of RMT channels
|
||||
*/
|
||||
#define RMT_CH_NUMOF ARRAY_SIZE(rmt_channel_config)
|
||||
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name SPI configuration
|
||||
* @{
|
||||
|
||||
@ -233,6 +233,40 @@ static const pwm_config_t pwm_config[] =
|
||||
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name RMT configuration
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief RMT channel configuration
|
||||
*
|
||||
* For the moment, the only RMT channel configuration used is for the WS2812
|
||||
* driver. To override this default configuration by a board definition, add
|
||||
* ```
|
||||
* #define HAVE_RMT_CHANNEL_CONFIG
|
||||
* ```
|
||||
* before including this file and define an according `rmt_channel_config`
|
||||
* after including this file.
|
||||
*/
|
||||
#ifndef HAVE_RMT_CHANNEL_CONFIG
|
||||
static const rmt_channel_config_t rmt_channel_config[] = {
|
||||
#ifdef WS281X_PARAM_PIN
|
||||
{ 0, WS281X_PARAM_PIN },
|
||||
#else
|
||||
/* default for boards that don't define WS281X_PARAM_PIN */
|
||||
{ 0, GPIO0 },
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Number of RMT channels
|
||||
*/
|
||||
#define RMT_CH_NUMOF ARRAY_SIZE(rmt_channel_config)
|
||||
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name SPI configuration
|
||||
* @{
|
||||
|
||||
@ -252,6 +252,40 @@ static const pwm_config_t pwm_config[] =
|
||||
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name RMT configuration
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief RMT channel configuration
|
||||
*
|
||||
* For the moment, the only RMT channel configuration used is for the WS2812
|
||||
* driver. To override this default configuration by a board definition, add
|
||||
* ```
|
||||
* #define HAVE_RMT_CHANNEL_CONFIG
|
||||
* ```
|
||||
* before including this file and define an according `rmt_channel_config`
|
||||
* after including this file.
|
||||
*/
|
||||
#ifndef HAVE_RMT_CHANNEL_CONFIG
|
||||
static const rmt_channel_config_t rmt_channel_config[] = {
|
||||
#ifdef WS281X_PARAM_PIN
|
||||
{ 0, WS281X_PARAM_PIN },
|
||||
#else
|
||||
/* default for boards that don't define WS281X_PARAM_PIN */
|
||||
{ 0, GPIO0 },
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Number of RMT channels
|
||||
*/
|
||||
#define RMT_CH_NUMOF ARRAY_SIZE(rmt_channel_config)
|
||||
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name SPI configuration
|
||||
* @{
|
||||
|
||||
@ -252,6 +252,40 @@ static const pwm_config_t pwm_config[] =
|
||||
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name RMT configuration
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief RMT channel configuration
|
||||
*
|
||||
* For the moment, the only RMT channel configuration used is for the WS2812
|
||||
* driver. To override this default configuration by a board definition, add
|
||||
* ```
|
||||
* #define HAVE_RMT_CHANNEL_CONFIG
|
||||
* ```
|
||||
* before including this file and define an according `rmt_channel_config`
|
||||
* after including this file.
|
||||
*/
|
||||
#ifndef HAVE_RMT_CHANNEL_CONFIG
|
||||
static const rmt_channel_config_t rmt_channel_config[] = {
|
||||
#ifdef WS281X_PARAM_PIN
|
||||
{ 0, WS281X_PARAM_PIN },
|
||||
#else
|
||||
/* default for boards that don't define WS281X_PARAM_PIN */
|
||||
{ 0, GPIO0 },
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Number of RMT channels
|
||||
*/
|
||||
#define RMT_CH_NUMOF ARRAY_SIZE(rmt_channel_config)
|
||||
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name SPI configuration
|
||||
* @{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user