mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards/arduino-zero: add mapping for Arduino PWM pins
This commit is contained in:
parent
0845cac3b8
commit
f1cb14730d
@ -14,3 +14,4 @@ FEATURES_PROVIDED += periph_usbdev
|
|||||||
|
|
||||||
# Various other features (if any)
|
# Various other features (if any)
|
||||||
FEATURES_PROVIDED += arduino
|
FEATURES_PROVIDED += arduino
|
||||||
|
FEATURES_PROVIDED += arduino_pwm
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#define ARDUINO_BOARD_H
|
#define ARDUINO_BOARD_H
|
||||||
|
|
||||||
#include "arduino_pinmap.h"
|
#include "arduino_pinmap.h"
|
||||||
|
#include "periph/pwm.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -70,6 +71,21 @@ static const adc_t arduino_analog_map[] = {
|
|||||||
ARDUINO_A5,
|
ARDUINO_A5,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief PWM frequency
|
||||||
|
*/
|
||||||
|
#define ARDUINO_PWM_FREQU (732U)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief List of PWM GPIO mappings
|
||||||
|
*/
|
||||||
|
static const arduino_pwm_t arduino_pwm_list[] = {
|
||||||
|
{ .pin = 3, .dev = PWM_DEV(0), .chan = 1 },
|
||||||
|
{ .pin = 4, .dev = PWM_DEV(0), .chan = 0 },
|
||||||
|
{ .pin = 8, .dev = PWM_DEV(1), .chan = 0 },
|
||||||
|
{ .pin = 9, .dev = PWM_DEV(1), .chan = 1 },
|
||||||
|
};
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user