mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards/sodaq-autonomo: add mapping for Arduino PWM pins
This commit is contained in:
parent
d03c982ddb
commit
e0f288421d
@ -2,4 +2,7 @@ CPU_MODEL = samd21j18a
|
||||
|
||||
FEATURES_PROVIDED += periph_pwm
|
||||
|
||||
# Various other features (if any)
|
||||
FEATURES_PROVIDED += arduino_pwm
|
||||
|
||||
include $(RIOTBOARD)/common/sodaq/Makefile.features
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
#include "periph/gpio.h"
|
||||
#include "periph/adc.h"
|
||||
#include "periph/pwm.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -145,6 +146,22 @@ static const adc_t arduino_analog_map[] = {
|
||||
ADC_LINE(14),
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief PWM frequency
|
||||
*/
|
||||
#define ARDUINO_PWM_FREQU (732U)
|
||||
|
||||
/**
|
||||
* @brief List of PWM GPIO mappings
|
||||
*/
|
||||
static const arduino_pwm_t arduino_pwm_list[] = {
|
||||
{ .pin = 20, .dev = PWM_DEV(0), .chan = 0 },
|
||||
{ .pin = 29, .dev = PWM_DEV(0), .chan = 1 },
|
||||
{ .pin = 11, .dev = PWM_DEV(1), .chan = 0 },
|
||||
{ .pin = 13, .dev = PWM_DEV(1), .chan = 1 },
|
||||
{ .pin = 14, .dev = PWM_DEV(1), .chan = 2 },
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user