Skip to content

Commit b889024

Browse files
committed
boards/common/nucleo144: complete Arduino config for I2C, SPI and UART
1 parent 04a0aba commit b889024

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Various common features of Nucleo-144 boards
22
FEATURES_PROVIDED += arduino_analog
3+
FEATURES_PROVIDED += arduino_i2c
34
FEATURES_PROVIDED += arduino_pins
45
FEATURES_PROVIDED += arduino_shield_mega
56
FEATURES_PROVIDED += arduino_shield_uno
7+
FEATURES_PROVIDED += arduino_spi
8+
FEATURES_PROVIDED += arduino_uart

boards/common/nucleo144/include/arduino_iomap.h

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,38 @@
2525
extern "C" {
2626
#endif
2727

28+
/**
29+
* @name Arduino's UART devices
30+
* @{
31+
*/
32+
#define ARDUINO_UART_D0D1 UART_DEV(1)
33+
/** @} */
34+
35+
/**
36+
* @name Arduino's SPI buses
37+
* @{
38+
*/
39+
#if !defined(ARDUINO_SPI_D11D12D13) && defined(SPI_NUMOF)
40+
/**
41+
* @brief SPI_DEV(0) is connected to D11/D12/D13 for most Nucleo-144 boards
42+
*
43+
* This can be overwritten in `boards/nucleo-<foobar>/include/periph_conf.h` by
44+
* providing a custom `ARDUINO_SPI_D11D12D13`.
45+
*/
46+
# define ARDUINO_SPI_D11D12D13 SPI_DEV(0)
47+
#endif
48+
/** @} */
49+
50+
/**
51+
* @name Arduino's I2C buses
52+
* @{
53+
*/
54+
/**
55+
* @brief The first I2C bus is where shields for the Arduino UNO expect it
56+
*/
57+
#define ARDUINO_I2C_UNO I2C_DEV(0)
58+
/** @} */
59+
2860
/**
2961
* @name Mapping of MCU pins to Arduino pins
3062
* @{

0 commit comments

Comments
 (0)