diff --git a/.cproject b/.cproject
index 3244268..ac6e2b8 100644
--- a/.cproject
+++ b/.cproject
@@ -5,13 +5,13 @@
+
+
-
-
@@ -30,14 +30,16 @@
-
+
+
+
@@ -53,10 +55,10 @@
-
+
-
+
@@ -75,13 +77,13 @@
+
+
-
-
@@ -100,15 +102,18 @@
-
+
+
+
+
@@ -124,12 +129,12 @@
-
+
-
+
@@ -148,13 +153,13 @@
+
+
-
-
@@ -176,12 +181,14 @@
+
+
@@ -197,7 +204,7 @@
-
+
@@ -225,50 +232,50 @@
- <?xml version="1.0" encoding="UTF-8"?>
-<TargetConfig>
-<Properties property_0="" property_3="NXP" property_4="LPC2134" property_count="5" version="70200"/>
-<infoList vendor="NXP"><info chip="LPC2134" match_id="0x0002FF12" name="LPC2134"><chip><name>LPC2134</name>
-<family>LPC21xx</family>
-<vendor>NXP (formerly Philips)</vendor>
-<reset board="None" core="Fake" sys="Fake"/>
-<clock changeable="TRUE"/>
-<memory can_program="true" id="Flash" is_ro="true" type="Flash"/>
-<memory id="RAM" type="RAM"/>
-<memory id="Periph" is_volatile="true" type="Peripheral"/>
-<memoryInstance derived_from="Flash" id="MFlash128" location="0x0" size="0x20000"/>
-<memoryInstance derived_from="RAM" id="Ram16" location="0x40000000" size="0x4000"/>
-<prog_flash blocksz="0x1000" location="0" maxprgbuff="0x1000" progwithcode="TRUE" size="0x8000"/>
-<prog_flash blocksz="0x8000" location="0x8000" size="0x18000"/>
-<peripheralInstance derived_from="SYSCTRL" id="SYSCTRL" location="0xE01FC040"/>
-<peripheralInstance derived_from="MAM" id="MAM" location="0xE01FC000"/>
-<peripheralInstance derived_from="VIC" id="VIC" location="0xFFFFF000"/>
-<peripheralInstance derived_from="GPIO" id="GPIO_0" location="0xE0028000"/>
-<peripheralInstance derived_from="GPIO" id="GPIO_1" location="0xE0028010"/>
-<peripheralInstance derived_from="UART" id="UART_0" location="0xE000C000"/>
-<peripheralInstance derived_from="I2C" id="I2C_0" location="0xE001C000"/>
-<peripheralInstance derived_from="TIMER" id="TIMER_0" location="0xE0004000"/>
-<peripheralInstance derived_from="TIMER" id="TIMER_1" location="0xE0008000"/>
-<peripheralInstance derived_from="RTC" id="RTC" location="0xE0024000"/>
-<peripheralInstance derived_from="WDT" id="WDT" location="0xE0000000"/>
-</chip>
-<processor><name gcc_name="arm7tdmi">ARM7TDMI</name>
-<family>ARM7</family>
-</processor>
-<link href="nxp_lpcxxxx_peripheral.xme" show="embed" type="simple"/>
-</info>
-</infoList>
+ <?xml version="1.0" encoding="UTF-8"?>
+<TargetConfig>
+<Properties property_0="" property_3="NXP" property_4="LPC2134" property_count="5" version="70200"/>
+<infoList vendor="NXP"><info chip="LPC2134" match_id="0x0002FF12" name="LPC2134"><chip><name>LPC2134</name>
+<family>LPC21xx</family>
+<vendor>NXP (formerly Philips)</vendor>
+<reset board="None" core="Fake" sys="Fake"/>
+<clock changeable="TRUE"/>
+<memory can_program="true" id="Flash" is_ro="true" type="Flash"/>
+<memory id="RAM" type="RAM"/>
+<memory id="Periph" is_volatile="true" type="Peripheral"/>
+<memoryInstance derived_from="Flash" id="MFlash128" location="0x0" size="0x20000"/>
+<memoryInstance derived_from="RAM" id="Ram16" location="0x40000000" size="0x4000"/>
+<prog_flash blocksz="0x1000" location="0" maxprgbuff="0x1000" progwithcode="TRUE" size="0x8000"/>
+<prog_flash blocksz="0x8000" location="0x8000" size="0x18000"/>
+<peripheralInstance derived_from="SYSCTRL" id="SYSCTRL" location="0xE01FC040"/>
+<peripheralInstance derived_from="MAM" id="MAM" location="0xE01FC000"/>
+<peripheralInstance derived_from="VIC" id="VIC" location="0xFFFFF000"/>
+<peripheralInstance derived_from="GPIO" id="GPIO_0" location="0xE0028000"/>
+<peripheralInstance derived_from="GPIO" id="GPIO_1" location="0xE0028010"/>
+<peripheralInstance derived_from="UART" id="UART_0" location="0xE000C000"/>
+<peripheralInstance derived_from="I2C" id="I2C_0" location="0xE001C000"/>
+<peripheralInstance derived_from="TIMER" id="TIMER_0" location="0xE0004000"/>
+<peripheralInstance derived_from="TIMER" id="TIMER_1" location="0xE0008000"/>
+<peripheralInstance derived_from="RTC" id="RTC" location="0xE0024000"/>
+<peripheralInstance derived_from="WDT" id="WDT" location="0xE0000000"/>
+</chip>
+<processor><name gcc_name="arm7tdmi">ARM7TDMI</name>
+<family>ARM7</family>
+</processor>
+<link href="nxp_lpcxxxx_peripheral.xme" show="embed" type="simple"/>
+</info>
+</infoList>
</TargetConfig>
-
-
-
+
+
+
diff --git a/src/bigfont.h b/src/bigfont.h
new file mode 100644
index 0000000..7545b47
--- /dev/null
+++ b/src/bigfont.h
@@ -0,0 +1,325 @@
+/*
+ * bigfont.h
+ *
+ * Created on: 14 paź 2021
+ * Author: s.bartkowicz
+ */
+
+#ifndef BIGFONT_H_
+#define BIGFONT_H_
+
+#define FFLAG_PROPORTIONAL (1<<1)
+#define FFLAG_VERTICAL (1<<2)
+#define FFLAG_GDOS (FFLAG_PROPORTIONAL|FFLAG_VERTICAL) // pc neopaint, atari st/tt gem dos
+
+const uint8_t font_12x16_data[]={
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // 0x20
+ 0x00,0x06,0x00,0x06,0x00,0x0F,0x00,0x0F,0x00,0x0F,0x00,0x0F,0x00,0x0F,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x06,0x00,0x00,0x00,0x00, // 0x21
+ 0x00,0x00,0x00,0x00,0x80,0x19,0x80,0x19,0x80,0x19,0x80,0x19,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // 0x22
+ 0x00,0x00,0x00,0x66,0x00,0x66,0x00,0x66,0xC0,0xFF,0x00,0x33,0x00,0x33,0x80,0x19,0x80,0x19,0xE0,0x3F,0xC0,0x0C,0xC0,0x0C,0xC0,0x0C,0x00,0x00,0x00,0x00,0x00,0x00, // 0x23
+ 0x00,0x06,0x00,0x06,0x80,0x1F,0xC0,0x3F,0xC0,0x06,0xC0,0x06,0xC0,0x1F,0x80,0x3F,0x00,0x36,0x00,0x36,0xC0,0x3F,0x80,0x1F,0x00,0x06,0x00,0x06,0x00,0x00,0x00,0x00, // 0x24
+ 0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0xC1,0xC0,0xE1,0xC0,0x71,0x00,0x38,0x00,0x1C,0x00,0x0E,0x00,0x07,0x80,0x03,0xC0,0x71,0xE0,0x70,0x60,0x70,0x00,0x00,0x00,0x00, // 0x25
+ 0x00,0x00,0x00,0x0E,0x00,0x1B,0x80,0x19,0x80,0x19,0x80,0x0D,0x00,0x07,0x80,0x07,0xC0,0x07,0xC0,0x6C,0xC0,0x3C,0xC0,0x18,0xC0,0x3D,0x80,0x67,0x00,0x00,0x00,0x00, // 0x26
+ 0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x06,0x00,0x06,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // 0x27
+ 0x00,0x1C,0x00,0x06,0x00,0x07,0x00,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x00,0x03,0x00,0x07,0x00,0x06,0x00,0x1C,0x00,0x00,0x00,0x00, // 0x28
+ 0x80,0x03,0x00,0x06,0x00,0x0E,0x00,0x0C,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x1C,0x00,0x0C,0x00,0x0E,0x00,0x06,0x80,0x03,0x00,0x00,0x00,0x00, // 0x29
+ 0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x36,0xC0,0x36,0x80,0x1F,0x00,0x0F,0xC0,0x3F,0x00,0x0F,0x80,0x1F,0xC0,0x36,0xC0,0x36,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // 0x2A
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x06,0x00,0x06,0xC0,0x3F,0xC0,0x3F,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // 0x2B
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x06,0x00,0x03, // 0x2C
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x3F,0xC0,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // 0x2D
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x00,0x00,0x00, // 0x2E
+ 0x00,0x00,0x00,0x80,0x00,0xC0,0x00,0xE0,0x00,0x70,0x00,0x38,0x00,0x1C,0x00,0x0E,0x00,0x07,0x80,0x03,0xC0,0x01,0xE0,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // 0x2F
+ 0x00,0x1F,0xC0,0x7F,0xC0,0x60,0x60,0xE0,0x60,0xF0,0x60,0xD8,0x60,0xCC,0x60,0xC6,0x60,0xC3,0xE0,0xC1,0xE0,0xC0,0xC0,0x60,0xC0,0x7F,0x00,0x1F,0x00,0x00,0x00,0x00, // 0x30
+ 0x00,0x0C,0x00,0x0E,0x80,0x0F,0x80,0x0F,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x80,0x7F,0x80,0x7F,0x00,0x00,0x00,0x00, // 0x31
+ 0x80,0x3F,0xC0,0x7F,0xE0,0xE0,0x60,0xC0,0x60,0xE0,0x00,0x70,0x00,0x38,0x00,0x1C,0x00,0x0E,0x00,0x07,0x80,0x03,0xC0,0x01,0xE0,0xFF,0xE0,0xFF,0x00,0x00,0x00,0x00, // 0x32
+ 0x80,0x3F,0xC0,0x7F,0xE0,0xE0,0x60,0xC0,0x00,0xC0,0x00,0xE0,0x00,0x7F,0x00,0x3F,0x00,0x60,0x00,0xC0,0x60,0xC0,0xE0,0xE0,0xC0,0x7F,0x80,0x3F,0x00,0x00,0x00,0x00, // 0x33
+ 0x00,0x38,0x00,0x3C,0x00,0x3E,0x00,0x37,0x80,0x33,0xC0,0x31,0xE0,0x30,0x60,0x30,0xE0,0xFF,0xE0,0xFF,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x00,0x00,0x00, // 0x34
+ 0xE0,0xFF,0xE0,0xFF,0x60,0x00,0x60,0x00,0x60,0x00,0xE0,0x3F,0xC0,0x7F,0x00,0xE0,0x00,0xC0,0x00,0xC0,0x60,0xC0,0xE0,0xE0,0xC0,0x7F,0x80,0x3F,0x00,0x00,0x00,0x00, // 0x35
+ 0x00,0x3C,0x00,0x3E,0x00,0x07,0x80,0x03,0xC0,0x01,0xC0,0x00,0xE0,0x3F,0xE0,0x7F,0xE0,0xE0,0x60,0xC0,0x60,0xC0,0xE0,0xE0,0xC0,0x7F,0x80,0x3F,0x00,0x00,0x00,0x00, // 0x36
+ 0xE0,0xFF,0xE0,0xFF,0x00,0x60,0x00,0x60,0x00,0x30,0x00,0x30,0x00,0x18,0x00,0x18,0x00,0x0C,0x00,0x0C,0x00,0x06,0x00,0x06,0x00,0x03,0x00,0x03,0x00,0x00,0x00,0x00, // 0x37
+ 0x00,0x1F,0x80,0x3F,0xC0,0x71,0xC0,0x60,0xC0,0x60,0xC0,0x71,0x80,0x3F,0xC0,0x7F,0xE0,0xE0,0x60,0xC0,0x60,0xC0,0xE0,0xE0,0xC0,0x7F,0x80,0x3F,0x00,0x00,0x00,0x00, // 0x38
+ 0x80,0x3F,0xC0,0x7F,0xE0,0xE0,0x60,0xC0,0x60,0xC0,0xE0,0xE0,0xC0,0xFF,0x80,0xFF,0x00,0x60,0x00,0x70,0x00,0x38,0x00,0x1C,0x80,0x0F,0x80,0x07,0x00,0x00,0x00,0x00, // 0x39
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00, // 0x3A
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x07,0x00,0x07,0x00,0x06,0x00,0x06,0x00,0x03, // 0x3B
+ 0x00,0x30,0x00,0x38,0x00,0x1C,0x00,0x0E,0x00,0x07,0x80,0x03,0xC0,0x01,0xC0,0x01,0x80,0x03,0x00,0x07,0x00,0x0E,0x00,0x1C,0x00,0x38,0x00,0x30,0x00,0x00,0x00,0x00, // 0x3C
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x7F,0xC0,0x7F,0x00,0x00,0x00,0x00,0xC0,0x7F,0xC0,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // 0x3D
+ 0xC0,0x00,0xC0,0x01,0x80,0x03,0x00,0x07,0x00,0x0E,0x00,0x1C,0x00,0x38,0x00,0x38,0x00,0x1C,0x00,0x0E,0x00,0x07,0x80,0x03,0xC0,0x01,0xC0,0x00,0x00,0x00,0x00,0x00, // 0x3E
+ 0x80,0x1F,0xC0,0x3F,0xE0,0x70,0x60,0x60,0x60,0x70,0x00,0x38,0x00,0x1C,0x00,0x0E,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x00,0x00,0x06,0x00,0x06,0x00,0x00,0x00,0x00, // 0x3F
+ 0x80,0x3F,0xC0,0x7F,0xC0,0x60,0x60,0xDE,0x60,0xDF,0x60,0xDB,0x60,0xDB,0x60,0xDB,0x60,0xDB,0x60,0x7F,0x60,0x3E,0xE0,0x00,0xC0,0x3F,0x00,0x3F,0x00,0x00,0x00,0x00, // 0x40
+ 0x00,0x06,0x00,0x06,0x00,0x0F,0x00,0x0F,0x00,0x0F,0x80,0x19,0x80,0x19,0x80,0x19,0xC0,0x30,0xC0,0x3F,0xC0,0x3F,0x60,0x60,0x60,0x60,0x60,0x60,0x00,0x00,0x00,0x00, // 0x41
+ 0xE0,0x0F,0xE0,0x1F,0x60,0x38,0x60,0x30,0x60,0x30,0x60,0x38,0xE0,0x1F,0xE0,0x3F,0x60,0x70,0x60,0x60,0x60,0x60,0x60,0x70,0xE0,0x3F,0xE0,0x1F,0x00,0x00,0x00,0x00, // 0x42
+ 0x00,0x1F,0x80,0x3F,0xC0,0x71,0xC0,0x60,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xC0,0x60,0xC0,0x71,0x80,0x3F,0x00,0x1F,0x00,0x00,0x00,0x00, // 0x43
+ 0xE0,0x0F,0xE0,0x1F,0x60,0x38,0x60,0x30,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x30,0x60,0x38,0xE0,0x1F,0xE0,0x0F,0x00,0x00,0x00,0x00, // 0x44
+ 0xE0,0x7F,0xE0,0x7F,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xE0,0x1F,0xE0,0x1F,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xE0,0x7F,0xE0,0x7F,0x00,0x00,0x00,0x00, // 0x45
+ 0xE0,0x7F,0xE0,0x7F,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xE0,0x1F,0xE0,0x1F,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00, // 0x46
+ 0x00,0x3F,0x80,0x7F,0xC0,0x61,0xC0,0x00,0x60,0x00,0x60,0x00,0x60,0x7C,0x60,0x7C,0x60,0x60,0x60,0x60,0xC0,0x60,0xC0,0x61,0x80,0x7F,0x00,0x7F,0x00,0x00,0x00,0x00, // 0x47
+ 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xE0,0x7F,0xE0,0x7F,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x00,0x00,0x00,0x00, // 0x48
+ 0x80,0x1F,0x80,0x1F,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x80,0x1F,0x80,0x1F,0x00,0x00,0x00,0x00, // 0x49
+ 0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x60,0x60,0x60,0x60,0xE0,0x30,0xC0,0x3F,0x80,0x1F,0x00,0x00,0x00,0x00, // 0x4A
+ 0x60,0x60,0x60,0x70,0x60,0x38,0x60,0x1C,0x60,0x0E,0x60,0x07,0xE0,0x03,0xE0,0x03,0x60,0x07,0x60,0x0E,0x60,0x1C,0x60,0x38,0x60,0x70,0x60,0x60,0x00,0x00,0x00,0x00, // 0x4B
+ 0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0xE0,0x7F,0xE0,0x7F,0x00,0x00,0x00,0x00, // 0x4C
+ 0x60,0x60,0xE0,0x70,0xE0,0x70,0xE0,0x79,0xE0,0x79,0x60,0x6F,0x60,0x6F,0x60,0x66,0x60,0x66,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x00,0x00,0x00,0x00, // 0x4D
+ 0x60,0x60,0xE0,0x60,0xE0,0x60,0xE0,0x61,0x60,0x63,0x60,0x63,0x60,0x66,0x60,0x66,0x60,0x6C,0x60,0x6C,0x60,0x78,0x60,0x70,0x60,0x70,0x60,0x60,0x00,0x00,0x00,0x00, // 0x4E
+ 0x00,0x0F,0x80,0x1F,0xC0,0x39,0xC0,0x30,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xC0,0x30,0xC0,0x39,0x80,0x1F,0x00,0x0F,0x00,0x00,0x00,0x00, // 0x4F
+ 0xE0,0x1F,0xE0,0x3F,0x60,0x70,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x70,0xE0,0x3F,0xE0,0x1F,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x00,0x00,0x00,0x00, // 0x50
+ 0x00,0x0F,0x80,0x1F,0xC0,0x39,0xC0,0x30,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x6C,0xC0,0x3C,0xC0,0x39,0x80,0x7F,0x00,0x6F,0x00,0x00,0x00,0x00, // 0x51
+ 0xE0,0x1F,0xE0,0x3F,0x60,0x70,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x70,0xE0,0x3F,0xE0,0x1F,0x60,0x0E,0x60,0x1C,0x60,0x38,0x60,0x70,0x60,0x60,0x00,0x00,0x00,0x00, // 0x52
+ 0x80,0x1F,0xC0,0x3F,0xE0,0x70,0x60,0x60,0x60,0x00,0xE0,0x00,0xC0,0x1F,0x80,0x3F,0x00,0x70,0x00,0x60,0x60,0x60,0xE0,0x70,0xC0,0x3F,0x80,0x1F,0x00,0x00,0x00,0x00, // 0x53
+ 0xC0,0x3F,0xC0,0x3F,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x00,0x00,0x00, // 0x54
+ 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xC0,0x30,0xC0,0x3F,0x80,0x1F,0x00,0x00,0x00,0x00, // 0x55
+ 0x60,0x60,0x60,0x60,0x60,0x60,0xC0,0x30,0xC0,0x30,0xC0,0x30,0x80,0x19,0x80,0x19,0x80,0x19,0x00,0x0F,0x00,0x0F,0x00,0x0F,0x00,0x06,0x00,0x06,0x00,0x00,0x00,0x00, // 0x56
+ 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x66,0x60,0x66,0x60,0x6F,0xE0,0x79,0xE0,0x70,0xE0,0x70,0x60,0x60,0x00,0x00,0x00,0x00, // 0x57
+ 0x60,0x60,0x60,0x60,0xC0,0x30,0xC0,0x30,0x80,0x19,0x00,0x0F,0x00,0x06,0x00,0x06,0x00,0x0F,0x80,0x19,0xC0,0x30,0xC0,0x30,0x60,0x60,0x60,0x60,0x00,0x00,0x00,0x00, // 0x58
+ 0x60,0x60,0x60,0x60,0xC0,0x30,0xC0,0x30,0x80,0x19,0x80,0x19,0x00,0x0F,0x00,0x0F,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x00,0x00,0x00, // 0x59
+ 0xE0,0x7F,0xE0,0x7F,0x00,0x30,0x00,0x30,0x00,0x18,0x00,0x0C,0x00,0x06,0x00,0x06,0x00,0x03,0x80,0x01,0xC0,0x00,0xC0,0x00,0xE0,0x7F,0xE0,0x7F,0x00,0x00,0x00,0x00, // 0x5A
+ 0x80,0x1F,0x80,0x1F,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x1F,0x80,0x1F,0x00,0x00,0x00,0x00, // 0x5B
+ 0x00,0x00,0x20,0x00,0x60,0x00,0xE0,0x00,0xC0,0x01,0x80,0x03,0x00,0x07,0x00,0x0E,0x00,0x1C,0x00,0x38,0x00,0x70,0x00,0xE0,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00, // 0x5C
+ 0x80,0x1F,0x80,0x1F,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x80,0x1F,0x80,0x1F,0x00,0x00,0x00,0x00, // 0x5D
+ 0x00,0x04,0x00,0x0E,0x00,0x1F,0x80,0x3B,0xC0,0x71,0xE0,0xE0,0x60,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // 0x5E
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xFF,0xE0,0xFF, // 0x5F
+ 0x00,0x00,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x06,0x00,0x06,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // 0x60
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x3F,0xC0,0x7F,0x00,0x60,0x80,0x7F,0xC0,0x7F,0x60,0x60,0x60,0x60,0xE0,0x7F,0xC0,0x7F,0x00,0x00,0x00,0x00, // 0x61
+ 0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x1F,0xE0,0x3F,0xE0,0x70,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x70,0xE0,0x3F,0xE0,0x1F,0x00,0x00,0x00,0x00, // 0x62
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x1F,0xC0,0x3F,0xE0,0x60,0x60,0x00,0x60,0x00,0x60,0x00,0xE0,0x60,0xC0,0x3F,0x80,0x1F,0x00,0x00,0x00,0x00, // 0x63
+ 0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x80,0x6F,0xC0,0x7F,0xE0,0x78,0x60,0x60,0x60,0x60,0x60,0x60,0xE0,0x60,0xC0,0x7F,0x80,0x7F,0x00,0x00,0x00,0x00, // 0x64
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x1F,0xC0,0x3F,0xE0,0x60,0xE0,0x7F,0xE0,0x3F,0x60,0x00,0xE0,0x00,0xC0,0x3F,0x80,0x1F,0x00,0x00,0x00,0x00, // 0x65
+ 0x00,0x1E,0x00,0x1F,0x80,0x03,0x80,0x01,0x80,0x01,0x80,0x01,0xE0,0x0F,0xE0,0x0F,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x00,0x00,0x00,0x00, // 0x66
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x7F,0xC0,0x7F,0xE0,0x60,0x60,0x60,0xE0,0x70,0xC0,0x7F,0x80,0x6F,0x00,0x60,0x00,0x70,0xC0,0x3F,0xC0,0x1F, // 0x67
+ 0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x0F,0xE0,0x1F,0xE0,0x38,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x60,0x30,0x00,0x00,0x00,0x00, // 0x68
+ 0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x06,0x00,0x00,0x00,0x07,0x00,0x07,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x80,0x1F,0x80,0x1F,0x00,0x00,0x00,0x00, // 0x69
+ 0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x18,0x00,0x00,0x00,0x1C,0x00,0x1C,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x80,0x19,0x80,0x1F,0x00,0x0F, // 0x6A
+ 0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x18,0xC0,0x1C,0xC0,0x0E,0xC0,0x07,0xC0,0x07,0xC0,0x0E,0xC0,0x1C,0xC0,0x38,0xC0,0x30,0x00,0x00,0x00,0x00, // 0x6B
+ 0x00,0x07,0x00,0x07,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x80,0x1F,0x80,0x1F,0x00,0x00,0x00,0x00, // 0x6C
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xA0,0x19,0xE0,0x3F,0xE0,0x7F,0x60,0x66,0x60,0x66,0x60,0x66,0x60,0x66,0x60,0x66,0x60,0x66,0x00,0x00,0x00,0x00, // 0x6D
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x1F,0xC0,0x3F,0xC0,0x70,0xC0,0x60,0xC0,0x60,0xC0,0x60,0xC0,0x60,0xC0,0x60,0xC0,0x60,0x00,0x00,0x00,0x00, // 0x6E
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x1F,0xC0,0x3F,0xE0,0x70,0x60,0x60,0x60,0x60,0x60,0x60,0xE0,0x70,0xC0,0x3F,0x80,0x1F,0x00,0x00,0x00,0x00, // 0x6F
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x1F,0xE0,0x3F,0x60,0x70,0x60,0x60,0x60,0x60,0xE0,0x70,0xE0,0x3F,0x60,0x1F,0x60,0x00,0x60,0x00,0x60,0x00, // 0x70
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x7F,0xC0,0x7F,0xE0,0x60,0x60,0x60,0x60,0x60,0xE0,0x70,0xC0,0x7F,0x80,0x6F,0x00,0x60,0x00,0x60,0x00,0x60, // 0x71
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x3E,0xC0,0x7F,0xC0,0x61,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0x00,0x00,0x00,0x00, // 0x72
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x0F,0xE0,0x1F,0x60,0x00,0xE0,0x0F,0xC0,0x1F,0x00,0x18,0x00,0x18,0xE0,0x1F,0xC0,0x0F,0x00,0x00,0x00,0x00, // 0x73
+ 0x00,0x00,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0xE0,0x0F,0xE0,0x0F,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x1F,0x00,0x1F,0x00,0x00,0x00,0x00, // 0x74
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xE0,0x70,0xC0,0x7F,0x80,0x6F,0x00,0x00,0x00,0x00, // 0x75
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x60,0x60,0x60,0xC0,0x30,0xC0,0x30,0x80,0x19,0x80,0x19,0x00,0x0F,0x00,0x0F,0x00,0x06,0x00,0x00,0x00,0x00, // 0x76
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x66,0x60,0x66,0x60,0x66,0x60,0x66,0x60,0x66,0x60,0x6F,0xC0,0x3F,0xC0,0x39,0x80,0x10,0x00,0x00,0x00,0x00, // 0x77
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x30,0xE0,0x38,0xC0,0x1D,0x80,0x0F,0x00,0x07,0x80,0x0F,0xC0,0x1D,0xE0,0x38,0x60,0x30,0x00,0x00,0x00,0x00, // 0x78
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x30,0xC0,0x30,0x80,0x19,0x80,0x19,0x00,0x0F,0x00,0x0F,0x00,0x06,0x00,0x06,0x00,0x03,0x00,0x03,0x80,0x01, // 0x79
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x3F,0xE0,0x1F,0x00,0x0C,0x00,0x06,0x00,0x03,0x80,0x01,0xC0,0x00,0xE0,0x3F,0xE0,0x3F,0x00,0x00,0x00,0x00, // 0x7A
+ 0x00,0x3C,0x00,0x3E,0x00,0x07,0x00,0x03,0x00,0x03,0x00,0x03,0x80,0x03,0xC0,0x01,0x80,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x07,0x00,0x3E,0x00,0x3C,0x00,0x00, // 0x7B
+ 0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x00,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x00,0x00,0x00, // 0x7C
+ 0xC0,0x03,0xC0,0x07,0x00,0x0E,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x1C,0x00,0x38,0x00,0x1C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0E,0xC0,0x07,0xC0,0x03,0x00,0x00, // 0x7D
+ 0x00,0x00,0x00,0x00,0x80,0x63,0xC0,0x36,0x60,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // 0x7E
+ 0x00,0x0F,0x80,0x1F,0x80,0x19,0x80,0x19,0x80,0x1F,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 // 0xF8
+};
+
+const uint8_t font_6x8_data[]={
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // 0x20
+ 0x20,0x70,0x70,0x20,0x20,0x00,0x20,0x00, // 0x21
+ 0xD8,0xD8,0x48,0x00,0x00,0x00,0x00,0x00, // 0x22
+ 0x00,0x50,0xF8,0x50,0x50,0xF8,0x50,0x00, // 0x23
+ 0x10,0x70,0x08,0x30,0x40,0x38,0x20,0x00, // 0x24
+ 0x98,0x98,0x40,0x20,0x10,0xC8,0xC8,0x00, // 0x25
+ 0x10,0x28,0x28,0x10,0xA8,0x48,0xB0,0x00, // 0x26
+ 0x30,0x30,0x10,0x00,0x00,0x00,0x00,0x00, // 0x27
+ 0x20,0x10,0x10,0x10,0x10,0x10,0x20,0x00, // 0x28
+ 0x10,0x20,0x20,0x20,0x20,0x20,0x10,0x00, // 0x29
+ 0x00,0x50,0x70,0xF8,0x70,0x50,0x00,0x00, // 0x2A
+ 0x00,0x20,0x20,0xF8,0x20,0x20,0x00,0x00, // 0x2B
+ 0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x10, // 0x2C
+ 0x00,0x00,0x00,0xF8,0x00,0x00,0x00,0x00, // 0x2D
+ 0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00, // 0x2E
+ 0x00,0x80,0x40,0x20,0x10,0x08,0x00,0x00, // 0x2F
+ 0x70,0x88,0xC8,0xA8,0x98,0x88,0x70,0x00, // 0x30
+ 0x20,0x30,0x20,0x20,0x20,0x20,0x70,0x00, // 0x31
+ 0x70,0x88,0x80,0x60,0x10,0x08,0xF8,0x00, // 0x32
+ 0x70,0x88,0x80,0x70,0x80,0x88,0x70,0x00, // 0x33
+ 0x40,0x60,0x50,0x48,0xF8,0x40,0x40,0x00, // 0x34
+ 0xF8,0x08,0x08,0x78,0x80,0x88,0x70,0x00, // 0x35
+ 0x60,0x10,0x08,0x78,0x88,0x88,0x70,0x00, // 0x36
+ 0xF8,0x80,0x40,0x20,0x10,0x10,0x10,0x00, // 0x37
+ 0x70,0x88,0x88,0x70,0x88,0x88,0x70,0x00, // 0x38
+ 0x70,0x88,0x88,0xF0,0x80,0x40,0x30,0x00, // 0x39
+ 0x00,0x00,0x30,0x30,0x00,0x30,0x30,0x00, // 0x3A
+ 0x00,0x00,0x30,0x30,0x00,0x30,0x30,0x10, // 0x3B
+ 0x40,0x20,0x10,0x08,0x10,0x20,0x40,0x00, // 0x3C
+ 0x00,0x00,0xF8,0x00,0x00,0xF8,0x00,0x00, // 0x3D
+ 0x10,0x20,0x40,0x80,0x40,0x20,0x10,0x00, // 0x3E
+ 0x70,0x88,0x80,0x60,0x20,0x00,0x20,0x00, // 0x3F
+ 0x70,0x88,0xE8,0xA8,0xE8,0x08,0x70,0x00, // 0x40
+ 0x70,0x88,0x88,0x88,0xF8,0x88,0x88,0x00, // 0x41
+ 0x78,0x88,0x88,0x78,0x88,0x88,0x78,0x00, // 0x42
+ 0x70,0x88,0x08,0x08,0x08,0x88,0x70,0x00, // 0x43
+ 0x78,0x88,0x88,0x88,0x88,0x88,0x78,0x00, // 0x44
+ 0xF8,0x08,0x08,0x78,0x08,0x08,0xF8,0x00, // 0x45
+ 0xF8,0x08,0x08,0x78,0x08,0x08,0x08,0x00, // 0x46
+ 0x70,0x88,0x08,0xE8,0x88,0x88,0xF0,0x00, // 0x47
+ 0x88,0x88,0x88,0xF8,0x88,0x88,0x88,0x00, // 0x48
+ 0x70,0x20,0x20,0x20,0x20,0x20,0x70,0x00, // 0x49
+ 0x80,0x80,0x80,0x80,0x88,0x88,0x70,0x00, // 0x4A
+ 0x88,0x48,0x28,0x18,0x28,0x48,0x88,0x00, // 0x4B
+ 0x08,0x08,0x08,0x08,0x08,0x08,0xF8,0x00, // 0x4C
+ 0x88,0xD8,0xA8,0x88,0x88,0x88,0x88,0x00, // 0x4D
+ 0x88,0x98,0xA8,0xC8,0x88,0x88,0x88,0x00, // 0x4E
+ 0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x00, // 0x4F
+ 0x78,0x88,0x88,0x78,0x08,0x08,0x08,0x00, // 0x50
+ 0x70,0x88,0x88,0x88,0xA8,0x48,0xB0,0x00, // 0x51
+ 0x78,0x88,0x88,0x78,0x48,0x88,0x88,0x00, // 0x52
+ 0x70,0x88,0x08,0x70,0x80,0x88,0x70,0x00, // 0x53
+ 0xF8,0x20,0x20,0x20,0x20,0x20,0x20,0x00, // 0x54
+ 0x88,0x88,0x88,0x88,0x88,0x88,0x70,0x00, // 0x55
+ 0x88,0x88,0x88,0x88,0x88,0x50,0x20,0x00, // 0x56
+ 0x88,0x88,0xA8,0xA8,0xA8,0xA8,0x50,0x00, // 0x57
+ 0x88,0x88,0x50,0x20,0x50,0x88,0x88,0x00, // 0x58
+ 0x88,0x88,0x88,0x50,0x20,0x20,0x20,0x00, // 0x59
+ 0x78,0x40,0x20,0x10,0x08,0x08,0x78,0x00, // 0x5A
+ 0x70,0x10,0x10,0x10,0x10,0x10,0x70,0x00, // 0x5B
+ 0x00,0x08,0x10,0x20,0x40,0x80,0x00,0x00, // 0x5C
+ 0x70,0x40,0x40,0x40,0x40,0x40,0x70,0x00, // 0x5D
+ 0x20,0x50,0x88,0x00,0x00,0x00,0x00,0x00, // 0x5E
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC, // 0x5F
+ 0x30,0x30,0x20,0x00,0x00,0x00,0x00,0x00, // 0x60
+ 0x00,0x00,0x70,0x80,0xF0,0x88,0xF0,0x00, // 0x61
+ 0x08,0x08,0x78,0x88,0x88,0x88,0x78,0x00, // 0x62
+ 0x00,0x00,0x70,0x88,0x08,0x88,0x70,0x00, // 0x63
+ 0x80,0x80,0xF0,0x88,0x88,0x88,0xF0,0x00, // 0x64
+ 0x00,0x00,0x70,0x88,0x78,0x08,0x70,0x00, // 0x65
+ 0x60,0x10,0x10,0x78,0x10,0x10,0x10,0x00, // 0x66
+ 0x00,0x00,0xF0,0x88,0x88,0xF0,0x80,0x70, // 0x67
+ 0x08,0x08,0x38,0x48,0x48,0x48,0x48,0x00, // 0x68
+ 0x20,0x00,0x20,0x20,0x20,0x20,0x60,0x00, // 0x69
+ 0x40,0x00,0x60,0x40,0x40,0x40,0x48,0x30, // 0x6A
+ 0x08,0x08,0x48,0x28,0x18,0x28,0x48,0x00, // 0x6B
+ 0x20,0x20,0x20,0x20,0x20,0x20,0x60,0x00, // 0x6C
+ 0x00,0x00,0x58,0xA8,0xA8,0x88,0x88,0x00, // 0x6D
+ 0x00,0x00,0x38,0x48,0x48,0x48,0x48,0x00, // 0x6E
+ 0x00,0x00,0x70,0x88,0x88,0x88,0x70,0x00, // 0x6F
+ 0x00,0x00,0x78,0x88,0x88,0x88,0x78,0x08, // 0x70
+ 0x00,0x00,0xF0,0x88,0x88,0x88,0xF0,0x80, // 0x71
+ 0x00,0x00,0x68,0x90,0x10,0x10,0x38,0x00, // 0x72
+ 0x00,0x00,0x70,0x08,0x70,0x80,0x70,0x00, // 0x73
+ 0x00,0x10,0x78,0x10,0x10,0x50,0x20,0x00, // 0x74
+ 0x00,0x00,0x48,0x48,0x48,0x68,0x50,0x00, // 0x75
+ 0x00,0x00,0x88,0x88,0x88,0x50,0x20,0x00, // 0x76
+ 0x00,0x00,0x88,0x88,0xA8,0xF8,0x50,0x00, // 0x77
+ 0x00,0x00,0x48,0x48,0x30,0x48,0x48,0x00, // 0x78
+ 0x00,0x00,0x48,0x48,0x48,0x70,0x20,0x18, // 0x79
+ 0x00,0x00,0x78,0x40,0x30,0x08,0x78,0x00, // 0x7A
+ 0x60,0x10,0x10,0x18,0x10,0x10,0x60,0x00, // 0x7B
+ 0x20,0x20,0x20,0x00,0x20,0x20,0x20,0x00, // 0x7C
+ 0x30,0x40,0x40,0xC0,0x40,0x40,0x30,0x00, // 0x7D
+ 0x50,0x28,0x00,0x00,0x00,0x00,0x00,0x00, // 0x7E
+ 0x30,0x48,0x48,0x30,0x00,0x00,0x00,0x00 // 0xF8
+};
+
+const uint8_t verdana_13x12_data[]= {
+// Font_Verdana_Widths:
+ 0x07,0x03,0x06,0x08,0x07,0x0D,0x09,0x03,0x05,0x05,0x06,0x08,0x03,0x05,0x03,0x07,
+ 0x07,0x06,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x03,0x03,0x08,0x08,0x08,0x06,
+ 0x0A,0x08,0x07,0x07,0x08,0x07,0x07,0x08,0x08,0x05,0x05,0x07,0x07,0x09,0x08,0x08,
+ 0x07,0x08,0x08,0x07,0x08,0x08,0x07,0x0B,0x07,0x07,0x07,0x05,0x07,0x05,0x09,0x08,
+ 0x05,0x07,0x07,0x06,0x07,0x07,0x05,0x07,0x07,0x03,0x04,0x07,0x03,0x0B,0x07,0x07,
+ 0x07,0x07,0x06,0x06,0x05,0x07,0x07,0x09,0x07,0x07,0x06,0x07,0x04,0x07,0x08,0x04,
+// Font_verdana:
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char
+ 0x00,0x00,0x7E,0x01,0x7E,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char !
+ 0x00,0x00,0x07,0x00,0x07,0x00,0x00,0x00,0x07,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char "
+ 0x00,0x00,0x40,0x00,0xC8,0x01,0x78,0x00,0xCE,0x01,0x78,0x00,0x4E,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char #
+ 0x00,0x00,0x98,0x00,0x3C,0x01,0xE4,0x07,0x3F,0x01,0xE4,0x01,0xC8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char $
+ 0x00,0x00,0x1C,0x00,0x3E,0x00,0x22,0x00,0x3E,0x00,0x9C,0x01,0x60,0x00,0x18,0x00,0xE6,0x00,0xF0,0x01,0x10,0x01,0xF0,0x01,0xE0,0x00, // Code for char %
+ 0x00,0x00,0xEC,0x00,0xFE,0x01,0x12,0x01,0x3E,0x01,0x6C,0x01,0xC0,0x00,0xB0,0x01,0x10,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char &
+ 0x00,0x00,0x07,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char '
+ 0x00,0x00,0xF8,0x00,0xFE,0x03,0x07,0x07,0x01,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char (
+ 0x00,0x00,0x01,0x04,0x07,0x07,0xFE,0x03,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char )
+ 0x00,0x00,0x0A,0x00,0x04,0x00,0x1F,0x00,0x04,0x00,0x0A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char *
+ 0x00,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0xFC,0x01,0x20,0x00,0x20,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char +
+ 0x00,0x00,0x80,0x07,0x80,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char ,
+ 0x00,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char -
+ 0x00,0x00,0x80,0x01,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char .
+ 0x00,0x00,0x00,0x06,0x80,0x07,0xF0,0x01,0x7C,0x00,0x0F,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char /
+ 0x00,0x00,0xFC,0x00,0xFE,0x01,0x02,0x01,0x02,0x01,0xFE,0x01,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char 0
+ 0x00,0x00,0x00,0x00,0x04,0x01,0xFE,0x01,0xFE,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char 1
+ 0x00,0x00,0x84,0x01,0xC6,0x01,0x62,0x01,0x32,0x01,0x1E,0x01,0x0C,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char 2
+ 0x00,0x00,0x84,0x00,0x86,0x01,0x12,0x01,0x12,0x01,0xFE,0x01,0xEC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char 3
+ 0x00,0x00,0x60,0x00,0x50,0x00,0x48,0x00,0xFC,0x01,0xFE,0x01,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char 4
+ 0x00,0x00,0x80,0x00,0x9E,0x01,0x1E,0x01,0x12,0x01,0xF2,0x01,0xE2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char 5
+ 0x00,0x00,0xF8,0x00,0xFC,0x01,0x16,0x01,0x12,0x01,0xF2,0x01,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char 6
+ 0x00,0x00,0x02,0x00,0x82,0x01,0xE2,0x01,0x7A,0x00,0x1E,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char 7
+ 0x00,0x00,0xEC,0x00,0xFE,0x01,0x12,0x01,0x12,0x01,0xFE,0x01,0xEC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char 8
+ 0x00,0x00,0x1C,0x00,0x3E,0x01,0x22,0x01,0xA2,0x01,0xFE,0x00,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char 9
+ 0x00,0x00,0x98,0x01,0x98,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char :
+ 0x00,0x00,0x98,0x07,0x98,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char ;
+ 0x00,0x00,0x20,0x00,0x50,0x00,0x50,0x00,0x88,0x00,0x88,0x00,0x04,0x01,0x04,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char <
+ 0x00,0x00,0x48,0x00,0x48,0x00,0x48,0x00,0x48,0x00,0x48,0x00,0x48,0x00,0x48,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char =
+ 0x00,0x00,0x04,0x01,0x04,0x01,0x88,0x00,0x88,0x00,0x50,0x00,0x50,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char >
+ 0x00,0x00,0x04,0x00,0x62,0x01,0x72,0x01,0x1E,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char ?
+ 0x00,0x00,0xF8,0x00,0x04,0x01,0x72,0x02,0xFA,0x02,0x8A,0x02,0xFA,0x02,0xFA,0x02,0x82,0x00,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char @
+ 0x00,0x00,0xC0,0x01,0xF8,0x01,0x7E,0x00,0x46,0x00,0x7E,0x00,0xF8,0x01,0xC0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char A
+ 0x00,0x00,0xFE,0x01,0xFE,0x01,0x12,0x01,0x12,0x01,0xFE,0x01,0xEC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char B
+ 0x00,0x00,0xFC,0x00,0xFE,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x84,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char C
+ 0x00,0x00,0xFE,0x01,0xFE,0x01,0x02,0x01,0x02,0x01,0x86,0x01,0xFC,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char D
+ 0x00,0x00,0xFE,0x01,0xFE,0x01,0x12,0x01,0x12,0x01,0x12,0x01,0x12,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char E
+ 0x00,0x00,0xFE,0x01,0xFE,0x01,0x12,0x00,0x12,0x00,0x12,0x00,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char F
+ 0x00,0x00,0xFC,0x00,0xFE,0x01,0x02,0x01,0x02,0x01,0x22,0x01,0xE2,0x01,0xE4,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char G
+ 0x00,0x00,0xFE,0x01,0xFE,0x01,0x10,0x00,0x10,0x00,0x10,0x00,0xFE,0x01,0xFE,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char H
+ 0x00,0x00,0x02,0x01,0xFE,0x01,0xFE,0x01,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char I
+ 0x00,0x01,0x02,0x01,0x02,0x01,0xFE,0x01,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char J
+ 0x00,0x00,0xFE,0x01,0xFE,0x01,0x78,0x00,0xCC,0x00,0x86,0x01,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char K
+ 0x00,0x00,0xFE,0x01,0xFE,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char L
+ 0x00,0x00,0xFE,0x01,0x0E,0x00,0x1C,0x00,0x38,0x00,0x10,0x00,0x08,0x00,0xFC,0x01,0xFE,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char M
+ 0x00,0x00,0xFE,0x01,0x0C,0x00,0x18,0x00,0x30,0x00,0x60,0x00,0xC0,0x00,0xFE,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char N
+ 0x00,0x00,0xFC,0x00,0xFE,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0xFE,0x01,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char O
+ 0x00,0x00,0xFE,0x01,0xFE,0x01,0x22,0x00,0x22,0x00,0x3E,0x00,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char P
+ 0x00,0x00,0xFC,0x00,0xFE,0x01,0x02,0x01,0x02,0x03,0x02,0x07,0xFE,0x05,0xFC,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char Q
+ 0x00,0x00,0xFE,0x01,0xFE,0x01,0x22,0x00,0x62,0x00,0xFE,0x00,0x9C,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char R
+ 0x00,0x00,0x9C,0x00,0x3E,0x01,0x32,0x01,0x32,0x01,0xF2,0x01,0xE4,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char S
+ 0x02,0x00,0x02,0x00,0x02,0x00,0xFE,0x01,0xFE,0x01,0x02,0x00,0x02,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char T
+ 0x00,0x00,0xFE,0x00,0xFE,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0xFE,0x01,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char U
+ 0x00,0x00,0x0E,0x00,0x7E,0x00,0xF0,0x01,0xF0,0x01,0x7E,0x00,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char V
+ 0x00,0x00,0x0E,0x00,0x7E,0x00,0xF0,0x01,0xE0,0x01,0x3E,0x00,0x3E,0x00,0xE0,0x01,0xF0,0x01,0x7E,0x00,0x0E,0x00,0x00,0x00,0x00,0x00, // Code for char W
+ 0x00,0x00,0x86,0x01,0xCE,0x01,0x78,0x00,0x78,0x00,0xCE,0x01,0x86,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char X
+ 0x00,0x00,0x06,0x00,0x1E,0x00,0xF8,0x01,0xF8,0x01,0x1E,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char Y
+ 0x00,0x00,0xC2,0x01,0xE2,0x01,0x72,0x01,0x3A,0x01,0x1E,0x01,0x0E,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char Z
+ 0x00,0x00,0xFF,0x07,0xFF,0x07,0x01,0x04,0x01,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char [
+ 0x00,0x00,0x03,0x00,0x0F,0x00,0x7C,0x00,0xF0,0x01,0x80,0x07,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char BackSlash
+ 0x00,0x00,0x01,0x04,0x01,0x04,0xFF,0x07,0xFF,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char ]
+ 0x00,0x00,0x10,0x00,0x18,0x00,0x0C,0x00,0x06,0x00,0x06,0x00,0x0C,0x00,0x18,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char ^
+ 0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char _
+ 0x00,0x00,0x00,0x00,0x01,0x00,0x03,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char `
+ 0x00,0x00,0xC0,0x00,0xE8,0x01,0x28,0x01,0x28,0x01,0xF8,0x01,0xF0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char a
+ 0x00,0x00,0xFF,0x01,0xFF,0x01,0x08,0x01,0x08,0x01,0xF8,0x01,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char b
+ 0x00,0x00,0xF0,0x00,0xF8,0x01,0x08,0x01,0x08,0x01,0x08,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char c
+ 0x00,0x00,0xF0,0x00,0xF8,0x01,0x08,0x01,0x08,0x01,0xFF,0x01,0xFF,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char d
+ 0x00,0x00,0xF0,0x00,0xF8,0x01,0x28,0x01,0x28,0x01,0x38,0x01,0xB0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char e
+ 0x08,0x00,0xFE,0x01,0xFF,0x01,0x09,0x00,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char f
+ 0x00,0x00,0xF0,0x00,0xF8,0x05,0x08,0x05,0x08,0x05,0xF8,0x07,0xF8,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char g
+ 0x00,0x00,0xFF,0x01,0xFF,0x01,0x08,0x00,0x08,0x00,0xF8,0x01,0xF0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char h
+ 0x00,0x00,0xFA,0x01,0xFA,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char i
+ 0x00,0x04,0x08,0x04,0xFA,0x07,0xFA,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char j
+ 0x00,0x00,0xFF,0x01,0xFF,0x01,0x60,0x00,0xF0,0x00,0x98,0x01,0x08,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char k
+ 0x00,0x00,0xFF,0x01,0xFF,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char l
+ 0x00,0x00,0xF8,0x01,0xF8,0x01,0x08,0x00,0x08,0x00,0xF8,0x01,0xF0,0x01,0x08,0x00,0x08,0x00,0xF8,0x01,0xF0,0x01,0x00,0x00,0x00,0x00, // Code for char m
+ 0x00,0x00,0xF8,0x01,0xF8,0x01,0x08,0x00,0x08,0x00,0xF8,0x01,0xF0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char n
+ 0x00,0x00,0xF0,0x00,0xF8,0x01,0x08,0x01,0x08,0x01,0xF8,0x01,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char o
+ 0x00,0x00,0xF8,0x07,0xF8,0x07,0x08,0x01,0x08,0x01,0xF8,0x01,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char p
+ 0x00,0x00,0xF0,0x00,0xF8,0x01,0x08,0x01,0x08,0x01,0xF8,0x07,0xF8,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char q
+ 0x00,0x00,0xF8,0x01,0xF8,0x01,0x10,0x00,0x18,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char r
+ 0x00,0x00,0x30,0x01,0x78,0x01,0x68,0x01,0xE8,0x01,0xC8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char s
+ 0x08,0x00,0xFE,0x00,0xFE,0x01,0x08,0x01,0x08,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char t
+ 0x00,0x00,0xF8,0x00,0xF8,0x01,0x00,0x01,0x00,0x01,0xF8,0x01,0xF8,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char u
+ 0x00,0x00,0x38,0x00,0xF8,0x00,0xC0,0x01,0xC0,0x01,0xF8,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char v
+ 0x00,0x00,0x78,0x00,0xF8,0x01,0x80,0x01,0x78,0x00,0x78,0x00,0x80,0x01,0xF8,0x01,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char w
+ 0x00,0x00,0x98,0x01,0xF8,0x01,0x60,0x00,0x60,0x00,0xF8,0x01,0x98,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char x
+ 0x00,0x00,0x18,0x00,0x78,0x06,0xE0,0x07,0xE0,0x01,0x78,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char y
+ 0x00,0x00,0x88,0x01,0xC8,0x01,0x68,0x01,0x38,0x01,0x18,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char z
+ 0x00,0x00,0x20,0x00,0x20,0x00,0xFE,0x03,0xDF,0x07,0x01,0x04,0x01,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char {
+ 0x00,0x00,0x00,0x00,0xFF,0x07,0xFF,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char |
+ 0x00,0x00,0x01,0x04,0x01,0x04,0xDF,0x07,0xFE,0x03,0x20,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char }
+ 0x00,0x00,0xE0,0x00,0x10,0x00,0x10,0x00,0x60,0x00,0x80,0x00,0x80,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Code for char ~
+ 0xFE,0x01,0xFE,0x01,0xFE,0x01,0xFE,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 // Code for char
+
+};
+
+static sFontStruct verdana_13x12={13,12,0x20,0x7F,FFLAG_GDOS, verdana_13x12_data};
+static sFontStruct font_12x16={12,16,0x20,0x7f, 0, font_12x16_data};
+static sFontStruct font_6x8={6,8,0x20,0x7F,0, font_6x8_data};
+
+#endif // BIGFONT_H_
diff --git a/src/display.c b/src/display.c
new file mode 100644
index 0000000..18d81cd
--- /dev/null
+++ b/src/display.c
@@ -0,0 +1,462 @@
+/*
+ * display.c
+ *
+ * Created on: 25 paź 2021
+ * Author: s.bartkowicz
+ */
+
+
+/*
+ * lcd.c - Display handling (KS0108 compatible, with two chip selects, active high)
+ * for T-962 reflow controller
+ *
+ * Copyright (C) 2010,2012,2013,2014 Werner Johansson, wj@unifiedengineering.se
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+#include "LPC214x.h"
+#include
+#include
+#include
+#include
+#include
+#include "display.h"
+
+#ifdef USES_ORIGINAL_DISPLAY
+
+#include "lcd.h"
+
+extern uint8_t graphbmp[];
+
+void Display_disp_str(uint8_t* theStr, uint8_t theLen, uint16_t startx, uint16_t y, uint8_t theFormat) {
+ if ((startx<256)&&(y<256)) {
+ LCD_disp_str(theStr,theLen,(uint8_t)startx,(uint8_t)y,theFormat);
+ }
+}
+uint8_t Display_BMPDisplay(uint8_t* thebmp, uint16_t xoffset, uint16_t yoffset) {
+ uint8_t retval=0;
+ if ((xoffset<256)&&(yoffset<256)) {
+ retval=Display_BMPDisplay(thebmp,xoffset,yoffset);
+ }
+ return retval;
+}
+void Display_SetPixel(uint16_t x, uint16_t y) {
+ if ((x<256)&&(y<256)) {
+ LCD_SetPixel((uint8_t)x,(uint8_t)y);
+ }
+
+}
+
+// two not used function for standard display (no use with 128x64 pixel resolution)
+void Display_DrawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1) {}
+void Display_DrawGrid(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t xmin, uint16_t ymin, uint16_t xmax, uint16_t ymax,uint16_t density) {
+ LCD_BMPDisplay(graphbmp, 0, 0);
+}
+
+void Display_SetBacklight(uint8_t backlight) {
+ LCD_SetBacklight(backlight);
+}
+void Display_Init(void) {
+ LCD_Init();
+}
+void Display_FB_Clear(void) {
+ LCD_FB_Clear();
+}
+void Display_FB_Update(void) {
+ LCD_FB_Update();
+}
+
+
+#elif defined (USES_FRAMEBUFFER) // limited to 320x240 displays, only monochrome (due to memory constrains)
+
+#include "bigfont.h"
+#include "tft.h"
+
+static uint8_t FB[((FB_WIDTH+7) >> 3)*FB_HEIGHT];
+
+// Frame buffer definition for monochome display
+
+typedef struct __attribute__ ((packed)) {
+ uint8_t bfType[2]; // 'BM' only in this case
+ uint32_t bfSize; // Total size
+ uint16_t bfReserved[2];
+ uint32_t bfOffBits; // Pixel start byte
+ uint32_t biSize; // 40 bytes for BITMAPINFOHEADER
+ int32_t biWidth; // Image width in pixels
+ int32_t biHeight; // Image height in pixels (if negative image is right-side-up)
+ uint16_t biPlanes; // Must be 1
+ uint16_t biBitCount; // Must be 1
+ uint32_t biCompression; // Only 0 (uncompressed) supported at the moment
+ uint32_t biSizeImage; // Pixel data size in bytes
+ int32_t biXPelsPerMeter;
+ int32_t biYPelsPerMeter;
+ uint32_t biClrUsed;
+ uint32_t biClrImportant;
+ uint32_t aColors[2]; // Palette data, first color is used if pixel bit is 0, second if pixel bit is 1
+} BMhdr_t;
+
+
+//uint32_t charoutdirect(uint8_t theChar, uint16_t X, uint16_t, Y, uint8_t theFormat, uint16_t FGColor, uint16_t BGColor) {
+// converts internal bitmap font to color information and feeds it directly to the TFT controller Frame Buffer
+// uint16_t
+//}
+
+uint32_t fontbytesize(sFontStruct* font) {
+ uint32_t bytesize;
+ if (font->flags&FFLAG_VERTICAL) {
+ bytesize=font->height>>3;
+ if ((font->height&0x07)>0) bytesize++;
+ } else {
+ bytesize=font->width>>3;
+ if ((font->width&0x07)>0) bytesize++;
+ }
+ return bytesize;
+}
+uint32_t fontbytesperfont(sFontStruct* font) {
+ uint32_t bytesperfont=font->height;
+ if (font->flags&FFLAG_VERTICAL) {
+ bytesperfont=font->width;
+ }
+ bytesperfont*=fontbytesize(font);
+ return bytesperfont;
+}
+sFontStruct* fontget(uint8_t fontno) {
+ sFontStruct* retval;
+ switch (fontno) {
+ case FONT12X16:
+ retval=&font_12x16;
+ break;
+ case FONT6X8:
+ retval=&font_6x8;
+ break;
+ case FONTVERDANA:
+ retval=&verdana_13x12;
+ break;
+ default:
+ retval=&font_12x16;
+ }
+ return retval;
+}
+
+uint32_t fontgetmask(sFontStruct* font) {
+ uint32_t retval=1;
+ for (int i=0;iwidth;i++) {
+ retval<<=1;
+ retval|=1;
+ }
+ uint32_t adjust=(fontbytesize(font)<<3)-font->width;
+ retval<<=adjust; // left adjustment
+ return retval;
+}
+
+uint8_t fontprintable(sFontStruct* font, uint8_t theChar) {
+ if ((theChar>=font->starting_char)&&(theChar<=font->ending_char)) return 1;
+ else return 0;
+}
+
+uint32_t fontgetcharaddress(sFontStruct* font,uint8_t theChar) {
+ uint32_t returnval=0;
+ if (fontprintable(font,theChar)) {
+ if (font->flags&FFLAG_PROPORTIONAL) returnval=(font->ending_char+1-font->starting_char);
+ returnval+=(theChar-font->starting_char)*fontbytesperfont(font);
+ }
+ return returnval;
+}
+
+uint32_t fontgetwidth(sFontStruct* font, uint8_t theChar) {
+ if (fontprintable(font,theChar)) {
+
+ if (font->flags&FFLAG_PROPORTIONAL) {
+ return (uint32_t)font->data[theChar-font->starting_char];
+ } else return font->width;
+ } else return 0;
+}
+
+uint32_t Display_get_str_lenght(uint8_t* theStr, uint8_t theLen, uint8_t theFormat) {
+ sFontStruct* font=fontget(theFormat & 0x7f);
+ uint32_t lenght=0;
+ for (int i=0;iheight;
+ uint8_t bitmask;
+ cmask=fontgetmask(font);
+
+ if (theFormat & INVERT) {
+ xormask=cmask;
+ } else {
+ xormask=0;
+ }
+
+ if (fontprintable(font,theChar)) {
+ if ((font->flags)&FFLAG_VERTICAL) {
+ xormask>>=8-(height&7);
+ for (int x=0;x=0;i--) {
+ temp<<=8;
+ temp|=(uint32_t)font->data[fontoffset+i+bytesize*x];
+ }
+ if (theFormat & INVERT) temp^=xormask;
+ for (int y=0;y>3)+FB_BWIDTH*(Y+y)]|=bitmask;
+ } else {
+ FB[((X+x)>>3)+FB_BWIDTH*(Y+y)]&=~bitmask;
+ }
+ }
+ }
+ }
+ }
+ } else {
+ cmask<<=xoffset;
+ cmask=~cmask;
+ X >>= 3;
+ for (int y=0;y=0;i--) {
+ temp<<=8;
+ temp|=(uint32_t)font->data[fontoffset+y*bytesize+i];
+ }
+ temp ^=xormask;
+ temp <<=xoffset;
+ old=0;
+ if ((Y+y)>24) & 0xFF;
+ if (X+2<=(FB_BWIDTH-1)) FB[X+2+FB_BWIDTH*(Y+y)]=(temp>>16) & 0xFF;
+ if (X+1<=(FB_BWIDTH-1)) FB[X+1+FB_BWIDTH*(Y+y)]=(temp>>8) & 0xFF;
+ if (X<=(FB_BWIDTH-1)) FB[X+FB_BWIDTH*(Y+y)]=temp & 0xFF;
+ }
+ }
+ }
+ }
+ return fontgetwidth(font,theChar);
+}
+
+
+void Display_disp_str(uint8_t* theStr, uint8_t theLen, uint16_t startx, uint16_t y, uint8_t theFormat) {
+ for (uint8_t q = 0; q < theLen; q++) {
+ startx+=charoutbig(theStr[q], startx, y, theFormat);
+ }
+}
+
+
+/*
+ * At the moment this is a very basic BMP file reader with the following limitations:
+ * The bitmap must be 1-bit, uncompressed with a BITMAPINFOHEADER.
+ */
+uint8_t Display_BMPDisplay(uint8_t* thebmp, uint16_t xoffset, uint16_t yoffset) {
+ BMhdr_t* bmhdr;
+ uint8_t upsidedown = 1;
+ uint8_t inverted = 0;
+ uint16_t pixeloffset;
+ uint8_t numpadbytes = 0;
+
+ // The following code grabs the header portion of the bitmap and caches it locally on the stack
+ BMhdr_t temp;
+ uint8_t* xxx = (uint8_t*) &temp;
+ for (uint16_t xx = 0; xx < sizeof(BMhdr_t); xx++) {
+ xxx[xx] = *(thebmp + xx);
+ }
+ bmhdr = &temp;
+
+// printf("\n%s: bfSize=%x biSize=%x", __FUNCTION__, (uint16_t)bmhdr->bfSize, (uint16_t)bmhdr->biSize);
+// printf("\n%s: Image size is %d x %d", __FUNCTION__, (int16_t)bmhdr->biWidth, (int16_t)bmhdr->biHeight);
+ if (bmhdr->biPlanes != 1 || bmhdr->biBitCount != 1 || bmhdr->biCompression != 0) {
+ printf("\n%s: Incompatible bitmap format!", __FUNCTION__);
+ return 1;
+ }
+ pixeloffset = bmhdr->bfOffBits;
+ if (bmhdr->aColors[0] == 0) {
+ inverted = 1;
+ }
+ if (bmhdr->biHeight<0) {
+ bmhdr->biHeight = -bmhdr->biHeight;
+ upsidedown = 0;
+ }
+ if ((bmhdr->biWidth+xoffset > FB_WIDTH) || (bmhdr->biHeight+yoffset > FB_HEIGHT)) {
+ printf("\n%s: Image won't fit on display!", __FUNCTION__);
+ return 1;
+ }
+
+ // Figure out how many dummy bytes that is present at the end of each line
+ // If the image is 132 pixels wide then the pixel lines will be 20 bytes (160 pixels)
+ // 132&31 is 4 which means that there are 3 bytes of padding
+ numpadbytes = (4-((((bmhdr->biWidth) & 0x1f) + 7) >> 3)) & 0x03;
+ uint8_t trim_mask=0;
+ for (int i=0;i<(bmhdr->biWidth & 0x03);i++) {
+ trim_mask|=128>>i;
+ }
+// printf("\n%s: Skipping %d padding bytes after each line", __FUNCTION__, numpadbytes);
+
+ for (int16_t y = bmhdr->biHeight - 1; y >= 0; y--) {
+ uint16_t realY = upsidedown ? (uint8_t)y : (uint8_t)(bmhdr->biHeight) - y;
+ realY += yoffset;
+ for(uint16_t x = 0; x < bmhdr->biWidth; x += 8) {
+ uint8_t pixel = *(thebmp + (pixeloffset++));
+ uint8_t revpixel=0;
+ if (x==((bmhdr->biWidth >>3)<<3)) {
+ pixel&=trim_mask;
+ }
+ if (inverted) { pixel^=0xff; }
+ for (uint8_t bits=0;bits<8;bits++) {
+ if (pixel & (1<>3)+FB_BWIDTH*realY] &= ~(mpixel & 0xff);
+ FB[((x+xoffset)>>3)+1+FB_BWIDTH*realY] &= ~(mpixel >>8);
+ FB[((x+xoffset)>>3)+FB_BWIDTH*realY] |= expixel & 0xff;
+ FB[((x+xoffset)>>3)+1+FB_BWIDTH*realY]|= expixel >>8;
+ }
+ pixeloffset += numpadbytes;
+ }
+ return 0;
+}
+
+
+void Display_SetPixel(uint16_t x, uint16_t y) {
+ if (x >= FB_WIDTH || y >= FB_HEIGHT) {
+ // No random memory overwrites thank you
+ return;
+ }
+ FB[(x>>3)+FB_BWIDTH*y]|=1<<(x & 0x07);
+}
+
+void Display_DrawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1) {
+ int16_t dx, dy, err, e2 , sy,sx;
+
+ if ((x0>=FB_WIDTH)||(y0>=FB_HEIGHT)||(x1>=FB_WIDTH)||(y1>=FB_HEIGHT)) return;
+ dx = abs(x1-x0);
+ sx = x0= dy) {
+ err += dy;
+ x0 += sx;
+ }
+ if (e2 <= dx) {
+ err += dx;
+ y0 += sy;
+ }
+ }
+}
+
+void Display_SetCross(uint16_t x,uint16_t y) {
+ if (x >= FB_WIDTH || y >= FB_HEIGHT) {
+ // No random memory overwrites thank you
+ return;
+ }
+ Display_SetPixel(x,y);
+ Display_SetPixel(x,y-1);
+ Display_SetPixel(x,y+1);
+ Display_SetPixel(x+1,y);
+ Display_SetPixel(x-1,y);
+}
+void Display_DrawGrid(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t xmin, uint16_t ymin, uint16_t xmax, uint16_t ymax,uint16_t density) {
+ uint16_t dx,dy,sdx, sdy,x,y,len,xscale,yscale;
+ double units_x,units_y,grid_x,grid_y;
+ char buf[4];
+
+ if ((x0>=FB_WIDTH)||(y0>=FB_HEIGHT)||(x1>=FB_WIDTH)||(y1>=FB_HEIGHT)) return;
+ if ((x0>=x1)||(y0>=y1)) return;
+ if ((xmin>=xmax)||(ymin>=ymax)) return;
+
+ dx=x1-x0;
+ dy=y1-y0;
+ sdx=xmax-xmin;
+ sdy=ymax-ymin;
+ grid_x=dx/density;
+ grid_y=dy/density;
+ units_x=sdx/density;
+ units_y=sdy/density;
+
+ if ((grid_x<=4)||(grid_y<=4)) return;
+
+ Display_DrawLine(x0,y0,x0,y1);
+ Display_DrawLine(x0,y1,x1,y1);
+
+ y=y1;
+ xscale=xmin;
+ yscale=ymin;
+ while (y>y0) {
+ x=x0;
+ if (y
#include
#include "serial.h"
-#include "lcd.h"
+#include "display.h"
#include "io.h"
#include "sched.h"
#include "onewire.h"
@@ -48,6 +48,9 @@ extern uint8_t selectbmp[];
extern uint8_t editbmp[];
extern uint8_t f3editbmp[];
+
+#define T962C
+
// No version.c file generated for LPCXpresso builds, fall back to this
__attribute__((weak)) const char* Version_GetGitVersion(void) {
return "no version info";
@@ -108,24 +111,42 @@ int main(void) {
EEPROM_Init();
NV_Init();
- LCD_Init();
- LCD_BMPDisplay(logobmp, 0, 0);
+// Display_Init();
+ Display_Init();
+// Display_FB_Clear();
+ Display_BMPDisplay(logobmp, FB_WIDTH/2-64, FB_HEIGHT/2-32);
- IO_InitWatchdog();
- IO_PrintResetReason();
+// IO_InitWatchdog();
+// IO_PrintResetReason();
len = IO_Partinfo(buf, sizeof(buf), "%s rev %c");
- LCD_disp_str((uint8_t*)buf, len, 0, 64 - 6, FONT6X6);
+ Display_disp_str((uint8_t*)buf, len, 0, FB_HEIGHT - 16, DEFAULTFONT);
printf("\nRunning on an %s", buf);
len = snprintf(buf, sizeof(buf), "%s", Version_GetGitVersion());
- LCD_disp_str((uint8_t*)buf, len, 128 - (len * 6), 0, FONT6X6);
+ Display_disp_str((uint8_t*)buf, len, FB_WIDTH - (len * 12), 0, DEFAULTFONT);
- LCD_FB_Update();
+// Display_FB_Update();
+ Display_FB_Update();
Keypad_Init();
Buzzer_Init();
ADC_Init();
RTC_Init();
+ RTC_Zero();
+
+/*
+ FIO1SET = (1<<13);
+ FIO1DIR |= (1<<27)|(1<<24)|(1<<16);
+ FIO1PIN = (0<<16)|(0<<24)|(0<<27);
+ while (1) {
+ FIO1DIR |= (1<<27)|(1<<24)|(1<<16);
+ FIO1PIN = (0<<16)|(0<<24)|(0<<27);
+ BusyWait(TICKS_US(10));
+ FIO1PIN = (1<<16)|(1<<24)|(1<<27);
+ BusyWait(TICKS_US(10));
+ }
+*/
+
OneWire_Init();
SPI_TC_Init();
Reflow_Init();
@@ -173,12 +194,13 @@ static int32_t Main_Work(void) {
int32_t retval = TICKS_MS(500);
- char buf[22];
+ char buf[160];
int len;
uint32_t keyspressed = Keypad_Get();
char serial_cmd[255] = "";
+ for (int i=0;i<255;i++) serial_cmd[i]=0;
char* cmd_select_profile = "select profile %d";
char* cmd_bake = "bake %d %d";
char* cmd_dump_profile = "dump profile %d";
@@ -294,6 +316,29 @@ static int32_t Main_Work(void) {
if (keyrepeataccel < 1) keyrepeataccel = 1;
if (keyrepeataccel > 30) keyrepeataccel = 30;
+#ifdef T962C
+ if (keyspressed & KEY_F3) {
+ if (selected > 0) { // Prev row
+ selected--;
+ } else { // wrap
+ selected = Setup_getNumItems() - 1;
+ }
+ }
+ if (keyspressed & KEY_F4) {
+ if (selected < (Setup_getNumItems() - 1)) { // Next row
+ selected++;
+ } else { // wrap
+ selected = 0;
+ }
+ }
+
+ if (keyspressed & KEY_F1) {
+ Setup_decreaseValue(selected, keyrepeataccel);
+ }
+ if (keyspressed & KEY_F2) {
+ Setup_increaseValue(selected, keyrepeataccel);
+ }
+#else
if (keyspressed & KEY_F1) {
if (selected > 0) { // Prev row
selected--;
@@ -315,26 +360,36 @@ static int32_t Main_Work(void) {
if (keyspressed & KEY_F4) {
Setup_increaseValue(selected, keyrepeataccel);
}
+#endif
- LCD_FB_Clear();
+ Display_FB_Clear();
len = snprintf(buf, sizeof(buf), "Setup/calibration");
- LCD_disp_str((uint8_t*)buf, len, LCD_ALIGN_CENTER(len), y, FONT6X6);
- y += 7;
+ Display_disp_str((uint8_t*)buf, len, DISPLAY_ALIGN_CENTER(len), y, DEFAULTFONT);
+ y += 20;
for (int i = 0; i < Setup_getNumItems() ; i++) {
- len = Setup_snprintFormattedValue(buf, sizeof(buf), i);
- LCD_disp_str((uint8_t*)buf, len, 0, y, FONT6X6 | (selected == i) ? INVERT : 0);
- y += 7;
+ len = Setup_snprintFormattedValue(buf, sizeof(buf), i, DEFAULTFONT);
+ printf("formatted string with filler: %d\n",len);
+ Display_disp_str((uint8_t*)buf, len, 0, y, DEFAULTFONT | ((selected == i) ? INVERT : 0x00));
+ y += 20;
}
// buttons
- y = 64 - 7;
- LCD_disp_str((uint8_t*)" < ", 3, 0, y, FONT6X6 | INVERT);
- LCD_disp_str((uint8_t*)" > ", 3, 20, y, FONT6X6 | INVERT);
- LCD_disp_str((uint8_t*)" - ", 3, 45, y, FONT6X6 | INVERT);
- LCD_disp_str((uint8_t*)" + ", 3, 65, y, FONT6X6 | INVERT);
- LCD_disp_str((uint8_t*)" DONE ", 6, 91, y, FONT6X6 | INVERT);
+ y = FB_HEIGHT - 16;
+#ifdef T962C
+ Display_disp_str((uint8_t*)" - ", 3, 0, y, DEFAULTFONT | INVERT);
+ Display_disp_str((uint8_t*)" + ", 3, 20, y, DEFAULTFONT | INVERT);
+ Display_disp_str((uint8_t*)" < ", 3, 45, y, DEFAULTFONT | INVERT);
+ Display_disp_str((uint8_t*)" > ", 3, 65, y, DEFAULTFONT | INVERT);
+ Display_disp_str((uint8_t*)" DONE ", 6, 91, y, DEFAULTFONT | INVERT);
+#else
+ Display_disp_str((uint8_t*)" < ", 3, 0, y, DEFAULTFONT | INVERT);
+ Display_disp_str((uint8_t*)" > ", 3, 20, y, DEFAULTFONT | INVERT);
+ Display_disp_str((uint8_t*)" - ", 3, 45, y, DEFAULTFONT | INVERT);
+ Display_disp_str((uint8_t*)" + ", 3, 65, y, DEFAULTFONT | INVERT);
+ Display_disp_str((uint8_t*)" DONE ", 6, 91, y, DEFAULTFONT | INVERT);
+#endif
// Leave setup
if (keyspressed & KEY_S) {
mode = MAIN_HOME;
@@ -342,16 +397,19 @@ static int32_t Main_Work(void) {
retval = 0; // Force immediate refresh
}
} else if (mode == MAIN_ABOUT) {
- LCD_FB_Clear();
- LCD_BMPDisplay(logobmp, 0, 0);
+// Display_FB_Clear();
+ Display_FB_Clear();
+ Display_BMPDisplay(logobmp, FB_WIDTH/2-64, FB_HEIGHT/2-32);
len = snprintf(buf, sizeof(buf), "T-962 controller");
- LCD_disp_str((uint8_t*)buf, len, LCD_ALIGN_CENTER(len), 0, FONT6X6);
+ Display_disp_str((uint8_t*)buf, len, DISPLAY_ALIGN_CENTER(len), 0, DEFAULTFONT);
+ printf("project name disaplayed\n");
len = snprintf(buf, sizeof(buf), "%s", Version_GetGitVersion());
- LCD_disp_str((uint8_t*)buf, len, LCD_ALIGN_CENTER(len), 64 - 6, FONT6X6);
+ Display_disp_str((uint8_t*)buf, len, DISPLAY_ALIGN_CENTER(len), FB_HEIGHT-16, DEFAULTFONT);
+ printf("getgitversion name disaplayed\n");
- LCD_BMPDisplay(stopbmp, 127 - 17, 0);
+ Display_BMPDisplay(stopbmp, FB_WIDTH - 20, FB_HEIGHT-64);
// Leave about with any key.
if (keyspressed & KEY_ANY) {
@@ -362,20 +420,20 @@ static int32_t Main_Work(void) {
uint32_t ticks = RTC_Read();
len = snprintf(buf, sizeof(buf), "%03u", Reflow_GetSetpoint());
- LCD_disp_str((uint8_t*)"SET", 3, 110, 7, FONT6X6);
- LCD_disp_str((uint8_t*)buf, len, 110, 13, FONT6X6);
+ Display_disp_str((uint8_t*)"SET", 3, DISPLAY_ALIGN_RIGHT(3)-3, 16, DEFAULTFONT);
+ Display_disp_str((uint8_t*)buf, len, DISPLAY_ALIGN_RIGHT(3)-3, 32, DEFAULTFONT);
len = snprintf(buf, sizeof(buf), "%03u", Reflow_GetActualTemp());
- LCD_disp_str((uint8_t*)"ACT", 3, 110, 20, FONT6X6);
- LCD_disp_str((uint8_t*)buf, len, 110, 26, FONT6X6);
+ Display_disp_str((uint8_t*)"ACT", 3, DISPLAY_ALIGN_RIGHT(3)-3, 64, DEFAULTFONT);
+ Display_disp_str((uint8_t*)buf, len, DISPLAY_ALIGN_RIGHT(3)-3, 80, DEFAULTFONT);
len = snprintf(buf, sizeof(buf), "%03u", (unsigned int)ticks);
- LCD_disp_str((uint8_t*)"RUN", 3, 110, 33, FONT6X6);
- LCD_disp_str((uint8_t*)buf, len, 110, 39, FONT6X6);
+ Display_disp_str((uint8_t*)"RUN", 3, DISPLAY_ALIGN_RIGHT(3)-3, 112, DEFAULTFONT);
+ Display_disp_str((uint8_t*)buf, len, DISPLAY_ALIGN_RIGHT(3)-3, 128, DEFAULTFONT);
// Abort reflow
if (Reflow_IsDone() || keyspressed & KEY_S) {
- printf("\nReflow %s\n", (Reflow_IsDone() ? "done" : "interrupted by keypress"));
+// printf("\nReflow %s\n", (Reflow_IsDone() ? "done" : "interrupted by keypress"));
if (Reflow_IsDone()) {
Buzzer_Beep(BUZZ_1KHZ, 255, TICKS_MS(100) * NV_GetConfig(REFLOW_BEEP_DONE_LEN));
}
@@ -386,7 +444,8 @@ static int32_t Main_Work(void) {
} else if (mode == MAIN_SELECT_PROFILE) {
int curprofile = Reflow_GetProfileIdx();
- LCD_FB_Clear();
+// Display_FB_Clear();
+ Display_FB_Clear();
// Prev profile
if (keyspressed & KEY_F1) {
@@ -400,13 +459,13 @@ static int32_t Main_Work(void) {
Reflow_SelectProfileIdx(curprofile);
Reflow_PlotProfile(-1);
- LCD_BMPDisplay(selectbmp, 127 - 17, 0);
+ Display_BMPDisplay(selectbmp, FB_WIDTH - 20, 20);
int eeidx = Reflow_GetEEProfileIdx();
if (eeidx) { // Display edit button
- LCD_BMPDisplay(f3editbmp, 127 - 17, 29);
+ Display_BMPDisplay(f3editbmp, FB_WIDTH - 20, 20+29);
}
len = snprintf(buf, sizeof(buf), "%s", Reflow_GetProfileName());
- LCD_disp_str((uint8_t*)buf, len, 13, 0, FONT6X6);
+ Display_disp_str((uint8_t*)buf, len, 13, 0, DEFAULTFONT);
if (eeidx && keyspressed & KEY_F3) { // Edit ee profile
mode = MAIN_EDIT_PROFILE;
@@ -421,8 +480,9 @@ static int32_t Main_Work(void) {
}
} else if (mode == MAIN_BAKE) {
- LCD_FB_Clear();
- LCD_disp_str((uint8_t*)"MANUAL/BAKE MODE", 16, 0, 0, FONT6X6);
+// Display_FB_Clear();
+ Display_FB_Clear();
+ Display_disp_str((uint8_t*)"MANUAL/BAKE MODE", 16, 0, 0, DEFAULTFONT);
int keyrepeataccel = keyspressed >> 17; // Divide the value by 2
if (keyrepeataccel < 1) keyrepeataccel = 1;
@@ -440,6 +500,21 @@ static int32_t Main_Work(void) {
if (setpoint > SETPOINT_MAX) setpoint = SETPOINT_MAX;
}
+#ifdef T962C
+ // timer --
+ if (keyspressed & KEY_F4) {
+ if (timer - keyrepeataccel < 0) {
+ // infinite bake
+ timer = -1;
+ } else {
+ timer -= keyrepeataccel;
+ }
+ }
+ // timer ++
+ if (keyspressed & KEY_F3) {
+ timer += keyrepeataccel;
+ }
+#else
// timer --
if (keyspressed & KEY_F3) {
if (timer - keyrepeataccel < 0) {
@@ -453,25 +528,27 @@ static int32_t Main_Work(void) {
if (keyspressed & KEY_F4) {
timer += keyrepeataccel;
}
-
- int y = 10;
+#endif
+ int y = 32;
// display F1 button only if setpoint can be decreased
char f1function = ' ';
if (setpoint > SETPOINT_MIN) {
- LCD_disp_str((uint8_t*)"F1", 2, 0, y, FONT6X6 | INVERT);
+ Display_disp_str((uint8_t*)"F1", 2, 0, y, DEFAULTFONT | INVERT);
f1function = '-';
}
// display F2 button only if setpoint can be increased
char f2function = ' ';
if (setpoint < SETPOINT_MAX) {
- LCD_disp_str((uint8_t*)"F2", 2, LCD_ALIGN_RIGHT(2), y, FONT6X6 | INVERT);
+ Display_disp_str((uint8_t*)"F2", 2, DISPLAY_ALIGN_RIGHT(2), y, DEFAULTFONT | INVERT);
f2function = '+';
}
- len = snprintf(buf, sizeof(buf), "%c SETPOINT %d` %c", f1function, (int)setpoint, f2function);
- LCD_disp_str((uint8_t*)buf, len, LCD_ALIGN_CENTER(len), y, FONT6X6);
+ len = snprintf(buf, sizeof(buf), "%c SETPOINT %d%c %c", f1function, (int)setpoint, 0x7F, f2function);
+ Display_disp_str((uint8_t*)buf, len, DISPLAY_ALIGN_CENTER(len), y, DEFAULTFONT);
+
- y = 18;
+
+ y = 64;
if (timer == 0) {
len = snprintf(buf, sizeof(buf), "inf TIMER stop +");
} else if (timer < 0) {
@@ -479,14 +556,20 @@ static int32_t Main_Work(void) {
} else {
len = snprintf(buf, sizeof(buf), "- TIMER %3d:%02d +", timer / 60, timer % 60);
}
- LCD_disp_str((uint8_t*)buf, len, LCD_ALIGN_CENTER(len), y, FONT6X6);
+ Display_disp_str((uint8_t*)buf, len, DISPLAY_ALIGN_CENTER(len), y, DEFAULTFONT);
+#ifdef T962C
if (timer >= 0) {
- LCD_disp_str((uint8_t*)"F3", 2, 0, y, FONT6X6 | INVERT);
+ Display_disp_str((uint8_t*)"F4", 2, 0, y, DEFAULTFONT | INVERT);
}
- LCD_disp_str((uint8_t*)"F4", 2, LCD_ALIGN_RIGHT(2), y, FONT6X6 | INVERT);
-
- y = 26;
+ Display_disp_str((uint8_t*)"F3", 2, DISPLAY_ALIGN_RIGHT(2), y, DEFAULTFONT | INVERT);
+#else
+ if (timer >= 0) {
+ Display_disp_str((uint8_t*)"F3", 2, 0, y, DEFAULTFONT | INVERT);
+ }
+ Display_disp_str((uint8_t*)"F4", 2, DISPLAY_ALIGN_RIGHT(2), y, DEFAULTFONT | INVERT);
+#endif
+ y = 96;
if (timer > 0) {
int time_left = Reflow_GetTimeLeft();
if (Reflow_IsPreheating()) {
@@ -496,43 +579,45 @@ static int32_t Main_Work(void) {
} else {
len = snprintf(buf, sizeof(buf), "%d:%02d", time_left / 60, time_left % 60);
}
- LCD_disp_str((uint8_t*)buf, len, LCD_ALIGN_RIGHT(len), y, FONT6X6);
+ Display_disp_str((uint8_t*)buf, len, DISPLAY_ALIGN_RIGHT(len), y, DEFAULTFONT);
}
- len = snprintf(buf, sizeof(buf), "ACT %3.1f`", Sensor_GetTemp(TC_AVERAGE));
- LCD_disp_str((uint8_t*)buf, len, 0, y, FONT6X6);
+ len = snprintf(buf, sizeof(buf), "ACT %3.1f%c", Sensor_GetTemp(TC_AVERAGE),0x7F);
+ Display_disp_str((uint8_t*)buf, len, 0, y, DEFAULTFONT);
- y = 34;
- len = snprintf(buf, sizeof(buf), " L %3.1f`", Sensor_GetTemp(TC_LEFT));
- LCD_disp_str((uint8_t*)buf, len, 0, y, FONT6X6);
- len = snprintf(buf, sizeof(buf), " R %3.1f`", Sensor_GetTemp(TC_RIGHT));
- LCD_disp_str((uint8_t*)buf, len, LCD_CENTER, y, FONT6X6);
+ y = 128;
+ len = snprintf(buf, sizeof(buf), " L %3.1f%c", Sensor_GetTemp(TC_LEFT),0x7F);
+ Display_disp_str((uint8_t*)buf, len, 0, y, DEFAULTFONT);
+ len = snprintf(buf, sizeof(buf), " R %3.1f%c", Sensor_GetTemp(TC_RIGHT),0x7F);
+ Display_disp_str((uint8_t*)buf, len, DISPLAY_CENTER, y, DEFAULTFONT);
if (Sensor_IsValid(TC_EXTRA1) || Sensor_IsValid(TC_EXTRA2)) {
- y = 42;
+ y = 144;
if (Sensor_IsValid(TC_EXTRA1)) {
- len = snprintf(buf, sizeof(buf), " X1 %3.1f`", Sensor_GetTemp(TC_EXTRA1));
- LCD_disp_str((uint8_t*)buf, len, 0, y, FONT6X6);
+ len = snprintf(buf, sizeof(buf), " X1 %3.1f%c", Sensor_GetTemp(TC_EXTRA1),0x7F);
+ Display_disp_str((uint8_t*)buf, len, 0, y, DEFAULTFONT);
}
if (Sensor_IsValid(TC_EXTRA2)) {
- len = snprintf(buf, sizeof(buf), " X2 %3.1f`", Sensor_GetTemp(TC_EXTRA2));
- LCD_disp_str((uint8_t*)buf, len, LCD_CENTER, y, FONT6X6);
+ len = snprintf(buf, sizeof(buf), " X2 %3.1f%c", Sensor_GetTemp(TC_EXTRA2),0x7F);
+ Display_disp_str((uint8_t*)buf, len, DISPLAY_CENTER, y, DEFAULTFONT);
}
}
- y = 50;
+ y = 160;
len = snprintf(buf, sizeof(buf), "COLDJUNCTION");
- LCD_disp_str((uint8_t*)buf, len, 0, y, FONT6X6);
+ Display_disp_str((uint8_t*)buf, len, 0, y, DEFAULTFONT);
- y += 8;
+ y += 16;
if (Sensor_IsValid(TC_COLD_JUNCTION)) {
- len = snprintf(buf, sizeof(buf), "%3.1f`", Sensor_GetTemp(TC_COLD_JUNCTION));
+ len = snprintf(buf, sizeof(buf), "%3.1f%c", Sensor_GetTemp(TC_COLD_JUNCTION),0x7F);
} else {
len = snprintf(buf, sizeof(buf), "NOT PRESENT");
}
- LCD_disp_str((uint8_t*)buf, len, (12 * 6) - (len * 6), y, FONT6X6);
+ Display_disp_str((uint8_t*)buf, len, (12 * 12) - (len * 12), y, DEFAULTFONT);
+
+ Display_BMPDisplay(stopbmp, FB_WIDTH - 20, FB_HEIGHT-64);
+
- LCD_BMPDisplay(stopbmp, 127 - 17, 0);
Reflow_SetSetpoint(setpoint);
@@ -550,7 +635,7 @@ static int32_t Main_Work(void) {
Reflow_SetBakeTimer(0);
} else if (timer > 0) {
Reflow_SetBakeTimer(timer);
- printf("\nSetting bake timer to %d\n", timer);
+// printf("\nSetting bake timer to %d\n", timer);
}
Reflow_SetMode(REFLOW_BAKE);
}
@@ -558,7 +643,7 @@ static int32_t Main_Work(void) {
// Abort bake
if (keyspressed & KEY_S) {
- printf("\nEnd bake mode by keypress\n");
+// printf("\nEnd bake mode by keypress\n");
mode = MAIN_HOME;
Reflow_SetBakeTimer(0);
@@ -567,7 +652,8 @@ static int32_t Main_Work(void) {
}
} else if (mode == MAIN_EDIT_PROFILE) { // Edit ee1 or 2
- LCD_FB_Clear();
+// Display_FB_Clear();
+ Display_FB_Clear();
int keyrepeataccel = keyspressed >> 17; // Divide the value by 2
if (keyrepeataccel < 1) keyrepeataccel = 1;
if (keyrepeataccel > 30) keyrepeataccel = 30;
@@ -581,22 +667,30 @@ static int32_t Main_Work(void) {
profile_time_idx++;
}
cursetpoint = Reflow_GetSetpointAtIdx(profile_time_idx);
-
+#ifdef T962C
+ if (keyspressed & KEY_F4) { // Decrease setpoint
+ cursetpoint -= keyrepeataccel;
+ }
+ if (keyspressed & KEY_F3) { // Increase setpoint
+ cursetpoint += keyrepeataccel;
+ }
+#else
if (keyspressed & KEY_F3) { // Decrease setpoint
cursetpoint -= keyrepeataccel;
}
if (keyspressed & KEY_F4) { // Increase setpoint
cursetpoint += keyrepeataccel;
}
+#endif
if (cursetpoint < 0) cursetpoint = 0;
if (cursetpoint > SETPOINT_MAX) cursetpoint = SETPOINT_MAX;
Reflow_SetSetpointAtIdx(profile_time_idx, cursetpoint);
Reflow_PlotProfile(profile_time_idx);
- LCD_BMPDisplay(editbmp, 127 - 17, 0);
+ Display_BMPDisplay(editbmp, FB_WIDTH - 20, FB_HEIGHT-64);
len = snprintf(buf, sizeof(buf), "%02u0s %03u`", profile_time_idx, cursetpoint);
- LCD_disp_str((uint8_t*)buf, len, 13, 0, FONT6X6);
+ Display_disp_str((uint8_t*)buf, len, 13, 0, DEFAULTFONT);
// Done editing
if (keyspressed & KEY_S) {
@@ -606,26 +700,33 @@ static int32_t Main_Work(void) {
}
} else { // Main menu
- LCD_FB_Clear();
+// Display_FB_Clear();
+ Display_FB_Clear();
len = snprintf(buf, sizeof(buf),"MAIN MENU");
- LCD_disp_str((uint8_t*)buf, len, 0, 6 * 0, FONT6X6);
- LCD_disp_str((uint8_t*)"F1", 2, 0, 8 * 1, FONT6X6 | INVERT);
- LCD_disp_str((uint8_t*)"ABOUT", 5, 14, 8 * 1, FONT6X6);
- LCD_disp_str((uint8_t*)"F2", 2, 0, 8 * 2, FONT6X6 | INVERT);
- LCD_disp_str((uint8_t*)"SETUP", 5, 14, 8 * 2, FONT6X6);
- LCD_disp_str((uint8_t*)"F3", 2, 0, 8 * 3, FONT6X6 | INVERT);
- LCD_disp_str((uint8_t*)"BAKE/MANUAL MODE", 16, 14, 8 * 3, FONT6X6);
- LCD_disp_str((uint8_t*)"F4", 2, 0, 8 * 4, FONT6X6 | INVERT);
- LCD_disp_str((uint8_t*)"SELECT PROFILE", 14, 14, 8 * 4, FONT6X6);
- LCD_disp_str((uint8_t*)"S", 1, 3, 8 * 5, FONT6X6 | INVERT);
- LCD_disp_str((uint8_t*)"RUN REFLOW PROFILE", 18, 14, 8 * 5, FONT6X6);
+ Display_disp_str((uint8_t*)buf, len, DISPLAY_ALIGN_CENTER(len), 16 * 0, DEFAULTFONT);
+
+ Display_disp_str((uint8_t*)"F1", 2, 0, 20 * 2, DEFAULTFONT | INVERT);
+ Display_disp_str((uint8_t*)"ABOUT", 5, 30, 20 * 2, DEFAULTFONT);
+
+ Display_disp_str((uint8_t*)"F2", 2, 0, 20 * 3, DEFAULTFONT | INVERT);
+ Display_disp_str((uint8_t*)"SETUP", 5, 30, 20 * 3, DEFAULTFONT);
+
+ Display_disp_str((uint8_t*)"F3", 2, 0, 20 * 4, DEFAULTFONT | INVERT);
+ Display_disp_str((uint8_t*)"BAKE/MANUAL MODE", 16, 30, 20 * 4, DEFAULTFONT);
+
+ Display_disp_str((uint8_t*)"F4", 2, 0, 20 * 5, DEFAULTFONT | INVERT);
+ Display_disp_str((uint8_t*)"SELECT PROFILE", 14, 30, 20 * 5, DEFAULTFONT);
+
+ Display_disp_str((uint8_t*)" S", 2, 0, 20 * 6, DEFAULTFONT | INVERT);
+ Display_disp_str((uint8_t*)"RUN REFLOW PROFILE", 18, 30, 20 * 6, DEFAULTFONT);
len = snprintf(buf, sizeof(buf), "%s", Reflow_GetProfileName());
- LCD_disp_str((uint8_t*)buf, len, LCD_ALIGN_CENTER(len), 8 * 6, FONT6X6 | INVERT);
+ Display_disp_str((uint8_t*)buf, len, DISPLAY_ALIGN_RIGHT(len), 20 * 7, DEFAULTFONT | INVERT);
+
+ len = snprintf(buf,sizeof(buf), "OVEN TEMPERATURE %d%c", Reflow_GetActualTemp(),0x7F);
+ Display_disp_str((uint8_t*)buf, len, DISPLAY_ALIGN_CENTER(len), FB_HEIGHT-16, DEFAULTFONT);
- len = snprintf(buf,sizeof(buf), "OVEN TEMPERATURE %d`", Reflow_GetActualTemp());
- LCD_disp_str((uint8_t*)buf, len, LCD_ALIGN_CENTER(len), 64 - 6, FONT6X6);
// Make sure reflow complete beep is silenced when pressing any key
if (keyspressed) {
@@ -659,19 +760,22 @@ static int32_t Main_Work(void) {
// Start reflow
if (keyspressed & KEY_S) {
mode = MAIN_REFLOW;
- LCD_FB_Clear();
- printf("\nStarting reflow with profile: %s", Reflow_GetProfileName());
+// Display_FB_Clear();
+ Display_FB_Clear();
+// printf("\nStarting reflow with profile: %s", Reflow_GetProfileName());
Reflow_Init();
Reflow_PlotProfile(-1);
- LCD_BMPDisplay(stopbmp, 127 - 17, 0);
len = snprintf(buf, sizeof(buf), "%s", Reflow_GetProfileName());
- LCD_disp_str((uint8_t*)buf, len, 13, 0, FONT6X6);
+ Display_disp_str((uint8_t*)buf, len, DISPLAY_ALIGN_CENTER(len), 0, DEFAULTFONT);
Reflow_SetMode(REFLOW_REFLOW);
+ Display_BMPDisplay(stopbmp, FB_WIDTH - 20, FB_HEIGHT-64);
retval = 0; // Force immediate refresh
}
}
- LCD_FB_Update();
+ //Display_FB_Update();
+ Display_FB_Update();
+
return retval;
}
diff --git a/src/onewire.c b/src/onewire.c
index 8ae8dc6..2706ced 100644
--- a/src/onewire.c
+++ b/src/onewire.c
@@ -26,22 +26,44 @@
#include "sched.h"
#include "vic.h"
+// for some reason MCU i have in my oven has base pint (port 0, bit 7) damaged, or so it seems, and the other one was easy enough to solder to
+#define ALT_ONEWIRE_PIN (1<<24)
+#define BASE_ONEWIRE_PIN (1<<7)
+
static inline void setpin0() {
- FIO0CLR = (1<<7);
- FIO0DIR |= (1<<7);
+#ifdef ALT_ONEWIRE_PIN
+ FIO1CLR = ALT_ONEWIRE_PIN;
+ FIO1DIR |= ALT_ONEWIRE_PIN;
+#else
+ FIO0CLR = BASE_ONEWIRE_PIN;
+ FIO0DIR |=BASE_ONEWIRE_PIN;
+#endif
}
static inline void setpin1() {
- FIO0SET = (1<<7);
- FIO0DIR |= (1<<7);
+#ifdef ALT_ONEWIRE_PIN
+ FIO1SET = ALT_ONEWIRE_PIN;
+ FIO1DIR |= ALT_ONEWIRE_PIN;
+#else
+ FIO0SET = BASE_ONEWIRE_PIN;
+ FIO0DIR |= BASE_ONEWIRE_PIN;
+#endif
}
static inline void setpinhiz() {
- FIO0DIR &= ~(1<<7);
+#ifdef ALT_ONEWIRE_PIN
+ FIO1DIR &= ~ALT_ONEWIRE_PIN;
+#else
+ FIO0DIR &= ~BASE_ONEWIRE_PIN;
+#endif
}
static inline uint32_t getpin() {
- return !!(FIO0PIN & (1<<7));
+#ifdef ALT_ONEWIRE_PIN
+ return !!(FIO1PIN & ALT_ONEWIRE_PIN);
+#else
+ return !!(FIO0PIN & BASE_ONEWIRE_PIN);
+#endif
}
static inline uint32_t xferbyte(uint32_t thebyte) {
diff --git a/src/reflow.c b/src/reflow.c
index 81405eb..6662d3f 100644
--- a/src/reflow.c
+++ b/src/reflow.c
@@ -23,7 +23,7 @@
#include "t962.h"
#include "reflow_profiles.h"
#include "io.h"
-#include "lcd.h"
+#include "display.h"
#include "rtc.h"
#include "PID_v1.h"
#include "sched.h"
@@ -49,6 +49,8 @@ static float avgtemp;
static uint8_t reflowdone = 0;
static ReflowMode_t mymode = REFLOW_STANDBY;
static uint16_t numticks = 0;
+static uint16_t roldx=XAXIS;
+static uint16_t roldy=YAXIS-SETPOINT_MIN;
static int standby_logging = 0;
@@ -58,6 +60,10 @@ static int32_t Reflow_Work(void) {
uint8_t fan, heat;
uint32_t ticks = RTC_Read();
+ if (reflowdone) {
+ roldx=XAXIS;
+ roldy=YAXIS-SETPOINT_MIN;
+ }
Sensor_DoConversion();
avgtemp = Sensor_GetTemp(TC_AVERAGE);
@@ -67,6 +73,7 @@ static int32_t Reflow_Work(void) {
if (mymode == REFLOW_STANDBY || mymode == REFLOW_STANDBYFAN) {
intsetpoint = STANDBYTEMP;
// Cool to standby temp but don't heat to get there
+ roldx=roldy=FB_WIDTH+FB_HEIGHT;
Reflow_Run(0, avgtemp, &heat, &fan, intsetpoint);
heat = 0;
@@ -277,10 +284,20 @@ int32_t Reflow_Run(uint32_t thetime, float meastemp, uint8_t* pheat, uint8_t* pf
if (!manualsetpoint) {
// Plot actual temperature on top of desired profile
+#ifndef USES_ORIGINAL_DISPLAY
+ int realx = (int)(thetime * ((FB_WIDTH-20)/470.0) + XAXIS);
+ int y = (uint16_t)(meastemp * (FB_HEIGHT/300.0));
+ y = YAXIS - y;
+ Display_SetPixel(realx, y);
+ Display_DrawLine(roldx,roldy,realx,y);
+ roldx=realx;
+ roldy=y;
+#else
int realx = (thetime / 5) + XAXIS;
int y = (uint16_t)(meastemp * 0.2f);
y = YAXIS - y;
LCD_SetPixel(realx, y);
+#endif
}
PID.myInput = meastemp;
diff --git a/src/reflow_profiles.c b/src/reflow_profiles.c
index 1d61769..eb955ad 100644
--- a/src/reflow_profiles.c
+++ b/src/reflow_profiles.c
@@ -1,8 +1,9 @@
#include "LPC214x.h"
#include
#include
+#include
#include "t962.h"
-#include "lcd.h"
+#include "display.h"
#include "nvstorage.h"
#include "eeprom.h"
#include "reflow.h"
@@ -12,7 +13,6 @@
#define RAMPTEST
#define PIDTEST
-extern uint8_t graphbmp[];
// Amtech 4300 63Sn/37Pb leaded profile
static const profile am4300profile = {
@@ -208,22 +208,45 @@ void Reflow_SetSetpointAtIdx(uint8_t idx, uint16_t value) {
}
void Reflow_PlotProfile(int highlight) {
- LCD_BMPDisplay(graphbmp, 0, 0);
-
+ Display_DrawGrid(XAXIS,20,300,YAXIS,0,0,480,320,12);
+#ifndef USES_ORIGINAL_DISPLAY
// No need to plot first value as it is obscured by Y-axis
+ uint16_t lastx=XAXIS;
+ uint16_t lasty=YAXIS-profiles[profileidx]->temperatures[0];
for(int x = 1; x < NUMPROFILETEMPS; x++) {
- int realx = (x << 1) + XAXIS;
- int y = profiles[profileidx]->temperatures[x] / 5;
+
+ int realx = x*((FB_WIDTH-XAXIS)/NUMPROFILETEMPS) + XAXIS;
+ double yr = (double)profiles[profileidx]->temperatures[x]*(double)(FB_HEIGHT/300.0);
+ uint16_t y = (uint16_t)ceil(yr);
y = YAXIS - y;
- LCD_SetPixel(realx, y);
+ Display_DrawLine(lastx,lasty,realx,y);
+ lastx=realx;
+ lasty=y;
+ Display_SetPixel(realx, y);
if (highlight == x) {
- LCD_SetPixel(realx - 1, y - 1);
- LCD_SetPixel(realx + 1, y + 1);
- LCD_SetPixel(realx - 1, y + 1);
- LCD_SetPixel(realx + 1, y - 1);
+ Display_DrawLine(realx - 5, y - 5, realx + 5, y + 5);
+ Display_DrawLine(realx - 5, y + 5, realx + 5, y - 5);
+ Display_DrawLine(realx, y -5, realx, y + 5);
+ Display_DrawLine(realx - 5, y, realx + 5, y);
}
}
+#else
+ // No need to plot first value as it is obscured by Y-axis
+ for(int x = 1; x < NUMPROFILETEMPS; x++) {
+ int realx = (x << 1) + XAXIS;
+ int y = profiles[profileidx]->temperatures[x] / 5;
+ y = YAXIS - y;
+ Display_SetPixel(realx, y);
+
+ if (highlight == x) {
+ Display_SetPixel(realx - 1, y - 1);
+ Display_SetPixel(realx + 1, y + 1);
+ Display_SetPixel(realx - 1, y + 1);
+ Display_SetPixel(realx + 1, y - 1);
+ }
+ }
+#endif
}
void Reflow_DumpProfile(int profile) {
diff --git a/src/reflow_profiles.h b/src/reflow_profiles.h
index 43ea760..a697a87 100644
--- a/src/reflow_profiles.h
+++ b/src/reflow_profiles.h
@@ -4,9 +4,18 @@
// Number of temperature settings in a reflow profile
#define NUMPROFILETEMPS (48)
+#ifndef USES_ORIGINAL_DISPLAY
+
+#define YAXIS (220)
+#define XAXIS (24)
+
+#else
+
#define YAXIS (57)
#define XAXIS (12)
+#endif
+
typedef struct {
const char* name;
const uint16_t temperatures[NUMPROFILETEMPS];
diff --git a/src/sched.c b/src/sched.c
index 3134669..09af5b6 100644
--- a/src/sched.c
+++ b/src/sched.c
@@ -103,5 +103,11 @@ int32_t Sched_Do(uint32_t fastforward) {
void BusyWait( uint32_t numticks ) {
T0IR = 0x01; // Reset interrupt
T0MR0 = 1 + T0TC + numticks; // It's perfectly fine if this wraps
- while (!(T0IR & 0x01)); // Wait for match
+ while (!(T0IR & 0x01)) { // Wait for match
+/* uint32_t save = VIC_DisableIRQ();
+ WDFEED = 0xaa; // Feed watchdog
+ WDFEED = 0x55;
+ VIC_RestoreIRQ(save);
+*/
+ }
}
diff --git a/src/setup.c b/src/setup.c
index ff0e472..ef3cbc0 100644
--- a/src/setup.c
+++ b/src/setup.c
@@ -22,14 +22,17 @@
#include "nvstorage.h"
#include "reflow_profiles.h"
#include "setup.h"
+#include "display.h"
+
+char setup_buf[120];
static setupMenuStruct setupmenu[] = {
- {"Min fan speed %4.0f", REFLOW_MIN_FAN_SPEED, 0, 254, 0, 1.0f},
- {"Cycle done beep %4.1fs", REFLOW_BEEP_DONE_LEN, 0, 254, 0, 0.1f},
- {"Left TC gain %1.2f", TC_LEFT_GAIN, 10, 190, 0, 0.01f},
- {"Left TC offset %+1.2f", TC_LEFT_OFFSET, 0, 200, -100, 0.25f},
- {"Right TC gain %1.2f", TC_RIGHT_GAIN, 10, 190, 0, 0.01f},
- {"Right TC offset %+1.2f", TC_RIGHT_OFFSET, 0, 200, -100, 0.25f},
+ {"Min fan speed %s%4.0f", REFLOW_MIN_FAN_SPEED, 0, 254, 0, 1.0f},
+ {"Cycle done beep %s%4.1fs", REFLOW_BEEP_DONE_LEN, 0, 254, 0, 0.1f},
+ {"Left TC gain %s%1.2f", TC_LEFT_GAIN, 10, 190, 0, 0.01f},
+ {"Left TC offset %s%+1.2f", TC_LEFT_OFFSET, 0, 200, -100, 0.25f},
+ {"Right TC gain %s%1.2f", TC_RIGHT_GAIN, 10, 190, 0, 0.01f},
+ {"Right TC offset %s%+1.2f", TC_RIGHT_OFFSET, 0, 200, -100, 0.25f},
};
#define NUM_SETUP_ITEMS (sizeof(setupmenu) / sizeof(setupmenu[0]))
@@ -76,10 +79,34 @@ void Setup_decreaseValue(int item, int amount) {
Setup_setValue(item, curval);
}
+char* Setup_filler(int item,uint8_t theFormat) {
+ setup_buf[0]=0x00;
+#ifndef USES_ORIGINAL_DISPLAY
+ sFontStruct* font=fontget(theFormat & 0x7f);
+ // get length in characters of formatted string
+ uint32_t len=snprintf(setup_buf,sizeof(setup_buf),setupmenu[item].formatstr,"",Setup_getValue(item));
+ // recalculate length to pixels
+ len=Display_get_str_lenght((uint8_t*)setup_buf,len,theFormat);
+ // get the width of space character
+ int spacewidth=fontgetwidth(font, 0x20);
+ if (len
+#include
+#include
+#include "sched.h"
+#include "tft.h"
+#include "display.h"
+
+#ifdef USES_TFT_DISPLAY
+
+static void TFT_WriteAdr8(uint32_t regindex) {
+ uint32_t tmp;
+ TFT_DATA_OUTPUTS;
+ tmp = (FIO1PIN)&(0xff00ffff) ; // short delay
+ TFT_RS_COMMAND;
+ TFT_WR_LOW;
+ tmp|=regindex<<16;
+ FIO1PIN = tmp;
+ TFT_WR_HIGH;
+}
+static void TFT_WriteDta8(uint32_t dta) {
+ uint32_t tmp;
+ TFT_DATA_OUTPUTS;
+ tmp = (FIO1PIN)&(0xff00ffff) ; // short delay
+ TFT_RS_DATA;
+ TFT_WR_LOW;
+ tmp|=dta<<16;
+ FIO1PIN = tmp;
+ TFT_WR_HIGH;
+
+}
+
+void TFT_Init(void) {
+
+ TFT_CS_HIGH;
+ TFT_RD_HIGH;
+ TFT_WR_HIGH;
+ TFT_RS_DATA;
+ TFT_RST_HIGH;
+ BusyWait(TICKS_MS(100));
+ TFT_RST_LOW;
+ BusyWait(TICKS_MS(10));
+ TFT_RST_HIGH;
+ BusyWait(TICKS_MS(300));
+
+ TFT_CS_LOW;
+
+ int tmp,i;
+ i=0;
+ tmp=0;
+ tmp=TFT_init_sequence[i++];
+ while (i=0) {
+ TFT_WriteDta8(tmp);
+ tmp=TFT_init_sequence[i++];
+ }
+ }
+ }
+ TFT_CS_HIGH;
+
+
+}
+
+void TFT_FB_Clear(void) {
+}
+
+void TFT_Set_Region(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1) {
+#if TFT_CONTROLLER==ILI9325
+ TFT_WriteAdr8(0x00);
+ TFT_WriteAdr8(0x20);
+ TFT_WriteDta8(0x00);
+ TFT_WriteDta8(0x00);
+
+ TFT_WriteAdr8(0x00);
+ TFT_WriteAdr8(0x21);
+ TFT_WriteDta8(0x00);
+ TFT_WriteDta8(0x00);
+
+ TFT_WriteAdr8(0x00);
+ TFT_WriteAdr8(0x22);
+#else
+ TFT_WriteAdr8(0x00);
+ TFT_WriteAdr8(0x2C);
+#endif
+}
+#ifdef USES_FRAMEBUFFER
+
+void TFT_FB_Update(uint8_t* fb) {
+ uint32_t color=0;
+ uint32_t x=0;
+ uint32_t y=0;
+ TFT_CS_LOW;
+ TFT_Set_Region(0,0,FB_HEIGHT,FB_WIDTH);
+
+ for(y = 0; y < FB_HEIGHT; y++) {
+ for (x=0; x< FB_WIDTH; x++) {
+ if (fb[(x>>3)+FB_BWIDTH*y]&(1<<((x & 0x07)))) {
+ color=0xFFFF;
+ } else {
+ color=0;
+ }
+ TFT_WriteDta8(color>>8);
+ TFT_WriteDta8(color&0xFF);
+ }
+ }
+ TFT_CS_HIGH;
+}
+#endif //uses framebuffer
+#endif //uses tft display
diff --git a/src/tft.h b/src/tft.h
new file mode 100644
index 0000000..7a731a6
--- /dev/null
+++ b/src/tft.h
@@ -0,0 +1,181 @@
+/*
+ * tft.h
+ *
+ * Created on: 25 paź 2021
+ * Author: s.bartkowicz
+ */
+
+#ifndef TFT_H_
+#define TFT_H_
+
+#include "display.h"
+
+#ifdef USES_TFT_DISPLAY
+
+#define TFT_CONTROLLER (ILI9486)
+
+#define ILI9325 (0x9325) // 2.4" 240x320 Arduino Uno display shield
+#define ILI9341 (0x9341) // 2.8" 240x320 Arduino Uno display shield
+#define ILI9486 (0x9486) // 3.5" 320x480 Arduino Uno display shield
+
+
+#define TFT_RS_COMMAND FIO0CLR = (1<< 22);
+#define TFT_RS_DATA FIO0SET = (1<< 22);
+#define TFT_WR_LOW FIO0CLR = (1<< 19);
+#define TFT_WR_HIGH FIO0SET = (1<< 19);
+#define TFT_RD_LOW FIO0CLR = (1<< 18);
+#define TFT_RD_HIGH FIO0SET = (1<< 18);
+#define TFT_CS_LOW FIO0CLR = (1<< 13);
+#define TFT_CS_HIGH FIO0SET = (1<< 13);
+#define TFT_RST_LOW FIO0CLR = (1<< 12);
+#define TFT_RST_HIGH FIO0SET = (1<< 12);
+#define TFT_DATA_INPUTS FIO1DIR &= 0xFF00FFFF;
+#define TFT_DATA_OUTPUTS FIO1DIR |= 0x00FF0000;
+#define TFT_DELAY { \
+ FIO1PIN; }
+#define TFT_WSTROBE { \
+ TFT_DELAY; \
+ TFT_WR_LOW; \
+ TFT_DELAY; \
+ TFT_WR_HIGH;}
+
+#if TFT_CONTROLLER==ILI9486
+const static int16_t TFT_init_sequence[] = {
+ /* Soft Reset */
+ -1, 0x01,
+ -2, 1000,
+ -1, 0xc0, 0x19, 0x1a,
+ -1, 0xc1, 0x45, 0x00,
+ -1, 0xc2, 0x33,
+ -1, 0xc5, 0x00, 0x28, //, 0x00, 0x48,
+ -1, 0xb1, 0xa0, 0x11,
+ -1, 0xb4, 0x02,
+ -1, 0xb6, 0x00, 0x42, 0x3b,
+ -1, 0xE0, 0x0F, 0x1F, 0x1C, 0x0C, 0x0F, 0x08, 0x48, 0x98, 0x37, 0x0A, 0x13, 0x04, 0x11, 0x0D, 0x00,
+ -1, 0xE1, 0x0F, 0x32, 0x2E, 0x0B, 0x0D, 0x05, 0x47, 0x75, 0x37, 0x06, 0x10, 0x03, 0x24, 0x20, 0x00,
+ -1, 0xE2, 0x0F, 0x32, 0x2E, 0x0B, 0x0D, 0x05, 0x47, 0x75, 0x37, 0x06, 0x10, 0x03, 0x24, 0x20, 0x00,
+ -1, 0x3a, 0x55,
+ -1, 0xb6, 0x00, 0x22,
+ -1, 0x36, 0x68,
+ -1, 0x11,
+ -2, 150,
+ -1, 0x29,
+ -1, 0x2a, 0x00, 0x00, 0x01, 0x3f, // define window x
+ -1, 0x2b, 0x00, 0x00, 0x00, 0xf0, // define window y
+ -3
+};
+#elif TFT_CONTROLLER==ILI9341
+const static int16_t TFT_init_sequence[] = {
+ -1, 0x01,
+ -2, 1000,
+ -1, 0xc8, 0x39, 0x2c, 0x00, 0x34, 0x02,
+ -1, 0xcf, 0x00, 0xc1, 0x30,
+ -1, 0xe8, 0x85, 0x00, 0x78,
+ -1, 0xea, 0x00, 0x00,
+ -1, 0xed, 0x64, 0x03, 0x12, 0x81,
+ -1, 0xf7, 0x20,
+ -1, 0xc0, 0x23,
+ -1, 0xc1, 0x10,
+ -1, 0xc5, 0x28,
+ -1, 0xc7, 0x86,
+ -1, 0x36, 0x28,
+ -1, 0x3a, 0x55,
+ -1, 0xb6, 0x00, 0x82, 0x27,
+ -1, 0xf2, 0x00,
+ -1, 0x26, 0x01,
+ -1, 0xe0, 0x0f, 0x31, 0x2b, 0x0c, 0x0e, 0x08, 0x4e, 0xf1, 0x37, 0x07, 0x10, 0x03, 0x0e, 0x09, 0x00,
+ -1, 0xe1, 0x00, 0x0e, 0x14, 0x03, 0x11, 0x07, 0x31, 0xc1, 0x48, 0x08, 0x0f, 0x0c, 0x31, 0x36, 0x0f,
+ -1, 0x11,
+ -2, 150,
+ -1, 0x29,
+ -1, 0x2a, 0x00, 0x00, 0x01, 0x3f, // define window x
+ -1, 0x2b, 0x00, 0x00, 0x00, 0xf0, // define window y
+ -3
+};
+#else // ILI9325
+const static int16_t TFT_init_sequence[]= {
+ -1, 0xe3, 0x30, 0x08,
+ -1, 0xe7, 0x00, 0x12,
+ -1, 0xef, 0x12, 0x31,
+ -1, 0x01, 0x00, 0x00,
+ -1, 0x02, 0x07, 0x00,
+ -1, 0x03, 0x10, 0x38,
+ -1, 0x04, 0x00, 0x00,
+ -1, 0x08, 0x02, 0x02,
+ -1, 0x09, 0x00, 0x00,
+ -1, 0x0a, 0x00, 0x00
+ -1, 0x0c, 0x00, 0x00,
+ -1, 0x0d, 0x00, 0x00,
+ -1, 0x0f, 0x00, 0x00,
+ -1, 0x10, 0x00, 0x00,
+ -1, 0x11, 0x00, 0x00,
+ -1, 0x12, 0x01, 0x39,
+ -1, 0x13, 0x00, 0x00,
+ -2, 200,
+ -1, 0x10, 0x11, 0x90,
+ -1, 0x11, 0x02, 0x27,
+ -2, 50,
+ -1, 0x12, 0x00, 0x1c,
+ -2, 50,
+ -1, 0x13, 0x1d, 0x00,
+ -1, 0x29, 0x00, 0x13,
+ -1, 0x2b, 0x00, 0x09,
+ -2, 50,
+
+ -1, 0x30, 0x00, 0x07,
+ -1, 0x31, 0x03, 0x02,
+ -1, 0x32, 0x01, 0x05,
+ -1, 0x35, 0x02, 0x06,
+ -1, 0x36, 0x08, 0x08,
+ -1, 0x37, 0x02, 0x06,
+ -1, 0x38, 0x05, 0x04,
+ -1, 0x39, 0x00, 0x07,
+ -1, 0x3c, 0x01, 0x05,
+ -1, 0x3d, 0x08, 0x08,
+
+ -1, 0x60, 0x27, 0x00,
+ -1, 0x61, 0x00, 0x05,
+ -1, 0x6a, 0x00, 0x00,
+ //-------------- Partial Display Control ---------//
+ -1, 0x80, 0x00, 0x00,
+ -1, 0x81, 0x00, 0x00,
+ -1, 0x82, 0x00, 0x00,
+ -1, 0x83, 0x00, 0x00,
+ -1, 0x84, 0x00, 0x00,
+ -1, 0x85, 0x00, 0x00,
+
+ //-------------- Panel Control -------------------//
+ -1, 0x90, 0x00, 0x10,
+ -1, 0x92, 0x00, 0x00,
+ -1, 0x93, 0x00, 0x03,
+ -1, 0x95, 0x11, 0x00,
+ -1, 0x97, 0x00, 0x00,
+ -1, 0x98, 0x00, 0x00,
+ -1, 0x07, 0x01, 0x33,
+ -2, 150,
+ //------------------ Set GRAM area ---------------//
+ -1, 0x50, 0x00, 0x00, // window x start
+ -1, 0x51, 0x00, 0xef, // window x end
+ -1, 0x52, 0x00, 0x00, // window y start
+ -1, 0x53, 0x01, 0x3f, // window y end
+ -1, 0x20, 0x00, 0x00, // gram horizontal start address
+ -1, 0x21, 0x00, 0x00, // gram vertical start address
+ -3
+};
+#endif
+
+
+uint32_t charoutbig(uint8_t theChar, uint16_t X, uint16_t Y, uint8_t theFormat);
+
+void TFT_Init(void);
+void TFT_FB_Clear(void);
+void TFT_FB_Update(uint8_t* fb);
+void TFT_SetPixel(uint16_t x, uint16_t y);
+void TFT_DrawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1);
+void TFT_DrawGrid(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t xmin, uint16_t ymin, uint16_t xmax, uint16_t ymax,uint16_t density);
+void TFT_SetCross(uint16_t x,uint16_t y);
+
+#endif
+
+#endif /* TFT_H_ */
+