Tue Aug 30, 2016 4:44 am
if(gb.update()){ //update everything
and updates everything (display, sound, batter monitor, etc.) at a fixed frequency (20 times per second by default)
void Display::update(void) {
frameCount ++;
uint8_t col, maxcol, p;
for (p = 0; p < 6; p++) {
command(PCD8544_SETYADDR | p);
// start at the beginning of the row
col = 0;
maxcol = LCDWIDTH_NOROT - 1;
command(PCD8544_SETXADDR | col);
digitalWrite(dc, HIGH);
if (cs > 0)
digitalWrite(cs, LOW);
for (; col <= maxcol; col++) {
SPI.transfer(_displayBuffer[(LCDWIDTH_NOROT * p) + col]);
}
if (cs > 0)
digitalWrite(cs, HIGH);
}
command(PCD8544_SETYADDR); // no idea why this is necessary but it is to finish the last byte?
}
Tue Aug 30, 2016 9:35 am
Sun Sep 04, 2016 10:12 am
Sun Sep 04, 2016 11:36 am
Sun Sep 04, 2016 12:40 pm
Display::update(...)
SPI.transfer(_displayBuffer[(LCDWIDTH_NOROT * p) + col]);
Tue Sep 06, 2016 5:30 am
Sat Sep 17, 2016 12:34 pm