diff --git a/Makefile b/Makefile index 6ddfe5c22..6337154cb 100644 --- a/Makefile +++ b/Makefile @@ -61,6 +61,7 @@ ALL = $(TESTS:.c=.srec) $(TESTS:.c=.bin) $(TESTS:.c=.dis) all: src/start.o src/isr.o $(ALL) tests/nvm-read.obj: src/maca.o src/nvm.o +tests/nvm-write.obj: src/maca.o src/nvm.o tests/rftest-rx.obj: src/maca.o src/nvm.o tests/rftest-tx.obj: src/maca.o src/nvm.o tests/tmr-ints.obj: src/isr.o diff --git a/include/nvm.h b/include/nvm.h index e76313c40..7b31d3b1d 100644 --- a/include/nvm.h +++ b/include/nvm.h @@ -38,5 +38,6 @@ typedef enum /* need to be in a THUMB block before calling them */ 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); extern volatile void(*nvm_setsvar)(uint32_t zero_for_awesome); #endif //NVM_H diff --git a/src/nvm.c b/src/nvm.c index 0aa5bf249..2a4426dfe 100644 --- a/src/nvm.c +++ b/src/nvm.c @@ -1,5 +1,6 @@ #include "nvm.h" -/*NVM_Write 0x00006ec5*/ + volatile nvmErr_t (*nvm_detect)(nvmInterface_t nvmInterface,nvmType_t* pNvmType) = 0x00006cb9; volatile nvmErr_t (*nvm_read)(nvmInterface_t nvmInterface , nvmType_t nvmType , void *pDest, uint32_t address, uint32_t numBytes) = 0x00006d69; +volatile nvmErr_t (*nvm_write)(nvmInterface_t nvmInterface, nvmType_t nvmType ,void *pSrc, uint32_t address, uint32_t numBytes) = 0x00006ec5; volatile void(*nvm_setsvar)(uint32_t zero_for_awesome) = 0x00007085;