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
+9 -6
View File
@@ -1,5 +1,5 @@
option(AUDIO "Audio support" OFF)
option(VOICE "Voice support" OFF)
set(VOICE "OFF" CACHE STRING "Voice support (OFF/ON/WTV20/JQ6500)")
option(GRAPHICS "Additional graphics" ON)
option(BOLD "Bold font" ON)
option(BATTGRAPH "Battery graph" OFF)
@@ -45,14 +45,17 @@ if(BUZZER)
add_definitions(-DBUZZER)
set(SRC ${SRC} buzzer.cpp)
endif()
if(VOICE)
if((VOICE STREQUAL ON AND NOT PCB STREQUAL MEGA2560) OR ((VOICE STREQUAL WTV20 OR VOICE STREQUAL JQ6500) AND (PCB STREQUAL MEGA2560)))
add_definitions(-DVOICE)
if(PCB STREQUAL MEGA2560)
add_definitions(-DVOICE_${VOICE})
endif()
set(TARGET_SRC ${TARGET_SRC} voice.cpp)
foreach(LANGUAGE ${TTS_LANGUAGES})
if(TTS STREQUAL ${LANGUAGE})
add_definitions(-DTTS_${LANGUAGE})
string(TOLOWER ${LANGUAGE} lang_lower)
set(SRC ${SRC} translations/tts_${lang_lower}.cpp)
string(TOUPPER ${LANGUAGE} LANGUAGE_CAPITALIZED)
if(TTS STREQUAL ${LANGUAGE_CAPITALIZED})
add_definitions(-DTTS_${LANGUAGE_CAPITALIZED})
set(SRC ${SRC} translations/tts_${LANGUAGE}.cpp)
endif()
endforeach()
endif()