Skip to content

Commit 94ceccb

Browse files
committed
cpu/esp_common: inverse MCU_* conditionals in periph/flash
The MCU_* conditionals are inverted so that they can be tested for ESP8266. In all other cases the MCU is any ESP32x SoC
1 parent a7ade35 commit 94ceccb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

cpu/esp_common/periph/flash.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,21 @@
3333

3434
#include "esp_partition.h"
3535

36-
#ifdef MCU_ESP32
36+
#ifndef MCU_ESP8266
3737

3838
#include "esp_flash_partitions.h"
3939
#include "esp_spi_flash.h"
4040
#include "rom/cache.h"
4141
#include "rom/spi_flash.h"
4242
#include "soc/soc.h"
4343

44-
#else /* MCU_ESP32 */
44+
#else /* !MCU_ESP8266 */
4545

4646
#include "esp_flash_data_types.h"
4747
#include "rom_functions.h"
4848
#include "spi_flash.h"
4949

50-
#endif /* MCU_ESP32 */
50+
#endif /* !MCU_ESP8266 */
5151

5252
#define ENABLE_DEBUG 0
5353
#include "debug.h"
@@ -166,13 +166,13 @@ void spi_flash_drive_init (void)
166166
}
167167
}
168168

169-
#ifdef MCU_ESP32
169+
#ifndef MCU_ESP8266
170170
/* map the partition top address to next higher multiple of 0x100000 (1 MB) */
171171
part_top = (part_top + 0x100000) & ~0xfffff;
172-
#else /* MCU_ESP32 */
172+
#else /* !MCU_ESP8266 */
173173
/* map the partition top address to next higher multiple of 0x80000 (512 kB) */
174174
part_top = (part_top + 0x80000) & ~0x7ffff;
175-
#endif /* MCU_ESP32 */
175+
#endif /* !MCU_ESP8266 */
176176

177177
/*
178178
* if flash drive start address is not configured, use the determined

0 commit comments

Comments
 (0)