I'm actually starting with Atmel Studio programming an ATMEGA 328 and made a header file for globals_bexx.h, where I'm doing global declaration according to Deans TUT.
Everything is fine, but using the #define command for setting up my spi lcd-display I got an undeclared error only on 'DDRB1'
// #define PORT_SPI PORTB #define SPI_LCD_PORT PORTB // SPI Display SS_ Port B1 #define SPI_LCD_PORT_CS PORTB1 // SPI Display SS_ Port B1 #define SPI_LCD_DDR DDRB // SPI Display SS_ Port B1 #define SPI_LCD_DDR_BIT DDRB1 // SPI Display SS_ Port B1
Isn't it, that #define only replaces the first text by the second one?
Why does it say 'DDRB1' undeclared (frist use in this function) , as ther is no funtion at all?