Fix compiler warnings
This commit is contained in:
parent
66cb742a67
commit
0aeec3e680
8 changed files with 29 additions and 31 deletions
Binary file not shown.
|
@ -176,6 +176,8 @@ unsigned char cc1100_write(unsigned char addr,unsigned char* data, unsigned char
|
|||
unsigned short i;
|
||||
unsigned char status;
|
||||
unsigned char x;
|
||||
|
||||
(void)(x);
|
||||
|
||||
FIOCLR0 = CS1;
|
||||
while (FIOPIN0 & MISO1);
|
||||
|
@ -197,8 +199,10 @@ unsigned char cc1100_write(unsigned char addr,unsigned char* data, unsigned char
|
|||
unsigned char cc1100_write1(unsigned char addr,unsigned char data) {
|
||||
|
||||
unsigned char status;
|
||||
unsigned char x;
|
||||
volatile unsigned char x=0;
|
||||
|
||||
(void)(x);
|
||||
|
||||
FIOCLR0 = CS1;
|
||||
while (FIOPIN0 & MISO1);
|
||||
SSPDR = (addr | WRITE);
|
||||
|
|
|
@ -51,7 +51,7 @@ void fs20_decoder(void) {
|
|||
unsigned char FS20inbit = 0;
|
||||
unsigned char FS20protocol = PROTOCOL_UNKNOWN;
|
||||
unsigned short tempbyte = 0;
|
||||
unsigned char finish = 0;
|
||||
// unsigned char finish = 0;
|
||||
|
||||
unsigned long pulse = 0;
|
||||
unsigned long space = 0;
|
||||
|
@ -77,7 +77,7 @@ void fs20_decoder(void) {
|
|||
cc1100_strobe(SRX);
|
||||
|
||||
serial_puts("\n\r");
|
||||
|
||||
|
||||
while(KEY_Exit) {};
|
||||
while(!KEY_Exit)
|
||||
{
|
||||
|
@ -188,7 +188,7 @@ void fs20_decoder(void) {
|
|||
}
|
||||
|
||||
if(FS20protocol == PROTOCOL_WEATHER) {
|
||||
if(FS20_BETWEEN(pulse, 685, 1020) && FS20_BETWEEN(space, 200, 533))
|
||||
if(FS20_BETWEEN(pulse, 685, 1020) && FS20_BETWEEN(space, 200, 533))
|
||||
FS20inbit = 0;
|
||||
else if(FS20_BETWEEN(pulse, 200, 533) && FS20_BETWEEN(space, 685, 1020))
|
||||
FS20inbit = (1<<3);
|
||||
|
@ -215,7 +215,9 @@ void fs20_decoder(void) {
|
|||
FS20bitcounter = 0;
|
||||
}
|
||||
else {
|
||||
tempbyte = (tempbyte>>=1) | FS20inbit;
|
||||
//tempbyte = (tempbyte>>=1) | FS20inbit;
|
||||
tempbyte>>=1;
|
||||
tempbyte |= FS20inbit;
|
||||
if(FS20bitcounter++ == 8) {
|
||||
FS20inbyte[FS20bytecounter] = tempbyte;
|
||||
tempbyte = 0;
|
||||
|
@ -263,9 +265,7 @@ void fs20_decoder(void) {
|
|||
FS20bytecounter++;
|
||||
FS20parity = 0;
|
||||
if(FS20bytecounter == 0x0a) { //packet full received
|
||||
unsigned char dec[8];
|
||||
|
||||
dec[0] = FS20inbyte[1] ^ 0x89;
|
||||
for(x=9;x>1;x--) {
|
||||
FS20inbyte[x] = (FS20inbyte[x-1] + 0x24) ^ FS20inbyte[x];
|
||||
}
|
||||
|
@ -329,7 +329,7 @@ void fs20_decoder(void) {
|
|||
}
|
||||
|
||||
serial_puts("\n\r");
|
||||
finish = 0;
|
||||
//finish = 0;
|
||||
FS20bytecounter = 0;
|
||||
FS20protocol = PROTOCOL_UNKNOWN;
|
||||
}
|
||||
|
|
|
@ -372,8 +372,9 @@ void __attribute__ ((section (".text.fastcode"))) _do_rcuAlpha (
|
|||
void __attribute__ ((section (".text.fastcode"))) _do_rcuS (
|
||||
unsigned char x, unsigned char y, unsigned char m)
|
||||
{
|
||||
unsigned char q;
|
||||
volatile unsigned char q=0;
|
||||
|
||||
(void)(q);
|
||||
|
||||
if((x > BORDER_RIGHT))// | (x < BORDER_LEFT))
|
||||
return;
|
||||
|
@ -429,7 +430,7 @@ void __attribute__ ((section (".text.fastcode"))) _do_rcuS (
|
|||
void __attribute__ ((section(".text.fastcode"))) _draw_block(unsigned char x, unsigned char y, unsigned char w, unsigned char h, unsigned char c, unsigned char m)
|
||||
{
|
||||
unsigned char q,s;
|
||||
unsigned char yy,ss,vv,ww,xx;
|
||||
unsigned char yy,vv,ww,xx;
|
||||
unsigned char segm;
|
||||
is_drawing++;
|
||||
|
||||
|
@ -441,7 +442,6 @@ void __attribute__ ((section(".text.fastcode"))) _draw_block(unsigned char x, un
|
|||
if(h)
|
||||
{
|
||||
yy = h;
|
||||
ss = y >> 3;
|
||||
vv = y & 0x07;
|
||||
|
||||
ww = yy & 0x07;
|
||||
|
@ -555,7 +555,7 @@ void __attribute__ ((section(".text.fastcode"))) _draw_hline(unsigned char x, un
|
|||
void __attribute__ ((section(".text.fastcode"))) _draw_vline(unsigned char x, unsigned char y, unsigned char l, unsigned char c, unsigned char m)
|
||||
{
|
||||
unsigned char s;
|
||||
unsigned char yy,ss,vv,ww,xx;
|
||||
unsigned char yy,vv,ww,xx;
|
||||
unsigned char segm;
|
||||
is_drawing++;
|
||||
|
||||
|
@ -567,7 +567,6 @@ void __attribute__ ((section(".text.fastcode"))) _draw_vline(unsigned char x, un
|
|||
|
||||
|
||||
yy = l;
|
||||
ss = y >> 3;
|
||||
vv = y & 0x07;
|
||||
|
||||
ww = yy & 0x07;
|
||||
|
|
|
@ -672,13 +672,13 @@ unsigned char readByte(unsigned long ByteAddr)
|
|||
unsigned short readWord(unsigned long WordAddr)
|
||||
{
|
||||
//addr = unsigned short address
|
||||
int Offset;
|
||||
//int Offset;
|
||||
unsigned short Word;
|
||||
|
||||
//ASSERT((WordAddr * 2) >= FLASH1_BASE);
|
||||
//ASSERT((WordAddr * 2) < (FLASH1_BASE + FLASH_SIZE));
|
||||
|
||||
Offset = (WordAddr * 2) - FLASH1_BASE;
|
||||
//Offset = (WordAddr * 2) - FLASH1_BASE;
|
||||
|
||||
Word = *((unsigned short *)(WordAddr<<1));
|
||||
|
||||
|
|
|
@ -907,10 +907,8 @@ void test_irrec(void) {
|
|||
}
|
||||
|
||||
void erase_flash1(void)
|
||||
{ int x;
|
||||
|
||||
x = eraseFlash(1);
|
||||
|
||||
{
|
||||
eraseFlash(1);
|
||||
}
|
||||
|
||||
void test_sid(void) {
|
||||
|
@ -1062,8 +1060,7 @@ void test_sid(void) {
|
|||
}
|
||||
|
||||
void test_click(FORM* form, CONTROL* control) {
|
||||
unsigned char x;
|
||||
x=msgbox(45,BC_OKOnly | BC_DefaultButton1,control->caption);
|
||||
msgbox(45,BC_OKOnly | BC_DefaultButton1,control->caption);
|
||||
form_draw(form);
|
||||
}
|
||||
|
||||
|
@ -1076,8 +1073,7 @@ void test3_click(FORM* form, CONTROL* control) {
|
|||
}
|
||||
|
||||
void test_numbox(FORM* form, CONTROL* control) {
|
||||
unsigned char x;
|
||||
x=msgbox(30,BC_OKOnly | BC_DefaultButton1,"numbox click");
|
||||
msgbox(30,BC_OKOnly | BC_DefaultButton1,"numbox click");
|
||||
form_draw(form);
|
||||
}
|
||||
|
||||
|
@ -1091,14 +1087,12 @@ void test_numchange(FORM* form, CONTROL* control) {
|
|||
}
|
||||
|
||||
void test_change(FORM* form, CONTROL* control) {
|
||||
unsigned short x;
|
||||
x=msgbox(30,BC_OKOnly | BC_DefaultButton1,"geaendert");
|
||||
msgbox(30,BC_OKOnly | BC_DefaultButton1,"geaendert");
|
||||
form_draw(form);
|
||||
}
|
||||
|
||||
void formload (FORM* form)
|
||||
{
|
||||
unsigned char x;
|
||||
struct RFendpoint_* cur_ep;
|
||||
|
||||
cur_ep = openEP(&(form->controls[7])->tag1, 1, packet_RFenc);
|
||||
|
@ -1110,12 +1104,11 @@ void formload (FORM* form)
|
|||
RF_changestate(RFrx);
|
||||
}
|
||||
|
||||
x=msgbox(50,BC_OKOnly | BC_DefaultButton1,"Form open");
|
||||
msgbox(50,BC_OKOnly | BC_DefaultButton1,"Form open");
|
||||
}
|
||||
|
||||
void formclose (FORM* form)
|
||||
{
|
||||
unsigned char x;
|
||||
|
||||
if (form->tag)
|
||||
{
|
||||
|
@ -1123,7 +1116,7 @@ void formclose (FORM* form)
|
|||
RF_changestate(RFwor);
|
||||
}
|
||||
|
||||
x=msgbox(50,BC_OKOnly | BC_DefaultButton1,"Form close");
|
||||
msgbox(50,BC_OKOnly | BC_DefaultButton1,"Form close");
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -160,7 +160,7 @@ void printTime (unsigned char x, unsigned char y, struct time_* t, unsigned char
|
|||
void printDate (unsigned char x, unsigned char y, struct date_* d, unsigned char format)
|
||||
{
|
||||
unsigned char f;
|
||||
char s[16];
|
||||
char s[17];
|
||||
|
||||
f=activefont;
|
||||
set_font(SMALLFONT);
|
||||
|
|
|
@ -52,7 +52,9 @@ extern void uart0_irq(void);
|
|||
*/
|
||||
int serial_flush_input(void)
|
||||
{
|
||||
volatile unsigned int tmp;
|
||||
volatile unsigned int tmp=0;
|
||||
|
||||
(void)(tmp);
|
||||
|
||||
/* keep on reading as long as the receiver is not empty */
|
||||
while(RX_DATA(U0LSR)) {
|
||||
|
|
Loading…
Reference in a new issue