1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-12 01:53:07 +03:00

cleanup/unify flash sector size define value (#5327)

* cleanup/unify sector size define value

* replicate spi_flash_sec_size.h file for host tests

* further flash geometry cleanup, remove host test duplicate file
This commit is contained in:
Develo
2018-11-24 02:59:12 -03:00
committed by GitHub
parent cf21dfda64
commit 3d70f43277
7 changed files with 35 additions and 36 deletions

View File

@ -25,6 +25,8 @@
#ifndef SPI_FLASH_H
#define SPI_FLASH_H
#include <spi_flash_geometry.h>
#ifdef __cplusplus
extern "C" {
#endif
@ -44,8 +46,6 @@ typedef struct{
uint32 status_mask;
} SpiFlashChip;
#define SPI_FLASH_SEC_SIZE 4096
extern SpiFlashChip * flashchip; // in ram ROM-BIOS
uint32 spi_flash_get_id(void);

View File

@ -0,0 +1,15 @@
#ifndef SPI_FLASH_GEOMETRY_H
#define SPI_FLASH_GEOMETRY_H
/* The flash geometry is meant to be unified here. This header file should be included wherever needed.
* Beware: this file is needed by eboot as well as the Arduino core.
*/
#define FLASH_SECTOR_SIZE 0x1000
#define FLASH_BLOCK_SIZE 0x10000
#define APP_START_OFFSET 0x1000
//pulled this define from spi_flash.h for reuse in the Arduino core without pulling in a bunch of other stuff
#define SPI_FLASH_SEC_SIZE FLASH_SECTOR_SIZE
#endif

View File

@ -29,8 +29,8 @@
extern "C" {
#endif
#include <spi_flash_geometry.h>
#define SPI_FLASH_SEC_SIZE 4096
#define LIMIT_ERASE_SIZE 0x10000
#define USER_BIN1 0x00