mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 01:35:41 +03:00
Merge remote-tracking branch 'betaflight/master' into bfdev-configurable-spi-phase-1
This commit is contained in:
commit
d18a06f721
67 changed files with 928 additions and 774 deletions
|
@ -18,7 +18,8 @@
|
|||
#pragma once
|
||||
|
||||
#include "drivers/io_types.h"
|
||||
#include "rcc_types.h"
|
||||
#include "drivers/bus.h"
|
||||
#include "drivers/rcc_types.h"
|
||||
|
||||
#if defined(STM32F4) || defined(STM32F3)
|
||||
#define SPI_IO_AF_CFG IO_CONFIG(GPIO_Mode_AF, GPIO_Speed_50MHz, GPIO_OType_PP, GPIO_PuPd_NOPULL)
|
||||
|
@ -97,6 +98,11 @@ SPI_HandleTypeDef* spiHandleByInstance(SPI_TypeDef *instance);
|
|||
DMA_HandleTypeDef* spiSetDMATransmit(DMA_Stream_TypeDef *Stream, uint32_t Channel, SPI_TypeDef *Instance, uint8_t *pData, uint16_t Size);
|
||||
#endif
|
||||
|
||||
bool spiWriteRegister(const busDevice_t *bus, uint8_t reg, uint8_t data);
|
||||
bool spiReadRegisterBuffer(const busDevice_t *bus, uint8_t reg, uint8_t length, uint8_t *data);
|
||||
uint8_t spiReadRegister(const busDevice_t *bus, uint8_t reg);
|
||||
void spiBusSetInstance(busDevice_t *bus, SPI_TypeDef *instance);
|
||||
|
||||
typedef struct spiPinConfig_s {
|
||||
ioTag_t ioTagSck[SPIDEV_COUNT];
|
||||
ioTag_t ioTagMiso[SPIDEV_COUNT];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue