boards/nucleo-f767zi: Add SPI settings
This commit is contained in:
parent
d00becbc4b
commit
61e1068eba
@ -2,6 +2,7 @@
|
|||||||
FEATURES_PROVIDED += periph_dma
|
FEATURES_PROVIDED += periph_dma
|
||||||
FEATURES_PROVIDED += periph_i2c
|
FEATURES_PROVIDED += periph_i2c
|
||||||
FEATURES_PROVIDED += periph_rtc
|
FEATURES_PROVIDED += periph_rtc
|
||||||
|
FEATURES_PROVIDED += periph_spi
|
||||||
FEATURES_PROVIDED += periph_timer
|
FEATURES_PROVIDED += periph_timer
|
||||||
FEATURES_PROVIDED += periph_uart
|
FEATURES_PROVIDED += periph_uart
|
||||||
|
|
||||||
|
|||||||
@ -24,6 +24,7 @@
|
|||||||
#include "periph_cpu.h"
|
#include "periph_cpu.h"
|
||||||
#include "f7/cfg_clock_216_8_1.h"
|
#include "f7/cfg_clock_216_8_1.h"
|
||||||
#include "cfg_i2c1_pb8_pb9.h"
|
#include "cfg_i2c1_pb8_pb9.h"
|
||||||
|
#include "cfg_spi_divtable.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -123,6 +124,29 @@ static const uart_conf_t uart_config[] = {
|
|||||||
#define UART_NUMOF (sizeof(uart_config) / sizeof(uart_config[0]))
|
#define UART_NUMOF (sizeof(uart_config) / sizeof(uart_config[0]))
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name SPI configuration
|
||||||
|
*
|
||||||
|
* @note The spi_divtable is auto-generated from
|
||||||
|
* `cpu/stm32_common/dist/spi_divtable/spi_divtable.c`
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
static const spi_conf_t spi_config[] = {
|
||||||
|
{
|
||||||
|
.dev = SPI1,
|
||||||
|
.mosi_pin = GPIO_PIN(PORT_A, 7),
|
||||||
|
.miso_pin = GPIO_PIN(PORT_A, 6),
|
||||||
|
.sclk_pin = GPIO_PIN(PORT_A, 5),
|
||||||
|
.cs_pin = GPIO_UNDEF,
|
||||||
|
.af = GPIO_AF5,
|
||||||
|
.rccmask = RCC_APB2ENR_SPI1EN,
|
||||||
|
.apbbus = APB2
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
#define SPI_NUMOF (sizeof(spi_config) / sizeof(spi_config[0]))
|
||||||
|
/** @} */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user