mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards/msb-430h: added SPI configuration
This commit is contained in:
parent
399e7c1c2e
commit
fd693ee092
@ -1,4 +1,5 @@
|
|||||||
FEATURES_PROVIDED += config
|
FEATURES_PROVIDED += config
|
||||||
FEATURES_PROVIDED += periph_gpio
|
FEATURES_PROVIDED += periph_gpio
|
||||||
|
FEATURES_PROVIDED += periph_spi
|
||||||
FEATURES_PROVIDED += periph_timer
|
FEATURES_PROVIDED += periph_timer
|
||||||
FEATURES_MCU_GROUP = msp430
|
FEATURES_MCU_GROUP = msp430
|
||||||
|
@ -21,6 +21,8 @@
|
|||||||
#ifndef PERIPH_CONF_H
|
#ifndef PERIPH_CONF_H
|
||||||
#define PERIPH_CONF_H
|
#define PERIPH_CONF_H
|
||||||
|
|
||||||
|
#include "periph_cpu.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@ -66,6 +68,26 @@ extern "C" {
|
|||||||
#define UART_TX_ISR (USART1TX_VECTOR)
|
#define UART_TX_ISR (USART1TX_VECTOR)
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief SPI configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#define SPI_NUMOF (1U)
|
||||||
|
#define SPI_0_EN (1U)
|
||||||
|
|
||||||
|
/* SPI configuration */
|
||||||
|
#define SPI_DEV (USART_0)
|
||||||
|
#define SPI_IE (SFR->IE1)
|
||||||
|
#define SPI_IF (SFR->IFG1)
|
||||||
|
#define SPI_IE_RX_BIT (1 << 6)
|
||||||
|
#define SPI_IE_TX_BIT (1 << 7)
|
||||||
|
#define SPI_ME (SFR->ME1)
|
||||||
|
#define SPI_ME_BIT (1 << 6)
|
||||||
|
#define SPI_PIN_MISO GPIO(P3,2)
|
||||||
|
#define SPI_PIN_MOSI GPIO(P3,1)
|
||||||
|
#define SPI_PIN_CLK GPIO(P3,3)
|
||||||
|
/** @} */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user