/** ****************************************************************************** * @file Project/lcd/lcd.c * @author X9D Application Team * @Hardware version V0.2 * @date 11-July-2012 * @brief This file provides LCD Init and botom drivers. * * ****************************************************************************** */ #include "../open9x.h" #define WriteData(x) AspiData(x) #define WriteCommand(x) AspiCmd(x) void Set_Address(u8 x, u8 y) { WriteCommand(x&0x0F); //Set Column Address LSB CA[3:0] WriteCommand((x>>4)|0x10); //Set Column Address MSB CA[7:4] WriteCommand((y&0x0F)|0x60); //Set Row Address LSB RA [3:0] WriteCommand(((y>>4)&0x0F)|0x70); //Set Row Address MSB RA [7:4] } void lcdRefresh() { for (uint8_t y=0; y>3)*DISPLAY_W]; uint8_t mask = (1 << (y%8)); Set_Address(0, y); AspiCmd(0xAF); for (uint8_t x=0; x