Forum: Mikrocontroller und Digitale Elektronik arduino -> USB_Host_Shield_2.0 -> hub_demo -> error


von Eder H. (pba89)


Lesenswert?

Hallo,

ich verwende Arduino 1.5.8 und habe die USB Host Shield library v.2.0 
(https://github.com/felis/USB_Host_Shield_2.0) importiert.

Wenn ich andere example sketches teste gibt es keine Fehler, doch bei 
hub_demo 
(https://github.com/felis/USB_Host_Shield_2.0/blob/master/examples/hub_demo/hub_demo.ino) 
liefert der compiler folgendes:
1
hub_demo.ino:23:19: error: variable or field 'printProgStr' declared void
2
hub_demo.ino:23:19: error: 'prog_char' was not declared in this scope
3
hub_demo.ino: In function 'void PrintDescriptors(uint8_t)':
4
hub_demo.ino:72:33: error: 'printProgStr' was not declared in this scope
5
hub_demo.ino:82:37: error: 'printProgStr' was not declared in this scope
6
hub_demo.ino: In function 'byte getdevdescr(byte, byte&)':
7
hub_demo.ino:121:30: error: 'printProgStr' was not declared in this scope
8
hub_demo.ino: In function 'void printhubdescr(uint8_t*, uint8_t)':
9
hub_demo.ino:159:53: error: 'printProgStr' was not declared in this scope
10
hub_demo.ino: In function 'byte getconfdescr(byte, byte)':
11
hub_demo.ino:212:32: error: 'printProgStr' was not declared in this scope
12
hub_demo.ino: In function 'void printconfdescr(uint8_t*)':
13
hub_demo.ino:266:31: error: 'printProgStr' was not declared in this scope
14
hub_demo.ino: In function 'void printintfdescr(uint8_t*)':
15
hub_demo.ino:285:30: error: 'printProgStr' was not declared in this scope
16
hub_demo.ino: In function 'void printepdescr(uint8_t*)':
17
hub_demo.ino:306:30: error: 'printProgStr' was not declared in this scope
18
hub_demo.ino: In function 'void printunkdescr(uint8_t*)':
19
hub_demo.ino:323:30: error: 'printProgStr' was not declared in this scope
20
hub_demo.ino: At global scope:
21
hub_demo.ino:338:19: error: variable or field 'printProgStr' declared void
22
hub_demo.ino:338:19: error: 'prog_char' was not declared in this scope
23
Fehler beim Übersetzen

Ich habe natürlich an den Dateien/der Library nichts geändert!

'printProgStr' wird am Ende der Datei definiert und ich nehme an in 
einem includierten Header-File deklariert. Ein Funktionsprototyp am 
Anfang der Datei brachte jedenfalls keine Änderung.

Ich hoffe jemand von euch kann mir helfen!
lg
Hans

von Sergey Maslyakov (Gast)


Lesenswert?

Try adding this line as the first line of your ".ino" file.

#define prog_char  const char PROGMEM

I am sorry, I forgot how to write in German :)


/Sergey

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.