Johny Mattsson 0fe0096c04 Platform flash layer updated for ESP32.
It would appear my ESP3212 only has a 2MB flash chip despite the
bootloader saying 4MB.
2016-09-22 14:56:40 +10:00

21 lines
608 B
C

#ifndef __FLASH_API_H__
#define __FLASH_API_H__
#include "platform.h"
#define FLASH_SIZE_1MBYTE ( 1 * 1024 * 1024)
#define FLASH_SIZE_2MBYTE ( 2 * 1024 * 1024)
#define FLASH_SIZE_4MBYTE ( 4 * 1024 * 1024)
#define FLASH_SIZE_8MBYTE ( 8 * 1024 * 1024)
#define FLASH_SIZE_16MBYTE (16 * 1024 * 1024)
uint32_t flash_safe_get_size_byte(void);
uint16_t flash_safe_get_sec_num(void);
uint32_t flash_rom_get_size_byte(void);
bool flash_rom_set_size_byte(uint32_t);
uint16_t flash_rom_get_sec_num(void);
uint8_t flash_rom_get_mode(void);
uint32_t flash_rom_get_speed(void);
#endif // __FLASH_API_H__