arduino_board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Freie Universität Berlin
3  * 2016-2017 Inria
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser
6  * General Public License v2.1. See the file LICENSE in the top level
7  * directory for more details.
8  */
9 
21 #ifndef ARDUINO_BOARD_H
22 #define ARDUINO_BOARD_H
23 
24 #include "arduino_pinmap.h"
25 #include "periph/pwm.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
34 static const gpio_t arduino_pinmap[] = {
35  ARDUINO_PIN_0,
36  ARDUINO_PIN_1,
37  ARDUINO_PIN_2,
38  ARDUINO_PIN_3,
39  ARDUINO_PIN_4,
40  ARDUINO_PIN_5,
41  ARDUINO_PIN_6,
42  ARDUINO_PIN_7,
43  ARDUINO_PIN_8,
44  ARDUINO_PIN_9,
45  ARDUINO_PIN_10,
46  ARDUINO_PIN_11,
47  ARDUINO_PIN_12,
48  ARDUINO_PIN_13,
49  ARDUINO_PIN_14,
50  ARDUINO_PIN_A0,
51  ARDUINO_PIN_A1,
52  ARDUINO_PIN_A2,
53  ARDUINO_PIN_A3,
54  ARDUINO_PIN_A4,
55  ARDUINO_PIN_A5,
56  ARDUINO_PIN_A6,
57 };
58 
62 static const adc_t arduino_analog_map[] = {
63  ARDUINO_A0,
64  ARDUINO_A1,
65  ARDUINO_A2,
66  ARDUINO_A3,
67  ARDUINO_A4,
68  ARDUINO_A5,
69  ARDUINO_A6,
70 };
71 
75 #define ARDUINO_PWM_FREQU (732U)
76 
80 static const arduino_pwm_t arduino_pwm_list[] = {
81  { .pin = 2, .dev = PWM_DEV(0), .chan = 0 },
82  { .pin = 3, .dev = PWM_DEV(0), .chan = 1 },
83 };
84 
85 #ifdef __cplusplus
86 }
87 #endif
88 
89 #endif /* ARDUINO_BOARD_H */
90 
adc_t
unsigned int adc_t
Define default ADC type identifier.
Definition: adc.h:72
arduino_analog_map
static const adc_t arduino_analog_map[]
Look-up table for the Arduino's analog pins.
Definition: arduino_board.h:62
arduino_pwm_list
static const arduino_pwm_t arduino_pwm_list[]
List of PWM GPIO mappings.
Definition: arduino_board.h:80
PWM_DEV
#define PWM_DEV(x)
Default PWM access macro.
Definition: pwm.h:78
arduino_pinmap
static const gpio_t arduino_pinmap[]
Look-up table for the Arduino's digital pins.
Definition: arduino_board.h:34
arduino_pinmap.h
Mapping from MCU pins to Arduino pins.
pwm.h
Low-level PWM peripheral driver interface definitions.