fix(esp): Fix getFlashChipMode breaking on S3 and C3 (#9758)
This commit is contained in:
parent
e33022f3f0
commit
ffeebf8da8
2 changed files with 6 additions and 4 deletions
|
|
@ -71,9 +71,10 @@ extern "C" {
|
||||||
// REG_SPI_BASE is not defined for S3/C3 ??
|
// REG_SPI_BASE is not defined for S3/C3 ??
|
||||||
|
|
||||||
#if CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32C3
|
#if CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32C3
|
||||||
#ifndef REG_SPI_BASE
|
#ifdef REG_SPI_BASE
|
||||||
#define REG_SPI_BASE(i) (DR_REG_SPI1_BASE + (((i) > 1) ? (((i) * 0x1000) + 0x20000) : (((~(i)) & 1) * 0x1000)))
|
#undef REG_SPI_BASE
|
||||||
#endif // REG_SPI_BASE
|
#endif // REG_SPI_BASE
|
||||||
|
#define REG_SPI_BASE(i) (DR_REG_SPI1_BASE + (((i) > 1) ? (((i) * 0x1000) + 0x20000) : (((~(i)) & 1) * 0x1000)))
|
||||||
#endif // TARGET
|
#endif // TARGET
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -113,9 +113,10 @@ static void printFlashInfo(void) {
|
||||||
#endif
|
#endif
|
||||||
// REG_SPI_BASE is not defined for S3/C3 ??
|
// REG_SPI_BASE is not defined for S3/C3 ??
|
||||||
#if CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32C3
|
#if CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32C3
|
||||||
#ifndef REG_SPI_BASE
|
#ifdef REG_SPI_BASE
|
||||||
#define REG_SPI_BASE(i) (DR_REG_SPI1_BASE + (((i) > 1) ? (((i) * 0x1000) + 0x20000) : (((~(i)) & 1) * 0x1000)))
|
#undef REG_SPI_BASE
|
||||||
#endif // REG_SPI_BASE
|
#endif // REG_SPI_BASE
|
||||||
|
#define REG_SPI_BASE(i) (DR_REG_SPI1_BASE + (((i) > 1) ? (((i) * 0x1000) + 0x20000) : (((~(i)) & 1) * 0x1000)))
|
||||||
#endif // TARGET
|
#endif // TARGET
|
||||||
|
|
||||||
chip_report_printf("Flash Info:\n");
|
chip_report_printf("Flash Info:\n");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue