mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
Building with SDCC 4.6.0 emits tons of warnings e.g.: cmd_parser.c:31: warning 356: object in read-only code space should be const cmd_parser.c:36: warning 357: pointer to object in read-only code space should be pointer to const These of course become fatal when building with --Werror. Comparing resultant binaries, it seems that a single string is shifted (deduplication?) but the numbers emitted at the end of the build are otherwise identical.
26 lines
647 B
C
26 lines
647 B
C
#ifndef _RTL837X_FLASH_H_
|
|
#define _RTL837X_FLASH_H_
|
|
|
|
// SPI FLASH MEMORY PAGE SIZE.
|
|
#define FLASH_PAGE_SIZE 0x100
|
|
// SPI FLASH MEMORY SECTOR SIZE = ERASE SIZE.
|
|
#define FLASH_SECTOR_SIZE 0x1000
|
|
|
|
#if (FLASH_SECTOR_SIZE % FLASH_PAGE_SIZE) != 0
|
|
#error "FLASH_SECTOR_SIZE must be a multiple of FLASH_PAGE_SIZE"
|
|
#endif
|
|
|
|
|
|
void flash_init(uint8_t enable_dio);
|
|
void flash_read_uid(void);
|
|
void flash_dump(uint8_t len);
|
|
void flash_read_jedecid(void);
|
|
void flash_read_security(void);
|
|
void flash_sector_erase(void);
|
|
void flash_read_bulk(__xdata uint8_t *dst);
|
|
void flash_write_bytes(__xdata uint8_t *ptr);
|
|
__code const char* get_flash_size_str(void);
|
|
|
|
#endif
|
|
|