Clean up use of MAX7456_SPI_CLK and MAX7456_RESTORE_CLK (#8358)
Clean up use of MAX7456_SPI_CLK and MAX7456_RESTORE_CLK
This commit is contained in:
commit
23ff506241
|
@ -172,23 +172,14 @@
|
|||
|
||||
#define CHARS_PER_LINE 30 // XXX Should be related to VIDEO_BUFFER_CHARS_*?
|
||||
|
||||
// On shared SPI buss we want to change clock for OSD chip and restore for other devices.
|
||||
// On shared SPI bus we want to change clock for OSD chip and restore for other devices.
|
||||
|
||||
#ifdef USE_SPI_TRANSACTION
|
||||
#define __spiBusTransactionBegin(busdev) spiBusTransactionBegin(busdev)
|
||||
#define __spiBusTransactionEnd(busdev) spiBusTransactionEnd(busdev)
|
||||
#else
|
||||
#ifdef MAX7456_SPI_CLK
|
||||
#define __spiBusTransactionBegin(busdev) {spiBusSetDivisor(busdev, max7456SpiClock);IOLo((busdev)->busdev_u.spi.csnPin);}
|
||||
#else
|
||||
#define __spiBusTransactionBegin(busdev) IOLo((busdev)->busdev_u.spi.csnPin)
|
||||
#endif
|
||||
|
||||
#ifdef MAX7456_RESTORE_CLK
|
||||
#define __spiBusTransactionEnd(busdev) {IOHi((busdev)->busdev_u.spi.csnPin);spiSetDivisor((busdev)->busdev_u.spi.instance, MAX7456_RESTORE_CLK);}
|
||||
#else
|
||||
#define __spiBusTransactionEnd(busdev) IOHi((busdev)->busdev_u.spi.csnPin)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
busDevice_t max7456BusDevice;
|
||||
|
|
|
@ -74,8 +74,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI3
|
||||
#define MAX7456_SPI_CS_PIN PA15
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
|
||||
#define USE_FLASHFS
|
||||
#define USE_FLASH_M25P16
|
||||
|
|
|
@ -55,8 +55,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI3
|
||||
#define MAX7456_SPI_CS_PIN SPI3_NSS_PIN
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD)
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
|
||||
#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
|
||||
#define USE_FLASHFS
|
||||
|
|
|
@ -147,8 +147,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI3
|
||||
#define MAX7456_SPI_CS_PIN PB12
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
|
||||
#define USE_ADC
|
||||
#define ADC_INSTANCE ADC1 // Default added
|
||||
|
|
|
@ -107,8 +107,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI2
|
||||
#define MAX7456_SPI_CS_PIN SPI2_NSS_PIN
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
|
||||
/* BLACKBOX dataflash available as of V2.1 -- did not exist on V1 and V2 */
|
||||
#define USE_FLASHFS
|
||||
|
|
|
@ -130,8 +130,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI3
|
||||
#define MAX7456_SPI_CS_PIN SPI3_NSS_PIN
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
|
||||
#define USE_SDCARD
|
||||
#define USE_SDCARD_SPI
|
||||
|
|
|
@ -124,8 +124,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI3
|
||||
#define MAX7456_SPI_CS_PIN SPI3_NSS_PIN
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
|
||||
#define USE_I2C
|
||||
#define USE_I2C_DEVICE_2
|
||||
|
|
|
@ -96,8 +96,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI1
|
||||
#define MAX7456_SPI_CS_PIN PA1
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
|
||||
#define USE_SDCARD
|
||||
#define USE_SDCARD_SPI
|
||||
|
|
|
@ -62,8 +62,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI2
|
||||
#define MAX7456_SPI_CS_PIN PB12
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
|
||||
#define FLASH_CS_PIN PA15
|
||||
#define FLASH_SPI_INSTANCE SPI3
|
||||
|
|
|
@ -64,8 +64,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI3
|
||||
#define MAX7456_SPI_CS_PIN PA15
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
|
||||
#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
|
||||
#define USE_SDCARD
|
||||
|
|
|
@ -59,8 +59,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI3
|
||||
#define MAX7456_SPI_CS_PIN PA15
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
|
||||
#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
|
||||
#define USE_FLASHFS
|
||||
|
|
|
@ -145,8 +145,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI1
|
||||
#define MAX7456_SPI_CS_PIN PB1
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD)
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
|
||||
#define USE_ADC
|
||||
#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
|
||||
|
|
|
@ -49,8 +49,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI2
|
||||
#define MAX7456_SPI_CS_PIN PC8
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD)
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
|
||||
#define FLASH_CS_PIN PB3
|
||||
#define FLASH_SPI_INSTANCE SPI3
|
||||
|
|
|
@ -98,8 +98,6 @@
|
|||
#define MAX7456_SPI_INSTANCE SPI3
|
||||
#define MAX7456_SPI_CS_PIN SPI3_NSS_PIN
|
||||
#endif
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
/*---------------------------------*/
|
||||
|
||||
/*-----------USB-UARTs-------------*/
|
||||
|
|
|
@ -75,8 +75,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI1
|
||||
#define MAX7456_SPI_CS_PIN PA4
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
/*---------------------------------*/
|
||||
#else
|
||||
/*------------FLASH----------------*/
|
||||
|
|
|
@ -65,8 +65,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI2
|
||||
#define MAX7456_SPI_CS_PIN SPI2_NSS_PIN
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
/*---------------------------------*/
|
||||
|
||||
/*------------FLASH----------------*/
|
||||
|
|
|
@ -83,8 +83,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI2
|
||||
#define MAX7456_SPI_CS_PIN PB4
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
|
||||
#define USE_SPI
|
||||
#define USE_SPI_DEVICE_2
|
||||
|
|
|
@ -56,8 +56,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI3
|
||||
#define MAX7456_SPI_CS_PIN PA15
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
|
||||
#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
|
||||
|
||||
|
|
|
@ -71,8 +71,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI1
|
||||
#define MAX7456_SPI_CS_PIN PC13
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
|
||||
#define USE_FLASHFS
|
||||
#define USE_FLASH_M25P16
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI2
|
||||
#define MAX7456_SPI_CS_PIN PB12
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
|
||||
#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
|
||||
|
||||
|
|
|
@ -102,8 +102,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI3
|
||||
#define MAX7456_SPI_CS_PIN PB14
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD)
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
#define FLASH_CS_PIN PB3
|
||||
#define FLASH_SPI_INSTANCE SPI3
|
||||
|
||||
|
|
|
@ -117,8 +117,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI2
|
||||
#define MAX7456_SPI_CS_PIN SPI2_NSS_PIN
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
|
||||
#if defined(KAKUTEF7MINI)
|
||||
#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
|
||||
|
|
|
@ -75,8 +75,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI1
|
||||
#define MAX7456_SPI_CS_PIN PC4
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
|
||||
#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
|
||||
#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
|
||||
|
|
|
@ -99,8 +99,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI2
|
||||
#define MAX7456_SPI_CS_PIN PB12
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD)
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
|
||||
// *************** SPI3 SD BLACKBOX****************
|
||||
|
||||
|
|
|
@ -65,8 +65,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI3
|
||||
#define MAX7456_SPI_CS_PIN SPI3_NSS_PIN
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
|
||||
#define USE_VCP
|
||||
//#define USB_DETECT_PIN PC15
|
||||
|
|
|
@ -197,7 +197,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE NULL // SPI3
|
||||
#define MAX7456_SPI_CS_PIN NONE // PC9
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD)
|
||||
|
||||
#define USE_I2C_OLED_DISPLAY
|
||||
|
||||
|
|
|
@ -104,8 +104,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI1
|
||||
#define MAX7456_SPI_CS_PIN PB1
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
//#define MAX7456_DMA_IRQ_HANDLER_ID DMA1_CH3_HANDLER
|
||||
|
||||
#define USE_SPI
|
||||
|
|
|
@ -146,8 +146,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI3
|
||||
#define MAX7456_SPI_CS_PIN PA15
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
|
||||
// Globally configure flashfs and drivers for various flash chips
|
||||
#define USE_FLASHFS
|
||||
|
|
|
@ -106,8 +106,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI3
|
||||
#define MAX7456_SPI_CS_PIN PA15
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
|
||||
#define USE_FLASHFS
|
||||
#define USE_FLASH_M25P16
|
||||
|
|
|
@ -162,8 +162,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI2
|
||||
#define MAX7456_SPI_CS_PIN SPI2_NSS_PIN
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
|
||||
#ifdef FPVM_BETAFLIGHTF7
|
||||
//FLASH--------------------------------------
|
||||
|
|
|
@ -92,8 +92,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI2
|
||||
#define MAX7456_SPI_CS_PIN PA15
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
|
||||
#define USE_FLASHFS
|
||||
#define USE_FLASH_M25P16
|
||||
|
|
|
@ -57,8 +57,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI2
|
||||
#define MAX7456_SPI_CS_PIN PB12
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -86,8 +86,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI2
|
||||
#define MAX7456_SPI_CS_PIN PA7
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
|
||||
|
||||
#define FLASH_CS_PIN PB12
|
||||
|
|
|
@ -155,8 +155,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI2
|
||||
#define MAX7456_SPI_CS_PIN PC8
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD)
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
|
||||
#define USE_BARO
|
||||
#define USE_BARO_MS5611
|
||||
|
|
|
@ -114,8 +114,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI2
|
||||
#define MAX7456_SPI_CS_PIN PD2
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -63,8 +63,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI2
|
||||
#define MAX7456_SPI_CS_PIN SPI2_NSS_PIN
|
||||
#define MAX7456_SPI_CLK ( SPI_CLOCK_STANDARD )
|
||||
#define MAX7456_RESTORE_CLK ( SPI_CLOCK_FAST )
|
||||
|
||||
#define USE_FLASHFS
|
||||
#define USE_FLASH_M25P16
|
||||
|
|
|
@ -63,8 +63,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI1
|
||||
#define MAX7456_SPI_CS_PIN PA4
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD)
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
|
||||
//-------------------------------------IIC2 BMP280------------------------------
|
||||
#define USE_BARO
|
||||
|
|
|
@ -165,8 +165,6 @@
|
|||
#define MAX7456_SPI_INSTANCE SPI3
|
||||
#define MAX7456_SPI_CS_PIN PC0
|
||||
#endif
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
|
||||
#define USE_ADC
|
||||
#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
|
||||
|
|
|
@ -108,8 +108,6 @@
|
|||
#define USE_MAX7456
|
||||
#define MAX7456_SPI_INSTANCE SPI1
|
||||
#define MAX7456_SPI_CS_PIN PA14
|
||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
|
||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||
|
||||
// ADC inputs
|
||||
#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
|
||||
|
|
Loading…
Reference in New Issue