X-Git-Url: http://git.rohieb.name/hackover2013-badge-firmware.git/blobdiff_plain/9d18e10afb2439a6a9ba6978a799259746a837b7..113fbd0d57be3df9bc6ac56b44d8bd154cc90d38:/tools/examples/lcd/tft/oscilloscope/main.c?ds=sidebyside diff --git a/tools/examples/lcd/tft/oscilloscope/main.c b/tools/examples/lcd/tft/oscilloscope/main.c index 8c0f37b..9334507 100644 --- a/tools/examples/lcd/tft/oscilloscope/main.c +++ b/tools/examples/lcd/tft/oscilloscope/main.c @@ -42,11 +42,11 @@ #include "core/adc/adc.h" #include "core/systick/systick.h" -#include "drivers/lcd/tft/lcd.h" -#include "drivers/lcd/tft/drawing.h" -#include "drivers/lcd/tft/touchscreen.h" -#include "drivers/lcd/tft/fonts/dejavusans9.h" -#include "drivers/lcd/tft/fonts/dejavusansbold9.h" +#include "drivers/displays/tft/lcd.h" +#include "drivers/displays/tft/drawing.h" +#include "drivers/displays/tft/touchscreen.h" +#include "drivers/displays/tft/fonts/dejavusans9.h" +#include "drivers/displays/tft/fonts/dejavusansbold9.h" static uint8_t adcBuffer[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; static uint8_t digBuffer[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; @@ -65,32 +65,32 @@ void renderLCDFrame(void) drawFill(COLOR_DARKGRAY); // Render V references - drawString(245, 27, COLOR_BLACK, &dejaVuSansBold9ptFontInfo, "3.5V"); - drawString(244, 26, COLOR_WHITE, &dejaVuSansBold9ptFontInfo, "3.5V"); - drawString(245, 195, COLOR_BLACK, &dejaVuSansBold9ptFontInfo, "0.0V"); - drawString(244, 194, COLOR_WHITE, &dejaVuSansBold9ptFontInfo, "0.0V"); + fontsDrawString(245, 27, COLOR_BLACK, &dejaVuSansBold9ptFontInfo, "3.5V"); + fontsDrawString(244, 26, COLOR_WHITE, &dejaVuSansBold9ptFontInfo, "3.5V"); + fontsDrawString(245, 195, COLOR_BLACK, &dejaVuSansBold9ptFontInfo, "0.0V"); + fontsDrawString(244, 194, COLOR_WHITE, &dejaVuSansBold9ptFontInfo, "0.0V"); // Div settings - drawString( 10, 10, COLOR_BLACK, &dejaVuSansBold9ptFontInfo, "~100ms/Div"); - drawString( 9, 9, COLOR_WHITE, &dejaVuSansBold9ptFontInfo, "~100ms/Div"); - drawString( 95, 10, COLOR_BLACK, &dejaVuSansBold9ptFontInfo, "500mV/Div"); - drawString( 94, 9, COLOR_WHITE, &dejaVuSansBold9ptFontInfo, "500mV/Div"); + fontsDrawString( 10, 10, COLOR_BLACK, &dejaVuSansBold9ptFontInfo, "~100ms/Div"); + fontsDrawString( 9, 9, COLOR_WHITE, &dejaVuSansBold9ptFontInfo, "~100ms/Div"); + fontsDrawString( 95, 10, COLOR_BLACK, &dejaVuSansBold9ptFontInfo, "500mV/Div"); + fontsDrawString( 94, 9, COLOR_WHITE, &dejaVuSansBold9ptFontInfo, "500mV/Div"); // Clear the ADC output level just in case drawRectangleFilled(175, 5, 250, 18, COLOR_DARKGRAY); // Render the channel text - drawString( 25, 220, COLOR_BLACK, &dejaVuSansBold9ptFontInfo, "P1.4 (Analog)"); - drawString( 24, 219, adcEnabled ? COLOR_YELLOW : COLOR_MEDIUMGRAY, &dejaVuSansBold9ptFontInfo, "P1.4 (Analog)"); - drawString(135, 220, COLOR_BLACK, &dejaVuSansBold9ptFontInfo, "P2.0 (Digital)"); - drawString(134, 219, digEnabled ? COLOR_GREEN : COLOR_MEDIUMGRAY, &dejaVuSansBold9ptFontInfo, "P2.0 (Digital)"); + fontsDrawString( 25, 220, COLOR_BLACK, &dejaVuSansBold9ptFontInfo, "P1.4 (Analog)"); + fontsDrawString( 24, 219, adcEnabled ? COLOR_YELLOW : COLOR_MEDIUMGRAY, &dejaVuSansBold9ptFontInfo, "P1.4 (Analog)"); + fontsDrawString(135, 220, COLOR_BLACK, &dejaVuSansBold9ptFontInfo, "P2.0 (Digital)"); + fontsDrawString(134, 219, digEnabled ? COLOR_GREEN : COLOR_MEDIUMGRAY, &dejaVuSansBold9ptFontInfo, "P2.0 (Digital)"); // ADC Warning - drawString(245, 80, COLOR_BLACK, &dejaVuSansBold9ptFontInfo, "Warning:"); - drawString(244, 79, COLOR_WHITE, &dejaVuSansBold9ptFontInfo, "Warning:"); - drawString(244, 95, COLOR_WHITE, &dejaVuSans9ptFontInfo, "ADC input"); - drawString(244, 110, COLOR_WHITE, &dejaVuSans9ptFontInfo, "is not 5.0V"); - drawString(244, 125, COLOR_WHITE, &dejaVuSans9ptFontInfo, "tolerant!"); + fontsDrawString(245, 80, COLOR_BLACK, &dejaVuSansBold9ptFontInfo, "Warning:"); + fontsDrawString(244, 79, COLOR_WHITE, &dejaVuSansBold9ptFontInfo, "Warning:"); + fontsDrawString(244, 95, COLOR_WHITE, &dejaVuSans9ptFontInfo, "ADC input"); + fontsDrawString(244, 110, COLOR_WHITE, &dejaVuSans9ptFontInfo, "is not 5.0V"); + fontsDrawString(244, 125, COLOR_WHITE, &dejaVuSans9ptFontInfo, "tolerant!"); } /**************************************************************************/ @@ -174,8 +174,8 @@ void renderLCDGrid(void) // Clear the previous text drawRectangleFilled(175, 5, 250, 18, COLOR_DARKGRAY); // Render the latest value in mV - drawString(180, 10, COLOR_BLACK, &dejaVuSansBold9ptFontInfo, text); - drawString(179, 9, COLOR_YELLOW, &dejaVuSansBold9ptFontInfo, text); + fontsDrawString(180, 10, COLOR_BLACK, &dejaVuSansBold9ptFontInfo, text); + fontsDrawString(179, 9, COLOR_YELLOW, &dejaVuSansBold9ptFontInfo, text); } }