Freakrs,
I copied the following from a working project:
//send complete API frame //Preamble for(uint8_t i = 0; i < sizeof preamble; i++) { usart_putchar1(preamble[i]); } //frame types and destination address for(uint8_t i = 0; i < sizeof lamp_addr[lamp]; i++) { usart_putchar1(lamp_addr[j][i]); } //variables usart_putchar1(lamp); usart_putchar1(intensity); usart_putchar1(cmd); usart_putchar1(0x0D); usart_putchar1(CRC); } void usart_putchar1(uint8_t c) { while ((UCSR1A & DATA_REGISTER_EMPTY)==0); UDR1=c; }
Here is what is in the 'preamble':
uint8_t preamble[] = {0x7E, 0x00, 0x12};
And in the 'lamp_addr':
uint8_t lamp_addr[3][14] = { {0x10, 0x00, 0x00, 0x13, 0xA2, 0x00, 0x41, 0x05, 0xA2, 0xF1, 0xFF, 0xFE, 0x00, 0xC0}, {0x10, 0x00, 0x00, 0x13, 0xA2, 0x00, 0x41, 0x05, 0xA2, 0xA4, 0xFF, 0xFE, 0x00, 0xC0}, {0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFE, 0x00, 0xC0} };
when I hit BUILD, I get the following warning:
Severity Code Description Project File Line
Warning implicit declaration of function 'usart_putchar1' [-Wimplicit-function-declaration] Starlight_Controller C:\Users\jgmDESIGNS-Laptop\Documents\Roger Nedel\Engineering\Master Projects\Starlight_Controller\Starlight_Controller\Starlight_Controller\main.c 205
Warning conflicting types for 'usart_putchar1' Starlight_Controller C:\Users\jgmDESIGNS-Laptop\Documents\Roger Nedel\Engineering\Master Projects\Starlight_Controller\Starlight_Controller\Starlight_Controller\main.c 209
the first warning points to:
//send complete API frame //Preamble for(uint8_t i = 0; i < sizeof preamble; i++) { usart_putchar1(preamble[i]); }
and the second warning points to:
oid usart_putchar1(uint8_t c) { while ((UCSR1A & DATA_REGISTER_EMPTY)==0); UDR1=c; }
Do not understand why I am getting the waring, which to me is a potential error.
any suggestions?
JIm