this version of nvm-write works because it erases the sector first
before writting it.
This commit is contained in:
parent
48732b5379
commit
d231cd0120
3 changed files with 152 additions and 0 deletions
|
@ -39,5 +39,9 @@ typedef enum
|
|||
extern volatile nvmErr_t (*nvm_detect)(nvmInterface_t nvmInterface,nvmType_t* pNvmType);
|
||||
extern volatile nvmErr_t (*nvm_read)(nvmInterface_t nvmInterface , nvmType_t nvmType , void *pDest, uint32_t address, uint32_t numBytes);
|
||||
extern volatile nvmErr_t (*nvm_write)(nvmInterface_t nvmInterface, nvmType_t nvmType ,void *pSrc, uint32_t address, uint32_t numBytes);
|
||||
/* sector bit field selects which sector to erase */
|
||||
/* SST flash has 32 sectors 4096 bytes each */
|
||||
/* bit 0 is the first sector, bit 31 is the last */
|
||||
extern volatile nvmErr_t (*nvm_erase)(nvmInterface_t nvmInterface, nvmType_t nvmType ,uint32_t sectorBitfield);
|
||||
extern volatile void(*nvm_setsvar)(uint32_t zero_for_awesome);
|
||||
#endif //NVM_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue