LCD Ansteuerung C18 -> XC8

OP #4941908
Lesenswert?

Hallo Zusammen,

schreibe gerade meine Ansteuerung von einem LCD um. Am C18 läuft dieser 
Code. Beim XC8 meckert der Compiler an zwei Stellen:
error: (267) bad storage class

Wer kann helfen?
1
Header-File:
2
extern void LCD_PRINT(char line, char pos, auto const rom char *str);
3
extern void LCD_PRINTF(int line, int pos, auto const rom char *fmt, ...);// auto const MEM_MODEL rom char *fmt, ...)
4

5
C-File:
6
void LCD_PRINT(char line, char pos, auto const rom char *str)
7
{
8
  if (line==1)
9
  {  
10
    LCD_Command(pos|0x80);
11
  }  
12
  else
13
  {  
14
    LCD_Command((pos+0x40)|0x80);
15
  }
16

17
  while(*str)
18
  {
19
    LCD_Data(*str);
20
       str++;
21
  }
22
}
23

24
void LCD_PRINTF(int line, int pos, auto const rom char *fmt, ...) // auto const MEM_MODEL rom char *fmt, ...)
25
{ 
26
    va_list args;
27
    va_start(args,fmt);
28
    
29
    vsprintf(cString, fmt, args);
30

31
    if(line == 1)
32
    {
33
        LCD_Command(pos|LINE1);
34
    }
35
    else
36
    {
37
        LCD_Command(pos|LINE2);
38
    }
39

40
    LCD_PutCString(cString);
41

42
    va_end(args);
43
}
44

45
Aufruf:
46
        LCD_PRINT(1,0,"Hallo Welt");
47
        LCD_PRINT(2,0,"Test");
48

49
        int f = 64, g = 0xff;
50
        LCD_PRINTF(2,0,"%-#x %-#x %c",f,g,f);

Viele Grüße
Ingo
Gast #4941963
Lesenswert?

Das "rom" ist beim CX8 raus geflogen.

const char[] hat den selben Effekt wie das alte rom char[]. Funktionen 
wie strlen() usw. gibt es doppelt. Mit und ohne const.

Recht gewöhnungsbedürftig.

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren