mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 21:05:35 +03:00
Change M25P16 to FLASH where appropriate
This commit is contained in:
parent
6d72a853dd
commit
36fb439d45
52 changed files with 108 additions and 121 deletions
|
@ -63,7 +63,7 @@ bool flashInit(const flashConfig_t *flashConfig)
|
||||||
IOConfigGPIO(busdev->busdev_u.spi.csnPin, SPI_IO_CS_CFG);
|
IOConfigGPIO(busdev->busdev_u.spi.csnPin, SPI_IO_CS_CFG);
|
||||||
IOHi(busdev->busdev_u.spi.csnPin);
|
IOHi(busdev->busdev_u.spi.csnPin);
|
||||||
|
|
||||||
#ifndef M25P16_SPI_SHARED
|
#ifndef FLASH_SPI_SHARED
|
||||||
//Maximum speed for standard READ command is 20mHz, other commands tolerate 25mHz
|
//Maximum speed for standard READ command is 20mHz, other commands tolerate 25mHz
|
||||||
//spiSetDivisor(busdev->busdev_u.spi.instance, SPI_CLOCK_FAST);
|
//spiSetDivisor(busdev->busdev_u.spi.instance, SPI_CLOCK_FAST);
|
||||||
spiSetDivisor(busdev->busdev_u.spi.instance, SPI_CLOCK_STANDARD*2);
|
spiSetDivisor(busdev->busdev_u.spi.instance, SPI_CLOCK_STANDARD*2);
|
||||||
|
|
|
@ -256,8 +256,8 @@ void spiPreInit(void)
|
||||||
#if defined(RTC6705_CS_PIN) && !defined(USE_VTX_RTC6705_SOFTSPI) // RTC6705 soft SPI initialisation handled elsewhere.
|
#if defined(RTC6705_CS_PIN) && !defined(USE_VTX_RTC6705_SOFTSPI) // RTC6705 soft SPI initialisation handled elsewhere.
|
||||||
spiPreInitCs(IO_TAG(RTC6705_CS_PIN));
|
spiPreInitCs(IO_TAG(RTC6705_CS_PIN));
|
||||||
#endif
|
#endif
|
||||||
#ifdef M25P16_CS_PIN
|
#ifdef FLASH_CS_PIN
|
||||||
spiPreInitCs(IO_TAG(M25P16_CS_PIN));
|
spiPreInitCs(IO_TAG(FLASH_CS_PIN));
|
||||||
#endif
|
#endif
|
||||||
#if defined(USE_RX_SPI) && !defined(USE_RX_SOFTSPI)
|
#if defined(USE_RX_SPI) && !defined(USE_RX_SOFTSPI)
|
||||||
spiPreInitCs(IO_TAG(RX_NSS_PIN));
|
spiPreInitCs(IO_TAG(RX_NSS_PIN));
|
||||||
|
|
|
@ -37,11 +37,11 @@ PG_REGISTER_WITH_RESET_FN(flashConfig_t, flashConfig, PG_FLASH_CONFIG, 0);
|
||||||
|
|
||||||
void pgResetFn_flashConfig(flashConfig_t *flashConfig)
|
void pgResetFn_flashConfig(flashConfig_t *flashConfig)
|
||||||
{
|
{
|
||||||
#ifdef M25P16_CS_PIN
|
#ifdef FLASH_CS_PIN
|
||||||
flashConfig->csTag = IO_TAG(M25P16_CS_PIN);
|
flashConfig->csTag = IO_TAG(FLASH_CS_PIN);
|
||||||
#else
|
#else
|
||||||
flashConfig->csTag = IO_TAG_NONE;
|
flashConfig->csTag = IO_TAG_NONE;
|
||||||
#endif
|
#endif
|
||||||
flashConfig->spiDevice = SPI_DEV_TO_CFG(spiDeviceByInstance(M25P16_SPI_INSTANCE));
|
flashConfig->spiDevice = SPI_DEV_TO_CFG(spiDeviceByInstance(FLASH_SPI_INSTANCE));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -67,8 +67,8 @@
|
||||||
#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
|
#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
#define M25P16_CS_PIN SPI2_NSS_PIN
|
#define FLASH_CS_PIN SPI2_NSS_PIN
|
||||||
#define M25P16_SPI_INSTANCE SPI2
|
#define FLASH_SPI_INSTANCE SPI2
|
||||||
|
|
||||||
#define USE_VCP
|
#define USE_VCP
|
||||||
#define USE_USB_DETECT
|
#define USE_USB_DETECT
|
||||||
|
|
|
@ -87,8 +87,8 @@
|
||||||
#define USE_SPI
|
#define USE_SPI
|
||||||
#define USE_SPI_DEVICE_2
|
#define USE_SPI_DEVICE_2
|
||||||
|
|
||||||
#define M25P16_CS_PIN PB12
|
#define FLASH_CS_PIN PB12
|
||||||
#define M25P16_SPI_INSTANCE SPI2
|
#define FLASH_SPI_INSTANCE SPI2
|
||||||
|
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
|
|
|
@ -84,8 +84,8 @@
|
||||||
// Performance logging for SD card operations:
|
// Performance logging for SD card operations:
|
||||||
// #define AFATFS_USE_INTROSPECTIVE_LOGGING
|
// #define AFATFS_USE_INTROSPECTIVE_LOGGING
|
||||||
|
|
||||||
#define M25P16_CS_PIN SPI2_NSS_PIN
|
#define FLASH_CS_PIN SPI2_NSS_PIN
|
||||||
#define M25P16_SPI_INSTANCE SPI2
|
#define FLASH_SPI_INSTANCE SPI2
|
||||||
|
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
|
|
|
@ -98,8 +98,8 @@
|
||||||
// Performance logging for SD card operations:
|
// Performance logging for SD card operations:
|
||||||
// #define AFATFS_USE_INTROSPECTIVE_LOGGING
|
// #define AFATFS_USE_INTROSPECTIVE_LOGGING
|
||||||
|
|
||||||
#define M25P16_CS_PIN SPI2_NSS_PIN
|
#define FLASH_CS_PIN SPI2_NSS_PIN
|
||||||
#define M25P16_SPI_INSTANCE SPI2
|
#define FLASH_SPI_INSTANCE SPI2
|
||||||
|
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
|
|
|
@ -114,8 +114,8 @@
|
||||||
/* BLACKBOX dataflash available as of V2.1 -- did not exist on V1 and V2 */
|
/* BLACKBOX dataflash available as of V2.1 -- did not exist on V1 and V2 */
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
#define M25P16_CS_PIN SPI3_NSS_PIN
|
#define FLASH_CS_PIN SPI3_NSS_PIN
|
||||||
#define M25P16_SPI_INSTANCE SPI3
|
#define FLASH_SPI_INSTANCE SPI3
|
||||||
#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
|
#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
|
||||||
|
|
||||||
/* Motion Processing Unit (MPU) - Invensense 6-axis MPU-6500 or 9-axis MPU-9250
|
/* Motion Processing Unit (MPU) - Invensense 6-axis MPU-6500 or 9-axis MPU-9250
|
||||||
|
|
|
@ -114,8 +114,8 @@
|
||||||
#define SPI3_MISO_PIN PC11
|
#define SPI3_MISO_PIN PC11
|
||||||
#define SPI3_MOSI_PIN PC12
|
#define SPI3_MOSI_PIN PC12
|
||||||
|
|
||||||
#define M25P16_CS_PIN PB12
|
#define FLASH_CS_PIN PB12
|
||||||
#define M25P16_SPI_INSTANCE SPI2
|
#define FLASH_SPI_INSTANCE SPI2
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
|
#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
|
||||||
|
|
|
@ -64,8 +64,8 @@
|
||||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
|
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
|
||||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||||
|
|
||||||
#define M25P16_CS_PIN PA15
|
#define FLASH_CS_PIN PA15
|
||||||
#define M25P16_SPI_INSTANCE SPI3
|
#define FLASH_SPI_INSTANCE SPI3
|
||||||
|
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
|
|
|
@ -68,7 +68,7 @@ void targetPreInit(void)
|
||||||
|
|
||||||
/* ensure the CS pin for the flash is pulled hi so any SD card initialisation does not impact the chip */
|
/* ensure the CS pin for the flash is pulled hi so any SD card initialisation does not impact the chip */
|
||||||
if (hardwareRevision == BJF4_REV3) {
|
if (hardwareRevision == BJF4_REV3) {
|
||||||
IO_t flashIo = IOGetByTag(IO_TAG(M25P16_CS_PIN));
|
IO_t flashIo = IOGetByTag(IO_TAG(FLASH_CS_PIN));
|
||||||
IOConfigGPIO(flashIo, IOCFG_OUT_PP);
|
IOConfigGPIO(flashIo, IOCFG_OUT_PP);
|
||||||
IOHi(flashIo);
|
IOHi(flashIo);
|
||||||
|
|
||||||
|
|
|
@ -93,8 +93,8 @@
|
||||||
// Performance logging for SD card operations:
|
// Performance logging for SD card operations:
|
||||||
// #define AFATFS_USE_INTROSPECTIVE_LOGGING
|
// #define AFATFS_USE_INTROSPECTIVE_LOGGING
|
||||||
|
|
||||||
#define M25P16_CS_PIN PB7
|
#define FLASH_CS_PIN PB7
|
||||||
#define M25P16_SPI_INSTANCE SPI3
|
#define FLASH_SPI_INSTANCE SPI3
|
||||||
|
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
|
|
|
@ -39,13 +39,11 @@
|
||||||
#define USE_SPI_DEVICE_1
|
#define USE_SPI_DEVICE_1
|
||||||
#define USE_SPI_DEVICE_2
|
#define USE_SPI_DEVICE_2
|
||||||
|
|
||||||
#define MPU6000_CS_GPIO GPIOA
|
|
||||||
#define MPU6000_CS_PIN PA4
|
#define MPU6000_CS_PIN PA4
|
||||||
#define MPU6000_SPI_INSTANCE SPI1
|
#define MPU6000_SPI_INSTANCE SPI1
|
||||||
|
|
||||||
#define M25P16_CS_GPIO GPIOB
|
#define FLASH_CS_PIN PB12
|
||||||
#define M25P16_CS_PIN PB12
|
#define FLASH_SPI_INSTANCE SPI2
|
||||||
#define M25P16_SPI_INSTANCE SPI2
|
|
||||||
|
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
|
|
|
@ -60,13 +60,6 @@
|
||||||
// Note, this is the same DMA channel as UART1_RX. Luckily we don't use DMA for USART Rx.
|
// Note, this is the same DMA channel as UART1_RX. Luckily we don't use DMA for USART Rx.
|
||||||
#define SDCARD_DMA_CHANNEL_TX DMA1_Channel5
|
#define SDCARD_DMA_CHANNEL_TX DMA1_Channel5
|
||||||
|
|
||||||
//#define USE_FLASHFS
|
|
||||||
//#define USE_FLASH_M25P16
|
|
||||||
|
|
||||||
//#define M25P16_CS_GPIO GPIOB
|
|
||||||
//#define M25P16_CS_PIN GPIO_Pin_12
|
|
||||||
//#define M25P16_SPI_INSTANCE SPI2
|
|
||||||
|
|
||||||
#define USE_GYRO
|
#define USE_GYRO
|
||||||
#define USE_GYRO_L3GD20
|
#define USE_GYRO_L3GD20
|
||||||
#define USE_GYRO_MPU6050
|
#define USE_GYRO_MPU6050
|
||||||
|
|
|
@ -87,8 +87,8 @@
|
||||||
|
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
#define M25P16_CS_PIN PB3
|
#define FLASH_CS_PIN PB3
|
||||||
#define M25P16_SPI_INSTANCE SPI3
|
#define FLASH_SPI_INSTANCE SPI3
|
||||||
|
|
||||||
|
|
||||||
#define USE_VCP
|
#define USE_VCP
|
||||||
|
|
|
@ -65,8 +65,8 @@
|
||||||
#define USE_BARO
|
#define USE_BARO
|
||||||
#define USE_BARO_MS5611
|
#define USE_BARO_MS5611
|
||||||
|
|
||||||
#define M25P16_CS_PIN PB12
|
#define FLASH_CS_PIN PB12
|
||||||
#define M25P16_SPI_INSTANCE SPI2
|
#define FLASH_SPI_INSTANCE SPI2
|
||||||
|
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
|
|
|
@ -83,8 +83,8 @@
|
||||||
#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
|
#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
#define M25P16_CS_PIN PB12
|
#define FLASH_CS_PIN PB12
|
||||||
#define M25P16_SPI_INSTANCE SPI2
|
#define FLASH_SPI_INSTANCE SPI2
|
||||||
|
|
||||||
//GPS ----------------------------------------------
|
//GPS ----------------------------------------------
|
||||||
#define USE_GPS
|
#define USE_GPS
|
||||||
|
|
|
@ -69,9 +69,9 @@
|
||||||
|
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
#define M25P16_SPI_SHARED
|
#define FLASH_SPI_SHARED
|
||||||
#define M25P16_CS_PIN PC15
|
#define FLASH_CS_PIN PC15
|
||||||
#define M25P16_SPI_INSTANCE SPI2
|
#define FLASH_SPI_INSTANCE SPI2
|
||||||
|
|
||||||
#define USE_GYRO
|
#define USE_GYRO
|
||||||
#define USE_GYRO_MPU6500
|
#define USE_GYRO_MPU6500
|
||||||
|
|
|
@ -82,8 +82,8 @@
|
||||||
/*---------------------------------*/
|
/*---------------------------------*/
|
||||||
|
|
||||||
/*------------FLASH----------------*/
|
/*------------FLASH----------------*/
|
||||||
#define M25P16_CS_PIN PB3
|
#define FLASH_CS_PIN PB3
|
||||||
#define M25P16_SPI_INSTANCE SPI3
|
#define FLASH_SPI_INSTANCE SPI3
|
||||||
|
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
|
|
|
@ -94,8 +94,8 @@
|
||||||
/*---------------------------------*/
|
/*---------------------------------*/
|
||||||
#else
|
#else
|
||||||
/*------------FLASH----------------*/
|
/*------------FLASH----------------*/
|
||||||
#define M25P16_CS_PIN PB3
|
#define FLASH_CS_PIN PB3
|
||||||
#define M25P16_SPI_INSTANCE SPI3
|
#define FLASH_SPI_INSTANCE SPI3
|
||||||
|
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
|
|
|
@ -96,8 +96,8 @@
|
||||||
|
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define M25P16_CS_PIN PD2
|
#define FLASH_CS_PIN PD2
|
||||||
#define M25P16_SPI_INSTANCE SPI3
|
#define FLASH_SPI_INSTANCE SPI3
|
||||||
|
|
||||||
// *************** SDCARD *****************************
|
// *************** SDCARD *****************************
|
||||||
#define USE_SDCARD
|
#define USE_SDCARD
|
||||||
|
|
|
@ -93,8 +93,8 @@
|
||||||
|
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
#define M25P16_CS_PIN PB12
|
#define FLASH_CS_PIN PB12
|
||||||
#define M25P16_SPI_INSTANCE SPI2
|
#define FLASH_SPI_INSTANCE SPI2
|
||||||
|
|
||||||
#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
|
#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
|
||||||
|
|
||||||
|
|
|
@ -118,8 +118,8 @@
|
||||||
|
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
#define M25P16_CS_PIN PB3
|
#define FLASH_CS_PIN PB3
|
||||||
#define M25P16_SPI_INSTANCE SPI3
|
#define FLASH_SPI_INSTANCE SPI3
|
||||||
|
|
||||||
#define USE_VCP
|
#define USE_VCP
|
||||||
#define USB_DETECT_PIN PC5
|
#define USB_DETECT_PIN PC5
|
||||||
|
|
|
@ -92,8 +92,8 @@
|
||||||
|
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
#define M25P16_CS_PIN PA15
|
#define FLASH_CS_PIN PA15
|
||||||
#define M25P16_SPI_INSTANCE SPI3
|
#define FLASH_SPI_INSTANCE SPI3
|
||||||
|
|
||||||
#define USE_VCP
|
#define USE_VCP
|
||||||
#define USE_USB_DETECT
|
#define USE_USB_DETECT
|
||||||
|
|
|
@ -72,9 +72,8 @@
|
||||||
#define USE_SPI_DEVICE_1 // PA4, 5, 6, 7
|
#define USE_SPI_DEVICE_1 // PA4, 5, 6, 7
|
||||||
#define USE_SPI_DEVICE_2 // PB12,13,14,15 on AF5
|
#define USE_SPI_DEVICE_2 // PB12,13,14,15 on AF5
|
||||||
|
|
||||||
#define M25P16_CS_GPIO GPIOB
|
#define FLASH_CS_PIN PB12
|
||||||
#define M25P16_CS_PIN PB12
|
#define FLASH_SPI_INSTANCE SPI2
|
||||||
#define M25P16_SPI_INSTANCE SPI2
|
|
||||||
|
|
||||||
#define MPU6000_CS_PIN PA4
|
#define MPU6000_CS_PIN PA4
|
||||||
#define MPU6000_SPI_INSTANCE SPI1
|
#define MPU6000_SPI_INSTANCE SPI1
|
||||||
|
|
|
@ -72,8 +72,8 @@
|
||||||
#define USE_SPI
|
#define USE_SPI
|
||||||
#define USE_SPI_DEVICE_2 // PB12,13,14,15 on AF5
|
#define USE_SPI_DEVICE_2 // PB12,13,14,15 on AF5
|
||||||
|
|
||||||
#define M25P16_CS_PIN PB12
|
#define FLASH_CS_PIN PB12
|
||||||
#define M25P16_SPI_INSTANCE SPI2
|
#define FLASH_SPI_INSTANCE SPI2
|
||||||
|
|
||||||
#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
|
#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
|
||||||
#define USE_ADC
|
#define USE_ADC
|
||||||
|
|
|
@ -90,8 +90,8 @@
|
||||||
#define USE_SPI
|
#define USE_SPI
|
||||||
#define USE_SPI_DEVICE_2 // PB12,13,14,15 on AF5
|
#define USE_SPI_DEVICE_2 // PB12,13,14,15 on AF5
|
||||||
|
|
||||||
#define M25P16_CS_PIN PB12
|
#define FLASH_CS_PIN PB12
|
||||||
#define M25P16_SPI_INSTANCE SPI2
|
#define FLASH_SPI_INSTANCE SPI2
|
||||||
|
|
||||||
#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
|
#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
|
||||||
#define USE_ADC
|
#define USE_ADC
|
||||||
|
|
|
@ -81,8 +81,8 @@
|
||||||
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD)
|
#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD)
|
||||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||||
|
|
||||||
#define M25P16_CS_PIN PB3
|
#define FLASH_CS_PIN PB3
|
||||||
#define M25P16_SPI_INSTANCE SPI3
|
#define FLASH_SPI_INSTANCE SPI3
|
||||||
|
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
|
|
|
@ -104,8 +104,8 @@
|
||||||
#else
|
#else
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
#define M25P16_CS_PIN SPI3_NSS_PIN
|
#define FLASH_CS_PIN SPI3_NSS_PIN
|
||||||
#define M25P16_SPI_INSTANCE SPI3
|
#define FLASH_SPI_INSTANCE SPI3
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define USE_VCP
|
#define USE_VCP
|
||||||
|
|
|
@ -34,13 +34,11 @@
|
||||||
#define USE_SPI_DEVICE_1
|
#define USE_SPI_DEVICE_1
|
||||||
#define USE_SPI_DEVICE_2
|
#define USE_SPI_DEVICE_2
|
||||||
|
|
||||||
#define MPU6000_CS_GPIO GPIOA
|
|
||||||
#define MPU6000_CS_PIN PA4
|
#define MPU6000_CS_PIN PA4
|
||||||
#define MPU6000_SPI_INSTANCE SPI1
|
#define MPU6000_SPI_INSTANCE SPI1
|
||||||
|
|
||||||
#define M25P16_CS_GPIO GPIOB
|
#define FLASH_CS_PIN PB12
|
||||||
#define M25P16_CS_PIN PB12
|
#define FLASH_SPI_INSTANCE SPI2
|
||||||
#define M25P16_SPI_INSTANCE SPI2
|
|
||||||
|
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
|
|
|
@ -99,8 +99,8 @@
|
||||||
|
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
#define M25P16_CS_PIN PC0
|
#define FLASH_CS_PIN PC0
|
||||||
#define M25P16_SPI_INSTANCE SPI3
|
#define FLASH_SPI_INSTANCE SPI3
|
||||||
|
|
||||||
// *************** SD Card **************************
|
// *************** SD Card **************************
|
||||||
#define USE_SDCARD
|
#define USE_SDCARD
|
||||||
|
|
|
@ -87,8 +87,8 @@
|
||||||
#define USE_SPI
|
#define USE_SPI
|
||||||
#define USE_SPI_DEVICE_2
|
#define USE_SPI_DEVICE_2
|
||||||
|
|
||||||
#define M25P16_CS_PIN PB12
|
#define FLASH_CS_PIN PB12
|
||||||
#define M25P16_SPI_INSTANCE SPI2
|
#define FLASH_SPI_INSTANCE SPI2
|
||||||
|
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
|
|
|
@ -102,8 +102,8 @@
|
||||||
#define USE_SPI
|
#define USE_SPI
|
||||||
#define USE_SPI_DEVICE_2 // PB12,13,14,15 on AF5
|
#define USE_SPI_DEVICE_2 // PB12,13,14,15 on AF5
|
||||||
|
|
||||||
//#define M25P16_CS_PIN PB12
|
//#define FLASH_CS_PIN PB12
|
||||||
//#define M25P16_SPI_INSTANCE SPI2
|
//#define FLASH_SPI_INSTANCE SPI2
|
||||||
|
|
||||||
#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
|
#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
|
||||||
#define USE_ADC
|
#define USE_ADC
|
||||||
|
|
|
@ -71,8 +71,8 @@
|
||||||
#define NAZE_SPI_CS_PIN PB12
|
#define NAZE_SPI_CS_PIN PB12
|
||||||
|
|
||||||
// We either have this 16mbit flash chip on SPI or the MPU6500 acc/gyro depending on board revision:
|
// We either have this 16mbit flash chip on SPI or the MPU6500 acc/gyro depending on board revision:
|
||||||
#define M25P16_CS_PIN NAZE_SPI_CS_PIN
|
#define FLASH_CS_PIN NAZE_SPI_CS_PIN
|
||||||
#define M25P16_SPI_INSTANCE NAZE_SPI_INSTANCE
|
#define FLASH_SPI_INSTANCE NAZE_SPI_INSTANCE
|
||||||
|
|
||||||
#define MPU6500_CS_PIN NAZE_SPI_CS_PIN
|
#define MPU6500_CS_PIN NAZE_SPI_CS_PIN
|
||||||
#define MPU6500_SPI_INSTANCE NAZE_SPI_INSTANCE
|
#define MPU6500_SPI_INSTANCE NAZE_SPI_INSTANCE
|
||||||
|
|
|
@ -101,8 +101,8 @@
|
||||||
|
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
#define M25P16_SPI_INSTANCE SPI1
|
#define FLASH_SPI_INSTANCE SPI1
|
||||||
#define M25P16_CS_PIN PA15
|
#define FLASH_CS_PIN PA15
|
||||||
#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
|
#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
|
||||||
|
|
||||||
#define USE_ADC
|
#define USE_ADC
|
||||||
|
|
|
@ -155,20 +155,20 @@
|
||||||
#define SDCARD_DMA_CHANNEL 0
|
#define SDCARD_DMA_CHANNEL 0
|
||||||
|
|
||||||
// For variants with SDcard replaced with flash chip
|
// For variants with SDcard replaced with flash chip
|
||||||
#define M25P16_CS_PIN SDCARD_SPI_CS_PIN
|
#define FLASH_CS_PIN SDCARD_SPI_CS_PIN
|
||||||
#define M25P16_SPI_INSTANCE SDCARD_SPI_INSTANCE
|
#define FLASH_SPI_INSTANCE SDCARD_SPI_INSTANCE
|
||||||
|
|
||||||
#elif defined(LUXF4OSD)
|
#elif defined(LUXF4OSD)
|
||||||
#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
|
#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
|
||||||
#define M25P16_CS_PIN PB12
|
#define FLASH_CS_PIN PB12
|
||||||
#define M25P16_SPI_INSTANCE SPI2
|
#define FLASH_SPI_INSTANCE SPI2
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
|
#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
|
||||||
#define M25P16_CS_PIN SPI3_NSS_PIN
|
#define FLASH_CS_PIN SPI3_NSS_PIN
|
||||||
#define M25P16_SPI_INSTANCE SPI3
|
#define FLASH_SPI_INSTANCE SPI3
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
#endif // OMNIBUSF4
|
#endif // OMNIBUSF4
|
||||||
|
|
|
@ -91,8 +91,8 @@
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
|
#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
|
||||||
#define M25P16_SPI_INSTANCE SPI2
|
#define FLASH_SPI_INSTANCE SPI2
|
||||||
#define M25P16_CS_PIN PB12
|
#define FLASH_CS_PIN PB12
|
||||||
|
|
||||||
#define USE_VCP
|
#define USE_VCP
|
||||||
#define VBUS_SENSING_PIN PC5
|
#define VBUS_SENSING_PIN PC5
|
||||||
|
|
|
@ -198,8 +198,8 @@
|
||||||
|
|
||||||
#ifdef FPVM_BETAFLIGHTF7
|
#ifdef FPVM_BETAFLIGHTF7
|
||||||
//FLASH--------------------------------------
|
//FLASH--------------------------------------
|
||||||
#define M25P16_CS_PIN SPI4_NSS_PIN
|
#define FLASH_CS_PIN SPI4_NSS_PIN
|
||||||
#define M25P16_SPI_INSTANCE SPI4
|
#define FLASH_SPI_INSTANCE SPI4
|
||||||
|
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
|
|
|
@ -96,8 +96,8 @@
|
||||||
|
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
#define M25P16_SPI_INSTANCE SPI2
|
#define FLASH_SPI_INSTANCE SPI2
|
||||||
#define M25P16_CS_PIN PC14
|
#define FLASH_CS_PIN PC14
|
||||||
|
|
||||||
#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
|
#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
|
||||||
|
|
||||||
|
|
|
@ -90,9 +90,9 @@
|
||||||
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
|
||||||
|
|
||||||
|
|
||||||
#define M25P16_CS_PIN PB12
|
#define FLASH_CS_PIN PB12
|
||||||
#define M25P16_SPI_INSTANCE SPI2
|
#define FLASH_SPI_INSTANCE SPI2
|
||||||
#define M25P16_SPI_SHARED
|
#define FLASH_SPI_SHARED
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
|
|
||||||
|
|
|
@ -176,8 +176,8 @@
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#define M25P16_CS_PIN PB3
|
#define FLASH_CS_PIN PB3
|
||||||
#define M25P16_SPI_INSTANCE SPI3
|
#define FLASH_SPI_INSTANCE SPI3
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
|
|
||||||
|
|
|
@ -106,12 +106,12 @@
|
||||||
#define USE_MPU_DATA_READY_SIGNAL
|
#define USE_MPU_DATA_READY_SIGNAL
|
||||||
|
|
||||||
/*----------Flash Config--------*/
|
/*----------Flash Config--------*/
|
||||||
#define M25P16_CS_PIN PB3
|
#define FLASH_CS_PIN PB3
|
||||||
|
|
||||||
#if defined(REVOLTOSD)
|
#if defined(REVOLTOSD)
|
||||||
#define M25P16_SPI_INSTANCE SPI2
|
#define FLASH_SPI_INSTANCE SPI2
|
||||||
#else
|
#else
|
||||||
#define M25P16_SPI_INSTANCE SPI3
|
#define FLASH_SPI_INSTANCE SPI3
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -81,9 +81,8 @@
|
||||||
#define RTC6705_CS_PIN PA4
|
#define RTC6705_CS_PIN PA4
|
||||||
#define RTC6705_SPI_INSTANCE SPI1
|
#define RTC6705_SPI_INSTANCE SPI1
|
||||||
|
|
||||||
#define M25P16_CS_GPIO GPIOB
|
#define FLASH_CS_PIN PB12
|
||||||
#define M25P16_CS_PIN PB12
|
#define FLASH_SPI_INSTANCE SPI2
|
||||||
#define M25P16_SPI_INSTANCE SPI2
|
|
||||||
|
|
||||||
#define USE_ADC
|
#define USE_ADC
|
||||||
|
|
||||||
|
|
|
@ -65,8 +65,8 @@
|
||||||
#define USE_BARO_MS5611
|
#define USE_BARO_MS5611
|
||||||
//#define USE_BARO_BMP280
|
//#define USE_BARO_BMP280
|
||||||
|
|
||||||
#define M25P16_CS_PIN PB3
|
#define FLASH_CS_PIN PB3
|
||||||
#define M25P16_SPI_INSTANCE SPI3
|
#define FLASH_SPI_INSTANCE SPI3
|
||||||
|
|
||||||
//#define RFM22B_CS_PIN PA15
|
//#define RFM22B_CS_PIN PA15
|
||||||
//#define RFM22B_SPI_INSTANCE SPI3
|
//#define RFM22B_SPI_INSTANCE SPI3
|
||||||
|
|
|
@ -78,8 +78,8 @@
|
||||||
|
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
#define M25P16_CS_PIN PC0
|
#define FLASH_CS_PIN PC0
|
||||||
#define M25P16_SPI_INSTANCE SPI3
|
#define FLASH_SPI_INSTANCE SPI3
|
||||||
|
|
||||||
// *************** OSD *****************************
|
// *************** OSD *****************************
|
||||||
#define USE_SPI_DEVICE_2
|
#define USE_SPI_DEVICE_2
|
||||||
|
|
|
@ -48,8 +48,8 @@
|
||||||
//#define USE_FLASHFS
|
//#define USE_FLASHFS
|
||||||
//#define USE_FLASH_M25P16
|
//#define USE_FLASH_M25P16
|
||||||
|
|
||||||
//#define M25P16_CS_PIN PB12
|
//#define FLASH_CS_PIN PB12
|
||||||
//#define M25P16_SPI_INSTANCE SPI2
|
//#define FLASH_SPI_INSTANCE SPI2
|
||||||
|
|
||||||
#define USE_GYRO
|
#define USE_GYRO
|
||||||
#define USE_GYRO_SPI_MPU6500
|
#define USE_GYRO_SPI_MPU6500
|
||||||
|
|
|
@ -163,8 +163,8 @@
|
||||||
#define USE_SPI
|
#define USE_SPI
|
||||||
#define USE_SPI_DEVICE_2 // PB12,13,14,15 on AF5
|
#define USE_SPI_DEVICE_2 // PB12,13,14,15 on AF5
|
||||||
|
|
||||||
#define M25P16_CS_PIN PB12
|
#define FLASH_CS_PIN PB12
|
||||||
#define M25P16_SPI_INSTANCE SPI2
|
#define FLASH_SPI_INSTANCE SPI2
|
||||||
|
|
||||||
#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
|
#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
|
||||||
#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
|
#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
|
||||||
|
|
|
@ -69,8 +69,8 @@
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
|
|
||||||
#define M25P16_CS_PIN PB12
|
#define FLASH_CS_PIN PB12
|
||||||
#define M25P16_SPI_INSTANCE SPI2
|
#define FLASH_SPI_INSTANCE SPI2
|
||||||
// SPI1
|
// SPI1
|
||||||
// PB5 SPI1_MOSI
|
// PB5 SPI1_MOSI
|
||||||
// PB4 SPI1_MISO
|
// PB4 SPI1_MISO
|
||||||
|
|
|
@ -90,8 +90,8 @@
|
||||||
#define SPI2_MISO_PIN PB14
|
#define SPI2_MISO_PIN PB14
|
||||||
#define SPI2_MOSI_PIN PB15
|
#define SPI2_MOSI_PIN PB15
|
||||||
|
|
||||||
#define M25P16_CS_PIN SPI2_NSS_PIN
|
#define FLASH_CS_PIN SPI2_NSS_PIN
|
||||||
#define M25P16_SPI_INSTANCE SPI2
|
#define FLASH_SPI_INSTANCE SPI2
|
||||||
|
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
|
|
|
@ -87,8 +87,8 @@
|
||||||
/*
|
/*
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
#define M25P16_CS_PIN PB3
|
#define FLASH_CS_PIN PB3
|
||||||
#define M25P16_SPI_INSTANCE SPI3
|
#define FLASH_SPI_INSTANCE SPI3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define USE_VCP
|
#define USE_VCP
|
||||||
|
|
|
@ -97,8 +97,8 @@
|
||||||
#define SPI2_MISO_PIN PB14
|
#define SPI2_MISO_PIN PB14
|
||||||
#define SPI2_MOSI_PIN PB15
|
#define SPI2_MOSI_PIN PB15
|
||||||
|
|
||||||
#define M25P16_CS_PIN PB12
|
#define FLASH_CS_PIN PB12
|
||||||
#define M25P16_SPI_INSTANCE SPI2
|
#define FLASH_SPI_INSTANCE SPI2
|
||||||
|
|
||||||
#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
|
#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
|
||||||
#define USE_ADC
|
#define USE_ADC
|
||||||
|
|
|
@ -113,8 +113,8 @@
|
||||||
// Dataflash
|
// Dataflash
|
||||||
#define USE_FLASHFS
|
#define USE_FLASHFS
|
||||||
#define USE_FLASH_M25P16
|
#define USE_FLASH_M25P16
|
||||||
#define M25P16_CS_PIN SPI3_NSS_PIN
|
#define FLASH_CS_PIN SPI3_NSS_PIN
|
||||||
#define M25P16_SPI_INSTANCE SPI3
|
#define FLASH_SPI_INSTANCE SPI3
|
||||||
|
|
||||||
// ADC inputs
|
// ADC inputs
|
||||||
#define USE_ADC
|
#define USE_ADC
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue