1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
void lcd_write_data(const fb_data* p_bytes, int count)
{
start:
    while (((DBOP_STAT & (1<<6)) == 0) && count--)
    {
        DBOP_DOUT = *p_bytes++;
    }
    if (count)
    {
        while ((DBOP_STAT & (1<<8)) == 0);
        goto start;
    }
    /* Wait for fifo to empty */
    while ((DBOP_STAT & (1<<10)) == 0);
}