flash r/w

This commit is contained in:
Conor Patrick
2018-10-20 21:02:59 -04:00
parent 2bb4a9fe16
commit 2108f0f286
4 changed files with 132 additions and 10 deletions

View File

@@ -0,0 +1,15 @@
#ifndef _FLASH_H_H
#define _FLASH_H_H
void flash_erase_page(uint8_t page);
void flash_write_dword(uint32_t addr, uint64_t data);
void flash_write(uint32_t addr, uint8_t * data, size_t sz);
#define FLASH_PAGE_SIZE 2048
#define flash_addr(page) (0x08000000 + ((page)*FLASH_PAGE_SIZE))
#define FLASH_PAGE_START 0
#define FLASH_PAGE_END 127
#endif