From 8f6e672cc045d632e6ab416f70c6c371102bc7f3 Mon Sep 17 00:00:00 2001 From: Mariano Alvira Date: Fri, 26 Feb 2010 12:53:21 -0500 Subject: [PATCH] fix warnings --- libmc1322x/include/nvm.h | 10 +++++----- libmc1322x/nvm.c | 10 +++++----- tests/nvm-read.c | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/libmc1322x/include/nvm.h b/libmc1322x/include/nvm.h index 0261f2be3..15133a2f3 100644 --- a/libmc1322x/include/nvm.h +++ b/libmc1322x/include/nvm.h @@ -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 diff --git a/libmc1322x/nvm.c b/libmc1322x/nvm.c index 5bd902084..6a9d14211 100644 --- a/libmc1322x/nvm.c +++ b/libmc1322x/nvm.c @@ -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; diff --git a/tests/nvm-read.c b/tests/nvm-read.c index 7cbbc2d4c..9aa8509fe 100644 --- a/tests/nvm-read.c +++ b/tests/nvm-read.c @@ -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++); }