[MEGA2560] KS108+ Voice+Splash "far" (#3534)

+little option (not defined) to reduce encoder resolution
This commit is contained in:
Ingwie
2016-05-26 06:33:09 +02:00
committed by Bertrand Songis
parent 74adc1c7e6
commit 116802c946
6 changed files with 53 additions and 29 deletions
+8 -10
View File
@@ -65,8 +65,13 @@ void lcdSetRefVolt(uint8_t val)
{
}
void lcdRefreshSide(display_t * p)
void lcdRefreshSide()
{
static uint8_t change = 0; // toggle left or right lcd writing
uint8_t *p;
if (change == 0){ CS2_off; CS1_on; p = displayBuf; change = 1;} // Right
else{ CS1_off; CS2_on; p = displayBuf + 64; change = 0;} // Left
for (uint8_t page=0; page < 8; page++) {
lcdSendCtl(DISPLAY_SET_COLUMN); // Column addr 0
lcdSendCtl( page | DISPLAY_SET_PAGE); //Page addr
@@ -82,13 +87,6 @@ void lcdRefreshSide(display_t * p)
void lcdRefresh()
{
// Right
CS1_on;
lcdRefreshSide(displayBuf);
CS1_off;
// Left
CS2_on;
lcdRefreshSide(displayBuf + 64);
CS2_off;
lcdRefreshSide();
lcdRefreshSide();
}