diff --git a/Images.md b/Images.md index 9409647..3f63d05 100644 --- a/Images.md +++ b/Images.md @@ -43,4 +43,7 @@ \ ![ёRadio](images/img20.jpg)\ \ -![ёRadio](images/img21.jpg) +![ёRadio](images/img21.jpg)\ +\ +![ёRadio](images/img22.jpg) + diff --git a/README.md b/README.md index b49e6ab..52b5e9a 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ https://aliexpress.com/item/32965676064.html - or **ILI9341** 3.2'320x240 SPI https://aliexpress.com/item/33048191074.html - or **SSD1305 (SSD1309)** 2.4' 128x64 SPI https://aliexpress.com/item/32950307344.html - or **SH1107** 0.96' 128x64 I2C https://aliexpress.com/item/4000551696674.html +- or **GC9106** 0.96' 160x80 SPI https://aliexpress.com/item/32947890530.html ##### Controls - Three tact buttons https://www.aliexpress.com/item/32907144687.html @@ -280,6 +281,11 @@ Work is in progress... --- ## Version history +#### v0.6.120 +- added support for GC9106 160x80 SPI displays +- fixed compiling error with DSP_DUMMY option +- fixed compiling error with DSP_1602I2C / DSP_1602 option + #### v0.6.110 - the logic of division by cores has been changed - fixed choppy playback (again) diff --git a/exsamples/myoptions.h b/exsamples/myoptions.h index b88cf0c..74ca34b 100644 --- a/exsamples/myoptions.h +++ b/exsamples/myoptions.h @@ -89,9 +89,10 @@ The connection tables are located here https://github.com/e2002/yoradio#connecti /* Other settings. */ //#define DTYPE INITR_BLACKTAB /* ST7735 display submodel */ /* Could be one of: */ - /* INITR_BLACKTAB 1.8' https://aliexpress.ru/item/1005002822797745.html */ + /* INITR_BLACKTAB 1.8' https://aliexpress.com/item/1005002822797745.html */ /* (See this note If INITR_BLACKTAB have a noisy line on one side of the screen https://github.com/e2002/yoradio#note-if-initr_blacktab-dsp-have-a-noisy-line-on-one-side-of-the-screen-then-in-adafruit_st7735cpp ) */ - /* INITR_144GREENTAB // 1.44' https://aliexpress.ru/item/1005002822797745.html */ + /* INITR_144GREENTAB // 1.44' https://aliexpress.com/item/1005002822797745.html */ + /* INITR_MINI160x80 // 0.96' 160x80 ST7735S https://???? */ /* INITR_GREENTAB */ /* INITR_REDTAB */ //#define LED_BUILTIN 2 /* LED Pin */ diff --git a/images/img22.jpg b/images/img22.jpg new file mode 100644 index 0000000..9b9203e Binary files /dev/null and b/images/img22.jpg differ diff --git a/yoRadio/display.cpp b/yoRadio/display.cpp index 9de493a..603106e 100644 --- a/yoRadio/display.cpp +++ b/yoRadio/display.cpp @@ -274,7 +274,11 @@ void Display::swichMode(displayMode_e newmode) { #endif } if (newmode == VOL) { +#ifdef IP_INST_VOL + dsp.frameTitle(WiFi.localIP().toString().c_str()); +#else dsp.frameTitle("VOLUME"); +#endif } if (newmode == LOST) { dsp.frameTitle("* LOST *"); @@ -487,7 +491,7 @@ void Display::time(bool redraw) { TaskHandle_t drawVolumeTaskHandle = NULL; bool taskVDone = true; void drawVolumeTask( void * pvParameters ) { - delay(20); /* but it's too fast 0__o */ + delay(50); /* but it's too fast 0__o */ dsp.drawVolumeBar(true); taskVDone = true; vTaskDelete( NULL ); diff --git a/yoRadio/display.h b/yoRadio/display.h index 4f9717d..0cd4bee 100644 --- a/yoRadio/display.h +++ b/yoRadio/display.h @@ -29,6 +29,8 @@ #include "src/displays/displaySH1106.h" #elif DSP_MODEL==DSP_1602 #include "src/displays/displayLC1602.h" +#elif DSP_MODEL==DSP_GC9106 +#include "src/displays/displayGC9106.h" #elif DSP_MODEL==DSP_CUSTOM #include "src/displays/displayCustom.h" #endif diff --git a/yoRadio/options.h b/yoRadio/options.h index 6a19e3b..f50a830 100644 --- a/yoRadio/options.h +++ b/yoRadio/options.h @@ -1,7 +1,7 @@ #ifndef options_h #define options_h -#define VERSION "0.6.110" +#define VERSION "0.6.120" /******************************************************* DO NOT EDIT THIS FILE. @@ -32,6 +32,7 @@ The connection tables are located here https://github.com/e2002/yoradio#connecti #define DSP_SSD1305 10 // SSD1305 and SSD1309 128x64 SPI https://aliexpress.com/item/32950307344.html #define DSP_SH1107 11 // https://aliexpress.com/item/4000551696674.html #define DSP_1602 12 // https://aliexpress.com/item/32685016568.html +#define DSP_GC9106 13 // 0.96' 160x80 (looks like ST7735S, but it's not him) https://aliexpress.com/item/32947890530.html #define DSP_CUSTOM 101 // your display #ifndef DSP_MODEL diff --git a/yoRadio/src/Adafruit_GC9106Ex/Adafruit_GC9106Ex.cpp b/yoRadio/src/Adafruit_GC9106Ex/Adafruit_GC9106Ex.cpp new file mode 100644 index 0000000..09e829b --- /dev/null +++ b/yoRadio/src/Adafruit_GC9106Ex/Adafruit_GC9106Ex.cpp @@ -0,0 +1,312 @@ +/*! + * These displays use SPI to communicate, 4 or 5 pins are required + * to interface (RST is optional). + * + * Adafruit invests time and resources providing this open source code, + * please support Adafruit and open-source hardware by purchasing + * products from Adafruit! + * + * @section dependencies Dependencies + * + * This library depends on + * Adafruit_GFX being present on your system. Please make sure you have + * installed the latest version before using this library. + * + * @section author Author + * + * Written by Limor "ladyada" Fried for Adafruit Industries. + * + * @section license License + * + * BSD license, all text here must be included in any redistribution. + * + */ + +#include "Adafruit_GC9106Ex.h" +#ifndef ARDUINO_STM32_FEATHER +#include "pins_arduino.h" +#ifndef RASPI +#include "wiring_private.h" +#endif +#endif +#include + +#if defined(ARDUINO_ARCH_ARC32) || defined(ARDUINO_MAXIM) +#define SPI_DEFAULT_FREQ 16000000 +// Teensy 3.0, 3.1/3.2, 3.5, 3.6 +#elif defined(__MK20DX128__) || defined(__MK20DX256__) || \ + defined(__MK64FX512__) || defined(__MK66FX1M0__) +#define SPI_DEFAULT_FREQ 40000000 +#elif defined(__AVR__) || defined(TEENSYDUINO) +#define SPI_DEFAULT_FREQ 8000000 +#elif defined(ESP8266) || defined(ESP32) +#define SPI_DEFAULT_FREQ 40000000 +#elif defined(RASPI) +#define SPI_DEFAULT_FREQ 80000000 +#elif defined(ARDUINO_ARCH_STM32F1) +#define SPI_DEFAULT_FREQ 36000000 +#else +#define SPI_DEFAULT_FREQ 24000000 ///< Default SPI data clock frequency +#endif + +#define MADCTL_MY 0x80 ///< Bottom to top +#define MADCTL_MX 0x40 ///< Right to left +#define MADCTL_MV 0x20 ///< Reverse Mode +#define MADCTL_ML 0x10 ///< LCD refresh Bottom to top +#define MADCTL_RGB 0x00 ///< Red-Green-Blue pixel order +#define MADCTL_BGR 0x08 ///< Blue-Green-Red pixel order +#define MADCTL_MH 0x04 ///< LCD refresh right to left + +/**************************************************************************/ +/*! + @brief Instantiate Adafruit GC9106 driver with software SPI + @param cs Chip select pin # + @param dc Data/Command pin # + @param mosi SPI MOSI pin # + @param sclk SPI Clock pin # + @param rst Reset pin # (optional, pass -1 if unused) + @param miso SPI MISO pin # (optional, pass -1 if unused) +*/ +/**************************************************************************/ +Adafruit_GC9106Ex::Adafruit_GC9106Ex(int8_t cs, int8_t dc, int8_t mosi, + int8_t sclk, int8_t rst, int8_t miso) + : Adafruit_SPITFT(GC9106_TFTWIDTH, GC9106_TFTHEIGHT, cs, dc, mosi, sclk, + rst, miso) {} + +/**************************************************************************/ +/*! + @brief Instantiate Adafruit GC9106 driver with hardware SPI using the + default SPI peripheral. + @param cs Chip select pin # (OK to pass -1 if CS tied to GND). + @param dc Data/Command pin # (required). + @param rst Reset pin # (optional, pass -1 if unused). +*/ +/**************************************************************************/ +Adafruit_GC9106Ex::Adafruit_GC9106Ex(int8_t cs, int8_t dc, int8_t rst) + : Adafruit_SPITFT(GC9106_TFTWIDTH, GC9106_TFTHEIGHT, cs, dc, rst) {} + +#if !defined(ESP8266) +/**************************************************************************/ +/*! + @brief Instantiate Adafruit GC9106 driver with hardware SPI using + a specific SPI peripheral (not necessarily default). + @param spiClass Pointer to SPI peripheral (e.g. &SPI or &SPI1). + @param dc Data/Command pin # (required). + @param cs Chip select pin # (optional, pass -1 if unused and + CS is tied to GND). + @param rst Reset pin # (optional, pass -1 if unused). +*/ +/**************************************************************************/ +Adafruit_GC9106Ex::Adafruit_GC9106Ex(SPIClass *spiClass, int8_t dc, int8_t cs, + int8_t rst) + : Adafruit_SPITFT(GC9106_TFTWIDTH, GC9106_TFTHEIGHT, spiClass, cs, dc, + rst) {} +#endif // end !ESP8266 + +/**************************************************************************/ +/*! + @brief Instantiate Adafruit GC9106 driver using parallel interface. + @param busWidth If tft16 (enumeration in Adafruit_SPITFT.h), is a + 16-bit interface, else 8-bit. + @param d0 Data pin 0 (MUST be a byte- or word-aligned LSB of a + PORT register -- pins 1-n are extrapolated from this). + @param wr Write strobe pin # (required). + @param dc Data/Command pin # (required). + @param cs Chip select pin # (optional, pass -1 if unused and CS + is tied to GND). + @param rst Reset pin # (optional, pass -1 if unused). + @param rd Read strobe pin # (optional, pass -1 if unused). +*/ +/**************************************************************************/ +Adafruit_GC9106Ex::Adafruit_GC9106Ex(tftBusWidth busWidth, int8_t d0, int8_t wr, + int8_t dc, int8_t cs, int8_t rst, int8_t rd) + : Adafruit_SPITFT(GC9106_TFTWIDTH, GC9106_TFTHEIGHT, busWidth, d0, wr, dc, + cs, rst, rd) {} + +// clang-format off +static const uint8_t PROGMEM initcmd[] = { + // (COMMAND_BYTE), n, data_bytes.... + 0x01, 0x80, // Soft reset, then delay 150 ms + (0x28), 0, //Display Off + (0xfe), 0, //GC9106_ENAB1 + (0xfe), 0, + (0xfe), 0, + (0xef), 0, //GC9106_ENAB2 + (0xb3), 1, 0x03, //GC9106_ACCESS_F0_F1 + (0x36), 1, 0xd8, //USER_MADCTL + (0x3a), 1, 0x05, //USER_COLMOD + (0xb6), 1, 0x11, //GC9106_ACCESS_A3_AA_AC + (0xac), 1, 0x0b, //undocumented + (0xb4), 1, 0x21, //GC9106_INVCTR + (0xb0), 1, 0x00, //GC9106_ACCESS_C0_C1_C2_C3_C6 + (0xb2), 1, 0x00, //GC9106_ACCESS_E4_EB + (0xb1), 1, 0xc0, //GC9106_ACCESS_E6_E7 + (0xe6), 2, 0x50, 0x43, //GC9106_VREG1 [50 43] + (0xe7), 2, 0x56, 0x43, //GC9106_VREG2 [38 43] + (0xF0), 14, 0x1f, 0x41, 0x1B, 0x55, 0x36, 0x3d, 0x3e, 0x0, 0x16, 0x08, 0x09, 0x15, 0x14, 0xf, + (0xF1), 14, 0x1f, 0x41, 0x1B, 0x55, 0x36, 0x3d, 0x3e, 0x0, 0x16, 0x08, 0x09, 0x15, 0x14, 0xf, + (0xfe), 0, //GC9106_ENAB1 + (0xff), 0, //??? + (0x35), 1, 0x00, //USER_TEON + (0x44), 1, 0x00, //GC9106_SETSCANLINE + (0x11), 0x80, //USER_SLPOUT + (0x29), 0, //USER_DISPON + (0x2A), 4, /***Set Column Address***/ 0x00, 0x18, 0x00, 0x67, + (0x2B), 4, /***Set Page Address***/ 0x00, 0x00, 0x00, 0x9f, + //(0x2c), 0, //USER_MEMWR + 0x11, 0x80, // Exit Sleep, then delay 150 ms + 0x29, 0x80, // Main screen turn on, delay 150 ms + 0x00 // End of list +}; +// clang-format on + +/**************************************************************************/ +/*! + @brief Initialize GC9106 chip + Connects to the GC9106 over SPI and sends initialization procedure commands + @param freq Desired SPI clock frequency +*/ +/**************************************************************************/ +void Adafruit_GC9106Ex::begin(uint32_t freq) { + + if (!freq) + freq = SPI_DEFAULT_FREQ; + freq = 8000000; + initSPI(freq); + + if (_rst < 0) { // If no hardware reset pin... + sendCommand(GC9106_SWRESET); // Engage software reset + delay(150); + } + + uint8_t cmd, x, numArgs; + const uint8_t *addr = initcmd; + while ((cmd = pgm_read_byte(addr++)) > 0) { + x = pgm_read_byte(addr++); + numArgs = x & 0x7F; + sendCommand(cmd, addr, numArgs); + addr += numArgs; + if (x & 0x80) + delay(150); + } + + _width = GC9106_TFTWIDTH; + _height = GC9106_TFTHEIGHT; + _colstart =24; + _rowstart = 0; +} + +/**************************************************************************/ +/*! + @brief Set origin of (0,0) and orientation of TFT display + @param m The index for rotation, from 0-3 inclusive +*/ +/**************************************************************************/ +void Adafruit_GC9106Ex::setRotation(uint8_t m) { + rotation = m % 4; // can't be higher than 3 + switch (rotation) { + case 0: + m = (MADCTL_MX | MADCTL_ML | MADCTL_BGR); + _width = GC9106_TFTWIDTH; + _height = GC9106_TFTHEIGHT; + _xstart = _colstart; + _ystart = _rowstart; + break; + case 1: + m = (MADCTL_MV | MADCTL_ML | MADCTL_BGR); + _width = GC9106_TFTHEIGHT; + _height = GC9106_TFTWIDTH; + _ystart = _colstart; + _xstart = _rowstart; + break; + case 2: + m = (MADCTL_MY | MADCTL_BGR); + _width = GC9106_TFTWIDTH; + _height = GC9106_TFTHEIGHT; + _xstart = _colstart; + _ystart = _rowstart; + break; + case 3: + m = (MADCTL_MX | MADCTL_MY | MADCTL_MV | MADCTL_BGR); + _width = GC9106_TFTHEIGHT; + _height = GC9106_TFTWIDTH; + _ystart = _colstart; + _xstart = _rowstart; + break; + } + m ^= 0x80; //.kbv + sendCommand(GC9106_MADCTL, &m, 1); + setScrollMargins(0, 0); //.kbv + scrollTo(0); +} + +/**************************************************************************/ +/*! + @brief Enable/Disable display color inversion + @param invert True to invert, False to have normal color +*/ +/**************************************************************************/ +void Adafruit_GC9106Ex::invertDisplay(bool invert) { + sendCommand(invert ? GC9106_INVON : GC9106_INVOFF); +} + +/**************************************************************************/ +/*! + @brief Scroll display memory + @param y How many pixels to scroll display by +*/ +/**************************************************************************/ +void Adafruit_GC9106Ex::scrollTo(uint16_t y) { + uint8_t data[2]; + data[0] = y >> 8; + data[1] = y & 0xff; + sendCommand(GC9106_VSCRSADD, (uint8_t *)data, 2); +} + +/**************************************************************************/ +/*! + @brief Set the height of the Top and Bottom Scroll Margins + @param top The height of the Top scroll margin + @param bottom The height of the Bottom scroll margin + */ +/**************************************************************************/ +void Adafruit_GC9106Ex::setScrollMargins(uint16_t top, uint16_t bottom) { + // TFA+VSA+BFA must equal 480 + if (top + bottom <= GC9106_TFTHEIGHT) { + uint16_t middle = GC9106_TFTHEIGHT - top - bottom; + uint8_t data[6]; + data[0] = top >> 8; + data[1] = top & 0xff; + data[2] = middle >> 8; + data[3] = middle & 0xff; + data[4] = bottom >> 8; + data[5] = bottom & 0xff; + sendCommand(GC9106_VSCRDEF, (uint8_t *)data, 6); + } +} + +/**************************************************************************/ +/*! + @brief Set the "address window" - the rectangle we will write to RAM with + the next chunk of SPI data writes. The GC9106 will automatically wrap + the data as each row is filled + @param x1 TFT memory 'x' origin + @param y1 TFT memory 'y' origin + @param w Width of rectangle + @param h Height of rectangle +*/ +/**************************************************************************/ +void Adafruit_GC9106Ex::setAddrWindow(uint16_t x1, uint16_t y1, uint16_t w, + uint16_t h) { + x1 += _xstart; + y1 += _ystart; + uint16_t x2 = (x1 + w - 1), y2 = (y1 + h - 1); + writeCommand(GC9106_CASET); // Column address set + SPI_WRITE16(x1); + SPI_WRITE16(x2); + writeCommand(GC9106_PASET); // Row address set + SPI_WRITE16(y1); + SPI_WRITE16(y2); + writeCommand(GC9106_RAMWR); // Write to RAM +} + diff --git a/yoRadio/src/Adafruit_GC9106Ex/Adafruit_GC9106Ex.h b/yoRadio/src/Adafruit_GC9106Ex/Adafruit_GC9106Ex.h new file mode 100644 index 0000000..e9b91fe --- /dev/null +++ b/yoRadio/src/Adafruit_GC9106Ex/Adafruit_GC9106Ex.h @@ -0,0 +1,130 @@ +/* + * Adafruit_GC9106_kbv class inherits from Adafruit_GFX, Adafruit_SPITFT class and the Arduino Print class. + * Adafruit_GC9106_kbv written by David Prentice + * + * Any use of Adafruit_GC9106_kbv class and examples is dependent on Adafruit and Arduino licenses + * The license texts are in the accompanying license.txt file + */ + +/*! + * @file Adafruit_GC9106_kbv.h + * + * These displays use SPI to communicate, 4 or 5 pins are required + * to interface (RST is optional IF YOU ADD A PULLUP RESISTOR). + * + * Adafruit invests time and resources providing this open source code, + * please support Adafruit and open-source hardware by purchasing + * products from Adafruit! + * + * + * This library depends on + * Adafruit_GFX being present on your system. Please make sure you have + * installed the latest version before using this library. + * + * Adafruit_GFX, Adafruit_SPITFT written by Limor "ladyada" Fried for Adafruit Industries. + * + * BSD license, all text here must be included in any redistribution. + * + */ + +#ifndef _ADAFRUIT_GC9106_EX_H_ +#define _ADAFRUIT_GC9106_EX_H_ + +#include "Adafruit_GFX.h" +#include "Arduino.h" +#include "Print.h" +#include +#include +#include + +#define GC9106_TFTWIDTH 80 ///< GC9106 max TFT width +#define GC9106_TFTHEIGHT 160 ///< GC9106 max TFT height + +#define GC9106_NOP 0x00 ///< No-op register +#define GC9106_SWRESET 0x01 ///< Software reset register +#define GC9106_RDDID 0x04 ///< Read display identification information +#define GC9106_RDDST 0x09 ///< Read Display Status + +#define GC9106_SLPIN 0x10 ///< Enter Sleep Mode +#define GC9106_SLPOUT 0x11 ///< Sleep Out +#define GC9106_PTLON 0x12 ///< Partial Mode ON +#define GC9106_NORON 0x13 ///< Normal Display Mode ON + +#define GC9106_RDMODE 0x0A ///< Read Display Power Mode +#define GC9106_RDMADCTL 0x0B ///< Read Display MADCTL +#define GC9106_RDPIXFMT 0x0C ///< Read Display Pixel Format +#define GC9106_RDIMGFMT 0x0D ///< Read Display Image Format +#define GC9106_RDSELFDIAG 0x0F ///< Read Display Self-Diagnostic Result + +#define GC9106_INVOFF 0x20 ///< Display Inversion OFF +#define GC9106_INVON 0x21 ///< Display Inversion ON +#define GC9106_GAMMASET 0x26 ///< Gamma Set +#define GC9106_DISPOFF 0x28 ///< Display OFF +#define GC9106_DISPON 0x29 ///< Display ON + +#define GC9106_CASET 0x2A ///< Column Address Set +#define GC9106_PASET 0x2B ///< Page Address Set +#define GC9106_RAMWR 0x2C ///< Memory Write +#define GC9106_RAMRD 0x2E ///< Memory Read + +#define GC9106_PTLAR 0x30 ///< Partial Area +#define GC9106_VSCRDEF 0x33 ///< Vertical Scrolling Definition +#define GC9106_MADCTL 0x36 ///< Memory Access Control +#define GC9106_VSCRSADD 0x37 ///< Vertical Scrolling Start Address +#define GC9106_PIXFMT 0x3A ///< COLMOD: Pixel Format Set + + +// Color definitions +#define TFT_BLACK 0x0000 ///< 0, 0, 0 +#define TFT_NAVY 0x000F ///< 0, 0, 123 +#define TFT_DARKGREEN 0x03E0 ///< 0, 125, 0 +#define TFT_DARKCYAN 0x03EF ///< 0, 125, 123 +#define TFT_MAROON 0x7800 ///< 123, 0, 0 +#define TFT_PURPLE 0x780F ///< 123, 0, 123 +#define TFT_OLIVE 0x7BE0 ///< 123, 125, 0 +#define TFT_LIGHTGREY 0xC618 ///< 198, 195, 198 +#define TFT_DARKGREY 0x7BEF ///< 123, 125, 123 +#define TFT_BLUE 0x001F ///< 0, 0, 255 +#define TFT_GREEN 0x07E0 ///< 0, 255, 0 +#define TFT_CYAN 0x07FF ///< 0, 255, 255 +#define TFT_RED 0xF800 ///< 255, 0, 0 +#define TFT_MAGENTA 0xF81F ///< 255, 0, 255 +#define TFT_YELLOW 0xFFE0 ///< 255, 255, 0 +#define TFT_WHITE 0xFFFF ///< 255, 255, 255 +#define TFT_ORANGE 0xFD20 ///< 255, 165, 0 +#define TFT_GREENYELLOW 0xAFE5 ///< 173, 255, 41 +#define TFT_PINK 0xFC18 ///< 255, 130, 198 + +/**************************************************************************/ +/*! +@brief Class to manage hardware interface with GC9106 chipset +*/ +/**************************************************************************/ + +class Adafruit_GC9106Ex : public Adafruit_SPITFT { +public: + Adafruit_GC9106Ex(int8_t _CS, int8_t _DC, int8_t _MOSI, int8_t _SCLK, + int8_t _RST = -1, int8_t _MISO = -1); + Adafruit_GC9106Ex(int8_t _CS, int8_t _DC, int8_t _RST = -1); +#if !defined(ESP8266) + Adafruit_GC9106Ex(SPIClass *spiClass, int8_t dc, int8_t cs = -1, + int8_t rst = -1); +#endif // end !ESP8266 + Adafruit_GC9106Ex(tftBusWidth busWidth, int8_t d0, int8_t wr, int8_t dc, + int8_t cs = -1, int8_t rst = -1, int8_t rd = -1); + + void begin(uint32_t freq = 0); + void setRotation(uint8_t r); + void invertDisplay(bool i); + void scrollTo(uint16_t y); + void setScrollMargins(uint16_t top, uint16_t bottom); + + // Transaction API not used by GFX + void setAddrWindow(uint16_t x, uint16_t y, uint16_t w, uint16_t h); + +protected: + uint8_t _colstart = 0, ///< Some displays need this changed to offset + _rowstart = 0; ///< Some displays need this changed to offset +}; + +#endif // _ADAFRUIT_GC9106H_ diff --git a/yoRadio/src/displays/displayDummy.h b/yoRadio/src/displays/displayDummy.h index 5852baf..9a710fc 100644 --- a/yoRadio/src/displays/displayDummy.h +++ b/yoRadio/src/displays/displayDummy.h @@ -10,6 +10,11 @@ #define PLMITEMLENGHT 40 #define PLMITEMHEIGHT 22 +#if !defined(SCROLLDELTA) || !defined(SCROLLTIME) +#define SCROLLDELTA 3 +#define SCROLLTIME 60 +#endif + class DspCore { public: DspCore(); diff --git a/yoRadio/src/displays/displayGC9106.cpp b/yoRadio/src/displays/displayGC9106.cpp new file mode 100644 index 0000000..64e55e8 --- /dev/null +++ b/yoRadio/src/displays/displayGC9106.cpp @@ -0,0 +1,346 @@ +#include "../../options.h" +#if DSP_MODEL==DSP_GC9106 + +#include "displayGC9106.h" +#include +#include "fonts/bootlogo40.h" +#include "../../player.h" +#include "../../config.h" +#include "../../network.h" + +#ifndef DEF_SPI_FREQ +#define DEF_SPI_FREQ 16000000UL /* set it to 0 for system default */ +#endif + +DspCore::DspCore(): Adafruit_GC9106Ex(TFT_CS, TFT_DC, TFT_RST) { + +} + +char* DspCore::utf8Rus(const char* str, bool uppercase) { + int index = 0; + static char strn[BUFLEN]; + bool E = false; + strlcpy(strn, str, BUFLEN); + if (uppercase) { + bool next = false; + for (char *iter = strn; *iter != '\0'; ++iter) + { + if (E) { + E = false; + continue; + } + byte rus = (byte) * iter; + if (rus == 208 && (byte) * (iter + 1) == 129) { // ёКостыли + *iter = (char)209; + *(iter + 1) = (char)145; + E = true; + continue; + } + if (rus == 209 && (byte) * (iter + 1) == 145) { + *iter = (char)209; + *(iter + 1) = (char)145; + E = true; + continue; + } + if (next) { + if (rus >= 128 && rus <= 143) *iter = (char)(rus + 32); + if (rus >= 176 && rus <= 191) *iter = (char)(rus - 32); + next = false; + } + if (rus == 208) next = true; + if (rus == 209) { + *iter = (char)208; + next = true; + } + *iter = toupper(*iter); + } + } + while (strn[index]) + { + if (strn[index] >= 0xBF) + { + switch (strn[index]) { + case 0xD0: { + if (strn[index + 1] == 0x81) { + strn[index] = 0xA8; + break; + } + if (strn[index + 1] >= 0x90 && strn[index + 1] <= 0xBF) strn[index] = strn[index + 1] + 0x30; + break; + } + case 0xD1: { + if (strn[index + 1] == 0x91) { + //strn[index] = 0xB7; + strn[index] = 0xB8; + break; + } + if (strn[index + 1] >= 0x80 && strn[index + 1] <= 0x8F) strn[index] = strn[index + 1] + 0x70; + break; + } + } + int sind = index + 2; + while (strn[sind]) { + strn[sind - 1] = strn[sind]; + sind++; + } + strn[sind - 1] = 0; + } + index++; + } + return strn; +} + +void DspCore::apScreen() { + setTextSize(1); + setTextColor(TFT_FG, TFT_BG); + setCursor(TFT_FRAMEWDT, TFT_FRAMEWDT + 2 * TFT_LINEHGHT); + print("AP NAME: "); + print(apSsid); + setCursor(TFT_FRAMEWDT, TFT_FRAMEWDT + 3 * TFT_LINEHGHT); + print("PASSWORD: "); + print(apPassword); + setTextColor(SILVER, TFT_BG); + setCursor(TFT_FRAMEWDT, 107); + print("SETTINGS PAGE ON: "); + setCursor(TFT_FRAMEWDT, 117); + print("http://"); + print(WiFi.softAPIP().toString().c_str()); + print("/"); +} + +void DspCore::initD(uint16_t &screenwidth, uint16_t &screenheight) { + begin(DEF_SPI_FREQ); + cp437(true); + invertDisplay(!TFT_INVERT); + fillScreen(TFT_BG); + setRotation(TFT_ROTATE); + setTextWrap(false); + screenwidth = width(); + screenheight = height(); + swidth = screenwidth; + sheight = screenheight; + setClockBounds(); +} + +void DspCore::drawLogo() { + drawRGBBitmap((swidth - 62) / 2, 5, bootlogo40, 62, 40); +} + +// http://greekgeeks.net/#maker-tools_convertColor +#define CLR_ITEM1 0x52AA +#define CLR_ITEM2 0x39C7 +#define CLR_ITEM3 0x18E3 + +void DspCore::drawPlaylist(uint16_t currentItem, char* currentItemText) { + for (byte i = 0; i < PLMITEMS; i++) { + plMenu[i][0] = '\0'; + } + config.fillPlMenu(plMenu, currentItem - 3, PLMITEMS); + setTextSize(2); + int yStart = (sheight / 2 - PLMITEMHEIGHT / 2) - PLMITEMHEIGHT * (PLMITEMS - 1) / 2 + 3; + //fillRect(0, (sheight / 2 - PLMITEMHEIGHT / 2) - 1, swidth, PLMITEMHEIGHT + 2, TFT_LOGO); + for (byte i = 0; i < PLMITEMS; i++) { + if (abs(i - 3) == 3) setTextColor(CLR_ITEM3, TFT_BG); + if (abs(i - 3) == 2) setTextColor(CLR_ITEM2, TFT_BG); + if (abs(i - 3) == 1) setTextColor(CLR_ITEM1, TFT_BG); + if (i == 3) { + strlcpy(currentItemText, plMenu[i], PLMITEMLENGHT - 1); + } else { + setCursor(TFT_FRAMEWDT, yStart + i * PLMITEMHEIGHT); + fillRect(0, yStart + i * PLMITEMHEIGHT - 1, swidth, PLMITEMHEIGHT - 4, TFT_BG); + print(utf8Rus(plMenu[i], true)); + } + } +} + +void DspCore::clearDsp() { + fillScreen(TFT_BG); +} + +void DspCore::drawScrollFrame(uint16_t texttop, uint16_t textheight, uint16_t bg) { + fillRect(0, texttop, TFT_FRAMEWDT, textheight, bg); + fillRect(swidth - TFT_FRAMEWDT, texttop, TFT_FRAMEWDT, textheight, bg); +} + +void DspCore::getScrolBbounds(const char* text, const char* separator, byte textsize, uint16_t &tWidth, uint16_t &tHeight, uint16_t &sWidth) { + int16_t x1, y1; + uint16_t w, h; + setTextSize(textsize); + getTextBounds(text, 0, 0, &x1, &y1, &w, &h); + tWidth = w; + tHeight = h; + getTextBounds(separator, 0, 0, &x1, &y1, &w, &h); + sWidth = w; +} + +void DspCore::clearScroll(uint16_t texttop, uint16_t textheight, uint16_t bg) { + fillRect(0, texttop-2, swidth, textheight+3, bg); +} + +void DspCore::centerText(const char* text, byte y, uint16_t fg, uint16_t bg) { + int16_t x1, y1; + uint16_t w, h; + const char* txt = text; + getTextBounds(txt, 0, 0, &x1, &y1, &w, &h); + setTextColor(fg); + setCursor((swidth - w) / 2, y); + fillRect(0, y, swidth, h, bg); + print(txt); +} + +void DspCore::rightText(const char* text, byte y, uint16_t fg, uint16_t bg) { + int16_t x1, y1; + uint16_t w, h; + getTextBounds(text, 0, 0, &x1, &y1, &w, &h); + setTextColor(fg); + setCursor(swidth - w - TFT_FRAMEWDT, y); + fillRect(swidth - w - TFT_FRAMEWDT, y, w, h, bg); + print(text); +} + +void DspCore::displayHeapForDebug() { + +} + +void DspCore::setClockBounds(){ + setFont(&DS_DIGI28pt7b); + setTextSize(1); + getTextBounds("88:88", 0, 0, &x, &y, &cwidth, &cheight); + uint16_t header = TFT_FRAMEWDT + 4 * TFT_LINEHGHT; + uint16_t footer = TFT_FRAMEWDT * 2 + TFT_LINEHGHT + 5; + clockY = header + (sheight - header - footer) / 2 - cheight / 2 - 6; + setFont(); +} + +void DspCore::printClock(const char* timestr) { + +} + +byte DspCore::getPw(uint16_t ncwidth){ + byte pw = 6; + if(ncwidth<35) pw = 7; + if(ncwidth<20) pw = 8; + return pw; +} + +void DspCore::printClock(struct tm timeinfo, bool dots, bool redraw){ + char timeBuf[50] = { 0 }; + char tmpBuf[4] = { 0 }; + uint16_t ncwidth, ncheight; + strftime(timeBuf, sizeof(timeBuf), "%H %M", &timeinfo); + setTextSize(1); + setFont(&DS_DIGI28pt7b); + if(strstr(oldTimeBuf, timeBuf)==NULL || redraw){ + getTextBounds(oldTimeBuf, 0, 0, &x, &y, &wot, &hot); + setCursor((swidth - wot) / 2 - 4, clockY+28+6); + setTextColor(TFT_BG); + print(oldTimeBuf); + dot = (swidth - wot) / 2 - 4; + /* dots */ + strlcpy(tmpBuf, oldTimeBuf, 3); + getTextBounds(tmpBuf, 0, 0, &x, &y, &ncwidth, &ncheight); + dot = dot + ncwidth + getPw(ncwidth); + setCursor(dot, clockY+28+6); + print(":"); + /* dots */ + + strlcpy(oldTimeBuf, timeBuf, 20); + setTextSize(1); + getTextBounds(timeBuf, 0, 0, &x, &y, &ncwidth, &ncheight); + setTextColor(TFT_LOGO); + setCursor((swidth - ncwidth) / 2 - 4, clockY+28+6); + dot = (swidth - ncwidth) / 2 - 4; + setTextSize(1); + print(timeBuf); + /* dots */ + strftime(timeBuf, sizeof(timeBuf), "%H", &timeinfo); + getTextBounds(timeBuf, 0, 0, &x, &y, &ncwidth, &ncheight); + dot = dot + ncwidth + getPw(ncwidth); + /* dots */ + } + setCursor(dot, clockY+28+6); + setTextColor(dots?TFT_BG:TFT_LOGO); + print(":"); + setFont(); + yield(); +} + +#define VTOP TITLE_TOP1+6 + +void DspCore::drawVolumeBar(bool withNumber) { + int16_t vTop = sheight - TFT_FRAMEWDT - 2; + int16_t vWidth = swidth - TFT_FRAMEWDT * 2; + uint8_t ww = map(config.store.volume, 0, 254, 0, vWidth); + fillRect(TFT_FRAMEWDT, vTop, vWidth, 2, TFT_BG); + fillRect(TFT_FRAMEWDT, vTop, ww, 2, TFT_LOGO); + if (withNumber) { + setTextSize(1); + setTextColor(TFT_FG); + setFont(&DS_DIGI28pt7b); + char volstr[4]; + uint16_t wv, hv; + int16_t x1, y1; + sprintf(volstr, "%d", config.store.volume); + getTextBounds(volstr, 0, 0, &x1, &y1, &wv, &hv); + fillRect(TFT_FRAMEWDT, VTOP, swidth - TFT_FRAMEWDT / 2, hv + 3, TFT_BG); + setCursor((swidth - wv) / 2, VTOP + hv); + print(volstr); + setFont(); + } +} + +void DspCore::drawNextStationNum(uint16_t num) { + setTextSize(1); + setTextColor(TFT_FG); + setFont(&DS_DIGI28pt7b); + char numstr[7]; + uint16_t wv, hv; + int16_t x1, y1; + sprintf(numstr, "%d", num); + getTextBounds(numstr, 0, 0, &x1, &y1, &wv, &hv); + fillRect(TFT_FRAMEWDT, VTOP, swidth - TFT_FRAMEWDT / 2, hv + 3, TFT_BG); + setCursor((swidth - wv) / 2, VTOP + hv); + print(numstr); + setFont(); +} + +void DspCore::frameTitle(const char* str) { + setTextSize(2); + centerText(str, TFT_FRAMEWDT, TFT_LOGO, TFT_BG); +} + +void DspCore::rssi(const char* str) { + int16_t vTop = sheight - TFT_FRAMEWDT * 2 - TFT_LINEHGHT - 2; + setTextSize(1); + rightText(str, vTop, SILVER, TFT_BG); +} + +void DspCore::ip(const char* str) { + int16_t vTop = sheight - TFT_FRAMEWDT * 2 - TFT_LINEHGHT - 2; + setTextSize(1); + setTextColor(SILVER, TFT_BG); + setCursor(4, vTop); + print(str); +} + +void DspCore::set_TextSize(uint8_t s) { + setTextSize(s); +} + +void DspCore::set_TextColor(uint16_t fg, uint16_t bg) { + setTextColor(fg, bg); +} + +void DspCore::set_Cursor(int16_t x, int16_t y) { + setCursor(x, y); +} + +void DspCore::printText(const char* txt) { + print(txt); +} + +void DspCore::loop(bool force) { + +} + +#endif diff --git a/yoRadio/src/displays/displayGC9106.h b/yoRadio/src/displays/displayGC9106.h new file mode 100644 index 0000000..d9ec440 --- /dev/null +++ b/yoRadio/src/displays/displayGC9106.h @@ -0,0 +1,103 @@ +#ifndef displayGC9106_h +#define displayGC9106_h + +#include "Arduino.h" +#include +/* https://github.com/prenticedavid/Adafruit_GC9102_kbv */ +#include "../Adafruit_GC9106Ex/Adafruit_GC9106Ex.h" +#include "fonts/DS_DIGI28pt7b.h" + +#define TFT_LINEHGHT 10 +#define TFT_FRAMEWDT 0 + +#define PLMITEMS 7 +#define PLMITEMLENGHT 40 +#define PLMITEMHEIGHT 19 + +#if !defined(SCROLLDELTA) || !defined(SCROLLTIME) +#define SCROLLDELTA 3 +#define SCROLLTIME 65 +#endif + +#define TFT_FULLTIME 1 + +#define TITLE_SIZE2 0 +#define TITLE_TOP1 TFT_FRAMEWDT + 2 * TFT_LINEHGHT-3 + +#define BOOTSTR_TOP1 50 +#define BOOTSTR_TOP2 65 + +class DspCore: public Adafruit_GC9106Ex { + public: + DspCore(); + char plMenu[PLMITEMS][PLMITEMLENGHT]; + uint16_t clockY; + void initD(uint16_t &screenwidth, uint16_t &screenheight); + void apScreen(); + void drawLogo(); + void clearDsp(); + void centerText(const char* text, byte y, uint16_t fg, uint16_t bg); + void rightText(const char* text, byte y, uint16_t fg, uint16_t bg); + void set_TextSize(uint8_t s); + void set_TextColor(uint16_t fg, uint16_t bg); + void set_Cursor(int16_t x, int16_t y); + void printText(const char* txt); + void printClock(const char* timestr); + void printClock(struct tm timeinfo, bool dots, bool redraw = false); + void displayHeapForDebug(); + void drawVolumeBar(bool withNumber); + void drawNextStationNum(uint16_t num); + char* utf8Rus(const char* str, bool uppercase); + void drawScrollFrame(uint16_t texttop, uint16_t textheight, uint16_t bg); + void getScrolBbounds(const char* text, const char* separator, byte textsize, uint16_t &tWidth, uint16_t &tHeight, uint16_t &sWidth); + void clearScroll(uint16_t texttop, uint16_t textheight, uint16_t bg); + void frameTitle(const char* str); + void rssi(const char* str); + void ip(const char* str); + void drawPlaylist(uint16_t currentItem, char* currentItemText); + void loop(bool force=false); + private: + uint16_t swidth, sheight; + char oldTimeBuf[20]; + uint16_t wot, hot, dot; + int16_t x, y; + uint16_t cwidth, cheight; + void setClockBounds(); + byte getPw(uint16_t ncwidth); +}; + +extern DspCore dsp; + +/* + * TFT COLORS + */ +#define BLACK 0x0000 +#define BLUE 0x001F +#define RED 0xF800 +#define GREEN 0x07E0 +#define MAGENTA 0xF81F +#define YELLOW 0xFFE0 +#define WHITE 0xFFFF +#define GRAY 0x7BEF +#define DARK_GRAY 0x2945 +#define LIGHT_GRAY 0xC618 +#define LIME 0x87E0 +#define AQUA 0x5D1C +#define CYAN 0x07FF +#define DARK_CYAN 0x03EF +#define ORANGE 0xFCA0 +#define PINK 0xF97F +#define BROWN 0x8200 +#define VIOLET 0x9199 +#define SILVER 0xA510 +#define GOLD 0xA508 +#define NAVY 0x000F +#define MAROON 0x7800 +#define PURPLE 0x780F +#define OLIVE 0x7BE0 + +#define TFT_BG BLACK +#define TFT_FG WHITE +#define TFT_LOGO 0xE68B // 224, 209, 92 + +#endif diff --git a/yoRadio/src/displays/displayLC1602.cpp b/yoRadio/src/displays/displayLC1602.cpp index fc25c2d..a444e30 100644 --- a/yoRadio/src/displays/displayLC1602.cpp +++ b/yoRadio/src/displays/displayLC1602.cpp @@ -13,7 +13,7 @@ const byte controlspaces[] = { CLOCK_SPACE, VOL_SPACE }; -#if DSP_MODEL==DSP_1602I2C +#ifdef LCD_I2C DspCore::DspCore(): LiquidCrystal_I2C(SCREEN_ADDRESS, 16, 2, I2C_SDA, I2C_SCL) { } @@ -30,7 +30,7 @@ void DspCore::apScreen() { } void DspCore::initD(uint16_t &screenwidth, uint16_t &screenheight) { -#if DSP_MODEL==DSP_1602I2C +#ifdef LCD_I2C init(); backlight(); #else diff --git a/yoRadio/src/displays/displayLC1602.h b/yoRadio/src/displays/displayLC1602.h index 8f03ede..42c5675 100644 --- a/yoRadio/src/displays/displayLC1602.h +++ b/yoRadio/src/displays/displayLC1602.h @@ -3,6 +3,7 @@ #include "Arduino.h" #if DSP_MODEL==DSP_1602I2C +#define LCD_I2C #include "../LiquidCrystalI2C/LiquidCrystalI2CEx.h" #else #include @@ -25,7 +26,9 @@ #define BOOTSTR_TOP1 1 #define STARTTIME_PL 2000 -#if DSP_MODEL==DSP_1602I2C +#define IP_INST_VOL + +#ifdef LCD_I2C class DspCore: public LiquidCrystal_I2C { #else class DspCore: public LiquidCrystal { diff --git a/yoRadio/src/displays/displayST7735.cpp b/yoRadio/src/displays/displayST7735.cpp index a50255f..ae8f87a 100644 --- a/yoRadio/src/displays/displayST7735.cpp +++ b/yoRadio/src/displays/displayST7735.cpp @@ -1,9 +1,13 @@ #include "../../options.h" -#if DSP_MODEL==1 +#if DSP_MODEL==DSP_ST7735 #include "displayST7735.h" #include +#ifdef DSP_MINI +#include "fonts/bootlogo40.h" +#else #include "fonts/bootlogo.h" +#endif #include "../../player.h" #include "../../config.h" #include "../../network.h" @@ -107,6 +111,7 @@ void DspCore::apScreen() { void DspCore::initD(uint16_t &screenwidth, uint16_t &screenheight) { initR(DTYPE); cp437(true); + invertDisplay((DTYPE==INITR_MINI160x80)?TFT_INVERT:!TFT_INVERT); fillScreen(TFT_BG); setRotation(TFT_ROTATE); setTextWrap(false); @@ -118,7 +123,11 @@ void DspCore::initD(uint16_t &screenwidth, uint16_t &screenheight) { } void DspCore::drawLogo() { +#ifdef DSP_MINI + drawRGBBitmap((swidth - 62) / 2, 5, bootlogo40, 62, 40); +#else drawRGBBitmap((swidth - 99) / 2, 18, bootlogo2, 99, 64); +#endif } // http://greekgeeks.net/#maker-tools_convertColor @@ -133,7 +142,7 @@ void DspCore::drawPlaylist(uint16_t currentItem, char* currentItemText) { config.fillPlMenu(plMenu, currentItem - 3, PLMITEMS); setTextSize(2); int yStart = (sheight / 2 - PLMITEMHEIGHT / 2) - PLMITEMHEIGHT * (PLMITEMS - 1) / 2 + 3; - fillRect(0, (sheight / 2 - PLMITEMHEIGHT / 2) - 1, swidth, PLMITEMHEIGHT + 2, TFT_LOGO); + //fillRect(0, (sheight / 2 - PLMITEMHEIGHT / 2) - 1, swidth, PLMITEMHEIGHT + 2, TFT_LOGO); for (byte i = 0; i < PLMITEMS; i++) { if (abs(i - 3) == 3) setTextColor(CLR_ITEM3, TFT_BG); if (abs(i - 3) == 2) setTextColor(CLR_ITEM2, TFT_BG); @@ -169,7 +178,7 @@ void DspCore::getScrolBbounds(const char* text, const char* separator, byte text } void DspCore::clearScroll(uint16_t texttop, uint16_t textheight, uint16_t bg) { - fillRect(0, texttop, swidth, textheight, bg); + fillRect(0, texttop-2, swidth, textheight+3, bg); } void DspCore::centerText(const char* text, byte y, uint16_t fg, uint16_t bg) { @@ -194,6 +203,7 @@ void DspCore::rightText(const char* text, byte y, uint16_t fg, uint16_t bg) { } void DspCore::displayHeapForDebug() { +#ifndef DSP_MINI int16_t vTop = sheight - TFT_FRAMEWDT * 2 - TFT_LINEHGHT * 2 - 2; setTextSize(1); setTextColor(DARK_GRAY, TFT_BG); @@ -211,6 +221,7 @@ void DspCore::displayHeapForDebug() { byte sbw = map(aprcnt, 0, 100 , 0, swidth); fillRect(0, sheight - 2, sbw, 2, SILVER); #endif +#endif } void DspCore::setClockBounds(){ @@ -220,6 +231,7 @@ void DspCore::setClockBounds(){ uint16_t header = TFT_FRAMEWDT + 4 * TFT_LINEHGHT; uint16_t footer = TFT_FRAMEWDT * 2 + TFT_LINEHGHT + 5; clockY = header + (sheight - header - footer) / 2 - cheight / 2; + if(DTYPE==INITR_MINI160x80) clockY = clockY-6; setFont(); } @@ -275,14 +287,26 @@ void DspCore::printClock(struct tm timeinfo, bool dots, bool redraw){ setFont(); yield(); } - +#ifdef DSP_MINI +#define VTOP TITLE_TOP1+6 +#else +#define VTOP 48 +#endif void DspCore::drawVolumeBar(bool withNumber) { - int16_t vTop = sheight - TFT_FRAMEWDT * 2; - int16_t vWidth = swidth - TFT_FRAMEWDT - 4; +#ifdef DSP_MINI + int16_t vTop = sheight - TFT_FRAMEWDT - 2; + int16_t vWidth = swidth - TFT_FRAMEWDT * 2; + uint8_t ww = map(config.store.volume, 0, 254, 0, vWidth); + fillRect(TFT_FRAMEWDT, vTop, vWidth, 2, TFT_BG); + fillRect(TFT_FRAMEWDT, vTop, ww, 2, TFT_LOGO); +#else + int16_t vTop = sheight - TFT_FRAMEWDT - 6; + int16_t vWidth = swidth - TFT_FRAMEWDT * 2; uint8_t ww = map(config.store.volume, 0, 254, 0, vWidth - 2); fillRect(TFT_FRAMEWDT, vTop - 2, vWidth, 6, TFT_BG); drawRect(TFT_FRAMEWDT, vTop - 2, vWidth, 6, TFT_LOGO); fillRect(TFT_FRAMEWDT + 1, vTop - 1, ww, 5, TFT_LOGO); +#endif if (withNumber) { setTextSize(1); setTextColor(TFT_FG); @@ -292,8 +316,8 @@ void DspCore::drawVolumeBar(bool withNumber) { int16_t x1, y1; sprintf(volstr, "%d", config.store.volume); getTextBounds(volstr, 0, 0, &x1, &y1, &wv, &hv); - fillRect(TFT_FRAMEWDT, 48, swidth - TFT_FRAMEWDT / 2, hv + 3, TFT_BG); - setCursor((swidth - wv) / 2, 48 + hv); + fillRect(TFT_FRAMEWDT, VTOP, swidth - TFT_FRAMEWDT / 2, hv + 3, TFT_BG); + setCursor((swidth - wv) / 2, VTOP + hv); print(volstr); setFont(); } @@ -308,8 +332,8 @@ void DspCore::drawNextStationNum(uint16_t num) { int16_t x1, y1; sprintf(numstr, "%d", num); getTextBounds(numstr, 0, 0, &x1, &y1, &wv, &hv); - fillRect(TFT_FRAMEWDT, 48, swidth - TFT_FRAMEWDT / 2, hv + 3, TFT_BG); - setCursor((swidth - wv) / 2, 48 + hv); + fillRect(TFT_FRAMEWDT, VTOP, swidth - TFT_FRAMEWDT / 2, hv + 3, TFT_BG); + setCursor((swidth - wv) / 2, VTOP + hv); print(numstr); setFont(); } diff --git a/yoRadio/src/displays/displayST7735.h b/yoRadio/src/displays/displayST7735.h index 54230ce..3530653 100644 --- a/yoRadio/src/displays/displayST7735.h +++ b/yoRadio/src/displays/displayST7735.h @@ -7,11 +7,20 @@ #include "fonts/DS_DIGI28pt7b.h" #define TFT_LINEHGHT 10 +#if DTYPE==INITR_MINI160x80 +#define TFT_FRAMEWDT 0 +#define DSP_MINI +#else #define TFT_FRAMEWDT 4 +#endif #define PLMITEMS 7 #define PLMITEMLENGHT 40 -#define PLMITEMHEIGHT 22 +#if DTYPE==INITR_MINI160x80 +#define PLMITEMHEIGHT 19 +#else +#define PLMITEMHEIGHT 21 +#endif #define TITLE_TOP2 TFT_FRAMEWDT + 3 * TFT_LINEHGHT #define TITLE_FG2 SILVER @@ -22,6 +31,13 @@ #define TFT_FULLTIME 1 +#if DTYPE==INITR_MINI160x80 +#define TITLE_SIZE2 0 +#define TITLE_TOP1 TFT_FRAMEWDT + 2 * TFT_LINEHGHT-3 +#define BOOTSTR_TOP1 50 +#define BOOTSTR_TOP2 65 +#endif + class DspCore: public Adafruit_ST7735 { public: DspCore(); diff --git a/yoRadio/src/displays/fonts/bootlogo40.h b/yoRadio/src/displays/fonts/bootlogo40.h new file mode 100644 index 0000000..8776659 --- /dev/null +++ b/yoRadio/src/displays/fonts/bootlogo40.h @@ -0,0 +1,69 @@ +#ifndef bootlogo40_h +#define bootlogo40_h + + +/******************************************************************************* +* generated by lcd-image-converter rev.030b30d from 2019-03-17 01:38:34 +0500 +* image +* filename: unsaved +* name: bootlogo +* +* preset name: Color R5G6B5 +* data block size: 16 bit(s), uint16_t +* RLE compression enabled: no +* conversion type: Color, not_used not_used +* split to rows: yes +* bits per pixel: 16 +* +* preprocess: +* main scan direction: top_to_bottom +* line scan direction: forward +* inverse: no +*******************************************************************************/ + +#include + +static const uint16_t bootlogo40[2480] PROGMEM = { + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0020, 0x5aa4, 0xcdc9, 0xde6a, 0xde4a, 0x9c67, 0x20e1, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1081, 0x83a5, 0xc527, 0xc526, 0xb4c5, 0x5a83, 0x0820, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7345, 0xd60a, 0xd62a, 0xde2a, 0xde4a, 0xde4a, 0xc5a9, 0x18e1, 0x0000, 0x0000, 0x0000, 0x1081, 0xbd48, 0xcd88, 0xc547, 0xc527, 0xbd06, 0xbce6, 0x7b44, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2102, 0xd5c9, 0xd5c9, 0xd5e9, 0xd60a, 0xd62a, 0xde4a, 0xde4a, 0x83c6, 0x0000, 0x0000, 0x0000, 0x83e6, 0xd5e9, 0xcda8, 0xcd88, 0xcd68, 0xc547, 0xc527, 0xc527, 0x20e1, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5243, 0xcd88, 0xcd88, 0xcda9, 0xd5c9, 0xd5e9, 0xd60a, 0xd62a, 0xcdc9, 0x0000, 0x0000, 0x0000, 0xc589, 0xd5e9, 0xd5e9, 0xd5c9, 0xcda8, 0xcd88, 0xc568, 0xcd67, 0x5a83, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5243, 0xc547, 0xc548, 0xcd68, 0xcd88, 0xcda9, 0xd5c9, 0xd5e9, 0xcda9, 0x0000, 0x0000, 0x0000, 0xc5a9, 0xd60a, 0xd609, 0xd5e9, 0xd5e9, 0xd5c9, 0xcda8, 0xcda8, 0x62a4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2102, 0xc547, 0xbd07, 0xc527, 0xc548, 0xcd68, 0xcd88, 0xd5c9, 0x83a5, 0x0000, 0x0000, 0x0000, 0x8c07, 0xde4a, 0xd62a, 0xd62a, 0xd609, 0xd5e9, 0xd5e9, 0xd609, 0x2101, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7304, 0xbd26, 0xbce6, 0xbd07, 0xc527, 0xcd68, 0xc548, 0x18c1, 0x0000, 0x0000, 0x0000, 0x1081, 0xcdca, 0xde4a, 0xde2a, 0xd62a, 0xd60a, 0xde2a, 0x8c06, 0x0020, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0020, 0x5263, 0xc527, 0xc547, 0xcd87, 0x9c46, 0x20e1, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1081, 0x9c68, 0xe68b, 0xe68b, 0xe68b, 0x7345, 0x0840, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2000, 0x1800, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0800, 0x3000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1000, 0x6800, 0x3000, 0x8800, 0x0800, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0800, 0x3000, 0x5000, 0x5800, 0x6000, 0x1000, 0x0000, 0x0000, 0x39a3, 0x83c6, 0xb507, 0xb4e6, 0xb4e6, 0xbd27, 0xc548, 0xacc7, 0x62c4, 0x1081, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2800, 0xb800, 0x2000, 0x0000, 0x9000, 0x2000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0800, 0x4000, 0x6800, 0x6000, 0x3800, 0x2800, 0x9000, 0x9000, 0xb000, 0x6a03, 0xcda8, 0xc546, 0xb4a5, 0xac85, 0xac85, 0xac65, 0xac65, 0xac85, 0xb4a6, 0xc527, 0xd5e8, 0x9447, 0x18c1, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4800, 0x6800, 0x0000, 0x0000, 0x2800, 0xe000, 0x3800, 0x0000, 0x0000, 0xa000, 0x0000, 0x1800, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1000, 0x2800, 0x2800, 0x2800, 0x2800, 0x3000, 0x4800, 0x2000, 0x0000, 0x0000, 0x0000, 0x7000, 0x2000, 0x29a3, 0xc9c2, 0xf141, 0xb445, 0xbcc6, 0xbcc6, 0xb4a6, 0xb4a5, 0xb4a5, 0xac85, 0xac85, 0xac85, 0xaca5, 0xb4a6, 0xbd06, 0xd5e9, 0x62e4, 0x0020, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0800, 0x1800, 0x0000, 0x0000, 0x4000, 0xf000, 0x4000, 0x0000, 0x1800, 0xd000, 0x8000, 0x0000, 0x0000, 0x2000, 0x6000, 0x1000, 0x3800, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1000, 0x4800, 0x4000, 0x2800, 0x4000, 0x7000, 0x7800, 0x3800, 0x0000, 0x0000, 0x0000, 0x0000, 0x7000, 0x3800, 0x4a85, 0xce0a, 0xd406, 0xf800, 0xbae4, 0xb507, 0xbd06, 0xbce6, 0xb4c6, 0xb4a6, 0xb4a5, 0xac85, 0xac85, 0xac85, 0xac85, 0xaca6, 0xb4c6, 0xc567, 0x8be6, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0800, 0xa000, 0x5000, 0x0000, 0x0000, 0xb000, 0xa000, 0x0000, 0x0000, 0xa800, 0xd800, 0x1000, 0x0000, 0x0000, 0x5800, 0x4800, 0x3800, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2800, 0x5000, 0x1000, 0x0000, 0x2000, 0x4000, 0x0800, 0x2800, 0x8800, 0x0000, 0x0000, 0x0000, 0x4000, 0x8000, 0x49e4, 0xe68b, 0xd62a, 0xd446, 0xf820, 0xc243, 0xb527, 0xc547, 0xc527, 0xbce6, 0xbce6, 0xb4c6, 0xb4a6, 0xb4a5, 0xac85, 0xac85, 0xac85, 0xac85, 0xb4a5, 0xc547, 0x7345, 0x0000, 0x1000, 0x0000, 0x0000, 0x7800, 0xd000, 0x2000, 0x0000, 0x4800, 0xe800, 0x3000, 0x0000, 0x5800, 0xe800, 0x8000, 0x0000, 0x0000, 0x2800, 0x8000, 0x2800, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x2800, 0x4800, 0x0000, 0x0000, 0x2000, 0x4000, 0x0000, 0x0000, 0x1800, 0xa000, 0x0000, 0x0000, 0x0800, 0xa800, 0x60c1, 0xde6b, 0xde6b, 0xde8b, 0xdb86, 0xf800, 0xb2e4, 0xbd68, 0xcd88, 0xc567, 0xc547, 0xc527, 0xbce6, 0xbcc6, 0xb4c6, 0xb4a6, 0xb4a5, 0xac85, 0xac65, 0xac45, 0xac65, 0xd465, 0xc000, 0x2000, 0x0000, 0x3800, 0xc000, 0x8000, 0x0000, 0x0800, 0xe000, 0x9000, 0x0000, 0x2000, 0x4000, 0xe000, 0x4000, 0x0000, 0x0800, 0x4800, 0x0800, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x3000, 0x3800, 0x0000, 0x0000, 0x3000, 0x3000, 0x0000, 0x0000, 0x0000, 0x1800, 0xb000, 0x0000, 0x0000, 0x7000, 0xb800, 0x9c68, 0xe6ac, 0xe6ab, 0xde8b, 0xea23, 0xf081, 0x9c47, 0xcdc9, 0xd609, 0xcdc9, 0xb507, 0xa4a7, 0xaca7, 0xbd27, 0xc526, 0xbcc6, 0xb4e6, 0xc3a4, 0xc2e3, 0xbaa3, 0xb323, 0xe860, 0xc961, 0x0000, 0x1800, 0x8800, 0xd800, 0x1000, 0x0000, 0x9800, 0xe800, 0x2000, 0x1000, 0x3800, 0x1000, 0xc800, 0x3000, 0x1800, 0x4800, 0x1800, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x3000, 0x3000, 0x0000, 0x0000, 0x3000, 0x2000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4000, 0xa800, 0x0000, 0x2800, 0xe800, 0x7983, 0xd66c, 0xef0c, 0xeeec, 0xe58a, 0xf8c1, 0xb2c4, 0xb569, 0xde6b, 0xa4e8, 0x41e3, 0x18e1, 0x0861, 0x10a1, 0x3162, 0x83a5, 0xcd88, 0xd2c3, 0xca22, 0xa384, 0xa3c4, 0xd181, 0xf040, 0x8b03, 0x49a2, 0x5000, 0xe800, 0x5800, 0x0000, 0x4000, 0xf000, 0x8000, 0x0000, 0x3000, 0x0000, 0x0800, 0x8000, 0x7800, 0x3800, 0x1000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x1000, 0x3000, 0x0000, 0x0000, 0x2800, 0x2800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x9000, 0x7000, 0x0000, 0xc000, 0xc820, 0x7bc7, 0xf74d, 0xf74d, 0xef0d, 0xf2e5, 0xd203, 0xace8, 0xde6b, 0xb56a, 0x1081, 0x0000, 0x0000, 0x3800, 0x1000, 0x0000, 0x0840, 0xa182, 0xe162, 0x9384, 0xac86, 0xc364, 0xf800, 0xb982, 0x8bc4, 0x92c3, 0xa000, 0xc000, 0x0000, 0x1800, 0x6000, 0xe000, 0x1000, 0x3000, 0x1000, 0x0000, 0x0000, 0x0800, 0x0800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x3000, 0x1800, 0x0000, 0x1000, 0x4000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0800, 0xe000, 0x1800, 0x5000, 0xf800, 0x5860, 0xc60b, 0xf74d, 0xf74d, 0xf4c9, 0xe1e3, 0xb509, 0xde8b, 0xe6cc, 0x5a24, 0x2800, 0x0000, 0x9000, 0xa000, 0x0000, 0x0000, 0x4800, 0xf840, 0xab24, 0xaca6, 0xc4e7, 0xd9c2, 0xf020, 0x82e3, 0xac05, 0xb2e3, 0xd040, 0x3800, 0x0800, 0x4000, 0x2800, 0xb000, 0x4800, 0x2800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0800, 0x4000, 0x0000, 0x0000, 0x5000, 0x0800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8800, 0xa000, 0x0000, 0xb800, 0xc800, 0x28c1, 0xf66c, 0xf60b, 0xeca8, 0xe346, 0xc5eb, 0xdecd, 0xeeed, 0xe488, 0x4800, 0x4000, 0x6000, 0xe800, 0x2000, 0x0000, 0x3000, 0xf000, 0x9000, 0x8be6, 0xcda8, 0xcc46, 0xf020, 0xb9a2, 0x9b84, 0xc364, 0xbbe5, 0xc0a0, 0x2800, 0x4800, 0x1800, 0x0000, 0x2800, 0x1800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x3800, 0x1000, 0x0000, 0x4000, 0x2000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2800, 0xd000, 0x1800, 0x4000, 0xf800, 0x4800, 0x6a85, 0xe569, 0xdd09, 0xd549, 0xd66c, 0xe6ed, 0xeecc, 0xf285, 0xc366, 0x39e3, 0x5982, 0xe000, 0xb121, 0x39e3, 0x49a2, 0xc880, 0xf020, 0x5962, 0xa4e8, 0xd5a9, 0xda84, 0xe860, 0xa2c4, 0xc385, 0xb486, 0xb465, 0x9101, 0x4800, 0x1000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x2800, 0x0000, 0x0800, 0x4800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa800, 0x5000, 0x0000, 0x9800, 0xc800, 0x0000, 0x83c6, 0xe68b, 0xde8c, 0xe6ac, 0xeeed, 0xeecc, 0xf203, 0xdb05, 0xbdaa, 0xe70d, 0xeb46, 0xf860, 0xa468, 0xd60b, 0xdd29, 0xe8e1, 0xd962, 0xa508, 0xd62a, 0xdc06, 0xe1a2, 0xd162, 0xbb85, 0xbcc7, 0xbd27, 0xc547, 0x41a2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x3800, 0x1000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6000, 0x9000, 0x0000, 0x2000, 0xf000, 0x6000, 0x0000, 0xa4a8, 0xe66b, 0xe68c, 0xeecc, 0xeecc, 0xf346, 0xe8e1, 0xaca8, 0xe6ac, 0xee4c, 0xf922, 0xca84, 0xbdcb, 0xedeb, 0xddca, 0xf0c1, 0xc305, 0xc5ea, 0xe4a8, 0xd4a8, 0xf000, 0xcaa4, 0xbcc7, 0xc5a9, 0xcda9, 0xcdc8, 0x41c2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x4000, 0x0800, 0x0000, 0x0000, 0x0000, 0x0000, 0x4000, 0x9800, 0x1800, 0x0000, 0x8800, 0xd000, 0x1800, 0x0000, 0xace9, 0xd60a, 0xde4b, 0xe66b, 0xe4a8, 0xf800, 0xbac5, 0xcdeb, 0xeeed, 0xf386, 0xf060, 0xac88, 0xe60b, 0xe56a, 0xe70d, 0xea84, 0xd2c5, 0xdca8, 0xd5aa, 0xe244, 0xe922, 0xac67, 0xcdea, 0xd62a, 0xd609, 0xd609, 0x41e3, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x4800, 0x0000, 0x0000, 0x0000, 0x0000, 0x5800, 0x8000, 0x1800, 0x0000, 0x1800, 0xf000, 0x6000, 0x0000, 0x0000, 0xacc8, 0xcdc9, 0xd5ea, 0xd64a, 0xe9c3, 0xe881, 0xb447, 0xde8c, 0xe58a, 0xe9c3, 0xca04, 0xc509, 0xed49, 0xde8c, 0xef2d, 0xee6c, 0xd4a8, 0xd5aa, 0xdcc8, 0xf860, 0xb3c6, 0xc5ea, 0xde8b, 0xde6b, 0xde4a, 0xde4a, 0x41e3, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x4800, 0x1800, 0x0000, 0x1000, 0x7000, 0x5000, 0x0000, 0x0000, 0x0000, 0xa000, 0xc000, 0x0000, 0x0000, 0x0000, 0x8bc6, 0xc568, 0xcda9, 0xcde9, 0xe142, 0xd162, 0xb549, 0xddca, 0xe4a8, 0xdb66, 0xda44, 0xe4a8, 0xde6c, 0xeeed, 0xf72d, 0xf74e, 0xef2d, 0xee0b, 0xeb26, 0xe223, 0xb56a, 0xe6cc, 0xeeec, 0xe6cb, 0xe6ab, 0xde4a, 0x31a2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x4800, 0x5800, 0x5800, 0x1000, 0x0000, 0x0000, 0x0000, 0x3000, 0xe000, 0x2000, 0x0000, 0x0000, 0x0000, 0x7325, 0xc527, 0xc547, 0xc588, 0xd982, 0xca03, 0xbce8, 0xdc27, 0xb549, 0x5204, 0x59a3, 0x5265, 0x5aa5, 0x5ac5, 0x5ac6, 0x5ac6, 0x8285, 0x6a24, 0xc0e1, 0x61a3, 0x5285, 0x5ac5, 0x5ac5, 0x5aa5, 0x5aa5, 0x4a44, 0x0860, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0800, 0xa800, 0x5800, 0x0000, 0x0000, 0x0000, 0x0000, 0x4a04, 0xbd06, 0xb4e6, 0xbd27, 0xc365, 0xd1c2, 0xc385, 0xbd28, 0xc589, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x3800, 0x1800, 0x3000, 0x7800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5000, 0x8000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1081, 0xbd27, 0xac85, 0xb4c6, 0xb4e7, 0xac46, 0xb4c7, 0xc548, 0xcdc9, 0x62c5, 0x0000, 0x0000, 0x0000, 0x0000, 0x4800, 0x2000, 0x0000, 0x7800, 0x2800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1000, 0x9000, 0x1000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0840, 0x9405, 0xa444, 0xa465, 0xaca5, 0xb4c6, 0xb4e7, 0xbd27, 0xc548, 0xcda9, 0x41e3, 0x0000, 0x0000, 0x4000, 0x3000, 0x0000, 0x2800, 0x7000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0800, 0x8000, 0x1000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5263, 0xa444, 0x9c24, 0xa445, 0xac65, 0xaca6, 0xb4c6, 0xbce7, 0xbd27, 0xd5e9, 0x8be6, 0x3081, 0x7820, 0x0040, 0x0020, 0x8820, 0x0820, 0x0840, 0x1060, 0x18a1, 0x5285, 0xbdab, 0x9cc9, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1800, 0xa800, 0x5000, 0x0000, 0x0000, 0x0000, 0x1800, 0x5800, 0x1000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x18e1, 0x9be4, 0x93c4, 0x9c04, 0xa424, 0xa445, 0xac65, 0xaca6, 0xb4c6, 0xb4e7, 0xc588, 0xe2a4, 0xac06, 0x9447, 0xaa84, 0xa3c6, 0x9467, 0xad09, 0xde6c, 0xef0d, 0xf70d, 0xeeed, 0xe6ed, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x7000, 0xf800, 0x6800, 0x0000, 0x0000, 0x3800, 0x3800, 0x0800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5a83, 0x9be3, 0x93a3, 0x9be4, 0x9c04, 0xa424, 0xa445, 0xac85, 0xaca6, 0xb466, 0xe121, 0x9c87, 0xcc06, 0xc446, 0xbd68, 0xd5ea, 0xde2a, 0xde4b, 0xe66b, 0xe6ac, 0xeecc, 0xf72d, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x4000, 0xf800, 0xb800, 0x6800, 0x5800, 0x1000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8384, 0x9383, 0x8b83, 0x93a3, 0x9be4, 0x9c04, 0xa424, 0xa465, 0xa425, 0xe0c1, 0xc2a3, 0xb3e5, 0xacc7, 0xc548, 0xcda9, 0xd5c9, 0xd5ea, 0xde2a, 0xde4b, 0xe68b, 0xeeec, 0x3162, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x2000, 0x3000, 0x0800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8364, 0x9382, 0x8b63, 0x9383, 0x93c3, 0x9be4, 0x9c04, 0xa424, 0x9bc4, 0x93a4, 0xa445, 0xb4c6, 0xbd27, 0xc548, 0xc568, 0xcda9, 0xd5c9, 0xd60a, 0xde2a, 0xe66b, 0x62e5, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5a63, 0x8b63, 0x8b62, 0x8b63, 0x8b83, 0x93c3, 0x9be4, 0x9c04, 0x9c24, 0xa465, 0xac85, 0xb4c6, 0xb4e7, 0xbd27, 0xc548, 0xc588, 0xcda9, 0xd5c9, 0xd60a, 0x9427, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x20e1, 0x5a62, 0x93c3, 0x9382, 0x8b63, 0x8b83, 0x93c3, 0x9be4, 0x9c04, 0xa424, 0xa465, 0xac85, 0xb4c6, 0xb4e6, 0xbd27, 0xcd88, 0xd5c9, 0xa487, 0x4203, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0840, 0x3162, 0x6aa3, 0x93a4, 0x9be3, 0xa403, 0xa424, 0xac44, 0xac84, 0xb485, 0xaca6, 0x8bc5, 0x6ae4, 0x41c3, 0x1080, 0x0840, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 + +}; +#endif