mirror of
https://github.com/adafruit/TFTLCD-Library.git
synced 2026-09-13 10:03:41 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b3d5ba1771 | ||
|
|
2f917ad72b | ||
|
|
aad1e5e77a | ||
|
|
ebc64f235b | ||
|
|
ae864fcfbd | ||
|
|
183e303cd4 | ||
|
|
e2127c8299 | ||
|
|
a4ab02a81a | ||
|
|
9b701b6d5a | ||
|
|
5eb5a21ac9 | ||
|
|
f93482daf4 | ||
|
|
22b7aaf899 | ||
|
|
5b2bead71b |
@@ -0,0 +1,32 @@
|
||||
name: Arduino Library CI
|
||||
|
||||
on: [pull_request, push, repository_dispatch]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
repository: adafruit/ci-arduino
|
||||
path: ci
|
||||
|
||||
- name: pre-install
|
||||
run: bash ci/actions_install.sh
|
||||
|
||||
- name: test platforms
|
||||
run: python3 ci/build_platform.py main_platforms
|
||||
|
||||
- name: clang
|
||||
run: python3 ci/run-clang-format.py -e "ci/*" -e "bin/*" -r .
|
||||
|
||||
- name: doxygen
|
||||
env:
|
||||
GH_REPO_TOKEN: ${{ secrets.GH_REPO_TOKEN }}
|
||||
PRETTYNAME : "Adafruit TFTLCD Library"
|
||||
run: bash ci/doxy_gen_and_deploy.sh
|
||||
+595
-434
File diff suppressed because it is too large
Load Diff
+158
-50
@@ -1,3 +1,6 @@
|
||||
/*!
|
||||
* @brief Adafruit_TFTLCD.h
|
||||
*/
|
||||
// IMPORTANT: SEE COMMENTS @ LINE 15 REGARDING SHIELD VS BREAKOUT BOARD USAGE.
|
||||
|
||||
// Graphics library by ladyada/adafruit with init code from Rossum
|
||||
@@ -7,9 +10,9 @@
|
||||
#define _ADAFRUIT_TFTLCD_H_
|
||||
|
||||
#if ARDUINO >= 100
|
||||
#include "Arduino.h"
|
||||
#include "Arduino.h"
|
||||
#else
|
||||
#include "WProgram.h"
|
||||
#include "WProgram.h"
|
||||
#endif
|
||||
|
||||
#include <Adafruit_GFX.h>
|
||||
@@ -21,79 +24,184 @@
|
||||
|
||||
class Adafruit_TFTLCD : public Adafruit_GFX {
|
||||
|
||||
public:
|
||||
|
||||
public:
|
||||
/*!
|
||||
* @brief TFTLCD constructor
|
||||
* @param cs Chip select pin
|
||||
* @param cd Command/data pin
|
||||
* @param wr Write pin
|
||||
* @param rd Read pin
|
||||
* @param rst Reset pin
|
||||
*/
|
||||
Adafruit_TFTLCD(uint8_t cs, uint8_t cd, uint8_t wr, uint8_t rd, uint8_t rst);
|
||||
Adafruit_TFTLCD(void);
|
||||
|
||||
void begin(uint16_t id = 0x9325);
|
||||
void drawPixel(int16_t x, int16_t y, uint16_t color);
|
||||
void drawFastHLine(int16_t x0, int16_t y0, int16_t w, uint16_t color);
|
||||
void drawFastVLine(int16_t x0, int16_t y0, int16_t h, uint16_t color);
|
||||
void fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t c);
|
||||
void fillScreen(uint16_t color);
|
||||
void reset(void);
|
||||
void setRegisters8(uint8_t *ptr, uint8_t n);
|
||||
void setRegisters16(uint16_t *ptr, uint8_t n);
|
||||
void setRotation(uint8_t x);
|
||||
// These methods are public in order for BMP examples to work:
|
||||
void setAddrWindow(int x1, int y1, int x2, int y2);
|
||||
void pushColors(uint16_t *data, uint8_t len, boolean first);
|
||||
/*!
|
||||
* @brief Begins connection
|
||||
* @param id LCD controller id
|
||||
*/
|
||||
void begin(uint16_t id = 0x9325);
|
||||
/*!
|
||||
* @brief Sets a specified pixel the specified color
|
||||
* @param x X location of the pixel
|
||||
* @param y Y location of the pixel
|
||||
* @param color Color to set the pixel
|
||||
*/
|
||||
void drawPixel(int16_t x, int16_t y, uint16_t color);
|
||||
/*!
|
||||
* @brief Draw fast horizontal line
|
||||
* @param x0 Starting X position
|
||||
* @param y0 Starting Y position
|
||||
* @param w Length of the line
|
||||
* @param color Color of the line
|
||||
*/
|
||||
void drawFastHLine(int16_t x0, int16_t y0, int16_t w, uint16_t color);
|
||||
/*!
|
||||
* @brief Draw fast vertical line
|
||||
* @param x0 Starting X position
|
||||
* @param y0 Starting Y position
|
||||
* @param h Height of the line
|
||||
* @param color Color of the line
|
||||
*/
|
||||
void drawFastVLine(int16_t x0, int16_t y0, int16_t h, uint16_t color);
|
||||
/*!
|
||||
* @brief Makes a filled rectangle
|
||||
* @param x Initial x value of the rectangle
|
||||
* @param y Initial y value of the rectangle
|
||||
* @param w Width of the rectangle
|
||||
* @param h Height of the rectangle
|
||||
* @param c Color of the rectangle
|
||||
*/
|
||||
void fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t c);
|
||||
/*!
|
||||
* @brief Fills screen with the specified color
|
||||
* @param color Color to set the screen
|
||||
*/
|
||||
void fillScreen(uint16_t color);
|
||||
/*!
|
||||
* @brief Resets the display
|
||||
*/
|
||||
void reset(void);
|
||||
/*!
|
||||
* @brief Appears to be deprecated. Sets a register
|
||||
* @param ptr Pointer to the register to set
|
||||
* @param n How many bytes to set
|
||||
*/
|
||||
void setRegisters8(uint8_t *ptr, uint8_t n);
|
||||
/*!
|
||||
* @brief Appears to be deprecated. Sets a register
|
||||
* @param ptr Pointer to the register to set
|
||||
* @param n How many bytes to set
|
||||
*/
|
||||
void setRegisters16(uint16_t *ptr, uint8_t n);
|
||||
/*!
|
||||
* @brief Rotates the display
|
||||
* @param x How much to rotate the display
|
||||
*/
|
||||
void setRotation(uint8_t x);
|
||||
// These methods are public in order for BMP examples to work:
|
||||
/*!
|
||||
* @brief Sets the LCD address window (and address counter, on 932X).
|
||||
* Relevant to rect/screen fills and H/V lines. Input coordinates are
|
||||
* assumed pre-sorted (e.g. x2 >= x1)
|
||||
* @param x1 X1 of the lcd window
|
||||
* @param y1 Y1 of the lcd window
|
||||
* @param x2 X2 of the lcd window
|
||||
* @param y2 Y2 of the lcd window
|
||||
*/
|
||||
void setAddrWindow(int x1, int y1, int x2, int y2);
|
||||
/*!
|
||||
* @brief Issues 'raw' an array of 16-bit color values to the LCD; used
|
||||
* externally by BMP examples. Assumes that setWindowAddr() has
|
||||
* previously been set to define the bounds. Max 255 pixels at
|
||||
* a time (BMP examples read in small chunks due to limited RAM).
|
||||
* @param data Pointer to array with data
|
||||
* @param len How much of the data to issue
|
||||
* @param first If first is true, CGRAM write command is only issued on the
|
||||
* first call
|
||||
*/
|
||||
void pushColors(uint16_t *data, uint8_t len, boolean first);
|
||||
|
||||
/*!
|
||||
* @brief Pass 8-bit (each) R,G,B, get back 16-bit packed color
|
||||
* @param r Red value
|
||||
* @param g Green value
|
||||
* @param b Blue value
|
||||
* @return Returns the 16-bit packed color
|
||||
*/
|
||||
uint16_t color565(uint8_t r, uint8_t g, uint8_t b),
|
||||
readPixel(int16_t x, int16_t y),
|
||||
readID(void);
|
||||
/*!
|
||||
* @brief Reads the state of a single pixel.
|
||||
* Because this function is used infrequently, it configures the ports for
|
||||
* the read operation, reads the data, then restores the ports to the
|
||||
* write configuration. Write operations happen a LOT, so it's
|
||||
* advantageous to leave the ports in that state as a default.
|
||||
* @param x X value of the pixel to read
|
||||
* @param y Y value of the pixel to read
|
||||
* @return Returns the state of the pixel
|
||||
*/
|
||||
readPixel(int16_t x, int16_t y),
|
||||
/*!
|
||||
*@brief Reads the ID of the device
|
||||
* Because this function is used infrequently, it configures the ports for
|
||||
* the read operation, reads the data, then restores the ports to the
|
||||
*write configuration. Write operations happen a LOT, so it's
|
||||
*advantageous to leave the ports in that state as a default.
|
||||
* @return Returns the ID of the device
|
||||
*/
|
||||
readID(void);
|
||||
/*!
|
||||
* @brief Reads the specified register
|
||||
* @param r Address of the register to read
|
||||
* @return Returns the data from the register
|
||||
*/
|
||||
uint32_t readReg(uint8_t r);
|
||||
|
||||
private:
|
||||
|
||||
void init(),
|
||||
// These items may have previously been defined as macros
|
||||
// in pin_magic.h. If not, function versions are declared:
|
||||
private:
|
||||
void init(),
|
||||
// These items may have previously been defined as macros
|
||||
// in pin_magic.h. If not, function versions are declared:
|
||||
#ifndef write8
|
||||
write8(uint8_t value),
|
||||
write8(uint8_t value),
|
||||
#endif
|
||||
#ifndef setWriteDir
|
||||
setWriteDir(void),
|
||||
setWriteDir(void),
|
||||
#endif
|
||||
#ifndef setReadDir
|
||||
setReadDir(void),
|
||||
setReadDir(void),
|
||||
#endif
|
||||
#ifndef writeRegister8
|
||||
writeRegister8(uint8_t a, uint8_t d),
|
||||
writeRegister8(uint8_t a, uint8_t d),
|
||||
#endif
|
||||
#ifndef writeRegister16
|
||||
writeRegister16(uint16_t a, uint16_t d),
|
||||
writeRegister16(uint16_t a, uint16_t d),
|
||||
#endif
|
||||
writeRegister24(uint8_t a, uint32_t d),
|
||||
writeRegister32(uint8_t a, uint32_t d),
|
||||
writeRegister24(uint8_t a, uint32_t d),
|
||||
writeRegister32(uint8_t a, uint32_t d),
|
||||
#ifndef writeRegisterPair
|
||||
writeRegisterPair(uint8_t aH, uint8_t aL, uint16_t d),
|
||||
writeRegisterPair(uint8_t aH, uint8_t aL, uint16_t d),
|
||||
#endif
|
||||
setLR(void),
|
||||
flood(uint16_t color, uint32_t len);
|
||||
uint8_t driver;
|
||||
setLR(void), flood(uint16_t color, uint32_t len);
|
||||
uint8_t driver;
|
||||
|
||||
#ifndef read8
|
||||
uint8_t read8fn(void);
|
||||
#define read8isFunctionalized
|
||||
uint8_t read8fn(void);
|
||||
#define read8isFunctionalized
|
||||
#endif
|
||||
|
||||
#ifndef USE_ADAFRUIT_SHIELD_PINOUT
|
||||
|
||||
#ifdef __AVR__
|
||||
volatile uint8_t *csPort , *cdPort , *wrPort , *rdPort;
|
||||
uint8_t csPinSet , cdPinSet , wrPinSet , rdPinSet ,
|
||||
csPinUnset, cdPinUnset, wrPinUnset, rdPinUnset,
|
||||
_reset;
|
||||
#endif
|
||||
#if defined(__SAM3X8E__)
|
||||
Pio *csPort , *cdPort , *wrPort , *rdPort;
|
||||
uint32_t csPinSet , cdPinSet , wrPinSet , rdPinSet ,
|
||||
csPinUnset, cdPinUnset, wrPinUnset, rdPinUnset,
|
||||
_reset;
|
||||
#endif
|
||||
|
||||
#ifdef __AVR__
|
||||
volatile uint8_t *csPort, *cdPort, *wrPort, *rdPort;
|
||||
uint8_t csPinSet, cdPinSet, wrPinSet, rdPinSet, csPinUnset, cdPinUnset,
|
||||
wrPinUnset, rdPinUnset, _reset;
|
||||
#endif
|
||||
#if defined(__SAM3X8E__)
|
||||
Pio *csPort, *cdPort, *wrPort, *rdPort;
|
||||
uint32_t csPinSet, cdPinSet, wrPinSet, rdPinSet, csPinUnset, cdPinUnset,
|
||||
wrPinUnset, rdPinUnset, _reset;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Adafruit library for 8-bit TFT LCDs such as ILI9325, ILI9328, etc
|
||||
# Adafruit library for 8-bit TFT LCDs such as ILI9325, ILI9328, etc [](https://github.com/adafruit/TFTLCD-Library/actions)[](http://adafruit.github.io/TFTLCD-Library/html/index.html)
|
||||
|
||||
This is a library for our Adafruit 16-channel PWM & Servo driver, shield or FeatherWing
|
||||
|
||||
|
||||
+108
-256
@@ -4,261 +4,113 @@
|
||||
|
||||
// standard ascii 5x7 font
|
||||
|
||||
static unsigned char font[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3E, 0x5B, 0x4F, 0x5B, 0x3E,
|
||||
0x3E, 0x6B, 0x4F, 0x6B, 0x3E,
|
||||
0x1C, 0x3E, 0x7C, 0x3E, 0x1C,
|
||||
0x18, 0x3C, 0x7E, 0x3C, 0x18,
|
||||
0x1C, 0x57, 0x7D, 0x57, 0x1C,
|
||||
0x1C, 0x5E, 0x7F, 0x5E, 0x1C,
|
||||
0x00, 0x18, 0x3C, 0x18, 0x00,
|
||||
0xFF, 0xE7, 0xC3, 0xE7, 0xFF,
|
||||
0x00, 0x18, 0x24, 0x18, 0x00,
|
||||
0xFF, 0xE7, 0xDB, 0xE7, 0xFF,
|
||||
0x30, 0x48, 0x3A, 0x06, 0x0E,
|
||||
0x26, 0x29, 0x79, 0x29, 0x26,
|
||||
0x40, 0x7F, 0x05, 0x05, 0x07,
|
||||
0x40, 0x7F, 0x05, 0x25, 0x3F,
|
||||
0x5A, 0x3C, 0xE7, 0x3C, 0x5A,
|
||||
0x7F, 0x3E, 0x1C, 0x1C, 0x08,
|
||||
0x08, 0x1C, 0x1C, 0x3E, 0x7F,
|
||||
0x14, 0x22, 0x7F, 0x22, 0x14,
|
||||
0x5F, 0x5F, 0x00, 0x5F, 0x5F,
|
||||
0x06, 0x09, 0x7F, 0x01, 0x7F,
|
||||
0x00, 0x66, 0x89, 0x95, 0x6A,
|
||||
0x60, 0x60, 0x60, 0x60, 0x60,
|
||||
0x94, 0xA2, 0xFF, 0xA2, 0x94,
|
||||
0x08, 0x04, 0x7E, 0x04, 0x08,
|
||||
0x10, 0x20, 0x7E, 0x20, 0x10,
|
||||
0x08, 0x08, 0x2A, 0x1C, 0x08,
|
||||
0x08, 0x1C, 0x2A, 0x08, 0x08,
|
||||
0x1E, 0x10, 0x10, 0x10, 0x10,
|
||||
0x0C, 0x1E, 0x0C, 0x1E, 0x0C,
|
||||
0x30, 0x38, 0x3E, 0x38, 0x30,
|
||||
0x06, 0x0E, 0x3E, 0x0E, 0x06,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x5F, 0x00, 0x00,
|
||||
0x00, 0x07, 0x00, 0x07, 0x00,
|
||||
0x14, 0x7F, 0x14, 0x7F, 0x14,
|
||||
0x24, 0x2A, 0x7F, 0x2A, 0x12,
|
||||
0x23, 0x13, 0x08, 0x64, 0x62,
|
||||
0x36, 0x49, 0x56, 0x20, 0x50,
|
||||
0x00, 0x08, 0x07, 0x03, 0x00,
|
||||
0x00, 0x1C, 0x22, 0x41, 0x00,
|
||||
0x00, 0x41, 0x22, 0x1C, 0x00,
|
||||
0x2A, 0x1C, 0x7F, 0x1C, 0x2A,
|
||||
0x08, 0x08, 0x3E, 0x08, 0x08,
|
||||
0x00, 0x80, 0x70, 0x30, 0x00,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08,
|
||||
0x00, 0x00, 0x60, 0x60, 0x00,
|
||||
0x20, 0x10, 0x08, 0x04, 0x02,
|
||||
0x3E, 0x51, 0x49, 0x45, 0x3E,
|
||||
0x00, 0x42, 0x7F, 0x40, 0x00,
|
||||
0x72, 0x49, 0x49, 0x49, 0x46,
|
||||
0x21, 0x41, 0x49, 0x4D, 0x33,
|
||||
0x18, 0x14, 0x12, 0x7F, 0x10,
|
||||
0x27, 0x45, 0x45, 0x45, 0x39,
|
||||
0x3C, 0x4A, 0x49, 0x49, 0x31,
|
||||
0x41, 0x21, 0x11, 0x09, 0x07,
|
||||
0x36, 0x49, 0x49, 0x49, 0x36,
|
||||
0x46, 0x49, 0x49, 0x29, 0x1E,
|
||||
0x00, 0x00, 0x14, 0x00, 0x00,
|
||||
0x00, 0x40, 0x34, 0x00, 0x00,
|
||||
0x00, 0x08, 0x14, 0x22, 0x41,
|
||||
0x14, 0x14, 0x14, 0x14, 0x14,
|
||||
0x00, 0x41, 0x22, 0x14, 0x08,
|
||||
0x02, 0x01, 0x59, 0x09, 0x06,
|
||||
0x3E, 0x41, 0x5D, 0x59, 0x4E,
|
||||
0x7C, 0x12, 0x11, 0x12, 0x7C,
|
||||
0x7F, 0x49, 0x49, 0x49, 0x36,
|
||||
0x3E, 0x41, 0x41, 0x41, 0x22,
|
||||
0x7F, 0x41, 0x41, 0x41, 0x3E,
|
||||
0x7F, 0x49, 0x49, 0x49, 0x41,
|
||||
0x7F, 0x09, 0x09, 0x09, 0x01,
|
||||
0x3E, 0x41, 0x41, 0x51, 0x73,
|
||||
0x7F, 0x08, 0x08, 0x08, 0x7F,
|
||||
0x00, 0x41, 0x7F, 0x41, 0x00,
|
||||
0x20, 0x40, 0x41, 0x3F, 0x01,
|
||||
0x7F, 0x08, 0x14, 0x22, 0x41,
|
||||
0x7F, 0x40, 0x40, 0x40, 0x40,
|
||||
0x7F, 0x02, 0x1C, 0x02, 0x7F,
|
||||
0x7F, 0x04, 0x08, 0x10, 0x7F,
|
||||
0x3E, 0x41, 0x41, 0x41, 0x3E,
|
||||
0x7F, 0x09, 0x09, 0x09, 0x06,
|
||||
0x3E, 0x41, 0x51, 0x21, 0x5E,
|
||||
0x7F, 0x09, 0x19, 0x29, 0x46,
|
||||
0x26, 0x49, 0x49, 0x49, 0x32,
|
||||
0x03, 0x01, 0x7F, 0x01, 0x03,
|
||||
0x3F, 0x40, 0x40, 0x40, 0x3F,
|
||||
0x1F, 0x20, 0x40, 0x20, 0x1F,
|
||||
0x3F, 0x40, 0x38, 0x40, 0x3F,
|
||||
0x63, 0x14, 0x08, 0x14, 0x63,
|
||||
0x03, 0x04, 0x78, 0x04, 0x03,
|
||||
0x61, 0x59, 0x49, 0x4D, 0x43,
|
||||
0x00, 0x7F, 0x41, 0x41, 0x41,
|
||||
0x02, 0x04, 0x08, 0x10, 0x20,
|
||||
0x00, 0x41, 0x41, 0x41, 0x7F,
|
||||
0x04, 0x02, 0x01, 0x02, 0x04,
|
||||
0x40, 0x40, 0x40, 0x40, 0x40,
|
||||
0x00, 0x03, 0x07, 0x08, 0x00,
|
||||
0x20, 0x54, 0x54, 0x78, 0x40,
|
||||
0x7F, 0x28, 0x44, 0x44, 0x38,
|
||||
0x38, 0x44, 0x44, 0x44, 0x28,
|
||||
0x38, 0x44, 0x44, 0x28, 0x7F,
|
||||
0x38, 0x54, 0x54, 0x54, 0x18,
|
||||
0x00, 0x08, 0x7E, 0x09, 0x02,
|
||||
0x18, 0xA4, 0xA4, 0x9C, 0x78,
|
||||
0x7F, 0x08, 0x04, 0x04, 0x78,
|
||||
0x00, 0x44, 0x7D, 0x40, 0x00,
|
||||
0x20, 0x40, 0x40, 0x3D, 0x00,
|
||||
0x7F, 0x10, 0x28, 0x44, 0x00,
|
||||
0x00, 0x41, 0x7F, 0x40, 0x00,
|
||||
0x7C, 0x04, 0x78, 0x04, 0x78,
|
||||
0x7C, 0x08, 0x04, 0x04, 0x78,
|
||||
0x38, 0x44, 0x44, 0x44, 0x38,
|
||||
0xFC, 0x18, 0x24, 0x24, 0x18,
|
||||
0x18, 0x24, 0x24, 0x18, 0xFC,
|
||||
0x7C, 0x08, 0x04, 0x04, 0x08,
|
||||
0x48, 0x54, 0x54, 0x54, 0x24,
|
||||
0x04, 0x04, 0x3F, 0x44, 0x24,
|
||||
0x3C, 0x40, 0x40, 0x20, 0x7C,
|
||||
0x1C, 0x20, 0x40, 0x20, 0x1C,
|
||||
0x3C, 0x40, 0x30, 0x40, 0x3C,
|
||||
0x44, 0x28, 0x10, 0x28, 0x44,
|
||||
0x4C, 0x90, 0x90, 0x90, 0x7C,
|
||||
0x44, 0x64, 0x54, 0x4C, 0x44,
|
||||
0x00, 0x08, 0x36, 0x41, 0x00,
|
||||
0x00, 0x00, 0x77, 0x00, 0x00,
|
||||
0x00, 0x41, 0x36, 0x08, 0x00,
|
||||
0x02, 0x01, 0x02, 0x04, 0x02,
|
||||
0x3C, 0x26, 0x23, 0x26, 0x3C,
|
||||
0x1E, 0xA1, 0xA1, 0x61, 0x12,
|
||||
0x3A, 0x40, 0x40, 0x20, 0x7A,
|
||||
0x38, 0x54, 0x54, 0x55, 0x59,
|
||||
0x21, 0x55, 0x55, 0x79, 0x41,
|
||||
0x21, 0x54, 0x54, 0x78, 0x41,
|
||||
0x21, 0x55, 0x54, 0x78, 0x40,
|
||||
0x20, 0x54, 0x55, 0x79, 0x40,
|
||||
0x0C, 0x1E, 0x52, 0x72, 0x12,
|
||||
0x39, 0x55, 0x55, 0x55, 0x59,
|
||||
0x39, 0x54, 0x54, 0x54, 0x59,
|
||||
0x39, 0x55, 0x54, 0x54, 0x58,
|
||||
0x00, 0x00, 0x45, 0x7C, 0x41,
|
||||
0x00, 0x02, 0x45, 0x7D, 0x42,
|
||||
0x00, 0x01, 0x45, 0x7C, 0x40,
|
||||
0xF0, 0x29, 0x24, 0x29, 0xF0,
|
||||
0xF0, 0x28, 0x25, 0x28, 0xF0,
|
||||
0x7C, 0x54, 0x55, 0x45, 0x00,
|
||||
0x20, 0x54, 0x54, 0x7C, 0x54,
|
||||
0x7C, 0x0A, 0x09, 0x7F, 0x49,
|
||||
0x32, 0x49, 0x49, 0x49, 0x32,
|
||||
0x32, 0x48, 0x48, 0x48, 0x32,
|
||||
0x32, 0x4A, 0x48, 0x48, 0x30,
|
||||
0x3A, 0x41, 0x41, 0x21, 0x7A,
|
||||
0x3A, 0x42, 0x40, 0x20, 0x78,
|
||||
0x00, 0x9D, 0xA0, 0xA0, 0x7D,
|
||||
0x39, 0x44, 0x44, 0x44, 0x39,
|
||||
0x3D, 0x40, 0x40, 0x40, 0x3D,
|
||||
0x3C, 0x24, 0xFF, 0x24, 0x24,
|
||||
0x48, 0x7E, 0x49, 0x43, 0x66,
|
||||
0x2B, 0x2F, 0xFC, 0x2F, 0x2B,
|
||||
0xFF, 0x09, 0x29, 0xF6, 0x20,
|
||||
0xC0, 0x88, 0x7E, 0x09, 0x03,
|
||||
0x20, 0x54, 0x54, 0x79, 0x41,
|
||||
0x00, 0x00, 0x44, 0x7D, 0x41,
|
||||
0x30, 0x48, 0x48, 0x4A, 0x32,
|
||||
0x38, 0x40, 0x40, 0x22, 0x7A,
|
||||
0x00, 0x7A, 0x0A, 0x0A, 0x72,
|
||||
0x7D, 0x0D, 0x19, 0x31, 0x7D,
|
||||
0x26, 0x29, 0x29, 0x2F, 0x28,
|
||||
0x26, 0x29, 0x29, 0x29, 0x26,
|
||||
0x30, 0x48, 0x4D, 0x40, 0x20,
|
||||
0x38, 0x08, 0x08, 0x08, 0x08,
|
||||
0x08, 0x08, 0x08, 0x08, 0x38,
|
||||
0x2F, 0x10, 0xC8, 0xAC, 0xBA,
|
||||
0x2F, 0x10, 0x28, 0x34, 0xFA,
|
||||
0x00, 0x00, 0x7B, 0x00, 0x00,
|
||||
0x08, 0x14, 0x2A, 0x14, 0x22,
|
||||
0x22, 0x14, 0x2A, 0x14, 0x08,
|
||||
0xAA, 0x00, 0x55, 0x00, 0xAA,
|
||||
0xAA, 0x55, 0xAA, 0x55, 0xAA,
|
||||
0x00, 0x00, 0x00, 0xFF, 0x00,
|
||||
0x10, 0x10, 0x10, 0xFF, 0x00,
|
||||
0x14, 0x14, 0x14, 0xFF, 0x00,
|
||||
0x10, 0x10, 0xFF, 0x00, 0xFF,
|
||||
0x10, 0x10, 0xF0, 0x10, 0xF0,
|
||||
0x14, 0x14, 0x14, 0xFC, 0x00,
|
||||
0x14, 0x14, 0xF7, 0x00, 0xFF,
|
||||
0x00, 0x00, 0xFF, 0x00, 0xFF,
|
||||
0x14, 0x14, 0xF4, 0x04, 0xFC,
|
||||
0x14, 0x14, 0x17, 0x10, 0x1F,
|
||||
0x10, 0x10, 0x1F, 0x10, 0x1F,
|
||||
0x14, 0x14, 0x14, 0x1F, 0x00,
|
||||
0x10, 0x10, 0x10, 0xF0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x1F, 0x10,
|
||||
0x10, 0x10, 0x10, 0x1F, 0x10,
|
||||
0x10, 0x10, 0x10, 0xF0, 0x10,
|
||||
0x00, 0x00, 0x00, 0xFF, 0x10,
|
||||
0x10, 0x10, 0x10, 0x10, 0x10,
|
||||
0x10, 0x10, 0x10, 0xFF, 0x10,
|
||||
0x00, 0x00, 0x00, 0xFF, 0x14,
|
||||
0x00, 0x00, 0xFF, 0x00, 0xFF,
|
||||
0x00, 0x00, 0x1F, 0x10, 0x17,
|
||||
0x00, 0x00, 0xFC, 0x04, 0xF4,
|
||||
0x14, 0x14, 0x17, 0x10, 0x17,
|
||||
0x14, 0x14, 0xF4, 0x04, 0xF4,
|
||||
0x00, 0x00, 0xFF, 0x00, 0xF7,
|
||||
0x14, 0x14, 0x14, 0x14, 0x14,
|
||||
0x14, 0x14, 0xF7, 0x00, 0xF7,
|
||||
0x14, 0x14, 0x14, 0x17, 0x14,
|
||||
0x10, 0x10, 0x1F, 0x10, 0x1F,
|
||||
0x14, 0x14, 0x14, 0xF4, 0x14,
|
||||
0x10, 0x10, 0xF0, 0x10, 0xF0,
|
||||
0x00, 0x00, 0x1F, 0x10, 0x1F,
|
||||
0x00, 0x00, 0x00, 0x1F, 0x14,
|
||||
0x00, 0x00, 0x00, 0xFC, 0x14,
|
||||
0x00, 0x00, 0xF0, 0x10, 0xF0,
|
||||
0x10, 0x10, 0xFF, 0x10, 0xFF,
|
||||
0x14, 0x14, 0x14, 0xFF, 0x14,
|
||||
0x10, 0x10, 0x10, 0x1F, 0x00,
|
||||
0x00, 0x00, 0x00, 0xF0, 0x10,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xF0, 0xF0, 0xF0, 0xF0, 0xF0,
|
||||
0xFF, 0xFF, 0xFF, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xFF, 0xFF,
|
||||
0x0F, 0x0F, 0x0F, 0x0F, 0x0F,
|
||||
0x38, 0x44, 0x44, 0x38, 0x44,
|
||||
0x7C, 0x2A, 0x2A, 0x3E, 0x14,
|
||||
0x7E, 0x02, 0x02, 0x06, 0x06,
|
||||
0x02, 0x7E, 0x02, 0x7E, 0x02,
|
||||
0x63, 0x55, 0x49, 0x41, 0x63,
|
||||
0x38, 0x44, 0x44, 0x3C, 0x04,
|
||||
0x40, 0x7E, 0x20, 0x1E, 0x20,
|
||||
0x06, 0x02, 0x7E, 0x02, 0x02,
|
||||
0x99, 0xA5, 0xE7, 0xA5, 0x99,
|
||||
0x1C, 0x2A, 0x49, 0x2A, 0x1C,
|
||||
0x4C, 0x72, 0x01, 0x72, 0x4C,
|
||||
0x30, 0x4A, 0x4D, 0x4D, 0x30,
|
||||
0x30, 0x48, 0x78, 0x48, 0x30,
|
||||
0xBC, 0x62, 0x5A, 0x46, 0x3D,
|
||||
0x3E, 0x49, 0x49, 0x49, 0x00,
|
||||
0x7E, 0x01, 0x01, 0x01, 0x7E,
|
||||
0x2A, 0x2A, 0x2A, 0x2A, 0x2A,
|
||||
0x44, 0x44, 0x5F, 0x44, 0x44,
|
||||
0x40, 0x51, 0x4A, 0x44, 0x40,
|
||||
0x40, 0x44, 0x4A, 0x51, 0x40,
|
||||
0x00, 0x00, 0xFF, 0x01, 0x03,
|
||||
0xE0, 0x80, 0xFF, 0x00, 0x00,
|
||||
0x08, 0x08, 0x6B, 0x6B, 0x08,
|
||||
0x36, 0x12, 0x36, 0x24, 0x36,
|
||||
0x06, 0x0F, 0x09, 0x0F, 0x06,
|
||||
0x00, 0x00, 0x18, 0x18, 0x00,
|
||||
0x00, 0x00, 0x10, 0x10, 0x00,
|
||||
0x30, 0x40, 0xFF, 0x01, 0x01,
|
||||
0x00, 0x1F, 0x01, 0x01, 0x1E,
|
||||
0x00, 0x19, 0x1D, 0x17, 0x12,
|
||||
0x00, 0x3C, 0x3C, 0x3C, 0x3C,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
static unsigned char font[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x3E, 0x6B,
|
||||
0x4F, 0x6B, 0x3E, 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x18, 0x3C, 0x7E, 0x3C,
|
||||
0x18, 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00,
|
||||
0x18, 0x3C, 0x18, 0x00, 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, 0x18, 0x24,
|
||||
0x18, 0x00, 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x30, 0x48, 0x3A, 0x06, 0x0E,
|
||||
0x26, 0x29, 0x79, 0x29, 0x26, 0x40, 0x7F, 0x05, 0x05, 0x07, 0x40, 0x7F,
|
||||
0x05, 0x25, 0x3F, 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x7F, 0x3E, 0x1C, 0x1C,
|
||||
0x08, 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x14, 0x22, 0x7F, 0x22, 0x14, 0x5F,
|
||||
0x5F, 0x00, 0x5F, 0x5F, 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, 0x66, 0x89,
|
||||
0x95, 0x6A, 0x60, 0x60, 0x60, 0x60, 0x60, 0x94, 0xA2, 0xFF, 0xA2, 0x94,
|
||||
0x08, 0x04, 0x7E, 0x04, 0x08, 0x10, 0x20, 0x7E, 0x20, 0x10, 0x08, 0x08,
|
||||
0x2A, 0x1C, 0x08, 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x1E, 0x10, 0x10, 0x10,
|
||||
0x10, 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x30, 0x38, 0x3E, 0x38, 0x30, 0x06,
|
||||
0x0E, 0x3E, 0x0E, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F,
|
||||
0x00, 0x00, 0x00, 0x07, 0x00, 0x07, 0x00, 0x14, 0x7F, 0x14, 0x7F, 0x14,
|
||||
0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x23, 0x13, 0x08, 0x64, 0x62, 0x36, 0x49,
|
||||
0x56, 0x20, 0x50, 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, 0x1C, 0x22, 0x41,
|
||||
0x00, 0x00, 0x41, 0x22, 0x1C, 0x00, 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x08,
|
||||
0x08, 0x3E, 0x08, 0x08, 0x00, 0x80, 0x70, 0x30, 0x00, 0x08, 0x08, 0x08,
|
||||
0x08, 0x08, 0x00, 0x00, 0x60, 0x60, 0x00, 0x20, 0x10, 0x08, 0x04, 0x02,
|
||||
0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, 0x42, 0x7F, 0x40, 0x00, 0x72, 0x49,
|
||||
0x49, 0x49, 0x46, 0x21, 0x41, 0x49, 0x4D, 0x33, 0x18, 0x14, 0x12, 0x7F,
|
||||
0x10, 0x27, 0x45, 0x45, 0x45, 0x39, 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x41,
|
||||
0x21, 0x11, 0x09, 0x07, 0x36, 0x49, 0x49, 0x49, 0x36, 0x46, 0x49, 0x49,
|
||||
0x29, 0x1E, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x40, 0x34, 0x00, 0x00,
|
||||
0x00, 0x08, 0x14, 0x22, 0x41, 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, 0x41,
|
||||
0x22, 0x14, 0x08, 0x02, 0x01, 0x59, 0x09, 0x06, 0x3E, 0x41, 0x5D, 0x59,
|
||||
0x4E, 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x7F, 0x49, 0x49, 0x49, 0x36, 0x3E,
|
||||
0x41, 0x41, 0x41, 0x22, 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x7F, 0x49, 0x49,
|
||||
0x49, 0x41, 0x7F, 0x09, 0x09, 0x09, 0x01, 0x3E, 0x41, 0x41, 0x51, 0x73,
|
||||
0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, 0x41, 0x7F, 0x41, 0x00, 0x20, 0x40,
|
||||
0x41, 0x3F, 0x01, 0x7F, 0x08, 0x14, 0x22, 0x41, 0x7F, 0x40, 0x40, 0x40,
|
||||
0x40, 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x3E,
|
||||
0x41, 0x41, 0x41, 0x3E, 0x7F, 0x09, 0x09, 0x09, 0x06, 0x3E, 0x41, 0x51,
|
||||
0x21, 0x5E, 0x7F, 0x09, 0x19, 0x29, 0x46, 0x26, 0x49, 0x49, 0x49, 0x32,
|
||||
0x03, 0x01, 0x7F, 0x01, 0x03, 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x1F, 0x20,
|
||||
0x40, 0x20, 0x1F, 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x63, 0x14, 0x08, 0x14,
|
||||
0x63, 0x03, 0x04, 0x78, 0x04, 0x03, 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00,
|
||||
0x7F, 0x41, 0x41, 0x41, 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, 0x41, 0x41,
|
||||
0x41, 0x7F, 0x04, 0x02, 0x01, 0x02, 0x04, 0x40, 0x40, 0x40, 0x40, 0x40,
|
||||
0x00, 0x03, 0x07, 0x08, 0x00, 0x20, 0x54, 0x54, 0x78, 0x40, 0x7F, 0x28,
|
||||
0x44, 0x44, 0x38, 0x38, 0x44, 0x44, 0x44, 0x28, 0x38, 0x44, 0x44, 0x28,
|
||||
0x7F, 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, 0x08, 0x7E, 0x09, 0x02, 0x18,
|
||||
0xA4, 0xA4, 0x9C, 0x78, 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, 0x44, 0x7D,
|
||||
0x40, 0x00, 0x20, 0x40, 0x40, 0x3D, 0x00, 0x7F, 0x10, 0x28, 0x44, 0x00,
|
||||
0x00, 0x41, 0x7F, 0x40, 0x00, 0x7C, 0x04, 0x78, 0x04, 0x78, 0x7C, 0x08,
|
||||
0x04, 0x04, 0x78, 0x38, 0x44, 0x44, 0x44, 0x38, 0xFC, 0x18, 0x24, 0x24,
|
||||
0x18, 0x18, 0x24, 0x24, 0x18, 0xFC, 0x7C, 0x08, 0x04, 0x04, 0x08, 0x48,
|
||||
0x54, 0x54, 0x54, 0x24, 0x04, 0x04, 0x3F, 0x44, 0x24, 0x3C, 0x40, 0x40,
|
||||
0x20, 0x7C, 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x3C, 0x40, 0x30, 0x40, 0x3C,
|
||||
0x44, 0x28, 0x10, 0x28, 0x44, 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x44, 0x64,
|
||||
0x54, 0x4C, 0x44, 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, 0x00, 0x77, 0x00,
|
||||
0x00, 0x00, 0x41, 0x36, 0x08, 0x00, 0x02, 0x01, 0x02, 0x04, 0x02, 0x3C,
|
||||
0x26, 0x23, 0x26, 0x3C, 0x1E, 0xA1, 0xA1, 0x61, 0x12, 0x3A, 0x40, 0x40,
|
||||
0x20, 0x7A, 0x38, 0x54, 0x54, 0x55, 0x59, 0x21, 0x55, 0x55, 0x79, 0x41,
|
||||
0x21, 0x54, 0x54, 0x78, 0x41, 0x21, 0x55, 0x54, 0x78, 0x40, 0x20, 0x54,
|
||||
0x55, 0x79, 0x40, 0x0C, 0x1E, 0x52, 0x72, 0x12, 0x39, 0x55, 0x55, 0x55,
|
||||
0x59, 0x39, 0x54, 0x54, 0x54, 0x59, 0x39, 0x55, 0x54, 0x54, 0x58, 0x00,
|
||||
0x00, 0x45, 0x7C, 0x41, 0x00, 0x02, 0x45, 0x7D, 0x42, 0x00, 0x01, 0x45,
|
||||
0x7C, 0x40, 0xF0, 0x29, 0x24, 0x29, 0xF0, 0xF0, 0x28, 0x25, 0x28, 0xF0,
|
||||
0x7C, 0x54, 0x55, 0x45, 0x00, 0x20, 0x54, 0x54, 0x7C, 0x54, 0x7C, 0x0A,
|
||||
0x09, 0x7F, 0x49, 0x32, 0x49, 0x49, 0x49, 0x32, 0x32, 0x48, 0x48, 0x48,
|
||||
0x32, 0x32, 0x4A, 0x48, 0x48, 0x30, 0x3A, 0x41, 0x41, 0x21, 0x7A, 0x3A,
|
||||
0x42, 0x40, 0x20, 0x78, 0x00, 0x9D, 0xA0, 0xA0, 0x7D, 0x39, 0x44, 0x44,
|
||||
0x44, 0x39, 0x3D, 0x40, 0x40, 0x40, 0x3D, 0x3C, 0x24, 0xFF, 0x24, 0x24,
|
||||
0x48, 0x7E, 0x49, 0x43, 0x66, 0x2B, 0x2F, 0xFC, 0x2F, 0x2B, 0xFF, 0x09,
|
||||
0x29, 0xF6, 0x20, 0xC0, 0x88, 0x7E, 0x09, 0x03, 0x20, 0x54, 0x54, 0x79,
|
||||
0x41, 0x00, 0x00, 0x44, 0x7D, 0x41, 0x30, 0x48, 0x48, 0x4A, 0x32, 0x38,
|
||||
0x40, 0x40, 0x22, 0x7A, 0x00, 0x7A, 0x0A, 0x0A, 0x72, 0x7D, 0x0D, 0x19,
|
||||
0x31, 0x7D, 0x26, 0x29, 0x29, 0x2F, 0x28, 0x26, 0x29, 0x29, 0x29, 0x26,
|
||||
0x30, 0x48, 0x4D, 0x40, 0x20, 0x38, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
|
||||
0x08, 0x08, 0x38, 0x2F, 0x10, 0xC8, 0xAC, 0xBA, 0x2F, 0x10, 0x28, 0x34,
|
||||
0xFA, 0x00, 0x00, 0x7B, 0x00, 0x00, 0x08, 0x14, 0x2A, 0x14, 0x22, 0x22,
|
||||
0x14, 0x2A, 0x14, 0x08, 0xAA, 0x00, 0x55, 0x00, 0xAA, 0xAA, 0x55, 0xAA,
|
||||
0x55, 0xAA, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x10, 0x10, 0x10, 0xFF, 0x00,
|
||||
0x14, 0x14, 0x14, 0xFF, 0x00, 0x10, 0x10, 0xFF, 0x00, 0xFF, 0x10, 0x10,
|
||||
0xF0, 0x10, 0xF0, 0x14, 0x14, 0x14, 0xFC, 0x00, 0x14, 0x14, 0xF7, 0x00,
|
||||
0xFF, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x14, 0x14, 0xF4, 0x04, 0xFC, 0x14,
|
||||
0x14, 0x17, 0x10, 0x1F, 0x10, 0x10, 0x1F, 0x10, 0x1F, 0x14, 0x14, 0x14,
|
||||
0x1F, 0x00, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10,
|
||||
0x10, 0x10, 0x10, 0x1F, 0x10, 0x10, 0x10, 0x10, 0xF0, 0x10, 0x00, 0x00,
|
||||
0x00, 0xFF, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xFF,
|
||||
0x10, 0x00, 0x00, 0x00, 0xFF, 0x14, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x00,
|
||||
0x00, 0x1F, 0x10, 0x17, 0x00, 0x00, 0xFC, 0x04, 0xF4, 0x14, 0x14, 0x17,
|
||||
0x10, 0x17, 0x14, 0x14, 0xF4, 0x04, 0xF4, 0x00, 0x00, 0xFF, 0x00, 0xF7,
|
||||
0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0xF7, 0x00, 0xF7, 0x14, 0x14,
|
||||
0x14, 0x17, 0x14, 0x10, 0x10, 0x1F, 0x10, 0x1F, 0x14, 0x14, 0x14, 0xF4,
|
||||
0x14, 0x10, 0x10, 0xF0, 0x10, 0xF0, 0x00, 0x00, 0x1F, 0x10, 0x1F, 0x00,
|
||||
0x00, 0x00, 0x1F, 0x14, 0x00, 0x00, 0x00, 0xFC, 0x14, 0x00, 0x00, 0xF0,
|
||||
0x10, 0xF0, 0x10, 0x10, 0xFF, 0x10, 0xFF, 0x14, 0x14, 0x14, 0xFF, 0x14,
|
||||
0x10, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x10, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xFF, 0xFF, 0xFF, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x38,
|
||||
0x44, 0x44, 0x38, 0x44, 0x7C, 0x2A, 0x2A, 0x3E, 0x14, 0x7E, 0x02, 0x02,
|
||||
0x06, 0x06, 0x02, 0x7E, 0x02, 0x7E, 0x02, 0x63, 0x55, 0x49, 0x41, 0x63,
|
||||
0x38, 0x44, 0x44, 0x3C, 0x04, 0x40, 0x7E, 0x20, 0x1E, 0x20, 0x06, 0x02,
|
||||
0x7E, 0x02, 0x02, 0x99, 0xA5, 0xE7, 0xA5, 0x99, 0x1C, 0x2A, 0x49, 0x2A,
|
||||
0x1C, 0x4C, 0x72, 0x01, 0x72, 0x4C, 0x30, 0x4A, 0x4D, 0x4D, 0x30, 0x30,
|
||||
0x48, 0x78, 0x48, 0x30, 0xBC, 0x62, 0x5A, 0x46, 0x3D, 0x3E, 0x49, 0x49,
|
||||
0x49, 0x00, 0x7E, 0x01, 0x01, 0x01, 0x7E, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A,
|
||||
0x44, 0x44, 0x5F, 0x44, 0x44, 0x40, 0x51, 0x4A, 0x44, 0x40, 0x40, 0x44,
|
||||
0x4A, 0x51, 0x40, 0x00, 0x00, 0xFF, 0x01, 0x03, 0xE0, 0x80, 0xFF, 0x00,
|
||||
0x00, 0x08, 0x08, 0x6B, 0x6B, 0x08, 0x36, 0x12, 0x36, 0x24, 0x36, 0x06,
|
||||
0x0F, 0x09, 0x0F, 0x06, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x10,
|
||||
0x10, 0x00, 0x30, 0x40, 0xFF, 0x01, 0x01, 0x00, 0x1F, 0x01, 0x01, 0x1E,
|
||||
0x00, 0x19, 0x1D, 0x17, 0x12, 0x00, 0x3C, 0x3C, 0x3C, 0x3C, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00,
|
||||
};
|
||||
#endif
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
name=Adafruit TFTLCD Library
|
||||
version=1.0.0
|
||||
version=1.0.3
|
||||
author=Adafruit
|
||||
maintainer=Adafruit <info@adafruit.com>
|
||||
sentence=Adafruit 2.8" TFT display Library
|
||||
@@ -7,4 +7,4 @@ paragraph=Adafruit 2.8" TFT display Library
|
||||
category=Display
|
||||
url=https://github.com/adafruit/TFTLCD-Library
|
||||
architectures=*
|
||||
depends=Adafruit GFX Library
|
||||
depends=Adafruit GFX Library, Adafruit BusIO
|
||||
|
||||
+441
-283
@@ -1,3 +1,6 @@
|
||||
/*!
|
||||
* @file pin_magic.h
|
||||
*/
|
||||
#ifndef _pin_magic_
|
||||
#define _pin_magic_
|
||||
|
||||
@@ -49,305 +52,424 @@
|
||||
// Due dig. pin : 40 39 38 37 36 35 34 33
|
||||
// Due port/pin : PC8 PC7 PC6 PC5 PC4 PC3 PC2 PC1 (one contiguous PORT. -ish…)
|
||||
|
||||
// Pixel read operations require a minimum 400 nS delay from RD_ACTIVE
|
||||
// to polling the input pins. At 16 MHz, one machine cycle is 62.5 nS.
|
||||
// This code burns 7 cycles (437.5 nS) doing nothing; the RJMPs are
|
||||
// equivalent to two NOPs each, final NOP burns the 7th cycle, and the
|
||||
// last line is a radioactive mutant emoticon.
|
||||
#define DELAY7 \
|
||||
asm volatile( \
|
||||
"rjmp .+0" "\n\t" \
|
||||
"rjmp .+0" "\n\t" \
|
||||
"rjmp .+0" "\n\t" \
|
||||
"nop" "\n" \
|
||||
::);
|
||||
/*!
|
||||
* @brief Pixel read operations require a minimum 400 nS delay from RD_ACTIVE
|
||||
* to polling the input pins. At 16 MHz, one machine cycle is 62.5 nS.
|
||||
* This code burns 7 cycles (437.5 nS) doing nothing; the RJMPs are
|
||||
* equivalent to two NOPs each, final NOP burns the 7th cycle, and the
|
||||
* last line is a radioactive mutant emoticon.
|
||||
*/
|
||||
#define DELAY7 \
|
||||
asm volatile("rjmp .+0" \
|
||||
"\n\t" \
|
||||
"rjmp .+0" \
|
||||
"\n\t" \
|
||||
"rjmp .+0" \
|
||||
"\n\t" \
|
||||
"nop" \
|
||||
"\n" ::);
|
||||
|
||||
#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) || defined (__AVR_ATmega328__) || defined(__AVR_ATmega8__)
|
||||
#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) || \
|
||||
defined(__AVR_ATmega328__) || defined(__AVR_ATmega8__)
|
||||
|
||||
// Arduino Uno, Duemilanove, etc.
|
||||
// Arduino Uno, Duemilanove, etc.
|
||||
|
||||
#ifdef USE_ADAFRUIT_SHIELD_PINOUT
|
||||
#ifdef USE_ADAFRUIT_SHIELD_PINOUT
|
||||
|
||||
// LCD control lines:
|
||||
// RD (read), WR (write), CD (command/data), CS (chip select)
|
||||
#define RD_PORT PORTC /*pin A0 */
|
||||
#define WR_PORT PORTC /*pin A1 */
|
||||
#define CD_PORT PORTC /*pin A2 */
|
||||
#define CS_PORT PORTC /*pin A3 */
|
||||
#define RD_MASK B00000001
|
||||
#define WR_MASK B00000010
|
||||
#define CD_MASK B00000100
|
||||
#define CS_MASK B00001000
|
||||
// LCD control lines:
|
||||
// RD (read), WR (write), CD (command/data), CS (chip select)
|
||||
#define RD_PORT PORTC /*pin A0 */
|
||||
#define WR_PORT PORTC /*pin A1 */
|
||||
#define CD_PORT PORTC /*pin A2 */
|
||||
#define CS_PORT PORTC /*pin A3 */
|
||||
#define RD_MASK B00000001
|
||||
#define WR_MASK B00000010
|
||||
#define CD_MASK B00000100
|
||||
#define CS_MASK B00001000
|
||||
|
||||
// These are macros for I/O operations...
|
||||
// These are macros for I/O operations...
|
||||
|
||||
// Write 8-bit value to LCD data lines
|
||||
#define write8inline(d) { \
|
||||
PORTD = (PORTD & B00101111) | ((d) & B11010000); \
|
||||
PORTB = (PORTB & B11010000) | ((d) & B00101111); \
|
||||
WR_STROBE; } // STROBEs are defined later
|
||||
// Write 8-bit value to LCD data lines
|
||||
#define write8inline(d) \
|
||||
{ \
|
||||
PORTD = (PORTD & B00101111) | ((d)&B11010000); \
|
||||
PORTB = (PORTB & B11010000) | ((d)&B00101111); \
|
||||
WR_STROBE; \
|
||||
} // STROBEs are defined later
|
||||
|
||||
// Read 8-bit value from LCD data lines. The signle argument
|
||||
// is a destination variable; this isn't a function and doesn't
|
||||
// return a value in the conventional sense.
|
||||
#define read8inline(result) { \
|
||||
RD_ACTIVE; \
|
||||
DELAY7; \
|
||||
result = (PIND & B11010000) | (PINB & B00101111); \
|
||||
RD_IDLE; }
|
||||
// Read 8-bit value from LCD data lines. The signle argument
|
||||
// is a destination variable; this isn't a function and doesn't
|
||||
// return a value in the conventional sense.
|
||||
#define read8inline(result) \
|
||||
{ \
|
||||
RD_ACTIVE; \
|
||||
DELAY7; \
|
||||
result = (PIND & B11010000) | (PINB & B00101111); \
|
||||
RD_IDLE; \
|
||||
}
|
||||
|
||||
// These set the PORT directions as required before the write and read
|
||||
// operations. Because write operations are much more common than reads,
|
||||
// the data-reading functions in the library code set the PORT(s) to
|
||||
// input before a read, and restore them back to the write state before
|
||||
// returning. This avoids having to set it for output inside every
|
||||
// drawing method. The default state has them initialized for writes.
|
||||
#define setWriteDirInline() { DDRD |= B11010000; DDRB |= B00101111; }
|
||||
#define setReadDirInline() { DDRD &= ~B11010000; DDRB &= ~B00101111; }
|
||||
// These set the PORT directions as required before the write and read
|
||||
// operations. Because write operations are much more common than reads,
|
||||
// the data-reading functions in the library code set the PORT(s) to
|
||||
// input before a read, and restore them back to the write state before
|
||||
// returning. This avoids having to set it for output inside every
|
||||
// drawing method. The default state has them initialized for writes.
|
||||
#define setWriteDirInline() \
|
||||
{ \
|
||||
DDRD |= B11010000; \
|
||||
DDRB |= B00101111; \
|
||||
}
|
||||
#define setReadDirInline() \
|
||||
{ \
|
||||
DDRD &= ~B11010000; \
|
||||
DDRB &= ~B00101111; \
|
||||
}
|
||||
|
||||
#else // Uno w/Breakout board
|
||||
#else // Uno w/Breakout board
|
||||
|
||||
#define write8inline(d) { \
|
||||
PORTD = (PORTD & B00000011) | ((d) & B11111100); \
|
||||
PORTB = (PORTB & B11111100) | ((d) & B00000011); \
|
||||
WR_STROBE; }
|
||||
#define read8inline(result) { \
|
||||
RD_ACTIVE; \
|
||||
DELAY7; \
|
||||
result = (PIND & B11111100) | (PINB & B00000011); \
|
||||
RD_IDLE; }
|
||||
#define setWriteDirInline() { DDRD |= B11111100; DDRB |= B00000011; }
|
||||
#define setReadDirInline() { DDRD &= ~B11111100; DDRB &= ~B00000011; }
|
||||
#define write8inline(d) \
|
||||
{ \
|
||||
PORTD = (PORTD & B00000011) | ((d)&B11111100); \
|
||||
PORTB = (PORTB & B11111100) | ((d)&B00000011); \
|
||||
WR_STROBE; \
|
||||
}
|
||||
#define read8inline(result) \
|
||||
{ \
|
||||
RD_ACTIVE; \
|
||||
DELAY7; \
|
||||
result = (PIND & B11111100) | (PINB & B00000011); \
|
||||
RD_IDLE; \
|
||||
}
|
||||
#define setWriteDirInline() \
|
||||
{ \
|
||||
DDRD |= B11111100; \
|
||||
DDRB |= B00000011; \
|
||||
}
|
||||
#define setReadDirInline() \
|
||||
{ \
|
||||
DDRD &= ~B11111100; \
|
||||
DDRB &= ~B00000011; \
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// As part of the inline control, macros reference other macros...if any
|
||||
// of these are left undefined, an equivalent function version (non-inline)
|
||||
// is declared later. The Uno has a moderate amount of program space, so
|
||||
// only write8() is inlined -- that one provides the most performance
|
||||
// benefit, but unfortunately also generates the most bloat. This is
|
||||
// why only certain cases are inlined for each board.
|
||||
#define write8 write8inline
|
||||
// As part of the inline control, macros reference other macros...if any
|
||||
// of these are left undefined, an equivalent function version (non-inline)
|
||||
// is declared later. The Uno has a moderate amount of program space, so
|
||||
// only write8() is inlined -- that one provides the most performance
|
||||
// benefit, but unfortunately also generates the most bloat. This is
|
||||
// why only certain cases are inlined for each board.
|
||||
#define write8 write8inline
|
||||
|
||||
#elif defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1280__)
|
||||
#elif defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__) || \
|
||||
defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1280__)
|
||||
|
||||
// Arduino Mega, ADK, etc.
|
||||
// Arduino Mega, ADK, etc.
|
||||
|
||||
#ifdef USE_ADAFRUIT_SHIELD_PINOUT
|
||||
#ifdef USE_ADAFRUIT_SHIELD_PINOUT
|
||||
|
||||
#define RD_PORT PORTF
|
||||
#define WR_PORT PORTF
|
||||
#define CD_PORT PORTF
|
||||
#define CS_PORT PORTF
|
||||
#define RD_MASK B00000001
|
||||
#define WR_MASK B00000010
|
||||
#define CD_MASK B00000100
|
||||
#define CS_MASK B00001000
|
||||
#define RD_PORT PORTF
|
||||
#define WR_PORT PORTF
|
||||
#define CD_PORT PORTF
|
||||
#define CS_PORT PORTF
|
||||
#define RD_MASK B00000001
|
||||
#define WR_MASK B00000010
|
||||
#define CD_MASK B00000100
|
||||
#define CS_MASK B00001000
|
||||
|
||||
#define write8inline(d) { \
|
||||
PORTH = (PORTH&B10000111)|(((d)&B11000000)>>3)|(((d)&B00000011)<<5); \
|
||||
PORTB = (PORTB&B01001111)|(((d)&B00101100)<<2); \
|
||||
PORTG = (PORTG&B11011111)|(((d)&B00010000)<<1); \
|
||||
WR_STROBE; }
|
||||
#define read8inline(result) { \
|
||||
RD_ACTIVE; \
|
||||
DELAY7; \
|
||||
result = ((PINH & B00011000) << 3) | ((PINB & B10110000) >> 2) | \
|
||||
((PING & B00100000) >> 1) | ((PINH & B01100000) >> 5); \
|
||||
RD_IDLE; }
|
||||
#define setWriteDirInline() { \
|
||||
DDRH |= B01111000; DDRB |= B10110000; DDRG |= B00100000; }
|
||||
#define setReadDirInline() { \
|
||||
DDRH &= ~B01111000; DDRB &= ~B10110000; DDRG &= ~B00100000; }
|
||||
#define write8inline(d) \
|
||||
{ \
|
||||
PORTH = \
|
||||
(PORTH & B10000111) | (((d)&B11000000) >> 3) | (((d)&B00000011) << 5); \
|
||||
PORTB = (PORTB & B01001111) | (((d)&B00101100) << 2); \
|
||||
PORTG = (PORTG & B11011111) | (((d)&B00010000) << 1); \
|
||||
WR_STROBE; \
|
||||
}
|
||||
#define read8inline(result) \
|
||||
{ \
|
||||
RD_ACTIVE; \
|
||||
DELAY7; \
|
||||
result = ((PINH & B00011000) << 3) | ((PINB & B10110000) >> 2) | \
|
||||
((PING & B00100000) >> 1) | ((PINH & B01100000) >> 5); \
|
||||
RD_IDLE; \
|
||||
}
|
||||
#define setWriteDirInline() \
|
||||
{ \
|
||||
DDRH |= B01111000; \
|
||||
DDRB |= B10110000; \
|
||||
DDRG |= B00100000; \
|
||||
}
|
||||
#define setReadDirInline() \
|
||||
{ \
|
||||
DDRH &= ~B01111000; \
|
||||
DDRB &= ~B10110000; \
|
||||
DDRG &= ~B00100000; \
|
||||
}
|
||||
|
||||
#else // Mega w/Breakout board
|
||||
#else // Mega w/Breakout board
|
||||
|
||||
#define write8inline(d) { PORTA = (d); WR_STROBE; }
|
||||
#define read8inline(result) { \
|
||||
RD_ACTIVE; \
|
||||
DELAY7; \
|
||||
result = PINA; \
|
||||
RD_IDLE; }
|
||||
#define setWriteDirInline() DDRA = 0xff
|
||||
#define setReadDirInline() DDRA = 0
|
||||
#define write8inline(d) \
|
||||
{ \
|
||||
PORTA = (d); \
|
||||
WR_STROBE; \
|
||||
}
|
||||
#define read8inline(result) \
|
||||
{ \
|
||||
RD_ACTIVE; \
|
||||
DELAY7; \
|
||||
result = PINA; \
|
||||
RD_IDLE; \
|
||||
}
|
||||
#define setWriteDirInline() DDRA = 0xff
|
||||
#define setReadDirInline() DDRA = 0
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// All of the functions are inlined on the Arduino Mega. When using the
|
||||
// breakout board, the macro versions aren't appreciably larger than the
|
||||
// function equivalents, and they're super simple and fast. When using
|
||||
// the shield, the macros become pretty complicated...but this board has
|
||||
// so much code space, the macros are used anyway. If you need to free
|
||||
// up program space, some macros can be removed, at a minor cost in speed.
|
||||
#define write8 write8inline
|
||||
#define read8 read8inline
|
||||
#define setWriteDir setWriteDirInline
|
||||
#define setReadDir setReadDirInline
|
||||
#define writeRegister8 writeRegister8inline
|
||||
#define writeRegister16 writeRegister16inline
|
||||
#define writeRegisterPair writeRegisterPairInline
|
||||
// All of the functions are inlined on the Arduino Mega. When using the
|
||||
// breakout board, the macro versions aren't appreciably larger than the
|
||||
// function equivalents, and they're super simple and fast. When using
|
||||
// the shield, the macros become pretty complicated...but this board has
|
||||
// so much code space, the macros are used anyway. If you need to free
|
||||
// up program space, some macros can be removed, at a minor cost in speed.
|
||||
#define write8 write8inline
|
||||
#define read8 read8inline
|
||||
#define setWriteDir setWriteDirInline
|
||||
#define setReadDir setReadDirInline
|
||||
#define writeRegister8 writeRegister8inline
|
||||
#define writeRegister16 writeRegister16inline
|
||||
#define writeRegisterPair writeRegisterPairInline
|
||||
|
||||
#elif defined(__AVR_ATmega32U4__)
|
||||
|
||||
// Arduino Leonardo
|
||||
// Arduino Leonardo
|
||||
|
||||
#ifdef USE_ADAFRUIT_SHIELD_PINOUT
|
||||
#ifdef USE_ADAFRUIT_SHIELD_PINOUT
|
||||
|
||||
#define RD_PORT PORTF
|
||||
#define WR_PORT PORTF
|
||||
#define CD_PORT PORTF
|
||||
#define CS_PORT PORTF
|
||||
#define RD_MASK B10000000
|
||||
#define WR_MASK B01000000
|
||||
#define CD_MASK B00100000
|
||||
#define CS_MASK B00010000
|
||||
#define RD_PORT PORTF
|
||||
#define WR_PORT PORTF
|
||||
#define CD_PORT PORTF
|
||||
#define CS_PORT PORTF
|
||||
#define RD_MASK B10000000
|
||||
#define WR_MASK B01000000
|
||||
#define CD_MASK B00100000
|
||||
#define CS_MASK B00010000
|
||||
|
||||
#define write8inline(d) { \
|
||||
PORTE = (PORTE & B10111111) | (((d) & B10000000)>>1); \
|
||||
PORTD = (PORTD & B01101111) | (((d) & B01000000)<<1) | ((d) & B00010000); \
|
||||
PORTC = (PORTC & B01111111) | (((d) & B00100000)<<2); \
|
||||
PORTB = (PORTB & B00001111) | (((d) & B00001111)<<4); \
|
||||
WR_STROBE; }
|
||||
#define read8inline(result) { \
|
||||
RD_ACTIVE; \
|
||||
DELAY7; \
|
||||
result = ((PINE & B01000000) << 1) | ((PIND & B10000000) >> 1) | \
|
||||
((PINC & B10000000) >> 2) | ((PINB & B11110000) >> 4) | \
|
||||
(PIND & B00010000); \
|
||||
RD_IDLE; }
|
||||
#define setWriteDirInline() { \
|
||||
DDRE |= B01000000; DDRD |= B10010000; \
|
||||
DDRC |= B10000000; DDRB |= B11110000; }
|
||||
#define setReadDirInline() { \
|
||||
DDRE &= ~B01000000; DDRD &= ~B10010000; \
|
||||
DDRC &= ~B10000000; DDRB &= ~B11110000; }
|
||||
#define write8inline(d) \
|
||||
{ \
|
||||
PORTE = (PORTE & B10111111) | (((d)&B10000000) >> 1); \
|
||||
PORTD = (PORTD & B01101111) | (((d)&B01000000) << 1) | ((d)&B00010000); \
|
||||
PORTC = (PORTC & B01111111) | (((d)&B00100000) << 2); \
|
||||
PORTB = (PORTB & B00001111) | (((d)&B00001111) << 4); \
|
||||
WR_STROBE; \
|
||||
}
|
||||
#define read8inline(result) \
|
||||
{ \
|
||||
RD_ACTIVE; \
|
||||
DELAY7; \
|
||||
result = ((PINE & B01000000) << 1) | ((PIND & B10000000) >> 1) | \
|
||||
((PINC & B10000000) >> 2) | ((PINB & B11110000) >> 4) | \
|
||||
(PIND & B00010000); \
|
||||
RD_IDLE; \
|
||||
}
|
||||
#define setWriteDirInline() \
|
||||
{ \
|
||||
DDRE |= B01000000; \
|
||||
DDRD |= B10010000; \
|
||||
DDRC |= B10000000; \
|
||||
DDRB |= B11110000; \
|
||||
}
|
||||
#define setReadDirInline() \
|
||||
{ \
|
||||
DDRE &= ~B01000000; \
|
||||
DDRD &= ~B10010000; \
|
||||
DDRC &= ~B10000000; \
|
||||
DDRB &= ~B11110000; \
|
||||
}
|
||||
|
||||
#else // Leonardo w/Breakout board
|
||||
#else // Leonardo w/Breakout board
|
||||
|
||||
#define write8inline(d) { \
|
||||
uint8_t dr1 = (d) >> 1, dl1 = (d) << 1; \
|
||||
PORTE = (PORTE & B10111111) | (dr1 & B01000000); \
|
||||
PORTD = (PORTD & B01101100) | (dl1 & B10000000) | (((d) & B00001000)>>3) |\
|
||||
(dr1 & B00000010) | ((d) & B00010000); \
|
||||
PORTC = (PORTC & B10111111) | (dl1 & B01000000); \
|
||||
PORTB = (PORTB & B11001111) |(((d) & B00000011)<<4); \
|
||||
WR_STROBE; }
|
||||
#define read8inline(result) { \
|
||||
RD_ACTIVE; \
|
||||
DELAY7; \
|
||||
result = (((PINE & B01000000) | (PIND & B00000010)) << 1) | \
|
||||
(((PINC & B01000000) | (PIND & B10000000)) >> 1) | \
|
||||
((PIND & B00000001) << 3) | ((PINB & B00110000) >> 4) | \
|
||||
(PIND & B00010000); \
|
||||
RD_IDLE; }
|
||||
#define setWriteDirInline() { \
|
||||
DDRE |= B01000000; DDRD |= B10010011; \
|
||||
DDRC |= B01000000; DDRB |= B00110000; }
|
||||
#define setReadDirInline() { \
|
||||
DDRE &= ~B01000000; DDRD &= ~B10010011; \
|
||||
DDRC &= ~B01000000; DDRB &= ~B00110000; }
|
||||
#define write8inline(d) \
|
||||
{ \
|
||||
uint8_t dr1 = (d) >> 1, dl1 = (d) << 1; \
|
||||
PORTE = (PORTE & B10111111) | (dr1 & B01000000); \
|
||||
PORTD = (PORTD & B01101100) | (dl1 & B10000000) | (((d)&B00001000) >> 3) | \
|
||||
(dr1 & B00000010) | ((d)&B00010000); \
|
||||
PORTC = (PORTC & B10111111) | (dl1 & B01000000); \
|
||||
PORTB = (PORTB & B11001111) | (((d)&B00000011) << 4); \
|
||||
WR_STROBE; \
|
||||
}
|
||||
#define read8inline(result) \
|
||||
{ \
|
||||
RD_ACTIVE; \
|
||||
DELAY7; \
|
||||
result = (((PINE & B01000000) | (PIND & B00000010)) << 1) | \
|
||||
(((PINC & B01000000) | (PIND & B10000000)) >> 1) | \
|
||||
((PIND & B00000001) << 3) | ((PINB & B00110000) >> 4) | \
|
||||
(PIND & B00010000); \
|
||||
RD_IDLE; \
|
||||
}
|
||||
#define setWriteDirInline() \
|
||||
{ \
|
||||
DDRE |= B01000000; \
|
||||
DDRD |= B10010011; \
|
||||
DDRC |= B01000000; \
|
||||
DDRB |= B00110000; \
|
||||
}
|
||||
#define setReadDirInline() \
|
||||
{ \
|
||||
DDRE &= ~B01000000; \
|
||||
DDRD &= ~B10010011; \
|
||||
DDRC &= ~B01000000; \
|
||||
DDRB &= ~B00110000; \
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// On the Leonardo, only the write8() macro is used -- though even that
|
||||
// might be excessive given the code size and available program space
|
||||
// on this board. You may need to disable this to get any sizable
|
||||
// program to compile.
|
||||
#define write8 write8inline
|
||||
// On the Leonardo, only the write8() macro is used -- though even that
|
||||
// might be excessive given the code size and available program space
|
||||
// on this board. You may need to disable this to get any sizable
|
||||
// program to compile.
|
||||
#define write8 write8inline
|
||||
|
||||
#elif defined(__SAM3X8E__)
|
||||
|
||||
// Arduino Due
|
||||
|
||||
#ifdef USE_ADAFRUIT_SHIELD_PINOUT
|
||||
#ifdef USE_ADAFRUIT_SHIELD_PINOUT
|
||||
|
||||
#define RD_PORT PIOA /*pin A0 */
|
||||
#define WR_PORT PIOA /*pin A1 */
|
||||
#define CD_PORT PIOA /*pin A2 */
|
||||
#define CS_PORT PIOA /*pin A3 */
|
||||
#define RD_MASK 0x00010000
|
||||
#define WR_MASK 0x01000000
|
||||
#define CD_MASK 0x00800000
|
||||
#define CS_MASK 0x00400000
|
||||
#define RD_PORT PIOA /*pin A0 */
|
||||
#define WR_PORT PIOA /*pin A1 */
|
||||
#define CD_PORT PIOA /*pin A2 */
|
||||
#define CS_PORT PIOA /*pin A3 */
|
||||
#define RD_MASK 0x00010000
|
||||
#define WR_MASK 0x01000000
|
||||
#define CD_MASK 0x00800000
|
||||
#define CS_MASK 0x00400000
|
||||
|
||||
#define write8inline(d) { \
|
||||
PIO_Set(PIOD, (((d) & 0x08)<<(7-3))); \
|
||||
PIO_Clear(PIOD, (((~d) & 0x08)<<(7-3))); \
|
||||
PIO_Set(PIOC, (((d) & 0x01)<<(22-0)) | (((d) & 0x02)<<(21-1))| (((d) & 0x04)<<(29-2))| (((d) & 0x10)<<(26-4))| (((d) & 0x40)<<(24-6))| (((d) & 0x80)<<(23-7))); \
|
||||
PIO_Clear(PIOC, (((~d) & 0x01)<<(22-0)) | (((~d) & 0x02)<<(21-1))| (((~d) & 0x04)<<(29-2))| (((~d) & 0x10)<<(26-4))| (((~d) & 0x40)<<(24-6))| (((~d) & 0x80)<<(23-7))); \
|
||||
PIO_Set(PIOB, (((d) & 0x20)<<(27-5))); \
|
||||
PIO_Clear(PIOB, (((~d) & 0x20)<<(27-5))); \
|
||||
WR_STROBE; }
|
||||
#define write8inline(d) \
|
||||
{ \
|
||||
PIO_Set(PIOD, (((d)&0x08) << (7 - 3))); \
|
||||
PIO_Clear(PIOD, (((~d) & 0x08) << (7 - 3))); \
|
||||
PIO_Set(PIOC, (((d)&0x01) << (22 - 0)) | (((d)&0x02) << (21 - 1)) | \
|
||||
(((d)&0x04) << (29 - 2)) | (((d)&0x10) << (26 - 4)) | \
|
||||
(((d)&0x40) << (24 - 6)) | (((d)&0x80) << (23 - 7))); \
|
||||
PIO_Clear(PIOC, \
|
||||
(((~d) & 0x01) << (22 - 0)) | (((~d) & 0x02) << (21 - 1)) | \
|
||||
(((~d) & 0x04) << (29 - 2)) | (((~d) & 0x10) << (26 - 4)) | \
|
||||
(((~d) & 0x40) << (24 - 6)) | (((~d) & 0x80) << (23 - 7))); \
|
||||
PIO_Set(PIOB, (((d)&0x20) << (27 - 5))); \
|
||||
PIO_Clear(PIOB, (((~d) & 0x20) << (27 - 5))); \
|
||||
WR_STROBE; \
|
||||
}
|
||||
|
||||
#define read8inline(result) { \
|
||||
RD_ACTIVE; \
|
||||
delayMicroseconds(1); \
|
||||
result = (((PIOC->PIO_PDSR & (1<<23)) >> (23-7)) | ((PIOC->PIO_PDSR & (1<<24)) >> (24-6)) | \
|
||||
((PIOB->PIO_PDSR & (1<<27)) >> (27-5)) | ((PIOC->PIO_PDSR & (1<<26)) >> (26-4)) | \
|
||||
((PIOD->PIO_PDSR & (1<< 7)) >> ( 7-3)) | ((PIOC->PIO_PDSR & (1<<29)) >> (29-2)) | \
|
||||
((PIOC->PIO_PDSR & (1<<21)) >> (21-1)) | ((PIOC->PIO_PDSR & (1<<22)) >> (22-0))); \
|
||||
RD_IDLE;}
|
||||
#define read8inline(result) \
|
||||
{ \
|
||||
\
|
||||
RD_ACTIVE; \
|
||||
delayMicroseconds(1); \
|
||||
result = (((PIOC->PIO_PDSR & (1 << 23)) >> (23 - 7)) | \
|
||||
((PIOC->PIO_PDSR & (1 << 24)) >> (24 - 6)) | \
|
||||
((PIOB->PIO_PDSR & (1 << 27)) >> (27 - 5)) | \
|
||||
((PIOC->PIO_PDSR & (1 << 26)) >> (26 - 4)) | \
|
||||
((PIOD->PIO_PDSR & (1 << 7)) >> (7 - 3)) | \
|
||||
((PIOC->PIO_PDSR & (1 << 29)) >> (29 - 2)) | \
|
||||
((PIOC->PIO_PDSR & (1 << 21)) >> (21 - 1)) | \
|
||||
((PIOC->PIO_PDSR & (1 << 22)) >> (22 - 0))); \
|
||||
RD_IDLE; \
|
||||
}
|
||||
|
||||
#define setWriteDirInline() { \
|
||||
PIOD->PIO_MDDR |= 0x00000080; /*PIOD->PIO_SODR = 0x00000080;*/ PIOD->PIO_OER |= 0x00000080; PIOD->PIO_PER |= 0x00000080; \
|
||||
PIOC->PIO_MDDR |= 0x25E00000; /*PIOC->PIO_SODR = 0x25E00000;*/ PIOC->PIO_OER |= 0x25E00000; PIOC->PIO_PER |= 0x25E00000; \
|
||||
PIOB->PIO_MDDR |= 0x08000000; /*PIOB->PIO_SODR = 0x08000000;*/ PIOB->PIO_OER |= 0x08000000; PIOB->PIO_PER |= 0x08000000; }
|
||||
#define setWriteDirInline() \
|
||||
{ \
|
||||
PIOD->PIO_MDDR |= 0x00000080; /*PIOD->PIO_SODR = 0x00000080;*/ \
|
||||
PIOD->PIO_OER |= 0x00000080; \
|
||||
PIOD->PIO_PER |= 0x00000080; \
|
||||
PIOC->PIO_MDDR |= 0x25E00000; /*PIOC->PIO_SODR = 0x25E00000;*/ \
|
||||
PIOC->PIO_OER |= 0x25E00000; \
|
||||
PIOC->PIO_PER |= 0x25E00000; \
|
||||
PIOB->PIO_MDDR |= 0x08000000; /*PIOB->PIO_SODR = 0x08000000;*/ \
|
||||
PIOB->PIO_OER |= 0x08000000; \
|
||||
PIOB->PIO_PER |= 0x08000000; \
|
||||
}
|
||||
|
||||
#define setReadDirInline() { \
|
||||
pmc_enable_periph_clk( ID_PIOD ) ; pmc_enable_periph_clk( ID_PIOC ) ; pmc_enable_periph_clk( ID_PIOB ) ; \
|
||||
PIOD->PIO_PUDR |= 0x00000080; PIOD->PIO_IFDR |= 0x00000080; PIOD->PIO_ODR |= 0x00000080; PIOD->PIO_PER |= 0x00000080; \
|
||||
PIOC->PIO_PUDR |= 0x25E00000; PIOC->PIO_IFDR |= 0x25E00000; PIOC->PIO_ODR |= 0x25E00000; PIOC->PIO_PER |= 0x25E00000; \
|
||||
PIOB->PIO_PUDR |= 0x08000000; PIOB->PIO_IFDR |= 0x08000000; PIOB->PIO_ODR |= 0x08000000; PIOB->PIO_PER |= 0x08000000; }
|
||||
|
||||
// Control signals are ACTIVE LOW (idle is HIGH)
|
||||
// Command/Data: LOW = command, HIGH = data
|
||||
// These are single-instruction operations and always inline
|
||||
#define RD_ACTIVE RD_PORT->PIO_CODR |= RD_MASK
|
||||
#define RD_IDLE RD_PORT->PIO_SODR |= RD_MASK
|
||||
#define WR_ACTIVE WR_PORT->PIO_CODR |= WR_MASK
|
||||
#define WR_IDLE WR_PORT->PIO_SODR |= WR_MASK
|
||||
#define CD_COMMAND CD_PORT->PIO_CODR |= CD_MASK
|
||||
#define CD_DATA CD_PORT->PIO_SODR |= CD_MASK
|
||||
#define CS_ACTIVE CS_PORT->PIO_CODR |= CS_MASK
|
||||
#define CS_IDLE CS_PORT->PIO_SODR |= CS_MASK
|
||||
#define setReadDirInline() \
|
||||
{ \
|
||||
pmc_enable_periph_clk(ID_PIOD); \
|
||||
pmc_enable_periph_clk(ID_PIOC); \
|
||||
pmc_enable_periph_clk(ID_PIOB); \
|
||||
PIOD->PIO_PUDR |= 0x00000080; \
|
||||
PIOD->PIO_IFDR |= 0x00000080; \
|
||||
PIOD->PIO_ODR |= 0x00000080; \
|
||||
PIOD->PIO_PER |= 0x00000080; \
|
||||
PIOC->PIO_PUDR |= 0x25E00000; \
|
||||
PIOC->PIO_IFDR |= 0x25E00000; \
|
||||
PIOC->PIO_ODR |= 0x25E00000; \
|
||||
PIOC->PIO_PER |= 0x25E00000; \
|
||||
PIOB->PIO_PUDR |= 0x08000000; \
|
||||
PIOB->PIO_IFDR |= 0x08000000; \
|
||||
PIOB->PIO_ODR |= 0x08000000; \
|
||||
PIOB->PIO_PER |= 0x08000000; \
|
||||
}
|
||||
|
||||
// Control signals are ACTIVE LOW (idle is HIGH)
|
||||
// Command/Data: LOW = command, HIGH = data
|
||||
// These are single-instruction operations and always inline
|
||||
#define RD_ACTIVE RD_PORT->PIO_CODR |= RD_MASK
|
||||
#define RD_IDLE RD_PORT->PIO_SODR |= RD_MASK
|
||||
#define WR_ACTIVE WR_PORT->PIO_CODR |= WR_MASK
|
||||
#define WR_IDLE WR_PORT->PIO_SODR |= WR_MASK
|
||||
#define CD_COMMAND CD_PORT->PIO_CODR |= CD_MASK
|
||||
#define CD_DATA CD_PORT->PIO_SODR |= CD_MASK
|
||||
#define CS_ACTIVE CS_PORT->PIO_CODR |= CS_MASK
|
||||
#define CS_IDLE CS_PORT->PIO_SODR |= CS_MASK
|
||||
|
||||
#else // Due w/Breakout board
|
||||
|
||||
#define write8inline(d) { \
|
||||
PIO_Set(PIOC, (((d) & 0xFF)<<1)); \
|
||||
PIO_Clear(PIOC, (((~d) & 0xFF)<<1)); \
|
||||
WR_STROBE; }
|
||||
#define write8inline(d) \
|
||||
{ \
|
||||
PIO_Set(PIOC, (((d)&0xFF) << 1)); \
|
||||
PIO_Clear(PIOC, (((~d) & 0xFF) << 1)); \
|
||||
WR_STROBE; \
|
||||
}
|
||||
|
||||
#define read8inline(result) { \
|
||||
RD_ACTIVE; \
|
||||
delayMicroseconds(1); \
|
||||
result = ((PIOC->PIO_PDSR & 0x1FE) >> 1); \
|
||||
RD_IDLE;}
|
||||
#define read8inline(result) \
|
||||
{ \
|
||||
RD_ACTIVE; \
|
||||
delayMicroseconds(1); \
|
||||
result = ((PIOC->PIO_PDSR & 0x1FE) >> 1); \
|
||||
RD_IDLE; \
|
||||
}
|
||||
|
||||
#define setWriteDirInline() { \
|
||||
PIOC->PIO_MDDR |= 0x000001FE; /*PIOC->PIO_SODR |= 0x000001FE;*/ PIOC->PIO_OER |= 0x000001FE; PIOC->PIO_PER |= 0x000001FE; }
|
||||
#define setWriteDirInline() \
|
||||
{ \
|
||||
PIOC->PIO_MDDR |= 0x000001FE; /*PIOC->PIO_SODR |= 0x000001FE;*/ \
|
||||
PIOC->PIO_OER |= 0x000001FE; \
|
||||
PIOC->PIO_PER |= 0x000001FE; \
|
||||
}
|
||||
|
||||
#define setReadDirInline() { \
|
||||
pmc_enable_periph_clk( ID_PIOC ) ; \
|
||||
PIOC->PIO_PUDR |= 0x000001FE; PIOC->PIO_IFDR |= 0x000001FE; PIOC->PIO_ODR |= 0x000001FE; PIOC->PIO_PER |= 0x000001FE; }
|
||||
#define setReadDirInline() \
|
||||
{ \
|
||||
pmc_enable_periph_clk(ID_PIOC); \
|
||||
PIOC->PIO_PUDR |= 0x000001FE; \
|
||||
PIOC->PIO_IFDR |= 0x000001FE; \
|
||||
PIOC->PIO_ODR |= 0x000001FE; \
|
||||
PIOC->PIO_PER |= 0x000001FE; \
|
||||
}
|
||||
|
||||
// When using the TFT breakout board, control pins are configurable.
|
||||
#define RD_ACTIVE rdPort->PIO_CODR |= rdPinSet //PIO_Clear(rdPort, rdPinSet)
|
||||
#define RD_IDLE rdPort->PIO_SODR |= rdPinSet //PIO_Set(rdPort, rdPinSet)
|
||||
#define WR_ACTIVE wrPort->PIO_CODR |= wrPinSet //PIO_Clear(wrPort, wrPinSet)
|
||||
#define WR_IDLE wrPort->PIO_SODR |= wrPinSet //PIO_Set(wrPort, wrPinSet)
|
||||
#define CD_COMMAND cdPort->PIO_CODR |= cdPinSet //PIO_Clear(cdPort, cdPinSet)
|
||||
#define CD_DATA cdPort->PIO_SODR |= cdPinSet //PIO_Set(cdPort, cdPinSet)
|
||||
#define CS_ACTIVE csPort->PIO_CODR |= csPinSet //PIO_Clear(csPort, csPinSet)
|
||||
#define CS_IDLE csPort->PIO_SODR |= csPinSet //PIO_Set(csPort, csPinSet)
|
||||
|
||||
#endif
|
||||
// When using the TFT breakout board, control pins are configurable.
|
||||
#define RD_ACTIVE rdPort->PIO_CODR |= rdPinSet // PIO_Clear(rdPort, rdPinSet)
|
||||
#define RD_IDLE rdPort->PIO_SODR |= rdPinSet // PIO_Set(rdPort, rdPinSet)
|
||||
#define WR_ACTIVE wrPort->PIO_CODR |= wrPinSet // PIO_Clear(wrPort, wrPinSet)
|
||||
#define WR_IDLE wrPort->PIO_SODR |= wrPinSet // PIO_Set(wrPort, wrPinSet)
|
||||
#define CD_COMMAND cdPort->PIO_CODR |= cdPinSet // PIO_Clear(cdPort, cdPinSet)
|
||||
#define CD_DATA cdPort->PIO_SODR |= cdPinSet // PIO_Set(cdPort, cdPinSet)
|
||||
#define CS_ACTIVE csPort->PIO_CODR |= csPinSet // PIO_Clear(csPort, csPinSet)
|
||||
#define CS_IDLE csPort->PIO_SODR |= csPinSet // PIO_Set(csPort, csPinSet)
|
||||
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#error "Board type unsupported / not recognized"
|
||||
#error "Board type unsupported / not recognized"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -356,54 +478,90 @@
|
||||
|
||||
#ifdef USE_ADAFRUIT_SHIELD_PINOUT
|
||||
|
||||
// Control signals are ACTIVE LOW (idle is HIGH)
|
||||
// Command/Data: LOW = command, HIGH = data
|
||||
// These are single-instruction operations and always inline
|
||||
#define RD_ACTIVE RD_PORT &= ~RD_MASK
|
||||
#define RD_IDLE RD_PORT |= RD_MASK
|
||||
#define WR_ACTIVE WR_PORT &= ~WR_MASK
|
||||
#define WR_IDLE WR_PORT |= WR_MASK
|
||||
#define CD_COMMAND CD_PORT &= ~CD_MASK
|
||||
#define CD_DATA CD_PORT |= CD_MASK
|
||||
#define CS_ACTIVE CS_PORT &= ~CS_MASK
|
||||
#define CS_IDLE CS_PORT |= CS_MASK
|
||||
// Control signals are ACTIVE LOW (idle is HIGH)
|
||||
// Command/Data: LOW = command, HIGH = data
|
||||
// These are single-instruction operations and always inline
|
||||
#define RD_ACTIVE RD_PORT &= ~RD_MASK
|
||||
#define RD_IDLE RD_PORT |= RD_MASK
|
||||
#define WR_ACTIVE WR_PORT &= ~WR_MASK
|
||||
#define WR_IDLE WR_PORT |= WR_MASK
|
||||
#define CD_COMMAND CD_PORT &= ~CD_MASK
|
||||
#define CD_DATA CD_PORT |= CD_MASK
|
||||
#define CS_ACTIVE CS_PORT &= ~CS_MASK
|
||||
#define CS_IDLE CS_PORT |= CS_MASK
|
||||
|
||||
#else // Breakout board
|
||||
#else // Breakout board
|
||||
|
||||
// When using the TFT breakout board, control pins are configurable.
|
||||
#define RD_ACTIVE *rdPort &= rdPinUnset
|
||||
#define RD_IDLE *rdPort |= rdPinSet
|
||||
#define WR_ACTIVE *wrPort &= wrPinUnset
|
||||
#define WR_IDLE *wrPort |= wrPinSet
|
||||
#define CD_COMMAND *cdPort &= cdPinUnset
|
||||
#define CD_DATA *cdPort |= cdPinSet
|
||||
#define CS_ACTIVE *csPort &= csPinUnset
|
||||
#define CS_IDLE *csPort |= csPinSet
|
||||
// When using the TFT breakout board, control pins are configurable.
|
||||
#define RD_ACTIVE *rdPort &= rdPinUnset //!< Activate read mode
|
||||
#define RD_IDLE *rdPort |= rdPinSet //!< Set read mode to idle
|
||||
#define WR_ACTIVE *wrPort &= wrPinUnset //!< Activate write mode
|
||||
#define WR_IDLE *wrPort |= wrPinSet //!< Set write mode to idle
|
||||
#define CD_COMMAND *cdPort &= cdPinUnset //!< Command/data command mode
|
||||
#define CD_DATA *cdPort |= cdPinSet //!< Command/data data mode
|
||||
#define CS_ACTIVE *csPort &= csPinUnset //!< Activate chip select
|
||||
#define CS_IDLE *csPort |= csPinSet //!< Set chip select to idle
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Data write strobe, ~2 instructions and always inline
|
||||
#define WR_STROBE { WR_ACTIVE; WR_IDLE; }
|
||||
/*!
|
||||
* @brief Data write strobe, ~2 instructions and always inline
|
||||
*/
|
||||
#define WR_STROBE \
|
||||
{ \
|
||||
WR_ACTIVE; \
|
||||
WR_IDLE; \
|
||||
}
|
||||
|
||||
// These higher-level operations are usually functionalized,
|
||||
// except on Mega where's there's gobs and gobs of program space.
|
||||
|
||||
// Set value of TFT register: 8-bit address, 8-bit value
|
||||
#define writeRegister8inline(a, d) { \
|
||||
CD_COMMAND; write8(a); CD_DATA; write8(d); }
|
||||
/*!
|
||||
* @brief Set value of TFT register: 8-bit address, 8-bit value
|
||||
*/
|
||||
#define writeRegister8inline(a, d) \
|
||||
{ \
|
||||
CD_COMMAND; \
|
||||
write8(a); \
|
||||
CD_DATA; \
|
||||
write8(d); \
|
||||
}
|
||||
|
||||
// Set value of TFT register: 16-bit address, 16-bit value
|
||||
// See notes at top about macro expansion, hence hi & lo temp vars
|
||||
#define writeRegister16inline(a, d) { \
|
||||
uint8_t hi, lo; \
|
||||
hi = (a) >> 8; lo = (a); CD_COMMAND; write8(hi); write8(lo); \
|
||||
hi = (d) >> 8; lo = (d); CD_DATA ; write8(hi); write8(lo); }
|
||||
/*!
|
||||
* @brief Set value of TFT register: 16-bit address, 16-bit value
|
||||
* See notes at top about macro expansion, hence hi & lo temp vars
|
||||
*/
|
||||
#define writeRegister16inline(a, d) \
|
||||
{ \
|
||||
uint8_t hi, lo; \
|
||||
hi = (a) >> 8; \
|
||||
lo = (a); \
|
||||
CD_COMMAND; \
|
||||
write8(hi); \
|
||||
write8(lo); \
|
||||
hi = (d) >> 8; \
|
||||
lo = (d); \
|
||||
CD_DATA; \
|
||||
write8(hi); \
|
||||
write8(lo); \
|
||||
}
|
||||
|
||||
// Set value of 2 TFT registers: Two 8-bit addresses (hi & lo), 16-bit value
|
||||
#define writeRegisterPairInline(aH, aL, d) { \
|
||||
uint8_t hi = (d) >> 8, lo = (d); \
|
||||
CD_COMMAND; write8(aH); CD_DATA; write8(hi); \
|
||||
CD_COMMAND; write8(aL); CD_DATA; write8(lo); }
|
||||
/*!
|
||||
* @brief Set value of 2 TFT registers: Two 8-bit addresses (hi & lo), 16-bit
|
||||
* value
|
||||
*/
|
||||
#define writeRegisterPairInline(aH, aL, d) \
|
||||
{ \
|
||||
uint8_t hi = (d) >> 8, lo = (d); \
|
||||
CD_COMMAND; \
|
||||
write8(aH); \
|
||||
CD_DATA; \
|
||||
write8(hi); \
|
||||
CD_COMMAND; \
|
||||
write8(aL); \
|
||||
CD_DATA; \
|
||||
write8(lo); \
|
||||
}
|
||||
|
||||
#endif // _pin_magic_
|
||||
|
||||
+124
-129
@@ -1,172 +1,167 @@
|
||||
// Register names from Peter Barrett's Microtouch code
|
||||
#define ILI932X_START_OSC 0x00
|
||||
#define ILI932X_DRIV_OUT_CTRL 0x01
|
||||
#define ILI932X_DRIV_WAV_CTRL 0x02
|
||||
#define ILI932X_ENTRY_MOD 0x03
|
||||
#define ILI932X_RESIZE_CTRL 0x04
|
||||
#define ILI932X_DISP_CTRL1 0x07
|
||||
#define ILI932X_DISP_CTRL2 0x08
|
||||
#define ILI932X_DISP_CTRL3 0x09
|
||||
#define ILI932X_DISP_CTRL4 0x0A
|
||||
#define ILI932X_RGB_DISP_IF_CTRL1 0x0C
|
||||
#define ILI932X_FRM_MARKER_POS 0x0D
|
||||
#define ILI932X_RGB_DISP_IF_CTRL2 0x0F
|
||||
#define ILI932X_POW_CTRL1 0x10
|
||||
#define ILI932X_POW_CTRL2 0x11
|
||||
#define ILI932X_POW_CTRL3 0x12
|
||||
#define ILI932X_POW_CTRL4 0x13
|
||||
#define ILI932X_GRAM_HOR_AD 0x20
|
||||
#define ILI932X_GRAM_VER_AD 0x21
|
||||
#define ILI932X_RW_GRAM 0x22
|
||||
#define ILI932X_POW_CTRL7 0x29
|
||||
#define ILI932X_FRM_RATE_COL_CTRL 0x2B
|
||||
#define ILI932X_GAMMA_CTRL1 0x30
|
||||
#define ILI932X_GAMMA_CTRL2 0x31
|
||||
#define ILI932X_GAMMA_CTRL3 0x32
|
||||
#define ILI932X_GAMMA_CTRL4 0x35
|
||||
#define ILI932X_GAMMA_CTRL5 0x36
|
||||
#define ILI932X_GAMMA_CTRL6 0x37
|
||||
#define ILI932X_GAMMA_CTRL7 0x38
|
||||
#define ILI932X_GAMMA_CTRL8 0x39
|
||||
#define ILI932X_GAMMA_CTRL9 0x3C
|
||||
#define ILI932X_GAMMA_CTRL10 0x3D
|
||||
#define ILI932X_HOR_START_AD 0x50
|
||||
#define ILI932X_HOR_END_AD 0x51
|
||||
#define ILI932X_VER_START_AD 0x52
|
||||
#define ILI932X_VER_END_AD 0x53
|
||||
#define ILI932X_GATE_SCAN_CTRL1 0x60
|
||||
#define ILI932X_GATE_SCAN_CTRL2 0x61
|
||||
#define ILI932X_GATE_SCAN_CTRL3 0x6A
|
||||
#define ILI932X_START_OSC 0x00
|
||||
#define ILI932X_DRIV_OUT_CTRL 0x01
|
||||
#define ILI932X_DRIV_WAV_CTRL 0x02
|
||||
#define ILI932X_ENTRY_MOD 0x03
|
||||
#define ILI932X_RESIZE_CTRL 0x04
|
||||
#define ILI932X_DISP_CTRL1 0x07
|
||||
#define ILI932X_DISP_CTRL2 0x08
|
||||
#define ILI932X_DISP_CTRL3 0x09
|
||||
#define ILI932X_DISP_CTRL4 0x0A
|
||||
#define ILI932X_RGB_DISP_IF_CTRL1 0x0C
|
||||
#define ILI932X_FRM_MARKER_POS 0x0D
|
||||
#define ILI932X_RGB_DISP_IF_CTRL2 0x0F
|
||||
#define ILI932X_POW_CTRL1 0x10
|
||||
#define ILI932X_POW_CTRL2 0x11
|
||||
#define ILI932X_POW_CTRL3 0x12
|
||||
#define ILI932X_POW_CTRL4 0x13
|
||||
#define ILI932X_GRAM_HOR_AD 0x20
|
||||
#define ILI932X_GRAM_VER_AD 0x21
|
||||
#define ILI932X_RW_GRAM 0x22
|
||||
#define ILI932X_POW_CTRL7 0x29
|
||||
#define ILI932X_FRM_RATE_COL_CTRL 0x2B
|
||||
#define ILI932X_GAMMA_CTRL1 0x30
|
||||
#define ILI932X_GAMMA_CTRL2 0x31
|
||||
#define ILI932X_GAMMA_CTRL3 0x32
|
||||
#define ILI932X_GAMMA_CTRL4 0x35
|
||||
#define ILI932X_GAMMA_CTRL5 0x36
|
||||
#define ILI932X_GAMMA_CTRL6 0x37
|
||||
#define ILI932X_GAMMA_CTRL7 0x38
|
||||
#define ILI932X_GAMMA_CTRL8 0x39
|
||||
#define ILI932X_GAMMA_CTRL9 0x3C
|
||||
#define ILI932X_GAMMA_CTRL10 0x3D
|
||||
#define ILI932X_HOR_START_AD 0x50
|
||||
#define ILI932X_HOR_END_AD 0x51
|
||||
#define ILI932X_VER_START_AD 0x52
|
||||
#define ILI932X_VER_END_AD 0x53
|
||||
#define ILI932X_GATE_SCAN_CTRL1 0x60
|
||||
#define ILI932X_GATE_SCAN_CTRL2 0x61
|
||||
#define ILI932X_GATE_SCAN_CTRL3 0x6A
|
||||
#define ILI932X_PART_IMG1_DISP_POS 0x80
|
||||
#define ILI932X_PART_IMG1_START_AD 0x81
|
||||
#define ILI932X_PART_IMG1_END_AD 0x82
|
||||
#define ILI932X_PART_IMG1_END_AD 0x82
|
||||
#define ILI932X_PART_IMG2_DISP_POS 0x83
|
||||
#define ILI932X_PART_IMG2_START_AD 0x84
|
||||
#define ILI932X_PART_IMG2_END_AD 0x85
|
||||
#define ILI932X_PANEL_IF_CTRL1 0x90
|
||||
#define ILI932X_PANEL_IF_CTRL2 0x92
|
||||
#define ILI932X_PANEL_IF_CTRL3 0x93
|
||||
#define ILI932X_PANEL_IF_CTRL4 0x95
|
||||
#define ILI932X_PANEL_IF_CTRL5 0x97
|
||||
#define ILI932X_PANEL_IF_CTRL6 0x98
|
||||
#define ILI932X_PART_IMG2_END_AD 0x85
|
||||
#define ILI932X_PANEL_IF_CTRL1 0x90
|
||||
#define ILI932X_PANEL_IF_CTRL2 0x92
|
||||
#define ILI932X_PANEL_IF_CTRL3 0x93
|
||||
#define ILI932X_PANEL_IF_CTRL4 0x95
|
||||
#define ILI932X_PANEL_IF_CTRL5 0x97
|
||||
#define ILI932X_PANEL_IF_CTRL6 0x98
|
||||
|
||||
#define HX8347G_COLADDRSTART_HI 0x02
|
||||
#define HX8347G_COLADDRSTART_LO 0x03
|
||||
#define HX8347G_COLADDREND_HI 0x04
|
||||
#define HX8347G_COLADDREND_LO 0x05
|
||||
#define HX8347G_ROWADDRSTART_HI 0x06
|
||||
#define HX8347G_ROWADDRSTART_LO 0x07
|
||||
#define HX8347G_ROWADDREND_HI 0x08
|
||||
#define HX8347G_ROWADDREND_LO 0x09
|
||||
#define HX8347G_MEMACCESS 0x16
|
||||
#define HX8347G_COLADDRSTART_HI 0x02
|
||||
#define HX8347G_COLADDRSTART_LO 0x03
|
||||
#define HX8347G_COLADDREND_HI 0x04
|
||||
#define HX8347G_COLADDREND_LO 0x05
|
||||
#define HX8347G_ROWADDRSTART_HI 0x06
|
||||
#define HX8347G_ROWADDRSTART_LO 0x07
|
||||
#define HX8347G_ROWADDREND_HI 0x08
|
||||
#define HX8347G_ROWADDREND_LO 0x09
|
||||
#define HX8347G_MEMACCESS 0x16
|
||||
|
||||
#define ILI9341_SOFTRESET 0x01
|
||||
#define ILI9341_SLEEPIN 0x10
|
||||
#define ILI9341_SLEEPOUT 0x11
|
||||
#define ILI9341_NORMALDISP 0x13
|
||||
#define ILI9341_INVERTOFF 0x20
|
||||
#define ILI9341_INVERTON 0x21
|
||||
#define ILI9341_GAMMASET 0x26
|
||||
#define ILI9341_DISPLAYOFF 0x28
|
||||
#define ILI9341_DISPLAYON 0x29
|
||||
#define ILI9341_COLADDRSET 0x2A
|
||||
#define ILI9341_PAGEADDRSET 0x2B
|
||||
#define ILI9341_MEMORYWRITE 0x2C
|
||||
#define ILI9341_PIXELFORMAT 0x3A
|
||||
#define ILI9341_FRAMECONTROL 0xB1
|
||||
#define ILI9341_DISPLAYFUNC 0xB6
|
||||
#define ILI9341_ENTRYMODE 0xB7
|
||||
#define ILI9341_POWERCONTROL1 0xC0
|
||||
#define ILI9341_POWERCONTROL2 0xC1
|
||||
#define ILI9341_VCOMCONTROL1 0xC5
|
||||
#define ILI9341_VCOMCONTROL2 0xC7
|
||||
#define ILI9341_MEMCONTROL 0x36
|
||||
#define ILI9341_MADCTL 0x36
|
||||
|
||||
|
||||
#define ILI9341_SOFTRESET 0x01
|
||||
#define ILI9341_SLEEPIN 0x10
|
||||
#define ILI9341_SLEEPOUT 0x11
|
||||
#define ILI9341_NORMALDISP 0x13
|
||||
#define ILI9341_INVERTOFF 0x20
|
||||
#define ILI9341_INVERTON 0x21
|
||||
#define ILI9341_GAMMASET 0x26
|
||||
#define ILI9341_DISPLAYOFF 0x28
|
||||
#define ILI9341_DISPLAYON 0x29
|
||||
#define ILI9341_COLADDRSET 0x2A
|
||||
#define ILI9341_PAGEADDRSET 0x2B
|
||||
#define ILI9341_MEMORYWRITE 0x2C
|
||||
#define ILI9341_PIXELFORMAT 0x3A
|
||||
#define ILI9341_FRAMECONTROL 0xB1
|
||||
#define ILI9341_DISPLAYFUNC 0xB6
|
||||
#define ILI9341_ENTRYMODE 0xB7
|
||||
#define ILI9341_POWERCONTROL1 0xC0
|
||||
#define ILI9341_POWERCONTROL2 0xC1
|
||||
#define ILI9341_VCOMCONTROL1 0xC5
|
||||
#define ILI9341_VCOMCONTROL2 0xC7
|
||||
#define ILI9341_MEMCONTROL 0x36
|
||||
#define ILI9341_MADCTL 0x36
|
||||
|
||||
#define ILI9341_MADCTL_MY 0x80
|
||||
#define ILI9341_MADCTL_MX 0x40
|
||||
#define ILI9341_MADCTL_MV 0x20
|
||||
#define ILI9341_MADCTL_ML 0x10
|
||||
#define ILI9341_MADCTL_MY 0x80
|
||||
#define ILI9341_MADCTL_MX 0x40
|
||||
#define ILI9341_MADCTL_MV 0x20
|
||||
#define ILI9341_MADCTL_ML 0x10
|
||||
#define ILI9341_MADCTL_RGB 0x00
|
||||
#define ILI9341_MADCTL_BGR 0x08
|
||||
#define ILI9341_MADCTL_MH 0x04
|
||||
#define ILI9341_MADCTL_MH 0x04
|
||||
|
||||
|
||||
|
||||
#define HX8357_NOP 0x00
|
||||
#define HX8357_NOP 0x00
|
||||
#define HX8357_SWRESET 0x01
|
||||
#define HX8357_RDDID 0x04
|
||||
#define HX8357_RDDST 0x09
|
||||
#define HX8357_RDDID 0x04
|
||||
#define HX8357_RDDST 0x09
|
||||
|
||||
#define HX8357B_RDPOWMODE 0x0A
|
||||
#define HX8357B_RDMADCTL 0x0B
|
||||
#define HX8357B_RDCOLMOD 0x0C
|
||||
#define HX8357B_RDDIM 0x0D
|
||||
#define HX8357B_RDDSDR 0x0F
|
||||
#define HX8357B_RDPOWMODE 0x0A
|
||||
#define HX8357B_RDMADCTL 0x0B
|
||||
#define HX8357B_RDCOLMOD 0x0C
|
||||
#define HX8357B_RDDIM 0x0D
|
||||
#define HX8357B_RDDSDR 0x0F
|
||||
|
||||
#define HX8357_SLPIN 0x10
|
||||
#define HX8357_SLPOUT 0x11
|
||||
#define HX8357B_PTLON 0x12
|
||||
#define HX8357B_NORON 0x13
|
||||
#define HX8357_SLPIN 0x10
|
||||
#define HX8357_SLPOUT 0x11
|
||||
#define HX8357B_PTLON 0x12
|
||||
#define HX8357B_NORON 0x13
|
||||
|
||||
#define HX8357_INVOFF 0x20
|
||||
#define HX8357_INVON 0x21
|
||||
#define HX8357_INVOFF 0x20
|
||||
#define HX8357_INVON 0x21
|
||||
#define HX8357_DISPOFF 0x28
|
||||
#define HX8357_DISPON 0x29
|
||||
#define HX8357_DISPON 0x29
|
||||
|
||||
#define HX8357_CASET 0x2A
|
||||
#define HX8357_PASET 0x2B
|
||||
#define HX8357_RAMWR 0x2C
|
||||
#define HX8357_RAMRD 0x2E
|
||||
#define HX8357_CASET 0x2A
|
||||
#define HX8357_PASET 0x2B
|
||||
#define HX8357_RAMWR 0x2C
|
||||
#define HX8357_RAMRD 0x2E
|
||||
|
||||
#define HX8357B_PTLAR 0x30
|
||||
#define HX8357_TEON 0x35
|
||||
#define HX8357_TEARLINE 0x44
|
||||
#define HX8357_MADCTL 0x36
|
||||
#define HX8357_COLMOD 0x3A
|
||||
#define HX8357B_PTLAR 0x30
|
||||
#define HX8357_TEON 0x35
|
||||
#define HX8357_TEARLINE 0x44
|
||||
#define HX8357_MADCTL 0x36
|
||||
#define HX8357_COLMOD 0x3A
|
||||
|
||||
#define HX8357_SETOSC 0xB0
|
||||
#define HX8357_SETPWR1 0xB1
|
||||
#define HX8357B_SETDISPLAY 0xB2
|
||||
#define HX8357_SETRGB 0xB3
|
||||
#define HX8357D_SETCOM 0xB6
|
||||
#define HX8357D_SETCOM 0xB6
|
||||
|
||||
#define HX8357B_SETDISPMODE 0xB4
|
||||
#define HX8357D_SETCYC 0xB4
|
||||
#define HX8357B_SETDISPMODE 0xB4
|
||||
#define HX8357D_SETCYC 0xB4
|
||||
#define HX8357B_SETOTP 0xB7
|
||||
#define HX8357D_SETC 0xB9
|
||||
|
||||
#define HX8357B_SET_PANEL_DRIVING 0xC0
|
||||
#define HX8357D_SETSTBA 0xC0
|
||||
#define HX8357B_SETDGC 0xC1
|
||||
#define HX8357B_SETID 0xC3
|
||||
#define HX8357B_SETDDB 0xC4
|
||||
#define HX8357B_SETDGC 0xC1
|
||||
#define HX8357B_SETID 0xC3
|
||||
#define HX8357B_SETDDB 0xC4
|
||||
#define HX8357B_SETDISPLAYFRAME 0xC5
|
||||
#define HX8357B_GAMMASET 0xC8
|
||||
#define HX8357B_SETCABC 0xC9
|
||||
#define HX8357_SETPANEL 0xCC
|
||||
|
||||
#define HX8357B_SETCABC 0xC9
|
||||
#define HX8357_SETPANEL 0xCC
|
||||
|
||||
#define HX8357B_SETPOWER 0xD0
|
||||
#define HX8357B_SETVCOM 0xD1
|
||||
#define HX8357B_SETPWRNORMAL 0xD2
|
||||
|
||||
#define HX8357B_RDID1 0xDA
|
||||
#define HX8357B_RDID2 0xDB
|
||||
#define HX8357B_RDID3 0xDC
|
||||
#define HX8357B_RDID4 0xDD
|
||||
#define HX8357B_RDID1 0xDA
|
||||
#define HX8357B_RDID2 0xDB
|
||||
#define HX8357B_RDID3 0xDC
|
||||
#define HX8357B_RDID4 0xDD
|
||||
|
||||
#define HX8357D_SETGAMMA 0xE0
|
||||
|
||||
#define HX8357B_SETGAMMA 0xC8
|
||||
#define HX8357B_SETPANELRELATED 0xE9
|
||||
#define HX8357B_SETPANELRELATED 0xE9
|
||||
|
||||
#define HX8357B_MADCTL_MY 0x80
|
||||
#define HX8357B_MADCTL_MX 0x40
|
||||
#define HX8357B_MADCTL_MV 0x20
|
||||
#define HX8357B_MADCTL_ML 0x10
|
||||
#define HX8357B_MADCTL_MY 0x80
|
||||
#define HX8357B_MADCTL_MX 0x40
|
||||
#define HX8357B_MADCTL_MV 0x20
|
||||
#define HX8357B_MADCTL_ML 0x10
|
||||
#define HX8357B_MADCTL_RGB 0x00
|
||||
#define HX8357B_MADCTL_BGR 0x08
|
||||
#define HX8357B_MADCTL_MH 0x04
|
||||
#define HX8357B_MADCTL_MH 0x04
|
||||
|
||||
Reference in New Issue
Block a user