X-Git-Url: https://git.rohieb.name/hackover2013-badge-firmware.git/blobdiff_plain/35333900cb7950451d0edee2a5fb90a49f3f0d64..1f8ed489668d6d74b5f6bf89714c540bfc9cdac4:/sysinit.c?ds=sidebyside diff --git a/sysinit.c b/sysinit.c index 4ce74dd..d1f440a 100644 --- a/sysinit.c +++ b/sysinit.c @@ -44,7 +44,6 @@ #include "core/cpu/cpu.h" #include "core/pmu/pmu.h" -#include "core/adc/adc.h" #ifdef CFG_PRINTF_UART #include "core/uart/uart.h" @@ -195,13 +194,26 @@ void systemInit() // Initialise the SSD1306 OLED display #ifdef CFG_SSD1306 - ssd1306Init(SSD1306_SWITCHCAPVCC); + ssd1306Init(SSD1306_INTERNALVCC); ssd1306ClearScreen(); // Clear the screen #endif // Initialise TFT LCD Display #ifdef CFG_TFTLCD lcdInit(); + // You may need to call the tsCalibrate() function to calibrate + // the touch screen is this has never been done. This only needs + // to be done once and the values are saved to EEPROM. This + // function can also be called from tsInit if it's more + // convenient + /* + #ifdef CFG_I2CEEPROM + if (eepromReadU8(CFG_EEPROM_TOUCHSCREEN_CALIBRATED) != 1) + { + tsCalibrate(); + } + #endif + */ #endif // Initialise Chibi