Witam
W książce Pana Mirka Kardasia przepisałem całą biblotekę do plików LCD.h LCD.c main.c
i w funkcji inicjalizującej nie wiem skąd nagle wzięły się takie bity, które po skompilowaniu jak widzimy pojawiają się jako błędy.
Nie wiem do czego one służą, czy nie dołączyłem jakiejś biblioteki ? :
Kod:
C:\Users\Admin\Documents\Atmel Studio\6.2\LCD\LCD\LCD.c(154,17): error: 'LCDC_FUNC' undeclared (first use in this function)
lcd_write_cmd( LCDC_FUNC|LCDC_FUNC4B|LCDC_FUNC2L|LCDC_FUNC5x7 );
^
C:\Users\Admin\Documents\Atmel Studio\6.2\LCD\LCD\LCD.c(154,17): info: each undeclared identifier is reported only once for each function it appears in
C:\Users\Admin\Documents\Atmel Studio\6.2\LCD\LCD\LCD.c(154,27): error: 'LCDC_FUNC4B' undeclared (first use in this function)
lcd_write_cmd( LCDC_FUNC|LCDC_FUNC4B|LCDC_FUNC2L|LCDC_FUNC5x7 );
^
C:\Users\Admin\Documents\Atmel Studio\6.2\LCD\LCD\LCD.c(154,39): error: 'LCDC_FUNC2L' undeclared (first use in this function)
lcd_write_cmd( LCDC_FUNC|LCDC_FUNC4B|LCDC_FUNC2L|LCDC_FUNC5x7 );
^
C:\Users\Admin\Documents\Atmel Studio\6.2\LCD\LCD\LCD.c(154,51): error: 'LCDC_FUNC5x7' undeclared (first use in this function)
lcd_write_cmd( LCDC_FUNC|LCDC_FUNC4B|LCDC_FUNC2L|LCDC_FUNC5x7 );
^
C:\Users\Admin\Documents\Atmel Studio\6.2\LCD\LCD\LCD.c(156,17): error: 'LCDC_ONOFF' undeclared (first use in this function)
lcd_write_cmd( LCDC_ONOFF|LCDC_CURSOROFF );
^
C:\Users\Admin\Documents\Atmel Studio\6.2\LCD\LCD\LCD.c(156,28): error: 'LCDC_CURSOROFF' undeclared (first use in this function)
lcd_write_cmd( LCDC_ONOFF|LCDC_CURSOROFF );
^
C:\Users\Admin\Documents\Atmel Studio\6.2\LCD\LCD\LCD.c(158,28): error: 'LCDC_DISPLAYON' undeclared (first use in this function)
lcd_write_cmd( LCDC_ONOFF|LCDC_DISPLAYON );
^
C:\Users\Admin\Documents\Atmel Studio\6.2\LCD\LCD\LCD.c(160,17): error: 'LCDC_ENTRY' undeclared (first use in this function)
lcd_write_cmd( LCDC_ENTRY|LCDC_ENTRYR );
^
C:\Users\Admin\Documents\Atmel Studio\6.2\LCD\LCD\LCD.c(160,28): error: 'LCDC_ENTRYR' undeclared (first use in this function)
lcd_write_cmd( LCDC_ENTRY|LCDC_ENTRYR );
^
.././LCD.c: In function '_lcd_write_byte':
C:\Users\Admin\Documents\Atmel Studio\6.2\LCD\LCD\LCD.c(204,2): error: 'CLR_RW' undeclared (first use in this function)
CLR_RW;
^
.././LCD.c: In function 'lcd_cls':
C:\Users\Admin\Documents\Atmel Studio\6.2\LCD\LCD\LCD.c(237,17): error: 'LCDC_CLS' undeclared (first use in this function)
lcd_write_cmd( LCDC_CLS );
Przy okazji chciałem też spytać jak zdefiniować F_CPU dla biblioteki <util/delay.h> ?