diff options
author | David Crocker <dcrocker@eschertech.com> | 2018-02-08 17:52:37 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2018-02-08 17:52:37 +0300 |
commit | ccb75833e49add7f5391f60784cfbe7069d16fc0 (patch) | |
tree | fe3f6cb71f40354574c606d7cd15dad96999a87a /src | |
parent | c5a8315c2d0ab6eb6a7c961e0f44cea198bee38d (diff) |
Fixed for SAM4S and SAME70 builds
Diffstat (limited to 'src')
-rw-r--r-- | src/Alligator/Pins_Alligator.h | 2 | ||||
-rw-r--r-- | src/Display/Display.cpp | 8 | ||||
-rw-r--r-- | src/Display/ST7920/glcd10x10.cpp | 135 | ||||
-rw-r--r-- | src/Display/ST7920/glcd11x14.cpp | 255 | ||||
-rw-r--r-- | src/Display/ST7920/glcd16x16.cpp | 118 | ||||
-rw-r--r-- | src/Display/ST7920/lcd7920.cpp | 118 | ||||
-rw-r--r-- | src/Display/ST7920/lcd7920.h | 1 | ||||
-rw-r--r-- | src/Duet/Pins_Duet.h | 2 | ||||
-rw-r--r-- | src/DuetM/Pins_DuetM.h | 11 | ||||
-rw-r--r-- | src/DuetM/TMC22xx.cpp | 217 | ||||
-rw-r--r-- | src/DuetNG/Pins_DuetNG.h | 1 | ||||
-rw-r--r-- | src/GCodes/GCodeBuffer.cpp | 2 | ||||
-rw-r--r-- | src/GCodes/GCodeBuffer.h | 4 | ||||
-rw-r--r-- | src/Platform.cpp | 113 | ||||
-rw-r--r-- | src/Platform.h | 41 | ||||
-rw-r--r-- | src/RADDS/Pins_RADDS.h | 60 | ||||
-rw-r--r-- | src/SAME70_TEST/Pins_SAME70_TEST.h | 2 | ||||
-rw-r--r-- | src/Version.h | 2 |
18 files changed, 625 insertions, 467 deletions
diff --git a/src/Alligator/Pins_Alligator.h b/src/Alligator/Pins_Alligator.h index 89d161d1..e21ba1f5 100644 --- a/src/Alligator/Pins_Alligator.h +++ b/src/Alligator/Pins_Alligator.h @@ -186,10 +186,12 @@ const uint32_t IAP_FLASH_END = 0x000FFBFF; // don't touch the last 1KB, i #define NETWORK_TC_CHAN (1) #define NETWORK_TC_IRQN TC4_IRQn #define NETWORK_TC_HANDLER TC4_Handler +#define NETWORK_TC_ID ID_TC4 #define STEP_TC (TC1) #define STEP_TC_CHAN (0) #define STEP_TC_IRQN TC3_IRQn #define STEP_TC_HANDLER TC3_Handler +#define STEP_TC_ID ID_TC3 #endif diff --git a/src/Display/Display.cpp b/src/Display/Display.cpp index 264978ce..91ba42f4 100644 --- a/src/Display/Display.cpp +++ b/src/Display/Display.cpp @@ -12,8 +12,8 @@ constexpr int DefaultPulsesPerClick = -4; // values that work with displays I have are 2 and -4 -extern const LcdFont font16x16; -extern const LcdFont font10x10; +extern const LcdFont font11x14; +//extern const LcdFont font10x10; static int val = 0; @@ -30,7 +30,7 @@ void Display::Init() //TODO display top menu here // For now we just print some text to test the display - lcd.SetFont(&font16x16); + lcd.SetFont(&font11x14); lcd.SetCursor(5, 5); lcd.SetRightMargin(128); @@ -114,7 +114,7 @@ void Display::UpdatingFirmware() IoPort::WriteAnalog(LcdBeepPin, 0.0, 0); // stop any beep lcd.TextInvert(false); lcd.Clear(); - lcd.SetFont(&font10x10); + lcd.SetFont(&font11x14); lcd.SetCursor(20, 0); lcd.print("Updating firmware..."); lcd.FlushAll(); diff --git a/src/Display/ST7920/glcd10x10.cpp b/src/Display/ST7920/glcd10x10.cpp deleted file mode 100644 index 9fb5c5a3..00000000 --- a/src/Display/ST7920/glcd10x10.cpp +++ /dev/null @@ -1,135 +0,0 @@ -#include "lcd7920.h" - -//Font Generated by MikroElektronika GLCD Font Creator 1.2.0.0 -//MikroElektronika 2011 -//http://www.mikroe.com - -//GLCD FontName : glcd10x10 -//GLCD FontSize : 10 x 10 - -static const uint8_t glcd10x10[] = { - 0x04, 0x06, 0x00, 0x09, 0x00, 0x09, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for degree symbol - 0x09, 0x38, 0x00, 0x45, 0x00, 0x83, 0x00, 0x07, 0x00, 0x00, 0x00, 0xC0, 0x01, 0x82, 0x01, 0x44, 0x01, 0x38, 0x00, 0x00, 0x00, // Code for rotating arrows 1 - 0x09, 0xE0, 0x00, 0x64, 0x00, 0xA2, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x8A, 0x00, 0x4C, 0x00, 0x0E, 0x00, 0x00, 0x00, // Code for rotating arrows 2 - 0x0A, 0x10, 0x00, 0x10, 0x00, 0xFF, 0x01, 0xFE, 0x00, 0x7C, 0x00, 0x38, 0x00, 0x10, 0x00, 0xFF, 0x01, 0x10, 0x00, 0x10, 0x00, // Code for diode - 0x08, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0xFF, 0x01, 0x28, 0x00, 0x44, 0x01, 0x82, 0x01, 0xC1, 0x01, 0x00, 0x00, 0x00, 0x00, // Code for transistor - 0x07, 0x30, 0x00, 0x60, 0x00, 0xC0, 0x00, 0x60, 0x00, 0x18, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for tick - 0x01, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for decimal point - 0x03, 0xFF, 0x00, 0x81, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char - 0x03, 0xFF, 0x00, 0x81, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char - 0x03, 0xFF, 0x00, 0x81, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char - 0x03, 0xFF, 0x00, 0x81, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char - 0x03, 0xFF, 0x00, 0x81, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char - 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char - 0x01, 0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ! - 0x03, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char " - 0x05, 0x24, 0x00, 0xFF, 0x00, 0x24, 0x00, 0xFF, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char # - 0x05, 0x46, 0x00, 0x89, 0x00, 0xFF, 0x01, 0x89, 0x00, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char $ - 0x09, 0x06, 0x00, 0x09, 0x00, 0x89, 0x00, 0x66, 0x00, 0x18, 0x00, 0x66, 0x00, 0x91, 0x00, 0x90, 0x00, 0x60, 0x00, 0x00, 0x00, // Code for char % - 0x06, 0x60, 0x00, 0x96, 0x00, 0x89, 0x00, 0x99, 0x00, 0x66, 0x00, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char & - 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ' - 0x03, 0xFC, 0x00, 0x02, 0x01, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ( - 0x03, 0x01, 0x02, 0x02, 0x01, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ) - 0x05, 0x15, 0x00, 0x0E, 0x00, 0x1F, 0x00, 0x0E, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char * - 0x05, 0x10, 0x00, 0x10, 0x00, 0x7C, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char + - 0x02, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char , - 0x03, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char - - 0x02, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char . - 0x03, 0xC0, 0x00, 0x3C, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char / - 0x05, 0x7E, 0x00, 0x81, 0x00, 0x81, 0x00, 0x81, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 0 - 0x03, 0x04, 0x00, 0x02, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 1 - 0x05, 0x82, 0x00, 0xC1, 0x00, 0xA1, 0x00, 0x91, 0x00, 0x8E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 2 - 0x05, 0x42, 0x00, 0x81, 0x00, 0x89, 0x00, 0x89, 0x00, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 3 - 0x06, 0x30, 0x00, 0x28, 0x00, 0x24, 0x00, 0x22, 0x00, 0xFF, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 4 - 0x05, 0x4F, 0x00, 0x89, 0x00, 0x89, 0x00, 0x89, 0x00, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 5 - 0x05, 0x7E, 0x00, 0x89, 0x00, 0x89, 0x00, 0x89, 0x00, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 6 - 0x05, 0x01, 0x00, 0xE1, 0x00, 0x19, 0x00, 0x07, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 7 - 0x05, 0x76, 0x00, 0x89, 0x00, 0x89, 0x00, 0x89, 0x00, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 8 - 0x05, 0x4E, 0x00, 0x91, 0x00, 0x91, 0x00, 0x91, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 9 - 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char : - 0x01, 0x88, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ; - 0x05, 0x10, 0x00, 0x10, 0x00, 0x28, 0x00, 0x28, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char < - 0x05, 0x28, 0x00, 0x28, 0x00, 0x28, 0x00, 0x28, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char = - 0x05, 0x44, 0x00, 0x28, 0x00, 0x28, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char > - 0x05, 0x02, 0x00, 0x01, 0x00, 0xB1, 0x00, 0x09, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ? - 0x0A, 0xF8, 0x00, 0x04, 0x01, 0x72, 0x02, 0x89, 0x02, 0x85, 0x02, 0x45, 0x02, 0xF9, 0x02, 0x8D, 0x02, 0x42, 0x02, 0x3C, 0x01, // Code for char @ - 0x07, 0xC0, 0x00, 0x30, 0x00, 0x2C, 0x00, 0x23, 0x00, 0x2C, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char A - 0x06, 0xFF, 0x00, 0x89, 0x00, 0x89, 0x00, 0x89, 0x00, 0x89, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char B - 0x06, 0x3C, 0x00, 0x42, 0x00, 0x81, 0x00, 0x81, 0x00, 0x81, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char C - 0x06, 0xFF, 0x00, 0x81, 0x00, 0x81, 0x00, 0x81, 0x00, 0x42, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char D - 0x05, 0xFF, 0x00, 0x89, 0x00, 0x89, 0x00, 0x89, 0x00, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char E - 0x05, 0xFF, 0x00, 0x09, 0x00, 0x09, 0x00, 0x09, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char F - 0x07, 0x3C, 0x00, 0x42, 0x00, 0x81, 0x00, 0x81, 0x00, 0x91, 0x00, 0x52, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char G - 0x06, 0xFF, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char H - 0x01, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char I - 0x04, 0x60, 0x00, 0x80, 0x00, 0x80, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char J - 0x06, 0xFF, 0x00, 0x10, 0x00, 0x08, 0x00, 0x1C, 0x00, 0x62, 0x00, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char K - 0x05, 0xFF, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char L - 0x07, 0xFF, 0x00, 0x06, 0x00, 0x18, 0x00, 0x60, 0x00, 0x18, 0x00, 0x06, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char M - 0x06, 0xFF, 0x00, 0x02, 0x00, 0x0C, 0x00, 0x30, 0x00, 0x40, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char N - 0x07, 0x3C, 0x00, 0x42, 0x00, 0x81, 0x00, 0x81, 0x00, 0x81, 0x00, 0x42, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char O - 0x05, 0xFF, 0x00, 0x11, 0x00, 0x11, 0x00, 0x11, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char P - 0x07, 0x3C, 0x00, 0x42, 0x00, 0x81, 0x00, 0xA1, 0x00, 0xA1, 0x00, 0x42, 0x00, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Q - 0x06, 0xFF, 0x00, 0x09, 0x00, 0x09, 0x00, 0x19, 0x00, 0x69, 0x00, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char R - 0x06, 0x46, 0x00, 0x89, 0x00, 0x89, 0x00, 0x91, 0x00, 0x91, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char S - 0x05, 0x01, 0x00, 0x01, 0x00, 0xFF, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char T - 0x06, 0x7F, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char U - 0x07, 0x03, 0x00, 0x0C, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x30, 0x00, 0x0C, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char V - 0x0A, 0x03, 0x00, 0x3C, 0x00, 0xC0, 0x00, 0x30, 0x00, 0x0C, 0x00, 0x0C, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x3C, 0x00, 0x03, 0x00, // Code for char W - 0x06, 0x81, 0x00, 0x66, 0x00, 0x18, 0x00, 0x18, 0x00, 0x66, 0x00, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char X - 0x07, 0x01, 0x00, 0x06, 0x00, 0x08, 0x00, 0xF0, 0x00, 0x08, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Y - 0x06, 0x81, 0x00, 0xC1, 0x00, 0xB1, 0x00, 0x8D, 0x00, 0x83, 0x00, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Z - 0x02, 0xFF, 0x03, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char [ - 0x03, 0x03, 0x00, 0x3C, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char BackSlash - 0x02, 0x01, 0x02, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ] - 0x05, 0x08, 0x00, 0x06, 0x00, 0x01, 0x00, 0x06, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ^ - 0x06, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char _ - 0x02, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ` - 0x05, 0x68, 0x00, 0x94, 0x00, 0x94, 0x00, 0x54, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char a - 0x05, 0xFF, 0x00, 0x48, 0x00, 0x84, 0x00, 0x84, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char b - 0x05, 0x78, 0x00, 0x84, 0x00, 0x84, 0x00, 0x84, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char c - 0x05, 0x78, 0x00, 0x84, 0x00, 0x84, 0x00, 0x48, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char d - 0x05, 0x78, 0x00, 0x94, 0x00, 0x94, 0x00, 0x94, 0x00, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char e - 0x03, 0x04, 0x00, 0xFE, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char f - 0x05, 0x78, 0x02, 0x84, 0x02, 0x84, 0x02, 0x48, 0x02, 0xFC, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char g - 0x05, 0xFF, 0x00, 0x08, 0x00, 0x04, 0x00, 0x04, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char h - 0x01, 0xFD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char i - 0x02, 0x00, 0x02, 0xFD, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char j - 0x04, 0xFF, 0x00, 0x10, 0x00, 0x68, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char k - 0x01, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char l - 0x07, 0xFC, 0x00, 0x08, 0x00, 0x04, 0x00, 0xFC, 0x00, 0x04, 0x00, 0x04, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char m - 0x05, 0xFC, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char n - 0x05, 0x78, 0x00, 0x84, 0x00, 0x84, 0x00, 0x84, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char o - 0x05, 0xFC, 0x03, 0x48, 0x00, 0x84, 0x00, 0x84, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char p - 0x05, 0x78, 0x00, 0x84, 0x00, 0x84, 0x00, 0x48, 0x00, 0xFC, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char q - 0x03, 0xFC, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char r - 0x05, 0x48, 0x00, 0x94, 0x00, 0x94, 0x00, 0xA4, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char s - 0x02, 0xFF, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char t - 0x05, 0x7C, 0x00, 0x80, 0x00, 0x80, 0x00, 0x40, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char u - 0x05, 0x0C, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x30, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char v - 0x09, 0x0C, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x30, 0x00, 0x08, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x30, 0x00, 0x0C, 0x00, 0x00, 0x00, // Code for char w - 0x05, 0x84, 0x00, 0x48, 0x00, 0x30, 0x00, 0x48, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char x - 0x05, 0x0C, 0x00, 0x30, 0x02, 0xC0, 0x01, 0x30, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char y - 0x05, 0x84, 0x00, 0xC4, 0x00, 0xB4, 0x00, 0x8C, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char z - 0x03, 0x10, 0x00, 0xEE, 0x01, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char { - 0x01, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char | - 0x04, 0x00, 0x00, 0x01, 0x02, 0xEE, 0x01, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char } - 0x05, 0x10, 0x00, 0x08, 0x00, 0x18, 0x00, 0x10, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ~ - 0x03, 0xFF, 0x00, 0x81, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // Code for char - }; - -extern const LcdFont font10x10 = -{ - glcd10x10, // font data - 0x0010, // first character code - 0x007F, // last character code - 10, // row height in pixels - 10 // character width in pixels -}; - -// End - diff --git a/src/Display/ST7920/glcd11x14.cpp b/src/Display/ST7920/glcd11x14.cpp new file mode 100644 index 00000000..5c2b0027 --- /dev/null +++ b/src/Display/ST7920/glcd11x14.cpp @@ -0,0 +1,255 @@ +/* + * glcd11x14.cpp + * + * Created on: 7 Feb 2018 + * Author: David + */ + +#include "lcd7920.h" + +//Font Generated by MikroElektronika GLCD Font Creator 1.2.0.0 +//MikroElektronika 2011 +//http://www.mikroe.com + +//GLCD FontName : Liberation_Sans11x14 (originally 9pt) +//GLCD FontSize : 11 x 14 + +const uint8_t Liberation_Sans11x14[] = +{ + 0x06, 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 + 0x01, 0xFC, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ! + 0x03, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char " + 0x07, 0x10, 0x01, 0x90, 0x07, 0x7C, 0x01, 0x10, 0x01, 0xD0, 0x03, 0x3C, 0x01, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char # + 0x07, 0x00, 0x02, 0x3C, 0x06, 0x64, 0x04, 0xFE, 0x0F, 0x44, 0x04, 0xCC, 0x06, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char $ + 0x0B, 0x38, 0x00, 0x44, 0x00, 0x44, 0x00, 0x38, 0x06, 0x80, 0x01, 0x40, 0x00, 0x30, 0x00, 0x8C, 0x03, 0x40, 0x04, 0x40, 0x04, 0x80, 0x03, // Code for char % + 0x08, 0x00, 0x01, 0xC0, 0x06, 0x7C, 0x04, 0xE4, 0x04, 0x24, 0x05, 0x18, 0x03, 0xC0, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char & + 0x01, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ' + 0x02, 0xF0, 0x07, 0x0C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ( + 0x02, 0x0C, 0x18, 0xF0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ) + 0x05, 0x08, 0x00, 0x28, 0x00, 0x1C, 0x00, 0x28, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char * + 0x05, 0x40, 0x00, 0x40, 0x00, 0xF0, 0x01, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char + + 0x01, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char , + 0x02, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char - + 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char . + 0x03, 0x00, 0x06, 0xF0, 0x01, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char / + 0x05, 0xF8, 0x03, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0xF8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 0 + 0x05, 0x08, 0x04, 0x04, 0x04, 0xFC, 0x07, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 1 + 0x05, 0x08, 0x06, 0x04, 0x05, 0x84, 0x04, 0x44, 0x04, 0x38, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 2 + 0x05, 0x08, 0x02, 0x04, 0x04, 0x44, 0x04, 0x44, 0x04, 0xB8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 3 + 0x06, 0xC0, 0x01, 0x60, 0x01, 0x30, 0x01, 0x18, 0x01, 0xFC, 0x07, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 4 + 0x05, 0x7C, 0x02, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0xC4, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 5 + 0x05, 0xF8, 0x03, 0x24, 0x04, 0x24, 0x04, 0x24, 0x04, 0xC8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 6 + 0x05, 0x04, 0x00, 0x04, 0x06, 0xC4, 0x01, 0x34, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 7 + 0x05, 0xB8, 0x03, 0x44, 0x04, 0x44, 0x04, 0x44, 0x04, 0xB8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 8 + 0x05, 0x78, 0x02, 0x84, 0x04, 0x84, 0x04, 0x84, 0x04, 0xF8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 9 + 0x02, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char : + 0x02, 0x00, 0x10, 0x10, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ; + 0x05, 0x40, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char < + 0x05, 0x20, 0x01, 0x20, 0x01, 0x20, 0x01, 0x20, 0x01, 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char = + 0x05, 0x10, 0x01, 0xA0, 0x00, 0xA0, 0x00, 0xA0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char > + 0x05, 0x08, 0x00, 0x04, 0x00, 0x84, 0x05, 0xC4, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ? + 0x0A, 0xE0, 0x07, 0x10, 0x08, 0xC8, 0x11, 0x24, 0x12, 0x14, 0x12, 0x14, 0x11, 0xE4, 0x13, 0x34, 0x0A, 0x08, 0x03, 0xF0, 0x01, 0x00, 0x00, // Code for char @ + 0x07, 0x00, 0x06, 0xC0, 0x03, 0xB8, 0x00, 0x84, 0x00, 0xB8, 0x00, 0xC0, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char A + 0x06, 0xFC, 0x07, 0x44, 0x04, 0x44, 0x04, 0x44, 0x04, 0x6C, 0x04, 0xB8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char B + 0x07, 0xF0, 0x01, 0x08, 0x02, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char C + 0x07, 0xFC, 0x07, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x02, 0xF0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char D + 0x06, 0xFC, 0x07, 0x44, 0x04, 0x44, 0x04, 0x44, 0x04, 0x44, 0x04, 0x44, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char E + 0x06, 0xFC, 0x07, 0x44, 0x00, 0x44, 0x00, 0x44, 0x00, 0x44, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char F + 0x07, 0xF8, 0x03, 0x0C, 0x06, 0x04, 0x04, 0x04, 0x04, 0x44, 0x04, 0x4C, 0x06, 0xC8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char G + 0x07, 0xFC, 0x07, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0xFC, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char H + 0x01, 0xFC, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char I + 0x05, 0x00, 0x02, 0x00, 0x06, 0x04, 0x04, 0x04, 0x04, 0xFC, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char J + 0x06, 0xFC, 0x07, 0x40, 0x00, 0x60, 0x00, 0x90, 0x00, 0x08, 0x03, 0x04, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char K + 0x06, 0xFC, 0x07, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char L + 0x07, 0xFC, 0x07, 0x18, 0x00, 0x30, 0x00, 0x60, 0x00, 0x30, 0x00, 0x18, 0x00, 0xFC, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char M + 0x07, 0xFC, 0x07, 0x0C, 0x00, 0x30, 0x00, 0x40, 0x00, 0x80, 0x01, 0x00, 0x06, 0xFC, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char N + 0x07, 0xF8, 0x03, 0x0C, 0x06, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x0C, 0x06, 0xF8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char O + 0x06, 0xFC, 0x07, 0x84, 0x00, 0x84, 0x00, 0x84, 0x00, 0x84, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char P + 0x07, 0xF8, 0x03, 0x0C, 0x06, 0x04, 0x04, 0x04, 0x0C, 0x04, 0x1C, 0x0C, 0x16, 0xF8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Q + 0x07, 0xFC, 0x07, 0x44, 0x00, 0x44, 0x00, 0x44, 0x00, 0xC4, 0x00, 0x44, 0x03, 0x38, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char R + 0x06, 0x38, 0x02, 0x24, 0x04, 0x24, 0x04, 0x44, 0x04, 0x44, 0x04, 0xC8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char S + 0x07, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0xFC, 0x07, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char T + 0x07, 0xFC, 0x03, 0x00, 0x06, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x06, 0xFC, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char U + 0x07, 0x04, 0x00, 0x78, 0x00, 0xC0, 0x03, 0x00, 0x04, 0xC0, 0x03, 0x78, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char V + 0x0B, 0x0C, 0x00, 0xF8, 0x00, 0x80, 0x07, 0x00, 0x07, 0xC0, 0x01, 0x70, 0x00, 0xC0, 0x01, 0x00, 0x07, 0x80, 0x07, 0xF8, 0x00, 0x0C, 0x00, // Code for char W + 0x05, 0x0C, 0x06, 0x90, 0x01, 0x60, 0x00, 0xB0, 0x01, 0x0C, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char X + 0x05, 0x0C, 0x00, 0x30, 0x00, 0xC0, 0x07, 0x30, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Y + 0x06, 0x04, 0x07, 0x84, 0x05, 0xC4, 0x04, 0x64, 0x04, 0x34, 0x04, 0x1C, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Z + 0x02, 0xFC, 0x1F, 0x04, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char [ + 0x03, 0x0C, 0x00, 0xF0, 0x01, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char BackSlash + 0x02, 0x04, 0x10, 0xFC, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ] + 0x05, 0x20, 0x00, 0x18, 0x00, 0x04, 0x00, 0x18, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ^ + 0x07, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char _ + 0x02, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ` + 0x06, 0x20, 0x07, 0x90, 0x04, 0x90, 0x04, 0x90, 0x02, 0xE0, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char a + 0x05, 0xFC, 0x07, 0x10, 0x04, 0x10, 0x04, 0x10, 0x04, 0xE0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char b + 0x05, 0xE0, 0x03, 0x10, 0x04, 0x10, 0x04, 0x10, 0x04, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char c + 0x05, 0xE0, 0x03, 0x10, 0x04, 0x10, 0x04, 0x10, 0x04, 0xFC, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char d + 0x05, 0xE0, 0x03, 0x90, 0x04, 0x90, 0x04, 0x90, 0x04, 0xE0, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char e + 0x03, 0x10, 0x00, 0xFC, 0x07, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char f + 0x05, 0xE0, 0x13, 0x10, 0x14, 0x10, 0x14, 0x30, 0x12, 0xE0, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char g + 0x05, 0xFC, 0x07, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0xE0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char h + 0x01, 0xF4, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char i + 0x02, 0x00, 0x10, 0xF4, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char j + 0x05, 0xFC, 0x07, 0x80, 0x00, 0xE0, 0x01, 0x30, 0x06, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char k + 0x01, 0xFC, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char l + 0x09, 0xE0, 0x07, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0xF0, 0x07, 0x20, 0x00, 0x10, 0x00, 0x10, 0x00, 0xE0, 0x07, 0x00, 0x00, 0x00, 0x00, // Code for char m + 0x05, 0xF0, 0x07, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0xE0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char n + 0x05, 0xE0, 0x03, 0x10, 0x04, 0x10, 0x04, 0x10, 0x04, 0xE0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char o + 0x05, 0xF0, 0x1F, 0x10, 0x04, 0x10, 0x04, 0x10, 0x04, 0xE0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char p + 0x05, 0xE0, 0x03, 0x10, 0x04, 0x10, 0x04, 0x10, 0x04, 0xF0, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char q + 0x03, 0xE0, 0x07, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char r + 0x05, 0x60, 0x02, 0x90, 0x04, 0x90, 0x04, 0x90, 0x04, 0x20, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char s + 0x03, 0x10, 0x00, 0xFC, 0x07, 0x10, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char t + 0x05, 0xF0, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0xF0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char u + 0x05, 0x30, 0x00, 0xC0, 0x03, 0x00, 0x04, 0xC0, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char v + 0x09, 0x30, 0x00, 0xC0, 0x03, 0x00, 0x04, 0x80, 0x03, 0x40, 0x00, 0x80, 0x03, 0x00, 0x04, 0xC0, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char w + 0x05, 0x10, 0x04, 0x60, 0x03, 0x80, 0x00, 0x60, 0x03, 0x10, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char x + 0x05, 0x30, 0x10, 0xC0, 0x11, 0x00, 0x0E, 0xC0, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char y + 0x04, 0x10, 0x04, 0x10, 0x07, 0xD0, 0x04, 0x30, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char z + 0x04, 0x80, 0x00, 0x78, 0x0F, 0x0C, 0x18, 0x04, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char { + 0x02, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char | + 0x04, 0x04, 0x10, 0x0C, 0x18, 0x78, 0x0F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char } + 0x05, 0x20, 0x00, 0x20, 0x00, 0x60, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ~ + 0x03, 0xF8, 0x07, 0x08, 0x04, 0xF8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char + 0x01, 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 € + 0x01, 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 + 0x01, 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 ‚ + 0x01, 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 ƒ + 0x01, 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 „ + 0x01, 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 … + 0x01, 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 † + 0x01, 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 ‡ + 0x01, 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 ˆ + 0x01, 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 ‰ + 0x01, 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 Š + 0x01, 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 ‹ + 0x01, 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 Œ + 0x01, 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 + 0x01, 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 Ž + 0x01, 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 + 0x01, 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 + 0x01, 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 ‘ + 0x01, 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 ’ + 0x01, 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 “ + 0x01, 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 ” + 0x01, 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 • + 0x01, 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 – + 0x01, 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 — + 0x01, 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 ˜ + 0x01, 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 ™ + 0x01, 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 š + 0x01, 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 › + 0x01, 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 œ + 0x01, 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 + 0x01, 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 ž + 0x01, 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 Ÿ + 0x01, 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 + 0x01, 0xD0, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ¡ + 0x05, 0xF0, 0x01, 0x08, 0x02, 0x0C, 0x06, 0x08, 0x02, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ¢ + 0x07, 0x40, 0x04, 0xF0, 0x07, 0xFC, 0x04, 0x44, 0x04, 0x44, 0x04, 0x0C, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char £ + 0x05, 0xF0, 0x01, 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, 0xF0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ¤ + 0x07, 0x04, 0x00, 0x48, 0x01, 0x70, 0x01, 0xC0, 0x07, 0x70, 0x01, 0x48, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ¥ + 0x01, 0x7C, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ¦ + 0x05, 0xD8, 0x0C, 0x34, 0x09, 0x24, 0x09, 0x24, 0x09, 0xE8, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char § + 0x04, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ¨ + 0x09, 0xE0, 0x00, 0x18, 0x03, 0xE8, 0x02, 0x14, 0x05, 0x14, 0x05, 0x14, 0x05, 0x08, 0x02, 0x18, 0x03, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char © + 0x04, 0x70, 0x00, 0x54, 0x00, 0x54, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ª + 0x05, 0xC0, 0x01, 0x20, 0x02, 0x80, 0x00, 0x40, 0x01, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char « + 0x05, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ¬ + 0x02, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char + 0x09, 0xE0, 0x00, 0x18, 0x03, 0x08, 0x02, 0xF4, 0x05, 0x54, 0x04, 0xF4, 0x05, 0x08, 0x02, 0x18, 0x03, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ® + 0x07, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ¯ + 0x03, 0x1C, 0x00, 0x14, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ° + 0x07, 0x40, 0x04, 0x40, 0x04, 0x40, 0x04, 0xF0, 0x05, 0x40, 0x04, 0x40, 0x04, 0x40, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ± + 0x04, 0x40, 0x00, 0x64, 0x00, 0x54, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ² + 0x04, 0x44, 0x00, 0x54, 0x00, 0x54, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ³ + 0x02, 0x06, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ´ + 0x06, 0xF0, 0x1F, 0x00, 0x04, 0x00, 0x04, 0x00, 0x02, 0xF0, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char µ + 0x06, 0x10, 0x00, 0x7C, 0x00, 0xFC, 0x1F, 0x04, 0x00, 0xFC, 0x1F, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ¶ + 0x02, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char · + 0x03, 0x00, 0x00, 0x00, 0x28, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ¸ + 0x04, 0x40, 0x00, 0x44, 0x00, 0x78, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ¹ + 0x04, 0x38, 0x00, 0x44, 0x00, 0x44, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char º + 0x05, 0x20, 0x02, 0x40, 0x01, 0x80, 0x00, 0x20, 0x02, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char » + 0x0A, 0x48, 0x00, 0x7C, 0x00, 0x40, 0x06, 0x00, 0x01, 0xC0, 0x00, 0x30, 0x00, 0x0C, 0x03, 0x80, 0x02, 0xC0, 0x07, 0x00, 0x02, 0x00, 0x00, // Code for char ¼ + 0x0A, 0x48, 0x00, 0x7C, 0x00, 0x40, 0x06, 0x00, 0x01, 0xC0, 0x00, 0x30, 0x00, 0x8C, 0x04, 0x40, 0x06, 0x40, 0x05, 0x80, 0x04, 0x00, 0x00, // Code for char ½ + 0x0A, 0x44, 0x00, 0x54, 0x00, 0x54, 0x00, 0x28, 0x06, 0x00, 0x01, 0xC0, 0x00, 0x30, 0x03, 0x8C, 0x02, 0xC0, 0x07, 0x00, 0x02, 0x00, 0x00, // Code for char ¾ + 0x05, 0x00, 0x0F, 0x80, 0x11, 0xD0, 0x10, 0x00, 0x10, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ¿ + 0x07, 0x00, 0x06, 0xC0, 0x03, 0xB8, 0x00, 0x85, 0x00, 0xB8, 0x00, 0xC0, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char À + 0x07, 0x00, 0x06, 0xC0, 0x03, 0xB8, 0x00, 0x85, 0x00, 0xB8, 0x00, 0xC0, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Á + 0x07, 0x00, 0x06, 0xC0, 0x03, 0xB9, 0x00, 0x84, 0x00, 0xB8, 0x00, 0xC1, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char  + 0x07, 0x00, 0x06, 0xC0, 0x03, 0xB9, 0x00, 0x84, 0x00, 0xB9, 0x00, 0xC1, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char à + 0x07, 0x00, 0x06, 0xC0, 0x03, 0xB9, 0x00, 0x84, 0x00, 0xB8, 0x00, 0xC1, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Ä + 0x07, 0x00, 0x06, 0xC0, 0x03, 0xBF, 0x00, 0x85, 0x00, 0xBF, 0x00, 0xC0, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Å + 0x0B, 0x00, 0x04, 0x00, 0x07, 0xC0, 0x00, 0xB8, 0x00, 0x8C, 0x00, 0x84, 0x00, 0xFC, 0x07, 0x44, 0x04, 0x44, 0x04, 0x44, 0x04, 0x44, 0x04, // Code for char Æ + 0x07, 0xF0, 0x01, 0x08, 0x02, 0x04, 0x04, 0x04, 0x2C, 0x04, 0x3C, 0x04, 0x04, 0x08, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Ç + 0x06, 0xFC, 0x07, 0x44, 0x04, 0x44, 0x04, 0x45, 0x04, 0x44, 0x04, 0x44, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char È + 0x06, 0xFC, 0x07, 0x44, 0x04, 0x44, 0x04, 0x45, 0x04, 0x44, 0x04, 0x44, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char É + 0x06, 0xFC, 0x07, 0x45, 0x04, 0x44, 0x04, 0x44, 0x04, 0x45, 0x04, 0x44, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Ê + 0x06, 0xFC, 0x07, 0x45, 0x04, 0x44, 0x04, 0x44, 0x04, 0x45, 0x04, 0x44, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Ë + 0x01, 0xFD, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Ì + 0x01, 0xFD, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Í + 0x04, 0x01, 0x00, 0xFC, 0x07, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Î + 0x04, 0x01, 0x00, 0xFC, 0x07, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Ï + 0x08, 0x40, 0x00, 0xFC, 0x07, 0x44, 0x04, 0x44, 0x04, 0x44, 0x04, 0x04, 0x04, 0x08, 0x02, 0xF0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Ð + 0x07, 0xFC, 0x07, 0x0C, 0x00, 0x31, 0x00, 0x40, 0x00, 0x81, 0x01, 0x01, 0x06, 0xFC, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Ñ + 0x07, 0xF8, 0x03, 0x0C, 0x06, 0x04, 0x04, 0x05, 0x04, 0x04, 0x04, 0x0C, 0x06, 0xF8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Ò + 0x07, 0xF8, 0x03, 0x0C, 0x06, 0x04, 0x04, 0x05, 0x04, 0x04, 0x04, 0x0C, 0x06, 0xF8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Ó + 0x07, 0xF8, 0x03, 0x0C, 0x06, 0x05, 0x04, 0x04, 0x04, 0x04, 0x04, 0x0D, 0x06, 0xF8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Ô + 0x07, 0xF8, 0x03, 0x0C, 0x06, 0x05, 0x04, 0x04, 0x04, 0x05, 0x04, 0x0D, 0x06, 0xF8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Õ + 0x07, 0xF8, 0x03, 0x0C, 0x06, 0x05, 0x04, 0x04, 0x04, 0x04, 0x04, 0x0D, 0x06, 0xF8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Ö + 0x05, 0x10, 0x01, 0xA0, 0x00, 0x40, 0x00, 0xA0, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char × + 0x07, 0xF8, 0x07, 0x0C, 0x07, 0x84, 0x05, 0x44, 0x04, 0x34, 0x04, 0x1C, 0x06, 0xFC, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Ø + 0x07, 0xFC, 0x03, 0x00, 0x06, 0x00, 0x04, 0x00, 0x04, 0x01, 0x04, 0x00, 0x06, 0xFC, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Ù + 0x07, 0xFC, 0x03, 0x00, 0x06, 0x00, 0x04, 0x01, 0x04, 0x00, 0x04, 0x00, 0x06, 0xFC, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Ú + 0x07, 0xFC, 0x03, 0x00, 0x06, 0x01, 0x04, 0x00, 0x04, 0x00, 0x04, 0x01, 0x06, 0xFC, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Û + 0x07, 0xFC, 0x03, 0x00, 0x06, 0x01, 0x04, 0x00, 0x04, 0x00, 0x04, 0x01, 0x06, 0xFC, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Ü + 0x05, 0x0C, 0x00, 0x30, 0x00, 0xC1, 0x07, 0x30, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Ý + 0x06, 0xFC, 0x07, 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, 0x10, 0x01, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Þ + 0x06, 0xF8, 0x07, 0x04, 0x00, 0x04, 0x04, 0x64, 0x04, 0xBC, 0x04, 0x88, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ß + 0x06, 0xA0, 0x07, 0x90, 0x04, 0x92, 0x04, 0x94, 0x02, 0xE0, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char à + 0x06, 0xA0, 0x07, 0x90, 0x04, 0x96, 0x04, 0x92, 0x02, 0xE0, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char á + 0x06, 0xA0, 0x07, 0x94, 0x04, 0x92, 0x04, 0x92, 0x02, 0xE4, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char â + 0x06, 0xA0, 0x07, 0x92, 0x04, 0x92, 0x04, 0x94, 0x02, 0xE6, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ã + 0x06, 0xA0, 0x07, 0x94, 0x04, 0x90, 0x04, 0x90, 0x02, 0xE4, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ä + 0x06, 0xA0, 0x07, 0x92, 0x04, 0x95, 0x04, 0x97, 0x02, 0xE0, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char å + 0x0A, 0x00, 0x03, 0xB0, 0x07, 0x90, 0x04, 0x90, 0x04, 0x90, 0x02, 0xE0, 0x03, 0x90, 0x04, 0x90, 0x04, 0x90, 0x04, 0xE0, 0x02, 0x00, 0x00, // Code for char æ + 0x05, 0xE0, 0x03, 0x10, 0x04, 0x10, 0x2C, 0x30, 0x3E, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ç + 0x05, 0xE0, 0x03, 0x90, 0x04, 0x92, 0x04, 0x94, 0x04, 0xE0, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char è + 0x05, 0xE0, 0x03, 0x90, 0x04, 0x90, 0x04, 0x96, 0x04, 0xE2, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char é + 0x05, 0xE0, 0x03, 0x94, 0x04, 0x92, 0x04, 0x92, 0x04, 0xE4, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ê + 0x05, 0xE0, 0x03, 0x94, 0x04, 0x90, 0x04, 0x90, 0x04, 0xE4, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ë + 0x02, 0xF2, 0x07, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ì + 0x03, 0xF0, 0x07, 0x06, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char í + 0x04, 0x04, 0x00, 0xF2, 0x07, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char î + 0x04, 0x04, 0x00, 0xF0, 0x07, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ï + 0x06, 0xD0, 0x03, 0x2C, 0x04, 0x28, 0x04, 0x34, 0x04, 0xE0, 0x03, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ð + 0x05, 0xF0, 0x07, 0x12, 0x00, 0x12, 0x00, 0x14, 0x00, 0xE6, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ñ + 0x05, 0xE0, 0x03, 0x10, 0x04, 0x12, 0x04, 0x14, 0x04, 0xE0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ò + 0x05, 0xE0, 0x03, 0x10, 0x04, 0x10, 0x04, 0x16, 0x04, 0xE2, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ó + 0x05, 0xE0, 0x03, 0x14, 0x04, 0x12, 0x04, 0x12, 0x04, 0xE4, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ô + 0x05, 0xE0, 0x03, 0x12, 0x04, 0x12, 0x04, 0x14, 0x04, 0xE6, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char õ + 0x05, 0xE0, 0x03, 0x14, 0x04, 0x10, 0x04, 0x10, 0x04, 0xE4, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ö + 0x07, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x50, 0x01, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ÷ + 0x05, 0xE0, 0x07, 0x10, 0x05, 0x90, 0x04, 0x50, 0x04, 0xF0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ø + 0x05, 0xF0, 0x03, 0x00, 0x04, 0x02, 0x04, 0x04, 0x04, 0xF0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ù + 0x05, 0xF0, 0x03, 0x00, 0x04, 0x06, 0x04, 0x02, 0x04, 0xF0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ú + 0x05, 0xF0, 0x03, 0x04, 0x04, 0x02, 0x04, 0x02, 0x04, 0xF4, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char û + 0x05, 0xF0, 0x03, 0x04, 0x04, 0x00, 0x04, 0x00, 0x04, 0xF4, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ü + 0x05, 0x30, 0x10, 0xE0, 0x11, 0x06, 0x0E, 0xC2, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ý + 0x05, 0xFC, 0x1F, 0x10, 0x04, 0x10, 0x04, 0x10, 0x04, 0xF0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char þ + 0x05, 0x30, 0x10, 0xE4, 0x11, 0x00, 0x0E, 0xC0, 0x01, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // Code for char ÿ +}; + +extern const LcdFont font11x14 = +{ + Liberation_Sans11x14, // font data + 0x0020, // first character code + 0x00FF, // last character code + 14, // row height in pixels + 11, // character width in pixels + 1 // number of space columns between characters before kerning +}; + +// End diff --git a/src/Display/ST7920/glcd16x16.cpp b/src/Display/ST7920/glcd16x16.cpp deleted file mode 100644 index f6d3b056..00000000 --- a/src/Display/ST7920/glcd16x16.cpp +++ /dev/null @@ -1,118 +0,0 @@ -#include "lcd7920.h" - -//Font Generated by MikroElektronika GLCD Font Creator 1.2.0.0 -//MikroElektronika 2011 -//http://www.mikroe.com - -//GLCD FontName : glcd16x16 -//GLCD FontSize : 16 x 16 - -static const uint8_t glcd16x16[] = { - 0x07, 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, // Code for char - 0x03, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x17, 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 ! - 0x05, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 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 " - 0x09, 0x20, 0x02, 0x20, 0x1E, 0xF0, 0x03, 0x2E, 0x02, 0x20, 0x02, 0x20, 0x1E, 0xF0, 0x03, 0x2E, 0x02, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char # - 0x08, 0x00, 0x00, 0x38, 0x04, 0x44, 0x08, 0x42, 0x10, 0xFF, 0x3F, 0x82, 0x10, 0x82, 0x08, 0x0C, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char $ - 0x0D, 0x00, 0x00, 0x3C, 0x00, 0x42, 0x00, 0x42, 0x00, 0x42, 0x18, 0x3C, 0x06, 0x80, 0x01, 0x70, 0x00, 0x0C, 0x0F, 0x82, 0x10, 0x80, 0x10, 0x80, 0x10, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char % - 0x0A, 0x00, 0x00, 0x00, 0x07, 0x9C, 0x08, 0x62, 0x10, 0xC2, 0x10, 0x22, 0x11, 0x1C, 0x0A, 0x00, 0x04, 0x00, 0x0A, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char & - 0x02, 0x00, 0x00, 0x1E, 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, // Code for char ' - 0x04, 0x00, 0x00, 0xE0, 0x0F, 0x1C, 0x70, 0x02, 0x80, 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 ( - 0x04, 0x00, 0x00, 0x02, 0x80, 0x1C, 0x70, 0xE0, 0x0F, 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 ) - 0x05, 0x04, 0x00, 0x34, 0x00, 0x0E, 0x00, 0x34, 0x00, 0x04, 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 * - 0x08, 0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0xF0, 0x07, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char + - 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 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 , - 0x04, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 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 - - 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 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 . - 0x04, 0x00, 0x18, 0x80, 0x07, 0x78, 0x00, 0x06, 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 / - 0x08, 0x00, 0x00, 0xF8, 0x07, 0x04, 0x08, 0x02, 0x10, 0x02, 0x10, 0x02, 0x10, 0x04, 0x08, 0xF8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 0 - 0x06, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x08, 0x00, 0x04, 0x00, 0xFE, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 1 - 0x08, 0x00, 0x00, 0x08, 0x10, 0x04, 0x18, 0x02, 0x14, 0x02, 0x12, 0x02, 0x11, 0xC6, 0x10, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 2 - 0x08, 0x00, 0x00, 0x08, 0x0C, 0x04, 0x08, 0x42, 0x10, 0x42, 0x10, 0x62, 0x10, 0xBC, 0x08, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 3 - 0x09, 0x00, 0x00, 0x00, 0x03, 0x80, 0x02, 0x40, 0x02, 0x30, 0x02, 0x08, 0x02, 0x04, 0x02, 0xFE, 0x1F, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 4 - 0x08, 0x00, 0x00, 0x70, 0x04, 0x2E, 0x08, 0x22, 0x10, 0x22, 0x10, 0x22, 0x10, 0x42, 0x08, 0x82, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 5 - 0x08, 0x00, 0x00, 0xF8, 0x07, 0x44, 0x08, 0x22, 0x10, 0x22, 0x10, 0x22, 0x10, 0x44, 0x08, 0x88, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 6 - 0x08, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x1C, 0xC2, 0x03, 0x32, 0x00, 0x0E, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 7 - 0x08, 0x00, 0x00, 0x18, 0x07, 0xA4, 0x08, 0x42, 0x10, 0x42, 0x10, 0x42, 0x10, 0xA4, 0x08, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 8 - 0x08, 0x00, 0x00, 0x78, 0x04, 0x84, 0x08, 0x02, 0x11, 0x02, 0x11, 0x02, 0x11, 0x84, 0x08, 0xF8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char 9 - 0x02, 0x00, 0x00, 0x10, 0x10, 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, // Code for char : - 0x02, 0x00, 0x00, 0x10, 0x70, 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, // Code for char ; - 0x08, 0x00, 0x00, 0x80, 0x00, 0x40, 0x01, 0x40, 0x01, 0x20, 0x02, 0x20, 0x02, 0x20, 0x02, 0x10, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char < - 0x08, 0x00, 0x00, 0x20, 0x02, 0x20, 0x02, 0x20, 0x02, 0x20, 0x02, 0x20, 0x02, 0x20, 0x02, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char = - 0x08, 0x00, 0x00, 0x10, 0x04, 0x20, 0x02, 0x20, 0x02, 0x20, 0x02, 0x40, 0x01, 0x40, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char > - 0x08, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x02, 0x00, 0x02, 0x17, 0x82, 0x00, 0x44, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ? - 0x10, 0x00, 0x00, 0xC0, 0x0F, 0x30, 0x10, 0x08, 0x20, 0x84, 0x47, 0x44, 0x48, 0x22, 0x90, 0x12, 0x90, 0x12, 0x90, 0x12, 0x88, 0x22, 0x9F, 0xF2, 0x90, 0x04, 0x90, 0x04, 0x48, 0x18, 0x44, 0xE0, 0x23, // Code for char @ - 0x0A, 0x00, 0x00, 0x00, 0x18, 0x00, 0x07, 0xE0, 0x01, 0x1C, 0x01, 0x02, 0x01, 0x1C, 0x01, 0xE0, 0x01, 0x00, 0x07, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char A - 0x0A, 0x00, 0x00, 0xFE, 0x1F, 0x42, 0x10, 0x42, 0x10, 0x42, 0x10, 0x42, 0x10, 0x42, 0x10, 0x42, 0x10, 0xA6, 0x08, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char B - 0x0B, 0x00, 0x00, 0xF0, 0x03, 0x08, 0x04, 0x04, 0x08, 0x02, 0x10, 0x02, 0x10, 0x02, 0x10, 0x02, 0x10, 0x02, 0x10, 0x04, 0x08, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char C - 0x0B, 0x00, 0x00, 0xFE, 0x1F, 0x02, 0x10, 0x02, 0x10, 0x02, 0x10, 0x02, 0x10, 0x02, 0x10, 0x02, 0x10, 0x04, 0x08, 0x08, 0x04, 0xF0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char D - 0x0A, 0x00, 0x00, 0xFE, 0x1F, 0x42, 0x10, 0x42, 0x10, 0x42, 0x10, 0x42, 0x10, 0x42, 0x10, 0x42, 0x10, 0x42, 0x10, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char E - 0x09, 0x00, 0x00, 0xFE, 0x1F, 0x82, 0x00, 0x82, 0x00, 0x82, 0x00, 0x82, 0x00, 0x82, 0x00, 0x82, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char F - 0x0B, 0x00, 0x00, 0xF0, 0x03, 0x08, 0x04, 0x04, 0x08, 0x02, 0x10, 0x02, 0x10, 0x82, 0x10, 0x82, 0x10, 0x84, 0x08, 0x88, 0x04, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char G - 0x0A, 0x00, 0x00, 0xFE, 0x1F, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0xFE, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char H - 0x02, 0x00, 0x00, 0xFE, 0x1F, 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, // Code for char I - 0x07, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0xFE, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char J - 0x0A, 0x00, 0x00, 0xFE, 0x1F, 0x00, 0x01, 0x80, 0x00, 0x40, 0x00, 0xE0, 0x00, 0x10, 0x01, 0x08, 0x06, 0x04, 0x08, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char K - 0x08, 0x00, 0x00, 0xFE, 0x1F, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char L - 0x0C, 0x00, 0x00, 0xFE, 0x1F, 0x0C, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x00, 0x07, 0x00, 0x18, 0x00, 0x07, 0xC0, 0x00, 0x30, 0x00, 0x0C, 0x00, 0xFE, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char M - 0x0A, 0x00, 0x00, 0xFE, 0x1F, 0x04, 0x00, 0x18, 0x00, 0x20, 0x00, 0xC0, 0x00, 0x00, 0x01, 0x00, 0x06, 0x00, 0x08, 0xFE, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char N - 0x0B, 0x00, 0x00, 0xF0, 0x03, 0x08, 0x04, 0x04, 0x08, 0x02, 0x10, 0x02, 0x10, 0x02, 0x10, 0x02, 0x10, 0x04, 0x08, 0x08, 0x04, 0xF0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char O - 0x0A, 0x00, 0x00, 0xFE, 0x1F, 0x82, 0x00, 0x82, 0x00, 0x82, 0x00, 0x82, 0x00, 0x82, 0x00, 0x82, 0x00, 0x44, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char P - 0x0B, 0x00, 0x00, 0xF0, 0x03, 0x08, 0x04, 0x04, 0x08, 0x02, 0x10, 0x02, 0x10, 0x02, 0x14, 0x02, 0x14, 0x04, 0x08, 0x08, 0x1C, 0xF0, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Q - 0x0A, 0x00, 0x00, 0xFE, 0x1F, 0x82, 0x00, 0x82, 0x00, 0x82, 0x00, 0x82, 0x00, 0x82, 0x01, 0x82, 0x06, 0x44, 0x08, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char R - 0x0A, 0x00, 0x00, 0x18, 0x04, 0x24, 0x08, 0x42, 0x10, 0x42, 0x10, 0x42, 0x10, 0x82, 0x10, 0x82, 0x10, 0x84, 0x08, 0x08, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char S - 0x09, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0xFE, 0x1F, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char T - 0x0A, 0x00, 0x00, 0xFE, 0x07, 0x00, 0x08, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x08, 0xFE, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char U - 0x0A, 0x00, 0x00, 0x06, 0x00, 0x38, 0x00, 0xC0, 0x01, 0x00, 0x06, 0x00, 0x18, 0x00, 0x06, 0xC0, 0x01, 0x38, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char V - 0x0F, 0x06, 0x00, 0x78, 0x00, 0x80, 0x07, 0x00, 0x18, 0x00, 0x07, 0xE0, 0x00, 0x1C, 0x00, 0x02, 0x00, 0x1C, 0x00, 0xE0, 0x00, 0x00, 0x07, 0x00, 0x18, 0x80, 0x07, 0x78, 0x00, 0x06, 0x00, 0x00, 0x00, // Code for char W - 0x0B, 0x00, 0x10, 0x02, 0x08, 0x04, 0x04, 0x18, 0x03, 0xA0, 0x00, 0x40, 0x00, 0xA0, 0x00, 0x18, 0x03, 0x04, 0x04, 0x02, 0x08, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char X - 0x09, 0x02, 0x00, 0x0C, 0x00, 0x10, 0x00, 0x60, 0x00, 0x80, 0x1F, 0x60, 0x00, 0x10, 0x00, 0x0C, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Y - 0x09, 0x00, 0x10, 0x02, 0x18, 0x02, 0x16, 0x02, 0x11, 0xC2, 0x10, 0x22, 0x10, 0x1A, 0x10, 0x06, 0x10, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char Z - 0x04, 0x00, 0x00, 0xFE, 0xFF, 0x02, 0x80, 0x02, 0x80, 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 [ - 0x04, 0x06, 0x00, 0x78, 0x00, 0x80, 0x07, 0x00, 0x18, 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 BackSlash - 0x03, 0x02, 0x80, 0x02, 0x80, 0xFE, 0xFF, 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 ] - 0x07, 0x40, 0x00, 0x30, 0x00, 0x0C, 0x00, 0x02, 0x00, 0x0C, 0x00, 0x30, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ^ - 0x09, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char _ - 0x03, 0x00, 0x00, 0x02, 0x00, 0x04, 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, // Code for char ` - 0x08, 0x00, 0x00, 0x40, 0x0E, 0x20, 0x11, 0x10, 0x11, 0x10, 0x11, 0x90, 0x10, 0x90, 0x08, 0xE0, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char a - 0x08, 0x00, 0x00, 0xFE, 0x1F, 0x20, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x20, 0x08, 0xC0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char b - 0x07, 0x00, 0x00, 0xC0, 0x07, 0x20, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x20, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char c - 0x08, 0x00, 0x00, 0xC0, 0x07, 0x20, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x20, 0x08, 0xFE, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char d - 0x08, 0x00, 0x00, 0xC0, 0x07, 0x20, 0x09, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x20, 0x09, 0xC0, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char e - 0x04, 0x10, 0x00, 0xFC, 0x1F, 0x12, 0x00, 0x12, 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 f - 0x08, 0x00, 0x00, 0xC0, 0x47, 0x20, 0x88, 0x10, 0x90, 0x10, 0x90, 0x10, 0x90, 0x20, 0x48, 0xF0, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char g - 0x07, 0x00, 0x00, 0xFE, 0x1F, 0x20, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0xE0, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char h - 0x02, 0x00, 0x00, 0xF2, 0x1F, 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, // Code for char i - 0x02, 0x00, 0x80, 0xF2, 0x7F, 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, // Code for char j - 0x08, 0x00, 0x00, 0xFE, 0x1F, 0x00, 0x02, 0x00, 0x01, 0x80, 0x01, 0x40, 0x06, 0x20, 0x08, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char k - 0x02, 0x00, 0x00, 0xFE, 0x1F, 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, // Code for char l - 0x0C, 0x00, 0x00, 0xF0, 0x1F, 0x20, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0xE0, 0x1F, 0x20, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0xE0, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char m - 0x07, 0x00, 0x00, 0xF0, 0x1F, 0x20, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0xE0, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char n - 0x08, 0x00, 0x00, 0xC0, 0x07, 0x20, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x20, 0x08, 0xC0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char o - 0x08, 0x00, 0x00, 0xF0, 0xFF, 0x20, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x20, 0x08, 0xC0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char p - 0x08, 0x00, 0x00, 0xC0, 0x07, 0x20, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x20, 0x08, 0xF0, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char q - 0x05, 0x00, 0x00, 0xF0, 0x1F, 0x20, 0x00, 0x10, 0x00, 0x10, 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 r - 0x07, 0x00, 0x00, 0xE0, 0x08, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x10, 0x11, 0x20, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char s - 0x04, 0x10, 0x00, 0xFC, 0x1F, 0x10, 0x10, 0x10, 0x10, 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 t - 0x07, 0x00, 0x00, 0xF0, 0x0F, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x08, 0xF0, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char u - 0x07, 0x30, 0x00, 0xC0, 0x00, 0x00, 0x07, 0x00, 0x18, 0x00, 0x07, 0xC0, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char v - 0x0B, 0x30, 0x00, 0xC0, 0x07, 0x00, 0x18, 0x00, 0x07, 0xC0, 0x00, 0x30, 0x00, 0xC0, 0x00, 0x00, 0x07, 0x00, 0x18, 0xC0, 0x07, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char w - 0x07, 0x10, 0x10, 0x20, 0x08, 0xC0, 0x06, 0x00, 0x01, 0xC0, 0x06, 0x20, 0x08, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char x - 0x07, 0x70, 0x00, 0x80, 0x81, 0x00, 0x8E, 0x00, 0x70, 0x00, 0x0E, 0xC0, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char y - 0x07, 0x10, 0x10, 0x10, 0x18, 0x10, 0x16, 0x10, 0x11, 0xD0, 0x10, 0x30, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char z - 0x05, 0x00, 0x01, 0x00, 0x01, 0xFC, 0x7E, 0x02, 0x80, 0x02, 0x80, 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 { - 0x02, 0x00, 0x00, 0xFE, 0xFF, 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, // Code for char | - 0x05, 0x02, 0x80, 0x02, 0x80, 0xFC, 0x7E, 0x00, 0x01, 0x00, 0x01, 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 } - 0x08, 0x80, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Code for char ~ - 0x04, 0xFE, 0x0F, 0x02, 0x08, 0x02, 0x08, 0xFE, 0x0F, 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 - }; - -extern const LcdFont font16x16 = -{ - glcd16x16, // font data - 0x0020, // first character code - 0x007F, // last character code - 16, // row height in pixels - 16 // character width in pixels -}; - -// End diff --git a/src/Display/ST7920/lcd7920.cpp b/src/Display/ST7920/lcd7920.cpp index fd9a9665..08efe23f 100644 --- a/src/Display/ST7920/lcd7920.cpp +++ b/src/Display/ST7920/lcd7920.cpp @@ -29,8 +29,8 @@ const unsigned int LcdCommandDelayMicros = 72 - 24; // 72us required, less 24us const unsigned int LcdDataDelayMicros = 10; // delay between sending data bytes const unsigned int LcdDisplayClearDelayMillis = 3; // 1.6ms should be enough -const unsigned int numRows = 64; -const unsigned int numCols = 128; +const unsigned int NumRows = 64; +const unsigned int NumCols = 128; Lcd7920::Lcd7920(uint8_t csPin) : currentFont(nullptr), numContinuationBytesLeft(0), textInverted(false) @@ -145,15 +145,23 @@ size_t Lcd7920::writeNative(uint16_t ch) if (ch < startChar || ch > endChar) { - return 0; + ch = 0x007F; // replace unsupported characters by square box + } + + uint8_t ySize = currentFont->height; + const uint8_t bytesPerColumn = (ySize + 7)/8; + if (row >= NumRows) + { + ySize = 0; + } + else if (row + ySize > NumRows) + { + ySize = NumRows - row; } - const uint8_t fontWidth = currentFont->width; - const uint8_t fontHeight = currentFont->height; - const uint8_t bytesPerColumn = (fontHeight + 7)/8; - const uint8_t bytesPerChar = (bytesPerColumn * fontWidth) + 1; + const uint8_t bytesPerChar = (bytesPerColumn * currentFont->width) + 1; const uint8_t *fontPtr = currentFont->ptr + (bytesPerChar * (ch - startChar)); - const uint16_t cmask = (1u << fontHeight) - 1; + const uint16_t cmask = (1u << currentFont->height) - 1; uint8_t nCols = *fontPtr++; @@ -161,38 +169,50 @@ size_t Lcd7920::writeNative(uint16_t ch) { if (startRow > row) { startRow = row; } if (startCol > column) { startCol = column; } - uint8_t nextRow = row + fontHeight; - if (nextRow > numRows) { nextRow = numRows; } + uint8_t nextRow = row + ySize; + if (nextRow > NumRows) { nextRow = NumRows; } if (endRow < nextRow) { endRow = nextRow; } } - // Decide whether to add a space column first (auto-kerning) - // We don't add a space column before a space character. - // We add a space column after a space character if we would have added one between the preceding and following characters. - if (column < rightMargin) + if (lastCharColData != 0) // if we have written anything other than spaces { + uint8_t numSpaces = currentFont->numSpaces; + + // Decide whether to add a space column first (auto-kerning) + // We don't add a space column before a space character. + // We add a space column after a space character if we would have added one between the preceding and following characters. uint16_t thisCharColData = *reinterpret_cast<const uint16_t*>(fontPtr) & cmask; if (thisCharColData == 0) // for characters with deliberate space column at the start, e.g. decimal point { thisCharColData = *reinterpret_cast<const uint16_t*>(fontPtr + 2) & cmask; } - const bool wantSpace = ((thisCharColData | (thisCharColData << 1)) & (lastCharColData | (lastCharColData << 1))) != 0; - if (wantSpace) + + const bool kern = (numSpaces >= 2) + ? ((thisCharColData & lastCharColData) == 0) + : (((thisCharColData | (thisCharColData << 1)) & (lastCharColData | (lastCharColData << 1))) == 0); + if (kern) { - // Add space after character - uint8_t mask = 0x80 >> (column & 7); - uint8_t *p = image + ((row * (numCols/8)) + (column/8)); - for (uint8_t i = 0; i < fontHeight && p < (image + sizeof(image)); ++i) + --numSpaces; // kern the character pair + } + if (numSpaces != 0 && column < rightMargin) + { + // Add a single space column after the character + if (ySize != 0) { - if (textInverted) + const uint8_t mask = 0x80 >> (column & 7); + uint8_t *p = image + ((row * (NumCols/8)) + (column/8)); + for (uint8_t i = 0; i < ySize && p < (image + sizeof(image)); ++i) { - *p |= mask; - } - else - { - *p &= ~mask; + if (textInverted) + { + *p |= mask; + } + else + { + *p &= ~mask; + } + p += (NumCols/8); } - p += (numCols/8); } ++column; } @@ -208,9 +228,9 @@ size_t Lcd7920::writeNative(uint16_t ch) } const uint8_t mask1 = 0x80 >> (column & 7); const uint8_t mask2 = ~mask1; - uint8_t *p = image + ((row * (numCols/8)) + (column/8)); + uint8_t *p = image + ((row * (NumCols/8)) + (column/8)); const uint16_t setPixelVal = (textInverted) ? 0 : 1; - for (uint8_t i = 0; i < fontHeight && p < (image + sizeof(image)); ++i) + for (uint8_t i = 0; i < ySize && p < (image + sizeof(image)); ++i) { if ((colData & 1u) == setPixelVal) { @@ -221,7 +241,7 @@ size_t Lcd7920::writeNative(uint16_t ch) *p &= mask2; // clear pixel } colData >>= 1; - p += (numCols/8); + p += (NumCols/8); } --nCols; ++column; @@ -229,7 +249,7 @@ size_t Lcd7920::writeNative(uint16_t ch) if (column > endCol) { - endCol = column; + endCol = min<uint8_t>(column, NumCols); } return 1; } @@ -237,7 +257,7 @@ size_t Lcd7920::writeNative(uint16_t ch) // Set the right margin. In graphics mode, anything written will be truncated at the right margin. Defaults to the right hand edge of the display. void Lcd7920::SetRightMargin(uint8_t r) { - rightMargin = (r > numCols) ? numCols : r; + rightMargin = (r > NumCols) ? NumCols : r; } // Clear a rectangle from the current position to the right margin. The height of the rectangle is the height of the current font. @@ -253,14 +273,14 @@ void Lcd7920::ClearToMargin() if (startRow > row) { startRow = row; } if (startCol > column) { startCol = column; } uint8_t nextRow = row + fontHeight; - if (nextRow > numRows) { nextRow = numRows; } + if (nextRow > NumRows) { nextRow = NumRows; } if (endRow < nextRow) { endRow = nextRow; } if (endCol < rightMargin) { endCol = rightMargin; } } while (column < rightMargin) { - uint8_t *p = image + ((row * (numCols/8)) + (column/8)); + uint8_t *p = image + ((row * (NumCols/8)) + (column/8)); uint8_t mask = 0xFF >> (column & 7); if ((column & (~7)) < (rightMargin & (~7))) { @@ -281,7 +301,7 @@ void Lcd7920::ClearToMargin() { *p &= ~mask; } - p += (numCols/8); + p += (NumCols/8); } } } @@ -304,12 +324,12 @@ void Lcd7920::Clear() // Flag whole image as dirty startRow = 0; - endRow = numRows; + endRow = NumRows; startCol = 0; - endCol = numCols; + endCol = NumCols; SetCursor(0, 0); textInverted = false; - rightMargin = numCols; + rightMargin = NumCols; } // Draw a line using the Bresenham Algorithm (thanks Wikipedia) @@ -381,11 +401,11 @@ void Lcd7920::Circle(uint8_t x0, uint8_t y0, uint8_t radius, PixelMode mode) // Draw a bitmap. x0 and numCols must be divisible by 8. void Lcd7920::Bitmap(uint8_t x0, uint8_t y0, uint8_t width, uint8_t height, const uint8_t data[]) { - for (uint8_t r = 0; r < height && r + y0 < numRows; ++r) + for (uint8_t r = 0; r < height && r + y0 < NumRows; ++r) { - uint8_t *p = image + (((r + y0) * (numCols/8)) + (x0/8)); + uint8_t *p = image + (((r + y0) * (NumCols/8)) + (x0/8)); uint16_t bitMapOffset = r * (width/8); - for (uint8_t c = 0; c < (width/8) && c + (x0/8) < numCols/8; ++c) + for (uint8_t c = 0; c < (width/8) && c + (x0/8) < NumCols/8; ++c) { *p++ = data[bitMapOffset++]; } @@ -435,8 +455,8 @@ bool Lcd7920::FlushSome() return true; } - startRow = numRows; - startCol = numCols; + startRow = NumRows; + startCol = NumCols; endCol = endRow = nextFlushRow = 0; } return false; @@ -445,16 +465,16 @@ bool Lcd7920::FlushSome() // Set the cursor position void Lcd7920::SetCursor(uint8_t r, uint8_t c) { - row = r % numRows; - column = c % numCols; + row = r; + column = c; lastCharColData = 0u; // flag that we just set the cursor position, so no space before next character } void Lcd7920::SetPixel(uint8_t x, uint8_t y, PixelMode mode) { - if (y < numRows && x < rightMargin) + if (y < NumRows && x < rightMargin) { - uint8_t * const p = image + ((y * (numCols/8)) + (x/8)); + uint8_t * const p = image + ((y * (NumCols/8)) + (x/8)); const uint8_t mask = 0x80u >> (x%8); switch(mode) { @@ -479,9 +499,9 @@ void Lcd7920::SetPixel(uint8_t x, uint8_t y, PixelMode mode) bool Lcd7920::ReadPixel(uint8_t x, uint8_t y) const { - if (y < numRows && x < numCols) + if (y < NumRows && x < NumCols) { - const uint8_t * const p = image + ((y * (numCols/8)) + (x/8)); + const uint8_t * const p = image + ((y * (NumCols/8)) + (x/8)); return (*p & (0x80u >> (x%8))) != 0; } return false; diff --git a/src/Display/ST7920/lcd7920.h b/src/Display/ST7920/lcd7920.h index d25f47a4..a7e9b446 100644 --- a/src/Display/ST7920/lcd7920.h +++ b/src/Display/ST7920/lcd7920.h @@ -21,6 +21,7 @@ struct LcdFont uint16_t endCharacter; // Unicode code point of the last character in the font uint8_t height; // row height in pixels - only this number of pixels will be fetched and drawn - maximum 16 in this version of the software uint8_t width; // max character width in pixels (the font table contains this number of bytes or words per character, plus 1 for the active width) + uint8_t numSpaces; // number of space columns between characters before kerning }; // Class for driving 128x64 graphical LCD fitted with ST7920 controller diff --git a/src/Duet/Pins_Duet.h b/src/Duet/Pins_Duet.h index d0ac0264..e7cd9a70 100644 --- a/src/Duet/Pins_Duet.h +++ b/src/Duet/Pins_Duet.h @@ -172,10 +172,12 @@ constexpr uint32_t IAP_FLASH_END = 0x000FFBFF; // don't touch the last 1KB, it' #define NETWORK_TC_CHAN (1) #define NETWORK_TC_IRQN TC4_IRQn #define NETWORK_TC_HANDLER TC4_Handler +#define NETWORK_TC_ID ID_TC4 #define STEP_TC (TC1) #define STEP_TC_CHAN (0) #define STEP_TC_IRQN TC3_IRQn #define STEP_TC_HANDLER TC3_Handler +#define STEP_TC_ID ID_TC3 #endif diff --git a/src/DuetM/Pins_DuetM.h b/src/DuetM/Pins_DuetM.h index 437c14cc..3fe2200e 100644 --- a/src/DuetM/Pins_DuetM.h +++ b/src/DuetM/Pins_DuetM.h @@ -66,7 +66,7 @@ constexpr Pin GlobalTmcEnablePin = 1; // The pin that drives ENN of all drive constexpr Pin ENABLE_PINS[DRIVES] = { NoPin, NoPin, NoPin, NoPin, NoPin, 63, 61 }; constexpr Pin STEP_PINS[DRIVES] = { 56, 38, 64, 40, 41, 67, 60 }; constexpr Pin DIRECTION_PINS[DRIVES] = { 54, 8, 30, 33, 42, 18, 57 }; -constexpr Pin DriverMuxPins[3] = { 50, 52, 53 }; // Pins that control the UART multiplexer, LCB first +constexpr Pin DriverMuxPins[3] = { 50, 52, 53 }; // Pins that control the UART multiplexer, LSB first // Endstops // RepRapFirmware only has a single endstop per axis. @@ -141,18 +141,19 @@ constexpr int HighestLogicalPin = 64; // highest logical pin number on // SAM4S Flash locations (may be expanded in the future) constexpr uint32_t IAP_FLASH_START = 0x00470000; -constexpr uint32_t IAP_FLASH_END = 0x0047FFFF; // we allow a full 64K on the SAM4 +constexpr uint32_t IAP_FLASH_END = 0x0047FFFF; // we allow a full 64K on the SAM4 // Duet pin numbers to control the W5500 interface -constexpr Pin W5500ResetPin = 100; // Low on this in holds the W5500 module in reset (ESP_RESET) -constexpr Pin W5500SsPin = 11; // SPI NPCS pin, input from W5500 module +constexpr Pin W5500ResetPin = 100; // Low on this in holds the W5500 module in reset (ESP_RESET) +constexpr Pin W5500SsPin = 11; // SPI NPCS pin, input from W5500 module // Timer allocation -// TC0 channel 0 is available for us to use +// TC0 channel 0 is used for step pulse generation and software timers // TC0 channel 1 is used for LCD beep // TC0 channel 2 is currently unused #define STEP_TC (TC0) #define STEP_TC_CHAN (0) +#define STEP_TC_ID ID_TC0 #define STEP_TC_IRQN TC0_IRQn #define STEP_TC_HANDLER TC0_Handler diff --git a/src/DuetM/TMC22xx.cpp b/src/DuetM/TMC22xx.cpp index 6a6b7da9..aa6df647 100644 --- a/src/DuetM/TMC22xx.cpp +++ b/src/DuetM/TMC22xx.cpp @@ -16,16 +16,24 @@ const uint32_t DefaultMicrosteppingShift = 4; // x16 microstepping const bool DefaultInterpolation = true; // interpolation enabled // Define the baud rate used to send/receive data to/from the drivers. -// If we assume a worst case clock frequency of 8MHz then the maximum baud rate is 8MHz/15 = 500kbaud. +// If we assume a worst case clock frequency of 8MHz then the maximum baud rate is 8MHz/16 = 500kbaud. // We send data via a 1K series resistor. Even if we assume a 200pF load on the shared UART line, this gives a 200ns time constant, which is much less than the 2us bit time @ 500kbaud. // To write a register we need to send 8 bytes. To read a register we send 4 bytes and receive 8 bytes after a programmable delay. // So at 500kbaud it takes about 128us to write a register, and 192us+ to read a register. -const uint32_t DriversBaudRate = 500000; -const uint32_t TransferTimeout = 2; // any transfer should complete within 2 ticks +// In testing I found that 500kbaud was not reliable, so now using 200kbaud. +const uint32_t DriversBaudRate = 200000; +const uint32_t TransferTimeout = 10; // any transfer should complete within 10 ticks static size_t numTmc22xxDrivers; -static bool driversPowered = false; +enum class DriversState : uint8_t +{ + noPower = 0, + initialising, + ready +}; + +static DriversState driversState = DriversState::noPower; const int ChopperControlRegisterMode = 999; // mode passed to get/set microstepping to indicate we want the chopper control register @@ -125,7 +133,7 @@ constexpr uint32_t IHOLDIRUN_IHOLD_SHIFT = 0; // standstill current constexpr uint32_t IHOLDIRUN_IHOLD_MASK = 0x1F << IHOLDIRUN_IHOLD_SHIFT; constexpr uint32_t IHOLDIRUN_IRUN_SHIFT = 8; constexpr uint32_t IHOLDIRUN_IRUN_MASK = 0x1F << IHOLDIRUN_IRUN_SHIFT; -constexpr uint32_t IHOLDIRUN_IHOLDDELAY_SHIFT = 18; +constexpr uint32_t IHOLDIRUN_IHOLDDELAY_SHIFT = 16; constexpr uint32_t IHOLDIRUN_IHOLDDELAY_MASK = 0x0F << IHOLDIRUN_IHOLDDELAY_SHIFT; constexpr uint32_t DefaultIholdIrunReg = (0 << IHOLDIRUN_IHOLD_SHIFT) | (0 << IHOLDIRUN_IRUN_SHIFT) | (2 << IHOLDIRUN_IHOLDDELAY_SHIFT); @@ -160,7 +168,7 @@ constexpr uint32_t CHOPCONF_DEDGE = 1 << 29; // step on both edges constexpr uint32_t CHOPCONF_DISS2G = 1 << 30; // disable short to ground protection constexpr uint32_t CHOPCONF_DISS2VS = 1 << 31; // disable low side short protection -constexpr uint32_t DefaultChopConfReg = 0x10000053; // this is the reset default - try it until we find something better +constexpr uint32_t DefaultChopConfReg = 0x10000053 | CHOPCONF_VSENSE_HIGH; // this is the reset default + CHOPCONF_VSENSE_HIGH - try it until we find something better // DRV_STATUS register. See the .h file for the bit definitions. constexpr uint8_t REGNUM_DRV_STATUS = 0x6F; @@ -232,7 +240,7 @@ static uint8_t CalcCRC(const uint8_t *datagram, uint8_t length) #endif // CRC of the first 2 bytes we send in any request -static constexpr uint8_t InitialSendCRC = CRCAddByte(CRCAddByte(0, 0xA0), 0x00); +static constexpr uint8_t InitialSendCRC = CRCAddByte(CRCAddByte(0, 0x05), 0x00); // CRC of a request to read the IFCOUNT register static constexpr uint8_t ReadIfcountCRC = CRCAddByte(InitialSendCRC, REGNUM_IFCOUNT); @@ -241,11 +249,11 @@ static constexpr uint8_t ReadIfcountCRC = CRCAddByte(InitialSendCRC, REGNUM_IFCO // This is the message we send - volatile because we care about when it is written static volatile uint8_t sendData[12] = { - 0xA0, 0x00, // sync byte and slave address + 0x05, 0x00, // sync byte and slave address 0x00, // register address and write flag (filled in) - 0x00, 0x00, 0x00, 0x00, // value to write (if writing), or 1 byte of CRC is read request (filled in) + 0x00, 0x00, 0x00, 0x00, // value to write (if writing), or 1 byte of CRC if read request (filled in) 0x00, // CRC of write request (filled in) - 0xA0, 0x00, // sync byte and slave address + 0x05, 0x00, // sync byte and slave address REGNUM_IFCOUNT, // register we want to read ReadIfcountCRC // CRC }; @@ -268,9 +276,11 @@ public: void Enable(bool en); void AppendDriverStatus(const StringRef& reply); uint8_t GetDriverNumber() const { return driverNumber; } + bool UpdatePending() const { return registersToUpdate != 0; } void TransferDone() __attribute__ ((hot)); // called by the ISR when the SPI transfer has completed void StartTransfer() __attribute__ ((hot)); // called to start a transfer + void TransferTimedOut() { ++numTimeouts; } static void AbortTransfer(); unsigned int GetMicrostepping(int mode, bool& interpolation) const; // get microstepping or chopper control register @@ -309,9 +319,15 @@ private: uint32_t configuredChopConfReg; // the configured chopper control register, in the Enabled state, without the microstepping bits uint32_t registersToUpdate; // bitmap of register indices whose values need to be sent to the driver chip uint32_t registerBeingUpdated; // which register we are sending + uint32_t axisNumber; // the axis number of this driver as used to index the DriveMovements in the DDA uint32_t microstepShiftFactor; // how much we need to shift 1 left by to get the current microstepping + uint16_t readErrors; // how many read errors we had + uint16_t writeErrors; // how many write errors we had + uint16_t numReads; // how many successful reads we had + uint16_t numTimeouts; // how many times a transfer timed out + Pin enablePin; // the enable pin of this driver, if it has its own uint8_t driverNumber; // the number of this driver as addressed by the UART multiplexer uint8_t writeRegCRCs[NumWriteRegisters]; // CRCs of the messages needed to update the registers @@ -366,10 +382,10 @@ static uint32_t transferStartedTime; sendData[7] = crc; uartPdc->PERIPH_TPR = reinterpret_cast<uint32_t>(sendData); - uartPdc->PERIPH_TCR = 12; // number of bytes to send + uartPdc->PERIPH_TCR = 12; // number of bytes to send: 8 bytes send request + 4 bytes read IFCOUNT request uartPdc->PERIPH_RPR = reinterpret_cast<uint32_t>(receiveData); - uartPdc->PERIPH_RCR = 20; // number of bytes to receive + uartPdc->PERIPH_RCR = 20; // number of bytes to receive: the sent data + 8 bytes of received data uartPdc->PERIPH_PTCR = (PERIPH_PTCR_RXTEN | PERIPH_PTCR_TXTEN); // enable the PDC to transmit and receive } @@ -384,10 +400,10 @@ static uint32_t transferStartedTime; sendData[3] = crc; uartPdc->PERIPH_TPR = reinterpret_cast<uint32_t>(sendData); - uartPdc->PERIPH_TCR = 4; + uartPdc->PERIPH_TCR = 4; // send a 4 byte read data request uartPdc->PERIPH_RPR = reinterpret_cast<uint32_t>(receiveData); - uartPdc->PERIPH_RCR = 12; + uartPdc->PERIPH_RCR = 12; // receive the 4 bytes we sent + 8 bytes of received data uartPdc->PERIPH_PTCR = (PERIPH_PTCR_RXTEN | PERIPH_PTCR_TXTEN); // enable the PDC to transmit and receive } @@ -395,21 +411,21 @@ static uint32_t transferStartedTime; // Set a register value and flag it for updating void TmcDriverState::UpdateRegister(size_t regIndex, uint32_t regVal) { - registersToUpdate &= ~(1 << regIndex); + registersToUpdate &= ~(1u << regIndex); // make sure it is not updated while we are changing it uint8_t crc = InitialSendCRC; crc = CRCAddByte(crc, WriteRegNumbers[regIndex] | 0x80); - crc = CRCAddByte(crc, (regVal >> 24) & 0xFF); - crc = CRCAddByte(crc, (regVal >> 16) & 0xFF); - crc = CRCAddByte(crc, (regVal >> 8) & 0xFF); - crc = CRCAddByte(crc, regVal & 0xFF); + crc = CRCAddByte(crc, (uint8_t)(regVal >> 24)); + crc = CRCAddByte(crc, (uint8_t)(regVal >> 16)); + crc = CRCAddByte(crc, (uint8_t)(regVal >> 8)); + crc = CRCAddByte(crc, (uint8_t)regVal); const irqflags_t flags = cpu_irq_save(); writeRegisters[regIndex] = regVal; writeRegCRCs[regIndex] = crc; - registersToUpdate |= (1 << regIndex); + registersToUpdate |= (1u << regIndex); // flag it for sending cpu_irq_restore(flags); } -// Calculate the copper control register and flag it for sending +// Calculate the chopper control register and flag it for sending void TmcDriverState::UpdateChopConfRegister() { UpdateRegister(WriteChopConf, (enabled) ? configuredChopConfReg : configuredChopConfReg & ~CHOPCONF_TOFF_MASK); @@ -421,17 +437,17 @@ pre(!driversPowered) { driverNumber = p_driverNumber; axisNumber = p_driverNumber; // assume straight-through axis mapping initially - enablePin = p_pin; + enablePin = p_pin; // this is NoPin for the built-in drivers if (p_pin != NoPin) { pinMode(p_pin, OUTPUT_HIGH); } enabled = false; + registersToUpdate = 0; UpdateRegister(WriteGConf, DefaultGConfReg); UpdateRegister(WriteSlaveConf, DefaultSlaveConfReg); configuredChopConfReg = DefaultChopConfReg; - SetMicrostepping(DefaultMicrosteppingShift, DefaultInterpolation); - UpdateChopConfRegister(); + SetMicrostepping(DefaultMicrosteppingShift, DefaultInterpolation); // this also updates the chopper control register UpdateRegister(WriteIholdIrun, DefaultIholdIrunReg); UpdateRegister(WritePwmConf, DefaultPwmConfReg); for (size_t i = 0; i < NumReadRegisters; ++i) @@ -441,6 +457,7 @@ pre(!driversPowered) registerBeingUpdated = 0; registerToRead = 0; lastIfCount = 0; + readErrors = writeErrors = numReads = numTimeouts = 0; } inline void TmcDriverState::SetAxisNumber(size_t p_axisNumber) @@ -457,7 +474,7 @@ inline void TmcDriverState::WriteAll() // Set the chopper control register to the settings provided by the user void TmcDriverState::SetChopConf(uint32_t newVal) { - configuredChopConfReg = newVal & (CHOPCONF_TBL_MASK | CHOPCONF_HSTRT_MASK | CHOPCONF_HEND_MASK | CHOPCONF_TOFF_MASK); + configuredChopConfReg = (newVal & (CHOPCONF_TBL_MASK | CHOPCONF_HSTRT_MASK | CHOPCONF_HEND_MASK | CHOPCONF_TOFF_MASK)) | CHOPCONF_VSENSE_HIGH; UpdateChopConfRegister(); } @@ -478,7 +495,7 @@ void TmcDriverState::SetCurrent(float current) { // The current sense resistor on the Duet M is 0.091 ohms, to which we must add 0.02 ohms internal resistance. // Full scale peak motor current in the high sensitivity range is give by I = 0.18/(R+0.02) = 0.18/0.111 ~= 1.6A - // This gives us a range of 101mA to 3.236A in 101mA steps in the high sensitivity range (VSENSE = 1) + // This gives us a range of 50mA to 1.6A in 50mA steps in the high sensitivity range (VSENSE = 1) const uint32_t iRunCurrent = static_cast<uint32_t>(constrain<float>(current, 50.0, MaximumMotorCurrent)); const uint32_t iRunCsBits = (32 * iRunCurrent - 800)/1615; // formula checked by simulation on a spreadsheet const uint32_t iHoldCurrent = (iRunCurrent * 3)/4; // set standstill current to 3/4 of run current @@ -491,6 +508,10 @@ void TmcDriverState::SetCurrent(float current) void TmcDriverState::Enable(bool en) { enabled = en; + if (enablePin != NoPin) + { + digitalWrite(enablePin, !en); // we assume that smart drivers always have active low enables + } UpdateChopConfRegister(); } @@ -542,6 +563,9 @@ void TmcDriverState::AppendDriverStatus(const StringRef& reply) { reply.cat(" ok"); } + + reply.catf(", read errors %u, write errors %u, ifcount %u, reads %u, timoeuts %u", readErrors, writeErrors, lastIfCount, numReads, numTimeouts); + readErrors = writeErrors = numReads = numTimeouts = 0; } // Get microstepping or chopper control register @@ -561,20 +585,24 @@ unsigned int TmcDriverState::GetMicrostepping(int mode, bool& interpolation) con // This is called by the ISR when the SPI transfer has completed inline void TmcDriverState::TransferDone() { - if (sendData[2] & 0x80) + if (sendData[2] & 0x80) // if we were writing a register { const uint8_t currentIfCount = receiveData[18]; if (currentIfCount == (uint8_t)(lastIfCount + 1)) { registersToUpdate &= ~registerBeingUpdated; } + else + { + ++writeErrors; + } lastIfCount = currentIfCount; } - else if (sendData[2] == ReadRegNumbers[registerToRead] && ReadRegNumbers[registerToRead] == receiveData[6] && receiveData[4] == 0xA0 && receiveData[6] == 0xFF) + else if (sendData[2] == ReadRegNumbers[registerToRead] && ReadRegNumbers[registerToRead] == receiveData[6] && receiveData[4] == 0x05 && receiveData[5] == 0xFF) { // We asked to read the scheduled read register, and the sync byte, slave address and register number in the received message match //TODO here we could check the CRC of the received message, but for now we assume that we won't get any corruption in the 32-bit received data - const uint32_t regVal = ((uint32_t)receiveData[7] << 24) | ((uint32_t)receiveData[8] << 16) | ((uint32_t)receiveData[9] << 8) | receiveData[11]; + const uint32_t regVal = ((uint32_t)receiveData[7] << 24) | ((uint32_t)receiveData[8] << 16) | ((uint32_t)receiveData[9] << 8) | receiveData[10]; readRegisters[registerToRead] = regVal; accumulatedReadRegisters[registerToRead] |= regVal; @@ -583,14 +611,20 @@ inline void TmcDriverState::TransferDone() { registerToRead = 0; } + ++numReads; + } + else + { + ++readErrors; } } // This is called to abandon the current transfer, if any -inline void TmcDriverState::AbortTransfer() +void TmcDriverState::AbortTransfer() { + UART_TMC_DRV->UART_IDR = UART_IDR_ENDRX; // disable end-of-receive interrupt uartPdc->PERIPH_PTCR = (PERIPH_PTCR_RXTDIS | PERIPH_PTCR_TXTDIS); // disable the PDC - UART_TMC_DRV->UART_CR = US_CR_RSTRX | US_CR_RSTTX | US_CR_RXDIS | US_CR_TXDIS | US_CR_RSTSTA; + UART_TMC_DRV->UART_CR = UART_CR_RSTRX | UART_CR_RSTTX | UART_CR_RXDIS | UART_CR_TXDIS | UART_CR_RSTSTA; currentDriver = nullptr; } @@ -632,12 +666,14 @@ inline void TmcDriverState::StartTransfer() // Find which register to send. The common case is when no registers need to be updated. if (registersToUpdate == 0) { + registerBeingUpdated = 0; + // Read a register - const irqflags_t flags = cpu_irq_save(); // avoid race condition - UART_TMC_DRV->UART_CR = US_CR_RSTRX | US_CR_RSTTX; // reset transmitter and receiver + const irqflags_t flags = cpu_irq_save(); // avoid race condition + UART_TMC_DRV->UART_CR = UART_CR_RSTRX | UART_CR_RSTTX; // reset transmitter and receiver SetupDMAReceive(ReadRegNumbers[registerToRead], ReadRegCRCs[registerToRead]); // set up the PDC - UART_TMC_DRV->UART_IER = US_IER_ENDRX; // enable end-of-receive interrupt - UART_TMC_DRV->UART_CR = US_CR_RXEN | US_CR_TXEN; // enable transmitter and receiver + UART_TMC_DRV->UART_IER = UART_IER_ENDRX; // enable end-of-receive interrupt + UART_TMC_DRV->UART_CR = UART_CR_RXEN | UART_CR_TXEN; // enable transmitter and receiver transferStartedTime = millis(); cpu_irq_restore(flags); } @@ -655,33 +691,33 @@ inline void TmcDriverState::StartTransfer() ++regNum; mask <<= 1; } while (regNum < NumWriteRegisters - 1); - registerBeingUpdated = mask; // Kick off a transfer for that register - const irqflags_t flags = cpu_irq_save(); // avoid race condition - UART_TMC_DRV->UART_CR = US_CR_RSTRX | US_CR_RSTTX; // reset transmitter and receiver + const irqflags_t flags = cpu_irq_save(); // avoid race condition + registerBeingUpdated = mask; + UART_TMC_DRV->UART_CR = UART_CR_RSTRX | UART_CR_RSTTX; // reset transmitter and receiver SetupDMASend(WriteRegNumbers[regNum], writeRegisters[regNum], writeRegCRCs[regNum]); // set up the PDC - UART_TMC_DRV->UART_IER = US_IER_ENDRX; // enable end-of-transfer interrupt - UART_TMC_DRV->UART_CR = US_CR_TXEN; // enable transmitter + UART_TMC_DRV->UART_IER = UART_IER_ENDRX; // enable end-of-transfer interrupt + UART_TMC_DRV->UART_CR = UART_CR_RXEN | UART_CR_TXEN; // enable transmitter and receiver transferStartedTime = millis(); cpu_irq_restore(flags); } } -// ISR for the USART -extern "C" void USART_TMC_DRV_Handler(void) __attribute__ ((hot)); +// ISR for the UART +extern "C" void UART_TMC_DRV_Handler(void) __attribute__ ((hot)); -void USART_TMC_DRV_Handler(void) +void UART_TMC_DRV_Handler(void) { TmcDriverState *driver = currentDriver; // capture volatile variable if (driver != nullptr) { driver->TransferDone(); // tidy up after the transfer we just completed - if (driversPowered) + if (driversState != DriversState::noPower) { // Power is still good, so send/receive to/from the next driver ++driver; // advance to the next driver - if (driver == driverStates + numTmc22xxDrivers) + if (driver >= driverStates + numTmc22xxDrivers) { driver = driverStates; } @@ -691,7 +727,7 @@ void USART_TMC_DRV_Handler(void) } // Driver power is down or there is no current driver, so stop polling - UART_TMC_DRV->UART_IDR = US_IDR_ENDRX; + UART_TMC_DRV->UART_IDR = UART_IDR_ENDRX; currentDriver = nullptr; // signal that we are not waiting for an interrupt } @@ -712,7 +748,7 @@ namespace SmartDrivers ConfigurePin(GetPinDescription(DriversRxPin)); ConfigurePin(GetPinDescription(DriversTxPin)); - // Enable the clock to the USART + // Enable the clock to the UART pmc_enable_periph_clk(ID_UART_TMC_DRV); // Set the UART baud rate, 8 bits, 2 stop bits, no parity @@ -720,9 +756,14 @@ namespace SmartDrivers UART_TMC_DRV->UART_CR = UART_CR_RSTRX | UART_CR_RSTTX | UART_CR_RXDIS | UART_CR_TXDIS; UART_TMC_DRV->UART_MR = UART_MR_CHMODE_NORMAL | UART_MR_PAR_NO; UART_TMC_DRV->UART_BRGR = VARIANT_MCK/(16 * DriversBaudRate); // set baud rate - UART_TMC_DRV->UART_CR = US_CR_RSTRX | US_CR_RSTTX | US_CR_RXDIS | US_CR_TXDIS | US_CR_RSTSTA; + UART_TMC_DRV->UART_CR = UART_CR_RSTRX | UART_CR_RSTTX | UART_CR_RXDIS | UART_CR_TXDIS | UART_CR_RSTSTA; + + // Set up the multiplexer control pins as outputs + pinMode(DriverMuxPins[0], OUTPUT_LOW); + pinMode(DriverMuxPins[1], OUTPUT_LOW); + pinMode(DriverMuxPins[2], OUTPUT_LOW); - driversPowered = false; + driversState = DriversState::noPower; for (size_t drive = 0; drive < numTmc22xxDrivers; ++drive) { driverStates[drive].Init(drive, driverSelectPins[drive]); // axes are mapped straight through to drivers initially @@ -803,56 +844,78 @@ namespace SmartDrivers // Before the first call to this function with 'powered' true, you must call Init() void Spin(bool powered) { - const bool wasPowered = driversPowered; - driversPowered = powered; - if (powered) + if (driversState == DriversState::noPower) { - if (wasPowered) - { - // If a UART transfer was started, time it out if necessary - if (currentDriver != nullptr && millis() - transferStartedTime > TransferTimeout) - { - uint8_t driverNum = currentDriver->GetDriverNumber(); - TmcDriverState::AbortTransfer(); - ++driverNum; - if (driverNum >= numTmc22xxDrivers) - { - driverNum = 0; - } - driverStates[driverNum].StartTransfer(); - } - } - else + if (powered) { // Power to the drivers has been provided or restored, so we need to enable and re-initialise them - digitalWrite(GlobalTmcEnablePin, LOW); - delayMicroseconds(10); for (size_t drive = 0; drive < numTmc22xxDrivers; ++drive) { driverStates[drive].WriteAll(); } + driversState = DriversState::initialising; + } + } + else if (powered) + { + if (currentDriver == nullptr) + { + // No transfer in progress, so start one + if (numTmc22xxDrivers != 0) + { + // Kick off the first transfer + NVIC_EnableIRQ(SERIAL_TMC_DRV_IRQn); + driverStates[0].StartTransfer(); + } + } + else if (millis() - transferStartedTime > TransferTimeout) + { + // A UART transfer was started but has timed out + currentDriver->TransferTimedOut(); + uint8_t driverNum = currentDriver->GetDriverNumber(); + TmcDriverState::AbortTransfer(); // this clears currentDriver + ++driverNum; + if (driverNum >= numTmc22xxDrivers) + { + driverNum = 0; + } } - if (currentDriver == nullptr && numTmc22xxDrivers != 0) + if (driversState == DriversState::initialising) { - // Kick off the first transfer - NVIC_EnableIRQ(SERIAL_TMC_DRV_IRQn); - driverStates[0].StartTransfer(); + // If all drivers have been initialised, set the global enable + bool allInitialised = true; + for (size_t i = 0; i < numTmc22xxDrivers; ++i) + { + if (driverStates[i].UpdatePending()) + { + allInitialised = false; + break; + } + } + + if (allInitialised) + { + digitalWrite(GlobalTmcEnablePin, LOW); + driversState = DriversState::ready; + } } } - else if (wasPowered) + else { + // We had power but we lost it digitalWrite(GlobalTmcEnablePin, HIGH); // disable the drivers TmcDriverState::AbortTransfer(); + driversState = DriversState::noPower; } } // This is called from the tick ISR, possibly while Spin (with powered either true or false) is being executed void TurnDriversOff() { - digitalWrite(GlobalTmcEnablePin, HIGH); // disable the drivers - driversPowered = false; + // When using TMC2660 drivers, this is called when an over-voltage event occurs, so that we can try to protect the drivers by disabling them. + // We don't use it with TMC22xx drivers. } void SetCoolStep(size_t drive, uint16_t coolStepConfig) diff --git a/src/DuetNG/Pins_DuetNG.h b/src/DuetNG/Pins_DuetNG.h index d0f358f4..cd1bd599 100644 --- a/src/DuetNG/Pins_DuetNG.h +++ b/src/DuetNG/Pins_DuetNG.h @@ -213,5 +213,6 @@ constexpr Pin W5500SsPin = 11; // SPI NPCS pin, input from W5500 module #define STEP_TC_CHAN (2) #define STEP_TC_IRQN TC2_IRQn #define STEP_TC_HANDLER TC2_Handler +#define STEP_TC_ID ID_TC2 #endif diff --git a/src/GCodes/GCodeBuffer.cpp b/src/GCodes/GCodeBuffer.cpp index d80bd2a4..fc1ee1f9 100644 --- a/src/GCodes/GCodeBuffer.cpp +++ b/src/GCodes/GCodeBuffer.cpp @@ -967,7 +967,7 @@ void GCodeBuffer::MessageAcknowledged(bool cancelled) // Return true if we can queue gcodes from this source bool GCodeBuffer::CanQueueCodes() const { - return queueCodes || machineState->doingFileMacro; // return true if we queue commands form this source or we are executing a macro + return queueCodes || machineState->doingFileMacro; // return true if we queue commands from this source or we are executing a macro } // Write the command to a string diff --git a/src/GCodes/GCodeBuffer.h b/src/GCodes/GCodeBuffer.h index b270938b..8620632f 100644 --- a/src/GCodes/GCodeBuffer.h +++ b/src/GCodes/GCodeBuffer.h @@ -75,8 +75,8 @@ public: bool CanQueueCodes() const; void MessageAcknowledged(bool cancelled); FilePosition GetFilePosition(size_t bytesCached) const; // Get the file position at the start of the current command - bool IsWritingBinary() const; // returns true if writing binary - void SetBinaryWriting(bool state); // set true if writing binary + bool IsWritingBinary() const; // returns true if writing binary + void SetBinaryWriting(bool state); // set true if writing binary uint32_t GetCRC32() const; void SetCRC32(uint32_t newCRC32); diff --git a/src/Platform.cpp b/src/Platform.cpp index 28f12fe1..a8e945bd 100644 --- a/src/Platform.cpp +++ b/src/Platform.cpp @@ -150,10 +150,10 @@ uint32_t lastSoftTimerInterruptScheduledAt = 0; // Therefore, be very careful what you do here! void UrgentInit() { -#if HAS_SMART_DRIVERS +#if defined(DUET_NG) // When the reset button is pressed on pre-production Duet WiFi boards, if the TMC2660 drivers were previously enabled then we get // uncommanded motor movements if the STEP lines pick up any noise. Try to reduce that by initialising the pins that control the drivers early here. - // On the production boards the ENN line is pulled high and that prevents motor movements. + // On the production boards the ENN line is pulled high by an external pullup resistor and that prevents motor movements. for (size_t drive = 0; drive < DRIVES; ++drive) { pinMode(STEP_PINS[drive], OUTPUT_LOW); @@ -161,6 +161,15 @@ void UrgentInit() pinMode(ENABLE_PINS[drive], OUTPUT_HIGH); } #endif + +#if defined(DUET_M) + // The prototype boards don't have a pulldown on LCD_BEEP, which causes a hissing sound from the beeper on the 12864 display until the pin is initialised + pinMode(LcdBeepPin, OUTPUT_LOW); + + // On the prototype boards the stepper driver expansion ports don't have external pullup resistors on their enable pins + pinMode(ENABLE_PINS[5], OUTPUT_HIGH); + pinMode(ENABLE_PINS[6], OUTPUT_HIGH); +#endif } // Arduino initialise and loop functions @@ -1979,18 +1988,21 @@ void Platform::InitialiseInterrupts() // 1.067us resolution on the Duet WiFi (120MHz clock) // 0.853us resolution on the SAM E70 (150MHz clock) pmc_set_writeprotect(false); - pmc_enable_periph_clk((uint32_t) STEP_TC_IRQN); + pmc_enable_periph_clk((uint32_t) STEP_TC_ID); tc_init(STEP_TC, STEP_TC_CHAN, TC_CMR_WAVE | TC_CMR_WAVSEL_UP | TC_CMR_TCCLKS_TIMER_CLOCK4 | TC_CMR_EEVT_XC0); // must set TC_CMR_EEVT nonzero to get RB compare interrupts STEP_TC->TC_CHANNEL[STEP_TC_CHAN].TC_IDR = ~(uint32_t)0; // interrupts disabled for now +#if SAM4S || SAME70 // if 16-bit TCs + STEP_TC->TC_CHANNEL[STEP_TC_CHAN].TC_IER = TC_IER_COVFS; // enable the overflow interrupt so that we can use it to extend the count to 32-bits +#endif tc_start(STEP_TC, STEP_TC_CHAN); tc_get_status(STEP_TC, STEP_TC_CHAN); // clear any pending interrupt - NVIC_SetPriority(STEP_TC_IRQN, NvicPriorityStep); // set high priority for this IRQ; it's time-critical + NVIC_SetPriority(STEP_TC_IRQN, NvicPriorityStep); // set priority for this IRQ NVIC_EnableIRQ(STEP_TC_IRQN); #if HAS_LWIP_NETWORKING - pmc_enable_periph_clk((uint32_t) NETWORK_TC_IRQN); + pmc_enable_periph_clk((uint32_t) NETWORK_TC_ID); # if SAME70 - // Timer interrupt to keep the networking timers running (called at 18Hz) + // Timer interrupt to keep the networking timers running (called at 18Hz, which is almost as low as we can get because the timer is 16-bit) tc_init(NETWORK_TC, NETWORK_TC_CHAN, TC_CMR_WAVE | TC_CMR_WAVSEL_UP_RC | TC_CMR_TCCLKS_TIMER_CLOCK4); const uint32_t rc = (VARIANT_MCK/128)/18; // 128 because we selected TIMER_CLOCK4 above (16-bit counter) # else @@ -4484,10 +4496,57 @@ void Platform::InitI2c() // Step pulse timer interrupt void STEP_TC_HANDLER() __attribute__ ((hot)); +#if SAM4S || SAME70 +// Static data used by step ISR +volatile uint32_t Platform::stepTimerPendingStatus = 0; // for holding status bits that we have read (and therefore cleared) but haven't serviced yet +volatile uint32_t Platform::stepTimerHighWord = 0; // upper 16 bits of step timer +#endif + void STEP_TC_HANDLER() { - uint32_t tcsr = STEP_TC->TC_CHANNEL[STEP_TC_CHAN].TC_SR; // read the status register, which clears the interrupt - tcsr &= STEP_TC->TC_CHANNEL[STEP_TC_CHAN].TC_IMR; // select only enabled interrupts +#if SAM4S || SAME70 + // On the SAM4 we need to check for overflow whenever we read the step clock counter, and that clears the status flags. + // So we store the un-serviced status flags. + for (;;) + { + uint32_t tcsr = STEP_TC->TC_CHANNEL[STEP_TC_CHAN].TC_SR | Platform::stepTimerPendingStatus; // read the status register, which clears the status bits, and or-in any pending status bits + tcsr &= STEP_TC->TC_CHANNEL[STEP_TC_CHAN].TC_IMR; // select only enabled interrupts + if (tcsr == 0) + { + break; + } + + if ((tcsr & TC_SR_COVFS) != 0) + { + Platform::stepTimerHighWord += (1u << 16); + Platform::stepTimerPendingStatus &= ~TC_SR_COVFS; + } + + if ((tcsr & TC_SR_CPAS) != 0) // the step interrupt uses RA compare + { + STEP_TC->TC_CHANNEL[STEP_TC_CHAN].TC_IDR = TC_IER_CPAS; // disable the interrupt + Platform::stepTimerPendingStatus &= ~TC_SR_CPAS; +#ifdef MOVE_DEBUG + ++numInterruptsExecuted; + lastInterruptTime = Platform::GetInterruptClocks(); +#endif + reprap.GetMove().Interrupt(); // execute the step interrupt + } + + if ((tcsr & TC_SR_CPBS) != 0) + { + STEP_TC->TC_CHANNEL[STEP_TC_CHAN].TC_IDR = TC_IER_CPBS; // disable the interrupt + Platform::stepTimerPendingStatus &= ~TC_SR_CPBS; +#ifdef SOFT_TIMER_DEBUG + ++numSoftTimerInterruptsExecuted; +#endif + SoftTimer::Interrupt(); + } + } +#else + uint32_t tcsr = STEP_TC->TC_CHANNEL[STEP_TC_CHAN].TC_SR; // read the status register, which clears the status bits, and or-in any pending status bits + tcsr &= STEP_TC->TC_CHANNEL[STEP_TC_CHAN].TC_IMR; // select only enabled interrupts + if ((tcsr & TC_SR_CPAS) != 0) // the step interrupt uses RA compare { STEP_TC->TC_CHANNEL[STEP_TC_CHAN].TC_IDR = TC_IER_CPAS; // disable the interrupt @@ -4506,13 +4565,41 @@ void STEP_TC_HANDLER() #endif SoftTimer::Interrupt(); } +#endif +} + +#if SAM4S || SAME70 + +// Get the interrupt clock count, when we know that interrupts are already disabled +// The TCs on the SAM4S and SAME70 are only 16 bits wide, so we maintain the upper 16 bits in software +/*static*/ uint32_t Platform::GetInterruptClocksInterruptsDisabled() +{ + uint32_t tcsr = STEP_TC->TC_CHANNEL[STEP_TC_CHAN].TC_SR; // get the status to see whether there is an overflow + tcsr &= STEP_TC->TC_CHANNEL[STEP_TC_CHAN].TC_IMR; // clear any bits that don't generate interrupts + uint32_t lowWord = STEP_TC->TC_CHANNEL[STEP_TC_CHAN].TC_CV; // get the timer low word + uint32_t highWord = stepTimerHighWord; // get the volatile high word + if ((tcsr & TC_SR_COVFS) != 0) // if the timer has overflowed + { + highWord += (1u << 16); // overflow is pending, so increment the high word + stepTimerHighWord = highWord; // and save it + tcsr &= ~TC_SR_COVFS; // we handled the overflow, don't do it again + lowWord = STEP_TC->TC_CHANNEL[STEP_TC_CHAN].TC_CV; // read the low word again in case the overflow occurred just after we read it the first time + } + if (tcsr != 0) // if there were any other pending status bits that generate interrupts + { + stepTimerPendingStatus |= tcsr; // save the other pending bits + NVIC_SetPendingIRQ(STEP_TC_IRQN); // set step timer interrupt pending + } + return (lowWord & 0x0000FFFF) | highWord; } +#endif + // Schedule an interrupt at the specified clock count, or return true if that time is imminent or has passed already. /*static*/ bool Platform::ScheduleStepInterrupt(uint32_t tim) { const irqflags_t flags = cpu_irq_save(); - const int32_t diff = (int32_t)(tim - GetInterruptClocks()); // see how long we have to go + const int32_t diff = (int32_t)(tim - GetInterruptClocksInterruptsDisabled()); // see how long we have to go if (diff < (int32_t)DDA::MinInterruptInterval) // if less than about 6us or already passed { cpu_irq_restore(flags); @@ -4539,13 +4626,16 @@ void STEP_TC_HANDLER() /*static*/ void Platform::DisableStepInterrupt() { STEP_TC->TC_CHANNEL[STEP_TC_CHAN].TC_IDR = TC_IER_CPAS; +#if SAM4S || SAME70 + stepTimerPendingStatus &= ~TC_SR_CPAS; +#endif } // Schedule an interrupt at the specified clock count, or return true if that time is imminent or has passed already. /*static*/ bool Platform::ScheduleSoftTimerInterrupt(uint32_t tim) { const irqflags_t flags = cpu_irq_save(); - const int32_t diff = (int32_t)(tim - GetInterruptClocks()); // see how long we have to go + const int32_t diff = (int32_t)(tim - GetInterruptClocksInterruptsDisabled()); // see how long we have to go if (diff < (int32_t)DDA::MinInterruptInterval) // if less than about 6us or already passed { cpu_irq_restore(flags); @@ -4570,6 +4660,9 @@ void STEP_TC_HANDLER() /*static*/ void Platform::DisableSoftTimerInterrupt() { STEP_TC->TC_CHANNEL[STEP_TC_CHAN].TC_IDR = TC_IER_CPBS; +#if SAM4S || SAME70 + stepTimerPendingStatus &= ~TC_SR_CPBS; +#endif } // Process a 1ms tick interrupt diff --git a/src/Platform.h b/src/Platform.h index 65f2475c..2ff3bb6e 100644 --- a/src/Platform.h +++ b/src/Platform.h @@ -331,8 +331,9 @@ public: const char* GetBoardString() const; // Timing - static uint32_t GetInterruptClocks() __attribute__ ((hot)); // Get the interrupt clock count - static bool ScheduleStepInterrupt(uint32_t tim) __attribute__ ((hot)); // Schedule an interrupt at the specified clock count, or return true if it has passed already + static uint32_t GetInterruptClocks() __attribute__ ((hot)); // Get the interrupt clock count + static uint32_t GetInterruptClocksInterruptsDisabled() __attribute__ ((hot)); // Get the interrupt clock count, when we know already that interrupts are disabled + static bool ScheduleStepInterrupt(uint32_t tim) __attribute__ ((hot)); // Schedule an interrupt at the specified clock count, or return true if it has passed already static void DisableStepInterrupt(); // Make sure we get no step interrupts static bool ScheduleSoftTimerInterrupt(uint32_t tim); // Schedule an interrupt at the specified clock count, or return true if it has passed already static void DisableSoftTimerInterrupt(); // Make sure we get no software timer interrupts @@ -600,9 +601,15 @@ public: // Misc void InitI2c(); - static uint8_t softwareResetDebugInfo; // extra info for debugging + static uint8_t softwareResetDebugInfo; // extra info for debugging -//------------------------------------------------------------------------------------------------------- +#if SAM4S || SAME70 + // Static data used by step ISR + static volatile uint32_t stepTimerPendingStatus; // for holding status bits that we have read (and therefore cleared) but haven't serviced yet + static volatile uint32_t stepTimerHighWord; // upper 16 bits of step timer +#endif + + //------------------------------------------------------------------------------------------------------- private: Platform(const Platform&); // private copy constructor to make sure we don't try to copy a Platform @@ -909,21 +916,18 @@ private: }; // Where the htm etc files are - inline const char* Platform::GetWebDir() const { return WEB_DIR; } // Where the gcodes are - inline const char* Platform::GetGCodeDir() const { return GCODE_DIR; } // Where the system files are - inline const char* Platform::GetSysDir() const { return SYS_DIR; @@ -1123,12 +1127,35 @@ inline float Platform::GetPressureAdvance(size_t extruder) const return (extruder < MaxExtruders) ? pressureAdvance[extruder] : 0.0; } +#if SAM4S || SAME70 // if the TCs are 16-bit + +// Get the interrupt clock count +/*static*/ inline uint32_t Platform::GetInterruptClocks() +{ + const irqflags_t flags = cpu_irq_save(); // ensure interrupts are disabled + const uint32_t rslt = GetInterruptClocksInterruptsDisabled(); + cpu_irq_restore(flags); // restore interrupt enable state + return rslt; +} + +// Function GetInterruptClocks() is quite long for these processors, so it is moved to Platform.cpp and no longer inlined + +#else // TCs are 32-bit + // Get the interrupt clock count /*static*/ inline uint32_t Platform::GetInterruptClocks() { return STEP_TC->TC_CHANNEL[STEP_TC_CHAN].TC_CV; } +// Get the interrupt clock count, when we know that interrupts are already disabled +/*static*/ inline uint32_t Platform::GetInterruptClocksInterruptsDisabled() +{ + return STEP_TC->TC_CHANNEL[STEP_TC_CHAN].TC_CV; +} + +#endif + // This is called by the tick ISR to get the raw Z probe reading to feed to the filter inline uint16_t Platform::GetRawZProbeReading() const { diff --git a/src/RADDS/Pins_RADDS.h b/src/RADDS/Pins_RADDS.h index b4b463d6..2c0ce4ad 100644 --- a/src/RADDS/Pins_RADDS.h +++ b/src/RADDS/Pins_RADDS.h @@ -177,68 +177,12 @@ const uint32_t IAP_FLASH_END = 0x000FFBFF; // don't touch the last 1KB, it's us #define NETWORK_TC_CHAN (1) #define NETWORK_TC_IRQN TC4_IRQn #define NETWORK_TC_HANDLER TC4_Handler +#define NETWORK_TC_ID ID_TC4 #define STEP_TC (TC1) #define STEP_TC_CHAN (0) #define STEP_TC_IRQN TC3_IRQn #define STEP_TC_HANDLER TC3_Handler - - -#ifdef LCD_UI - -// Hardware I2C support for LCD -#define TWI_ID ID_TWI1 - -#define FEATURE_CONTROLLER 7 -#define UI_PAGES_DURATION 4000 -#define UI_ANIMATION 0 -#define UI_SPEEDDEPENDENT_POSITIONING 0 -#define UI_DISABLE_AUTO_PAGESWITCH 1 -#define UI_AUTORETURN_TO_MENU_AFTER 30000 -#define UI_ENCODER_SPEED 1 -#define UI_KEY_BOUNCETIME 10 -#define UI_KEY_FIRST_REPEAT 500 -#define UI_KEY_REDUCE_REPEAT 50 -#define UI_KEY_MIN_REPEAT 50 -#define FEATURE_BEEPER 1 -#define UI_START_SCREEN_DELAY 1000 - -#define CASE_LIGHTS_PIN -1 -#define SPI_PIN 77 -#define SPI_CHAN 0 -#define UI_HAS_KEYS 1 -#define UI_HAS_BACK_KEY 1 -#define UI_DISPLAY_TYPE 1 -#define UI_DISPLAY_CHARSET 1 -#define BEEPER_TYPE 1 -#define UI_COLS 20 -#define UI_ROWS 4 -#define BEEPER_PIN 41 -#define UI_DISPLAY_RS_PIN 42 -#define UI_DISPLAY_RW_PIN -1 -#define UI_DISPLAY_ENABLE_PIN 43 -#define UI_DISPLAY_D0_PIN 44 -#define UI_DISPLAY_D1_PIN 45 -#define UI_DISPLAY_D2_PIN 46 -#define UI_DISPLAY_D3_PIN 47 -#define UI_DISPLAY_D4_PIN 44 -#define UI_DISPLAY_D5_PIN 45 -#define UI_DISPLAY_D6_PIN 46 -#define UI_DISPLAY_D7_PIN 47 -#define UI_ENCODER_A 52 -#define UI_ENCODER_B 50 -#define UI_ENCODER_CLICK 48 -#define UI_RESET_PIN -1 -#define UI_DELAYPERCHAR 40 -#define UI_INVERT_MENU_DIRECTION 0 -#define UI_BUTTON_BACK 71 - -// Beeper sound definitions for short beeps during key actions and longer -// beeps for important actions. Parameters are the delay in microseconds -// followed by the number of repetitions. Values must be in range 1..255 -#define BEEPER_SHORT_SEQUENCE 2,2 -#define BEEPER_LONG_SEQUENCE 8,8 - -#endif // LCD_UI +#define STEP_TC_ID ID_TC3 #endif diff --git a/src/SAME70_TEST/Pins_SAME70_TEST.h b/src/SAME70_TEST/Pins_SAME70_TEST.h index 4de9fecd..6c8f2b6b 100644 --- a/src/SAME70_TEST/Pins_SAME70_TEST.h +++ b/src/SAME70_TEST/Pins_SAME70_TEST.h @@ -169,10 +169,12 @@ constexpr Pin SamCsPin = 20; // SPI NPCS pin, input from WiFi module #define NETWORK_TC_CHAN (0) #define NETWORK_TC_IRQN TC0_IRQn #define NETWORK_TC_HANDLER TC0_Handler +#define NETWORK_TC_ID ID_TC0 #define STEP_TC (TC0) #define STEP_TC_CHAN (1) #define STEP_TC_IRQN TC1_IRQn #define STEP_TC_HANDLER TC1_Handler +#define STEP_TC_ID ID_TC1 #endif diff --git a/src/Version.h b/src/Version.h index 4dde57ac..978f6f6f 100644 --- a/src/Version.h +++ b/src/Version.h @@ -13,7 +13,7 @@ #endif #ifndef DATE -# define DATE "2018-02-05" +# define DATE "2018-02-07 build 8" #endif #define AUTHORS "reprappro, dc42, chrishamm, t3p3, dnewman" |