fix warnings
This commit is contained in:
parent
2b4ead0efe
commit
8f6e672cc0
3 changed files with 14 additions and 14 deletions
|
@ -36,12 +36,12 @@ typedef enum
|
|||
|
||||
/* ROM code seems to be THUMB */
|
||||
/* 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 nvmErr_t (*nvm_detect)(nvmInterface_t nvmInterface,nvmType_t* pNvmType);
|
||||
extern nvmErr_t (*nvm_read)(nvmInterface_t nvmInterface , nvmType_t nvmType , void *pDest, uint32_t address, uint32_t numBytes);
|
||||
extern 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);
|
||||
extern nvmErr_t (*nvm_erase)(nvmInterface_t nvmInterface, nvmType_t nvmType ,uint32_t sectorBitfield);
|
||||
extern void(*nvm_setsvar)(uint32_t zero_for_awesome);
|
||||
#endif //NVM_H
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
#include "nvm.h"
|
||||
|
||||
volatile nvmErr_t (*nvm_detect)
|
||||
nvmErr_t (*nvm_detect)
|
||||
(nvmInterface_t nvmInterface,nvmType_t* pNvmType)
|
||||
= (void *) 0x00006cb9;
|
||||
|
||||
volatile nvmErr_t (*nvm_read)
|
||||
nvmErr_t (*nvm_read)
|
||||
(nvmInterface_t nvmInterface , nvmType_t nvmType , void *pDest, uint32_t address, uint32_t numBytes)
|
||||
= (void *) 0x00006d69;
|
||||
|
||||
volatile nvmErr_t (*nvm_write)
|
||||
nvmErr_t (*nvm_write)
|
||||
(nvmInterface_t nvmInterface, nvmType_t nvmType ,void *pSrc, uint32_t address, uint32_t numBytes)
|
||||
= (void *) 0x00006ec5;
|
||||
|
||||
volatile nvmErr_t (*nvm_erase)
|
||||
nvmErr_t (*nvm_erase)
|
||||
(nvmInterface_t nvmInterface, nvmType_t nvmType ,uint32_t sectorBitfield)
|
||||
= (void*) 0x00006e05;
|
||||
|
||||
volatile void(*nvm_setsvar)
|
||||
void(*nvm_setsvar)
|
||||
(uint32_t zero_for_awesome)
|
||||
= (void *)0x00007085;
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
#define READ_ADDR 0x1F000
|
||||
#define NBYTES 1024
|
||||
|
||||
void putc(uint8_t c);
|
||||
void puts(uint8_t *s);
|
||||
void putc(char c);
|
||||
void puts(char *s);
|
||||
void put_hex(uint8_t x);
|
||||
void put_hex16(uint16_t x);
|
||||
void put_hex32(uint32_t x);
|
||||
|
@ -77,12 +77,12 @@ void main(void) {
|
|||
while(1) {continue;};
|
||||
}
|
||||
|
||||
void putc(uint8_t c) {
|
||||
void putc(char c) {
|
||||
while(*UT1CON == 31); /* wait for there to be room in the buffer */
|
||||
*UART1_DATA = c;
|
||||
}
|
||||
|
||||
void puts(uint8_t *s) {
|
||||
void puts(char *s) {
|
||||
while(s && *s!=0) {
|
||||
putc(*s++);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue