From abfa73193fa5c09d4af7dfda98977abec74dc987 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Mon, 21 Oct 2019 15:49:57 +0200 Subject: [PATCH] drivers/periph_pwm: define mapping struct for arduino pins --- drivers/include/periph/pwm.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/include/periph/pwm.h b/drivers/include/periph/pwm.h index dd82bed95c..8692f6b124 100644 --- a/drivers/include/periph/pwm.h +++ b/drivers/include/periph/pwm.h @@ -103,6 +103,17 @@ typedef enum { } pwm_mode_t; #endif +#ifdef MODULE_ARDUINO +/** + * @brief RIOT GPIO mapping between Arduino pin, PWM device and channel + */ +typedef struct { + int pin; /**< Arduino pin number */ + int dev; /**< PWM device index of pin */ + int chan; /**< PWM channel index */ +} arduino_pwm_t; +#endif + /** * @brief Initialize a PWM device *