Skip to content

Commit

Permalink
Merge pull request RIOT-OS#20086 from maribu/boards/p-nucleo-wb55
Browse files Browse the repository at this point in the history
boards/p-nucleo-wb55: provide Arduino features
  • Loading branch information
maribu authored Nov 15, 2023
2 parents b16c85c + 7446cf5 commit 2e80e91
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 2 deletions.
7 changes: 5 additions & 2 deletions boards/common/nucleo64/include/arduino_iomap.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,13 @@ extern "C" {
* @name Arduino's SPI buses
* @{
*/
#if !defined(ARDUINO_SPI_D11D12D13) && defined(SPI_NUMOF)
/**
* @brief SPI_DEV(1) is connected to D11/D12/D13
* @brief SPI_DEV(0) is connected to D11/D12/D13 for most Nucleo-64 boards
*
* This can be overwritten in `boards/nucleo-<foobar>/include/periph_conf.h` by
* providing a custom `ARDUINO_SPI_D11D12D13`.
*/
#if !defined(ARDUINO_SPI_D11D12D13) && defined(SPI_NUMOF)
#define ARDUINO_SPI_D11D12D13 SPI_DEV(0)
#endif
/** @} */
Expand Down
3 changes: 3 additions & 0 deletions boards/p-nucleo-wb55/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ config BOARD_P_NUCLEO_WB55

# Put other features for this board (in alphabetical order)
select HAS_ARDUINO_ANALOG
select HAS_ARDUINO_I2C
select HAS_ARDUINO_PINS
select HAS_ARDUINO_SHIELD_UNO
select HAS_ARDUINO_SPI
select HAS_ARDUINO_UART
select HAS_RIOTBOOT
select HAS_TINYUSB_DEVICE

Expand Down
3 changes: 3 additions & 0 deletions boards/p-nucleo-wb55/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ FEATURES_PROVIDED += periph_usbdev

# Put other features for this board (in alphabetical order)
FEATURES_PROVIDED += arduino_analog
FEATURES_PROVIDED += arduino_i2c
FEATURES_PROVIDED += arduino_pins
FEATURES_PROVIDED += arduino_shield_uno
FEATURES_PROVIDED += arduino_spi
FEATURES_PROVIDED += arduino_uart
FEATURES_PROVIDED += riotboot
FEATURES_PROVIDED += tinyusb_device
27 changes: 27 additions & 0 deletions boards/p-nucleo-wb55/include/arduino_iomap.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,33 @@ extern "C" {
#define ARDUINO_ANALOG_PIN_LAST 5
/** @} */

/**
* @name Arduino's default UART device
* @{
*/
#define ARDUINO_UART_D0D1 UART_DEV(1)
/** @} */

/**
* @name Arduino's I2C buses
* @{
*/
/**
* @brief The only configured I2C
*/
#define ARDUINO_I2C_UNO I2C_DEV(0)
/** @} */

/**
* @name Arduino's SPI buses
* @{
*/
/**
* @brief SPI_DEV(0) is connected to D11/D12/D13
*/
#define ARDUINO_SPI_D11D12D13 SPI_DEV(0)
/** @} */

#ifdef __cplusplus
}
#endif
Expand Down

0 comments on commit 2e80e91

Please sign in to comment.