mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 12:25:20 +03:00
parent
0c7061016f
commit
38372c3dbd
2 changed files with 1 additions and 58 deletions
|
@ -93,39 +93,3 @@ typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
|
||||||
#define DMA_RAM_RW
|
#define DMA_RAM_RW
|
||||||
|
|
||||||
#define USE_LATE_TASK_STATISTICS
|
#define USE_LATE_TASK_STATISTICS
|
||||||
|
|
||||||
#ifndef SPI1_SCK_PIN
|
|
||||||
#define SPI1_SCK_PIN PA5
|
|
||||||
#define SPI1_SDI_PIN PA6
|
|
||||||
#define SPI1_SDO_PIN PA7
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef SPI2_SCK_PIN
|
|
||||||
#define SPI2_SCK_PIN PB13
|
|
||||||
#define SPI2_SDI_PIN PB14
|
|
||||||
#define SPI2_SDO_PIN PB15
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef SPI3_SCK_PIN
|
|
||||||
#define SPI3_SCK_PIN PB3
|
|
||||||
#define SPI3_SDI_PIN PB4
|
|
||||||
#define SPI3_SDO_PIN PB5
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef SPI4_SCK_PIN
|
|
||||||
#define SPI4_SCK_PIN NONE
|
|
||||||
#define SPI4_SDI_PIN NONE
|
|
||||||
#define SPI4_SDO_PIN NONE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef SPI5_SCK_PIN
|
|
||||||
#define SPI5_SCK_PIN NONE
|
|
||||||
#define SPI5_SDI_PIN NONE
|
|
||||||
#define SPI5_SDO_PIN NONE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef SPI6_SCK_PIN
|
|
||||||
#define SPI6_SCK_PIN NONE
|
|
||||||
#define SPI6_SDI_PIN NONE
|
|
||||||
#define SPI6_SDO_PIN NONE
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -39,27 +39,6 @@
|
||||||
// Use DMA if possible if this many bytes are to be transferred
|
// Use DMA if possible if this many bytes are to be transferred
|
||||||
#define SPI_DMA_THRESHOLD 8
|
#define SPI_DMA_THRESHOLD 8
|
||||||
|
|
||||||
#ifndef SPI2_SCK_PIN
|
|
||||||
#define SPI2_NSS_PIN PB12
|
|
||||||
#define SPI2_SCK_PIN PB13
|
|
||||||
#define SPI2_SDI_PIN PB14
|
|
||||||
#define SPI2_SDO_PIN PB15
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef SPI3_SCK_PIN
|
|
||||||
#define SPI3_NSS_PIN PA15
|
|
||||||
#define SPI3_SCK_PIN PB3
|
|
||||||
#define SPI3_SDI_PIN PB4
|
|
||||||
#define SPI3_SDO_PIN PB5
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef SPI4_SCK_PIN
|
|
||||||
#define SPI4_NSS_PIN PA15
|
|
||||||
#define SPI4_SCK_PIN PB3
|
|
||||||
#define SPI4_SDI_PIN PB4
|
|
||||||
#define SPI4_SDO_PIN PB5
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef SPI1_NSS_PIN
|
#ifndef SPI1_NSS_PIN
|
||||||
#define SPI1_NSS_PIN NONE
|
#define SPI1_NSS_PIN NONE
|
||||||
#endif
|
#endif
|
||||||
|
@ -140,7 +119,7 @@ void spiInitDevice(SPIDevice device)
|
||||||
RCC_ClockCmd(spi->rcc, ENABLE);
|
RCC_ClockCmd(spi->rcc, ENABLE);
|
||||||
RCC_ResetCmd(spi->rcc, ENABLE);
|
RCC_ResetCmd(spi->rcc, ENABLE);
|
||||||
|
|
||||||
IOInit(IOGetByTag(spi->sck), OWNER_SPI_SCK, RESOURCE_INDEX(device));
|
IOInit(IOGetByTag(spi->sck), OWNER_SPI_SCK, RESOURCE_INDEX(device));
|
||||||
IOInit(IOGetByTag(spi->miso), OWNER_SPI_SDI, RESOURCE_INDEX(device));
|
IOInit(IOGetByTag(spi->miso), OWNER_SPI_SDI, RESOURCE_INDEX(device));
|
||||||
IOInit(IOGetByTag(spi->mosi), OWNER_SPI_SDO, RESOURCE_INDEX(device));
|
IOInit(IOGetByTag(spi->mosi), OWNER_SPI_SDO, RESOURCE_INDEX(device));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue