cpu/fe310: implement SPI

This commit is contained in:
Tristan Bruns
2020-01-11 13:06:39 +01:00
committed by Alexandre Abadie
parent fd248dbc3c
commit 532cdc64ff
2 changed files with 175 additions and 0 deletions
+19
View File
@@ -70,6 +70,25 @@ typedef struct {
*/
#define UART_ISR_PRIO (2)
/**
* @name This CPU makes use of the following shared SPI functions
* @{
*/
#define PERIPH_SPI_NEEDS_TRANSFER_BYTE 1
#define PERIPH_SPI_NEEDS_TRANSFER_REG 1
#define PERIPH_SPI_NEEDS_TRANSFER_REGS 1
/** @} */
/**
* @brief Structure for SPI configuration data
*/
typedef struct {
uint32_t addr; /**< SPI control register address */
gpio_t mosi; /**< MOSI pin */
gpio_t miso; /**< MISO pin */
gpio_t sclk; /**< SCLK pin */
} spi_conf_t;
/**
* @brief Prevent shared timer functions from being used
*/