void LCDSend(unsigned int data)\r
{\r
// 9th bit set for data, clear for command\r
- while ((SPI_STATUS & SPI_STATUS_TX_EMPTY) == 0); // wait for the transfer to complete\r
+ while ((AT91C_BASE_SPI->SPI_SR & AT91C_SPI_TXEMPTY) == 0); // wait for the transfer to complete\r
// For clarity's sake we pass data with 9th bit clear and commands with 9th\r
// bit set since they're implemented as defines, se we need to invert bit\r
- SPI_TX_DATA = data^0x100; // Send the data/command\r
+ AT91C_BASE_SPI->SPI_TDR = data^0x100; // Send the data/command\r
}\r
\r
void LCDSetXY(unsigned char x, unsigned char y)\r
{\r
LED_A_ON();\r
SetupSpi(SPI_LCD_MODE);\r
- LCD_RESET_LOW();\r
+ LOW(GPIO_LRST);\r
SpinDelay(100);\r
\r
- LCD_RESET_HIGH();\r
+ HIGH(GPIO_LRST);\r
SpinDelay(100);\r
LED_A_OFF();\r
}\r