Witam.
Jestem w czasie kompilacji programu do obsługi wyświetlacza LCD (hd44780), z przykładu z książki "AVR & ARM7 Programowanie mikrokontrolerów dla każdego" - Paweł Borkowski. Wszystko robię według instrukcji, a kompilator wywala mi następujący błąd:
Nie możliwe, żeby tyle błędów było w książkowym przykładzie, myślę, że tu jakiś nie zauważalny drobiazg psuje mi całą zabawę.
Korzystam jeszcze z pliku HD44780.c autora Joerg Wunsch
Poniżej zamieszczę jeszcze kod programu main:
Jestem w czasie kompilacji programu do obsługi wyświetlacza LCD (hd44780), z przykładu z książki "AVR & ARM7 Programowanie mikrokontrolerów dla każdego" - Paweł Borkowski. Wszystko robię według instrukcji, a kompilator wywala mi następujący błąd:
> "make.exe" all
avr-gcc -g -Wall -Os -mmcu=atmega8 -c -o hd44780.o hd44780.c
hd44780.c:62:22: error: macro "SET_" requires 3 arguments, but only 2 given
hd44780.c: In function 'hd44780_pulse_e':
hd44780.c:62: error: 'SET_' undeclared (first use in this function)
hd44780.c:62: error: (Each undeclared identifier is reported only once
hd44780.c:62: error: for each function it appears in.)
hd44780.c:89:29: error: macro "READ_" requires 3 arguments, but only 2 given
hd44780.c:89: error: 'READ_' undeclared (first use in this function)
hd44780.c:92:22: error: macro "CLR_" requires 3 arguments, but only 2 given
hd44780.c:92: error: 'CLR_' undeclared (first use in this function)
hd44780.c:103:23: error: macro "CLR_" requires 3 arguments, but only 2 given
hd44780.c: In function 'hd44780_outnibble':
hd44780.c:103: error: 'CLR_' undeclared (first use in this function)
hd44780.c:105:25: error: macro "SET_" requires 3 arguments, but only 2 given
hd44780.c:105: error: 'SET_' undeclared (first use in this function)
hd44780.c:107:25: error: macro "CLR_" requires 3 arguments, but only 2 given
hd44780.c:108:29: error: macro "ASSIGN_" requires 4 arguments, but only 3 given
hd44780.c:108: error: 'ASSIGN_' undeclared (first use in this function)
hd44780.c:131:23: error: macro "SET_" requires 3 arguments, but only 2 given
hd44780.c: In function 'hd44780_innibble':
hd44780.c:131: error: 'SET_' undeclared (first use in this function)
hd44780.c:132:31: error: macro "ASSIGN_" requires 4 arguments, but only 3 given
hd44780.c:132: error: 'ASSIGN_' undeclared (first use in this function)
hd44780.c:134:25: error: macro "SET_" requires 3 arguments, but only 2 given
hd44780.c:136:25: error: macro "CLR_" requires 3 arguments, but only 2 given
hd44780.c:136: error: 'CLR_' undeclared (first use in this function)
hd44780.c:138:31: error: macro "ASSIGN_" requires 4 arguments, but only 3 given
hd44780.c:139:23: error: macro "CLR_" requires 3 arguments, but only 2 given
hd44780.c: At top level:
hd44780.c:162: error: conflicting types for 'hd44780_wait_ready'
hd44780.c:163: note: an argument type that has a default promotion can't match an empty parameter name list declaration
hd44780.h:30: error: previous declaration of 'hd44780_wait_ready' was here
hd44780.c:185:22: error: macro "SET_" requires 3 arguments, but only 2 given
hd44780.c: In function 'hd44780_init':
hd44780.c:185: error: 'SET_' undeclared (first use in this function)
hd44780.c:186:22: error: macro "SET_" requires 3 arguments, but only 2 given
hd44780.c:187:21: error: macro "SET_" requires 3 arguments, but only 2 given
hd44780.c:188:31: error: macro "ASSIGN_" requires 4 arguments, but only 3 given
hd44780.c:188: error: 'ASSIGN_' undeclared (first use in this function)
hd44780.c:212:29: error: macro "ASSIGN_" requires 4 arguments, but only 3 given
hd44780.c: In function 'hd44780_powerdown':
hd44780.c:212: error: 'ASSIGN_' undeclared (first use in this function)
hd44780.c:213:23: error: macro "CLR_" requires 3 arguments, but only 2 given
hd44780.c:213: error: 'CLR_' undeclared (first use in this function)
hd44780.c:214:23: error: macro "CLR_" requires 3 arguments, but only 2 given
hd44780.c:215:22: error: macro "CLR_" requires 3 arguments, but only 2 given
make.exe: *** [hd44780.o] Error 1
> Process Exit Code: 2
> Time Taken: 00:00Nie możliwe, żeby tyle błędów było w książkowym przykładzie, myślę, że tu jakiś nie zauważalny drobiazg psuje mi całą zabawę.
Korzystam jeszcze z pliku HD44780.c autora Joerg Wunsch
Poniżej zamieszczę jeszcze kod programu main:
Kod: C#
