Merge pull request #6874 from AlienWiiBF/FLASH_GENERIC

Update Flash driver for generic target
This commit is contained in:
Michael Keller 2018-10-03 23:37:25 +13:00 committed by GitHub
commit b4a5133039
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 4 deletions

View File

@ -37,11 +37,7 @@ PG_REGISTER_WITH_RESET_FN(flashConfig_t, flashConfig, PG_FLASH_CONFIG, 0);
void pgResetFn_flashConfig(flashConfig_t *flashConfig)
{
#ifdef FLASH_CS_PIN
flashConfig->csTag = IO_TAG(FLASH_CS_PIN);
#else
flashConfig->csTag = IO_TAG_NONE;
#endif
flashConfig->spiDevice = SPI_DEV_TO_CFG(spiDeviceByInstance(FLASH_SPI_INSTANCE));
}
#endif

View File

@ -30,6 +30,18 @@
#endif
#endif
// pg/flash
#ifdef USE_FLASH_M25P16
#ifndef FLASH_CS_PIN
#define FLASH_CS_PIN NONE
#endif
#ifndef FLASH_SPI_INSTANCE
#define FLASH_SPI_INSTANCE NULL
#endif
#endif
// pg/bus_i2c
#ifdef I2C_FULL_RECONFIGURABILITY