Hallo! Ich versuche ein Array of Char aus dem Flash an einen UART zu senden (mega8515). Ich habe mich so weit es ging ans GCC-Tutorial http://www.mikrocontroller.net/articles/AVR-GCC-Tutorial#Vereinfachung_f.C3.BCr_Zeichenketten_.28Strings.29_im_Flash gehalten (kein String Ende Zeichen), bekomme aber jetzt immer eine Compilerwarnung: "pointer targets in passing argument 1 of 'UART_SendCMD_p' differ in signedness" Was mache ich falsch?
1 | const uint8_t SCS_CMD_RESET[] PROGMEM = {0xAA, 0xAA, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x3F, 0x01, 0x00, 0x5F, 0x55, 0x55} ; |
2 | |
3 | void UART_Tx_Byte(char DataByte) |
4 | {
|
5 | // Waint for UART ready
|
6 | while (! (UCSRA & (1<<UDRE))) |
7 | |
8 | // Put DataByte to UART Transmit Buffer
|
9 | UDR = DataByte ; |
10 | }
|
11 | |
12 | void UART_SendCMD_p(const char *cmd, uint8_t len) |
13 | {
|
14 | while (len--) |
15 | {
|
16 | UART_Tx_Byte(pgm_read_byte(cmd)) ; |
17 | cmd++ ; |
18 | }
|
19 | }
|
20 | |
21 | void main(void) |
22 | {
|
23 | // Aufruf und "pointer targets in passing argument 1 of 'UART_SendCMD_p' differ in signedness"
|
24 | UART_SendCMD_p(SCS_CMD_RESET, sizeof(SCS_CMD_RESET)) ; |
25 | }
|
Gruß Daniel