1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-26 23:11:19 +01:00

boards/arduino-mega2560: added SPI configuration

This commit is contained in:
Hauke Petersen 2016-03-09 18:00:14 +01:00
parent d05bf879a6
commit 85c1d6c086
2 changed files with 15 additions and 3 deletions

View File

@ -1,5 +1,6 @@
# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_gpio
FEATURES_PROVIDED += periph_spi
FEATURES_PROVIDED += periph_timer
FEATURES_PROVIDED += periph_uart

View File

@ -256,10 +256,21 @@ extern "C" {
/**
* @brief SPI configuration
*
* The atmega2560 has only one hardware SPI with fixed pin configuration, so all
* we can do here, is to enable or disable it...
*
* The fixed pins used, are:
* MOSI - PB2 (Arduino pin 51)
* MISO - PB3 (Arduino pin 50)
* SCK - PB1 (Arduino pin 52)
* SS - PB0 (Arduino pin 53) -> this pin is configured as output, but not used
*
* @{
*/
#define SPI_NUMOF (0U) /* TODO */
#define SPI_0_EN 0
#define SPI_1_EN 0
#define SPI_NUMOF 1 /* set to 0 to disable SPI */
#define SPI_0_EN 1 /* remove once SPI rework is done */
/** @} */
/**
* @brief I2C configuration