-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Rename all `arduino_pinmap.h` to `arduino_iomap.h` - An empty `arduino_pinmap.h` that just includes `arduino_iomap.h` is provided for backward compatibility - Move all info from `arduino_board.h` into the new file as trivial macros, so that they can also be used outside of sketches - The new name reflects the fact not just pin mappings, but also other I/O features such as PWMs are mapped - Drop all `arduino_board.h` - `arduino_board.h` and `arduino_iomap.h` now provide the exact same information, just in a different format - a generic `arduino_board.h` is provided instead that just uses the info in `arduinio_iomap.h` and provides them in the format the code in `sys/arduino` expects it - Add fine grained features to indicate for mappings - availability of mappings for analog pins, DAC pins, PWM pins, UART devices, SPI/I2C buses to the corresponding RIOT identification can now be expressed: - `arduino_pins`: `ARDUINO_PIN_0` etc. are available - `arduino_analog`: `ARDUINO_A0` etc. are available - `arduino_pwm`: `ARDUINO_PIN_13_PWM_DEV` etc. are available - `arduino_dac`: `ARDUINO_DAC0` etc. are available - `arduino_uart`: `ARDUINO_UART_D0D1` or similar are available - `arduino_spi`: `ARDUINO_SPI_ISP` or similar are available - `arduino_i2c`: `ARDUINO_I2C_UNO` or similar are available - mechanical/electrical compatibility with specific form factors can now be expressed as features: - `aruino_shield_nano`: Arduino NANO compatible headers - `aruino_shield_uno`: Arduino UNO compatible headers - `aruino_shield_mega`: Arduino MEGA compatible headers - `aruino_shield_isp`: ISP header is available This provides the groundwork to implement shield support as modules that can rely on the I/O mappings, rather than having to provide a configuration per board.
- Loading branch information
Showing
191 changed files
with
4,477 additions
and
4,871 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 0 additions & 73 deletions
73
boards/adafruit-grand-central-m4-express/include/arduino_board.h
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,8 +16,8 @@ | |
* @author Gunar Schorcht <[email protected]> | ||
*/ | ||
|
||
#ifndef ARDUINO_PINMAP_H | ||
#define ARDUINO_PINMAP_H | ||
#ifndef ARDUINO_IOMAP_H | ||
#define ARDUINO_IOMAP_H | ||
|
||
#include "periph/gpio.h" | ||
#include "periph/adc.h" | ||
|
@@ -49,12 +49,25 @@ extern "C" { | |
#define ARDUINO_PIN_14 GPIO_PIN(PB, 20) | ||
#define ARDUINO_PIN_15 GPIO_PIN(PB, 21) | ||
|
||
#define ARDUINO_PIN_A0 GPIO_PIN(PA, 3) | ||
#define ARDUINO_PIN_A1 GPIO_PIN(PC, 0) | ||
#define ARDUINO_PIN_A2 GPIO_PIN(PC, 3) | ||
#define ARDUINO_PIN_A3 GPIO_PIN(PC, 1) | ||
#define ARDUINO_PIN_A4 GPIO_PIN(PC, 4) | ||
#define ARDUINO_PIN_A5 GPIO_PIN(PC, 5) | ||
#define ARDUINO_PIN_16 GPIO_PIN(PA, 3) | ||
#define ARDUINO_PIN_17 GPIO_PIN(PC, 0) | ||
#define ARDUINO_PIN_18 GPIO_PIN(PC, 3) | ||
#define ARDUINO_PIN_19 GPIO_PIN(PC, 1) | ||
#define ARDUINO_PIN_20 GPIO_PIN(PC, 4) | ||
#define ARDUINO_PIN_21 GPIO_PIN(PC, 5) | ||
|
||
#define ARDUINO_PIN_LAST 21 /** D21 (A5) is the last digital pin */ | ||
/** @} */ | ||
|
||
/** | ||
* @name Aliases for analog pins | ||
*/ | ||
#define ARDUINO_PIN_A0 ARDUINO_PIN_16 /**< Arduino pin A0 */ | ||
#define ARDUINO_PIN_A1 ARDUINO_PIN_17 /**< Arduino pin A1 */ | ||
#define ARDUINO_PIN_A2 ARDUINO_PIN_18 /**< Arduino pin A2 */ | ||
#define ARDUINO_PIN_A3 ARDUINO_PIN_19 /**< Arduino pin A3 */ | ||
#define ARDUINO_PIN_A4 ARDUINO_PIN_20 /**< Arduino pin A4 */ | ||
#define ARDUINO_PIN_A5 ARDUINO_PIN_21 /**< Arduino pin A5 */ | ||
/** @} */ | ||
|
||
/** | ||
|
@@ -67,11 +80,13 @@ extern "C" { | |
#define ARDUINO_A3 ADC_LINE(3) | ||
#define ARDUINO_A4 ADC_LINE(4) | ||
#define ARDUINO_A5 ADC_LINE(5) | ||
|
||
#define ARDUINO_ANALOG_PIN_LAST 5 /**< A5 is the last analog pin */ | ||
/** @} */ | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* ARDUINO_PINMAP_H */ | ||
#endif /* ARDUINO_IOMAP_H */ | ||
/** @} */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
CPU = atmega328p | ||
|
||
FEATURES_PROVIDED += arduino_shield_uno | ||
include $(RIOTBOARD)/common/arduino-atmega/Makefile.features |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
CPU = atmega32u4 | ||
|
||
FEATURES_PROVIDED += arduino_shield_uno | ||
include $(RIOTBOARD)/common/arduino-atmega/Makefile.features |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
CPU = atmega2560 | ||
|
||
FEATURES_PROVIDED += arduino_shield_mega | ||
FEATURES_PROVIDED += arduino_shield_uno | ||
|
||
include $(RIOTBOARD)/common/arduino-atmega/Makefile.features |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
CPU = atmega328p | ||
|
||
FEATURES_PROVIDED += arduino_shield_nano | ||
include $(RIOTBOARD)/common/arduino-atmega/Makefile.features |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
CPU = atmega328p | ||
|
||
FEATURES_PROVIDED += arduino_shield_uno | ||
include $(RIOTBOARD)/common/arduino-atmega/Makefile.features |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.