mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
Renamed and moved FLASH_PAGE_SIZE; added compile-time check
This commit is contained in:
1 parent
9714818b1f
commit
22aaa9fbfe
2 files changed
+13
-8
No files matched your search
@@ -1,8 +1,16 @@
|
||||
#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_write_enable(void);
|
||||
|
||||
Reference in new issue
Block a user