Merge pull request #10943 from gemu2015/ili9341

Ili9341 update
This commit is contained in:
Theo Arends 2021-02-14 10:05:55 +01:00 committed by GitHub
commit 5f334dba53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
35 changed files with 423 additions and 4042 deletions

View File

@ -1,46 +0,0 @@
Thank you for opening an issue on an Adafruit Arduino library repository. To
improve the speed of resolution please review the following guidelines and
common troubleshooting steps below before creating the issue:
- **Do not use GitHub issues for troubleshooting projects and issues.** Instead use
the forums at http://forums.adafruit.com to ask questions and troubleshoot why
something isn't working as expected. In many cases the problem is a common issue
that you will more quickly receive help from the forum community. GitHub issues
are meant for known defects in the code. If you don't know if there is a defect
in the code then start with troubleshooting on the forum first.
- **If following a tutorial or guide be sure you didn't miss a step.** Carefully
check all of the steps and commands to run have been followed. Consult the
forum if you're unsure or have questions about steps in a guide/tutorial.
- **For Arduino projects check these very common issues to ensure they don't apply**:
- For uploading sketches or communicating with the board make sure you're using
a **USB data cable** and **not** a **USB charge-only cable**. It is sometimes
very hard to tell the difference between a data and charge cable! Try using the
cable with other devices or swapping to another cable to confirm it is not
the problem.
- **Be sure you are supplying adequate power to the board.** Check the specs of
your board and plug in an external power supply. In many cases just
plugging a board into your computer is not enough to power it and other
peripherals.
- **Double check all soldering joints and connections.** Flakey connections
cause many mysterious problems. See the [guide to excellent soldering](https://learn.adafruit.com/adafruit-guide-excellent-soldering/tools) for examples of good solder joints.
- **Ensure you are using an official Arduino or Adafruit board.** We can't
guarantee a clone board will have the same functionality and work as expected
with this code and don't support them.
If you're sure this issue is a defect in the code and checked the steps above
please fill in the following fields to provide enough troubleshooting information.
You may delete the guideline and text above to just leave the following details:
- Arduino board: **INSERT ARDUINO BOARD NAME/TYPE HERE**
- Arduino IDE version (found in Arduino -> About Arduino menu): **INSERT ARDUINO
VERSION HERE**
- List the steps to reproduce the problem below (if possible attach a sketch or
copy the sketch code in too): **LIST REPRO STEPS BELOW**

View File

@ -1,26 +0,0 @@
Thank you for creating a pull request to contribute to Adafruit's GitHub code!
Before you open the request please review the following guidelines and tips to
help it be more easily integrated:
- **Describe the scope of your change--i.e. what the change does and what parts
of the code were modified.** This will help us understand any risks of integrating
the code.
- **Describe any known limitations with your change.** For example if the change
doesn't apply to a supported platform of the library please mention it.
- **Please run any tests or examples that can exercise your modified code.** We
strive to not break users of the code and running tests/examples helps with this
process.
Thank you again for contributing! We will try to test and integrate the change
as soon as we can, but be aware we have many GitHub repositories to manage and
can't immediately respond to every request. There is no need to bump or check in
on a pull request (it will clutter the discussion of the request).
Also don't be worried if the request is closed or not integrated--sometimes the
priorities of Adafruit's GitHub code (education, ease of use) might not match the
priorities of the pull request. Don't fret, the open source community thrives on
forks and GitHub makes it easy to keep your changes in a forked repo.
After reviewing the guidelines above you can delete this text from the pull request.

View File

@ -1,4 +0,0 @@
# Our handy .gitignore for automation ease
Doxyfile*
doxygen_sqlite3.db
html

View File

@ -1,38 +0,0 @@
language: c
sudo: false
cache:
directories:
- ~/arduino_ide
# Caches Arduino IDE + ESP32 platform
- ~/.arduino15/packages/
# Caches Arduino platforms
git:
depth: false
quiet: true
# Blacklist
branches:
except:
- gh-pages
env:
global:
- PRETTYNAME="Adafruit ILI9341 Arduino Library"
# Optional, will default to "$TRAVIS_BUILD_DIR/Doxyfile"
# - DOXYFILE: $TRAVIS_BUILD_DIR/Doxyfile
before_install:
- source <(curl -SLs https://raw.githubusercontent.com/adafruit/travis-ci-arduino/master/install.sh)
install:
- arduino --install-library "Adafruit GFX Library","Adafruit STMPE610","Adafruit TouchScreen"
script:
- build_main_platforms
# Generate and deploy documentation
after_success:
- source <(curl -SLs https://raw.githubusercontent.com/adafruit/travis-ci-arduino/master/library_check.sh)
- source <(curl -SLs https://raw.githubusercontent.com/adafruit/travis-ci-arduino/master/doxy_gen_and_deploy.sh)

View File

@ -1,282 +0,0 @@
/*!
* @file Adafruit_ILI9341.cpp
*
* @mainpage Adafruit ILI9341 TFT Displays
*
* @section intro_sec Introduction
*
* This is the documentation for Adafruit's ILI9341 driver for the
* Arduino platform.
*
* This library works with the Adafruit 2.8" Touch Shield V2 (SPI)
* http://www.adafruit.com/products/1651
*
* Adafruit 2.4" TFT LCD with Touchscreen Breakout w/MicroSD Socket - ILI9341
* https://www.adafruit.com/product/2478
*
* 2.8" TFT LCD with Touchscreen Breakout Board w/MicroSD Socket - ILI9341
* https://www.adafruit.com/product/1770
*
* 2.2" 18-bit color TFT LCD display with microSD card breakout - ILI9340
* https://www.adafruit.com/product/1770
*
* TFT FeatherWing - 2.4" 320x240 Touchscreen For All Feathers
* https://www.adafruit.com/product/3315
*
* 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 <a href="https://github.com/adafruit/Adafruit_GFX">
* Adafruit_GFX</a> 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_ILI9341.h"
#ifndef ARDUINO_STM32_FEATHER
#include "pins_arduino.h"
#ifndef RASPI
#include "wiring_private.h"
#endif
#endif
#include <limits.h>
#if defined (ARDUINO_ARCH_ARC32) || defined (ARDUINO_MAXIM)
#define SPI_DEFAULT_FREQ 16000000
#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 ILI9341 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_ILI9341::Adafruit_ILI9341(int8_t cs, int8_t dc, int8_t mosi,
int8_t sclk, int8_t rst, int8_t miso) : Adafruit_SPITFT(ILI9341_TFTWIDTH, ILI9341_TFTHEIGHT, cs, dc, mosi, sclk, rst, miso) {
}
/**************************************************************************/
/*!
@brief Instantiate Adafruit ILI9341 driver with hardware SPI
@param cs Chip select pin #
@param dc Data/Command pin #
@param rst Reset pin # (optional, pass -1 if unused)
*/
/**************************************************************************/
Adafruit_ILI9341::Adafruit_ILI9341(int8_t cs, int8_t dc, int8_t rst) : Adafruit_SPITFT(ILI9341_TFTWIDTH, ILI9341_TFTHEIGHT, cs, dc, rst) {
}
static const uint8_t PROGMEM initcmd[] = {
0xEF, 3, 0x03, 0x80, 0x02,
0xCF, 3, 0x00, 0xC1, 0x30,
0xED, 4, 0x64, 0x03, 0x12, 0x81,
0xE8, 3, 0x85, 0x00, 0x78,
0xCB, 5, 0x39, 0x2C, 0x00, 0x34, 0x02,
0xF7, 1, 0x20,
0xEA, 2, 0x00, 0x00,
ILI9341_PWCTR1 , 1, 0x23, // Power control VRH[5:0]
ILI9341_PWCTR2 , 1, 0x10, // Power control SAP[2:0];BT[3:0]
ILI9341_VMCTR1 , 2, 0x3e, 0x28, // VCM control
ILI9341_VMCTR2 , 1, 0x86, // VCM control2
ILI9341_MADCTL , 1, 0x48, // Memory Access Control
ILI9341_VSCRSADD, 1, 0x00, // Vertical scroll zero
ILI9341_PIXFMT , 1, 0x55,
ILI9341_FRMCTR1 , 2, 0x00, 0x18,
ILI9341_DFUNCTR , 3, 0x08, 0x82, 0x27, // Display Function Control
0xF2, 1, 0x00, // 3Gamma Function Disable
ILI9341_GAMMASET , 1, 0x01, // Gamma curve selected
ILI9341_GMCTRP1 , 15, 0x0F, 0x31, 0x2B, 0x0C, 0x0E, 0x08, // Set Gamma
0x4E, 0xF1, 0x37, 0x07, 0x10, 0x03, 0x0E, 0x09, 0x00,
ILI9341_GMCTRN1 , 15, 0x00, 0x0E, 0x14, 0x03, 0x11, 0x07, // Set Gamma
0x31, 0xC1, 0x48, 0x08, 0x0F, 0x0C, 0x31, 0x36, 0x0F,
ILI9341_SLPOUT , 0x80, // Exit Sleep
ILI9341_DISPON , 0x80, // Display on
0x00 // End of list
};
/**************************************************************************/
/*!
@brief Initialize ILI9341 chip
Connects to the ILI9341 over SPI and sends initialization procedure commands
@param freq Desired SPI clock frequency
*/
/**************************************************************************/
void Adafruit_ILI9341::begin(uint32_t freq) {
if(!freq) freq = SPI_DEFAULT_FREQ;
_freq = freq;
initSPI(freq);
startWrite();
uint8_t cmd, x, numArgs;
const uint8_t *addr = initcmd;
while((cmd = pgm_read_byte(addr++)) > 0) {
writeCommand(cmd);
x = pgm_read_byte(addr++);
numArgs = x & 0x7F;
while(numArgs--) spiWrite(pgm_read_byte(addr++));
if(x & 0x80) delay(120);
}
endWrite();
_width = ILI9341_TFTWIDTH;
_height = ILI9341_TFTHEIGHT;
}
/**************************************************************************/
/*!
@brief Set origin of (0,0) and orientation of TFT display
@param m The index for rotation, from 0-3 inclusive
*/
/**************************************************************************/
void Adafruit_ILI9341::setRotation(uint8_t m) {
rotation = m % 4; // can't be higher than 3
switch (rotation) {
case 0:
m = (MADCTL_MX | MADCTL_BGR);
_width = ILI9341_TFTWIDTH;
_height = ILI9341_TFTHEIGHT;
break;
case 1:
m = (MADCTL_MV | MADCTL_BGR);
_width = ILI9341_TFTHEIGHT;
_height = ILI9341_TFTWIDTH;
break;
case 2:
m = (MADCTL_MY | MADCTL_BGR);
_width = ILI9341_TFTWIDTH;
_height = ILI9341_TFTHEIGHT;
break;
case 3:
m = (MADCTL_MX | MADCTL_MY | MADCTL_MV | MADCTL_BGR);
_width = ILI9341_TFTHEIGHT;
_height = ILI9341_TFTWIDTH;
break;
}
startWrite();
writeCommand(ILI9341_MADCTL);
spiWrite(m);
endWrite();
}
/**************************************************************************/
/*!
@brief Enable/Disable display color inversion
@param invert True to invert, False to have normal color
*/
/**************************************************************************/
void Adafruit_ILI9341::invertDisplay(boolean invert) {
startWrite();
writeCommand(invert ? ILI9341_INVON : ILI9341_INVOFF);
endWrite();
}
/**************************************************************************/
/*!
@brief Scroll display memory
@param y How many pixels to scroll display by
*/
/**************************************************************************/
void Adafruit_ILI9341::scrollTo(uint16_t y) {
startWrite();
writeCommand(ILI9341_VSCRSADD);
SPI_WRITE16(y);
endWrite();
}
/**************************************************************************/
void Adafruit_ILI9341::setScrollMargins(uint16_t top, uint16_t bottom)
{
uint16_t height = _height - (top + bottom);
startWrite();
writeCommand(0x33);
SPI_WRITE16(top);
SPI_WRITE16(height);
SPI_WRITE16(bottom);
endWrite();
}
/**************************************************************************/
/*!
@brief Set the "address window" - the rectangle we will write to RAM with the next chunk of SPI data writes. The ILI9341 will automatically wrap the data as each row is filled
@param x TFT memory 'x' origin
@param y TFT memory 'y' origin
@param w Width of rectangle
@param h Height of rectangle
*/
/**************************************************************************/
void Adafruit_ILI9341::setAddrWindow(uint16_t x, uint16_t y, uint16_t w, uint16_t h) {
uint32_t xa = ((uint32_t)x << 16) | (x+w-1);
uint32_t ya = ((uint32_t)y << 16) | (y+h-1);
writeCommand(ILI9341_CASET); // Column addr set
SPI_WRITE32(xa);
writeCommand(ILI9341_PASET); // Row addr set
SPI_WRITE32(ya);
writeCommand(ILI9341_RAMWR); // write to RAM
}
/**************************************************************************/
/*!
@brief Read 8 bits of data from ILI9341 configuration memory. NOT from RAM!
This is highly undocumented/supported, it's really a hack but kinda works?
@param command The command register to read data from
@param index The byte index into the command to read from
@return Unsigned 8-bit data read from ILI9341 register
*/
/**************************************************************************/
uint8_t Adafruit_ILI9341::readcommand8(uint8_t command, uint8_t index) {
uint32_t freq = _freq;
if(_freq > 24000000) _freq = 24000000;
startWrite();
writeCommand(0xD9); // woo sekret command?
spiWrite(0x10 + index);
writeCommand(command);
uint8_t r = spiRead();
endWrite();
_freq = freq;
return r;
}

View File

@ -1,144 +0,0 @@
/*!
* @file Adafruit_ILI9341.h
*
* This is the documentation for Adafruit's ILI9341 driver for the
* Arduino platform.
*
* This library works with the Adafruit 2.8" Touch Shield V2 (SPI)
* http://www.adafruit.com/products/1651
* Adafruit 2.4" TFT LCD with Touchscreen Breakout w/MicroSD Socket - ILI9341
* https://www.adafruit.com/product/2478
* 2.8" TFT LCD with Touchscreen Breakout Board w/MicroSD Socket - ILI9341
* https://www.adafruit.com/product/1770
* 2.2" 18-bit color TFT LCD display with microSD card breakout - ILI9340
* https://www.adafruit.com/product/1770
* TFT FeatherWing - 2.4" 320x240 Touchscreen For All Feathers
* https://www.adafruit.com/product/3315
*
* 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!
*
*
* This library depends on <a href="https://github.com/adafruit/Adafruit_GFX">
* Adafruit_GFX</a> being present on your system. Please make sure you have
* installed the latest version before using this library.
*
* Written by Limor "ladyada" Fried for Adafruit Industries.
*
* BSD license, all text here must be included in any redistribution.
*
*/
#ifndef _ADAFRUIT_ILI9341H_
#define _ADAFRUIT_ILI9341H_
#include "Arduino.h"
#include "Print.h"
#include <SPI.h>
#include "Adafruit_GFX.h"
#include <Adafruit_SPITFT.h>
#include <Adafruit_SPITFT_Macros.h>
#define ILI9341_TFTWIDTH 240 ///< ILI9341 max TFT width
#define ILI9341_TFTHEIGHT 320 ///< ILI9341 max TFT height
#define ILI9341_NOP 0x00 ///< No-op register
#define ILI9341_SWRESET 0x01 ///< Software reset register
#define ILI9341_RDDID 0x04 ///< Read display identification information
#define ILI9341_RDDST 0x09 ///< Read Display Status
#define ILI9341_SLPIN 0x10 ///< Enter Sleep Mode
#define ILI9341_SLPOUT 0x11 ///< Sleep Out
#define ILI9341_PTLON 0x12 ///< Partial Mode ON
#define ILI9341_NORON 0x13 ///< Normal Display Mode ON
#define ILI9341_RDMODE 0x0A ///< Read Display Power Mode
#define ILI9341_RDMADCTL 0x0B ///< Read Display MADCTL
#define ILI9341_RDPIXFMT 0x0C ///< Read Display Pixel Format
#define ILI9341_RDIMGFMT 0x0D ///< Read Display Image Format
#define ILI9341_RDSELFDIAG 0x0F ///< Read Display Self-Diagnostic Result
#define ILI9341_INVOFF 0x20 ///< Display Inversion OFF
#define ILI9341_INVON 0x21 ///< Display Inversion ON
#define ILI9341_GAMMASET 0x26 ///< Gamma Set
#define ILI9341_DISPOFF 0x28 ///< Display OFF
#define ILI9341_DISPON 0x29 ///< Display ON
#define ILI9341_CASET 0x2A ///< Column Address Set
#define ILI9341_PASET 0x2B ///< Page Address Set
#define ILI9341_RAMWR 0x2C ///< Memory Write
#define ILI9341_RAMRD 0x2E ///< Memory Read
#define ILI9341_PTLAR 0x30 ///< Partial Area
#define ILI9341_MADCTL 0x36 ///< Memory Access Control
#define ILI9341_VSCRSADD 0x37 ///< Vertical Scrolling Start Address
#define ILI9341_PIXFMT 0x3A ///< COLMOD: Pixel Format Set
#define ILI9341_FRMCTR1 0xB1 ///< Frame Rate Control (In Normal Mode/Full Colors)
#define ILI9341_FRMCTR2 0xB2 ///< Frame Rate Control (In Idle Mode/8 colors)
#define ILI9341_FRMCTR3 0xB3 ///< Frame Rate control (In Partial Mode/Full Colors)
#define ILI9341_INVCTR 0xB4 ///< Display Inversion Control
#define ILI9341_DFUNCTR 0xB6 ///< Display Function Control
#define ILI9341_PWCTR1 0xC0 ///< Power Control 1
#define ILI9341_PWCTR2 0xC1 ///< Power Control 2
#define ILI9341_PWCTR3 0xC2 ///< Power Control 3
#define ILI9341_PWCTR4 0xC3 ///< Power Control 4
#define ILI9341_PWCTR5 0xC4 ///< Power Control 5
#define ILI9341_VMCTR1 0xC5 ///< VCOM Control 1
#define ILI9341_VMCTR2 0xC7 ///< VCOM Control 2
#define ILI9341_RDID1 0xDA ///< Read ID 1
#define ILI9341_RDID2 0xDB ///< Read ID 2
#define ILI9341_RDID3 0xDC ///< Read ID 3
#define ILI9341_RDID4 0xDD ///< Read ID 4
#define ILI9341_GMCTRP1 0xE0 ///< Positive Gamma Correction
#define ILI9341_GMCTRN1 0xE1 ///< Negative Gamma Correction
//#define ILI9341_PWCTR6 0xFC
// Color definitions
#define ILI9341_BLACK 0x0000 ///< 0, 0, 0
#define ILI9341_NAVY 0x000F ///< 0, 0, 123
#define ILI9341_DARKGREEN 0x03E0 ///< 0, 125, 0
#define ILI9341_DARKCYAN 0x03EF ///< 0, 125, 123
#define ILI9341_MAROON 0x7800 ///< 123, 0, 0
#define ILI9341_PURPLE 0x780F ///< 123, 0, 123
#define ILI9341_OLIVE 0x7BE0 ///< 123, 125, 0
#define ILI9341_LIGHTGREY 0xC618 ///< 198, 195, 198
#define ILI9341_DARKGREY 0x7BEF ///< 123, 125, 123
#define ILI9341_BLUE 0x001F ///< 0, 0, 255
#define ILI9341_GREEN 0x07E0 ///< 0, 255, 0
#define ILI9341_CYAN 0x07FF ///< 0, 255, 255
#define ILI9341_RED 0xF800 ///< 255, 0, 0
#define ILI9341_MAGENTA 0xF81F ///< 255, 0, 255
#define ILI9341_YELLOW 0xFFE0 ///< 255, 255, 0
#define ILI9341_WHITE 0xFFFF ///< 255, 255, 255
#define ILI9341_ORANGE 0xFD20 ///< 255, 165, 0
#define ILI9341_GREENYELLOW 0xAFE5 ///< 173, 255, 41
#define ILI9341_PINK 0xFC18 ///< 255, 130, 198
///< Class to manage hardware interface with ILI9341 chipset (also seems to work with ILI9340)
class Adafruit_ILI9341 : public Adafruit_SPITFT {
public:
Adafruit_ILI9341(int8_t _CS, int8_t _DC, int8_t _MOSI, int8_t _SCLK, int8_t _RST = -1, int8_t _MISO = -1);
Adafruit_ILI9341(int8_t _CS, int8_t _DC, int8_t _RST = -1);
void begin(uint32_t freq=0);
void setRotation(uint8_t r);
void invertDisplay(boolean 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);
uint8_t readcommand8(uint8_t reg, uint8_t index=0);
};
#endif // _ADAFRUIT_ILI9341H_

View File

@ -1,35 +0,0 @@
# Adafruit ILI9341 Arduino Library [![Build Status](https://travis-ci.org/adafruit/Adafruit_ILI9341.svg?branch=master)](https://travis-ci.org/adafruit/Adafruit_ILI9341)
This is a library for the Adafruit ILI9341 display products
This library works with the Adafruit 2.8" Touch Shield V2 (SPI)
* http://www.adafruit.com/products/1651
Adafruit 2.4" TFT LCD with Touchscreen Breakout w/MicroSD Socket - ILI9341
* https://www.adafruit.com/product/2478
2.8" TFT LCD with Touchscreen Breakout Board w/MicroSD Socket - ILI9341
* https://www.adafruit.com/product/1770
2.2" 18-bit color TFT LCD display with microSD card breakout - ILI9340
* https://www.adafruit.com/product/1480
TFT FeatherWing - 2.4" 320x240 Touchscreen For All Feathers
* https://www.adafruit.com/product/3315
Check out the links above for our tutorials and wiring diagrams.
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!
Written by Limor Fried/Ladyada for Adafruit Industries.
MIT license, all text above must be included in any redistribution
To download. click the DOWNLOADS button in the top right corner, rename the uncompressed folder Adafruit_ILI9341. Check that the Adafruit_ILI9341 folder contains Adafruit_ILI9341.cpp and Adafruit_ILI9341.
Place the Adafruit_ILI9341 library folder your arduinosketchfolder/libraries/ folder. You may need to create the libraries subfolder if its your first library. Restart the IDE
Also requires the Adafruit_GFX library for Arduino.

View File

@ -1,145 +0,0 @@
/***************************************************
This is our touchscreen painting example for the Adafruit ILI9341 Breakout
----> http://www.adafruit.com/products/1770
Check out the links above for our tutorials and wiring diagrams
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!
Written by Limor Fried/Ladyada for Adafruit Industries.
MIT license, all text above must be included in any redistribution
****************************************************/
/** NOT FOR USE WITH THE TOUCH SHIELD, ONLY FOR THE BREAKOUT! **/
#include <Adafruit_GFX.h> // Core graphics library
#include <SPI.h>
#include <Adafruit_ILI9341.h>
#include "TouchScreen.h"
// These are the four touchscreen analog pins
#define YP A2 // must be an analog pin, use "An" notation!
#define XM A3 // must be an analog pin, use "An" notation!
#define YM 5 // can be a digital pin
#define XP 4 // can be a digital pin
// This is calibration data for the raw touch data to the screen coordinates
#define TS_MINX 150
#define TS_MINY 120
#define TS_MAXX 920
#define TS_MAXY 940
#define MINPRESSURE 10
#define MAXPRESSURE 1000
// The display uses hardware SPI, plus #9 & #10
#define TFT_CS 10
#define TFT_DC 9
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
// For better pressure precision, we need to know the resistance
// between X+ and X- Use any multimeter to read it
// For the one we're using, its 300 ohms across the X plate
TouchScreen ts = TouchScreen(XP, YP, XM, YM, 300);
// Size of the color selection boxes and the paintbrush size
#define BOXSIZE 40
#define PENRADIUS 3
int oldcolor, currentcolor;
void setup(void) {
// while (!Serial); // used for leonardo debugging
Serial.begin(9600);
Serial.println(F("Touch Paint!"));
tft.begin();
tft.fillScreen(ILI9341_BLACK);
// make the color selection boxes
tft.fillRect(0, 0, BOXSIZE, BOXSIZE, ILI9341_RED);
tft.fillRect(BOXSIZE, 0, BOXSIZE, BOXSIZE, ILI9341_YELLOW);
tft.fillRect(BOXSIZE*2, 0, BOXSIZE, BOXSIZE, ILI9341_GREEN);
tft.fillRect(BOXSIZE*3, 0, BOXSIZE, BOXSIZE, ILI9341_CYAN);
tft.fillRect(BOXSIZE*4, 0, BOXSIZE, BOXSIZE, ILI9341_BLUE);
tft.fillRect(BOXSIZE*5, 0, BOXSIZE, BOXSIZE, ILI9341_MAGENTA);
// select the current color 'red'
tft.drawRect(0, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE);
currentcolor = ILI9341_RED;
}
void loop()
{
// Retrieve a point
TSPoint p = ts.getPoint();
/*
Serial.print("X = "); Serial.print(p.x);
Serial.print("\tY = "); Serial.print(p.y);
Serial.print("\tPressure = "); Serial.println(p.z);
*/
// we have some minimum pressure we consider 'valid'
// pressure of 0 means no pressing!
if (p.z < MINPRESSURE || p.z > MAXPRESSURE) {
return;
}
// Scale from ~0->1000 to tft.width using the calibration #'s
p.x = map(p.x, TS_MINX, TS_MAXX, 0, tft.width());
p.y = map(p.y, TS_MINY, TS_MAXY, 0, tft.height());
/*
Serial.print("("); Serial.print(p.x);
Serial.print(", "); Serial.print(p.y);
Serial.println(")");
*/
if (p.y < BOXSIZE) {
oldcolor = currentcolor;
if (p.x < BOXSIZE) {
currentcolor = ILI9341_RED;
tft.drawRect(0, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE);
} else if (p.x < BOXSIZE*2) {
currentcolor = ILI9341_YELLOW;
tft.drawRect(BOXSIZE, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE);
} else if (p.x < BOXSIZE*3) {
currentcolor = ILI9341_GREEN;
tft.drawRect(BOXSIZE*2, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE);
} else if (p.x < BOXSIZE*4) {
currentcolor = ILI9341_CYAN;
tft.drawRect(BOXSIZE*3, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE);
} else if (p.x < BOXSIZE*5) {
currentcolor = ILI9341_BLUE;
tft.drawRect(BOXSIZE*4, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE);
} else if (p.x < BOXSIZE*6) {
currentcolor = ILI9341_MAGENTA;
tft.drawRect(BOXSIZE*5, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE);
}
if (oldcolor != currentcolor) {
if (oldcolor == ILI9341_RED)
tft.fillRect(0, 0, BOXSIZE, BOXSIZE, ILI9341_RED);
if (oldcolor == ILI9341_YELLOW)
tft.fillRect(BOXSIZE, 0, BOXSIZE, BOXSIZE, ILI9341_YELLOW);
if (oldcolor == ILI9341_GREEN)
tft.fillRect(BOXSIZE*2, 0, BOXSIZE, BOXSIZE, ILI9341_GREEN);
if (oldcolor == ILI9341_CYAN)
tft.fillRect(BOXSIZE*3, 0, BOXSIZE, BOXSIZE, ILI9341_CYAN);
if (oldcolor == ILI9341_BLUE)
tft.fillRect(BOXSIZE*4, 0, BOXSIZE, BOXSIZE, ILI9341_BLUE);
if (oldcolor == ILI9341_MAGENTA)
tft.fillRect(BOXSIZE*5, 0, BOXSIZE, BOXSIZE, ILI9341_MAGENTA);
}
}
if (((p.y-PENRADIUS) > BOXSIZE) && ((p.y+PENRADIUS) < tft.height())) {
tft.fillCircle(p.x, p.y, PENRADIUS, currentcolor);
}
}

View File

@ -1,265 +0,0 @@
/***************************************************
This is our touchscreen painting example for the Adafruit TFT FeatherWing
----> http://www.adafruit.com/products/3315
Check out the links above for our tutorials and wiring diagrams
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Written by Limor Fried/Ladyada for Adafruit Industries.
MIT license, all text above must be included in any redistribution
****************************************************/
#include <SPI.h>
#include <Wire.h> // this is needed even tho we aren't using it
#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_ILI9341.h> // Hardware-specific library
#include <SD.h>
#include <Adafruit_STMPE610.h>
#ifdef ESP8266
#define STMPE_CS 16
#define TFT_CS 0
#define TFT_DC 15
#define SD_CS 2
#endif
#ifdef ESP32
#define STMPE_CS 32
#define TFT_CS 15
#define TFT_DC 33
#define SD_CS 14
#endif
#ifdef TEENSYDUINO
#define TFT_DC 10
#define TFT_CS 4
#define STMPE_CS 3
#define SD_CS 8
#endif
#ifdef ARDUINO_STM32_FEATHER
#define TFT_DC PB4
#define TFT_CS PA15
#define STMPE_CS PC7
#define SD_CS PC5
#endif
#ifdef ARDUINO_NRF52_FEATHER /* BSP 0.6.5 and higher! */
#define TFT_DC 11
#define TFT_CS 31
#define STMPE_CS 30
#define SD_CS 27
#endif
#if defined(ARDUINO_MAX32620FTHR) || defined(ARDUINO_MAX32630FTHR)
#define TFT_DC P5_4
#define TFT_CS P5_3
#define STMPE_CS P3_3
#define SD_CS P3_2
#endif
// Anything else!
#if defined (__AVR_ATmega32U4__) || defined(ARDUINO_SAMD_FEATHER_M0) || defined (__AVR_ATmega328P__) || defined(ARDUINO_SAMD_ZERO) || defined(__SAMD51__) || defined(__SAM3X8E__)
#define STMPE_CS 6
#define TFT_CS 9
#define TFT_DC 10
#define SD_CS 5
#endif
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
Adafruit_STMPE610 ts = Adafruit_STMPE610(STMPE_CS);
// This is calibration data for the raw touch data to the screen coordinates
#define TS_MINX 3800
#define TS_MAXX 100
#define TS_MINY 100
#define TS_MAXY 3750
#define PENRADIUS 3
void setup(void) {
Serial.begin(115200);
delay(10);
Serial.println("FeatherWing TFT");
if (!ts.begin()) {
Serial.println("Couldn't start touchscreen controller");
while (1);
}
Serial.println("Touchscreen started");
tft.begin();
tft.fillScreen(ILI9341_BLUE);
yield();
Serial.print("Initializing SD card...");
if (!SD.begin(SD_CS)) {
Serial.println("failed!");
}
Serial.println("OK!");
bmpDraw("purple.bmp", 0, 0);
}
void loop() {
// Retrieve a point
TS_Point p = ts.getPoint();
Serial.print("X = "); Serial.print(p.x);
Serial.print("\tY = "); Serial.print(p.y);
Serial.print("\tPressure = "); Serial.println(p.z);
// Scale from ~0->4000 to tft.width using the calibration #'s
p.x = map(p.x, TS_MINX, TS_MAXX, 0, tft.width());
p.y = map(p.y, TS_MINY, TS_MAXY, 0, tft.height());
if (((p.y-PENRADIUS) > 0) && ((p.y+PENRADIUS) < tft.height())) {
tft.fillCircle(p.x, p.y, PENRADIUS, ILI9341_RED);
}
}
// This function opens a Windows Bitmap (BMP) file and
// displays it at the given coordinates. It's sped up
// by reading many pixels worth of data at a time
// (rather than pixel by pixel). Increasing the buffer
// size takes more of the Arduino's precious RAM but
// makes loading a little faster. 20 pixels seems a
// good balance.
#define BUFFPIXEL 20
void bmpDraw(char *filename, int16_t x, int16_t y) {
File bmpFile;
int bmpWidth, bmpHeight; // W+H in pixels
uint8_t bmpDepth; // Bit depth (currently must be 24)
uint32_t bmpImageoffset; // Start of image data in file
uint32_t rowSize; // Not always = bmpWidth; may have padding
uint8_t sdbuffer[3*BUFFPIXEL]; // pixel buffer (R+G+B per pixel)
uint8_t buffidx = sizeof(sdbuffer); // Current position in sdbuffer
boolean goodBmp = false; // Set to true on valid header parse
boolean flip = true; // BMP is stored bottom-to-top
int w, h, row, col;
uint8_t r, g, b;
uint32_t pos = 0, startTime = millis();
if((x >= tft.width()) || (y >= tft.height())) return;
Serial.println();
Serial.print(F("Loading image '"));
Serial.print(filename);
Serial.println('\'');
// Open requested file on SD card
if ((bmpFile = SD.open(filename)) == NULL) {
Serial.print(F("File not found"));
return;
}
// Parse BMP header
if(read16(bmpFile) == 0x4D42) { // BMP signature
Serial.print(F("File size: ")); Serial.println(read32(bmpFile));
(void)read32(bmpFile); // Read & ignore creator bytes
bmpImageoffset = read32(bmpFile); // Start of image data
Serial.print(F("Image Offset: ")); Serial.println(bmpImageoffset, DEC);
// Read DIB header
Serial.print(F("Header size: ")); Serial.println(read32(bmpFile));
bmpWidth = read32(bmpFile);
bmpHeight = read32(bmpFile);
if(read16(bmpFile) == 1) { // # planes -- must be '1'
bmpDepth = read16(bmpFile); // bits per pixel
Serial.print(F("Bit Depth: ")); Serial.println(bmpDepth);
if((bmpDepth == 24) && (read32(bmpFile) == 0)) { // 0 = uncompressed
goodBmp = true; // Supported BMP format -- proceed!
Serial.print(F("Image size: "));
Serial.print(bmpWidth);
Serial.print('x');
Serial.println(bmpHeight);
// BMP rows are padded (if needed) to 4-byte boundary
rowSize = (bmpWidth * 3 + 3) & ~3;
// If bmpHeight is negative, image is in top-down order.
// This is not canon but has been observed in the wild.
if(bmpHeight < 0) {
bmpHeight = -bmpHeight;
flip = false;
}
// Crop area to be loaded
w = bmpWidth;
h = bmpHeight;
if((x+w-1) >= tft.width()) w = tft.width() - x;
if((y+h-1) >= tft.height()) h = tft.height() - y;
// Set TFT address window to clipped image bounds
tft.startWrite();
tft.setAddrWindow(x, y, w, h);
for (row=0; row<h; row++) { // For each scanline...
// Seek to start of scan line. It might seem labor-
// intensive to be doing this on every line, but this
// method covers a lot of gritty details like cropping
// and scanline padding. Also, the seek only takes
// place if the file position actually needs to change
// (avoids a lot of cluster math in SD library).
if(flip) // Bitmap is stored bottom-to-top order (normal BMP)
pos = bmpImageoffset + (bmpHeight - 1 - row) * rowSize;
else // Bitmap is stored top-to-bottom
pos = bmpImageoffset + row * rowSize;
if(bmpFile.position() != pos) { // Need seek?
tft.endWrite();
bmpFile.seek(pos);
buffidx = sizeof(sdbuffer); // Force buffer reload
}
for (col=0; col<w; col++) { // For each pixel...
// Time to read more pixel data?
if (buffidx >= sizeof(sdbuffer)) { // Indeed
tft.endWrite();
bmpFile.read(sdbuffer, sizeof(sdbuffer));
tft.startWrite();
buffidx = 0; // Set index to beginning
}
// Convert pixel from BMP to TFT format, push to display
b = sdbuffer[buffidx++];
g = sdbuffer[buffidx++];
r = sdbuffer[buffidx++];
tft.pushColor(tft.color565(r,g,b));
} // end pixel
tft.endWrite();
} // end scanline
Serial.print(F("Loaded in "));
Serial.print(millis() - startTime);
Serial.println(" ms");
} // end goodBmp
}
}
bmpFile.close();
if(!goodBmp) Serial.println(F("BMP format not recognized."));
}
// These read 16- and 32-bit types from the SD card file.
// BMP data is stored little-endian, Arduino is little-endian too.
// May need to reverse subscript order if porting elsewhere.
uint16_t read16(File &f) {
uint16_t result;
((uint8_t *)&result)[0] = f.read(); // LSB
((uint8_t *)&result)[1] = f.read(); // MSB
return result;
}
uint32_t read32(File &f) {
uint32_t result;
((uint8_t *)&result)[0] = f.read(); // LSB
((uint8_t *)&result)[1] = f.read();
((uint8_t *)&result)[2] = f.read();
((uint8_t *)&result)[3] = f.read(); // MSB
return result;
}

View File

@ -1,365 +0,0 @@
/***************************************************
This is our GFX example for the Adafruit ILI9341 Breakout and Shield
----> http://www.adafruit.com/products/1651
Check out the links above for our tutorials and wiring diagrams
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!
Written by Limor Fried/Ladyada for Adafruit Industries.
MIT license, all text above must be included in any redistribution
****************************************************/
#include "SPI.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
// For the Adafruit shield, these are the default.
#define TFT_DC 9
#define TFT_CS 10
// Use hardware SPI (on Uno, #13, #12, #11) and the above for CS/DC
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
// If using the breakout, change pins as desired
//Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_MOSI, TFT_CLK, TFT_RST, TFT_MISO);
void setup() {
Serial.begin(9600);
Serial.println("ILI9341 Test!");
tft.begin();
// read diagnostics (optional but can help debug problems)
uint8_t x = tft.readcommand8(ILI9341_RDMODE);
Serial.print("Display Power Mode: 0x"); Serial.println(x, HEX);
x = tft.readcommand8(ILI9341_RDMADCTL);
Serial.print("MADCTL Mode: 0x"); Serial.println(x, HEX);
x = tft.readcommand8(ILI9341_RDPIXFMT);
Serial.print("Pixel Format: 0x"); Serial.println(x, HEX);
x = tft.readcommand8(ILI9341_RDIMGFMT);
Serial.print("Image Format: 0x"); Serial.println(x, HEX);
x = tft.readcommand8(ILI9341_RDSELFDIAG);
Serial.print("Self Diagnostic: 0x"); Serial.println(x, HEX);
Serial.println(F("Benchmark Time (microseconds)"));
delay(10);
Serial.print(F("Screen fill "));
Serial.println(testFillScreen());
delay(500);
Serial.print(F("Text "));
Serial.println(testText());
delay(3000);
Serial.print(F("Lines "));
Serial.println(testLines(ILI9341_CYAN));
delay(500);
Serial.print(F("Horiz/Vert Lines "));
Serial.println(testFastLines(ILI9341_RED, ILI9341_BLUE));
delay(500);
Serial.print(F("Rectangles (outline) "));
Serial.println(testRects(ILI9341_GREEN));
delay(500);
Serial.print(F("Rectangles (filled) "));
Serial.println(testFilledRects(ILI9341_YELLOW, ILI9341_MAGENTA));
delay(500);
Serial.print(F("Circles (filled) "));
Serial.println(testFilledCircles(10, ILI9341_MAGENTA));
Serial.print(F("Circles (outline) "));
Serial.println(testCircles(10, ILI9341_WHITE));
delay(500);
Serial.print(F("Triangles (outline) "));
Serial.println(testTriangles());
delay(500);
Serial.print(F("Triangles (filled) "));
Serial.println(testFilledTriangles());
delay(500);
Serial.print(F("Rounded rects (outline) "));
Serial.println(testRoundRects());
delay(500);
Serial.print(F("Rounded rects (filled) "));
Serial.println(testFilledRoundRects());
delay(500);
Serial.println(F("Done!"));
}
void loop(void) {
for(uint8_t rotation=0; rotation<4; rotation++) {
tft.setRotation(rotation);
testText();
delay(1000);
}
}
unsigned long testFillScreen() {
unsigned long start = micros();
tft.fillScreen(ILI9341_BLACK);
yield();
tft.fillScreen(ILI9341_RED);
yield();
tft.fillScreen(ILI9341_GREEN);
yield();
tft.fillScreen(ILI9341_BLUE);
yield();
tft.fillScreen(ILI9341_BLACK);
yield();
return micros() - start;
}
unsigned long testText() {
tft.fillScreen(ILI9341_BLACK);
unsigned long start = micros();
tft.setCursor(0, 0);
tft.setTextColor(ILI9341_WHITE); tft.setTextSize(1);
tft.println("Hello World!");
tft.setTextColor(ILI9341_YELLOW); tft.setTextSize(2);
tft.println(1234.56);
tft.setTextColor(ILI9341_RED); tft.setTextSize(3);
tft.println(0xDEADBEEF, HEX);
tft.println();
tft.setTextColor(ILI9341_GREEN);
tft.setTextSize(5);
tft.println("Groop");
tft.setTextSize(2);
tft.println("I implore thee,");
tft.setTextSize(1);
tft.println("my foonting turlingdromes.");
tft.println("And hooptiously drangle me");
tft.println("with crinkly bindlewurdles,");
tft.println("Or I will rend thee");
tft.println("in the gobberwarts");
tft.println("with my blurglecruncheon,");
tft.println("see if I don't!");
return micros() - start;
}
unsigned long testLines(uint16_t color) {
unsigned long start, t;
int x1, y1, x2, y2,
w = tft.width(),
h = tft.height();
tft.fillScreen(ILI9341_BLACK);
yield();
x1 = y1 = 0;
y2 = h - 1;
start = micros();
for(x2=0; x2<w; x2+=6) tft.drawLine(x1, y1, x2, y2, color);
x2 = w - 1;
for(y2=0; y2<h; y2+=6) tft.drawLine(x1, y1, x2, y2, color);
t = micros() - start; // fillScreen doesn't count against timing
yield();
tft.fillScreen(ILI9341_BLACK);
yield();
x1 = w - 1;
y1 = 0;
y2 = h - 1;
start = micros();
for(x2=0; x2<w; x2+=6) tft.drawLine(x1, y1, x2, y2, color);
x2 = 0;
for(y2=0; y2<h; y2+=6) tft.drawLine(x1, y1, x2, y2, color);
t += micros() - start;
yield();
tft.fillScreen(ILI9341_BLACK);
yield();
x1 = 0;
y1 = h - 1;
y2 = 0;
start = micros();
for(x2=0; x2<w; x2+=6) tft.drawLine(x1, y1, x2, y2, color);
x2 = w - 1;
for(y2=0; y2<h; y2+=6) tft.drawLine(x1, y1, x2, y2, color);
t += micros() - start;
yield();
tft.fillScreen(ILI9341_BLACK);
yield();
x1 = w - 1;
y1 = h - 1;
y2 = 0;
start = micros();
for(x2=0; x2<w; x2+=6) tft.drawLine(x1, y1, x2, y2, color);
x2 = 0;
for(y2=0; y2<h; y2+=6) tft.drawLine(x1, y1, x2, y2, color);
yield();
return micros() - start;
}
unsigned long testFastLines(uint16_t color1, uint16_t color2) {
unsigned long start;
int x, y, w = tft.width(), h = tft.height();
tft.fillScreen(ILI9341_BLACK);
start = micros();
for(y=0; y<h; y+=5) tft.drawFastHLine(0, y, w, color1);
for(x=0; x<w; x+=5) tft.drawFastVLine(x, 0, h, color2);
return micros() - start;
}
unsigned long testRects(uint16_t color) {
unsigned long start;
int n, i, i2,
cx = tft.width() / 2,
cy = tft.height() / 2;
tft.fillScreen(ILI9341_BLACK);
n = min(tft.width(), tft.height());
start = micros();
for(i=2; i<n; i+=6) {
i2 = i / 2;
tft.drawRect(cx-i2, cy-i2, i, i, color);
}
return micros() - start;
}
unsigned long testFilledRects(uint16_t color1, uint16_t color2) {
unsigned long start, t = 0;
int n, i, i2,
cx = tft.width() / 2 - 1,
cy = tft.height() / 2 - 1;
tft.fillScreen(ILI9341_BLACK);
n = min(tft.width(), tft.height());
for(i=n; i>0; i-=6) {
i2 = i / 2;
start = micros();
tft.fillRect(cx-i2, cy-i2, i, i, color1);
t += micros() - start;
// Outlines are not included in timing results
tft.drawRect(cx-i2, cy-i2, i, i, color2);
yield();
}
return t;
}
unsigned long testFilledCircles(uint8_t radius, uint16_t color) {
unsigned long start;
int x, y, w = tft.width(), h = tft.height(), r2 = radius * 2;
tft.fillScreen(ILI9341_BLACK);
start = micros();
for(x=radius; x<w; x+=r2) {
for(y=radius; y<h; y+=r2) {
tft.fillCircle(x, y, radius, color);
}
}
return micros() - start;
}
unsigned long testCircles(uint8_t radius, uint16_t color) {
unsigned long start;
int x, y, r2 = radius * 2,
w = tft.width() + radius,
h = tft.height() + radius;
// Screen is not cleared for this one -- this is
// intentional and does not affect the reported time.
start = micros();
for(x=0; x<w; x+=r2) {
for(y=0; y<h; y+=r2) {
tft.drawCircle(x, y, radius, color);
}
}
return micros() - start;
}
unsigned long testTriangles() {
unsigned long start;
int n, i, cx = tft.width() / 2 - 1,
cy = tft.height() / 2 - 1;
tft.fillScreen(ILI9341_BLACK);
n = min(cx, cy);
start = micros();
for(i=0; i<n; i+=5) {
tft.drawTriangle(
cx , cy - i, // peak
cx - i, cy + i, // bottom left
cx + i, cy + i, // bottom right
tft.color565(i, i, i));
}
return micros() - start;
}
unsigned long testFilledTriangles() {
unsigned long start, t = 0;
int i, cx = tft.width() / 2 - 1,
cy = tft.height() / 2 - 1;
tft.fillScreen(ILI9341_BLACK);
start = micros();
for(i=min(cx,cy); i>10; i-=5) {
start = micros();
tft.fillTriangle(cx, cy - i, cx - i, cy + i, cx + i, cy + i,
tft.color565(0, i*10, i*10));
t += micros() - start;
tft.drawTriangle(cx, cy - i, cx - i, cy + i, cx + i, cy + i,
tft.color565(i*10, i*10, 0));
yield();
}
return t;
}
unsigned long testRoundRects() {
unsigned long start;
int w, i, i2,
cx = tft.width() / 2 - 1,
cy = tft.height() / 2 - 1;
tft.fillScreen(ILI9341_BLACK);
w = min(tft.width(), tft.height());
start = micros();
for(i=0; i<w; i+=6) {
i2 = i / 2;
tft.drawRoundRect(cx-i2, cy-i2, i, i, i/8, tft.color565(i, 0, 0));
}
return micros() - start;
}
unsigned long testFilledRoundRects() {
unsigned long start;
int i, i2,
cx = tft.width() / 2 - 1,
cy = tft.height() / 2 - 1;
tft.fillScreen(ILI9341_BLACK);
start = micros();
for(i=min(tft.width(), tft.height()); i>20; i-=6) {
i2 = i / 2;
tft.fillRoundRect(cx-i2, cy-i2, i, i, i/8, tft.color565(0, i, 0));
yield();
}
return micros() - start;
}

View File

@ -1,404 +0,0 @@
/***************************************************
This is our GFX example for the Adafruit ILI9341 TFT FeatherWing
----> http://www.adafruit.com/products/3315
Check out the links above for our tutorials and wiring diagrams
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Written by Limor Fried/Ladyada for Adafruit Industries.
MIT license, all text above must be included in any redistribution
****************************************************/
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_ILI9341.h>
#ifdef ESP8266
#define STMPE_CS 16
#define TFT_CS 0
#define TFT_DC 15
#define SD_CS 2
#endif
#ifdef ESP32
#define STMPE_CS 32
#define TFT_CS 15
#define TFT_DC 33
#define SD_CS 14
#endif
#ifdef TEENSYDUINO
#define TFT_DC 10
#define TFT_CS 4
#define STMPE_CS 3
#define SD_CS 8
#endif
#ifdef ARDUINO_STM32_FEATHER
#define TFT_DC PB4
#define TFT_CS PA15
#define STMPE_CS PC7
#define SD_CS PC5
#endif
#ifdef ARDUINO_NRF52_FEATHER /* BSP 0.6.5 and higher! */
#define TFT_DC 11
#define TFT_CS 31
#define STMPE_CS 30
#define SD_CS 27
#endif
#if defined(ARDUINO_MAX32620FTHR) || defined(ARDUINO_MAX32630FTHR)
#define TFT_DC P5_4
#define TFT_CS P5_3
#define STMPE_CS P3_3
#define SD_CS P3_2
#endif
// Anything else!
#if defined (__AVR_ATmega32U4__) || defined(ARDUINO_SAMD_FEATHER_M0) || defined (__AVR_ATmega328P__) || defined(ARDUINO_SAMD_ZERO) || defined(__SAMD51__) || defined(__SAM3X8E__)
#define STMPE_CS 6
#define TFT_CS 9
#define TFT_DC 10
#define SD_CS 5
#endif
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
void setup() {
Serial.begin(115200);
delay(10);
Serial.println("FeatherWing TFT Test!");
tft.begin();
// read diagnostics (optional but can help debug problems)
uint8_t x = tft.readcommand8(ILI9341_RDMODE);
Serial.print("Display Power Mode: 0x"); Serial.println(x, HEX);
x = tft.readcommand8(ILI9341_RDMADCTL);
Serial.print("MADCTL Mode: 0x"); Serial.println(x, HEX);
x = tft.readcommand8(ILI9341_RDPIXFMT);
Serial.print("Pixel Format: 0x"); Serial.println(x, HEX);
x = tft.readcommand8(ILI9341_RDIMGFMT);
Serial.print("Image Format: 0x"); Serial.println(x, HEX);
x = tft.readcommand8(ILI9341_RDSELFDIAG);
Serial.print("Self Diagnostic: 0x"); Serial.println(x, HEX);
Serial.println(F("Benchmark Time (microseconds)"));
delay(10);
Serial.print(F("Screen fill "));
Serial.println(testFillScreen());
delay(500);
Serial.print(F("Text "));
Serial.println(testText());
delay(3000);
Serial.print(F("Lines "));
Serial.println(testLines(ILI9341_CYAN));
delay(500);
Serial.print(F("Horiz/Vert Lines "));
Serial.println(testFastLines(ILI9341_RED, ILI9341_BLUE));
delay(500);
Serial.print(F("Rectangles (outline) "));
Serial.println(testRects(ILI9341_GREEN));
delay(500);
Serial.print(F("Rectangles (filled) "));
Serial.println(testFilledRects(ILI9341_YELLOW, ILI9341_MAGENTA));
delay(500);
Serial.print(F("Circles (filled) "));
Serial.println(testFilledCircles(10, ILI9341_MAGENTA));
Serial.print(F("Circles (outline) "));
Serial.println(testCircles(10, ILI9341_WHITE));
delay(500);
Serial.print(F("Triangles (outline) "));
Serial.println(testTriangles());
delay(500);
Serial.print(F("Triangles (filled) "));
Serial.println(testFilledTriangles());
delay(500);
Serial.print(F("Rounded rects (outline) "));
Serial.println(testRoundRects());
delay(500);
Serial.print(F("Rounded rects (filled) "));
Serial.println(testFilledRoundRects());
delay(500);
Serial.println(F("Done!"));
}
void loop(void) {
for(uint8_t rotation=0; rotation<4; rotation++) {
tft.setRotation(rotation);
testText();
delay(1000);
}
}
unsigned long testFillScreen() {
unsigned long start = micros();
tft.fillScreen(ILI9341_BLACK);
yield();
tft.fillScreen(ILI9341_RED);
yield();
tft.fillScreen(ILI9341_GREEN);
yield();
tft.fillScreen(ILI9341_BLUE);
yield();
tft.fillScreen(ILI9341_BLACK);
yield();
return micros() - start;
}
unsigned long testText() {
tft.fillScreen(ILI9341_BLACK);
unsigned long start = micros();
tft.setCursor(0, 0);
tft.setTextColor(ILI9341_WHITE); tft.setTextSize(1);
tft.println("Hello World!");
tft.setTextColor(ILI9341_YELLOW); tft.setTextSize(2);
tft.println(1234.56);
tft.setTextColor(ILI9341_RED); tft.setTextSize(3);
tft.println(0xDEADBEEF, HEX);
tft.println();
tft.setTextColor(ILI9341_GREEN);
tft.setTextSize(5);
tft.println("Groop");
tft.setTextSize(2);
tft.println("I implore thee,");
tft.setTextSize(1);
tft.println("my foonting turlingdromes.");
tft.println("And hooptiously drangle me");
tft.println("with crinkly bindlewurdles,");
tft.println("Or I will rend thee");
tft.println("in the gobberwarts");
tft.println("with my blurglecruncheon,");
tft.println("see if I don't!");
return micros() - start;
}
unsigned long testLines(uint16_t color) {
unsigned long start, t;
int x1, y1, x2, y2,
w = tft.width(),
h = tft.height();
tft.fillScreen(ILI9341_BLACK);
yield();
x1 = y1 = 0;
y2 = h - 1;
start = micros();
for(x2=0; x2<w; x2+=6) tft.drawLine(x1, y1, x2, y2, color);
x2 = w - 1;
for(y2=0; y2<h; y2+=6) tft.drawLine(x1, y1, x2, y2, color);
t = micros() - start; // fillScreen doesn't count against timing
yield();
tft.fillScreen(ILI9341_BLACK);
yield();
x1 = w - 1;
y1 = 0;
y2 = h - 1;
start = micros();
for(x2=0; x2<w; x2+=6) tft.drawLine(x1, y1, x2, y2, color);
x2 = 0;
for(y2=0; y2<h; y2+=6) tft.drawLine(x1, y1, x2, y2, color);
t += micros() - start;
yield();
tft.fillScreen(ILI9341_BLACK);
yield();
x1 = 0;
y1 = h - 1;
y2 = 0;
start = micros();
for(x2=0; x2<w; x2+=6) tft.drawLine(x1, y1, x2, y2, color);
x2 = w - 1;
for(y2=0; y2<h; y2+=6) tft.drawLine(x1, y1, x2, y2, color);
t += micros() - start;
yield();
tft.fillScreen(ILI9341_BLACK);
yield();
x1 = w - 1;
y1 = h - 1;
y2 = 0;
start = micros();
for(x2=0; x2<w; x2+=6) tft.drawLine(x1, y1, x2, y2, color);
x2 = 0;
for(y2=0; y2<h; y2+=6) tft.drawLine(x1, y1, x2, y2, color);
yield();
return micros() - start;
}
unsigned long testFastLines(uint16_t color1, uint16_t color2) {
unsigned long start;
int x, y, w = tft.width(), h = tft.height();
tft.fillScreen(ILI9341_BLACK);
start = micros();
for(y=0; y<h; y+=5) tft.drawFastHLine(0, y, w, color1);
for(x=0; x<w; x+=5) tft.drawFastVLine(x, 0, h, color2);
return micros() - start;
}
unsigned long testRects(uint16_t color) {
unsigned long start;
int n, i, i2,
cx = tft.width() / 2,
cy = tft.height() / 2;
tft.fillScreen(ILI9341_BLACK);
n = min(tft.width(), tft.height());
start = micros();
for(i=2; i<n; i+=6) {
i2 = i / 2;
tft.drawRect(cx-i2, cy-i2, i, i, color);
}
return micros() - start;
}
unsigned long testFilledRects(uint16_t color1, uint16_t color2) {
unsigned long start, t = 0;
int n, i, i2,
cx = tft.width() / 2 - 1,
cy = tft.height() / 2 - 1;
tft.fillScreen(ILI9341_BLACK);
n = min(tft.width(), tft.height());
for(i=n; i>0; i-=6) {
i2 = i / 2;
start = micros();
tft.fillRect(cx-i2, cy-i2, i, i, color1);
t += micros() - start;
// Outlines are not included in timing results
tft.drawRect(cx-i2, cy-i2, i, i, color2);
yield();
}
return t;
}
unsigned long testFilledCircles(uint8_t radius, uint16_t color) {
unsigned long start;
int x, y, w = tft.width(), h = tft.height(), r2 = radius * 2;
tft.fillScreen(ILI9341_BLACK);
start = micros();
for(x=radius; x<w; x+=r2) {
for(y=radius; y<h; y+=r2) {
tft.fillCircle(x, y, radius, color);
}
}
return micros() - start;
}
unsigned long testCircles(uint8_t radius, uint16_t color) {
unsigned long start;
int x, y, r2 = radius * 2,
w = tft.width() + radius,
h = tft.height() + radius;
// Screen is not cleared for this one -- this is
// intentional and does not affect the reported time.
start = micros();
for(x=0; x<w; x+=r2) {
for(y=0; y<h; y+=r2) {
tft.drawCircle(x, y, radius, color);
}
}
return micros() - start;
}
unsigned long testTriangles() {
unsigned long start;
int n, i, cx = tft.width() / 2 - 1,
cy = tft.height() / 2 - 1;
tft.fillScreen(ILI9341_BLACK);
n = min(cx, cy);
start = micros();
for(i=0; i<n; i+=5) {
tft.drawTriangle(
cx , cy - i, // peak
cx - i, cy + i, // bottom left
cx + i, cy + i, // bottom right
tft.color565(i, i, i));
}
return micros() - start;
}
unsigned long testFilledTriangles() {
unsigned long start, t = 0;
int i, cx = tft.width() / 2 - 1,
cy = tft.height() / 2 - 1;
tft.fillScreen(ILI9341_BLACK);
start = micros();
for(i=min(cx,cy); i>10; i-=5) {
start = micros();
tft.fillTriangle(cx, cy - i, cx - i, cy + i, cx + i, cy + i,
tft.color565(0, i*10, i*10));
t += micros() - start;
tft.drawTriangle(cx, cy - i, cx - i, cy + i, cx + i, cy + i,
tft.color565(i*10, i*10, 0));
yield();
}
return t;
}
unsigned long testRoundRects() {
unsigned long start;
int w, i, i2,
cx = tft.width() / 2 - 1,
cy = tft.height() / 2 - 1;
tft.fillScreen(ILI9341_BLACK);
w = min(tft.width(), tft.height());
start = micros();
for(i=0; i<w; i+=6) {
i2 = i / 2;
tft.drawRoundRect(cx-i2, cy-i2, i, i, i/8, tft.color565(i, 0, 0));
}
return micros() - start;
}
unsigned long testFilledRoundRects() {
unsigned long start;
int i, i2,
cx = tft.width() / 2 - 1,
cy = tft.height() / 2 - 1;
tft.fillScreen(ILI9341_BLACK);
start = micros();
for(i=min(tft.width(), tft.height()); i>20; i-=6) {
i2 = i / 2;
tft.fillRoundRect(cx-i2, cy-i2, i, i, i/8, tft.color565(0, i, 0));
yield();
}
return micros() - start;
}

View File

@ -1,125 +0,0 @@
//This example implements a simple sliding On/Off button. The example
// demonstrates drawing and touch operations.
//
//Thanks to Adafruit forums member Asteroid for the original sketch!
//
#include <Adafruit_GFX.h>
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_ILI9341.h>
#include <Adafruit_STMPE610.h>
// This is calibration data for the raw touch data to the screen coordinates
#define TS_MINX 150
#define TS_MINY 130
#define TS_MAXX 3800
#define TS_MAXY 4000
#define STMPE_CS 8
Adafruit_STMPE610 ts = Adafruit_STMPE610(STMPE_CS);
#define TFT_CS 10
#define TFT_DC 9
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
boolean RecordOn = false;
#define FRAME_X 210
#define FRAME_Y 180
#define FRAME_W 100
#define FRAME_H 50
#define REDBUTTON_X FRAME_X
#define REDBUTTON_Y FRAME_Y
#define REDBUTTON_W (FRAME_W/2)
#define REDBUTTON_H FRAME_H
#define GREENBUTTON_X (REDBUTTON_X + REDBUTTON_W)
#define GREENBUTTON_Y FRAME_Y
#define GREENBUTTON_W (FRAME_W/2)
#define GREENBUTTON_H FRAME_H
void drawFrame()
{
tft.drawRect(FRAME_X, FRAME_Y, FRAME_W, FRAME_H, ILI9341_BLACK);
}
void redBtn()
{
tft.fillRect(REDBUTTON_X, REDBUTTON_Y, REDBUTTON_W, REDBUTTON_H, ILI9341_RED);
tft.fillRect(GREENBUTTON_X, GREENBUTTON_Y, GREENBUTTON_W, GREENBUTTON_H, ILI9341_BLUE);
drawFrame();
tft.setCursor(GREENBUTTON_X + 6 , GREENBUTTON_Y + (GREENBUTTON_H/2));
tft.setTextColor(ILI9341_WHITE);
tft.setTextSize(2);
tft.println("ON");
RecordOn = false;
}
void greenBtn()
{
tft.fillRect(GREENBUTTON_X, GREENBUTTON_Y, GREENBUTTON_W, GREENBUTTON_H, ILI9341_GREEN);
tft.fillRect(REDBUTTON_X, REDBUTTON_Y, REDBUTTON_W, REDBUTTON_H, ILI9341_BLUE);
drawFrame();
tft.setCursor(REDBUTTON_X + 6 , REDBUTTON_Y + (REDBUTTON_H/2));
tft.setTextColor(ILI9341_WHITE);
tft.setTextSize(2);
tft.println("OFF");
RecordOn = true;
}
void setup(void)
{
Serial.begin(9600);
tft.begin();
if (!ts.begin()) {
Serial.println("Unable to start touchscreen.");
}
else {
Serial.println("Touchscreen started.");
}
tft.fillScreen(ILI9341_BLUE);
// origin = left,top landscape (USB left upper)
tft.setRotation(1);
redBtn();
}
void loop()
{
// See if there's any touch data for us
if (!ts.bufferEmpty())
{
// Retrieve a point
TS_Point p = ts.getPoint();
// Scale using the calibration #'s
// and rotate coordinate system
p.x = map(p.x, TS_MINY, TS_MAXY, 0, tft.height());
p.y = map(p.y, TS_MINX, TS_MAXX, 0, tft.width());
int y = tft.height() - p.x;
int x = p.y;
if (RecordOn)
{
if((x > REDBUTTON_X) && (x < (REDBUTTON_X + REDBUTTON_W))) {
if ((y > REDBUTTON_Y) && (y <= (REDBUTTON_Y + REDBUTTON_H))) {
Serial.println("Red btn hit");
redBtn();
}
}
}
else //Record is off (RecordOn == false)
{
if((x > GREENBUTTON_X) && (x < (GREENBUTTON_X + GREENBUTTON_W))) {
if ((y > GREENBUTTON_Y) && (y <= (GREENBUTTON_Y + GREENBUTTON_H))) {
Serial.println("Green btn hit");
greenBtn();
}
}
}
Serial.println(RecordOn);
}
}

View File

@ -1,133 +0,0 @@
//This example implements a simple sliding On/Off button. The example
// demonstrates drawing and touch operations.
//
//Thanks to Adafruit forums member Asteroid for the original sketch!
//
#include <Adafruit_GFX.h>
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_ILI9341.h>
#include <TouchScreen.h>
//Touchscreen X+ X- Y+ Y- pins
#define YP A3 // must be an analog pin, use "An" notation!
#define XM A2 // must be an analog pin, use "An" notation!
#define YM 5 // can be a digital pin
#define XP 4 // can be a digital pin
// This is calibration data for the raw touch data to the screen coordinates
#define TS_MINX 150
#define TS_MINY 120
#define TS_MAXX 920
#define TS_MAXY 940
#define MINPRESSURE 10
#define MAXPRESSURE 1000
// For better pressure precision, we need to know the resistance
// between X+ and X- Use any multimeter to read it
// For the one we're using, its 300 ohms across the X plate
TouchScreen ts = TouchScreen(XP, YP, XM, YM, 300);
#define TFT_CS 10
#define TFT_DC 9
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
boolean RecordOn = false;
#define FRAME_X 210
#define FRAME_Y 180
#define FRAME_W 100
#define FRAME_H 50
#define REDBUTTON_X FRAME_X
#define REDBUTTON_Y FRAME_Y
#define REDBUTTON_W (FRAME_W/2)
#define REDBUTTON_H FRAME_H
#define GREENBUTTON_X (REDBUTTON_X + REDBUTTON_W)
#define GREENBUTTON_Y FRAME_Y
#define GREENBUTTON_W (FRAME_W/2)
#define GREENBUTTON_H FRAME_H
void drawFrame()
{
tft.drawRect(FRAME_X, FRAME_Y, FRAME_W, FRAME_H, ILI9341_BLACK);
}
void redBtn()
{
tft.fillRect(REDBUTTON_X, REDBUTTON_Y, REDBUTTON_W, REDBUTTON_H, ILI9341_RED);
tft.fillRect(GREENBUTTON_X, GREENBUTTON_Y, GREENBUTTON_W, GREENBUTTON_H, ILI9341_BLUE);
drawFrame();
tft.setCursor(GREENBUTTON_X + 6 , GREENBUTTON_Y + (GREENBUTTON_H/2));
tft.setTextColor(ILI9341_WHITE);
tft.setTextSize(2);
tft.println("ON");
RecordOn = false;
}
void greenBtn()
{
tft.fillRect(GREENBUTTON_X, GREENBUTTON_Y, GREENBUTTON_W, GREENBUTTON_H, ILI9341_GREEN);
tft.fillRect(REDBUTTON_X, REDBUTTON_Y, REDBUTTON_W, REDBUTTON_H, ILI9341_BLUE);
drawFrame();
tft.setCursor(REDBUTTON_X + 6 , REDBUTTON_Y + (REDBUTTON_H/2));
tft.setTextColor(ILI9341_WHITE);
tft.setTextSize(2);
tft.println("OFF");
RecordOn = true;
}
void setup(void)
{
Serial.begin(9600);
tft.begin();
tft.fillScreen(ILI9341_BLUE);
// origin = left,top landscape (USB left upper)
tft.setRotation(1);
redBtn();
}
void loop()
{
// Retrieve a point
TSPoint p = ts.getPoint();
// See if there's any touch data for us
if (p.z > MINPRESSURE && p.z < MAXPRESSURE)
{
// Scale using the calibration #'s
// and rotate coordinate system
p.x = map(p.x, TS_MINY, TS_MAXY, 0, tft.height());
p.y = map(p.y, TS_MINX, TS_MAXX, 0, tft.width());
int y = tft.height() - p.x;
int x = p.y;
if (RecordOn)
{
if((x > REDBUTTON_X) && (x < (REDBUTTON_X + REDBUTTON_W))) {
if ((y > REDBUTTON_Y) && (y <= (REDBUTTON_Y + REDBUTTON_H))) {
Serial.println("Red btn hit");
redBtn();
}
}
}
else //Record is off (RecordOn == false)
{
if((x > GREENBUTTON_X) && (x < (GREENBUTTON_X + GREENBUTTON_W))) {
if ((y > GREENBUTTON_Y) && (y <= (GREENBUTTON_Y + GREENBUTTON_H))) {
Serial.println("Green btn hit");
greenBtn();
}
}
}
Serial.println(RecordOn);
}
}

View File

@ -1,861 +0,0 @@
#define DRAGON_WIDTH 110
#define DRAGON_HEIGHT 70
const PROGMEM uint16_t dragonBitmap[DRAGON_WIDTH * DRAGON_HEIGHT] = {
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0X8C10, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XBD14, 0XAC92, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XDEFB, 0XB431, 0XA1C9, 0XAA4B, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XCE18, 0X9A2A, 0X9044,
0XDEFB, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XEF7D,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XDEFB, 0XB3B0, 0XA148, 0XB865, 0XC066, 0XC066, 0XAA4B,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XEF7D, 0XAB2E, 0X9864,
0XA865, 0XAAAC, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XEF7D, 0XAC92,
0X728B, 0XDEFB, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XCE18, 0XAB2E, 0XAA4B, 0XAA4B, 0XAA4B, 0XA3AF,
0XB431, 0XB431, 0XB431, 0XA411, 0XA8E6, 0XD086, 0XB865, 0X7043, 0XA865,
0XD086, 0XAA4B, 0XCE79, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XB493, 0XA8E6,
0X9864, 0XC066, 0XD086, 0XB493, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XCE79, 0X830D,
0X80C5, 0XAB2E, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XB431, 0XC066, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0XD086, 0XB865, 0X9864,
0XC066, 0XD086, 0XB8E7, 0XB493, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XDE9A, 0XA1C9,
0XB865, 0X9864, 0XD086, 0XD086, 0XD086, 0XBDF7, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XEF7D, 0XAD14, 0X71A8,
0X9864, 0XC066, 0XC515, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XDEFB, 0XBDF7, 0XBD14, 0XA411, 0XB431, 0XB148, 0XD086, 0XC066,
0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XC066, 0XD086, 0XA865,
0XB865, 0XD086, 0XD086, 0XB1CA, 0XDEFB, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XEF7D, 0XB3B0,
0XB865, 0XA865, 0XB865, 0XD086, 0XD086, 0XD086, 0XD086, 0XBD14, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XCE79, 0X932D, 0X78C5,
0XA865, 0XD086, 0XC066, 0XC515, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XDEFB, 0XAB2E, 0XA0C6, 0XB865, 0XD086, 0XD086, 0XD086, 0X9864, 0XD086,
0XB865, 0X78C5, 0X4208, 0X2104, 0X8947, 0X9864, 0X9864, 0X9864, 0XD086,
0XD086, 0XA865, 0X9864, 0XD086, 0XB865, 0XDEFB, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XCE18,
0XB148, 0XC066, 0XA865, 0XB865, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0XAA4B, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XEF7D, 0XB493, 0X89A8, 0X9044,
0XB865, 0XD086, 0XD086, 0XC066, 0XC515, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0X7B8E, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XAD14, 0XDEFB, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XB431, 0XB865, 0XD086, 0XD086, 0XD086, 0XD086, 0XC066, 0XA865,
0X9864, 0XD086, 0XD086, 0XD086, 0XAA4B, 0X9A2A, 0XC066, 0XD086, 0XD086,
0XD086, 0XD086, 0XC066, 0X9044, 0X9864, 0X9864, 0X9044, 0XCE18, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XEF7D,
0XB3B0, 0XC066, 0XB865, 0XA865, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XAAAC, 0XBD96, 0XAD14, 0XAAAC, 0X8044, 0X9864,
0XB865, 0XD086, 0XD086, 0XD086, 0XD086, 0XB431, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XB3B0, 0XAA4B, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XBD96, 0XB8E7, 0XB431, 0XEF7D, 0XFFFF,
0XFFFF, 0XFFFF, 0XA32E, 0X9864, 0X9864, 0XAA4B, 0XAA4B, 0X9147, 0XB865,
0X9044, 0XD086, 0XA865, 0XD086, 0XC066, 0XC066, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0XD086, 0XD086, 0XD086,
0XAA4B, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XDE9A, 0XB148, 0XD086, 0XA865, 0XB865, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0XA865, 0X9864, 0X9864, 0XA865, 0X9864,
0XC066, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XA148, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XC515, 0XC066, 0XAA4B, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XAA4B, 0XD086,
0XA865, 0XAB2E, 0XBD96, 0XEF7D, 0XCE79, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XDEFB, 0XB1CA, 0XD086, 0XD086, 0X9864, 0X822A, 0XBDF7, 0XB493,
0XB148, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XA865, 0X9864,
0XD086, 0XD086, 0XD086, 0XAA4B, 0XBD14, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XB431, 0XB865, 0XD086, 0X9864, 0XC066, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XC066, 0X9864, 0X9864, 0XC066, 0XA865, 0X9864,
0XC066, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XB3B0,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XCD96, 0XC066, 0XD086, 0XAA4B, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XDE9A, 0XB865, 0XD086, 0XD086, 0XD086, 0XA865, 0X9147, 0X9C92, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XCE18, 0X80C5, 0X5822, 0X5A08, 0XDEFB,
0XFFFF, 0XFFFF, 0XCE79, 0XA0C6, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0X9044, 0XB865, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XAB2E, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XEF7D, 0XAA4B, 0XD086, 0XC066, 0X9864, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XA865, 0X9864, 0XA865, 0XD086, 0X9864, 0X9864,
0XC066, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0XAB2E, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XDE9A, 0XB8E7, 0XD086, 0XD086,
0XAA4B, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XC515, 0XC066, 0XD086, 0XB865, 0X8044, 0X82AB,
0XBDF7, 0XBDF7, 0XBDF7, 0XBDF7, 0XBDF7, 0XBDF7, 0XAC92, 0XA3AF, 0X92AC,
0XAB2E, 0XAA4B, 0XA1C9, 0X9864, 0XB865, 0XA865, 0XC066, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0X9864, 0XD086, 0XD086, 0XD086, 0XB1CA, 0XBD14,
0X9CF3, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XCE18, 0XA8E6, 0XD086, 0XC066, 0XA865, 0XD086, 0XD086,
0XD086, 0XD086, 0XC066, 0X9864, 0X9864, 0XC066, 0XD086, 0X9864, 0X9864,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XC066, 0XC515, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XDE9A, 0XB8E7, 0XD086,
0XD086, 0XD086, 0XAA4B, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XB3B0, 0XD086, 0XA865,
0XC066, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XC066, 0XA865, 0X8044, 0X4822, 0X9044, 0X9044,
0XD086, 0XD086, 0XD086, 0XD086, 0X8044, 0X9864, 0XD086, 0XD086, 0XD086,
0XAA4B, 0XCE18, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XB493, 0XC066, 0XD086, 0XC066, 0XA865, 0XD086,
0XD086, 0XD086, 0XA865, 0X9864, 0XA865, 0XD086, 0XC066, 0X9864, 0X9864,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0X9044, 0X3986, 0XCE79,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XDE9A, 0XB8E7,
0XD086, 0XD086, 0XC066, 0XD086, 0XAA4B, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XB431, 0XC066, 0X90C6, 0XAA4B, 0XAA4B, 0XAA4B, 0XAA4B, 0X99C9, 0X9864,
0X9864, 0X9864, 0X6843, 0X6843, 0X5822, 0X4822, 0X7043, 0X9044, 0XC066,
0X9864, 0X7043, 0XC066, 0XB865, 0XD086, 0X7043, 0X8044, 0XC066, 0XD086,
0XD086, 0XD086, 0XD086, 0XC066, 0XB431, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XEF7D, 0XAB2E, 0XD086, 0XD086, 0XC066, 0XA865,
0XD086, 0XD086, 0X9864, 0X9044, 0XC066, 0XD086, 0XC066, 0X9864, 0XA865,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0XB865, 0X9864, 0X9864, 0X9864, 0X9044, 0X6843, 0X6843, 0X8044, 0X7B0C,
0XCE79, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XDE9A,
0XB8E7, 0XD086, 0X9864, 0XC066, 0X9864, 0XD086, 0XAA4B, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XC515, 0XA8E6, 0XCE18, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XA148, 0XD086, 0XD086, 0XD086, 0XD086,
0XB148, 0XBD14, 0X9A2A, 0XD086, 0X9864, 0X9864, 0X6843, 0XD086, 0XC066,
0XC066, 0XD086, 0XD086, 0XD086, 0XA865, 0XC066, 0XA865, 0XEF7D, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XEF7D, 0XB1CA, 0XD086, 0XD086, 0XD086,
0X9864, 0XC066, 0X9864, 0X9864, 0XD086, 0XD086, 0XC066, 0X9864, 0XA865,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XC066, 0X9864, 0X9864, 0X9864,
0X9864, 0X9864, 0X9864, 0X9864, 0X9864, 0X9864, 0XA865, 0XD086, 0XA1C9,
0XDE9A, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XDE9A, 0XB8E7, 0XD086, 0XD086, 0X9864, 0XD086, 0X9864, 0XD086, 0XAA4B,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XDEFB, 0XCE18, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XAA4B, 0XD086, 0XC066,
0XD086, 0XAAAC, 0XEF7D, 0XFFFF, 0X932D, 0XB865, 0XB865, 0XC066, 0X7043,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XB148, 0XEF7D, 0XBD14, 0XA148,
0XBDF7, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XAA4B, 0XD086, 0XD086,
0XD086, 0X8044, 0X9864, 0XA865, 0XD086, 0XD086, 0XC066, 0X9864, 0XA865,
0XD086, 0XD086, 0XA865, 0X9864, 0X9864, 0X9864, 0X9864, 0XA865, 0XD086,
0XB865, 0X9864, 0X9864, 0X9864, 0XB865, 0XD086, 0XD086, 0XD086, 0XD086,
0XAB2E, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XDE9A, 0XB8E7, 0XD086, 0XD086, 0XC066, 0XA865, 0XD086, 0X9864,
0XD086, 0XA0C6, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0X8C10, 0XB431, 0XEF7D, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XBD14,
0XD086, 0XA1C9, 0X80C5, 0XEF7D, 0XFFFF, 0XB431, 0XD086, 0XB865, 0X9864,
0X8044, 0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XAA4B, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XBD14, 0XD086,
0XD086, 0XD086, 0XA865, 0XB865, 0XD086, 0XD086, 0XC066, 0X9864, 0X9864,
0X9864, 0X9044, 0X9864, 0X9864, 0XC066, 0XD086, 0XD086, 0XB865, 0X9864,
0X9864, 0X9864, 0XB865, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0XAB2E, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XDE9A, 0XB8E7, 0XD086, 0XD086, 0XD086, 0X9864, 0XD086,
0XD086, 0X9864, 0XD086, 0X9864, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XEF7D, 0XB148,
0XA1C9, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XBDF7, 0XD086, 0XBD14, 0XEF7D, 0XFFFF, 0XFFFF, 0XA148, 0XD086,
0XD086, 0XD086, 0X9864, 0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0XC066, 0XB431, 0XEF7D, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XAA4B, 0XD086, 0XD086, 0XD086, 0X9864, 0XD086, 0XD086, 0XC066, 0X7043,
0X9864, 0XA865, 0XD086, 0XD086, 0XD086, 0XC066, 0X9864, 0X9864, 0X9864,
0XB865, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XAAAC, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XA32E, 0XAA4B, 0XAA4B, 0XAA4B, 0XAB2E,
0X9044, 0XD086, 0XA865, 0X9864, 0XD086, 0XD086, 0XBDF7, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XEF7D, 0XBDF7, 0XDEFB, 0XFFFF, 0XFFFF,
0XFFFF, 0XB431, 0XB865, 0XAC92, 0XFFFF, 0XEF7D, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XEF7D, 0X8947, 0XEF7D, 0XFFFF, 0XFFFF, 0XEF7D,
0X9044, 0XD086, 0XD086, 0XB865, 0XB865, 0X9864, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0XA0C6, 0XEF7D, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0X9864, 0XD086, 0XD086, 0X9864, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0X9864, 0X9864, 0XA865, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XA8E6, 0XEF7D, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XCE18, 0XC066, 0XD086, 0XA1C9, 0XB431, 0XD086, 0XD086, 0XB493,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XEF7D, 0XAB2E, 0XB865,
0XB3B0, 0XFFFF, 0XFFFF, 0X9AAC, 0XB865, 0XA148, 0XFFFF, 0X9AAC, 0XCD96,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XAA4B, 0XB865, 0X9864, 0X9864, 0X8044, 0X9044, 0X8044, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0XA1C9, 0X90C6, 0XD086, 0XB3B0, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0X9864, 0XD086, 0XD086, 0X9864, 0XD086,
0XD086, 0XD086, 0XD086, 0X9864, 0X9864, 0X9864, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XAB2E, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XDEFB, 0XB3B0, 0XAA4B, 0X9864, 0X9864, 0XA1C9,
0XAB2E, 0XBD96, 0XFFFF, 0XAA4B, 0XD086, 0XD086, 0XB493, 0XFFFF, 0XAB2E,
0XC066, 0XAAAC, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0X8947, 0X9864, 0X9A2A, 0XFFFF, 0X9864, 0XD086, 0XA148, 0XEF7D,
0XA8E6, 0XB431, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XCE79, 0XC066, 0XD086, 0XD086, 0XD086, 0X9044, 0X7043,
0X8044, 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0XFFFF, 0XFFFF, 0XBD14,
0X92AC, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0X9864, 0XD086, 0XB865,
0XB865, 0XD086, 0XD086, 0X8044, 0X6843, 0X9864, 0X9864, 0X9864, 0X9864,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XBD96, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XB431, 0XB865, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0X9147, 0XA865, 0XD086, 0XC066, 0XCE79,
0XFFFF, 0XFFFF, 0XCD96, 0X7926, 0XEF7D, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0X9864, 0XD086, 0XC066, 0X9CF3, 0XC066, 0XD086,
0X8A2A, 0X8947, 0XD086, 0XBD14, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XAD14, 0XC066, 0XD086, 0XD086, 0XD086,
0X9864, 0X9864, 0X8044, 0XD086, 0XD086, 0XD086, 0XD086, 0XB865, 0XDEFB,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0X9864,
0XD086, 0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0X9864, 0X9864, 0X9864, 0X9864, 0X9864, 0X9864, 0X9864,
0XC066, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0XBDF7, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XB493, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XC066, 0XA865,
0XA148, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XAA4B, 0XD086, 0XD086, 0X71A8,
0XD086, 0XD086, 0X9044, 0XD086, 0X9864, 0XBDF7, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XDE9A, 0XB865, 0XA865, 0XA865,
0XD086, 0XD086, 0X7043, 0X9864, 0X9044, 0XA865, 0XD086, 0XD086, 0XD086,
0XD086, 0XA8E6, 0XB493, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0X9864, 0XB865, 0XB865, 0XD086, 0XD086, 0XD086, 0X9864, 0X9864,
0X9864, 0X9864, 0X9864, 0X9864, 0X9864, 0X9864, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XA865, 0X9864, 0X9864, 0X9864, 0X9864, 0XD086, 0XD086,
0XD086, 0XD086, 0XBDF7, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XA0C6, 0XD086,
0XD086, 0XD086, 0XA865, 0X80C5, 0X9864, 0XC066, 0XD086, 0XD086, 0XD086,
0XD086, 0XC066, 0X8B8E, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XB493, 0XD086,
0XD086, 0X9864, 0XA865, 0XA865, 0XC066, 0XD086, 0XA8E6, 0XEF7D, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XAAAC, 0XD086,
0XD086, 0XC066, 0X9864, 0X8044, 0XA865, 0X9044, 0XC066, 0X8044, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X9A2A, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XEF7D, 0XA865, 0X9864, 0XD086, 0XD086, 0XD086, 0XD086,
0X9864, 0X9864, 0XC066, 0XD086, 0XD086, 0XD086, 0XD086, 0XC066, 0X9864,
0X9864, 0X9864, 0X9864, 0X9864, 0X9864, 0X9864, 0X9864, 0XD086, 0XD086,
0X9864, 0X9864, 0X9864, 0XC066, 0XAB2E, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0X9864, 0XD086, 0XD086, 0X90C6, 0XCE79, 0XFFFF, 0XFFFF, 0X9C92, 0X9864,
0XD086, 0XD086, 0XD086, 0XD086, 0XAB2E, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XEF7D, 0XA0C6, 0XD086, 0XD086, 0XB865, 0X9864, 0XD086, 0XB1CA, 0XDE9A,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XAA4B, 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0X7043, 0XA865, 0X9044,
0X9044, 0XD086, 0XD086, 0XD086, 0XD086, 0XB1CA, 0XB431, 0X82AB, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XBD14, 0XA865, 0XC066, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0XA865, 0X9864, 0XC066, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0X9864, 0X9864, 0X9864, 0X9864, 0X9864, 0X7043, 0X8044, 0XDEFB, 0XFFFF,
0XFFFF, 0XFFFF, 0X9864, 0XD086, 0XD086, 0XA32E, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0X728B, 0XB865, 0XD086, 0XD086, 0XD086, 0X9864, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XEF7D, 0XAA4B, 0XD086, 0XD086, 0XB865, 0X90C6,
0XEF7D, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XC515, 0X9044, 0XC066, 0XD086, 0XD086, 0XD086, 0X9864, 0X8044,
0XC066, 0X8044, 0X9044, 0XC066, 0XD086, 0XD086, 0XD086, 0XBDF7, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XEF7D, 0X6926, 0XC066, 0XD086,
0XD086, 0XD086, 0X9044, 0XB865, 0XD086, 0XD086, 0XD086, 0XD086, 0XA865,
0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XA8E6, 0XAAAC, 0XB431, 0X8410,
0X8C71, 0XFFFF, 0XFFFF, 0XFFFF, 0XAAAC, 0XD086, 0XD086, 0XA865, 0XA32E,
0XB431, 0XB431, 0X8947, 0XC066, 0X9864, 0XD086, 0XD086, 0XD086, 0XC066,
0XCE79, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XB431, 0XD086, 0XD086,
0XD086, 0XB8E7, 0XDEFB, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XA0C6, 0XD086, 0XA865, 0X9864, 0X9864, 0X9864,
0X9044, 0X9044, 0XA865, 0X9864, 0XA865, 0X9864, 0XD086, 0XD086, 0XD086,
0XB3B0, 0XFFFF, 0XEF7D, 0XBDF7, 0XB431, 0XAAAC, 0XA148, 0XA865, 0XD086,
0XD086, 0XD086, 0XC066, 0XD086, 0XB865, 0X9044, 0X9864, 0X9864, 0XC066,
0XD086, 0XD086, 0XD086, 0X9864, 0XB865, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XB8E7, 0XB493, 0XEF7D, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XDE9A, 0XB8E7, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0XD086, 0XD086,
0XD086, 0XD086, 0XBDF7, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XAAAC,
0XD086, 0XD086, 0XD086, 0XD086, 0XB3B0, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XDEFB, 0XB865, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0X8044, 0X9864, 0XB865, 0X8044, 0XC066, 0X6843, 0XD086,
0XD086, 0X9864, 0XA0C6, 0X99C9, 0XA865, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0X8044, 0XB865, 0XD086, 0XC066, 0XA865,
0XD086, 0XA865, 0X9864, 0X9864, 0XD086, 0XD086, 0XB865, 0X9864, 0XC066,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XB1CA, 0XDEFB, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XDEFB, 0XAB2E, 0X9864, 0XC066, 0XD086, 0XC066, 0X9864, 0X89A8, 0XA865,
0XD086, 0XD086, 0XD086, 0XA865, 0XEF7D, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XAA4B, 0XD086, 0XD086, 0XD086, 0XD086, 0XA148, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XBDF7, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0X7043, 0XC066, 0X6843, 0XD086, 0X7043,
0XC066, 0X9044, 0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0XA865, 0XD086, 0X9864, 0XB865, 0XB865,
0XD086, 0XC066, 0XA865, 0XD086, 0XD086, 0XD086, 0X9864, 0X9864, 0XC066,
0XD086, 0XA865, 0XA865, 0XD086, 0XD086, 0XD086, 0XD086, 0XA865, 0X9C92,
0XBDF7, 0XBDF7, 0XBDF7, 0XBDF7, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XCE79, 0XBDF7, 0XCE79, 0XEF7D,
0XAAAC, 0XD086, 0XD086, 0XD086, 0XD086, 0XA1C9, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XA148, 0XD086, 0XD086, 0XD086, 0XD086, 0XB865,
0XDEFB, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XCD96,
0X8044, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X6843, 0X9044, 0X9864,
0XA865, 0XA865, 0X9044, 0XB865, 0XD086, 0XD086, 0XB865, 0X9864, 0X8044,
0XC066, 0XD086, 0XD086, 0XB865, 0XD086, 0XA865, 0X9044, 0XD086, 0XB865,
0XB865, 0XB865, 0XA865, 0XD086, 0XB865, 0XB865, 0XD086, 0XD086, 0XD086,
0XD086, 0XA865, 0X9864, 0XB865, 0XC066, 0X9864, 0XD086, 0XD086, 0XD086,
0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0X9864, 0XA1C9,
0XAB2E, 0XBD14, 0XCE79, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XCE79,
0XB493, 0XB148, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XBD14, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0X9864, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XBDF7, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XA148, 0XD086, 0X9864, 0X9864, 0X9864, 0X9864, 0X9864, 0X9864,
0X9864, 0X9864, 0X7043, 0X9864, 0XD086, 0XD086, 0XA865, 0X9864, 0XB865,
0XD086, 0X9864, 0XD086, 0XC066, 0X7043, 0XD086, 0XD086, 0X9864, 0XC066,
0XA865, 0XD086, 0X9864, 0XD086, 0XC066, 0XA865, 0XD086, 0XA865, 0XC066,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XC066, 0X9864, 0X9044, 0X9864,
0XC066, 0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0XC066, 0X9864, 0X9864, 0X9864, 0X9864,
0X9864, 0XB865, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XA1C9,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XC515, 0XC066, 0XA865,
0XD086, 0XD086, 0XD086, 0XD086, 0XAD14, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0X9044, 0X8044, 0X9864, 0XA865, 0XD086, 0XA865, 0X9864, 0XC066,
0XD086, 0XD086, 0XA865, 0XC066, 0XC066, 0XA865, 0X9864, 0XD086, 0XA865,
0XC066, 0XD086, 0X9864, 0XD086, 0X9864, 0XD086, 0XD086, 0XB865, 0XB865,
0XD086, 0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0X9864, 0X8044, 0X8044, 0XD086, 0XD086, 0XD086, 0XD086, 0X9864,
0XA865, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0XB8E7, 0XDEFB, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF,
0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0XFFFF, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X04A6, 0XB865,
0XD086, 0X31C3, 0XC066, 0XD086, 0XD086, 0X9864, 0XB865, 0X2305, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X9864, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0X6843, 0X9864, 0XA865, 0XB865, 0X9864, 0XC066,
0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0XC066, 0XA865, 0XD086, 0X9864,
0XD086, 0X9864, 0XD086, 0XD086, 0XA865, 0XC066, 0X9864, 0XD086, 0XD086,
0XD086, 0XC066, 0XA865, 0XB865, 0XB865, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0XC066, 0X8044, 0X8044, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0X9864, 0XC066, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0X8145, 0X0C66, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0506,
0X8145, 0XD086, 0X9105, 0X0506, 0X80E5, 0XD086, 0XD086, 0X9864, 0XD086,
0X9864, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X80E5, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X8044, 0XB865, 0X9864, 0XB865,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XA865, 0XC066, 0X9864, 0XD086,
0XD086, 0X9864, 0XC066, 0XA865, 0XD086, 0XD086, 0XD086, 0X9864, 0X9864,
0XD086, 0XD086, 0XD086, 0XD086, 0XC066, 0XA865, 0X9864, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XA865, 0X9864, 0X9864, 0X7043, 0X9864, 0XA865,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XA865, 0XC066, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0XC066, 0X59E5, 0X0506, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X2305, 0XB865, 0XD086, 0X2305, 0X0547, 0X1B65, 0XD086, 0XD086,
0XB865, 0XB865, 0X9864, 0X6985, 0X1B65, 0X0547, 0X0547, 0X0547, 0X0547,
0X0C05, 0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0X9044, 0X8044, 0X9864,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0X9864,
0XD086, 0XD086, 0XD086, 0X9864, 0X9864, 0XD086, 0XD086, 0XD086, 0XD086,
0X9864, 0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XB865, 0XA865,
0XA865, 0XD086, 0XD086, 0XA865, 0X9864, 0XC066, 0XD086, 0XD086, 0X9864,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0XA865, 0XC066, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0X80E5, 0X0C05, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X1B65, 0XC066, 0X8044, 0X04A6, 0X0547, 0X0547,
0X80E5, 0XD086, 0XD086, 0X9864, 0XA865, 0XD086, 0XD086, 0X1AC4, 0X0405,
0X0547, 0X0547, 0X4285, 0XC066, 0X9864, 0X9864, 0X9864, 0X9864, 0X8044,
0XA865, 0XD086, 0XD086, 0XC066, 0XA865, 0XD086, 0XD086, 0XD086, 0XD086,
0X7043, 0XC066, 0XD086, 0XD086, 0XD086, 0X9864, 0X9864, 0XD086, 0XD086,
0XD086, 0XD086, 0XA865, 0XA865, 0XB865, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0XB865, 0X8044, 0XD086, 0XA865, 0XC066, 0XD086, 0XD086, 0XD086,
0XD086, 0XC066, 0XA865, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0XA865, 0X59E5, 0X0BA5, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0506, 0X3264, 0X98A5, 0X7145, 0X04A6, 0X0547,
0X0547, 0X0547, 0X1BC5, 0XC066, 0XD086, 0XD086, 0X9864, 0XD086, 0XD086,
0X9864, 0XD086, 0X7145, 0X4984, 0X80A4, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0X9864, 0X7043, 0X9864, 0X9864, 0XB865, 0X9864, 0XD086, 0XD086,
0XD086, 0X8044, 0XA865, 0XD086, 0XD086, 0XD086, 0XD086, 0X9044, 0XA865,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0X9864, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0X8044, 0XC066, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0XA865, 0XC066, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X9044, 0XA865, 0X9864,
0X6985, 0X4285, 0X1B65, 0X0506, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0445, 0X0445, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X4A25, 0XD086, 0XD086, 0XD086,
0X9864, 0X9864, 0XC066, 0XD086, 0XD086, 0X9864, 0X9864, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0XD086, 0XD086, 0XD086, 0X9864,
0XD086, 0XB865, 0X9864, 0X4822, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0X6843, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0X9864,
0XD086, 0XC066, 0X9864, 0X8044, 0X9864, 0X9864, 0X9864, 0X8044, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XA865, 0X9864,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0XA8C5, 0X32C5, 0X0506, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X4A25,
0XD086, 0XD086, 0XD086, 0XA865, 0X9864, 0XB865, 0XD086, 0X9864, 0X9864,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0XD086, 0XD086, 0XD086,
0XD086, 0X9864, 0XA865, 0XB865, 0XD086, 0X8044, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0X6843, 0XD086, 0X9044, 0X9864, 0X9044, 0X9864, 0XB865,
0X9864, 0X9864, 0XB865, 0XA865, 0XD086, 0X9864, 0XD086, 0XD086, 0XD086,
0XA865, 0XB865, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0XC066, 0X9864, 0XA865, 0X9864, 0X9044, 0XA865, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0X98A5, 0X32C5, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X32C5, 0XC066, 0XD086, 0XD086, 0XD086, 0XB865, 0X9864,
0X8044, 0X9864, 0X8044, 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0XD086,
0XD086, 0XD086, 0XD086, 0X9864, 0XC066, 0XA865, 0X9864, 0X9864, 0XA865,
0X9864, 0X9044, 0X9864, 0XD086, 0X6843, 0X9864, 0XC066, 0XA865, 0XD086,
0XD086, 0XB865, 0X8044, 0X7043, 0XB865, 0XD086, 0X9864, 0X9864, 0X9864,
0X9864, 0X9864, 0XA865, 0XB865, 0X9864, 0X9864, 0X9864, 0XA865, 0XD086,
0XD086, 0XD086, 0X9044, 0XD086, 0XD086, 0XC066, 0XA865, 0XC066, 0X9864,
0X9864, 0X9044, 0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X80E5,
0X1BC5, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X4285, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0XD086, 0XD086, 0XD086, 0XD086,
0XB865, 0XB865, 0XD086, 0XD086, 0XD086, 0XD086, 0X9044, 0X7043, 0XD086,
0X8044, 0X9044, 0XD086, 0XD086, 0X9044, 0X9864, 0X6843, 0XD086, 0XD086,
0X9864, 0XD086, 0XD086, 0XD086, 0X9864, 0XD086, 0XD086, 0XB865, 0XA865,
0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X6985,
0X04A6, 0X4A25, 0X80A4, 0XA865, 0XD086, 0XD086, 0XD086, 0X9864, 0XD086,
0XD086, 0XD086, 0X9864, 0XD086, 0XD086, 0X9864, 0X8044, 0X9864, 0XC066,
0XD086, 0XD086, 0XC066, 0X6985, 0X0C66, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X4A25,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0XD086, 0XD086,
0XD086, 0XD086, 0XA865, 0X9044, 0XB865, 0XA865, 0X9864, 0X9044, 0X9864,
0XB865, 0X9044, 0XC066, 0X9864, 0XD086, 0XD086, 0X9864, 0XD086, 0XA865,
0XD086, 0XD086, 0X9864, 0XD086, 0XD086, 0XD086, 0X9864, 0XC066, 0X9864,
0XB865, 0XD086, 0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0X4A25, 0X0506, 0X0547, 0X0547, 0X1BC5, 0XA8C5, 0XD086, 0XD086, 0XB865,
0XB865, 0XD086, 0XD086, 0XD086, 0X9864, 0XD086, 0XD086, 0XD086, 0X9864,
0XD086, 0X9864, 0XB865, 0XD086, 0XD086, 0XD086, 0XB865, 0X32C5, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0506, 0X8145, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XC066,
0XA865, 0XD086, 0XD086, 0XB865, 0XB865, 0XD086, 0XB865, 0X8044, 0XB865,
0XA865, 0X8044, 0XA865, 0XD086, 0XD086, 0X9864, 0XD086, 0XD086, 0X9864,
0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0XD086, 0XD086, 0X8044, 0X7043,
0X7043, 0XC066, 0XD086, 0XC066, 0XA865, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0X6985, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X04A6, 0X2305,
0X32C5, 0X6944, 0XD086, 0XD086, 0XD086, 0X9864, 0XC066, 0XD086, 0XD086,
0X9864, 0XD086, 0XD086, 0X9864, 0XB865, 0XB865, 0XD086, 0XC066, 0XB865,
0XD086, 0X7145, 0X0C66, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0C66, 0XB865, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XA865, 0XC066, 0XD086, 0X9864, 0XD086, 0XD086, 0XD086,
0X9044, 0XB865, 0X9044, 0XD086, 0XD086, 0XD086, 0XC066, 0XA865, 0XD086,
0XD086, 0X9864, 0XD086, 0XD086, 0XD086, 0XB865, 0XA865, 0XD086, 0XB865,
0XB865, 0XD086, 0XD086, 0XB865, 0X9864, 0X7043, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0X32C5, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0405, 0X2305, 0X0BA5, 0X0BA5, 0X7145,
0X9864, 0X90A4, 0X58E3, 0XD086, 0XB865, 0XB865, 0XD086, 0X9864, 0XD086,
0XD086, 0X1A63, 0XA8C5, 0XD086, 0XA8C5, 0X0C66, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X32C5, 0XD086,
0XD086, 0XD086, 0XD086, 0XA865, 0X90A4, 0X4183, 0X6985, 0X5924, 0X9044,
0XD086, 0XB865, 0XB865, 0X9044, 0X9864, 0XD086, 0XD086, 0XD086, 0X9864,
0XD086, 0XD086, 0X9864, 0XD086, 0XD086, 0XD086, 0XA8C5, 0X1B65, 0X0405,
0X0405, 0X9044, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X9864, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X4A25, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0405, 0X1AC4, 0XD086, 0XD086,
0X9864, 0XD086, 0XD086, 0X4285, 0X04A6, 0X59E5, 0X9864, 0X4224, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0506, 0X98A5, 0XD086, 0XD086, 0X22C4, 0X0506, 0X0547, 0X0547, 0X0547,
0X2305, 0XD086, 0XA865, 0X8044, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0X9864, 0XD086, 0XD086, 0X9044, 0XD086, 0XB865, 0X6985, 0X04A6,
0X0547, 0X0547, 0X0547, 0X90A4, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0XA865, 0XC066, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XB865, 0X0BA5,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X22C4, 0XA865, 0X9044, 0X9864, 0XD086, 0X6985, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X4A25, 0XD086, 0X98A5, 0X0506, 0X0547, 0X0547,
0X0547, 0X0506, 0X4183, 0X9864, 0X9044, 0XB865, 0XD086, 0XD086, 0XD086,
0X9864, 0XD086, 0XD086, 0X9864, 0XD086, 0X7145, 0X0BA5, 0X0405, 0X04A6,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X32C5, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0X9044, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0X90A4, 0X4285, 0X04A6, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0405, 0XD086, 0XD086, 0X9864, 0XD086, 0X6985, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X1B65, 0XD086, 0X4A25, 0X0547,
0X0547, 0X0547, 0X0547, 0X4A25, 0XD086, 0XD086, 0X9864, 0XD086, 0XD086,
0XD086, 0X8145, 0X0B64, 0XD086, 0XD086, 0XA865, 0X32C5, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X2305,
0X98A5, 0XC066, 0X9864, 0X9864, 0X9864, 0XC066, 0X9864, 0XA865, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XA865, 0X80E5, 0X59E5,
0X0C05, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0445, 0XC066, 0XD086, 0X9044, 0XD086,
0X6985, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0405, 0X98A5,
0X0506, 0X0547, 0X0547, 0X0547, 0X0547, 0X59E5, 0XD086, 0XB865, 0XB865,
0XD086, 0XD086, 0XA8C5, 0X0C66, 0X0506, 0X98A5, 0XD086, 0X90A4, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0506, 0X70E4, 0XD086, 0XD086, 0XD086, 0XD086, 0XC066,
0X9864, 0X9864, 0X9864, 0X9044, 0X9864, 0XC066, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XC066, 0X1BC5, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X68E4, 0X9044,
0X9864, 0XD086, 0X6985, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0445, 0X1BC5, 0X0547, 0X0547, 0X0547, 0X0547, 0X0C66, 0X90A4, 0XA865,
0X9044, 0XD086, 0XD086, 0XA8C5, 0X0C66, 0X0547, 0X0547, 0X32C5, 0XD086,
0X4A25, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0C66, 0X7145, 0X9864, 0X9864,
0XA865, 0XA865, 0XD086, 0XD086, 0X9864, 0XD086, 0XD086, 0X9864, 0XD086,
0XD086, 0X90A4, 0X80E5, 0XC066, 0XD086, 0X7145, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X9864, 0XD086, 0X9864, 0XD086, 0X6985, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X80E5,
0XD086, 0XB865, 0XB865, 0XD086, 0XA8C5, 0X0C66, 0X0547, 0X0547, 0X0547,
0X0506, 0X9044, 0X04A6, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X4285, 0XB865, 0XA865, 0X9864, 0XC066, 0XD086, 0XA865,
0XC066, 0XD086, 0XC066, 0X0C05, 0X0547, 0X0445, 0X4285, 0X58E3, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X9864, 0XD086, 0X9864, 0XD086, 0X4285, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X9864, 0XD086, 0X9864, 0XD086, 0XA8C5, 0X0C66, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0405, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0405, 0X04A6, 0X2305, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0C66, 0X80E5, 0X9864, 0X9864, 0X9864,
0X8044, 0XB865, 0XD086, 0XD086, 0X32C5, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X4285, 0XA865, 0X7043, 0XB865, 0XD086, 0X2305,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X2365, 0X9864, 0XB865, 0XB865, 0XA8C5, 0X0C66, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0506, 0X70A4, 0XA865, 0X8044, 0XD086, 0X7145, 0X0506, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X04A6, 0X3224, 0XD086, 0XD086,
0XC066, 0X9864, 0XC066, 0XD086, 0XD086, 0X4A25, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X1B65, 0X32C5, 0X68E4, 0X2365, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X9864, 0XD086, 0X9864, 0XD086,
0XC066, 0X0445, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X2305, 0X6985, 0X59E5, 0X22C4, 0X0445, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0C66, 0XA8C5, 0XA865, 0XA865, 0XD086, 0X2305,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0BA5, 0X0C05, 0X0C66, 0X9044, 0XD086, 0XD086, 0X8145,
0X04A6, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0C05, 0XB865, 0XC066,
0X9864, 0X9044, 0XA865, 0XD086, 0XD086, 0XD086, 0X4A25, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X22C4, 0X70E4, 0XB865, 0X9864, 0XC066,
0X2365, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X5924, 0X9864,
0XA865, 0XD086, 0X9864, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X3224, 0X22C4, 0X9864, 0XA865, 0XC066, 0X6985,
0X0BA5, 0X0506, 0X0547, 0X0506, 0X32C5, 0XB865, 0XD086, 0XD086, 0XD086,
0X80E5, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0C05, 0X4A25,
0X80E5, 0XD086, 0XB865, 0X4A25, 0X0BA5, 0X22C4, 0X6985, 0X90A4, 0X9864,
0X9864, 0X9864, 0X9044, 0XD086, 0XD086, 0XD086, 0XB865, 0X2305, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X04A6, 0X0547, 0X1B04,
0XC066, 0XD086, 0XC066, 0X4285, 0X0506, 0X0547, 0X0547, 0X0547, 0X4A25,
0XD086, 0XD086, 0XD086, 0XD086, 0X59E5, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X7043, 0XA865,
0XD086, 0XD086, 0XB865, 0X7043, 0X6843, 0X9864, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0X1B65, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0506, 0X32C5, 0X3264, 0X6985,
0X59E5, 0X04A6, 0X0547, 0X4A25, 0XC066, 0X9864, 0XA865, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XC066, 0X6985, 0X04A6,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0C66, 0X59E5, 0X6883, 0X9864, 0X9864, 0XD086, 0X98A5, 0X4285, 0X32C5,
0X6944, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X2305, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0506, 0X32C5, 0X6985, 0X6944,
0XC066, 0XC066, 0X9864, 0X9864, 0XB865, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XA865, 0X0506, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0506, 0X80E5, 0X9864,
0X9864, 0XD086, 0XD086, 0XB865, 0X6985, 0X6985, 0X9044, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XA865, 0X59E5, 0X0C05,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0506, 0X6985, 0XA865, 0XA865, 0XD086, 0XD086, 0XD086, 0X9864, 0XB865,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X6985,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X3264, 0X7145,
0X6985, 0X9864, 0X9044, 0X9864, 0X9864, 0X9864, 0XA865, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X90A4, 0X6985, 0X4285,
0X1BC5, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0445,
0X2305, 0X04A6, 0X90A4, 0XC066, 0X9864, 0X9044, 0X9864, 0X9864, 0X9864,
0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0X58E3, 0X3264,
0X1B65, 0X0506, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X4224, 0X4224, 0X3264, 0X7043, 0X4A25, 0X32C5, 0X49C4,
0X9864, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0X7145, 0X1B65, 0X0506, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X04A6, 0X0547, 0X0547, 0X04A6, 0X80E5, 0XD086, 0XD086, 0XD086, 0XD086,
0XD086, 0XD086, 0XD086, 0XD086, 0XC066, 0X7145, 0X49C4, 0XB865, 0XD086,
0XD086, 0XD086, 0X9044, 0X9864, 0X32C5, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0445, 0X5883, 0XA865, 0XD086, 0XD086,
0XC066, 0X9864, 0X7145, 0X6985, 0X3264, 0X80E5, 0X7145, 0X32C5, 0X70E4,
0XD086, 0XD086, 0XD086, 0X68E4, 0X4285, 0X04A6, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0405, 0X0547, 0X0547, 0X0547, 0X0506,
0X6985, 0X9864, 0XD086, 0XD086, 0XA865, 0X9864, 0XD086, 0XD086, 0XD086,
0XB865, 0X80E5, 0X80A4, 0XC066, 0XD086, 0XD086, 0X58E3, 0X32C5, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0C66, 0X90A4, 0XA865, 0XA865, 0XD086,
0XD086, 0XD086, 0X6985, 0X0BA5, 0X0405, 0X22C4, 0X0C05, 0X0547, 0X0547,
0X0C66, 0X7145, 0XC066, 0XD086, 0X70A4, 0X4285, 0X58E3, 0X0506, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X59E5, 0XA865, 0X9044,
0X9864, 0X4A25, 0X0445, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X1B65, 0X98A5, 0XD086, 0X9044, 0X7145, 0X8044, 0X04A6,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X1BC5, 0X7145, 0X9864, 0XD086, 0X98A5, 0X2305, 0X0506, 0X0506, 0X32C5,
0X6985, 0X32C5, 0X04A6, 0X0547, 0X0547, 0X0C05, 0X5984, 0XA865, 0X9864,
0X9864, 0X32C5, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X49C4, 0X59E5, 0X22C4,
0X70E4, 0X9864, 0X7145, 0X1B65, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0445, 0X0405, 0X0506, 0X0547, 0X0506,
0X0506, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X2264,
0X0506, 0X0506, 0X0445, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0506, 0X0405, 0X0445, 0X0547,
0X0C66, 0X0445, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0506, 0X90A4, 0X80E5, 0X4224, 0X3224, 0X0506, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0405, 0X0547, 0X0506, 0X1A03, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0B64,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X04A6, 0X1BC5, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547, 0X0547,
0X0547, 0X0547, 0X0547, 0X0547, 0X0547 };

View File

@ -1,69 +0,0 @@
// ILI9341 example with embedded color bitmaps in sketch.
// WILL NOT FIT ON ARDUINO UNO OR OTHER AVR BOARDS;
// uses large bitmap image stored in array!
// Options for converting images to the format used here include:
// http://www.rinkydinkelectronics.com/t_imageconverter565.php
// or
// GIMP (https://www.gimp.org/) as follows:
// 1. File -> Export As
// 2. In Export Image dialog, use 'C source code (*.c)' as filetype.
// 3. Press export to get the export options dialog.
// 4. Type the desired variable name into the 'prefixed name' box.
// 5. Uncheck 'GLIB types (guint8*)'
// 6. Check 'Save as RGB565 (16-bit)'
// 7. Press export to save your image.
// Assuming 'image_name' was typed in the 'prefixed name' box of step 4,
// you can have to include the c file, then using the image can be done with:
// tft.drawRGBBitmap(0, 0, image_name.pixel_data, image_name.width, image_name.height);
// See also https://forum.pjrc.com/threads/35575-Export-for-ILI9341_t3-with-GIMP
#include "SPI.h"
#include <Adafruit_ILI9341.h>
#include "dragon.h"
// For the Adafruit shield, these are the default.
//#define TFT_DC 9
//#define TFT_CS 10
// Feather 32u4 or M0 with TFT FeatherWing:
#define TFT_DC 10
#define TFT_CS 9
// ESP8266:
//#define TFT_DC 15
//#define TFT_CS 0
// Other boards (including Feather boards) may have other pinouts;
// see learn.adafruit.com/adafruit-2-4-tft-touch-screen-featherwing/pinouts
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
// If using the breakout, change pins as desired
//Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_MOSI, TFT_CLK, TFT_RST, TFT_MISO);
void setup() {
tft.begin();
}
void loop(void) {
for(uint8_t r=0; r<4; r++) {
tft.setRotation(r);
tft.fillScreen(ILI9341_BLACK);
for(uint8_t j=0; j<20; j++) {
tft.drawRGBBitmap(
random(-DRAGON_WIDTH , tft.width()),
random(-DRAGON_HEIGHT, tft.height()),
#if defined(__AVR__) || defined(ESP8266)
dragonBitmap,
#else
// Some non-AVR MCU's have a "flat" memory model and don't
// distinguish between flash and RAM addresses. In this case,
// the RAM-resident-optimized drawRGBBitmap in the ILI9341
// library can be invoked by forcibly type-converting the
// PROGMEM bitmap pointer to a non-const uint16_t *.
(uint16_t *)dragonBitmap,
#endif
DRAGON_WIDTH, DRAGON_HEIGHT);
delay(1); // Allow ESP8266 to handle watchdog & WiFi stuff
}
delay(3000);
}
}

View File

@ -1,218 +0,0 @@
/***************************************************
This is our Bitmap drawing example for the Adafruit ILI9341 Breakout and Shield
----> http://www.adafruit.com/products/1651
Check out the links above for our tutorials and wiring diagrams
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!
Written by Limor Fried/Ladyada for Adafruit Industries.
MIT license, all text above must be included in any redistribution
****************************************************/
#include <Adafruit_GFX.h> // Core graphics library
#include "Adafruit_ILI9341.h" // Hardware-specific library
#include <SPI.h>
#include <SD.h>
// TFT display and SD card will share the hardware SPI interface.
// Hardware SPI pins are specific to the Arduino board type and
// cannot be remapped to alternate pins. For Arduino Uno,
// Duemilanove, etc., pin 11 = MOSI, pin 12 = MISO, pin 13 = SCK.
#define TFT_DC 9
#define TFT_CS 10
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
#define SD_CS 4
void setup(void) {
Serial.begin(9600);
tft.begin();
yield();
Serial.print("Initializing SD card...");
if (!SD.begin(SD_CS)) {
Serial.println("failed!");
}
Serial.println("OK!");
}
void loop() {
for(uint8_t r=0; r<4; r++) {
tft.setRotation(r);
tft.fillScreen(ILI9341_BLUE);
for(int8_t i=-2; i<1; i++) {
bmpDraw("purple.bmp",
(tft.width() / 2) + (i * 120),
(tft.height() / 2) + (i * 160));
}
}
}
// This function opens a Windows Bitmap (BMP) file and
// displays it at the given coordinates. It's sped up
// by reading many pixels worth of data at a time
// (rather than pixel by pixel). Increasing the buffer
// size takes more of the Arduino's precious RAM but
// makes loading a little faster. 20 pixels seems a
// good balance.
#define BUFFPIXEL 20
void bmpDraw(char *filename, int16_t x, int16_t y) {
File bmpFile;
int bmpWidth, bmpHeight; // W+H in pixels
uint8_t bmpDepth; // Bit depth (currently must be 24)
uint32_t bmpImageoffset; // Start of image data in file
uint32_t rowSize; // Not always = bmpWidth; may have padding
uint8_t sdbuffer[3*BUFFPIXEL]; // pixel buffer (R+G+B per pixel)
uint8_t buffidx = sizeof(sdbuffer); // Current position in sdbuffer
boolean goodBmp = false; // Set to true on valid header parse
boolean flip = true; // BMP is stored bottom-to-top
int w, h, row, col, x2, y2, bx1, by1;
uint8_t r, g, b;
uint32_t pos = 0, startTime = millis();
if((x >= tft.width()) || (y >= tft.height())) return;
Serial.println();
Serial.print(F("Loading image '"));
Serial.print(filename);
Serial.println('\'');
// Open requested file on SD card
if ((bmpFile = SD.open(filename)) == NULL) {
Serial.print(F("File not found"));
return;
}
// Parse BMP header
if(read16(bmpFile) == 0x4D42) { // BMP signature
Serial.print(F("File size: ")); Serial.println(read32(bmpFile));
(void)read32(bmpFile); // Read & ignore creator bytes
bmpImageoffset = read32(bmpFile); // Start of image data
Serial.print(F("Image Offset: ")); Serial.println(bmpImageoffset, DEC);
// Read DIB header
Serial.print(F("Header size: ")); Serial.println(read32(bmpFile));
bmpWidth = read32(bmpFile);
bmpHeight = read32(bmpFile);
if(read16(bmpFile) == 1) { // # planes -- must be '1'
bmpDepth = read16(bmpFile); // bits per pixel
Serial.print(F("Bit Depth: ")); Serial.println(bmpDepth);
if((bmpDepth == 24) && (read32(bmpFile) == 0)) { // 0 = uncompressed
goodBmp = true; // Supported BMP format -- proceed!
Serial.print(F("Image size: "));
Serial.print(bmpWidth);
Serial.print('x');
Serial.println(bmpHeight);
// BMP rows are padded (if needed) to 4-byte boundary
rowSize = (bmpWidth * 3 + 3) & ~3;
// If bmpHeight is negative, image is in top-down order.
// This is not canon but has been observed in the wild.
if(bmpHeight < 0) {
bmpHeight = -bmpHeight;
flip = false;
}
// Crop area to be loaded
x2 = x + bmpWidth - 1; // Lower-right corner
y2 = y + bmpHeight - 1;
if((x2 >= 0) && (y2 >= 0)) { // On screen?
w = bmpWidth; // Width/height of section to load/display
h = bmpHeight;
bx1 = by1 = 0; // UL coordinate in BMP file
if(x < 0) { // Clip left
bx1 = -x;
x = 0;
w = x2 + 1;
}
if(y < 0) { // Clip top
by1 = -y;
y = 0;
h = y2 + 1;
}
if(x2 >= tft.width()) w = tft.width() - x; // Clip right
if(y2 >= tft.height()) h = tft.height() - y; // Clip bottom
// Set TFT address window to clipped image bounds
tft.startWrite(); // Requires start/end transaction now
tft.setAddrWindow(x, y, w, h);
for (row=0; row<h; row++) { // For each scanline...
// Seek to start of scan line. It might seem labor-
// intensive to be doing this on every line, but this
// method covers a lot of gritty details like cropping
// and scanline padding. Also, the seek only takes
// place if the file position actually needs to change
// (avoids a lot of cluster math in SD library).
if(flip) // Bitmap is stored bottom-to-top order (normal BMP)
pos = bmpImageoffset + (bmpHeight - 1 - (row + by1)) * rowSize;
else // Bitmap is stored top-to-bottom
pos = bmpImageoffset + (row + by1) * rowSize;
pos += bx1 * 3; // Factor in starting column (bx1)
if(bmpFile.position() != pos) { // Need seek?
tft.endWrite(); // End TFT transaction
bmpFile.seek(pos);
buffidx = sizeof(sdbuffer); // Force buffer reload
tft.startWrite(); // Start new TFT transaction
}
for (col=0; col<w; col++) { // For each pixel...
// Time to read more pixel data?
if (buffidx >= sizeof(sdbuffer)) { // Indeed
tft.endWrite(); // End TFT transaction
bmpFile.read(sdbuffer, sizeof(sdbuffer));
buffidx = 0; // Set index to beginning
tft.startWrite(); // Start new TFT transaction
}
// Convert pixel from BMP to TFT format, push to display
b = sdbuffer[buffidx++];
g = sdbuffer[buffidx++];
r = sdbuffer[buffidx++];
tft.writePixel(tft.color565(r,g,b));
} // end pixel
} // end scanline
tft.endWrite(); // End last TFT transaction
} // end onscreen
Serial.print(F("Loaded in "));
Serial.print(millis() - startTime);
Serial.println(" ms");
} // end goodBmp
}
}
bmpFile.close();
if(!goodBmp) Serial.println(F("BMP format not recognized."));
}
// These read 16- and 32-bit types from the SD card file.
// BMP data is stored little-endian, Arduino is little-endian too.
// May need to reverse subscript order if porting elsewhere.
uint16_t read16(File &f) {
uint16_t result;
((uint8_t *)&result)[0] = f.read(); // LSB
((uint8_t *)&result)[1] = f.read(); // MSB
return result;
}
uint32_t read32(File &f) {
uint32_t result;
((uint8_t *)&result)[0] = f.read(); // LSB
((uint8_t *)&result)[1] = f.read();
((uint8_t *)&result)[2] = f.read();
((uint8_t *)&result)[3] = f.read(); // MSB
return result;
}

View File

@ -1,146 +0,0 @@
/***************************************************
This is our touchscreen painting example for the Adafruit ILI9341 Shield
----> http://www.adafruit.com/products/1651
Check out the links above for our tutorials and wiring diagrams
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!
Written by Limor Fried/Ladyada for Adafruit Industries.
MIT license, all text above must be included in any redistribution
****************************************************/
#include <Adafruit_GFX.h> // Core graphics library
#include <SPI.h>
#include <Wire.h> // this is needed even tho we aren't using it
#include <Adafruit_ILI9341.h>
#include <Adafruit_STMPE610.h>
// This is calibration data for the raw touch data to the screen coordinates
#define TS_MINX 150
#define TS_MINY 130
#define TS_MAXX 3800
#define TS_MAXY 4000
// The STMPE610 uses hardware SPI on the shield, and #8
#define STMPE_CS 8
Adafruit_STMPE610 ts = Adafruit_STMPE610(STMPE_CS);
// The display also uses hardware SPI, plus #9 & #10
#define TFT_CS 10
#define TFT_DC 9
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
// Size of the color selection boxes and the paintbrush size
#define BOXSIZE 40
#define PENRADIUS 3
int oldcolor, currentcolor;
void setup(void) {
// while (!Serial); // used for leonardo debugging
Serial.begin(9600);
Serial.println(F("Touch Paint!"));
tft.begin();
if (!ts.begin()) {
Serial.println("Couldn't start touchscreen controller");
while (1);
}
Serial.println("Touchscreen started");
tft.fillScreen(ILI9341_BLACK);
// make the color selection boxes
tft.fillRect(0, 0, BOXSIZE, BOXSIZE, ILI9341_RED);
tft.fillRect(BOXSIZE, 0, BOXSIZE, BOXSIZE, ILI9341_YELLOW);
tft.fillRect(BOXSIZE*2, 0, BOXSIZE, BOXSIZE, ILI9341_GREEN);
tft.fillRect(BOXSIZE*3, 0, BOXSIZE, BOXSIZE, ILI9341_CYAN);
tft.fillRect(BOXSIZE*4, 0, BOXSIZE, BOXSIZE, ILI9341_BLUE);
tft.fillRect(BOXSIZE*5, 0, BOXSIZE, BOXSIZE, ILI9341_MAGENTA);
// select the current color 'red'
tft.drawRect(0, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE);
currentcolor = ILI9341_RED;
}
void loop()
{
// See if there's any touch data for us
if (ts.bufferEmpty()) {
return;
}
/*
// You can also wait for a touch
if (! ts.touched()) {
return;
}
*/
// Retrieve a point
TS_Point p = ts.getPoint();
/*
Serial.print("X = "); Serial.print(p.x);
Serial.print("\tY = "); Serial.print(p.y);
Serial.print("\tPressure = "); Serial.println(p.z);
*/
// Scale from ~0->4000 to tft.width using the calibration #'s
p.x = map(p.x, TS_MINX, TS_MAXX, 0, tft.width());
p.y = map(p.y, TS_MINY, TS_MAXY, 0, tft.height());
/*
Serial.print("("); Serial.print(p.x);
Serial.print(", "); Serial.print(p.y);
Serial.println(")");
*/
if (p.y < BOXSIZE) {
oldcolor = currentcolor;
if (p.x < BOXSIZE) {
currentcolor = ILI9341_RED;
tft.drawRect(0, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE);
} else if (p.x < BOXSIZE*2) {
currentcolor = ILI9341_YELLOW;
tft.drawRect(BOXSIZE, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE);
} else if (p.x < BOXSIZE*3) {
currentcolor = ILI9341_GREEN;
tft.drawRect(BOXSIZE*2, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE);
} else if (p.x < BOXSIZE*4) {
currentcolor = ILI9341_CYAN;
tft.drawRect(BOXSIZE*3, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE);
} else if (p.x < BOXSIZE*5) {
currentcolor = ILI9341_BLUE;
tft.drawRect(BOXSIZE*4, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE);
} else if (p.x < BOXSIZE*6) {
currentcolor = ILI9341_MAGENTA;
tft.drawRect(BOXSIZE*5, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE);
}
if (oldcolor != currentcolor) {
if (oldcolor == ILI9341_RED)
tft.fillRect(0, 0, BOXSIZE, BOXSIZE, ILI9341_RED);
if (oldcolor == ILI9341_YELLOW)
tft.fillRect(BOXSIZE, 0, BOXSIZE, BOXSIZE, ILI9341_YELLOW);
if (oldcolor == ILI9341_GREEN)
tft.fillRect(BOXSIZE*2, 0, BOXSIZE, BOXSIZE, ILI9341_GREEN);
if (oldcolor == ILI9341_CYAN)
tft.fillRect(BOXSIZE*3, 0, BOXSIZE, BOXSIZE, ILI9341_CYAN);
if (oldcolor == ILI9341_BLUE)
tft.fillRect(BOXSIZE*4, 0, BOXSIZE, BOXSIZE, ILI9341_BLUE);
if (oldcolor == ILI9341_MAGENTA)
tft.fillRect(BOXSIZE*5, 0, BOXSIZE, BOXSIZE, ILI9341_MAGENTA);
}
}
if (((p.y-PENRADIUS) > BOXSIZE) && ((p.y+PENRADIUS) < tft.height())) {
tft.fillCircle(p.x, p.y, PENRADIUS, currentcolor);
}
}

View File

@ -1,165 +0,0 @@
/***************************************************
This is our touchscreen painting example for the Adafruit TFT FeatherWing
----> http://www.adafruit.com/products/3315
Check out the links above for our tutorials and wiring diagrams
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Written by Limor Fried/Ladyada for Adafruit Industries.
MIT license, all text above must be included in any redistribution
****************************************************/
#include <SPI.h>
#include <Wire.h> // this is needed even tho we aren't using it
#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_ILI9341.h> // Hardware-specific library
#include <Adafruit_STMPE610.h>
#ifdef ESP8266
#define STMPE_CS 16
#define TFT_CS 0
#define TFT_DC 15
#define SD_CS 2
#endif
#ifdef ESP32
#define STMPE_CS 32
#define TFT_CS 15
#define TFT_DC 33
#define SD_CS 14
#endif
#ifdef TEENSYDUINO
#define TFT_DC 10
#define TFT_CS 4
#define STMPE_CS 3
#define SD_CS 8
#endif
#ifdef ARDUINO_STM32_FEATHER
#define TFT_DC PB4
#define TFT_CS PA15
#define STMPE_CS PC7
#define SD_CS PC5
#endif
#ifdef ARDUINO_NRF52_FEATHER /* BSP 0.6.5 and higher! */
#define TFT_DC 11
#define TFT_CS 31
#define STMPE_CS 30
#define SD_CS 27
#endif
#if defined(ARDUINO_MAX32620FTHR) || defined(ARDUINO_MAX32630FTHR)
#define TFT_DC P5_4
#define TFT_CS P5_3
#define STMPE_CS P3_3
#define SD_CS P3_2
#endif
// Anything else!
#if defined (__AVR_ATmega32U4__) || defined(ARDUINO_SAMD_FEATHER_M0) || defined (__AVR_ATmega328P__) || defined(ARDUINO_SAMD_ZERO) || defined(__SAMD51__) || defined(__SAM3X8E__)
#define STMPE_CS 6
#define TFT_CS 9
#define TFT_DC 10
#define SD_CS 5
#endif
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
Adafruit_STMPE610 ts = Adafruit_STMPE610(STMPE_CS);
// This is calibration data for the raw touch data to the screen coordinates
#define TS_MINX 3800
#define TS_MAXX 100
#define TS_MINY 100
#define TS_MAXY 3750
// Size of the color selection boxes and the paintbrush size
#define BOXSIZE 40
#define PENRADIUS 3
int oldcolor, currentcolor;
void setup(void) {
Serial.begin(115200);
delay(10);
Serial.println("FeatherWing TFT");
if (!ts.begin()) {
Serial.println("Couldn't start touchscreen controller");
while (1);
}
Serial.println("Touchscreen started");
tft.begin();
tft.fillScreen(ILI9341_BLACK);
// make the color selection boxes
tft.fillRect(0, 0, BOXSIZE, BOXSIZE, ILI9341_RED);
tft.fillRect(BOXSIZE, 0, BOXSIZE, BOXSIZE, ILI9341_YELLOW);
tft.fillRect(BOXSIZE*2, 0, BOXSIZE, BOXSIZE, ILI9341_GREEN);
tft.fillRect(BOXSIZE*3, 0, BOXSIZE, BOXSIZE, ILI9341_CYAN);
tft.fillRect(BOXSIZE*4, 0, BOXSIZE, BOXSIZE, ILI9341_BLUE);
tft.fillRect(BOXSIZE*5, 0, BOXSIZE, BOXSIZE, ILI9341_MAGENTA);
// select the current color 'red'
tft.drawRect(0, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE);
currentcolor = ILI9341_RED;
}
void loop() {
// Retrieve a point
TS_Point p = ts.getPoint();
Serial.print("X = "); Serial.print(p.x);
Serial.print("\tY = "); Serial.print(p.y);
Serial.print("\tPressure = "); Serial.println(p.z);
// Scale from ~0->4000 to tft.width using the calibration #'s
p.x = map(p.x, TS_MINX, TS_MAXX, 0, tft.width());
p.y = map(p.y, TS_MINY, TS_MAXY, 0, tft.height());
if (p.y < BOXSIZE) {
oldcolor = currentcolor;
if (p.x < BOXSIZE) {
currentcolor = ILI9341_RED;
tft.drawRect(0, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE);
} else if (p.x < BOXSIZE*2) {
currentcolor = ILI9341_YELLOW;
tft.drawRect(BOXSIZE, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE);
} else if (p.x < BOXSIZE*3) {
currentcolor = ILI9341_GREEN;
tft.drawRect(BOXSIZE*2, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE);
} else if (p.x < BOXSIZE*4) {
currentcolor = ILI9341_CYAN;
tft.drawRect(BOXSIZE*3, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE);
} else if (p.x < BOXSIZE*5) {
currentcolor = ILI9341_BLUE;
tft.drawRect(BOXSIZE*4, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE);
} else if (p.x < BOXSIZE*6) {
currentcolor = ILI9341_MAGENTA;
tft.drawRect(BOXSIZE*5, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE);
}
if (oldcolor != currentcolor) {
if (oldcolor == ILI9341_RED)
tft.fillRect(0, 0, BOXSIZE, BOXSIZE, ILI9341_RED);
if (oldcolor == ILI9341_YELLOW)
tft.fillRect(BOXSIZE, 0, BOXSIZE, BOXSIZE, ILI9341_YELLOW);
if (oldcolor == ILI9341_GREEN)
tft.fillRect(BOXSIZE*2, 0, BOXSIZE, BOXSIZE, ILI9341_GREEN);
if (oldcolor == ILI9341_CYAN)
tft.fillRect(BOXSIZE*3, 0, BOXSIZE, BOXSIZE, ILI9341_CYAN);
if (oldcolor == ILI9341_BLUE)
tft.fillRect(BOXSIZE*4, 0, BOXSIZE, BOXSIZE, ILI9341_BLUE);
if (oldcolor == ILI9341_MAGENTA)
tft.fillRect(BOXSIZE*5, 0, BOXSIZE, BOXSIZE, ILI9341_MAGENTA);
}
}
if (((p.y-PENRADIUS) > 0) && ((p.y+PENRADIUS) < tft.height())) {
tft.fillCircle(p.x, p.y, PENRADIUS, currentcolor);
}
}

View File

@ -1,9 +0,0 @@
name=Adafruit ILI9341
version=1.2.0
author=Adafruit
maintainer=Adafruit <info@adafruit.com>
sentence=Library for Adafruit ILI9341 displays
paragraph=Library for Adafruit ILI9341 displays
category=Display
url=https://github.com/adafruit/Adafruit_ILI9341
architectures=*

View File

@ -21,6 +21,8 @@ ST7789_LIGHTGREY,ST7789_DARKGREY,ST7789_ORANGE,ST7789_GREENYELLOW,ST7789_PINK};
#define ST7789_DIMMER
#endif
uint16_t Arduino_ST7789::GetColorFromIndex(uint8_t index) {
if (index>=sizeof(ST7789_colors)/2) index=0;
return ST7789_colors[index];
@ -50,7 +52,7 @@ inline uint16_t swapcolor(uint16_t x) {
}
#if defined (SPI_HAS_TRANSACTION)
static SPISettings mySPISettings;
static SPISettings ST7789_SPISettings;
#elif defined (__AVR__) || defined(CORE_TEENSY)
static uint8_t SPCRbackup;
static uint8_t mySPCR;
@ -58,7 +60,7 @@ inline uint16_t swapcolor(uint16_t x) {
#if defined (SPI_HAS_TRANSACTION)
#define SPI_BEGIN_TRANSACTION() if (_hwSPI) SPI.beginTransaction(mySPISettings)
#define SPI_BEGIN_TRANSACTION() if (_hwSPI) SPI.beginTransaction(ST7789_SPISettings)
#define SPI_END_TRANSACTION() if (_hwSPI) SPI.endTransaction()
#else
#define SPI_BEGIN_TRANSACTION() (void)
@ -217,26 +219,28 @@ void Arduino_ST7789::displayInit(const uint8_t *addr) {
uint16_t ms;
//<-----------------------------------------------------------------------------------------
DC_HIGH();
#if defined(USE_FAST_IO)
if (!_hwSPI) {
#if defined(USE_FAST_IO)
*clkport |= clkpinmask;
#else
#else
digitalWrite(_sclk, HIGH);
#endif
#endif
}
//<-----------------------------------------------------------------------------------------
numCommands = pgm_read_byte(addr++); // Number of commands to follow
while(numCommands--) { // For each command...
while (numCommands--) { // For each command...
writecommand(pgm_read_byte(addr++)); // Read, issue command
numArgs = pgm_read_byte(addr++); // Number of args to follow
ms = numArgs & ST_CMD_DELAY; // If hibit set, delay follows args
numArgs &= ~ST_CMD_DELAY; // Mask out delay bit
while(numArgs--) { // For each argument...
while (numArgs--) { // For each argument...
writedata(pgm_read_byte(addr++)); // Read, issue argument
}
if(ms) {
if (ms) {
ms = pgm_read_byte(addr++); // Read post-command delay time (ms)
if(ms == 255) ms = 500; // If 255, delay for 500 ms
if (ms == 255) ms = 500; // If 255, delay for 500 ms
delay(ms);
}
}
@ -270,16 +274,16 @@ void Arduino_ST7789::commonInit(const uint8_t *cmdList) {
dcport = portOutputRegister(digitalPinToPort(_dc));
dcpinmask = digitalPinToBitMask(_dc);
if (_cs>=0) {
csport = portOutputRegister(digitalPinToPort(_cs));
cspinmask = digitalPinToBitMask(_cs);
csport = portOutputRegister(digitalPinToPort(_cs));
cspinmask = digitalPinToBitMask(_cs);
}
#endif
if(_hwSPI) { // Using hardware SPI
#if defined (SPI_HAS_TRANSACTION)
SPI.begin();
mySPISettings = SPISettings(24000000, MSBFIRST, SPI_MODE2);
// ST7789_SPISettings = SPISettings(24000000, MSBFIRST, SPI_MODE2);
ST7789_SPISettings = SPISettings(1000000, MSBFIRST, SPI_MODE2);
#elif defined (__AVR__) || defined(CORE_TEENSY)
SPCRbackup = SPCR;
SPI.begin();
@ -318,7 +322,7 @@ void Arduino_ST7789::commonInit(const uint8_t *cmdList) {
delay(50);
}
if(cmdList)
if (cmdList)
displayInit(cmdList);
}
@ -391,7 +395,6 @@ void Arduino_ST7789::setAddrWindow(uint16_t x0, uint16_t y0, uint16_t x1, uint16
setAddrWindow_int(x0,y0,x1-1,y1-1);
}
void Arduino_ST7789::setAddrWindow_int(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1) {
uint16_t x_start = x0 + _xstart, x_end = x1 + _xstart;
uint16_t y_start = y0 + _ystart, y_end = y1 + _ystart;

View File

@ -15,6 +15,10 @@
#include <Adafruit_GFX.h>
#include <renderer.h>
#ifdef ESP8266
#define USE_FAST_IO
#endif
#if defined(__AVR__) || defined(CORE_TEENSY)
#include <avr/pgmspace.h>
#define USE_FAST_IO
@ -177,7 +181,7 @@ class Arduino_ST7789 : public Renderer {
int8_t _cs, _dc, _rst, _sid, _sclk, _bp;
#if defined(USE_FAST_IO)
volatile RwReg *dataport, *clkport, *csport, *dcport;
volatile uint32_t *dataport, *clkport, *csport, *dcport;
#if defined(__AVR__) || defined(CORE_TEENSY) // 8 bit!
uint8_t datapinmask, clkpinmask, cspinmask, dcpinmask;

View File

@ -87,6 +87,14 @@ void Renderer::Updateframe() {
}
void Renderer::setTextSize(uint8_t sf) {
if (sf < 1) sf = 1;
if (sf > 4) sf = 4;
tsize = sf;
Adafruit_GFX::setTextSize(sf);
}
/**
* @brief: this draws a charactor on the frame buffer but not refresh
*/
@ -96,14 +104,25 @@ void Renderer::DrawCharAt(int16_t x, int16_t y, char ascii_char,int16_t colored)
int i, j;
unsigned int char_offset = (ascii_char - ' ') * xfont->Height * (xfont->Width / 8 + (xfont->Width % 8 ? 1 : 0));
const unsigned char* ptr = &xfont->table[char_offset];
uint8_t sf = tsize;
for (j = 0; j < xfont->Height; j++) {
for (i = 0; i < xfont->Width; i++) {
if (pgm_read_byte(ptr) & (0x80 >> (i % 8))) {
writePixel(x + i, y + j, colored);
if (sf == 1) {
writePixel(x + i, y + j, colored);
} else {
writeFillRect(x + i * sf, y + j * sf, sf, sf, colored);
}
} else {
// fill background
if (!drawmode) writePixel(x + i, y + j, textbgcolor);
if (!drawmode) {
if (sf == 1) {
writePixel(x + i, y + j, textbgcolor);
} else {
writeFillRect(x + i * sf, y + j * sf, sf, sf, textbgcolor);
}
}
}
if (i % 8 == 7) {
ptr++;
@ -146,8 +165,8 @@ void Renderer::DrawStringAt(int16_t x, int16_t y, const char* text, uint16_t col
if (flag) {
x=(x-1)*xfont->Width;
y=(y-1)*xfont->Height;
x=(x-1)*xfont->Width*tsize;
y=(y-1)*xfont->Height*tsize;
refcolumn = x;
}
@ -159,7 +178,7 @@ void Renderer::DrawStringAt(int16_t x, int16_t y, const char* text, uint16_t col
/* Display one character on EPD */
DrawCharAt(refcolumn, y, *p_text, colored);
/* increment the column position */
refcolumn += xfont->Width;
refcolumn += xfont->Width*tsize;
/* Point on the next character */
p_text++;
counter++;
@ -527,6 +546,13 @@ void Renderer::setDrawMode(uint8_t mode) {
void Renderer::invertDisplay(boolean i) {
}
void Renderer::setScrollMargins(uint16_t top, uint16_t bottom) {
}
void Renderer::scrollTo(uint16_t y) {
}
void VButton::xdrawButton(bool inverted) {
wr_redir=1;
drawButton(inverted);
@ -626,4 +652,5 @@ uint16_t VButton::UpdateSlider(int16_t x, int16_t y) {
/* END OF FILE */

View File

@ -36,15 +36,19 @@ public:
virtual void pushColors(uint16_t *data, uint16_t len, boolean first);
virtual void setAddrWindow(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1);
virtual void invertDisplay(boolean i);
virtual void setScrollMargins(uint16_t top, uint16_t bottom);
virtual void scrollTo(uint16_t y);
void setDrawMode(uint8_t mode);
uint8_t drawmode;
virtual void FastString(uint16_t x,uint16_t y,uint16_t tcolor, const char* str);
void setTextSize(uint8_t s);
private:
void DrawCharAt(int16_t x, int16_t y, char ascii_char,int16_t colored);
inline void drawFastVLineInternal(int16_t x, int16_t y, int16_t h, uint16_t color) __attribute__((always_inline));
inline void drawFastHLineInternal(int16_t x, int16_t y, int16_t w, uint16_t color) __attribute__((always_inline));
sFONT *selected_font;
uint8_t font;
uint8_t tsize = 1;
};
typedef union {

View File

@ -46,7 +46,7 @@
*
*/
#ifdef ESP32
//#ifdef ESP32
#include "ILI9341_2.h"
#include <limits.h>
@ -57,25 +57,26 @@
#define ILI9341_2_DIMMER
#undef ESP32_PWM_CHANNEL
#define ESP32_PWM_CHANNEL 1
#define ILI9341_2_HWSPI
#endif
#define ILI9341_2_HWSPI
#if defined (ILI9341_2_HWSPI)
#define SPI_BEGIN_TRANSACTION() if (_hwspi) spi2->beginTransaction(sspi2)
#define SPI_END_TRANSACTION() if (_hwspi) spi2->endTransaction()
#else
#define SPI_BEGIN_TRANSACTION() (void)
#define SPI_END_TRANSACTION() (void)
#define SPI_BEGIN_TRANSACTION()
#define SPI_END_TRANSACTION()
#endif
const uint16_t ili9341_2_colors[]={ILI9341_2_BLACK,ILI9341_2_WHITE,ILI9341_2_RED,ILI9341_2_GREEN,ILI9341_2_BLUE,ILI9341_2_CYAN,ILI9341_2_MAGENTA,\
ILI9341_2_YELLOW,ILI9341_2_NAVY,ILI9341_2_DARKGREEN,ILI9341_2_DARKCYAN,ILI9341_2_MAROON,ILI9341_2_PURPLE,ILI9341_2_OLIVE,\
ILI9341_2_LIGHTGREY,ILI9341_2_DARKGREY,ILI9341_2_ORANGE,ILI9341_2_GREENYELLOW,ILI9341_2_PINK};
const uint16_t ili9341_2_colors[]={ILI9341_BLACK,ILI9341_WHITE,ILI9341_RED,ILI9341_GREEN,ILI9341_BLUE,ILI9341_CYAN,ILI9341_MAGENTA,\
ILI9341_YELLOW,ILI9341_NAVY,ILI9341_DARKGREEN,ILI9341_DARKCYAN,ILI9341_MAROON,ILI9341_PURPLE,ILI9341_OLIVE,\
ILI9341_LIGHTGREY,ILI9341_DARKGREY,ILI9341_ORANGE,ILI9341_GREENYELLOW,ILI9341_PINK};
uint16_t ILI9341_2::GetColorFromIndex(uint8_t index) {
if (index>=sizeof(ili9341_2_colors)/2) index=0;
if (index >= sizeof(ili9341_2_colors) / 2) index = 0;
return ili9341_2_colors[index];
}
@ -135,7 +136,7 @@ static const uint8_t PROGMEM ili9342_initcmd[] = {
0x00 // End of list
};
ILI9341_2::ILI9341_2(int8_t cs, int8_t mosi, int8_t miso, int8_t sclk, int8_t res, int8_t dc, int8_t bp) : Renderer(ILI9341_2_TFTWIDTH, ILI9341_2_TFTHEIGHT) {
ILI9341_2::ILI9341_2(int8_t cs, int8_t mosi, int8_t miso, int8_t sclk, int8_t res, int8_t dc, int8_t bp, int8_t spibus) : Renderer(ILI9341_TFTWIDTH, ILI9341_TFTHEIGHT) {
_cs = cs;
_mosi = mosi;
_miso = miso;
@ -143,20 +144,22 @@ ILI9341_2::ILI9341_2(int8_t cs, int8_t mosi, int8_t miso, int8_t sclk, int8_t re
_res = res;
_dc = dc;
_bp = bp;
_hwspi = 1;
_hwspi = 1; // sign ili9341
_spibus = spibus;
}
// special init for ILI9342
ILI9341_2::ILI9341_2(int8_t cs, int8_t res, int8_t dc, int8_t bp) : Renderer(ILI9341_2_TFTWIDTH, ILI9341_2_TFTHEIGHT) {
// special init for ILI9342 uses SPI1 previously defined with SDCard
ILI9341_2::ILI9341_2(int8_t cs, int8_t res, int8_t dc, int8_t bp) : Renderer(ILI9341_TFTWIDTH, ILI9341_TFTHEIGHT) {
_cs = cs;
_res = res;
_dc = dc;
_bp = bp;
_hwspi = 2;
_hwspi = 2; // sign ili9342
_spibus = 1;
}
#define ILI9341_2_CS_LOW digitalWrite( _cs, LOW);
#define ILI9341_2_CS_HIGH digitalWrite( _cs, HIGH);
#define ILI9341_2_CS_LOW if (_cs>=0) digitalWrite( _cs, LOW);
#define ILI9341_2_CS_HIGH if (_cs>=0) digitalWrite( _cs, HIGH);
void ILI9341_2::writecmd(uint8_t d) {
@ -172,12 +175,12 @@ void ILI9341_2::writecmd(uint8_t d) {
void ILI9341_2::init(uint16_t width, uint16_t height) {
//sspi2 = SPISettings(2500000, MSBFIRST, SPI_MODE3);
if (_hwspi==2) {
iwidth=ILI9341_2_TFTWIDTH;
iheight=ILI9341_2_TFTHEIGHT;
if (_hwspi == 2) {
iwidth = ILI9341_TFTWIDTH;
iheight = ILI9341_TFTHEIGHT;
} else {
iwidth=ILI9341_2_TFTHEIGHT;
iheight=ILI9341_2_TFTWIDTH;
iwidth = ILI9341_TFTHEIGHT;
iheight = ILI9341_TFTWIDTH;
}
#ifdef ILI9341_2_HWSPI
@ -187,8 +190,17 @@ void ILI9341_2::init(uint16_t width, uint16_t height) {
if (_hwspi==2) {
spi2=&SPI;
} else {
spi2 = new SPIClass(HSPI);
#ifdef ESP32
if (_spibus == 2) {
spi2 = new SPIClass(HSPI);
} else {
spi2 = &SPI;
}
spi2->begin(_sclk, _miso, _mosi, -1);
#else
SPI.begin();
spi2 = &SPI;
#endif
}
#else
@ -205,12 +217,12 @@ void ILI9341_2::init(uint16_t width, uint16_t height) {
pinMode(_dc, OUTPUT);
digitalWrite(_dc,HIGH);
if (_bp>=0) {
if (_bp >= 0) {
pinMode(_bp, OUTPUT);
digitalWrite(_bp,HIGH);
}
if (_res>=0) {
if (_res >= 0) {
pinMode(_res, OUTPUT);
digitalWrite(_res, HIGH);
delay(100);
@ -227,11 +239,11 @@ void ILI9341_2::init(uint16_t width, uint16_t height) {
delay(150);
}
if (_bp>=0) {
if (_bp >= 0) {
#ifdef ILI9341_2_DIMMER
ledcSetup(ESP32_PWM_CHANNEL,4000,8);
ledcAttachPin(_bp,ESP32_PWM_CHANNEL);
ledcWrite(ESP32_PWM_CHANNEL,128);
ledcSetup(ESP32_PWM_CHANNEL, 4000, 8);
ledcAttachPin(_bp, ESP32_PWM_CHANNEL);
ledcWrite(ESP32_PWM_CHANNEL, 128);
#else
pinMode(_bp, OUTPUT);
#endif
@ -261,11 +273,9 @@ void ILI9341_2::init(uint16_t width, uint16_t height) {
#endif
ILI9341_2_CS_HIGH
if(x & 0x80) delay(120);
if (x & 0x80) delay(120);
}
SPI_END_TRANSACTION();
// endWrite();
}
void ILI9341_2::DisplayInit(int8_t p,int8_t size,int8_t rot,int8_t font) {
@ -275,9 +285,9 @@ void ILI9341_2::DisplayInit(int8_t p,int8_t size,int8_t rot,int8_t font) {
setRotation(rot);
setTextFont(font&3);
setTextSize(size&7);
setTextColor(ILI9341_2_WHITE,ILI9341_2_BLACK);
setTextColor(ILI9341_WHITE,ILI9341_BLACK);
setCursor(0,0);
fillScreen(ILI9341_2_BLACK);
fillScreen(ILI9341_BLACK);
}
void ILI9341_2::setAddrWindow(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1) {
@ -331,21 +341,20 @@ void ILI9341_2::setAddrWindow_int(uint16_t x, uint16_t y, uint16_t w, uint16_t h
void ILI9341_2::drawPixel(int16_t x, int16_t y, uint16_t color) {
if((x < 0) ||(x >= _width) || (y < 0) || (y >= _height)) return;
ILI9341_2_CS_LOW
SPI_BEGIN_TRANSACTION();
setAddrWindow_int(x,y,1,1);
ILI9341_2_CS_LOW
setAddrWindow_int(x,y,1,1);
#ifdef ILI9341_2_HWSPI
spi2->write16(color);
#else
spiwrite16(color);
#endif
ILI9341_2_CS_HIGH
SPI_END_TRANSACTION();
@ -354,7 +363,7 @@ void ILI9341_2::drawPixel(int16_t x, int16_t y, uint16_t color) {
void ILI9341_2::setRotation(uint8_t m) {
if (_hwspi<2) {
if (_hwspi < 2) {
rotation = m % 4; // can't be higher than 3
switch (rotation) {
case 0:
@ -425,15 +434,14 @@ void ILI9341_2::setRotation(uint8_t m) {
void ILI9341_2::drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color) {
// Rudimentary clipping
if((x >= _width) || (y >= _height)) return;
if((y+h-1) >= _height) h = _height-y;
ILI9341_2_CS_LOW
if ((x >= _width) || (y >= _height)) return;
if ((y + h - 1) >= _height) h = _height - y;
SPI_BEGIN_TRANSACTION();
setAddrWindow_int(x, y, 1, h);
ILI9341_2_CS_LOW
setAddrWindow_int(x, y, 1, h);
while (h--) {
#ifdef ILI9341_2_HWSPI
@ -454,10 +462,11 @@ void ILI9341_2::drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color) {
if((x >= _width) || (y >= _height)) return;
if((x+w-1) >= _width) w = _width-x;
ILI9341_2_CS_LOW
SPI_BEGIN_TRANSACTION();
ILI9341_2_CS_LOW
setAddrWindow_int(x, y, w, 1);
@ -486,10 +495,11 @@ void ILI9341_2::fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t co
if((x + w - 1) >= _width) w = _width - x;
if((y + h - 1) >= _height) h = _height - y;
ILI9341_2_CS_LOW
SPI_BEGIN_TRANSACTION();
ILI9341_2_CS_LOW
setAddrWindow_int(x, y, w, h);
for (y=h; y>0; y--) {
@ -547,7 +557,7 @@ void ILI9341_2::DisplayOnff(int8_t on) {
void ILI9341_2::invertDisplay(boolean i) {
ILI9341_2_CS_LOW
writecmd(i ? ILI9341_2_INVOFF : ILI9341_2_INVON);
writecmd(i ? ILI9341_2_INVON : ILI9341_2_INVOFF);
ILI9341_2_CS_HIGH
}
@ -605,4 +615,25 @@ void ILI9341_2::spiwrite32(uint32_t c) {
#endif
}
#endif
void ILI9341_2::setScrollMargins(uint16_t top, uint16_t bottom) {
uint16_t height = _height - (top + bottom);
SPI_BEGIN_TRANSACTION();
ILI9341_2_CS_LOW
writecmd(0x33);
spiwrite16(top);
spiwrite16(height);
spiwrite16(bottom);
ILI9341_2_CS_HIGH
SPI_END_TRANSACTION();
}
void ILI9341_2::scrollTo(uint16_t y) {
SPI_BEGIN_TRANSACTION();
ILI9341_2_CS_LOW
writecmd(ILI9341_2_VSCRSADD);
spiwrite16(y);
ILI9341_2_CS_HIGH
SPI_END_TRANSACTION();
}

View File

@ -22,8 +22,8 @@
#include <renderer.h>
#include <SPI.h>
#define ILI9341_2_TFTWIDTH 320
#define ILI9341_2_TFTHEIGHT 240
#define ILI9341_TFTWIDTH 320
#define ILI9341_TFTHEIGHT 240
#define ILI9341_2_NOP 0x00 ///< No-op register
#define ILI9341_2_SWRESET 0x01 ///< Software reset register
@ -81,25 +81,25 @@
// Color definitions
#define ILI9341_2_BLACK 0x0000 /* 0, 0, 0 */
#define ILI9341_2_NAVY 0x000F /* 0, 0, 128 */
#define ILI9341_2_DARKGREEN 0x03E0 /* 0, 128, 0 */
#define ILI9341_2_DARKCYAN 0x03EF /* 0, 128, 128 */
#define ILI9341_2_MAROON 0x7800 /* 128, 0, 0 */
#define ILI9341_2_PURPLE 0x780F /* 128, 0, 128 */
#define ILI9341_2_OLIVE 0x7BE0 /* 128, 128, 0 */
#define ILI9341_2_LIGHTGREY 0xC618 /* 192, 192, 192 */
#define ILI9341_2_DARKGREY 0x7BEF /* 128, 128, 128 */
#define ILI9341_2_BLUE 0x001F /* 0, 0, 255 */
#define ILI9341_2_GREEN 0x07E0 /* 0, 255, 0 */
#define ILI9341_2_CYAN 0x07FF /* 0, 255, 255 */
#define ILI9341_2_RED 0xF800 /* 255, 0, 0 */
#define ILI9341_2_MAGENTA 0xF81F /* 255, 0, 255 */
#define ILI9341_2_YELLOW 0xFFE0 /* 255, 255, 0 */
#define ILI9341_2_WHITE 0xFFFF /* 255, 255, 255 */
#define ILI9341_2_ORANGE 0xFD20 /* 255, 165, 0 */
#define ILI9341_2_GREENYELLOW 0xAFE5 /* 173, 255, 47 */
#define ILI9341_2_PINK 0xF81F
#define ILI9341_BLACK 0x0000 /* 0, 0, 0 */
#define ILI9341_NAVY 0x000F /* 0, 0, 128 */
#define ILI9341_DARKGREEN 0x03E0 /* 0, 128, 0 */
#define ILI9341_DARKCYAN 0x03EF /* 0, 128, 128 */
#define ILI9341_MAROON 0x7800 /* 128, 0, 0 */
#define ILI9341_PURPLE 0x780F /* 128, 0, 128 */
#define ILI9341_OLIVE 0x7BE0 /* 128, 128, 0 */
#define ILI9341_LIGHTGREY 0xC618 /* 192, 192, 192 */
#define ILI9341_DARKGREY 0x7BEF /* 128, 128, 128 */
#define ILI9341_BLUE 0x001F /* 0, 0, 255 */
#define ILI9341_GREEN 0x07E0 /* 0, 255, 0 */
#define ILI9341_CYAN 0x07FF /* 0, 255, 255 */
#define ILI9341_RED 0xF800 /* 255, 0, 0 */
#define ILI9341_MAGENTA 0xF81F /* 255, 0, 255 */
#define ILI9341_YELLOW 0xFFE0 /* 255, 255, 0 */
#define ILI9341_WHITE 0xFFFF /* 255, 255, 255 */
#define ILI9341_ORANGE 0xFD20 /* 255, 165, 0 */
#define ILI9341_GREENYELLOW 0xAFE5 /* 173, 255, 47 */
#define ILI9341_PINK 0xF81F
#define MADCTL_2_MY 0x80 ///< Bottom to top
@ -115,7 +115,7 @@ class ILI9341_2 : public Renderer {
public:
ILI9341_2(int8_t cs, int8_t mosi, int8_t miso, int8_t sclk, int8_t res, int8_t dc, int8_t bp);
ILI9341_2(int8_t cs, int8_t mosi, int8_t miso, int8_t sclk, int8_t res, int8_t dc, int8_t bp, int8_t spibus);
ILI9341_2(int8_t cs, int8_t res, int8_t dc, int8_t bp);
void init(uint16_t width, uint16_t height);
@ -141,6 +141,8 @@ class ILI9341_2 : public Renderer {
void spiwrite(uint8_t c);
void spiwrite16(uint16_t c);
void spiwrite32(uint32_t c);
void setScrollMargins(uint16_t top, uint16_t bottom);
void scrollTo(uint16_t y);
uint8_t tabcolor;
uint8_t dimmer;
@ -151,6 +153,7 @@ class ILI9341_2 : public Renderer {
int8_t _res;
int8_t _dc;
int8_t _bp;
int8_t _spibus;
int8_t _hwspi;
uint16_t iwidth;
uint16_t iheight;

View File

@ -1655,7 +1655,8 @@ void GpioInit(void)
bool valid_cs = (ValidSpiPinUsed(GPIO_SPI_CS) ||
ValidSpiPinUsed(GPIO_RC522_CS) ||
(ValidSpiPinUsed(GPIO_NRF24_CS) && ValidSpiPinUsed(GPIO_NRF24_DC)) ||
(ValidSpiPinUsed(GPIO_ILI9341_CS) && ValidSpiPinUsed(GPIO_ILI9341_DC)) ||
ValidSpiPinUsed(GPIO_ILI9341_CS) ||
ValidSpiPinUsed(GPIO_ILI9341_DC) || // there are also boards without cs
ValidSpiPinUsed(GPIO_EPAPER29_CS) ||
ValidSpiPinUsed(GPIO_EPAPER42_CS) ||
ValidSpiPinUsed(GPIO_ILI9488_CS) ||

View File

@ -4326,14 +4326,15 @@ int16_t Run_script_sub(const char *type, int8_t tlen, struct GVARS *gv) {
goto next_line;
}
#ifdef USE_SENDMAIL
/*
else if (!strncmp(lp, "sm", 2)) {
lp+=3;
char tmp[256];
Replace_Cmd_Vars(lp ,1 , tmp, sizeof(tmp));
SendMail(tmp);
goto next_line;
}
#endif
}*/
#endif
else if (!strncmp(lp,"=>",2) || !strncmp(lp,"->",2) || !strncmp(lp,"+>",2) || !strncmp(lp,"print",5)) {
// execute cmd
uint8_t sflag = 0,pflg = 0,svmqtt,swll;

View File

@ -658,9 +658,16 @@ void DisplayText(void)
break;
case 'f':
// font sx
if (renderer) renderer->setTextFont(*cp&7);
else DisplaySetFont(*cp&7);
cp += 1;
{ uint8_t font = *cp&7;
if (renderer) renderer->setTextFont(font);
else DisplaySetFont(font);
if (font) {
// for backward compatibility set size to 1 on non GFX fonts
if (renderer) renderer->setTextSize(1);
else DisplaySetSize(1);
}
cp += 1;
}
break;
case 'a':
// rotation angle

View File

@ -1,7 +1,7 @@
/*
xdsp_04_ili9341.ino - Display Tft Ili9341 support for Tasmota
xdsp_04_ILI9341.ino - Display ILI9341/2 support for Tasmota
Copyright (C) 2021 Theo Arends and Adafruit
Copyright (C) 2021 Gerhard Mutz and Theo Arends
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -19,28 +19,206 @@
#ifdef USE_SPI
#ifdef USE_DISPLAY
#ifdef USE_DISPLAY_ILI9341
#if (defined(USE_DISPLAY_ILI9341) || defined(USE_DISPLAY_ILI9342))
#define XDSP_04 4
#include <ILI9341_2.h>
extern uint8_t *buffer;
extern uint8_t color_type;
ILI9341_2 *ili9341_2;
#ifdef USE_FT5206
#include <FT5206.h>
uint8_t ili9342_ctouch_counter = 0;
#endif // USE_FT5206
bool tft_init_done = false;
/*********************************************************************************************/
void ILI9341_InitDriver()
{
#ifdef USE_M5STACK_CORE2
if (TasmotaGlobal.spi_enabled) {
#else
if (PinUsed(GPIO_ILI9341_CS) || PinUsed(GPIO_ILI9341_DC) &&
(TasmotaGlobal.spi_enabled || TasmotaGlobal.soft_spi_enabled)) {
#endif
Settings.display_model = XDSP_04;
if (Settings.display_width != ILI9341_TFTWIDTH) {
Settings.display_width = ILI9341_TFTWIDTH;
}
if (Settings.display_height != ILI9341_TFTHEIGHT) {
Settings.display_height = ILI9341_TFTHEIGHT;
}
// disable screen buffer
buffer = NULL;
// default colors
fg_color = ILI9341_WHITE;
bg_color = ILI9341_BLACK;
#ifdef USE_M5STACK_CORE2
// fixed pins on m5stack core2
ili9341_2 = new ILI9341_2(5, -2, 15, -2);
#else
// There are displays without CS
int8_t spi_cs_pin = -1;
if (PinUsed(GPIO_ILI9341_CS)) {
spi_cs_pin = Pin(GPIO_ILI9341_CS);
}
int8_t backlight_pin = -1;
if (PinUsed(GPIO_BACKLIGHT)) {
backlight_pin = Pin(GPIO_BACKLIGHT);
}
int8_t oled_reset_pin = -1;
if (PinUsed(GPIO_OLED_RESET)) {
oled_reset_pin = Pin(GPIO_OLED_RESET);
}
// check for special case with 2 SPI busses (ESP32 bitcoin)
if (TasmotaGlobal.soft_spi_enabled) {
// Init renderer, may use hardware spi, however we use SSPI defintion because SD card uses SPI definition (2 spi busses)
if (PinUsed(GPIO_SSPI_MOSI) && PinUsed(GPIO_SSPI_MISO) && PinUsed(GPIO_SSPI_SCLK)) {
ili9341_2 = new ILI9341_2(spi_cs_pin, Pin(GPIO_SSPI_MOSI), Pin(GPIO_SSPI_MISO), Pin(GPIO_SSPI_SCLK), oled_reset_pin, Pin(GPIO_ILI9341_DC), backlight_pin, 2);
}
} else if (TasmotaGlobal.spi_enabled) {
if (PinUsed(GPIO_ILI9341_DC)) {
ili9341_2 = new ILI9341_2(spi_cs_pin, Pin(GPIO_SPI_MOSI), Pin(GPIO_SPI_MISO), Pin(GPIO_SPI_CLK), oled_reset_pin, Pin(GPIO_ILI9341_DC), backlight_pin, 1);
}
}
#endif // USE_M5STACK_CORE2
if (ili9341_2 == nullptr) {
AddLog(LOG_LEVEL_INFO, PSTR("DSP: ILI934x invalid GPIOs"));
return;
}
ili9341_2->init(Settings.display_width, Settings.display_height);
renderer = ili9341_2;
renderer->DisplayInit(DISPLAY_INIT_MODE, Settings.display_size, Settings.display_rotate, Settings.display_font);
renderer->dim(Settings.display_dimmer);
#ifdef SHOW_SPLASH
// Welcome text
renderer->setTextFont(2);
renderer->setTextSize(1);
renderer->setTextColor(ILI9341_WHITE, ILI9341_BLACK);
#ifdef USE_DISPLAY_ILI9341
renderer->DrawStringAt(50, (Settings.display_height/2)-12, "ILI9341 TFT!", ILI9341_WHITE, 0);
#else
renderer->DrawStringAt(50, (Settings.display_height/2)-12, "ILI9342 TFT!", ILI9341_WHITE, 0);
#endif
delay(1000);
#endif // SHOW_SPLASH
color_type = COLOR_COLOR;
#ifdef USE_DISPLAY_MODES1TO5
if (Settings.display_rotate) {
DisplayAllocScreenBuffer();
}
Ili9341InitMode();
#endif // USE_DISPLAY_MODES1TO5
#ifdef ESP32
#ifdef USE_FT5206
// start digitizer with fixed adress and pins for esp32
#undef SDA_2
#define SDA_2 21
#undef SCL_2
#define SCL_2 22
Wire1.begin(SDA_2, SCL_2, 400000);
Touch_Init(Wire1);
#endif // USE_FT5206
#endif // ESP32
tft_init_done = true;
#ifdef USE_DISPLAY_ILI9341
AddLog(LOG_LEVEL_INFO, PSTR("DSP: ILI9341"));
#else
AddLog(LOG_LEVEL_INFO, PSTR("DSP: ILI9342"));
#endif
}
}
void core2_disp_pwr(uint8_t on);
void core2_disp_dim(uint8_t dim);
void ili9342_bpwr(uint8_t on) {
#ifdef USE_M5STACK_CORE2
core2_disp_pwr(on);
#endif
}
void ili9342_dimm(uint8_t dim) {
#ifdef USE_M5STACK_CORE2
core2_disp_dim(dim);
#endif
}
#ifdef ESP32
#ifdef USE_FT5206
#ifdef USE_TOUCH_BUTTONS
void ili9342_RotConvert(int16_t *x, int16_t *y) {
int16_t temp;
if (renderer) {
uint8_t rot = renderer->getRotation();
switch (rot) {
case 0:
break;
case 1:
temp = *y;
*y = renderer->height() - *x;
*x = temp;
break;
case 2:
*x = renderer->width() - *x;
*y = renderer->height() - *y;
break;
case 3:
temp = *y;
*y = *x;
*x = renderer->width() - temp;
break;
}
}
}
// check digitizer hit
void ili9342_CheckTouch() {
ili9342_ctouch_counter++;
if (2 == ili9342_ctouch_counter) {
// every 100 ms should be enough
ili9342_ctouch_counter = 0;
Touch_Check(ili9342_RotConvert);
}
}
#endif // USE_TOUCH_BUTTONS
#endif // USE_FT5206
#endif // ESP32
#ifdef USE_DISPLAY_MODES1TO5
#define TFT_TOP 16
#define TFT_BOTTOM 16
#define TFT_FONT_WIDTH 6
#define TFT_FONT_HEIGTH 8 // Adafruit minimal font heigth pixels
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_ILI9341.h> // TFT 320x240 and 480x320
Adafruit_ILI9341 *tft;
uint16_t tft_top = TFT_TOP;
uint16_t tft_bottom = TFT_BOTTOM;
uint16_t tft_scroll = TFT_TOP;
uint16_t tft_cols = 0;
bool tft_init_done = false;
/*********************************************************************************************/
bool Ili9341Header(void) {
if (Settings.display_cols[0] != tft_cols) {
@ -53,107 +231,32 @@ bool Ili9341Header(void) {
tft_bottom = 0;
}
tft_scroll = tft_top;
tft->setScrollMargins(tft_top, tft_bottom);
renderer->setScrollMargins(tft_top, tft_bottom);
}
return (tft_cols > 17);
}
void Ili9341InitMode(void) {
tft->setRotation(Settings.display_rotate); // 0
tft->invertDisplay(0);
tft->fillScreen(ILI9341_BLACK);
tft->setTextWrap(false); // Allow text to run off edges
tft->cp437(true);
// renderer->setRotation(Settings.display_rotate); // 0
#ifdef USE_DISPLAY_ILI9341
renderer->invertDisplay(0);
#endif
renderer->fillScreen(ILI9341_BLACK);
renderer->setTextWrap(false); // Allow text to run off edges
renderer->cp437(true);
if (!Settings.display_mode) {
tft->setCursor(0, 0);
tft->setTextColor(ILI9341_WHITE, ILI9341_BLACK);
tft->setTextSize(1);
renderer->setCursor(0, 0);
renderer->setTextColor(ILI9341_WHITE, ILI9341_BLACK);
renderer->setTextSize(1);
} else {
Ili9341Header();
tft->setCursor(0, 0);
tft->setTextColor(ILI9341_YELLOW, ILI9341_BLACK);
tft->setTextSize(2);
renderer->setCursor(0, 0);
renderer->setTextColor(ILI9341_YELLOW, ILI9341_BLACK);
renderer->setTextSize(2);
// tft->println("HEADER");
}
}
void Ili9341Init(uint8_t mode) {
switch(mode) {
case DISPLAY_INIT_MODE:
Ili9341InitMode();
#ifdef USE_DISPLAY_MODES1TO5
if (Settings.display_rotate) {
DisplayClearScreenBuffer();
}
#endif // USE_DISPLAY_MODES1TO5
break;
case DISPLAY_INIT_PARTIAL:
case DISPLAY_INIT_FULL:
break;
}
}
void Ili9341InitDriver(void) {
if (PinUsed(GPIO_ILI9341_CS) && PinUsed(GPIO_ILI9341_DC) && TasmotaGlobal.spi_enabled) {
Settings.display_model = XDSP_04;
if (Settings.display_width != ILI9341_TFTWIDTH) {
Settings.display_width = ILI9341_TFTWIDTH;
}
if (Settings.display_height != ILI9341_TFTHEIGHT) {
Settings.display_height = ILI9341_TFTHEIGHT;
}
tft = new Adafruit_ILI9341(Pin(GPIO_ILI9341_CS), Pin(GPIO_ILI9341_DC));
tft->begin();
#ifdef USE_DISPLAY_MODES1TO5
if (Settings.display_rotate) {
DisplayAllocScreenBuffer();
}
#endif // USE_DISPLAY_MODES1TO5
Ili9341InitMode();
tft_init_done = true;
AddLog(LOG_LEVEL_INFO, PSTR("DSP: ILI9341"));
}
}
void Ili9341Clear(void) {
tft->fillScreen(ILI9341_BLACK);
tft->setCursor(0, 0);
}
void Ili9341DrawStringAt(uint16_t x, uint16_t y, char *str, uint16_t color, uint8_t flag) {
uint16_t active_color = ILI9341_WHITE;
tft->setTextSize(Settings.display_size);
if (!flag) {
tft->setCursor(x, y);
} else {
tft->setCursor((x-1) * TFT_FONT_WIDTH * Settings.display_size, (y-1) * TFT_FONT_HEIGTH * Settings.display_size);
}
if (color) { active_color = color; }
tft->setTextColor(active_color, ILI9341_BLACK);
tft->println(str);
}
void Ili9341DisplayOnOff() {
// tft->showDisplay(disp_power);
// tft->invertDisplay(disp_power);
if (PinUsed(GPIO_BACKLIGHT)) {
pinMode(Pin(GPIO_BACKLIGHT), OUTPUT);
digitalWrite(Pin(GPIO_BACKLIGHT), disp_power);
}
}
/*********************************************************************************************/
#ifdef USE_DISPLAY_MODES1TO5
void Ili9341PrintLog(void) {
disp_refresh--;
if (!disp_refresh) {
@ -167,40 +270,40 @@ void Ili9341PrintLog(void) {
uint8_t size = Settings.display_size;
uint16_t theight = size * TFT_FONT_HEIGTH;
tft->setTextSize(size);
tft->setTextColor(ILI9341_CYAN, ILI9341_BLACK); // Add background color to solve flicker
renderer->setTextSize(size);
renderer->setTextColor(ILI9341_CYAN, ILI9341_BLACK); // Add background color to solve flicker
if (!Settings.display_rotate) { // Use hardware scroll
tft->setCursor(0, tft_scroll);
tft->fillRect(0, tft_scroll, tft->width(), theight, ILI9341_BLACK); // Erase line
tft->print(txt);
renderer->setCursor(0, tft_scroll);
renderer->fillRect(0, tft_scroll, renderer->width(), theight, ILI9341_BLACK); // Erase line
renderer->print(txt);
tft_scroll += theight;
if (tft_scroll >= (tft->height() - tft_bottom)) {
if (tft_scroll >= (renderer->height() - tft_bottom)) {
tft_scroll = tft_top;
}
tft->scrollTo(tft_scroll);
renderer->scrollTo(tft_scroll);
} else {
uint8_t last_row = Settings.display_rows -1;
tft_scroll = (tft_top) ? theight : 0; // Start below header
tft->setCursor(0, tft_scroll);
renderer->setCursor(0, tft_scroll);
for (uint32_t i = 0; i < last_row; i++) {
strlcpy(disp_screen_buffer[i], disp_screen_buffer[i +1], disp_screen_buffer_cols);
// tft->fillRect(0, tft_scroll, tft->width(), theight, ILI9341_BLACK); // Erase line
tft->print(disp_screen_buffer[i]);
renderer->print(disp_screen_buffer[i]);
tft_scroll += theight;
tft->setCursor(0, tft_scroll);
renderer->setCursor(0, tft_scroll);
delay(1); // Fix background runs heap usage due to long runtime of this loop (up to 1 second)
}
strlcpy(disp_screen_buffer[last_row], txt, disp_screen_buffer_cols);
DisplayFillScreen(last_row);
tft->print(disp_screen_buffer[last_row]);
renderer->print(disp_screen_buffer[last_row]);
}
AddLog(LOG_LEVEL_DEBUG, PSTR(D_LOG_APPLICATION "[%s]"), txt);
}
}
}
void Ili9341Refresh(void) { // Every second
void ILI9341_Refresh(void) { // Every second
if (Settings.display_mode) { // Mode 0 is User text
// 24-04-2017 13:45:43 = 19 + 1 ('\0') = 20
// 24-04-2017 13:45 = 16 + 1 ('\0') = 17
@ -212,9 +315,9 @@ void Ili9341Refresh(void) { // Every second
char spaces[Settings.display_cols[0] - (8 + time_size)];
char time[time_size]; // 13:45:43
tft->setTextSize(Settings.display_size);
tft->setTextColor(ILI9341_YELLOW, ILI9341_RED); // Add background color to solve flicker
tft->setCursor(0, 0);
renderer->setTextSize(Settings.display_size);
renderer->setTextColor(ILI9341_YELLOW, ILI9341_RED); // Add background color to solve flicker
renderer->setCursor(0, 0);
snprintf_P(date4, sizeof(date4), PSTR("%02d" D_MONTH_DAY_SEPARATOR "%02d" D_YEAR_MONTH_SEPARATOR "%04d"), RtcTime.day_of_month, RtcTime.month, RtcTime.year);
memset(spaces, 0x20, sizeof(spaces));
@ -222,9 +325,9 @@ void Ili9341Refresh(void) { // Every second
snprintf_P(time, sizeof(time), PSTR("%02d" D_HOUR_MINUTE_SEPARATOR "%02d" D_MINUTE_SECOND_SEPARATOR "%02d"), RtcTime.hour, RtcTime.minute, RtcTime.second);
snprintf_P(tftdt, sizeof(tftdt), PSTR("%s%s%s"), date4, spaces, time);
tft->print(tftdt);
renderer->print(tftdt);
} else {
tft->setCursor(0, 0);
renderer->setCursor(0, 0);
}
switch (Settings.display_mode) {
@ -238,77 +341,44 @@ void Ili9341Refresh(void) { // Every second
}
}
}
#endif // USE_DISPLAY_MODES1TO5
/*********************************************************************************************/
/*********************************************************************************************\
* Interface
\*********************************************************************************************/
bool Xdsp04(uint8_t function) {
bool Xdsp04(uint8_t function)
{
bool result = false;
if (FUNC_DISPLAY_INIT_DRIVER == function) {
Ili9341InitDriver();
ILI9341_InitDriver();
}
else if (tft_init_done && (XDSP_04 == Settings.display_model)) {
if (!dsp_color) { dsp_color = ILI9341_WHITE; }
switch (function) {
case FUNC_DISPLAY_MODEL:
result = true;
break;
case FUNC_DISPLAY_INIT:
Ili9341Init(dsp_init);
break;
case FUNC_DISPLAY_POWER:
Ili9341DisplayOnOff();
break;
case FUNC_DISPLAY_CLEAR:
Ili9341Clear();
break;
case FUNC_DISPLAY_DRAW_HLINE:
tft->writeFastHLine(dsp_x, dsp_y, dsp_len, dsp_color);
break;
case FUNC_DISPLAY_DRAW_VLINE:
tft->writeFastVLine(dsp_x, dsp_y, dsp_len, dsp_color);
break;
case FUNC_DISPLAY_DRAW_LINE:
tft->writeLine(dsp_x, dsp_y, dsp_x2, dsp_y2, dsp_color);
break;
case FUNC_DISPLAY_DRAW_CIRCLE:
tft->drawCircle(dsp_x, dsp_y, dsp_rad, dsp_color);
break;
case FUNC_DISPLAY_FILL_CIRCLE:
tft->fillCircle(dsp_x, dsp_y, dsp_rad, dsp_color);
break;
case FUNC_DISPLAY_DRAW_RECTANGLE:
tft->drawRect(dsp_x, dsp_y, dsp_x2, dsp_y2, dsp_color);
break;
case FUNC_DISPLAY_FILL_RECTANGLE:
tft->fillRect(dsp_x, dsp_y, dsp_x2, dsp_y2, dsp_color);
break;
// case FUNC_DISPLAY_DRAW_FRAME:
// oled->display();
// break;
case FUNC_DISPLAY_TEXT_SIZE:
tft->setTextSize(Settings.display_size);
break;
case FUNC_DISPLAY_FONT_SIZE:
// tft->setTextSize(Settings.display_font);
break;
case FUNC_DISPLAY_DRAW_STRING:
Ili9341DrawStringAt(dsp_x, dsp_y, dsp_str, dsp_color, dsp_flag);
break;
case FUNC_DISPLAY_ROTATION:
tft->setRotation(Settings.display_rotate);
break;
switch (function) {
case FUNC_DISPLAY_MODEL:
result = true;
break;
case FUNC_DISPLAY_TEXT_SIZE:
case FUNC_DISPLAY_FONT_SIZE:
case DISPLAY_INIT_MODE:
renderer->clearDisplay();
break;
#ifdef USE_FT5206
#ifdef USE_TOUCH_BUTTONS
case FUNC_DISPLAY_EVERY_50_MSECOND:
if (FT5206_found) {
ili9342_CheckTouch();
}
break;
#endif // USE_TOUCH_BUTTONS
#endif // USE_FT5206
#ifdef USE_DISPLAY_MODES1TO5
case FUNC_DISPLAY_EVERY_SECOND:
Ili9341Refresh();
break;
case FUNC_DISPLAY_EVERY_SECOND:
ILI9341_Refresh();
break;
#endif // USE_DISPLAY_MODES1TO5
}
}
return result;

View File

@ -1,290 +0,0 @@
/*
xdsp_13_ILI9341-TTGO-TS.ino - Display ILI9341 support for Tasmota
Copyright (C) 2021 Gerhard Mutz and Theo Arends
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
//#ifdef USE_SPI
#ifdef USE_SPI
#ifdef USE_DISPLAY
#if (defined(USE_DISPLAY_ILI9341_2) || defined(USE_DISPLAY_ILI9342))
#define XDSP_13 13
#undef COLORED
#define COLORED 1
#undef UNCOLORED
#define UNCOLORED 0
// using font 8 is opional (num=3)
// very badly readable, but may be useful for graphs
#undef USE_TINY_FONT
#define USE_TINY_FONT
#include <ILI9341_2.h>
extern uint8_t *buffer;
extern uint8_t color_type;
ILI9341_2 *ili9341_2;
#ifdef USE_FT5206
#include <FT5206.h>
#undef FT6336_address
#define FT6336_address 0x38
uint8_t ili9342_ctouch_counter = 0;
#endif // USE_FT5206
/*********************************************************************************************/
void ILI9341_2_InitDriver()
{
if (!Settings.display_model) {
Settings.display_model = XDSP_13;
}
if (XDSP_13 == Settings.display_model) {
if (Settings.display_width != ILI9341_2_TFTWIDTH) {
Settings.display_width = ILI9341_2_TFTWIDTH;
}
if (Settings.display_height != ILI9341_2_TFTHEIGHT) {
Settings.display_height = ILI9341_2_TFTHEIGHT;
}
// disable screen buffer
buffer=NULL;
// default colors
fg_color = ILI9341_2_WHITE;
bg_color = ILI9341_2_BLACK;
#ifdef USE_M5STACK_CORE2
ili9341_2 = new ILI9341_2(5, -2, 15, -2);
#else
// init renderer, may use hardware spi, however we use SSPI defintion because SD card uses SPI definition (2 spi busses)
if (PinUsed(GPIO_SSPI_CS) && PinUsed(GPIO_OLED_RESET) && PinUsed(GPIO_BACKLIGHT) && PinUsed(GPIO_SSPI_MOSI) && PinUsed(GPIO_SSPI_MISO) && PinUsed(GPIO_SSPI_SCLK) && PinUsed(GPIO_SSPI_DC)) {
ili9341_2 = new ILI9341_2(Pin(GPIO_SSPI_CS), Pin(GPIO_SSPI_MOSI), Pin(GPIO_SSPI_MISO), Pin(GPIO_SSPI_SCLK), Pin(GPIO_OLED_RESET), Pin(GPIO_SSPI_DC), Pin(GPIO_BACKLIGHT));
} else {
return;
}
#endif
ili9341_2->init(Settings.display_width,Settings.display_height);
renderer = ili9341_2;
renderer->DisplayInit(DISPLAY_INIT_MODE,Settings.display_size,Settings.display_rotate,Settings.display_font);
renderer->dim(Settings.display_dimmer);
#ifdef SHOW_SPLASH
// Welcome text
renderer->setTextFont(2);
renderer->setTextColor(ILI9341_2_WHITE, ILI9341_2_BLACK);
renderer->DrawStringAt(30, (Settings.display_height/2)-12, "ILI9341 TFT!", ILI9341_2_WHITE, 0);
delay(1000);
#endif
color_type = COLOR_COLOR;
#ifdef ESP32
#ifdef USE_FT5206
// start digitizer with fixed adress and pins for esp32
#define SDA_2 21
#define SCL_2 22
Wire1.begin(SDA_2, SCL_2, 400000);
Touch_Init(Wire1);
#endif // USE_FT5206
#endif // ESP32
}
}
void core2_disp_pwr(uint8_t on);
void core2_disp_dim(uint8_t dim);
void ili9342_bpwr(uint8_t on) {
#ifdef USE_M5STACK_CORE2
core2_disp_pwr(on);
#endif
}
void ili9342_dimm(uint8_t dim) {
#ifdef USE_M5STACK_CORE2
core2_disp_dim(dim);
#endif
}
#ifdef ESP32
#ifdef USE_FT5206
#ifdef USE_TOUCH_BUTTONS
void ili9342_RotConvert(int16_t *x, int16_t *y) {
int16_t temp;
if (renderer) {
uint8_t rot=renderer->getRotation();
switch (rot) {
case 0:
break;
case 1:
temp=*y;
*y=renderer->height()-*x;
*x=temp;
break;
case 2:
*x=renderer->width()-*x;
*y=renderer->height()-*y;
break;
case 3:
temp=*y;
*y=*x;
*x=renderer->width()-temp;
break;
}
}
}
// check digitizer hit
void ili9342_CheckTouch() {
ili9342_ctouch_counter++;
if (2 == ili9342_ctouch_counter) {
// every 100 ms should be enough
ili9342_ctouch_counter = 0;
Touch_Check(ili9342_RotConvert);
}
}
#endif // USE_TOUCH_BUTTONS
#endif // USE_FT5206
#endif // ESP32
#ifdef USE_DISPLAY_MODES1TO5
void ILI9341_2_PrintLog(bool withDateTime) {
disp_refresh--;
if (!disp_refresh) {
disp_refresh = Settings.display_refresh;
if (!disp_screen_buffer_cols) { DisplayAllocScreenBuffer(); }
char* txt = DisplayLogBuffer('\370');
if (txt != NULL) {
uint8_t last_row = Settings.display_rows -1;
renderer->clearDisplay(); /** TODO: Would be smoother without clear, like ILI9341_2_Time() does. **/
renderer->setCursor(0,0);
if (withDateTime) {
char line[21];
snprintf_P(line, sizeof(line), PSTR("%02d" D_HOUR_MINUTE_SEPARATOR "%02d" D_MINUTE_SECOND_SEPARATOR "%02d %02d" D_MONTH_DAY_SEPARATOR "%02d" D_YEAR_MONTH_SEPARATOR "%04d"), RtcTime.hour, RtcTime.minute, RtcTime.second, RtcTime.day_of_month, RtcTime.month, RtcTime.year); // [12:34:56 31-12-2021]
renderer->setTextColor(ILI9341_2_BLUE);
renderer->println(line);
renderer->setTextColor(fg_color);
last_row--;
}
for (byte i = 0; i < last_row; i++) {
strlcpy(disp_screen_buffer[i], disp_screen_buffer[i +1], disp_screen_buffer_cols);
renderer->println(disp_screen_buffer[i]);
}
strlcpy(disp_screen_buffer[last_row], txt, disp_screen_buffer_cols);
DisplayFillScreen(last_row);
AddLog(LOG_LEVEL_DEBUG, PSTR(D_LOG_DEBUG "[%s]"), disp_screen_buffer[last_row]);
renderer->println(disp_screen_buffer[last_row]);
renderer->Updateframe();
}
}
}
void ILI9341_2_Time(void) {
char line[12];
/** TODO: DisplaySize is working, but renderer->println() does not respect DisplayFont **/
snprintf_P(line, sizeof(line), PSTR(" %02d" D_HOUR_MINUTE_SEPARATOR "%02d" D_MINUTE_SECOND_SEPARATOR "%02d"), RtcTime.hour, RtcTime.minute, RtcTime.second); // [ 12:34:56 ]
renderer->setCursor(60, 140);
renderer->println(line);
snprintf_P(line, sizeof(line), PSTR("%02d" D_MONTH_DAY_SEPARATOR "%02d" D_YEAR_MONTH_SEPARATOR "%04d"), RtcTime.day_of_month, RtcTime.month, RtcTime.year); // [01-02-2018]
renderer->setCursor(60, 160);
renderer->println(line);
renderer->Updateframe();
}
void ILI9341_2_Refresh(void) { // Every second
if (Settings.display_mode) { // Mode 0 is User text
switch (Settings.display_mode) {
case 1: // Time
ILI9341_2_Time();
break;
case 2: // Local
case 4: // Mqtt
ILI9341_2_PrintLog(false);
break;
case 3: // Local + Time
case 5: // Mqtt + Time
ILI9341_2_PrintLog(true);
break;
}
}
}
#endif // USE_DISPLAY_MODES1TO5
/*********************************************************************************************/
/*********************************************************************************************\
* Interface
\*********************************************************************************************/
bool Xdsp13(uint8_t function)
{
bool result = false;
if (FUNC_DISPLAY_INIT_DRIVER == function) {
ILI9341_2_InitDriver();
}
else if (XDSP_13 == Settings.display_model) {
switch (function) {
case FUNC_DISPLAY_MODEL:
result = true;
break;
case FUNC_DISPLAY_TEXT_SIZE:
case FUNC_DISPLAY_FONT_SIZE:
case DISPLAY_INIT_MODE:
renderer->clearDisplay();
break;
#ifdef USE_FT5206
#ifdef USE_TOUCH_BUTTONS
case FUNC_DISPLAY_EVERY_50_MSECOND:
if (FT5206_found) {
ili9342_CheckTouch();
}
break;
#endif // USE_TOUCH_BUTTONS
#endif // USE_FT5206
#ifdef USE_DISPLAY_MODES1TO5
case FUNC_DISPLAY_EVERY_SECOND:
ILI9341_2_Refresh();
break;
#endif // USE_DISPLAY_MODES1TO5
}
}
return result;
}
#endif // USE_DISPLAY_ILI9341_2
#endif // USE_DISPLAY
#endif // USE_SPI