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

boards/rpi-pico: create PWM configuration

Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
This commit is contained in:
Dylan Laduranty 2024-03-18 21:05:12 +01:00
parent ba8b3dc2b4
commit 7a6cfd9bb0
2 changed files with 18 additions and 0 deletions

View File

@ -4,5 +4,6 @@ CPU := rpx0xx
FEATURES_PROVIDED += periph_adc
FEATURES_PROVIDED += periph_i2c
FEATURES_PROVIDED += periph_spi
FEATURES_PROVIDED += periph_pwm
FEATURES_PROVIDED += periph_timer
FEATURES_PROVIDED += periph_uart

View File

@ -176,6 +176,23 @@ static const pio_i2c_conf_t pio_i2c_config[] = {
#endif
/** @} */
/**
* @name PWM configuration
* @{
*/
static const pwm_conf_t pwm_config[] = {
{
.pwm_slice = 4,
.chan = {
{ .pin = GPIO_PIN(0, 25), .cc_chan = 1 }, /* rpi-pico onboard LED */
{ .pin = GPIO_UNDEF, .cc_chan = 0 },
},
},
};
#define PWM_NUMOF ARRAY_SIZE(pwm_config)
/** @} */
#ifdef __cplusplus
}
#endif