2016-09-16 10:10:18 +02:00
|
|
|
#ifndef _CPU_ESP32_H_
|
|
|
|
#define _CPU_ESP32_H_
|
|
|
|
|
|
|
|
#include "sdkconfig.h"
|
2019-07-22 11:13:43 +02:00
|
|
|
#include "esp_spi_flash.h"
|
2016-09-16 10:10:18 +02:00
|
|
|
|
2016-09-20 05:35:56 +02:00
|
|
|
#define NUM_UART 3
|
2016-09-16 10:10:18 +02:00
|
|
|
|
|
|
|
#define INTERNAL_FLASH_SECTOR_SIZE SPI_FLASH_SEC_SIZE
|
|
|
|
#define INTERNAL_FLASH_WRITE_UNIT_SIZE 4
|
|
|
|
#define INTERNAL_FLASH_READ_UNIT_SIZE 4
|
|
|
|
|
2016-09-22 09:18:22 +02:00
|
|
|
#define FLASH_SEC_NUM (flash_safe_get_sec_num())
|
2016-09-16 10:10:18 +02:00
|
|
|
|
2016-09-22 09:18:22 +02:00
|
|
|
// Determine whether an address is in the flash-cache range
|
|
|
|
static inline bool is_cache_flash_addr (uint32_t addr)
|
|
|
|
{
|
|
|
|
return addr >= 0x3F400000 && addr < 0x3FC00000;
|
|
|
|
}
|
2016-09-16 10:10:18 +02:00
|
|
|
|
|
|
|
#endif
|