1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 04:15:44 +03:00

FIX: SPI PIN defaults cleanup #2 (#12487)

This commit is contained in:
J Blackman 2023-03-10 12:16:52 +11:00 committed by GitHub
parent 0c7061016f
commit 38372c3dbd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 58 deletions

View file

@ -93,39 +93,3 @@ typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
#define DMA_RAM_RW
#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

View file

@ -39,27 +39,6 @@
// Use DMA if possible if this many bytes are to be transferred
#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
#define SPI1_NSS_PIN NONE
#endif
@ -140,7 +119,7 @@ void spiInitDevice(SPIDevice device)
RCC_ClockCmd(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->mosi), OWNER_SPI_SDO, RESOURCE_INDEX(device));