diff --git a/boards/serpente/Makefile.dep b/boards/serpente/Makefile.dep index 311431223f..9a846d2395 100644 --- a/boards/serpente/Makefile.dep +++ b/boards/serpente/Makefile.dep @@ -3,7 +3,7 @@ ifneq (,$(filter mtd,$(USEMODULE))) endif ifneq (,$(filter saul_default,$(USEMODULE))) - USEMODULE += saul_gpio + USEMODULE += saul_pwm endif # setup the samd21 arduino bootloader related dependencies diff --git a/boards/serpente/include/gpio_params.h b/boards/serpente/include/gpio_params.h deleted file mode 100644 index 276e903018..0000000000 --- a/boards/serpente/include/gpio_params.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2020 Benjamin Valentin - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_serpente - * @{ - * - * @file - * @brief Board specific configuration of direct mapped GPIOs - * - * @author Benjamin Valentin - */ - -#ifndef GPIO_PARAMS_H -#define GPIO_PARAMS_H - -#include "board.h" -#include "saul/periph.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief GPIO pin configuration - */ -static const saul_gpio_params_t saul_gpio_params[] = -{ - { - .name = LED0_NAME, - .pin = LED0_PIN, - .mode = GPIO_OUT, - .flags = SAUL_GPIO_INVERTED, - }, - { - .name = LED1_NAME, - .pin = LED1_PIN, - .mode = GPIO_OUT, - .flags = SAUL_GPIO_INVERTED, - }, - { - .name = LED2_NAME, - .pin = LED2_PIN, - .mode = GPIO_OUT, - .flags = SAUL_GPIO_INVERTED, - }, -}; - -#ifdef __cplusplus -} -#endif - -#endif /* GPIO_PARAMS_H */ -/** @} */ diff --git a/boards/serpente/include/pwm_params.h b/boards/serpente/include/pwm_params.h new file mode 100644 index 0000000000..d2237849b1 --- /dev/null +++ b/boards/serpente/include/pwm_params.h @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2020 Marian Buschsieweke + * + * This file is subject to the terms and conditions of the GNU Lesser + * General Public License v2.1. See the file LICENSE in the top level + * directory for more details. + */ + +/** + * @ingroup boards_serpente + * @{ + * + * @file + * @brief Configuration of SAUL mapped PWM channels + * + * @author Marian Buschsieweke + */ + +#ifndef PWM_PARAMS_H +#define PWM_PARAMS_H + +#include "board.h" +#include "saul/periph.h" + +#ifdef __cplusplus +extern "C" { +#endif + +static const saul_pwm_rgb_params_t saul_pwm_rgb_params[] = +{ + { + .name = "LED", + .channels = { + { PWM_DEV(0), 3, SAUL_PWM_INVERTED }, + { PWM_DEV(0), 2, SAUL_PWM_INVERTED }, + { PWM_DEV(0), 4, SAUL_PWM_INVERTED } + } + } +}; + +#define SAUL_PWM_NO_DIMMER + +#ifdef __cplusplus +} +#endif + +#endif /* PWM_PARAMS_H */ +/** @} */