mirror of
				https://github.com/esp8266/Arduino.git
				synced 2025-10-30 04:26:50 +03:00 
			
		
		
		
	* Do not write more data than requested on PUYA flashes * Always align flash reads/writes to 4 bytes * fixup! Always align flash reads/writes to 4 bytes This commit simplifies the code a bit and fixes a bug that caused wrong number of bytes to be written * fixup! Always align flash reads/writes to 4 bytes * fixup! Always align flash reads/writes to 4 bytes * Check for result before additional read/write * Add overloads for unaligned reads/writes * fixup! Add overloads for unaligned reads/writes * fixup! Add overloads for unaligned reads/writes * fixup! Add overloads for unaligned reads/writes * fixup! Add overloads for unaligned reads/writes * fixup! Add overloads for unaligned reads/writes * fixup! Add overloads for unaligned reads/writes * fixup! Add overloads for unaligned reads/writes * Add tests for flashRead/flashWrite * fixup! Add overloads for unaligned reads/writes * fixup! Add tests for flashRead/flashWrite * fixup! Add tests for flashRead/flashWrite * fixup! Add overloads for unaligned reads/writes
		
			
				
	
	
		
			17 lines
		
	
	
		
			534 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			534 B
		
	
	
	
		
			C
		
	
	
	
	
	
| #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 FLASH_PAGE_SIZE 0x100
 | |
| #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
 |