Skip to content

Commit

Permalink
boards/adafruit-metro-m4-express: Add I2C and UART Mapping
Browse files Browse the repository at this point in the history
The M4 Express does now have an I2C and an UART compatible with Arduino
Shields, so we can expose them.
  • Loading branch information
maribu committed Nov 21, 2024
1 parent feda1b9 commit f9c952d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
2 changes: 2 additions & 0 deletions boards/adafruit-metro-m4-express/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ FEATURES_PROVIDED += arduino_pins
FEATURES_PROVIDED += arduino_shield_isp
FEATURES_PROVIDED += arduino_shield_uno
FEATURES_PROVIDED += arduino_spi
FEATURES_PROVIDED += arduino_i2c
FEATURES_PROVIDED += arduino_uart
22 changes: 19 additions & 3 deletions boards/adafruit-metro-m4-express/include/arduino_iomap.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,25 @@ extern "C" {
* to a conflicting use of the same SERCOM. If it is available, it is the last
* SPI bus.
*/
#if !MODULE_PERIPH_UART
# define ARDUINO_SPI_D11D12D13 SPI_DEV(1)
#endif
#define ARDUINO_SPI_D11D12D13 SPI_DEV(1)
/** @} */

/**
* @name Arduino's UART devices
* @{
*/
#define ARDUINO_UART_D0D1 UART_DEV(0)
/** @} */

/**
* @name Arduino's I2C buses
* @{
*/
/**
* @brief The first I2C bus is where shields for the Arduino UNO/Mega expect
* it
*/
#define ARDUINO_I2C_UNO I2C_DEV(0)
/** @} */

#ifdef __cplusplus
Expand Down

0 comments on commit f9c952d

Please sign in to comment.