Jivarofad/m2560 update (#4593)

* New drivers : buzzer/speaker, voice wtv20 / jq6500 , i2c

First commit, testings to be done

* Voice correction

* Better way to drive voice modules

Same thing as LCD drivers

* Issue #2337 (error mismatch) solved

* Font correction

* Fonts correction again

* oups...

* Voice modules (Companion) & flash saving (ST7920)

* Documentation update

* I2C driver correction

* Mega2560 directory renamed to mega2560

* M2560 driver correction

* Voice directory correction

* Voice=ON does not works with MEGA2560 (OFF/WTV20/JQ6500)

* Compliant to cmake documentation

* On M2560, audioAVR use playnumber et playduration declared in voice.h
Don't know why, must be discuted...

* ‘{’ token forgotten

* Simplier way for AVR voice
This commit is contained in:
Franck Aguerre
2017-03-18 09:44:47 +01:00
committed by Bertrand Songis
parent 225ca3160e
commit 49d1aafc1b
25 changed files with 1138 additions and 247 deletions
+14 -31
View File
@@ -62,48 +62,31 @@ uint8_t lcdRefresh_ST7920(uint8_t full)
{
LCD_LOCK();
static uint8_t state;
uint8_t yst,yend;
uint8_t yst;
uint8_t yend;
uint8_t y_table[6]={0,13,26,39,52,64};
uint8_t x_addr = 0;
uint8_t y_addr = 0;
uint16_t line_offset = 0;
uint8_t col_offset = 0;
uint8_t bit_count = 0;
uint8_t result;
uint8_t * p;
if (full != 0) {
uint8_t *p;
if(full!=0){
yst=0;
yend=64;
state=0;
}
else {
switch (state) { // Since writing to ST7920 is too slow we need to split it to five bands.
default:
case 0:
yst=0;
yend=13;
state=1;
break;
case 1:
yst=13;
yend=26;
state=2;
break;
case 2:
yst=26;
yend=39;
state=3;
break;
case 3:
yst=39;
yend=52;
state=4;
break;
case 4:
yst=52;
yend=64;
state=0;
break;
else{ //Since writing to ST7920 is too slow we need to split it to five bands
yst=y_table[state];
yend=y_table[state+1];
if (state==4){
state=0;
}
else{
state++;
}
}
for (uint8_t y=yst; y<yend; y++) {