mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards/hifive1*: provide and configure SPI feature
This commit is contained in:
parent
532cdc64ff
commit
8405fbe611
@ -5,6 +5,6 @@ CPU_MODEL = fe310_g000
|
||||
#FEATURES_PROVIDED += periph_pwm
|
||||
FEATURES_PROVIDED += periph_rtc
|
||||
FEATURES_PROVIDED += periph_rtt
|
||||
#FEATURES_PROVIDED += periph_spi
|
||||
FEATURES_PROVIDED += periph_spi
|
||||
FEATURES_PROVIDED += periph_timer
|
||||
FEATURES_PROVIDED += periph_uart
|
||||
|
@ -109,6 +109,23 @@ static const uart_conf_t uart_config[] = {
|
||||
#define UART_NUMOF ARRAY_SIZE(uart_config)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name SPI device configuration
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
static const spi_conf_t spi_config[] = {
|
||||
{
|
||||
.addr = SPI1_CTRL_ADDR,
|
||||
.mosi = GPIO_PIN(0, 3), /* D11 */
|
||||
.miso = GPIO_PIN(0, 4), /* D12 */
|
||||
.sclk = GPIO_PIN(0, 5), /* D13 */
|
||||
},
|
||||
};
|
||||
|
||||
#define SPI_NUMOF ARRAY_SIZE(spi_config)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name RTT/RTC configuration
|
||||
*
|
||||
|
@ -6,7 +6,7 @@ CPU_MODEL = fe310_g002
|
||||
#FEATURES_PROVIDED += periph_pwm
|
||||
FEATURES_PROVIDED += periph_rtc
|
||||
FEATURES_PROVIDED += periph_rtt
|
||||
#FEATURES_PROVIDED += periph_spi
|
||||
FEATURES_PROVIDED += periph_spi
|
||||
FEATURES_PROVIDED += periph_timer
|
||||
FEATURES_PROVIDED += periph_uart
|
||||
|
||||
|
@ -110,6 +110,23 @@ static const uart_conf_t uart_config[] = {
|
||||
#define UART_NUMOF ARRAY_SIZE(uart_config)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name SPI device configuration
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
static const spi_conf_t spi_config[] = {
|
||||
{
|
||||
.addr = SPI1_CTRL_ADDR,
|
||||
.mosi = GPIO_PIN(0, 3), /* D11 */
|
||||
.miso = GPIO_PIN(0, 4), /* D12 */
|
||||
.sclk = GPIO_PIN(0, 5), /* D13 */
|
||||
},
|
||||
};
|
||||
|
||||
#define SPI_NUMOF ARRAY_SIZE(spi_config)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name RTT/RTC configuration
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user