Hello,
I posted in the other topic, but I think that it is better to open new toppic. Sorry if it is wrong.
I am working with FT811 and I achieved to draw in the display one time only. The second time, nothing happens.
Private void W32(uint8 *start, const uint32 data){
uint8 cont = *start;
gpDataBuffer[++cont] = (uint8)(data & 0x000000ff);
gpDataBuffer[++cont] = (uint8)(data >> 8);
gpDataBuffer[++cont] = (uint8)(data >> 16);
gpDataBuffer[++cont] = (uint8)(data >> 24);
*start = cont;
}
Private void StaticBackground(uint16 *start){
uint8 cont = *start;
uint32 address = EVE_RAM_DL; // 0x00300000;
gpDataBuffer[cont] = (uint8)((address >> 16) | MEM_WRITE);
gpDataBuffer[++cont] = (uint8)(address >> 8);
gpDataBuffer[++cont] = (uint8)(address & 0x000000ff);
if(change == 0u){
W32(&cont, CLEAR_COLOR_RGB(0,255,255));
W32(&cont, COLOR_RGB(255,0,0));
}
else{
W32(&cont, CLEAR_COLOR_RGB(255,255,0));
W32(&cont, COLOR_RGB(0,255,0));
}
W32(&cont, CLEAR(1,1,1));
W32(&cont, BEGIN(EVE_POINTS));
W32(&cont, POINT_SIZE(200));
W32(&cont, VERTEX2II(120,120,0,0));
W32(&cont, END());
W32(&cont, DISPLAY());
SendGraphicData(++cont); //Send over SPI the buffer
}
void Main(){
uint8 change = 0u;
Init_EVE();
while(1){
StaticBackground(0);
EveMemWrite(SEND_8_BITS, REG_DLSWAP, EVE_DLSWAP_FRAME); //Send over SPI DLSWAP
if (0u == change)
change = 1u;
else
change = 0u;
DELAY_MS(5000);
}
}