Merge remote-tracking branch 'refs/remotes/rogerclarkmelbourne/master' into generic_f4
|
@ -9,7 +9,7 @@ Use of these files is at your own risk.
|
|||
|
||||
|
||||
##Summary:
|
||||
This repo contains, the "Hardware" files to support STM32 based boards on Arduino version 1.6.4 and 1.6.5, and 1.6.9 including [LeafLabs Maple, and Maple mini](http://www.leaflabs.com/about-maple/), and other generic STM32F103 boards
|
||||
This repo contains, the "Hardware" files to support STM32 based boards on Arduino version 1.6.13 or 1.6.12 (some older versions may also work) including [LeafLabs Maple, and Maple mini](http://www.leaflabs.com/about-maple/), and other generic STM32F103 boards
|
||||
|
||||
***PRIMARY SUPPORT FORUM: http://www.stm32duino.com/***
|
||||
|
||||
|
|
|
@ -38,6 +38,14 @@ mapleMini.menu.bootloader_version.bootloader20.upload.flash.maximum_size=122880
|
|||
mapleMini.menu.bootloader_version.bootloader20.upload.maximum_size=122880
|
||||
mapleMini.menu.bootloader_version.bootloader20.upload.altID=2
|
||||
|
||||
#-- CPU Clock frequency
|
||||
mapleMini.menu.cpu_speed.speed_72mhz=72Mhz (Normal)
|
||||
mapleMini.menu.cpu_speed.speed_72mhz.build.f_cpu=72000000L
|
||||
|
||||
mapleMini.menu.cpu_speed.speed_48mhz=48Mhz (Slow - with USB)
|
||||
mapleMini.menu.cpu_speed.speed_48mhz.build.f_cpu=48000000L
|
||||
|
||||
|
||||
##############################################################
|
||||
maple.name=Maple (Rev 3)
|
||||
|
||||
|
@ -199,7 +207,7 @@ genericSTM32F103C.menu.upload_method.DFUUploadMethod.upload.altID=2
|
|||
genericSTM32F103C.menu.upload_method.serialMethod=Serial
|
||||
genericSTM32F103C.menu.upload_method.serialMethod.upload.protocol=maple_serial
|
||||
genericSTM32F103C.menu.upload_method.serialMethod.upload.tool=serial_upload
|
||||
|
||||
genericSTM32F103C.menu.upload_method.serialMethod.build.upload_flags=-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG
|
||||
|
||||
genericSTM32F103C.menu.upload_method.STLinkMethod=STLink
|
||||
genericSTM32F103C.menu.upload_method.STLinkMethod.upload.protocol=STLink
|
||||
|
@ -217,6 +225,13 @@ genericSTM32F103C.menu.upload_method.jlinkMethod.upload.protocol=jlink
|
|||
genericSTM32F103C.menu.upload_method.jlinkMethod.upload.tool=jlink_upload
|
||||
genericSTM32F103C.menu.upload_method.jlinkMethod.build.upload_flags=-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER
|
||||
|
||||
#-- CPU Clock frequency
|
||||
genericSTM32F103C.menu.cpu_speed.speed_72mhz=72Mhz (Normal)
|
||||
genericSTM32F103C.menu.cpu_speed.speed_72mhz.build.f_cpu=72000000L
|
||||
|
||||
genericSTM32F103C.menu.cpu_speed.speed_48mhz=48Mhz (Slow - with USB)
|
||||
genericSTM32F103C.menu.cpu_speed.speed_48mhz.build.f_cpu=48000000L
|
||||
|
||||
########################### Generic STM32F103R ###########################
|
||||
|
||||
genericSTM32F103R.name=Generic STM32F103R series
|
||||
|
@ -276,6 +291,7 @@ genericSTM32F103R.menu.upload_method.DFUUploadMethod.upload.altID=2
|
|||
genericSTM32F103R.menu.upload_method.serialMethod=Serial
|
||||
genericSTM32F103R.menu.upload_method.serialMethod.upload.protocol=maple_serial
|
||||
genericSTM32F103R.menu.upload_method.serialMethod.upload.tool=serial_upload
|
||||
genericSTM32F103R.menu.upload_method.serialMethod.build.upload_flags=-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1
|
||||
|
||||
genericSTM32F103R.menu.upload_method.STLinkMethod=STLink
|
||||
genericSTM32F103R.menu.upload_method.STLinkMethod.upload.protocol=STLink
|
||||
|
@ -330,6 +346,7 @@ genericSTM32F103T.menu.upload_method.DFUUploadMethod.upload.altID=2
|
|||
genericSTM32F103T.menu.upload_method.serialMethod=Serial
|
||||
genericSTM32F103T.menu.upload_method.serialMethod.upload.protocol=maple_serial
|
||||
genericSTM32F103T.menu.upload_method.serialMethod.upload.tool=serial_upload
|
||||
genericSTM32F103T.menu.upload_method.serialMethod.build.upload_flags=-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1
|
||||
|
||||
genericSTM32F103T.menu.upload_method.STLinkMethod=STLink
|
||||
genericSTM32F103T.menu.upload_method.STLinkMethod.upload.protocol=STLink
|
||||
|
@ -392,6 +409,7 @@ genericSTM32F103V.menu.upload_method.DFUUploadMethod.upload.altID=2
|
|||
genericSTM32F103V.menu.upload_method.serialMethod=Serial
|
||||
genericSTM32F103V.menu.upload_method.serialMethod.upload.protocol=maple_serial
|
||||
genericSTM32F103V.menu.upload_method.serialMethod.upload.tool=serial_upload
|
||||
genericSTM32F103V.menu.upload_method.serialMethod.build.upload_flags=-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1
|
||||
|
||||
genericSTM32F103V.menu.upload_method.STLinkMethod=STLink
|
||||
genericSTM32F103V.menu.upload_method.STLinkMethod.upload.protocol=STLink
|
||||
|
@ -451,6 +469,7 @@ genericSTM32F103Z.menu.upload_method.DFUUploadMethod.upload.altID=2
|
|||
genericSTM32F103Z.menu.upload_method.serialMethod=Serial
|
||||
genericSTM32F103Z.menu.upload_method.serialMethod.upload.protocol=maple_serial
|
||||
genericSTM32F103Z.menu.upload_method.serialMethod.upload.tool=serial_upload
|
||||
genericSTM32F103Z.menu.upload_method.serialMethod.build.upload_flags=-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1
|
||||
|
||||
genericSTM32F103Z.menu.upload_method.STLinkMethod=STLink
|
||||
genericSTM32F103Z.menu.upload_method.STLinkMethod.upload.protocol=STLink
|
||||
|
@ -462,6 +481,60 @@ genericSTM32F103Z.menu.upload_method.BMPMethod.upload.protocol=gdb_bmp
|
|||
genericSTM32F103Z.menu.upload_method.BMPMethod.upload.tool=bmp_upload
|
||||
genericSTM32F103Z.menu.upload_method.BMPMethod.build.upload_flags=-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG
|
||||
|
||||
###################### HYTiny STM32F103T ########################################
|
||||
|
||||
hytiny-stm32f103t.name=HYTiny STM32F103TB
|
||||
hytiny-stm32f103t.vid.0=0x1EAF
|
||||
hytiny-stm32f103t.pid.0=0x0004
|
||||
hytiny-stm32f103t.build.variant=hytiny_stm32f103t
|
||||
hytiny-stm32f103t.build.vect=VECT_TAB_ADDR=0x8000000
|
||||
hytiny-stm32f103t.build.core=maple
|
||||
hytiny-stm32f103t.build.board=HYTINY_STM32F103T
|
||||
hytiny-stm32f103t.upload.use_1200bps_touch=false
|
||||
hytiny-stm32f103t.upload.file_type=bin
|
||||
hytiny-stm32f103t.upload.auto_reset=true
|
||||
|
||||
|
||||
hytiny-stm32f103t.build.cpu_flags=-DMCU_STM32F103CB
|
||||
hytiny-stm32f103t.build.ldscript=ld/jtag.ld
|
||||
hytiny-stm32f103t.upload.maximum_size=131072
|
||||
hytiny-stm32f103t.upload.ram.maximum_size=20480
|
||||
hytiny-stm32f103t.upload.flash.maximum_size=131072
|
||||
|
||||
|
||||
#---------------------------- UPLOAD METHODS ---------------------------
|
||||
|
||||
hytiny-stm32f103t.menu.upload_method.DFUUploadMethod=STM32duino bootloader
|
||||
hytiny-stm32f103t.menu.upload_method.DFUUploadMethod.upload.protocol=maple_dfu
|
||||
hytiny-stm32f103t.menu.upload_method.DFUUploadMethod.upload.tool=maple_upload
|
||||
hytiny-stm32f103t.menu.upload_method.DFUUploadMethod.build.upload_flags=-DSERIAL_USB
|
||||
hytiny-stm32f103t.menu.upload_method.DFUUploadMethod.build.vect=VECT_TAB_ADDR=0x8002000
|
||||
hytiny-stm32f103t.menu.upload_method.DFUUploadMethod.build.ldscript=ld/bootloader_20.ld
|
||||
hytiny-stm32f103t.menu.upload_method.DFUUploadMethod.upload.usbID=1EAF:0003
|
||||
hytiny-stm32f103t.menu.upload_method.DFUUploadMethod.upload.altID=2
|
||||
|
||||
hytiny-stm32f103t.menu.upload_method.serialMethod=Serial
|
||||
hytiny-stm32f103t.menu.upload_method.serialMethod.upload.protocol=maple_serial
|
||||
hytiny-stm32f103t.menu.upload_method.serialMethod.upload.tool=serial_upload
|
||||
hytiny-stm32f103t.menu.upload_method.serialMethod.build.upload_flags=-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1
|
||||
|
||||
hytiny-stm32f103t.menu.upload_method.STLinkMethod=STLink
|
||||
hytiny-stm32f103t.menu.upload_method.STLinkMethod.upload.protocol=STLink
|
||||
hytiny-stm32f103t.menu.upload_method.STLinkMethod.upload.tool=stlink_upload
|
||||
hytiny-stm32f103t.menu.upload_method.STLinkMethod.build.upload_flags=-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER
|
||||
|
||||
hytiny-stm32f103t.menu.upload_method.BMPMethod=BMP (Black Magic Probe)
|
||||
hytiny-stm32f103t.menu.upload_method.BMPMethod.upload.protocol=gdb_bmp
|
||||
hytiny-stm32f103t.menu.upload_method.BMPMethod.upload.tool=bmp_upload
|
||||
hytiny-stm32f103t.menu.upload_method.BMPMethod.build.upload_flags=-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG
|
||||
|
||||
|
||||
hytiny-stm32f103t.menu.upload_method.jlinkMethod=JLink
|
||||
hytiny-stm32f103t.menu.upload_method.jlinkMethod.upload.protocol=jlink
|
||||
hytiny-stm32f103t.menu.upload_method.jlinkMethod.upload.tool=jlink_upload
|
||||
hytiny-stm32f103t.menu.upload_method.jlinkMethod.build.upload_flags=-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER
|
||||
|
||||
|
||||
###################### Generic GD32F103C ########################################
|
||||
|
||||
genericGD32F103C.name=Generic GD32F103C series
|
||||
|
@ -505,7 +578,7 @@ genericGD32F103C.menu.upload_method.DFUUploadMethod.upload.altID=2
|
|||
genericGD32F103C.menu.upload_method.serialMethod=Serial
|
||||
genericGD32F103C.menu.upload_method.serialMethod.upload.protocol=maple_serial
|
||||
genericGD32F103C.menu.upload_method.serialMethod.upload.tool=serial_upload
|
||||
|
||||
genericGD32F103C.menu.upload_method.serialMethod.build.upload_flags=-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1
|
||||
|
||||
genericGD32F103C.menu.upload_method.STLinkMethod=STLink
|
||||
genericGD32F103C.menu.upload_method.STLinkMethod.upload.protocol=STLink
|
||||
|
@ -526,3 +599,34 @@ genericGD32F103C.menu.cpu_speed.speed_96mhz.build.f_cpu=96000000L
|
|||
|
||||
genericGD32F103C.menu.cpu_speed.speed_72mhz=72Mhz (compatibility)
|
||||
genericGD32F103C.menu.cpu_speed.speed_72mhz.build.f_cpu=72000000L
|
||||
|
||||
########################### STM32VLD to FLASH ###########################
|
||||
|
||||
STM32VLD.name=STM32VLD to FLASH
|
||||
#STM32VLD.vid.0=0x1EAF
|
||||
#STM32VLD.pid.0=0x0004
|
||||
|
||||
STM32VLD.build.vect=VECT_TAB_ADDR=0x8000000
|
||||
STM32VLD.build.core=maple
|
||||
STM32VLD.build.board=STM32VLD
|
||||
STM32VLD.build.variant=STM32VLD
|
||||
STM32VLD.build.ldscript=ld/jtag.ld
|
||||
|
||||
STM32VLD.build.family=cortex-m3
|
||||
STM32VLD.build.f_cpu=24000000L
|
||||
STM32VLD.upload.use_1200bps_touch=false
|
||||
STM32VLD.upload.file_type=bin
|
||||
STM32VLD.upload.auto_reset=true
|
||||
STM32VLD.upload.params.quiet=no
|
||||
|
||||
STM32VLD.build.cpu_flags=-DMCU_STM32F100RB
|
||||
##---------------------------- UPLOAD METHODS ---------------------------
|
||||
|
||||
|
||||
STM32VLD.menu.upload_method.STLinkMethod=STLink
|
||||
STM32VLD.menu.upload_method.STLinkMethod.upload.protocol=STLink
|
||||
STM32VLD.menu.upload_method.STLinkMethod.upload.tool=stlink_upload
|
||||
STM32VLD.menu.upload_method.STLinkMethod.build.upload_flags=-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG
|
||||
|
||||
|
||||
################################################################################
|
||||
|
|
|
@ -44,6 +44,48 @@ IPAddress::IPAddress(const uint8_t *address)
|
|||
memcpy(_address.bytes, address, sizeof(_address.bytes));
|
||||
}
|
||||
|
||||
bool IPAddress::fromString(const char *address)
|
||||
{
|
||||
// TODO: add support for "a", "a.b", "a.b.c" formats
|
||||
|
||||
uint16_t acc = 0; // Accumulator
|
||||
uint8_t dots = 0;
|
||||
|
||||
while (*address)
|
||||
{
|
||||
char c = *address++;
|
||||
if (c >= '0' && c <= '9')
|
||||
{
|
||||
acc = acc * 10 + (c - '0');
|
||||
if (acc > 255) {
|
||||
// Value out of [0..255] range
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (c == '.')
|
||||
{
|
||||
if (dots == 3) {
|
||||
// Too much dots (there must be 3 dots)
|
||||
return false;
|
||||
}
|
||||
_address.bytes[dots++] = acc;
|
||||
acc = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Invalid char
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (dots != 3) {
|
||||
// Too few dots (there must be 3 dots)
|
||||
return false;
|
||||
}
|
||||
_address.bytes[3] = acc;
|
||||
return true;
|
||||
}
|
||||
|
||||
IPAddress& IPAddress::operator=(const uint8_t *address)
|
||||
{
|
||||
memcpy(_address.bytes, address, sizeof(_address.bytes));
|
||||
|
|
|
@ -46,6 +46,9 @@ public:
|
|||
IPAddress(uint32_t address);
|
||||
IPAddress(const uint8_t *address);
|
||||
|
||||
bool fromString(const char *address);
|
||||
bool fromString(const String &address) { return fromString(address.c_str()); }
|
||||
|
||||
// Overloaded cast operator to allow IPAddress objects to be used where a pointer
|
||||
// to a four-byte uint8_t array is expected
|
||||
operator uint32_t() const { return _address.dword; };
|
||||
|
|
|
@ -124,6 +124,16 @@ size_t Print::print(double n, int digits) {
|
|||
return printFloat(n, digits);
|
||||
}
|
||||
|
||||
size_t Print::print(const __FlashStringHelper *ifsh)
|
||||
{
|
||||
return print(reinterpret_cast<const char *>(ifsh));
|
||||
}
|
||||
|
||||
size_t Print::print(const Printable& x)
|
||||
{
|
||||
return x.printTo(*this);
|
||||
}
|
||||
|
||||
size_t Print::println(void)
|
||||
{
|
||||
size_t n = print('\r');
|
||||
|
@ -198,6 +208,20 @@ size_t Print::println(double n, int digits) {
|
|||
return s;
|
||||
}
|
||||
|
||||
size_t Print::println(const __FlashStringHelper *ifsh)
|
||||
{
|
||||
size_t n = print(ifsh);
|
||||
n += println();
|
||||
return n;
|
||||
}
|
||||
|
||||
size_t Print::println(const Printable& x)
|
||||
{
|
||||
size_t n = print(x);
|
||||
n += println();
|
||||
return n;
|
||||
}
|
||||
|
||||
#ifdef SUPPORTS_PRINTF
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
#include <libmaple/libmaple_types.h>
|
||||
#include "WString.h"
|
||||
#include "Printable.h"
|
||||
|
||||
enum {
|
||||
BYTE = 0,
|
||||
|
@ -51,6 +52,8 @@ public:
|
|||
size_t print(long long, int=DEC);
|
||||
size_t print(unsigned long long, int=DEC);
|
||||
size_t print(double, int=2);
|
||||
size_t print(const __FlashStringHelper *);
|
||||
size_t print(const Printable&);
|
||||
size_t println(void);
|
||||
size_t println(const String &s);
|
||||
size_t println(char);
|
||||
|
@ -63,6 +66,8 @@ public:
|
|||
size_t println(long long, int=DEC);
|
||||
size_t println(unsigned long long, int=DEC);
|
||||
size_t println(double, int=2);
|
||||
size_t println(const __FlashStringHelper *);
|
||||
size_t println(const Printable&);
|
||||
#ifdef SUPPORTS_PRINTF
|
||||
// Roger Clark. Work in progress to add printf support
|
||||
int printf(const char * format, ...);
|
||||
|
|
|
@ -268,3 +268,68 @@ String Stream::readStringUntil(char terminator)
|
|||
return ret;
|
||||
}
|
||||
|
||||
|
||||
int Stream::findMulti( struct Stream::MultiTarget *targets, int tCount) {
|
||||
// any zero length target string automatically matches and would make
|
||||
// a mess of the rest of the algorithm.
|
||||
for (struct MultiTarget *t = targets; t < targets+tCount; ++t) {
|
||||
if (t->len <= 0)
|
||||
return t - targets;
|
||||
}
|
||||
|
||||
while (1) {
|
||||
int c = timedRead();
|
||||
if (c < 0)
|
||||
return -1;
|
||||
|
||||
for (struct MultiTarget *t = targets; t < targets+tCount; ++t) {
|
||||
// the simple case is if we match, deal with that first.
|
||||
if (c == t->str[t->index]) {
|
||||
if (++t->index == t->len)
|
||||
return t - targets;
|
||||
else
|
||||
continue;
|
||||
}
|
||||
|
||||
// if not we need to walk back and see if we could have matched further
|
||||
// down the stream (ie '1112' doesn't match the first position in '11112'
|
||||
// but it will match the second position so we can't just reset the current
|
||||
// index to 0 when we find a mismatch.
|
||||
if (t->index == 0)
|
||||
continue;
|
||||
|
||||
int origIndex = t->index;
|
||||
do {
|
||||
--t->index;
|
||||
// first check if current char works against the new current index
|
||||
if (c != t->str[t->index])
|
||||
continue;
|
||||
|
||||
// if it's the only char then we're good, nothing more to check
|
||||
if (t->index == 0) {
|
||||
t->index++;
|
||||
break;
|
||||
}
|
||||
|
||||
// otherwise we need to check the rest of the found string
|
||||
int diff = origIndex - t->index;
|
||||
size_t i;
|
||||
for (i = 0; i < t->index; ++i) {
|
||||
if (t->str[i] != t->str[i + diff])
|
||||
break;
|
||||
}
|
||||
|
||||
// if we successfully got through the previous loop then our current
|
||||
// index is good.
|
||||
if (i == t->index) {
|
||||
t->index++;
|
||||
break;
|
||||
}
|
||||
|
||||
// otherwise we just try the next index
|
||||
} while (t->index);
|
||||
}
|
||||
}
|
||||
// unreachable
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -55,6 +55,7 @@ class Stream : public Print
|
|||
// parsing methods
|
||||
|
||||
void setTimeout(unsigned long timeout); // sets maximum milliseconds to wait for stream data, default is 1 second
|
||||
unsigned long getTimeout(void) { return _timeout; }
|
||||
|
||||
bool find(char *target); // reads data from the stream until the target string is found
|
||||
bool find(uint8_t *target) { return find ((char *)target); }
|
||||
|
@ -64,6 +65,8 @@ class Stream : public Print
|
|||
bool find(uint8_t *target, size_t length) { return find ((char *)target, length); }
|
||||
// returns true if target string is found, false if timed out
|
||||
|
||||
bool find(char target) { return find (&target, 1); }
|
||||
|
||||
bool findUntil(char *target, char *terminator); // as find but search ends if the terminator string is found
|
||||
bool findUntil(uint8_t *target, char *terminator) { return findUntil((char *)target, terminator); }
|
||||
|
||||
|
@ -97,6 +100,16 @@ class Stream : public Print
|
|||
// this allows format characters (typically commas) in values to be ignored
|
||||
|
||||
float parseFloat(char skipChar); // as above but the given skipChar is ignored
|
||||
|
||||
struct MultiTarget {
|
||||
const char *str; // string you're searching for
|
||||
size_t len; // length of string you're searching for
|
||||
size_t index; // index used by the search routine.
|
||||
};
|
||||
|
||||
// This allows you to search for an arbitrary number of strings.
|
||||
// Returns index of the target that is found first or -1 if timeout occurs.
|
||||
int findMulti(struct MultiTarget *targets, int tCount);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -195,7 +195,7 @@ String & String::copy(const __FlashStringHelper *pstr, unsigned int length)
|
|||
void String::move(String &rhs)
|
||||
{
|
||||
if (buffer) {
|
||||
if (capacity >= rhs.len) {
|
||||
if (rhs && capacity >= rhs.len) {
|
||||
strcpy(buffer, rhs.buffer);
|
||||
len = rhs.len;
|
||||
rhs.len = 0;
|
||||
|
|
|
@ -161,6 +161,10 @@ public:
|
|||
void toCharArray(char *buf, unsigned int bufsize, unsigned int index=0) const
|
||||
{getBytes((unsigned char *)buf, bufsize, index);}
|
||||
const char * c_str() const { return buffer; }
|
||||
char* begin() { return buffer; }
|
||||
char* end() { return buffer + length(); }
|
||||
const char* begin() const { return c_str(); }
|
||||
const char* end() const { return c_str() + length(); }
|
||||
|
||||
// search
|
||||
int indexOf( char ch ) const;
|
||||
|
|
|
@ -160,4 +160,6 @@ uint16 analogRead(uint8 pin);
|
|||
*/
|
||||
void shiftOut(uint8 dataPin, uint8 clockPin, uint8 bitOrder, uint8 value);
|
||||
|
||||
uint32 shiftIn( uint32 ulDataPin, uint32 ulClockPin, uint32 ulBitOrder );
|
||||
|
||||
#endif
|
||||
|
|
|
@ -261,18 +261,28 @@ static ONE_DESCRIPTOR String_Descriptor[N_STRING_DESCRIPTORS] = {
|
|||
|
||||
/* I/O state */
|
||||
|
||||
#define CDC_SERIAL_BUFFER_SIZE 512
|
||||
#define CDC_SERIAL_RX_BUFFER_SIZE 256 // must be power of 2
|
||||
#define CDC_SERIAL_RX_BUFFER_SIZE_MASK (CDC_SERIAL_RX_BUFFER_SIZE-1)
|
||||
|
||||
/* Received data */
|
||||
static volatile uint8 vcomBufferRx[CDC_SERIAL_BUFFER_SIZE];
|
||||
/* Read index into vcomBufferRx */
|
||||
static volatile uint32 rx_offset = 0;
|
||||
/* Number of bytes left to transmit */
|
||||
static volatile uint32 n_unsent_bytes = 0;
|
||||
/* Are we currently sending an IN packet? */
|
||||
static volatile uint8 transmitting = 0;
|
||||
/* Number of unread bytes */
|
||||
static volatile uint32 n_unread_bytes = 0;
|
||||
static volatile uint8 vcomBufferRx[CDC_SERIAL_RX_BUFFER_SIZE];
|
||||
/* Write index to vcomBufferRx */
|
||||
static volatile uint32 rx_head;
|
||||
/* Read index from vcomBufferRx */
|
||||
static volatile uint32 rx_tail;
|
||||
|
||||
#define CDC_SERIAL_TX_BUFFER_SIZE 256 // must be power of 2
|
||||
#define CDC_SERIAL_TX_BUFFER_SIZE_MASK (CDC_SERIAL_TX_BUFFER_SIZE-1)
|
||||
// Tx data
|
||||
static volatile uint8 vcomBufferTx[CDC_SERIAL_TX_BUFFER_SIZE];
|
||||
// Write index to vcomBufferTx
|
||||
static volatile uint32 tx_head;
|
||||
// Read index from vcomBufferTx
|
||||
static volatile uint32 tx_tail;
|
||||
// Are we currently sending an IN packet?
|
||||
static volatile int8 transmitting;
|
||||
|
||||
|
||||
|
||||
/* Other state (line coding, DTR/RTS) */
|
||||
|
||||
|
@ -393,30 +403,34 @@ void usb_cdcacm_putc(char ch) {
|
|||
;
|
||||
}
|
||||
|
||||
/* This function is blocking.
|
||||
/* This function is non-blocking.
|
||||
*
|
||||
* It copies data from a usercode buffer into the USB peripheral TX
|
||||
* It copies data from a user buffer into the USB peripheral TX
|
||||
* buffer, and returns the number of bytes copied. */
|
||||
uint32 usb_cdcacm_tx(const uint8* buf, uint32 len) {
|
||||
/* Last transmission hasn't finished, so abort. */
|
||||
while ( usb_cdcacm_is_transmitting()>0 ) ; // wait for end of transmission
|
||||
uint32 usb_cdcacm_tx(const uint8* buf, uint32 len)
|
||||
{
|
||||
if (len==0) return 0; // no data to send
|
||||
|
||||
/* We can only put USB_CDCACM_TX_EPSIZE bytes in the buffer. */
|
||||
if (len > USB_CDCACM_TX_EPSIZE) {
|
||||
len = USB_CDCACM_TX_EPSIZE;
|
||||
}
|
||||
uint32 head = tx_head; // load volatile variable
|
||||
uint32 tx_unsent = (head - tx_tail) & CDC_SERIAL_TX_BUFFER_SIZE_MASK;
|
||||
|
||||
/* Queue bytes for sending. */
|
||||
if (len) {
|
||||
usb_copy_to_pma(buf, len, USB_CDCACM_TX_ADDR);
|
||||
// We can only put bytes in the buffer if there is place
|
||||
if (len > (CDC_SERIAL_TX_BUFFER_SIZE-tx_unsent-1) ) {
|
||||
len = (CDC_SERIAL_TX_BUFFER_SIZE-tx_unsent-1);
|
||||
}
|
||||
// We still need to wait for the interrupt, even if we're sending
|
||||
// zero bytes. (Sending zero-size packets is useful for flushing
|
||||
// host-side buffers.)
|
||||
usb_set_ep_tx_count(USB_CDCACM_TX_ENDP, len);
|
||||
n_unsent_bytes = len;
|
||||
transmitting = 1;
|
||||
usb_set_ep_tx_stat(USB_CDCACM_TX_ENDP, USB_EP_STAT_TX_VALID);
|
||||
if (len==0) return 0; // buffer full
|
||||
|
||||
uint16 i;
|
||||
// copy data from user buffer to USB Tx buffer
|
||||
for (i=0; i<len; i++) {
|
||||
vcomBufferTx[head] = buf[i];
|
||||
head = (head+1) & CDC_SERIAL_TX_BUFFER_SIZE_MASK;
|
||||
}
|
||||
tx_head = head; // store volatile variable
|
||||
|
||||
if (transmitting<0) {
|
||||
vcomDataTxCb(); // initiate data transmission
|
||||
}
|
||||
|
||||
return len;
|
||||
}
|
||||
|
@ -424,69 +438,73 @@ uint32 usb_cdcacm_tx(const uint8* buf, uint32 len) {
|
|||
|
||||
|
||||
uint32 usb_cdcacm_data_available(void) {
|
||||
return n_unread_bytes;
|
||||
return (rx_head - rx_tail) & CDC_SERIAL_RX_BUFFER_SIZE_MASK;
|
||||
}
|
||||
|
||||
uint8 usb_cdcacm_is_transmitting(void) {
|
||||
return transmitting;
|
||||
return ( transmitting>0 ? transmitting : 0);
|
||||
}
|
||||
|
||||
uint16 usb_cdcacm_get_pending(void) {
|
||||
return n_unsent_bytes;
|
||||
return (tx_head - tx_tail) & CDC_SERIAL_TX_BUFFER_SIZE_MASK;
|
||||
}
|
||||
|
||||
/* Nonblocking byte receive.
|
||||
/* Non-blocking byte receive.
|
||||
*
|
||||
* Copies up to len bytes from our private data buffer (*NOT* the PMA)
|
||||
* into buf and deq's the FIFO. */
|
||||
uint32 usb_cdcacm_rx(uint8* buf, uint32 len) {
|
||||
uint32 usb_cdcacm_rx(uint8* buf, uint32 len)
|
||||
{
|
||||
/* Copy bytes to buffer. */
|
||||
uint32 n_copied = usb_cdcacm_peek(buf, len);
|
||||
|
||||
/* Mark bytes as read. */
|
||||
n_unread_bytes -= n_copied;
|
||||
rx_offset = (rx_offset + n_copied) % CDC_SERIAL_BUFFER_SIZE;
|
||||
uint16 tail = rx_tail; // load volatile variable
|
||||
tail = (tail + n_copied) & CDC_SERIAL_RX_BUFFER_SIZE_MASK;
|
||||
rx_tail = tail; // store volatile variable
|
||||
|
||||
/* If all bytes have been read, re-enable the RX endpoint, which
|
||||
* was set to NAK when the current batch of bytes was received. */
|
||||
if (n_unread_bytes == 0) {
|
||||
usb_set_ep_rx_count(USB_CDCACM_RX_ENDP, USB_CDCACM_RX_EPSIZE);
|
||||
uint32 rx_unread = (rx_head - tail) & CDC_SERIAL_RX_BUFFER_SIZE_MASK;
|
||||
// If buffer was emptied to a pre-set value, re-enable the RX endpoint
|
||||
if ( rx_unread <= 64 ) { // experimental value, gives the best performance
|
||||
usb_set_ep_rx_stat(USB_CDCACM_RX_ENDP, USB_EP_STAT_RX_VALID);
|
||||
}
|
||||
|
||||
}
|
||||
return n_copied;
|
||||
}
|
||||
|
||||
/* Nonblocking byte lookahead.
|
||||
/* Non-blocking byte lookahead.
|
||||
*
|
||||
* Looks at unread bytes without marking them as read. */
|
||||
uint32 usb_cdcacm_peek(uint8* buf, uint32 len) {
|
||||
uint32 usb_cdcacm_peek(uint8* buf, uint32 len)
|
||||
{
|
||||
int i;
|
||||
uint32 head = rx_offset;
|
||||
uint32 tail = rx_tail;
|
||||
uint32 rx_unread = (rx_head-tail) & CDC_SERIAL_RX_BUFFER_SIZE_MASK;
|
||||
|
||||
if (len > n_unread_bytes) {
|
||||
len = n_unread_bytes;
|
||||
if (len > rx_unread) {
|
||||
len = rx_unread;
|
||||
}
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
buf[i] = vcomBufferRx[head];
|
||||
head = (head + 1) % CDC_SERIAL_BUFFER_SIZE;
|
||||
buf[i] = vcomBufferRx[tail];
|
||||
tail = (tail + 1) & CDC_SERIAL_RX_BUFFER_SIZE_MASK;
|
||||
}
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
uint32 usb_cdcacm_peek_ex(uint8* buf, uint32 offset, uint32 len) {
|
||||
uint32 usb_cdcacm_peek_ex(uint8* buf, uint32 offset, uint32 len)
|
||||
{
|
||||
int i;
|
||||
uint32 head = (rx_offset + offset) % CDC_SERIAL_BUFFER_SIZE;
|
||||
uint32 tail = (rx_tail + offset) & CDC_SERIAL_RX_BUFFER_SIZE_MASK ;
|
||||
uint32 rx_unread = (rx_head-tail) & CDC_SERIAL_RX_BUFFER_SIZE_MASK;
|
||||
|
||||
if (len + offset > n_unread_bytes) {
|
||||
len = n_unread_bytes - offset;
|
||||
if (len + offset > rx_unread) {
|
||||
len = rx_unread - offset;
|
||||
}
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
buf[i] = vcomBufferRx[head];
|
||||
head = (head + 1) % CDC_SERIAL_BUFFER_SIZE;
|
||||
buf[i] = vcomBufferRx[tail];
|
||||
tail = (tail + 1) & CDC_SERIAL_RX_BUFFER_SIZE_MASK;
|
||||
}
|
||||
|
||||
return len;
|
||||
|
@ -495,12 +513,12 @@ uint32 usb_cdcacm_peek_ex(uint8* buf, uint32 offset, uint32 len) {
|
|||
/* Roger Clark. Added. for Arduino 1.0 API support of Serial.peek() */
|
||||
int usb_cdcacm_peek_char()
|
||||
{
|
||||
if (n_unread_bytes == 0)
|
||||
if (usb_cdcacm_data_available() == 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
return vcomBufferRx[rx_offset];
|
||||
return vcomBufferRx[rx_tail];
|
||||
}
|
||||
|
||||
uint8 usb_cdcacm_get_dtr() {
|
||||
|
@ -534,41 +552,75 @@ int usb_cdcacm_get_n_data_bits(void) {
|
|||
return line_coding.bDataBits;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Callbacks
|
||||
*/
|
||||
|
||||
static void vcomDataTxCb(void) {
|
||||
n_unsent_bytes = 0;
|
||||
transmitting = 0;
|
||||
static void vcomDataTxCb(void)
|
||||
{
|
||||
uint32 tail = tx_tail; // load volatile variable
|
||||
uint32 tx_unsent = (tx_head - tail) & CDC_SERIAL_TX_BUFFER_SIZE_MASK;
|
||||
if (tx_unsent==0) {
|
||||
if ( (--transmitting)==0) goto flush; // no more data to send
|
||||
return; // it was already flushed, keep Tx endpoint disabled
|
||||
}
|
||||
transmitting = 1;
|
||||
// We can only send up to USB_CDCACM_TX_EPSIZE bytes in the endpoint.
|
||||
if (tx_unsent > USB_CDCACM_TX_EPSIZE) {
|
||||
tx_unsent = USB_CDCACM_TX_EPSIZE;
|
||||
}
|
||||
// copy the bytes from USB Tx buffer to PMA buffer
|
||||
uint32 *dst = usb_pma_ptr(USB_CDCACM_TX_ADDR);
|
||||
uint16 tmp = 0;
|
||||
uint16 val;
|
||||
int i;
|
||||
for (i = 0; i < tx_unsent; i++) {
|
||||
val = vcomBufferTx[tail];
|
||||
tail = (tail + 1) & CDC_SERIAL_TX_BUFFER_SIZE_MASK;
|
||||
if (i&1) {
|
||||
*dst++ = tmp | (val<<8);
|
||||
} else {
|
||||
tmp = val;
|
||||
}
|
||||
}
|
||||
if ( tx_unsent&1 ) {
|
||||
*dst = tmp;
|
||||
}
|
||||
tx_tail = tail; // store volatile variable
|
||||
flush:
|
||||
// enable Tx endpoint
|
||||
usb_set_ep_tx_count(USB_CDCACM_TX_ENDP, tx_unsent);
|
||||
usb_set_ep_tx_stat(USB_CDCACM_TX_ENDP, USB_EP_STAT_TX_VALID);
|
||||
}
|
||||
|
||||
static void vcomDataRxCb(void) {
|
||||
uint32 ep_rx_size;
|
||||
uint32 tail = (rx_offset + n_unread_bytes) % CDC_SERIAL_BUFFER_SIZE;
|
||||
uint8 ep_rx_data[USB_CDCACM_RX_EPSIZE];
|
||||
|
||||
static void vcomDataRxCb(void)
|
||||
{
|
||||
uint32 head = rx_head; // load volatile variable
|
||||
|
||||
uint32 ep_rx_size = usb_get_ep_rx_count(USB_CDCACM_RX_ENDP);
|
||||
// This copy won't overwrite unread bytes as long as there is
|
||||
// enough room in the USB Rx buffer for next packet
|
||||
uint32 *src = usb_pma_ptr(USB_CDCACM_RX_ADDR);
|
||||
uint16 tmp = 0;
|
||||
uint8 val;
|
||||
uint32 i;
|
||||
|
||||
usb_set_ep_rx_stat(USB_CDCACM_RX_ENDP, USB_EP_STAT_RX_NAK);
|
||||
ep_rx_size = usb_get_ep_rx_count(USB_CDCACM_RX_ENDP);
|
||||
/* This copy won't overwrite unread bytes, since we've set the RX
|
||||
* endpoint to NAK, and will only set it to VALID when all bytes
|
||||
* have been read. */
|
||||
usb_copy_from_pma((uint8*)ep_rx_data, ep_rx_size,
|
||||
USB_CDCACM_RX_ADDR);
|
||||
|
||||
for (i = 0; i < ep_rx_size; i++) {
|
||||
vcomBufferRx[tail] = ep_rx_data[i];
|
||||
tail = (tail + 1) % CDC_SERIAL_BUFFER_SIZE;
|
||||
if (i&1) {
|
||||
val = tmp>>8;
|
||||
} else {
|
||||
tmp = *src++;
|
||||
val = tmp&0xFF;
|
||||
}
|
||||
vcomBufferRx[head] = val;
|
||||
head = (head + 1) & CDC_SERIAL_RX_BUFFER_SIZE_MASK;
|
||||
}
|
||||
rx_head = head; // store volatile variable
|
||||
|
||||
n_unread_bytes += ep_rx_size;
|
||||
|
||||
if ( n_unread_bytes == 0 ) {
|
||||
usb_set_ep_rx_count(USB_CDCACM_RX_ENDP, USB_CDCACM_RX_EPSIZE);
|
||||
usb_set_ep_rx_stat(USB_CDCACM_RX_ENDP, USB_EP_STAT_RX_VALID);
|
||||
}
|
||||
uint32 rx_unread = (head - rx_tail) & CDC_SERIAL_RX_BUFFER_SIZE_MASK;
|
||||
// only enable further Rx if there is enough room to receive one more packet
|
||||
if ( rx_unread < (CDC_SERIAL_RX_BUFFER_SIZE-USB_CDCACM_RX_EPSIZE) ) {
|
||||
usb_set_ep_rx_stat(USB_CDCACM_RX_ENDP, USB_EP_STAT_RX_VALID);
|
||||
}
|
||||
|
||||
if (rx_hook) {
|
||||
rx_hook(USB_CDCACM_HOOK_RX, 0);
|
||||
|
@ -646,10 +698,11 @@ static void usbReset(void) {
|
|||
SetDeviceAddress(0);
|
||||
|
||||
/* Reset the RX/TX state */
|
||||
n_unread_bytes = 0;
|
||||
n_unsent_bytes = 0;
|
||||
rx_offset = 0;
|
||||
transmitting = 0;
|
||||
rx_head = 0;
|
||||
rx_tail = 0;
|
||||
tx_head = 0;
|
||||
tx_tail = 0;
|
||||
transmitting = -1;
|
||||
}
|
||||
|
||||
static RESULT usbDataSetup(uint8 request) {
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
/* TODO these could use some improvement; they're fairly
|
||||
* straightforward ports of the analogous ST code. The PMA blit
|
||||
* routines in particular are obvious targets for performance
|
||||
* measurement and tuning. */
|
||||
* measurement and tuning.
|
||||
|
||||
void usb_copy_to_pma(const uint8 *buf, uint16 len, uint16 pma_offset) {
|
||||
uint16 *dst = (uint16*)usb_pma_ptr(pma_offset);
|
||||
|
@ -57,7 +57,7 @@ void usb_copy_from_pma(uint8 *buf, uint16 len, uint16 pma_offset) {
|
|||
*dst = *src & 0xFF;
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
static void usb_set_ep_rx_count_common(uint32 *rxc, uint16 count) {
|
||||
uint16 nblocks;
|
||||
if (count > 62) {
|
||||
|
@ -76,12 +76,12 @@ static void usb_set_ep_rx_count_common(uint32 *rxc, uint16 count) {
|
|||
*rxc = nblocks << 10;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
void usb_set_ep_rx_buf0_count(uint8 ep, uint16 count) {
|
||||
uint32 *rxc = usb_ep_rx_buf0_count_ptr(ep);
|
||||
usb_set_ep_rx_count_common(rxc, count);
|
||||
}
|
||||
|
||||
*/
|
||||
void usb_set_ep_rx_count(uint8 ep, uint16 count) {
|
||||
uint32 *rxc = usb_ep_rx_count_ptr(ep);
|
||||
usb_set_ep_rx_count_common(rxc, count);
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
Copyright (c) 2014 Arduino. All right reserved.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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 Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
void *operator new(size_t size) {
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
void *operator new[](size_t size) {
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
void operator delete(void * ptr) {
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
void operator delete[](void * ptr) {
|
||||
free(ptr);
|
||||
}
|
||||
|
|
@ -0,0 +1,203 @@
|
|||
///////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// tone(pin,frequency[,duration]) generate a tone on a given pin
|
||||
//
|
||||
// noTone(pin) switch off the tone on the pin
|
||||
//
|
||||
// setToneTimerChannel(timer,channel) force use of given timer/channel
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "Arduino.h"
|
||||
#include <HardwareTimer.h>
|
||||
|
||||
|
||||
#define PinTimer(pin) (PIN_MAP[pin].timer_device->clk_id-RCC_TIMER1+1)
|
||||
#define PinChannel(pin) (PIN_MAP[pin].timer_channel)
|
||||
|
||||
// if USE_PIN_TIMER is set, the PWM timer/channel is used for PWM pins
|
||||
#define USE_PIN_TIMER
|
||||
|
||||
// if USE_BSRR is set the tone pin will be written via the fast BSRR register
|
||||
// instead of using the slow digitalWrite() function in the interrupt handler
|
||||
#define USE_BSRR
|
||||
|
||||
// construct static timer array (
|
||||
|
||||
|
||||
#ifdef STM32_HIGH_DENSITY
|
||||
// define default timer and channel
|
||||
#ifndef TONE_TIMER
|
||||
#define TONE_TIMER 8
|
||||
#endif
|
||||
#ifndef TONE_CHANNEL
|
||||
#define TONE_CHANNEL 8
|
||||
#endif
|
||||
|
||||
HardwareTimer TTimer1(1), TTimer2(2), TTimer3(3), TTimer4(4),TTimer5(5), TTimer6(6), TTimer7(7), TTimer8(8);
|
||||
HardwareTimer *TTimer[8] = { &TTimer1,&TTimer2,&TTimer3,&TTimer4,&TTimer5,&TTimer6,&TTimer7,&TTimer8 };
|
||||
#else
|
||||
// define default timer and channel
|
||||
#ifndef TONE_TIMER
|
||||
#define TONE_TIMER 4
|
||||
#endif
|
||||
#ifndef TONE_CHANNEL
|
||||
#define TONE_CHANNEL 4
|
||||
#endif
|
||||
|
||||
HardwareTimer TTimer1(1), TTimer2(2), TTimer3(3), TTimer4(4);
|
||||
HardwareTimer *TTimer[4] = { &TTimer1,&TTimer2,&TTimer3,&TTimer4 };
|
||||
#endif
|
||||
|
||||
|
||||
uint8_t tone_force_channel = 0; // forced timer channel
|
||||
uint8_t tone_force_ntimer = 0; // forced timer
|
||||
|
||||
HardwareTimer *tone_timer;// = TTimer[TONE_TIMER-1]; // timer used to generate frequency
|
||||
uint8_t tone_channel = TONE_CHANNEL; // timer channel used to generate frequency
|
||||
uint8_t tone_ntimer = TONE_TIMER; // timer used to generate frequency
|
||||
|
||||
bool tone_state = true; // last pin state for toggling
|
||||
short tone_pin = -1; // pin for outputting sound
|
||||
short tone_freq = 444; // tone frequency (0=pause)
|
||||
uint32_t tone_nhw = 0; // tone duration in number of half waves
|
||||
uint16_t tone_tcount = 0; // time between handler calls in 1/36 usec
|
||||
uint16_t tone_ncount = 0; // handler call between toggling
|
||||
uint16_t tone_n = 0; // remaining handler calls before toggling
|
||||
uint32_t tone_next = 0; // counter value of next interrupt
|
||||
|
||||
#ifdef USE_BSRR
|
||||
volatile uint32_t *tone_bsrr; // BSRR set register (lower 16 bits)
|
||||
uint32_t tone_smask=0; // BSRR set bitmask
|
||||
uint32_t tone_rmask=0; // BSRR reset bitmask
|
||||
#endif
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// timer hander for tone with no duration specified,
|
||||
// will keep going until noTone() is called
|
||||
void tone_handler_1(void) {
|
||||
tone_next += tone_tcount; // comparator value for next interrupt
|
||||
tone_timer->setCompare(tone_channel, tone_next); // and install it
|
||||
if(--tone_n == 0){
|
||||
tone_state = !tone_state; // toggle tone output
|
||||
|
||||
#ifdef USE_BSRR
|
||||
if(tone_state)
|
||||
*tone_bsrr = tone_smask;
|
||||
else
|
||||
*tone_bsrr = tone_rmask;
|
||||
#else
|
||||
digitalWrite(tone_pin,tone_state);// and output it
|
||||
#endif
|
||||
|
||||
tone_n = tone_ncount; // reset interrupt counter
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// timer hander for tone with a specified duration,
|
||||
// will stop automatically when duration time is up.
|
||||
void tone_handler_2(void) {
|
||||
tone_next += tone_tcount;
|
||||
tone_timer->setCompare(tone_channel, tone_next);
|
||||
if(--tone_n == 0){
|
||||
if(tone_freq>0){ // toggle pin
|
||||
tone_state = !tone_state;
|
||||
#ifdef USE_BSRR
|
||||
if(tone_state)
|
||||
*tone_bsrr = tone_smask;
|
||||
else
|
||||
*tone_bsrr = tone_rmask;
|
||||
#else
|
||||
digitalWrite(tone_pin,tone_state);// and output it
|
||||
#endif
|
||||
}
|
||||
tone_n = tone_ncount;
|
||||
if(!--tone_nhw){ // check if tone duration has finished
|
||||
tone_timer->pause(); // disable timer
|
||||
pinMode(tone_pin, INPUT); // disable tone pin
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// play a tone on given pin with given frequency and optional duration in msec
|
||||
void tone(uint32_t pin, uint32_t freq, uint32_t duration) {
|
||||
tone_pin = pin;
|
||||
|
||||
#ifdef USE_PIN_TIMER
|
||||
// if the pin has a PWM timer/channel, use it (unless the timer/channel are forced)
|
||||
if(PinChannel(tone_pin) && !tone_force_channel){
|
||||
tone_channel = PinChannel(tone_pin);
|
||||
tone_ntimer = PinTimer(tone_pin);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
// set timer and channel to default resp values forced with setToneTimerChannel
|
||||
tone_ntimer = tone_force_channel?tone_force_ntimer:TONE_TIMER;
|
||||
tone_channel = tone_force_channel?tone_force_channel:TONE_CHANNEL;
|
||||
}
|
||||
|
||||
tone_timer = TTimer[tone_ntimer-1];
|
||||
tone_freq = freq;
|
||||
tone_nhw = 0;
|
||||
tone_next = 0;
|
||||
|
||||
tone_timer->pause();
|
||||
|
||||
if(freq > 0 && duration >0 ){
|
||||
uint32_t count = (F_CPU/4)/freq; // timer counts per half wave
|
||||
tone_ncount = tone_n = (count>>16)+1; // number of 16-bit count chunk
|
||||
tone_tcount = count/tone_ncount; // size of count chunk
|
||||
if(duration > 0) // number of half waves to be generated
|
||||
tone_nhw = ((duration*(freq>0?freq:100))/1000)<<1;
|
||||
else // no duration specified, continuous sound until noTone() called
|
||||
tone_nhw = 0;
|
||||
|
||||
pinMode(tone_pin, PWM); // configure output pin
|
||||
pinMode(tone_pin, OUTPUT); // configure output pin
|
||||
|
||||
#ifdef USE_BSRR
|
||||
// Set up BSRR register values for fast ISR
|
||||
tone_bsrr = &((PIN_MAP[tone_pin].gpio_device)->regs->BSRR);
|
||||
tone_smask = (BIT(PIN_MAP[tone_pin].gpio_bit));
|
||||
tone_rmask = tone_smask<<16;
|
||||
#endif
|
||||
|
||||
// Set up an interrupt on given timer and channel
|
||||
tone_next = tone_tcount; // prepare channel compare register
|
||||
tone_timer->setMode(tone_channel,TIMER_OUTPUT_COMPARE);
|
||||
tone_timer->setCompare(tone_channel,tone_next);
|
||||
// attach corresponding handler routine
|
||||
tone_timer->attachInterrupt(tone_channel,tone_nhw?tone_handler_2:tone_handler_1);
|
||||
|
||||
// Refresh the tone timer
|
||||
tone_timer->refresh();
|
||||
|
||||
// Start the timer counting
|
||||
tone_timer->resume();
|
||||
|
||||
} else {
|
||||
|
||||
// detach handler routine
|
||||
tone_timer->detachInterrupt(tone_channel);
|
||||
// disactive pin by configuring it as input
|
||||
pinMode(tone_pin, INPUT);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// disable tone on specified pin, if any
|
||||
void noTone(uint32_t pin){
|
||||
tone(pin,0,0); // it's all handled in tone()
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// set timer and channel to some different value
|
||||
// must be called before calling tone() or after noTone() was called
|
||||
void setToneTimerChannel(uint8_t ntimer, uint8_t channel){
|
||||
tone_force_ntimer = ntimer;
|
||||
tone_force_channel = channel;
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
Copyright (c) 2015 Arduino LLC. All right reserved.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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 Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include "Arduino.h"
|
||||
|
||||
void tone(uint32_t _pin, uint32_t frequency, uint32_t duration = 0);
|
||||
void noTone(uint32_t _pin);
|
||||
|
||||
#endif
|
|
@ -100,44 +100,23 @@ size_t n = 0;
|
|||
|
||||
size_t USBSerial::write(const char *str) {
|
||||
size_t n = 0;
|
||||
this->write(str, strlen(str));
|
||||
this->write((const uint8*)str, strlen(str));
|
||||
return n;
|
||||
}
|
||||
|
||||
size_t USBSerial::write(const void *buf, uint32 len) {
|
||||
size_t USBSerial::write(const uint8 *buf, uint32 len)
|
||||
{
|
||||
size_t n = 0;
|
||||
if (!this->isConnected() || !buf) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32 txed = 0;
|
||||
uint32 old_txed = 0;
|
||||
uint32 start = millis();
|
||||
|
||||
uint32 sent = 0;
|
||||
|
||||
while (txed < len && (millis() - start < USB_TIMEOUT)) {
|
||||
sent = usb_cdcacm_tx((const uint8*)buf + txed, len - txed);
|
||||
txed += sent;
|
||||
if (old_txed != txed) {
|
||||
start = millis();
|
||||
}
|
||||
old_txed = txed;
|
||||
while (txed < len) {
|
||||
txed += usb_cdcacm_tx((const uint8*)buf + txed, len - txed);
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
// this code leads to a serious performance drop and appears to be
|
||||
// unnecessary - everything seems to work fine without, -jcw, 2015-11-05
|
||||
// see http://stm32duino.com/posting.php?mode=quote&f=3&p=7746
|
||||
if (sent == USB_CDCACM_TX_EPSIZE) {
|
||||
while (usb_cdcacm_is_transmitting() != 0) {
|
||||
}
|
||||
/* flush out to avoid having the pc wait for more data */
|
||||
usb_cdcacm_tx(NULL, 0);
|
||||
}
|
||||
#endif
|
||||
return n;
|
||||
return n;
|
||||
}
|
||||
|
||||
int USBSerial::available(void) {
|
||||
|
@ -168,14 +147,10 @@ void USBSerial::flush(void)
|
|||
return;
|
||||
}
|
||||
|
||||
uint32 USBSerial::read(void *buf, uint32 len) {
|
||||
if (!buf) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32 USBSerial::read(uint8 * buf, uint32 len) {
|
||||
uint32 rxed = 0;
|
||||
while (rxed < len) {
|
||||
rxed += usb_cdcacm_rx((uint8*)buf + rxed, len - rxed);
|
||||
rxed += usb_cdcacm_rx(buf + rxed, len - rxed);
|
||||
}
|
||||
|
||||
return rxed;
|
||||
|
|
|
@ -53,7 +53,7 @@ public:
|
|||
|
||||
virtual int available(void);// Changed to virtual
|
||||
|
||||
uint32 read(void *buf, uint32 len);
|
||||
uint32 read(uint8 * buf, uint32 len);
|
||||
// uint8 read(void);
|
||||
|
||||
// Roger Clark. added functions to support Arduino 1.0 API
|
||||
|
@ -65,7 +65,7 @@ public:
|
|||
|
||||
size_t write(uint8);
|
||||
size_t write(const char *str);
|
||||
size_t write(const void*, uint32);
|
||||
size_t write(const uint8*, uint32);
|
||||
|
||||
uint8 getRTS();
|
||||
uint8 getDTR();
|
||||
|
|
|
@ -76,6 +76,7 @@
|
|||
#include <stdint.h>
|
||||
|
||||
#include <WCharacter.h>
|
||||
#include <tone.h>
|
||||
|
||||
typedef unsigned int word;
|
||||
// typedef uint16 word;// definition from Arduino website, now appears to be incorrect for 32 bit devices
|
||||
|
|
|
@ -35,3 +35,28 @@ void shiftOut(uint8 dataPin, uint8 clockPin, uint8 bitOrder, uint8 value) {
|
|||
gpio_toggle_bit(PIN_MAP[clockPin].gpio_device, PIN_MAP[clockPin].gpio_bit);// togglePin(clockPin);
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t shiftIn( uint32_t ulDataPin, uint32_t ulClockPin, uint32_t ulBitOrder )
|
||||
{
|
||||
uint8_t value = 0 ;
|
||||
uint8_t i ;
|
||||
|
||||
|
||||
for ( i=0 ; i < 8 ; ++i )
|
||||
{
|
||||
digitalWrite( ulClockPin, HIGH ) ;
|
||||
|
||||
if ( ulBitOrder == LSBFIRST )
|
||||
{
|
||||
value |= digitalRead( ulDataPin ) << i ;
|
||||
}
|
||||
else
|
||||
{
|
||||
value |= digitalRead( ulDataPin ) << (7 - i) ;
|
||||
}
|
||||
|
||||
digitalWrite( ulClockPin, LOW ) ;
|
||||
}
|
||||
|
||||
return value ;
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ void setup_temperature_sensor() {
|
|||
// temperature sensor from power down mode. Do this first 'cause according to
|
||||
// the Datasheet section 5.3.21 it takes from 4 to 10 uS to power up the sensor.
|
||||
|
||||
regs->CR2 |= ADC_CR2_TSEREFE;
|
||||
regs->CR2 |= ADC_CR2_TSVREFE;
|
||||
|
||||
// 2. Select a sample time of 17.1 μs
|
||||
// set channel 16 sample time to 239.5 cycles
|
||||
|
|
|
@ -1,385 +0,0 @@
|
|||
/*
|
||||
ILI9341_due_gText.cpp - Used for rendering GLCD fonts on Arduino Due
|
||||
|
||||
Copyright (c) 2014 Marek Buriak
|
||||
|
||||
The library is based on GLCD library by Bill Perry and Michael Margolis:
|
||||
https://code.google.com/p/glcd-arduino
|
||||
|
||||
This file is part of the Arduino ILI9341_due library.
|
||||
Sources for this library can be found at https://github.com/marekburiak/ILI9341_Due.
|
||||
|
||||
Fonts .h files can be created with GLCDFontCreator2 (not the one MikroElektronika):
|
||||
https://code.google.com/p/glcd-arduino/downloads/detail?name=GLCDFontCreator2.zip&can=2&q=
|
||||
|
||||
|
||||
ILI9341_due is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 2.1 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ILI9341_due 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 Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with ILI9341_due. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef ILI9341_GTEXT_H
|
||||
#define ILI9341_GTEXT_H
|
||||
|
||||
//#include "WString.h"
|
||||
//#include "../Streaming/Streaming.h"
|
||||
#include "ILI9341_due.h"
|
||||
|
||||
#define INCLUDE_NOT_WORKING_YET 0
|
||||
|
||||
#define GTEXT_VERSION 1 // software version of this code
|
||||
|
||||
// Font Indices
|
||||
#define GTEXT_FONT_LENGTH 0
|
||||
#define GTEXT_FONT_FIXED_WIDTH 2
|
||||
#define GTEXT_FONT_HEIGHT 3
|
||||
#define GTEXT_FONT_FIRST_CHAR 4
|
||||
#define GTEXT_FONT_CHAR_COUNT 5
|
||||
#define GTEXT_FONT_WIDTH_TABLE 6
|
||||
|
||||
#define GTEXT_DRAW_DIRECTION_RIGHT 0
|
||||
#define GTEXT_DRAW_DIRECTION_DOWN 1
|
||||
#define GTEXT_DRAW_DIRECTION_LEFT 2
|
||||
#define GTEXT_DRAW_DIRECTION_UP 3
|
||||
|
||||
typedef enum {
|
||||
gTextFontMode_Solid = 0,
|
||||
gTextFontMode_Transparent = 1
|
||||
} gTextFontMode;
|
||||
|
||||
|
||||
// the following returns true if the given font is fixed width
|
||||
// zero length is flag indicating fixed width font (array does not contain width data entries)
|
||||
#define isFixedWidthFont(font) (pgm_read_byte(font+GTEXT_FONT_LENGTH) == 0 && pgm_read_byte(font+GTEXT_FONT_LENGTH+1) == 0))
|
||||
|
||||
/*
|
||||
* Coodinates for predefined areas are compressed into a single 32 bit token.
|
||||
*
|
||||
* This works as the coordinates are cuurenly only 8 bit values.
|
||||
*
|
||||
* This allows the creatation of an unlmited number of predefined areas with zero code or
|
||||
* data space overhead.
|
||||
*
|
||||
* A macro is used to create the tokens from a set of x1,y1 x2,y2 coordinates.
|
||||
*
|
||||
* A union is used to extract the coordinates from the 32 bit token.
|
||||
*
|
||||
* WARNING:
|
||||
* This is non portable code in that it will only work on little endian processors.
|
||||
* If you use big endian you have to switch the byte ordering in the union.
|
||||
*/
|
||||
|
||||
#define MK_TareaToken(x1, y1, x2, y2) \
|
||||
(uint32_t) (((uint32_t) (x1) << 24) | ((uint32_t)(y1) << 16) | ((uint32_t)(x2) << 8) | (uint32_t)(y2))
|
||||
|
||||
/// @cond hide_from_doxygen
|
||||
typedef union
|
||||
{
|
||||
struct
|
||||
{
|
||||
uint8_t y2;
|
||||
uint8_t x2;
|
||||
uint8_t y1;
|
||||
uint8_t x1;
|
||||
}coord;
|
||||
|
||||
uint32_t token; // swap byte order above for big endian
|
||||
|
||||
}TareaToken;
|
||||
/// @endcond
|
||||
|
||||
typedef uint8_t textMode; // type holding mode for scrolling and future attributes like padding etc.
|
||||
// the only textMode supported in the current release is scrolling
|
||||
|
||||
const textMode SCROLL_UP = 0;
|
||||
const textMode SCROLL_DOWN = 1; // this was changed from -1 so it can used in a bitmask
|
||||
const textMode DEFAULT_SCROLLDIR = SCROLL_UP;
|
||||
|
||||
/**
|
||||
* @defgroup glcd_enum GLCD enumerations
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ingroup glcd_enum
|
||||
* @hideinitializer
|
||||
* @brief Pre Defined Text areas
|
||||
*
|
||||
* These enumerations are used to easily define text areas
|
||||
* using predefined display areas.\n
|
||||
* They are used with the
|
||||
* \ref gText::DefineArea(predefinedArea selection, textMode mode) "DefineArea()" function call.
|
||||
*/
|
||||
typedef enum {
|
||||
|
||||
//textAreaFULL = MK_TareaToken( 0, 0, DISPLAY_WIDTH -1, DISPLAY_HEIGHT -1 ),
|
||||
///**<Entire GLCD display */
|
||||
|
||||
//textAreaTOP = MK_TareaToken( 0, 0, DISPLAY_WIDTH -1, DISPLAY_HEIGHT/2 -1 ),
|
||||
///**<Top half of GLCD display */
|
||||
|
||||
//textAreaBOTTOM = MK_TareaToken( 0, DISPLAY_HEIGHT/2, DISPLAY_WIDTH -1, DISPLAY_HEIGHT -1 ),
|
||||
///**<Bottom half of GLCD display */
|
||||
|
||||
//textAreaLEFT = MK_TareaToken( 0, 0, DISPLAY_WIDTH/2 -1, DISPLAY_HEIGHT -1 ),
|
||||
///**<Left side of GLCD display */
|
||||
|
||||
//textAreaRIGHT = MK_TareaToken( DISPLAY_WIDTH/2, 0, DISPLAY_WIDTH -1, DISPLAY_HEIGHT -1 ),
|
||||
///**<Right side of GLCD display */
|
||||
|
||||
//textAreaTOPLEFT = MK_TareaToken( 0, 0, DISPLAY_WIDTH/2 -1, DISPLAY_HEIGHT/2 -1 ),
|
||||
///**<Upper left quarter of GLCD display */
|
||||
|
||||
//textAreaTOPRIGHT = MK_TareaToken( DISPLAY_WIDTH/2, 0, DISPLAY_WIDTH -1, DISPLAY_HEIGHT/2 -1 ),
|
||||
///**<Upper right quarter of GLCD display */
|
||||
|
||||
//textAreaBOTTOMLEFT = MK_TareaToken( 0, DISPLAY_HEIGHT/2, DISPLAY_WIDTH/2 -1, DISPLAY_HEIGHT -1 ),
|
||||
///**<Buttom left quarter of GLCD display */
|
||||
|
||||
//textAreaBOTTOMRIGHT = MK_TareaToken( DISPLAY_WIDTH/2, DISPLAY_HEIGHT/2, DISPLAY_WIDTH -1, DISPLAY_HEIGHT -1 )
|
||||
///**<Bottom right quarter of GLCD display */
|
||||
|
||||
} predefinedArea;
|
||||
|
||||
|
||||
typedef enum {
|
||||
gTextAlignTopLeft,
|
||||
gTextAlignTopCenter,
|
||||
gTextAlignTopRight,
|
||||
gTextAlignMiddleLeft,
|
||||
gTextAlignMiddleCenter,
|
||||
gTextAlignMiddleRight,
|
||||
gTextAlignBottomLeft,
|
||||
gTextAlignBottomCenter,
|
||||
gTextAlignBottomRight
|
||||
} gTextAlign;
|
||||
|
||||
typedef enum {
|
||||
gTextPivotDefault,
|
||||
gTextPivotTopLeft,
|
||||
gTextPivotTopCenter,
|
||||
gTextPivotTopRight,
|
||||
gTextPivotMiddleLeft,
|
||||
gTextPivotMiddleCenter,
|
||||
gTextPivotMiddleRight,
|
||||
gTextPivotBottomLeft,
|
||||
gTextPivotBottomCenter,
|
||||
gTextPivotBottomRight
|
||||
} gTextPivot;
|
||||
|
||||
|
||||
/*
|
||||
* enums for ansi style erase function
|
||||
* These values match the ANSI EraseInLine terminal primitive: CSI n K
|
||||
*/
|
||||
/**
|
||||
* @ingroup glcd_enum
|
||||
* @hideinitializer
|
||||
* @brief Erase line options
|
||||
* @details
|
||||
* These enumerations are used with the
|
||||
* \ref gText::EraseTextLine( eraseLine_t type) "EraseTextLine()" function call.\n
|
||||
* They provide similar functionality to the
|
||||
* ANSI EraseInLine terminal primitive: CSI n K
|
||||
*
|
||||
*/
|
||||
typedef enum {
|
||||
gTextEraseToEOL = 0x01, /**< Erase From cursor to end of Line */
|
||||
gTextEraseFromBOL = 0x02, /**< Erase From Begining of Line to Cursor*/
|
||||
gTextEraseFullLine = 0x03 /**< Erase Entire line */
|
||||
} gTextEraseLine;
|
||||
|
||||
typedef const uint8_t* gTextFont;
|
||||
//typedef uint8_t (*FontCallback)(gTextFont);
|
||||
|
||||
|
||||
//static glcd_Device *device; // static pointer to the device instance
|
||||
|
||||
/// @cond hide_from_doxygen
|
||||
typedef struct _area
|
||||
{
|
||||
uint16_t x1;
|
||||
uint16_t y1;
|
||||
uint16_t x2;
|
||||
uint16_t y2;
|
||||
int8_t mode;
|
||||
} area;
|
||||
/// @endcond
|
||||
|
||||
/**
|
||||
* @class gText
|
||||
* @brief Functions for Text Areas
|
||||
* @details
|
||||
* A text area acts like a terminal monitor and text output is displayed
|
||||
* within the confines of a rectangle given in the DefineArea command.
|
||||
* All of the following text area functions operate on a user defined text area.
|
||||
*/
|
||||
|
||||
// graphical device text routines
|
||||
class ILI9341_due_gText : public Print
|
||||
{
|
||||
private:
|
||||
ILI9341_due *_ili;
|
||||
//FontCallback ucg_pgm_read; // now static, move back here if each instance needs its own callback
|
||||
uint16_t _fontColor;
|
||||
uint16_t _fontBgColor;
|
||||
gTextFont _font;
|
||||
area _area;
|
||||
int16_t _x;
|
||||
int16_t _y;
|
||||
uint8_t _scale;
|
||||
uint8_t _letterSpacing;
|
||||
bool _isLastChar;
|
||||
uint8_t _fontMode;
|
||||
|
||||
#ifndef GLCD_NODEFER_SCROLL
|
||||
uint8_t _needScroll; // set when text scroll has been defered
|
||||
#endif
|
||||
void specialChar(uint8_t c);
|
||||
void drawSolidChar(char c, uint16_t index, uint16_t charWidth, uint16_t charHeight);
|
||||
void drawTransparentChar(char c, uint16_t index, uint16_t charWidth, uint16_t charHeight);
|
||||
// Scroll routines are private for now
|
||||
void ScrollUp(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2, uint8_t pixels, uint8_t color);
|
||||
void ScrollDown(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2, uint8_t pixels, uint8_t color);
|
||||
void applyPivot(char *str, gTextPivot pivot);
|
||||
|
||||
public:
|
||||
ILI9341_due_gText(ILI9341_due *ili); // default - uses the entire display
|
||||
ILI9341_due_gText(ILI9341_due *ili, int16_t x1, int16_t y1, int16_t x2, int16_t y2); //, textMode mode=DEFAULT_SCROLLDIR);
|
||||
|
||||
ILI9341_due_gText(ILI9341_due *ili, int16_t x1, int16_t y1, int16_t columns, int16_t rows, gTextFont font); //, textMode mode=DEFAULT_SCROLLDIR);
|
||||
|
||||
|
||||
bool defineArea(int16_t x1, int16_t y1, int16_t x2, int16_t y2); //, textMode mode=DEFAULT_SCROLLDIR);
|
||||
bool defineArea(int16_t x1, int16_t y1, int16_t columns, int16_t rows, gTextFont font); //, textMode mode=DEFAULT_SCROLLDIR);
|
||||
void clearArea(uint16_t color);
|
||||
|
||||
// Font Functions
|
||||
void selectFont(gTextFont font);
|
||||
void selectFont(gTextFont font, uint16_t color);
|
||||
void selectFont(gTextFont font, uint16_t color, uint16_t backgroundColor);
|
||||
void setFontColor(uint16_t color);
|
||||
void setFontColor(uint8_t R, uint8_t G, uint8_t B);
|
||||
void setFontColor(uint16_t color, uint16_t backgroundColor);
|
||||
void setFontColor(uint8_t R, uint8_t G, uint8_t B, uint8_t bgR, uint8_t bgG, uint8_t bgB);
|
||||
void setFontLetterSpacing(uint8_t letterSpacing);
|
||||
uint8_t getFontLetterSpacing() {
|
||||
return _letterSpacing;
|
||||
};
|
||||
void setFontMode(gTextFontMode fontMode);
|
||||
|
||||
int putChar(uint8_t c);
|
||||
void puts(char *str);
|
||||
void puts(const String &str); // for Arduino String Class
|
||||
void puts_P(PGM_P str);
|
||||
|
||||
|
||||
void drawString(String &str, int16_t x, int16_t y); // for Arduino String class
|
||||
void drawString_P(PGM_P str, int16_t x, int16_t y);
|
||||
|
||||
void drawString(char *str, int16_t x, int16_t y);
|
||||
void drawString(char *str, int16_t x, int16_t y, gTextEraseLine eraseLine);
|
||||
void drawString(char *str, int16_t x, int16_t y, uint16_t pixelsClearedOnLeft, uint16_t pixelsClearedOnRight);
|
||||
void drawString(char *str, gTextAlign align);
|
||||
void drawString(char *str, gTextAlign align, gTextEraseLine eraseLine);
|
||||
void drawString(char *str, gTextAlign align, uint16_t pixelsClearedOnLeft, uint16_t pixelsClearedOnRight);
|
||||
|
||||
void drawStringOffseted(char *str, gTextAlign align, uint16_t offsetX, uint16_t offsetY);
|
||||
void drawStringOffseted(char *str, gTextAlign align, uint16_t offsetX, uint16_t offsetY, gTextEraseLine eraseLine);
|
||||
void drawStringOffseted(char *str, gTextAlign align, uint16_t offsetX, uint16_t offsetY, uint16_t pixelsClearedOnLeft, uint16_t pixelsClearedOnRight);
|
||||
|
||||
void drawStringPivoted(char *str, int16_t x, int16_t y, gTextPivot pivot);
|
||||
void drawStringPivoted(char *str, gTextAlign align, gTextPivot pivot);
|
||||
void drawStringPivoted(char *str, gTextAlign align, gTextPivot pivot, gTextEraseLine eraseLine);
|
||||
void drawStringPivoted(char *str, gTextAlign align, gTextPivot pivot, uint16_t pixelsClearedOnLeft, uint16_t pixelsClearedOnRight);
|
||||
|
||||
void drawStringPivotedOffseted(char *str, gTextAlign align, gTextPivot pivot, uint16_t offsetX, uint16_t offsetY);
|
||||
void drawStringPivotedOffseted(char *str, gTextAlign align, gTextPivot pivot, uint16_t offsetX, uint16_t offsetY, gTextEraseLine eraseLine);
|
||||
void drawStringPivotedOffseted(char *str, gTextAlign align, gTextPivot pivot, uint16_t offsetX, uint16_t offsetY, uint16_t pixelsClearedOnLeft, uint16_t pixelsClearedOnRight);
|
||||
|
||||
size_t write(uint8_t c); // character output for print base class
|
||||
|
||||
void cursorTo( uint8_t column, uint8_t row); // 0 based coordinates for character columns and rows
|
||||
void cursorTo( int8_t column); // move cursor on the current row
|
||||
void cursorToXY( int16_t x, int16_t y); // coordinates relative to active text area
|
||||
|
||||
inline __attribute__((always_inline))
|
||||
uint8_t fontHeight() {
|
||||
return pgm_read_byte(_font+GTEXT_FONT_HEIGHT);
|
||||
};
|
||||
|
||||
inline __attribute__((always_inline))
|
||||
uint8_t fontHeight(gTextFont font) {
|
||||
return pgm_read_byte(font+GTEXT_FONT_HEIGHT);
|
||||
};
|
||||
|
||||
uint16_t charWidth(uint8_t c);
|
||||
uint16_t stringWidth(const char* str);
|
||||
uint16_t stringWidth_P(PGM_P str);
|
||||
uint16_t stringWidth_P(String &str);
|
||||
|
||||
void eraseTextLine(uint16_t color, gTextEraseLine type=gTextEraseToEOL); //ansi like line erase function
|
||||
void eraseTextLine(uint16_t color, uint8_t row); // erase the entire text line in the given row and move cursor to left position
|
||||
|
||||
void printNumber(long n);
|
||||
|
||||
#if INCLUDE_NOT_WORKING_YET
|
||||
ILI9341_due_gText(ILI9341_due *ili, predefinedArea selection); //, textMode mode=DEFAULT_SCROLLDIR);
|
||||
bool defineArea(predefinedArea selection); //, textMode mode=DEFAULT_SCROLLDIR);
|
||||
void setTextMode(textMode mode); // change to the given text mode
|
||||
#endif
|
||||
|
||||
static uint16_t charWidth(uint8_t c, gTextFont font)
|
||||
{
|
||||
int16_t width = 0;
|
||||
|
||||
if(isFixedWidthFont(font){
|
||||
width = pgm_read_byte(font+GTEXT_FONT_FIXED_WIDTH);
|
||||
}
|
||||
else{
|
||||
// variable width font
|
||||
uint8_t firstChar = pgm_read_byte(font+GTEXT_FONT_FIRST_CHAR);
|
||||
uint8_t charCount = pgm_read_byte(font+GTEXT_FONT_CHAR_COUNT);
|
||||
|
||||
// read width data
|
||||
if(c >= firstChar && c < (firstChar+charCount)) {
|
||||
c -= firstChar;
|
||||
width = pgm_read_byte(font+GTEXT_FONT_WIDTH_TABLE+c);
|
||||
}
|
||||
}
|
||||
return width;
|
||||
};
|
||||
|
||||
static uint16_t stringWidth(const char* str, gTextFont font, uint8_t letterSpacing)
|
||||
{
|
||||
uint16_t width = 0;
|
||||
|
||||
while(*str != 0) {
|
||||
width += ILI9341_due_gText::charWidth(*str++, font) + letterSpacing;
|
||||
}
|
||||
if(width > 0)
|
||||
width -= letterSpacing;
|
||||
|
||||
return width;
|
||||
};
|
||||
|
||||
//#ifndef USE_ARDUINO_FLASHSTR
|
||||
// // when the following function is supported in arduino it will be removed from this library
|
||||
// void printFlash(FLASHSTRING str); //this overrides the Arduino print function to implicilty store the string in flash (progmem)
|
||||
// void printFlashln(FLASHSTRING str);
|
||||
//#endif
|
||||
|
||||
/*@}*/
|
||||
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,196 +0,0 @@
|
|||
/* Arduino SdFat Library
|
||||
* Copyright (C) 2012 by William Greiman
|
||||
*
|
||||
* This file is part of the Arduino SdFat Library
|
||||
*
|
||||
* This Library 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 Library 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 the Arduino SdFat Library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/**
|
||||
* \file
|
||||
* \brief configuration definitions
|
||||
*/
|
||||
#ifndef ILI_SdFatConfig_h
|
||||
#define ILI_SdFatConfig_h
|
||||
#include <stdint.h>
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
* Set USE_SEPARATE_FAT_CACHE nonzero to use a second 512 byte cache
|
||||
* for FAT table entries. Improves performance for large writes that
|
||||
* are not a multiple of 512 bytes.
|
||||
*/
|
||||
#ifdef __arm__
|
||||
#define ILI_USE_SEPARATE_FAT_CACHE 1
|
||||
#else // __arm__
|
||||
#define ILI_USE_SEPARATE_FAT_CACHE 0
|
||||
#endif // __arm__
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
* Set USE_MULTI_BLOCK_SD_IO nonzero to use multi-block SD read/write.
|
||||
*
|
||||
* Don't use mult-block read/write on small AVR boards.
|
||||
*/
|
||||
#if defined(RAMEND) && RAMEND < 3000
|
||||
#define ILI_USE_MULTI_BLOCK_SD_IO 0
|
||||
#else
|
||||
#define ILI_USE_MULTI_BLOCK_SD_IO 1
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
* To enable SD card CRC checking set USE_SD_CRC nonzero.
|
||||
*
|
||||
* Set USE_SD_CRC to 1 to use a smaller slower CRC-CCITT function.
|
||||
*
|
||||
* Set USE_SD_CRC to 2 to used a larger faster table driven CRC-CCITT function.
|
||||
*/
|
||||
#define ILI_USE_SD_CRC 0
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
* To use multiple SD cards set USE_MULTIPLE_CARDS nonzero.
|
||||
*
|
||||
* Using multiple cards costs about 200 bytes of flash.
|
||||
*
|
||||
* Each card requires about 550 bytes of SRAM so use of a Mega is recommended.
|
||||
*/
|
||||
#define ILI_USE_MULTIPLE_CARDS 0
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
* Set DESTRUCTOR_CLOSES_FILE nonzero to close a file in its destructor.
|
||||
*
|
||||
* Causes use of lots of heap in ARM.
|
||||
*/
|
||||
#define ILI_DESTRUCTOR_CLOSES_FILE 0
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
* For AVR
|
||||
*
|
||||
* Set USE_SERIAL_FOR_STD_OUT nonzero to use Serial (the HardwareSerial class)
|
||||
* for error messages and output from print functions like ls().
|
||||
*
|
||||
* If USE_SERIAL_FOR_STD_OUT is zero, a small non-interrupt driven class
|
||||
* is used to output messages to serial port zero. This allows an alternate
|
||||
* Serial library like SerialPort to be used with SdFat.
|
||||
*
|
||||
* You can redirect stdOut with SdFat::setStdOut(Print* stream) and
|
||||
* get the current stream with SdFat::stdOut().
|
||||
*/
|
||||
#define ILI_USE_SERIAL_FOR_STD_OUT 0
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
* Call flush for endl if ENDL_CALLS_FLUSH is nonzero
|
||||
*
|
||||
* The standard for iostreams is to call flush. This is very costly for
|
||||
* SdFat. Each call to flush causes 2048 bytes of I/O to the SD.
|
||||
*
|
||||
* SdFat has a single 512 byte buffer for SD I/O so it must write the current
|
||||
* data block to the SD, read the directory block from the SD, update the
|
||||
* directory entry, write the directory block to the SD and read the data
|
||||
* block back into the buffer.
|
||||
*
|
||||
* The SD flash memory controller is not designed for this many rewrites
|
||||
* so performance may be reduced by more than a factor of 100.
|
||||
*
|
||||
* If ENDL_CALLS_FLUSH is zero, you must call flush and/or close to force
|
||||
* all data to be written to the SD.
|
||||
*/
|
||||
#define ILI_ENDL_CALLS_FLUSH 0
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
* Allow FAT12 volumes if FAT12_SUPPORT is nonzero.
|
||||
* FAT12 has not been well tested.
|
||||
*/
|
||||
#define ILI_FAT12_SUPPORT 0
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
* SPI SCK divisor for SD initialization commands.
|
||||
* or greater
|
||||
*/
|
||||
#ifdef __AVR__
|
||||
const uint8_t ILI_SPI_SCK_INIT_DIVISOR = 64;
|
||||
#else
|
||||
const uint8_t ILI_SPI_SCK_INIT_DIVISOR = 128;
|
||||
#endif
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
* Set ENABLE_SPI_TRANSACTION nonzero to enable the SPI transaction feature
|
||||
* of the standard Arduino SPI library. You must include SPI.h in your
|
||||
* sketches when ENABLE_SPI_TRANSACTION is nonzero.
|
||||
*/
|
||||
#define ILI_ENABLE_SPI_TRANSACTION 0
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
* Set ENABLE_SPI_YIELD nonzero to enable release of the SPI bus during
|
||||
* SD card busy waits.
|
||||
*
|
||||
* This will allow interrupt routines to access the SPI bus if
|
||||
* ENABLE_SPI_TRANSACTION is nonzero.
|
||||
*
|
||||
* Setting ENABLE_SPI_YIELD will introduce some extra overhead and will
|
||||
* slightly slow transfer rates. A few older SD cards may fail when
|
||||
* ENABLE_SPI_YIELD is nonzero.
|
||||
*/
|
||||
#define ILI_ENABLE_SPI_YIELD 0
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
* Force use of Arduino Standard SPI library if USE_ARDUINO_SPI_LIBRARY
|
||||
* is nonzero. This will override native and software SPI for all boards.
|
||||
*/
|
||||
#define ILI_USE_ARDUINO_SPI_LIBRARY 0
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
* Define AVR_SOF_SPI nonzero to use software SPI on all AVR Arduinos.
|
||||
*/
|
||||
#define ILI_AVR_SOFT_SPI 0
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
* Define DUE_SOFT_SPI nonzero to use software SPI on Due Arduinos.
|
||||
*/
|
||||
#define ILI_DUE_SOFT_SPI 0
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Define LEONARDO_SOFT_SPI nonzero to use software SPI on Leonardo Arduinos.
|
||||
* LEONARDO_SOFT_SPI allows an unmodified 328 Shield to be used
|
||||
* on Leonardo Arduinos.
|
||||
*/
|
||||
#define ILI_LEONARDO_SOFT_SPI 0
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
* Define MEGA_SOFT_SPI nonzero to use software SPI on Mega Arduinos.
|
||||
* MEGA_SOFT_SPI allows an unmodified 328 Shield to be used
|
||||
* on Mega Arduinos.
|
||||
*/
|
||||
#define ILI_MEGA_SOFT_SPI 0
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
* Set TEENSY3_SOFT_SPI nonzero to use software SPI on Teensy 3.x boards.
|
||||
*/
|
||||
#define ILI_TEENSY3_SOFT_SPI 0
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
* Define software SPI pins. Default allows Uno shields to be used on other
|
||||
* boards.
|
||||
*/
|
||||
// define software SPI pins
|
||||
/** Default Software SPI chip select pin */
|
||||
uint8_t const ILI_SOFT_SPI_CS_PIN = 10;
|
||||
/** Software SPI Master Out Slave In pin */
|
||||
uint8_t const ILI_SOFT_SPI_MOSI_PIN = 11;
|
||||
/** Software SPI Master In Slave Out pin */
|
||||
uint8_t const ILI_SOFT_SPI_MISO_PIN = 12;
|
||||
/** Software SPI Clock pin */
|
||||
uint8_t const ILI_SOFT_SPI_SCK_PIN = 13;
|
||||
#endif // SdFatConfig_h
|
|
@ -1,188 +0,0 @@
|
|||
/* Arduino SdSpi Library
|
||||
* Copyright (C) 2013 by William Greiman
|
||||
*
|
||||
* This file is part of the Arduino SdSpi Library
|
||||
*
|
||||
* This Library 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 Library 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 the Arduino SdSpi Library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/**
|
||||
* \file
|
||||
* \brief SdSpi class for V2 SD/SDHC cards
|
||||
*/
|
||||
#ifndef ILI_SdSpi_h
|
||||
#define ILI_SdSpi_h
|
||||
#include <Arduino.h>
|
||||
#include "ILI_SdFatConfig.h"
|
||||
|
||||
#if !ILI_USE_ARDUINO_SPI_LIBRARY
|
||||
// AVR Arduinos
|
||||
#ifdef __AVR__
|
||||
#if ILI_AVR_SOFT_SPI
|
||||
#define ILI_USE_SOFTWARE_SPI 1
|
||||
#elif ILI_LEONARDO_SOFT_SPI && defined(__AVR_ATmega32U4__) && !defined(CORE_TEENSY)
|
||||
#define ILI_USE_SOFTWARE_SPI 1
|
||||
#elif ILI_MEGA_SOFT_SPI && (defined(__AVR_ATmega1280__)\
|
||||
||defined(__AVR_ATmega2560__))
|
||||
#define ILI_USE_SOFTWARE_SPI 1
|
||||
#else // ILI_USE_SOFTWARE_SPI
|
||||
#define ILI_USE_NATIVE_AVR_SPI 1
|
||||
#endif // ILI_USE_SOFTWARE_SPI
|
||||
#endif // __AVR__
|
||||
// Due
|
||||
#if defined(__arm__) && !defined(CORE_TEENSY) && !defined(__STM32F1__)
|
||||
#if ILI_DUE_SOFT_SPI
|
||||
#define ILI_USE_SOFTWARE_SPI 1
|
||||
#else // ILI_DUE_SOFT_SPI
|
||||
/** Nonzero - use native SAM3X SPI */
|
||||
#define ILI_USE_NATIVE_SAM3X_SPI 1
|
||||
#endif // ILI_DUE_SOFT_SPI
|
||||
#endif // defined(__arm__) && !defined(CORE_TEENSY | __STM32F1__)
|
||||
|
||||
// STM32F1 Maple Mini
|
||||
#if defined(__arm__) && defined(__STM32F1__)
|
||||
#if ILI_DUE_SOFT_SPI
|
||||
#define ILI_USE_SOFTWARE_SPI 1
|
||||
#else // ILI_DUE_SOFT_SPI
|
||||
/** Nonzero - use native STM32F1 SPI */
|
||||
#define ILI_USE_NATIVE_STM32F1_SPI 1
|
||||
#endif // ILI_DUE_SOFT_SPI
|
||||
#endif // defined(__arm__) && defined(__STM32F1__)
|
||||
|
||||
// Teensy 3.0
|
||||
#if defined(__arm__) && defined(CORE_TEENSY)
|
||||
#if ILI_TEENSY3_SOFT_SPI
|
||||
#define ILI_USE_SOFTWARE_SPI 1
|
||||
#else // ILI_TEENSY3_SOFT_SPI
|
||||
/** Nonzero - use native MK20DX128 SPI */
|
||||
#define ILI_USE_NATIVE_TEENSY3_SPI 1
|
||||
#endif // ILI_TEENSY3_SOFT_SPI
|
||||
#endif // defined(__arm__) && defined(CORE_TEENSY)
|
||||
#endif // !ILI_USE_ARDUINO_SPI_LIBRARY
|
||||
|
||||
#ifndef ILI_USE_SOFTWARE_SPI
|
||||
#define ILI_USE_SOFTWARE_SPI 0
|
||||
#endif // ILI_USE_SOFTWARE_SPI
|
||||
|
||||
#ifndef ILI_USE_NATIVE_AVR_SPI
|
||||
#define ILI_USE_NATIVE_AVR_SPI 0
|
||||
#endif
|
||||
|
||||
#ifndef ILI_USE_NATIVE_SAM3X_SPI
|
||||
#define ILI_USE_NATIVE_SAM3X_SPI 0
|
||||
#endif // ILI_USE_NATIVE_SAM3X_SPI
|
||||
|
||||
#ifndef ILI_USE_NATIVE_STM32F1_SPI
|
||||
#define ILI_USE_NATIVE_STM32F1_SPI 0
|
||||
#endif // ILI_USE_NATIVE_STM32F1_SPI
|
||||
|
||||
#ifndef ILI_USE_NATIVE_TEENSY3_SPI
|
||||
#define ILI_USE_NATIVE_TEENSY3_SPI 0
|
||||
#endif // ILI_USE_NATIVE_TEENSY3_SPI
|
||||
//------------------------------------------------------------------------------
|
||||
// define default chip select pin
|
||||
//
|
||||
#if !ILI_USE_SOFTWARE_SPI
|
||||
/** The default chip select pin for the SD card is SS. */
|
||||
uint8_t const ILI_SD_CHIP_SELECT_PIN = SS;
|
||||
#else // USE_AVR_SOFTWARE_SPI
|
||||
/** SPI chip select pin for software SPI. */
|
||||
uint8_t const ILI_SD_CHIP_SELECT_PIN = SOFT_SPI_CS_PIN;
|
||||
#endif // USE_AVR_SOFTWARE_SPI
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
* \class SdSpi
|
||||
* \brief SPI class for access to SD and SDHC flash memory cards.
|
||||
*/
|
||||
class ILI_SdSpi {
|
||||
public:
|
||||
/** Initialize the SPI bus */
|
||||
void begin();
|
||||
/** Set SPI options for access to SD/SDHC cards.
|
||||
*
|
||||
* \param[in] spiDivisor SCK clock divider relative to the system clock.
|
||||
*/
|
||||
void init(uint8_t spiDivisor);
|
||||
/** Receive a byte.
|
||||
*
|
||||
* \return The byte.
|
||||
*/
|
||||
uint8_t receive();
|
||||
/** Receive multiple bytes.
|
||||
*
|
||||
* \param[out] buf Buffer to receive the data.
|
||||
* \param[in] n Number of bytes to receive.
|
||||
*
|
||||
* \return Zero for no error or nonzero error code.
|
||||
*/
|
||||
uint8_t receive(uint8_t* buf, size_t n);
|
||||
/** Send a byte.
|
||||
*
|
||||
* \param[in] data Byte to send
|
||||
*/
|
||||
void send(uint8_t data);
|
||||
/** Send multiple bytes.
|
||||
*
|
||||
* \param[in] buf Buffer for data to be sent.
|
||||
* \param[in] n Number of bytes to send.
|
||||
*/
|
||||
void send(uint8_t* buf, size_t n);
|
||||
};
|
||||
//------------------------------------------------------------------------------
|
||||
// Use of inline for AVR results in up to 10% better write performance.
|
||||
// Inline also save a little flash memory.
|
||||
/** inline avr native functions if nonzero. */
|
||||
#define ILI_USE_AVR_NATIVE_SPI_INLINE 1
|
||||
#if ILI_USE_NATIVE_AVR_SPI && ILI_USE_AVR_NATIVE_SPI_INLINE
|
||||
inline uint8_t ILI_SdSpi::receive() {
|
||||
SPDR = 0XFF;
|
||||
while (!(SPSR & (1 << SPIF))) {}
|
||||
return SPDR;
|
||||
}
|
||||
inline uint8_t ILI_SdSpi::receive(uint8_t* buf, size_t n) {
|
||||
if (n-- == 0) return 0;
|
||||
SPDR = 0XFF;
|
||||
for (size_t i = 0; i < n; i++) {
|
||||
while (!(SPSR & (1 << SPIF))) {}
|
||||
uint8_t b = SPDR;
|
||||
SPDR = 0XFF;
|
||||
buf[i] = b;
|
||||
}
|
||||
while (!(SPSR & (1 << SPIF))) {}
|
||||
buf[n] = SPDR;
|
||||
return 0;
|
||||
}
|
||||
inline void ILI_SdSpi::send(uint8_t data) {
|
||||
SPDR = data;
|
||||
while (!(SPSR & (1 << SPIF))) {}
|
||||
}
|
||||
inline void ILI_SdSpi::send(const uint8_t* buf , size_t n) {
|
||||
if (n == 0) return;
|
||||
SPDR = buf[0];
|
||||
if (n > 1) {
|
||||
uint8_t b = buf[1];
|
||||
size_t i = 2;
|
||||
while (1) {
|
||||
while (!(SPSR & (1 << SPIF))) {}
|
||||
SPDR = b;
|
||||
if (i == n) break;
|
||||
b = buf[i++];
|
||||
}
|
||||
}
|
||||
while (!(SPSR & (1 << SPIF))) {}
|
||||
}
|
||||
#endif // ILI_USE_NATIVE_AVR_SPI && ILI_USE_AVR_NATIVE_SPI_INLINE
|
||||
#endif // ILI_SdSpi_h
|
||||
|
|
@ -1,411 +0,0 @@
|
|||
/* Arduino SdSpi Library
|
||||
* Copyright (C) 2013 by William Greiman
|
||||
*
|
||||
* This file is part of the Arduino SdSpi Library
|
||||
*
|
||||
* This Library 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 Library 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 the Arduino SdSpi Library. If not, see
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "ILI_SdSpi.h"
|
||||
#if ILI_USE_NATIVE_SAM3X_SPI
|
||||
/** Use SAM3X DMAC if nonzero */
|
||||
#define ILI_USE_SAM3X_DMAC 1
|
||||
/** Use extra Bus Matrix arbitration fix if nonzero */
|
||||
#define ILI_USE_SAM3X_BUS_MATRIX_FIX 0
|
||||
/** Time in ms for DMA receive timeout */
|
||||
#define ILI_SAM3X_DMA_TIMEOUT 100
|
||||
/** chip select register number */
|
||||
#define ILI_SPI_CHIP_SEL 3
|
||||
/** DMAC receive channel */
|
||||
#define ILI_SPI_DMAC_RX_CH 1
|
||||
/** DMAC transmit channel */
|
||||
#define ILI_SPI_DMAC_TX_CH 0
|
||||
/** DMAC Channel HW Interface Number for SPI TX. */
|
||||
#define ILI_SPI_TX_IDX 1
|
||||
/** DMAC Channel HW Interface Number for SPI RX. */
|
||||
#define ILI_SPI_RX_IDX 2
|
||||
//------------------------------------------------------------------------------
|
||||
/** Disable DMA Controller. */
|
||||
static void ILI_dmac_disable() {
|
||||
DMAC->DMAC_EN &= (~DMAC_EN_ENABLE);
|
||||
}
|
||||
/** Enable DMA Controller. */
|
||||
static void ILI_dmac_enable() {
|
||||
DMAC->DMAC_EN = DMAC_EN_ENABLE;
|
||||
}
|
||||
/** Disable DMA Channel. */
|
||||
static void ILI_dmac_channel_disable(uint32_t ul_num) {
|
||||
DMAC->DMAC_CHDR = DMAC_CHDR_DIS0 << ul_num;
|
||||
}
|
||||
/** Enable DMA Channel. */
|
||||
static void ILI_dmac_channel_enable(uint32_t ul_num) {
|
||||
DMAC->DMAC_CHER = DMAC_CHER_ENA0 << ul_num;
|
||||
}
|
||||
/** Poll for transfer complete. */
|
||||
static bool ILI_dmac_channel_transfer_done(uint32_t ul_num) {
|
||||
return (DMAC->DMAC_CHSR & (DMAC_CHSR_ENA0 << ul_num)) ? false : true;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
void ILI_SdSpi::begin() {
|
||||
PIO_Configure(
|
||||
g_APinDescription[PIN_SPI_MOSI].pPort,
|
||||
g_APinDescription[PIN_SPI_MOSI].ulPinType,
|
||||
g_APinDescription[PIN_SPI_MOSI].ulPin,
|
||||
g_APinDescription[PIN_SPI_MOSI].ulPinConfiguration);
|
||||
PIO_Configure(
|
||||
g_APinDescription[PIN_SPI_MISO].pPort,
|
||||
g_APinDescription[PIN_SPI_MISO].ulPinType,
|
||||
g_APinDescription[PIN_SPI_MISO].ulPin,
|
||||
g_APinDescription[PIN_SPI_MISO].ulPinConfiguration);
|
||||
PIO_Configure(
|
||||
g_APinDescription[PIN_SPI_SCK].pPort,
|
||||
g_APinDescription[PIN_SPI_SCK].ulPinType,
|
||||
g_APinDescription[PIN_SPI_SCK].ulPin,
|
||||
g_APinDescription[PIN_SPI_SCK].ulPinConfiguration);
|
||||
pmc_enable_periph_clk(ID_SPI0);
|
||||
#if ILI_USE_SAM3X_DMAC
|
||||
pmc_enable_periph_clk(ID_DMAC);
|
||||
ILI_dmac_disable();
|
||||
DMAC->DMAC_GCFG = DMAC_GCFG_ARB_CFG_FIXED;
|
||||
ILI_dmac_enable();
|
||||
#if ILI_USE_SAM3X_BUS_MATRIX_FIX
|
||||
MATRIX->MATRIX_WPMR = 0x4d415400;
|
||||
MATRIX->MATRIX_MCFG[1] = 1;
|
||||
MATRIX->MATRIX_MCFG[2] = 1;
|
||||
MATRIX->MATRIX_SCFG[0] = 0x01000010;
|
||||
MATRIX->MATRIX_SCFG[1] = 0x01000010;
|
||||
MATRIX->MATRIX_SCFG[7] = 0x01000010;
|
||||
#endif // ILI_USE_SAM3X_BUS_MATRIX_FIX
|
||||
#endif // ILI_USE_SAM3X_DMAC
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
// start RX DMA
|
||||
static void ILI_spiDmaRX(uint8_t* dst, uint16_t count) {
|
||||
ILI_dmac_channel_disable(ILI_SPI_DMAC_RX_CH);
|
||||
DMAC->DMAC_CH_NUM[ILI_SPI_DMAC_RX_CH].DMAC_SADDR = (uint32_t)&SPI0->SPI_RDR;
|
||||
DMAC->DMAC_CH_NUM[ILI_SPI_DMAC_RX_CH].DMAC_DADDR = (uint32_t)dst;
|
||||
DMAC->DMAC_CH_NUM[ILI_SPI_DMAC_RX_CH].DMAC_DSCR = 0;
|
||||
DMAC->DMAC_CH_NUM[ILI_SPI_DMAC_RX_CH].DMAC_CTRLA = count |
|
||||
DMAC_CTRLA_SRC_WIDTH_BYTE | DMAC_CTRLA_DST_WIDTH_BYTE;
|
||||
DMAC->DMAC_CH_NUM[ILI_SPI_DMAC_RX_CH].DMAC_CTRLB = DMAC_CTRLB_SRC_DSCR |
|
||||
DMAC_CTRLB_DST_DSCR | DMAC_CTRLB_FC_PER2MEM_DMA_FC |
|
||||
DMAC_CTRLB_SRC_INCR_FIXED | DMAC_CTRLB_DST_INCR_INCREMENTING;
|
||||
DMAC->DMAC_CH_NUM[ILI_SPI_DMAC_RX_CH].DMAC_CFG = DMAC_CFG_SRC_PER(ILI_SPI_RX_IDX) |
|
||||
DMAC_CFG_SRC_H2SEL | DMAC_CFG_SOD | DMAC_CFG_FIFOCFG_ASAP_CFG;
|
||||
ILI_dmac_channel_enable(ILI_SPI_DMAC_RX_CH);
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
// start TX DMA
|
||||
static void ILI_spiDmaTX(const uint8_t* src, uint16_t count) {
|
||||
static uint8_t ff = 0XFF;
|
||||
uint32_t src_incr = DMAC_CTRLB_SRC_INCR_INCREMENTING;
|
||||
if (!src) {
|
||||
src = &ff;
|
||||
src_incr = DMAC_CTRLB_SRC_INCR_FIXED;
|
||||
}
|
||||
ILI_dmac_channel_disable(ILI_SPI_DMAC_TX_CH);
|
||||
DMAC->DMAC_CH_NUM[ILI_SPI_DMAC_TX_CH].DMAC_SADDR = (uint32_t)src;
|
||||
DMAC->DMAC_CH_NUM[ILI_SPI_DMAC_TX_CH].DMAC_DADDR = (uint32_t)&SPI0->SPI_TDR;
|
||||
DMAC->DMAC_CH_NUM[ILI_SPI_DMAC_TX_CH].DMAC_DSCR = 0;
|
||||
DMAC->DMAC_CH_NUM[ILI_SPI_DMAC_TX_CH].DMAC_CTRLA = count |
|
||||
DMAC_CTRLA_SRC_WIDTH_BYTE | DMAC_CTRLA_DST_WIDTH_BYTE;
|
||||
|
||||
DMAC->DMAC_CH_NUM[ILI_SPI_DMAC_TX_CH].DMAC_CTRLB = DMAC_CTRLB_SRC_DSCR |
|
||||
DMAC_CTRLB_DST_DSCR | DMAC_CTRLB_FC_MEM2PER_DMA_FC |
|
||||
src_incr | DMAC_CTRLB_DST_INCR_FIXED;
|
||||
|
||||
DMAC->DMAC_CH_NUM[ILI_SPI_DMAC_TX_CH].DMAC_CFG = DMAC_CFG_DST_PER(ILI_SPI_TX_IDX) |
|
||||
DMAC_CFG_DST_H2SEL | DMAC_CFG_SOD | DMAC_CFG_FIFOCFG_ALAP_CFG;
|
||||
|
||||
ILI_dmac_channel_enable(ILI_SPI_DMAC_TX_CH);
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
// initialize SPI controller
|
||||
void ILI_SdSpi::init(uint8_t sckDivisor) {
|
||||
uint8_t scbr = sckDivisor;
|
||||
Spi* pSpi = SPI0;
|
||||
// disable SPI
|
||||
pSpi->SPI_CR = SPI_CR_SPIDIS;
|
||||
// reset SPI
|
||||
pSpi->SPI_CR = SPI_CR_SWRST;
|
||||
// no mode fault detection, set master mode
|
||||
pSpi->SPI_MR = SPI_PCS(ILI_SPI_CHIP_SEL) | SPI_MR_MODFDIS | SPI_MR_MSTR;
|
||||
// mode 0, 8-bit,
|
||||
pSpi->SPI_CSR[ILI_SPI_CHIP_SEL] = SPI_CSR_SCBR(scbr) | SPI_CSR_NCPHA;
|
||||
// enable SPI
|
||||
pSpi->SPI_CR |= SPI_CR_SPIEN;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
static inline uint8_t ILI_spiTransfer(uint8_t b) {
|
||||
Spi* pSpi = SPI0;
|
||||
|
||||
pSpi->SPI_TDR = b;
|
||||
while ((pSpi->SPI_SR & SPI_SR_RDRF) == 0) {}
|
||||
b = pSpi->SPI_RDR;
|
||||
return b;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
/** SPI receive a byte */
|
||||
uint8_t ILI_SdSpi::receive() {
|
||||
return ILI_spiTransfer(0XFF);
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
/** SPI receive multiple bytes */
|
||||
uint8_t ILI_SdSpi::receive(uint8_t* buf, size_t n) {
|
||||
Spi* pSpi = SPI0;
|
||||
int rtn = 0;
|
||||
#if ILI_USE_SAM3X_DMAC
|
||||
// clear overrun error
|
||||
uint32_t s = pSpi->SPI_SR;
|
||||
|
||||
ILI_spiDmaRX(buf, n);
|
||||
ILI_spiDmaTX(0, n);
|
||||
|
||||
uint32_t m = millis();
|
||||
while (!ILI_dmac_channel_transfer_done(ILI_SPI_DMAC_RX_CH)) {
|
||||
if ((millis() - m) > ILI_SAM3X_DMA_TIMEOUT) {
|
||||
ILI_dmac_channel_disable(ILI_SPI_DMAC_RX_CH);
|
||||
ILI_dmac_channel_disable(ILI_SPI_DMAC_TX_CH);
|
||||
rtn = 2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (pSpi->SPI_SR & SPI_SR_OVRES) rtn |= 1;
|
||||
#else // ILI_USE_SAM3X_DMAC
|
||||
for (size_t i = 0; i < n; i++) {
|
||||
pSpi->SPI_TDR = 0XFF;
|
||||
while ((pSpi->SPI_SR & SPI_SR_RDRF) == 0) {}
|
||||
buf[i] = pSpi->SPI_RDR;
|
||||
}
|
||||
#endif // ILI_USE_SAM3X_DMAC
|
||||
return rtn;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
/** SPI send a byte */
|
||||
void ILI_SdSpi::send(uint8_t b) {
|
||||
ILI_spiTransfer(b);
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
void ILI_SdSpi::send(const uint8_t* buf , size_t n) {
|
||||
Spi* pSpi = SPI0;
|
||||
#if ILI_USE_SAM3X_DMAC
|
||||
ILI_spiDmaTX(buf, n);
|
||||
while (!ILI_dmac_channel_transfer_done(ILI_SPI_DMAC_TX_CH)) {}
|
||||
#else // #if ILI_USE_SAM3X_DMAC
|
||||
while ((pSpi->SPI_SR & SPI_SR_TXEMPTY) == 0) {}
|
||||
for (size_t i = 0; i < n; i++) {
|
||||
pSpi->SPI_TDR = buf[i];
|
||||
while ((pSpi->SPI_SR & SPI_SR_TDRE) == 0) {}
|
||||
}
|
||||
#endif // #if ILI_USE_SAM3X_DMAC
|
||||
while ((pSpi->SPI_SR & SPI_SR_TXEMPTY) == 0) {}
|
||||
// leave RDR empty
|
||||
uint8_t b = pSpi->SPI_RDR;
|
||||
}
|
||||
#endif // ILI_USE_NATIVE_SAM3X_SPI
|
||||
|
||||
//*********************************************************
|
||||
// STM32F1 section
|
||||
//*********************************************************
|
||||
|
||||
#if ILI_USE_NATIVE_STM32F1_SPI
|
||||
#include <SPI.h>
|
||||
#include <libmaple/dma.h>
|
||||
/** Use SAM3X DMAC if nonzero */
|
||||
#define ILI_USE_STM32F1_DMAC 1
|
||||
/** Time in ms for DMA receive timeout */
|
||||
#define ILI_STM32F1_DMA_TIMEOUT 100
|
||||
/** chip select register number */
|
||||
#define ILI_SPI_CHIP_SEL 3
|
||||
/** DMAC receive channel */
|
||||
#define ILI_SPI_DMAC_RX_CH DMA_CH2
|
||||
/** DMAC transmit channel */
|
||||
#define ILI_SPI_DMAC_TX_CH DMA_CH3
|
||||
/** DMAC Channel HW Interface Number for SPI TX. */
|
||||
#define ILI_SPI_TX_IDX 1
|
||||
/** DMAC Channel HW Interface Number for SPI RX. */
|
||||
#define ILI_SPI_RX_IDX 2
|
||||
|
||||
volatile bool SPI_DMA_TX_Active = false;
|
||||
volatile bool SPI_DMA_RX_Active = false;
|
||||
|
||||
inline void SPI_DMA_TX_Event() {
|
||||
SPI_DMA_TX_Active = false;
|
||||
dma_disable(DMA1, DMA_CH3);
|
||||
}
|
||||
|
||||
inline void SPI_DMA_RX_Event() {
|
||||
SPI_DMA_RX_Active = false;
|
||||
dma_disable(DMA1, DMA_CH2);
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
/** Disable DMA Controller. */
|
||||
//static void ILI_dmac_disable() {
|
||||
// DMAC->DMAC_EN &= (~DMAC_EN_ENABLE);
|
||||
//}
|
||||
/** Enable DMA Controller. */
|
||||
//static void ILI_dmac_enable() {
|
||||
// DMAC->DMAC_EN = DMAC_EN_ENABLE;
|
||||
//}
|
||||
/** Disable DMA Channel. */
|
||||
static void ILI_dmac_channel_disable(dma_channel ul_num) {
|
||||
dma_disable(DMA1, ul_num);
|
||||
}
|
||||
/** Enable DMA Channel. */
|
||||
static void ILI_dmac_channel_enable(dma_channel ul_num) {
|
||||
dma_enable(DMA1, ul_num);
|
||||
}
|
||||
/** Poll for transfer complete. */
|
||||
//static bool ILI_dmac_channel_transfer_done(dma_tube tube) {
|
||||
// uint8 shift = (tube - 1) * 4;
|
||||
// return ((DMA1->regs->ISR >> shift) & 0x02) ? false : true;
|
||||
|
||||
// return (DMAC->DMAC_CHSR & (DMAC_CHSR_ENA0 << ul_num)) ? false : true;
|
||||
//}
|
||||
//------------------------------------------------------------------------------
|
||||
void ILI_SdSpi::begin() {
|
||||
SPI.begin();
|
||||
SPI.setClockDivider(SPI_CLOCK_DIV2);
|
||||
SPI.setBitOrder(MSBFIRST);
|
||||
SPI.setDataMode(SPI_MODE0);
|
||||
// DMA setup stuff. We use a line buffer and usa DMA for filling lines and blocks.
|
||||
|
||||
|
||||
|
||||
#if ILI_USE_STM32F1_DMAC
|
||||
dma_init(DMA1);
|
||||
dma_attach_interrupt(DMA1, DMA_CH3, SPI_DMA_TX_Event);
|
||||
dma_attach_interrupt(DMA1, DMA_CH2, SPI_DMA_RX_Event);
|
||||
spi_tx_dma_enable(SPI1);
|
||||
spi_rx_dma_enable(SPI1);
|
||||
|
||||
|
||||
#endif // ILI_USE_STM32F1_DMAC
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
// start RX DMA
|
||||
|
||||
static void ILI_spiDmaRX(uint8_t* dst, uint16_t count) {
|
||||
// spi_rx_dma_enable(SPI1);
|
||||
if (count < 1) return;
|
||||
dma_setup_transfer(DMA1, DMA_CH2, &SPI1->regs->DR, DMA_SIZE_8BITS,
|
||||
dst, DMA_SIZE_8BITS, (DMA_MINC_MODE | DMA_TRNS_CMPLT));
|
||||
dma_set_num_transfers(DMA1, DMA_CH2, count); // 2 bytes per pixel
|
||||
SPI_DMA_RX_Active = true;
|
||||
dma_enable(DMA1, DMA_CH2);
|
||||
|
||||
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
// start TX DMA
|
||||
static void ILI_spiDmaTX(uint8_t* src, uint16_t count) {
|
||||
if (count < 1) return;
|
||||
static uint8_t ff = 0XFF;
|
||||
// spi_tx_dma_enable(SPI1);
|
||||
// dma_init(DMA1);
|
||||
// dma_attach_interrupt(DMA1, DMA_CH3, SPI_DMA_TX_Event);
|
||||
|
||||
|
||||
if (!src) {
|
||||
src = &ff;
|
||||
dma_setup_transfer(DMA1, DMA_CH3, &SPI1->regs->DR, DMA_SIZE_8BITS,
|
||||
src, DMA_SIZE_8BITS, (DMA_FROM_MEM | DMA_TRNS_CMPLT));
|
||||
}
|
||||
else {
|
||||
dma_setup_transfer(DMA1, DMA_CH3, &SPI1->regs->DR, DMA_SIZE_8BITS,
|
||||
src, DMA_SIZE_8BITS, (DMA_MINC_MODE | DMA_FROM_MEM | DMA_TRNS_CMPLT));
|
||||
}
|
||||
dma_set_num_transfers(DMA1, DMA_CH3, count); // 2 bytes per pixel
|
||||
SPI_DMA_TX_Active = true;
|
||||
dma_enable(DMA1, DMA_CH3);
|
||||
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
// initialize SPI controller STM32F1
|
||||
void ILI_SdSpi::init(uint8_t sckDivisor) {
|
||||
SPI.setClockDivider(sckDivisor);
|
||||
SPI.setBitOrder(MSBFIRST);
|
||||
SPI.setDataMode(SPI_MODE0);
|
||||
spi_tx_dma_enable(SPI1);
|
||||
spi_rx_dma_enable(SPI1);
|
||||
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
// STM32
|
||||
static inline uint8_t ILI_spiTransfer(uint8_t b) {
|
||||
return SPI.transfer(b);
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
// should be valid for STM32
|
||||
/** SPI receive a byte */
|
||||
uint8_t ILI_SdSpi::receive() {
|
||||
return ILI_spiTransfer(0xFF);
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
/** SPI receive multiple bytes */
|
||||
// check and finish.
|
||||
|
||||
uint8_t ILI_SdSpi::receive(uint8_t* buf, size_t n) {
|
||||
int rtn = 0;
|
||||
|
||||
#if ILI_USE_STM32F1_DMAC
|
||||
// clear overrun error
|
||||
// uint32_t s = pSpi->SPI_SR;
|
||||
ILI_spiDmaRX(buf, n);
|
||||
ILI_spiDmaTX(0, n);
|
||||
|
||||
|
||||
uint32_t m = millis();
|
||||
while (SPI_DMA_RX_Active) {
|
||||
if ((millis() - m) > ILI_STM32F1_DMA_TIMEOUT) {
|
||||
ILI_dmac_channel_disable(ILI_SPI_DMAC_RX_CH);
|
||||
ILI_dmac_channel_disable(ILI_SPI_DMAC_TX_CH);
|
||||
rtn = 2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// if (pSpi->SPI_SR & SPI_SR_OVRES) rtn |= 1;
|
||||
#else // ILI_USE_STM32F1_DMAC
|
||||
for (size_t i = 0; i < n; i++) {
|
||||
buf[i] = SPI.transfer (0xFF);
|
||||
}
|
||||
#endif // ILI_USE_STM32F1_DMAC
|
||||
return rtn;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
/** SPI send a byte */
|
||||
void ILI_SdSpi::send(uint8_t b) {
|
||||
ILI_spiTransfer(b);
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
void ILI_SdSpi::send(uint8_t* buf , size_t n) {
|
||||
|
||||
#if ILI_USE_STM32F1_DMAC
|
||||
ILI_spiDmaTX(buf, n);
|
||||
while (SPI_DMA_TX_Active) {}
|
||||
|
||||
// uint32_t m = millis();
|
||||
// while (SPI_DMA_TX_Active) {
|
||||
// if ((millis() - m) > ILI_STM32F1_DMA_TIMEOUT) {
|
||||
// ILI_dmac_channel_disable(ILI_SPI_DMAC_TX_CH);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
#else // #if ILI_USE_STM32F1_DMAC
|
||||
SPI.write (buf, n)
|
||||
#endif // #if ILI_USE_STM32F1_DMAC
|
||||
// leave RDR empty
|
||||
// uint8_t b = pSpi->SPI_RDR;
|
||||
}
|
||||
#endif // ILI_USE_NATIVE_STM32F1_SPI
|
|
@ -1,48 +0,0 @@
|
|||
ILI9341_due
|
||||
===========
|
||||
|
||||
Please see http://marekburiak.github.io/ILI9341_due
|
||||
|
||||
|
||||
Version History:
|
||||
```
|
||||
v0.94.000 - Added AVR compatibility, the library can now be also used on Uno, Mega and alike.
|
||||
Please check the github.io page for more information (especially if you want to
|
||||
use gText)
|
||||
v0.93.000 - Breaking changes:
|
||||
- setRotation now needs iliRotation enum as a parameter (instead of an int)
|
||||
- the meaning of some gText drawString parameters have changed
|
||||
(event though the parameter type is the same)
|
||||
- new additions:
|
||||
- gText drawString with new parameters
|
||||
- new gText drawStringOffseted, drawStringPivoted, drawStringPivotedOffseted
|
||||
functions
|
||||
- gText fontLetterSpacing default value is now 2 (previously 0)
|
||||
- examples updated
|
||||
|
||||
v0.92.002 - Fixed drawArc
|
||||
- Added setArcParams function to change maxArcAngle and arcAngleOffset at runtime
|
||||
|
||||
v0.92.001 - Added fontHeight function in gText
|
||||
- fixes for NORMAL and EXTENDED mode
|
||||
|
||||
v0.92.000 - Added drawArc function for drawing arcs and circles with thickness and pies
|
||||
- Added screenshotToConsole method and ILIScreenShotViewer app for taking
|
||||
screenshots from the display
|
||||
- Added alignment options for drawString in ILI9341_due_gText
|
||||
|
||||
v0.91.002 - Updated graphicstestWithStats example sketch so it does not use Streaming.h
|
||||
|
||||
v0.91.001 - Performance improvements (especially fill circle)
|
||||
- Fixed a scanline fill bug, clean up commented out code
|
||||
|
||||
v0.91.000 - Added functions for controlling TFT power levels (sleep, idle, setPowerLevel)
|
||||
|
||||
v0.90.026 - Fixed fillScreen after recent changes
|
||||
|
||||
v0.90.025 - Added PushColors565 function
|
||||
- Added BMP24toILI565 tool
|
||||
- Updated sdFatTftBitmap example
|
||||
|
||||
v0.90.010 - Initial version
|
||||
```
|
|
@ -1,243 +0,0 @@
|
|||
|
||||
//#include <SPI.h>
|
||||
#include <SPI.h>
|
||||
#include "ILI_SdSpi.h"
|
||||
#include "ILI_SdFatConfig.h"
|
||||
#include "ILI9341_due_gText.h"
|
||||
#include "ILI9341_due.h"
|
||||
#include "Arial_bold_14.h"
|
||||
#include "roboto16.h"
|
||||
#include "roboto32.h"
|
||||
#include "roboto70.h"
|
||||
|
||||
#define TFT_DC 10
|
||||
#define TFT_CS 8
|
||||
#define rst 9
|
||||
|
||||
// Use hardware SPI (on Uno, #13, #12, #11) and the above for CS/DC
|
||||
ILI9341_due tft = ILI9341_due(TFT_CS, TFT_DC, rst);
|
||||
|
||||
char textBuff[20];
|
||||
|
||||
ILI9341_due_gText t1(&tft);
|
||||
ILI9341_due_gText t2(&tft);
|
||||
ILI9341_due_gText t3(&tft);
|
||||
uint16_t colorLightGray = tft.color565(192,192,192);
|
||||
uint16_t colorGray = tft.color565(127,127,127);
|
||||
uint16_t colorDarkGray = tft.color565(64,64,64);
|
||||
|
||||
void setup()
|
||||
{
|
||||
Serial.begin(9600);
|
||||
while (!Serial) ; // wait for Arduino Serial Monitor
|
||||
|
||||
tft.begin();
|
||||
tft.setRotation(iliRotation270);
|
||||
|
||||
screenIntro();
|
||||
delay(2000);
|
||||
screenLoading();
|
||||
screenClock();
|
||||
screenPie();
|
||||
delay(2000);
|
||||
screenSensors();
|
||||
}
|
||||
|
||||
void screenIntro()
|
||||
{
|
||||
tft.fillScreen(ILI9341_BLUE);
|
||||
t1.defineArea(100, 100, 220, 140);
|
||||
t1.selectFont(Arial_bold_14);
|
||||
t1.setFontLetterSpacing(5);
|
||||
t1.setFontColor(ILI9341_WHITE, ILI9341_BLUE);
|
||||
strcpy(textBuff, "Arcs demo");
|
||||
t1.drawString(textBuff, gTextAlignMiddleCenter);
|
||||
}
|
||||
|
||||
void screenLoading()
|
||||
{
|
||||
const uint16_t x = 159;
|
||||
const uint16_t y = 149;
|
||||
tft.fillScreen(ILI9341_BLACK);
|
||||
t1.selectFont(roboto32);
|
||||
t1.setFontLetterSpacing(5);
|
||||
t1.setFontColor(ILI9341_WHITE, ILI9341_BLACK);
|
||||
t1.defineArea(100, 85, 220, 140);
|
||||
strcpy(textBuff, "Loading...");
|
||||
t1.drawString(textBuff, gTextAlignTopCenter, 0, 0);
|
||||
tft.drawArc(x, y, 10, 5, 0, 360, colorLightGray);
|
||||
|
||||
for(int i=0; i<2880; i+=4)
|
||||
{
|
||||
tft.drawArc(x, y, 10, 5, (i >> 1)-45, (i >> 1)+45, colorDarkGray);
|
||||
tft.drawArc(x, y, 10, 5, (i >> 1)-45-4, (i >> 1)-45, colorLightGray);
|
||||
|
||||
tft.drawArc(x, y, 20, 5, 1440-i-45, 1440-i+45, colorDarkGray);
|
||||
tft.drawArc(x, y, 20, 5, 1440-i+45, 1440-i+45+4, colorLightGray);
|
||||
}
|
||||
}
|
||||
|
||||
void screenClock()
|
||||
{
|
||||
const uint16_t x = 159;
|
||||
const uint16_t y = 119;
|
||||
tft.fillScreen(ILI9341_BLACK);
|
||||
t1.selectFont(roboto70);
|
||||
t1.setFontLetterSpacing(5);
|
||||
t1.setFontColor(ILI9341_WHITE, ILI9341_BLACK);
|
||||
t1.drawString("15:06", gTextAlignMiddleCenter);
|
||||
tft.drawArc(x,y,102,11,0,225, colorLightGray); // 15 hours
|
||||
tft.drawArc(x,y,113,8,0,36, colorGray); // 6 minutes
|
||||
tft.drawArc(x,y,120,5,0,360, colorDarkGray); // seconds
|
||||
|
||||
for(uint16_t d=324; d<372; d++)
|
||||
{
|
||||
tft.drawArc(x,y,120,5,d-1,d+1, ILI9341_RED);
|
||||
tft.drawArc(x,y,120,5,d-2,d-1, colorDarkGray); // to erase the red
|
||||
if(d == 360)
|
||||
{
|
||||
t1.drawString("15:07", gTextAlignMiddleCenter);
|
||||
tft.drawArc(x,y,113,8,0,42, colorGray); // 7 minutes
|
||||
}
|
||||
delay(166);
|
||||
}
|
||||
}
|
||||
|
||||
void screenPie()
|
||||
{
|
||||
const uint16_t x = 159;
|
||||
const uint16_t y = 119;
|
||||
const uint16_t radius = 80;
|
||||
|
||||
tft.fillScreen(ILI9341_BLACK);
|
||||
t1.selectFont(roboto16);
|
||||
t1.setFontLetterSpacing(2);
|
||||
tft.drawArc(x+3,y-2,radius,radius,0,60, tft.color565(198,255,13));
|
||||
tft.drawArc(x-3,y+7,radius+10,radius+10,60,340, tft.color565(255,0,54));
|
||||
tft.drawArc(x-2,y-3,radius,radius,340,360, tft.color565(0,255,241));
|
||||
|
||||
t1.defineArea(0,0,220,180);
|
||||
t1.selectFont(roboto16);
|
||||
t1.setFontMode(gTextFontMode_Transparent);
|
||||
t1.setFontColor(ILI9341_BLACK);
|
||||
t1.drawString("16%",175,70);
|
||||
t1.drawString("78%",140,150);
|
||||
t1.setFontColor(colorLightGray);
|
||||
t1.drawString("6%",132,18);
|
||||
delay(2000);
|
||||
}
|
||||
|
||||
void screenSensors()
|
||||
{
|
||||
const uint16_t radius = 55;
|
||||
float temp=22.4;
|
||||
uint16_t hum=73, lux=1154;
|
||||
|
||||
const uint16_t s1x = 0;
|
||||
const uint16_t s1y = 10;
|
||||
|
||||
const uint16_t s2x = 110;
|
||||
const uint16_t s2y = 70;
|
||||
|
||||
const uint16_t s3x = 210;
|
||||
const uint16_t s3y = 130;
|
||||
|
||||
tft.fillScreen(ILI9341_BLACK);
|
||||
|
||||
t1.setFontMode(gTextFontMode_Solid);
|
||||
t1.setFontLetterSpacing(3);
|
||||
t2.setFontMode(gTextFontMode_Solid);
|
||||
t2.setFontLetterSpacing(3);
|
||||
t3.setFontMode(gTextFontMode_Solid);
|
||||
t3.setFontLetterSpacing(3);
|
||||
|
||||
t1.defineArea(s1x,s1y,s1x+2*radius,s1y+2*radius);
|
||||
t2.defineArea(s2x,s2y,s2x+2*radius,s2y+2*radius);
|
||||
t3.defineArea(s3x,s3y,s3x+2*radius,s3y+2*radius);
|
||||
|
||||
t1.setFontColor(ILI9341_WHITE);
|
||||
tft.drawArc(s1x+radius,s1y+radius,radius,10,-3,3, tft.color565(127,0,27));
|
||||
t1.selectFont(roboto16);
|
||||
t1.drawStringOffseted("C", gTextAlignMiddleCenter, 0, 25);
|
||||
t1.selectFont(roboto32);
|
||||
sprintf(textBuff, "%4.1f", temp);
|
||||
t1.drawString(textBuff, gTextAlignMiddleCenter);
|
||||
tft.fillRect(s1x+radius-7,s1y+radius+17,2,2,ILI9341_WHITE); // degrees symbol
|
||||
|
||||
for(uint16_t d=1; d<temp*10; d++)
|
||||
{
|
||||
tft.drawArc(s1x+radius,s1y+radius,radius,10,d,d+3, tft.color565(127,0,27));
|
||||
tft.drawArc(s1x+radius,s1y+radius,radius-3,4,d-1,d, tft.color565(255,0,54));
|
||||
}
|
||||
|
||||
t2.setFontColor(ILI9341_WHITE);
|
||||
tft.drawArc(s2x+radius,s2y+radius,radius,10,-3,3, tft.color565(0,43,127));
|
||||
t2.selectFont(roboto16);
|
||||
t2.drawStringOffseted("%", gTextAlignMiddleCenter, 0, 25);
|
||||
t2.selectFont(roboto32);
|
||||
sprintf(textBuff, "%d", hum);
|
||||
t2.drawString(textBuff, gTextAlignMiddleCenter);
|
||||
|
||||
for(uint16_t d=1; d<263; d++)
|
||||
{
|
||||
tft.drawArc(s2x+radius,s2y+radius,radius,10,d,d+3, tft.color565(0,43,127));
|
||||
tft.drawArc(s2x+radius,s2y+radius,radius-3,4,d-1,d, tft.color565(0,86,255));
|
||||
}
|
||||
|
||||
t3.setFontColor(ILI9341_WHITE);
|
||||
tft.drawArc(s3x+radius,s3y+radius,radius,10,-3,3, tft.color565(127,103,6));
|
||||
t3.selectFont(roboto16);
|
||||
t3.drawStringOffseted("lux", gTextAlignMiddleCenter, 0, 25);
|
||||
t3.selectFont(roboto32);
|
||||
sprintf(textBuff, "%d", lux);
|
||||
t3.drawString(textBuff, gTextAlignMiddleCenter);
|
||||
|
||||
for(uint16_t d=1; d<42; d++)
|
||||
{
|
||||
tft.drawArc(s3x+radius,s3y+radius,radius,10,d,d+3, tft.color565(127,103,6));
|
||||
tft.drawArc(s3x+radius,s3y+radius,radius-3,4,d-1,d, tft.color565(255,206,13));
|
||||
}
|
||||
|
||||
delay(1000);
|
||||
for(uint16_t d=1; d<660; d++)
|
||||
{
|
||||
if(d<220 )
|
||||
{
|
||||
lux+=21;
|
||||
|
||||
sprintf(textBuff, "%d", lux);
|
||||
t3.drawString(textBuff, gTextAlignMiddleCenter, 3, 3);
|
||||
tft.drawArc(s3x+radius,s3y+radius,radius,10, ((float)lux/(float)10000)*360,((float)lux/(float)10000)*360+3, tft.color565(127,103,6));
|
||||
tft.drawArc(s3x+radius,s3y+radius,radius-3,4,((float)lux/(float)10000)*360-4,((float)lux/(float)10000)*360, tft.color565(255,206,13));
|
||||
}
|
||||
|
||||
if(d == 220)
|
||||
delay(1000);
|
||||
|
||||
if(d>220 && d % 15 == 0)
|
||||
{
|
||||
temp+=0.1;
|
||||
sprintf(textBuff, "%4.1f", temp);
|
||||
t1.drawString(textBuff, gTextAlignMiddleCenter, 3, 3);
|
||||
tft.drawArc(s1x+radius,s1y+radius,radius,10,temp*10,temp*10+3, tft.color565(127,0,27));
|
||||
tft.drawArc(s1x+radius,s1y+radius,radius-3,4,temp*10-2,temp*10, tft.color565(255,0,54));
|
||||
delay(random(350, 700));
|
||||
}
|
||||
if(d>300 && d<600 && d % 38 == 0)
|
||||
{
|
||||
hum+=1;
|
||||
sprintf(textBuff, "%d", hum);
|
||||
t2.drawString(textBuff, gTextAlignMiddleCenter, 3, 3);
|
||||
tft.drawArc(s2x+radius,s2y+radius,radius,10,(float)hum*3.6-4,(float)hum*3.6+3, tft.color565(0,43,127));
|
||||
tft.drawArc(s2x+radius,s2y+radius,radius-3,4,(float)hum*3.6-5,(float)hum*3.6, tft.color565(0,86,255));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void loop()
|
||||
{
|
||||
setup ();
|
||||
/* add main program code here */
|
||||
|
||||
}
|
|
@ -1,167 +0,0 @@
|
|||
|
||||
|
||||
/*
|
||||
*
|
||||
* roboto16
|
||||
*
|
||||
* created with FontCreator
|
||||
* written by F. Maximilian Thiele
|
||||
*
|
||||
* http://www.apetech.de/fontCreator
|
||||
* me@apetech.de
|
||||
*
|
||||
* File Name : roboto16.h
|
||||
* Date : 18.09.2014
|
||||
* Font size in bytes : 10574
|
||||
* Font width : 10
|
||||
* Font height : 17
|
||||
* Font first char : 32
|
||||
* Font last char : 145
|
||||
* Font used chars : 113
|
||||
*
|
||||
* The font data are defined as
|
||||
*
|
||||
* struct _FONT_ {
|
||||
* uint16_t font_Size_in_Bytes_over_all_included_Size_it_self;
|
||||
* uint8_t font_Width_in_Pixel_for_fixed_drawing;
|
||||
* uint8_t font_Height_in_Pixel_for_all_characters;
|
||||
* unit8_t font_First_Char;
|
||||
* uint8_t font_Char_Count;
|
||||
*
|
||||
* uint8_t font_Char_Widths[font_Last_Char - font_First_Char +1];
|
||||
* // for each character the separate width in pixels,
|
||||
* // characters < 128 have an implicit virtual right empty row
|
||||
*
|
||||
* uint8_t font_data[];
|
||||
* // bit field of all characters
|
||||
*/
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <avr/pgmspace.h>
|
||||
|
||||
#ifndef ROBOTO16_H
|
||||
#define ROBOTO16_H
|
||||
|
||||
#define ROBOTO16_WIDTH 10
|
||||
#define ROBOTO16_HEIGHT 17
|
||||
|
||||
static const uint8_t roboto16[] PROGMEM = {
|
||||
0x29, 0x4E, // size
|
||||
0x0A, // width
|
||||
0x11, // height
|
||||
0x20, // first char
|
||||
0x71, // char count
|
||||
|
||||
// char widths
|
||||
0x00, 0x01, 0x03, 0x08, 0x07, 0x0A, 0x08, 0x01, 0x04, 0x04,
|
||||
0x07, 0x07, 0x02, 0x04, 0x01, 0x06, 0x07, 0x03, 0x07, 0x07,
|
||||
0x08, 0x07, 0x07, 0x07, 0x07, 0x07, 0x01, 0x02, 0x06, 0x07,
|
||||
0x07, 0x06, 0x0D, 0x0A, 0x08, 0x08, 0x09, 0x08, 0x08, 0x09,
|
||||
0x09, 0x01, 0x06, 0x09, 0x07, 0x0B, 0x09, 0x09, 0x08, 0x09,
|
||||
0x09, 0x08, 0x09, 0x08, 0x0A, 0x0D, 0x09, 0x09, 0x08, 0x03,
|
||||
0x06, 0x03, 0x05, 0x07, 0x03, 0x07, 0x07, 0x07, 0x07, 0x07,
|
||||
0x04, 0x07, 0x07, 0x01, 0x02, 0x07, 0x01, 0x0C, 0x07, 0x07,
|
||||
0x07, 0x07, 0x04, 0x06, 0x05, 0x07, 0x08, 0x0B, 0x07, 0x08,
|
||||
0x06, 0x04, 0x01, 0x05, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00,
|
||||
|
||||
// font data
|
||||
0xFC, 0x11, 0x00, // 33
|
||||
0x1E, 0x10, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 34
|
||||
0x20, 0x20, 0xF8, 0x24, 0x20, 0xE0, 0x3C, 0x20, 0x02, 0x1E, 0x03, 0x02, 0x1E, 0x03, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 35
|
||||
0x38, 0x44, 0x44, 0x83, 0x84, 0x04, 0x18, 0x0C, 0x10, 0x10, 0x70, 0x10, 0x11, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 36
|
||||
0x3C, 0x44, 0x42, 0x3C, 0x80, 0x40, 0x30, 0x08, 0x00, 0x00, 0x00, 0x00, 0x08, 0x06, 0x01, 0x0E, 0x11, 0x11, 0x11, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 37
|
||||
0x00, 0xBC, 0x44, 0xC2, 0x24, 0x1C, 0x00, 0x00, 0x0F, 0x10, 0x10, 0x10, 0x13, 0x14, 0x08, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 38
|
||||
0x0E, 0x00, 0x00, // 39
|
||||
0xE0, 0x1C, 0x02, 0x01, 0x0F, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x80, // 40
|
||||
0x01, 0x06, 0x18, 0xE0, 0x00, 0xC0, 0x30, 0x0F, 0x80, 0x00, 0x00, 0x00, // 41
|
||||
0x10, 0x90, 0x50, 0x3C, 0x50, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 42
|
||||
0x80, 0x80, 0x80, 0xF0, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 43
|
||||
0x00, 0x00, 0x40, 0x70, 0x00, 0x00, // 44
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, // 45
|
||||
0x00, 0x10, 0x00, // 46
|
||||
0x00, 0x00, 0x00, 0xE0, 0x1C, 0x04, 0x20, 0x1C, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 47
|
||||
0xF8, 0x04, 0x04, 0x02, 0x04, 0x04, 0xF8, 0x07, 0x18, 0x10, 0x10, 0x10, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 48
|
||||
0x04, 0x04, 0xFC, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, // 49
|
||||
0x18, 0x04, 0x04, 0x02, 0x84, 0x6C, 0x10, 0x10, 0x18, 0x14, 0x13, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 50
|
||||
0x18, 0x04, 0x84, 0x82, 0x84, 0xC4, 0x38, 0x0C, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 51
|
||||
0x00, 0x80, 0x60, 0x10, 0x0C, 0xFC, 0x00, 0x00, 0x03, 0x02, 0x02, 0x02, 0x02, 0x1F, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 52
|
||||
0xC0, 0xBC, 0x44, 0x44, 0x44, 0x44, 0x84, 0x04, 0x18, 0x10, 0x10, 0x10, 0x10, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 53
|
||||
0xF0, 0x4C, 0x44, 0x24, 0x42, 0x44, 0x80, 0x07, 0x08, 0x10, 0x10, 0x10, 0x10, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 54
|
||||
0x04, 0x04, 0x04, 0xC4, 0x24, 0x1C, 0x04, 0x00, 0x00, 0x1E, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 55
|
||||
0x38, 0xC4, 0x84, 0x82, 0x84, 0xC4, 0x38, 0x0F, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 56
|
||||
0xF8, 0x04, 0x04, 0x02, 0x04, 0x8C, 0xF0, 0x00, 0x11, 0x11, 0x12, 0x11, 0x08, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 57
|
||||
0x20, 0x10, 0x00, // 58
|
||||
0x00, 0x20, 0x40, 0x70, 0x00, 0x00, // 59
|
||||
0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 60
|
||||
0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 61
|
||||
0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x80, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 62
|
||||
0x0C, 0x04, 0x02, 0x84, 0x6C, 0x10, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 63
|
||||
0xC0, 0x30, 0x08, 0x08, 0x84, 0x44, 0x24, 0x24, 0xC4, 0x04, 0x08, 0x30, 0xC0, 0x1F, 0x60, 0x80, 0x8F, 0x10, 0x10, 0x10, 0x08, 0x9F, 0x10, 0x10, 0x0C, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, // 64
|
||||
0x00, 0x00, 0x80, 0x70, 0x0C, 0x0C, 0x70, 0x80, 0x00, 0x00, 0x10, 0x0C, 0x03, 0x02, 0x02, 0x02, 0x02, 0x03, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 65
|
||||
0xFC, 0x84, 0x84, 0x84, 0x84, 0xC4, 0xEC, 0x10, 0x1F, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 66
|
||||
0xF0, 0x08, 0x04, 0x04, 0x02, 0x04, 0x04, 0x18, 0x07, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 67
|
||||
0xFC, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x18, 0xE0, 0x1F, 0x10, 0x10, 0x10, 0x10, 0x10, 0x08, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 68
|
||||
0xFC, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x04, 0x1F, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 69
|
||||
0xFC, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x04, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 70
|
||||
0xF0, 0x08, 0x04, 0x04, 0x02, 0x04, 0x04, 0x0C, 0x10, 0x03, 0x0C, 0x10, 0x10, 0x10, 0x11, 0x11, 0x11, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 71
|
||||
0xFC, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xFC, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 72
|
||||
0xFC, 0x1F, 0x00, // 73
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x0C, 0x10, 0x10, 0x10, 0x10, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 74
|
||||
0xFC, 0x80, 0x80, 0xC0, 0x20, 0x10, 0x08, 0x04, 0x04, 0x1F, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 75
|
||||
0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 76
|
||||
0xFC, 0x04, 0x38, 0xC0, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x18, 0xFC, 0x1F, 0x00, 0x00, 0x00, 0x07, 0x18, 0x0C, 0x03, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 77
|
||||
0xFC, 0x04, 0x18, 0x20, 0xC0, 0x00, 0x00, 0x00, 0xFC, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x08, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 78
|
||||
0xF0, 0x08, 0x04, 0x04, 0x02, 0x04, 0x04, 0x08, 0xF0, 0x07, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0C, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 79
|
||||
0xFC, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x78, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 80
|
||||
0xF0, 0x08, 0x04, 0x04, 0x02, 0x04, 0x04, 0x08, 0xF0, 0x07, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x2C, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 81
|
||||
0xFC, 0x84, 0x84, 0x84, 0x84, 0x84, 0x44, 0x38, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 82
|
||||
0x38, 0x44, 0x44, 0x82, 0x82, 0x84, 0x04, 0x18, 0x0C, 0x10, 0x10, 0x10, 0x10, 0x10, 0x11, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 83
|
||||
0x04, 0x04, 0x04, 0x04, 0xFC, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 84
|
||||
0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x07, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 85
|
||||
0x04, 0x1C, 0xE0, 0x00, 0x00, 0x00, 0x80, 0x60, 0x1C, 0x04, 0x00, 0x00, 0x00, 0x03, 0x1C, 0x1C, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 86
|
||||
0x3C, 0xC0, 0x00, 0x00, 0xE0, 0x1C, 0x1C, 0xE0, 0x00, 0x00, 0x80, 0x78, 0x04, 0x00, 0x03, 0x1C, 0x0E, 0x01, 0x00, 0x00, 0x00, 0x07, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 87
|
||||
0x00, 0x04, 0x08, 0x30, 0xC0, 0xC0, 0x30, 0x08, 0x04, 0x10, 0x18, 0x0C, 0x02, 0x01, 0x01, 0x02, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 88
|
||||
0x04, 0x0C, 0x30, 0x40, 0x80, 0x80, 0x60, 0x18, 0x04, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 89
|
||||
0x04, 0x04, 0x04, 0x84, 0x64, 0x14, 0x0C, 0x04, 0x18, 0x14, 0x13, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 90
|
||||
0xFF, 0x01, 0x01, 0x7F, 0x40, 0x40, 0x00, 0x00, 0x00, // 91
|
||||
0x04, 0x1C, 0x60, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 92
|
||||
0x01, 0x01, 0xFF, 0x40, 0x40, 0x7F, 0x00, 0x00, 0x00, // 93
|
||||
0x60, 0x18, 0x0C, 0x30, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 94
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 95
|
||||
0x02, 0x0C, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 96
|
||||
0x40, 0x20, 0x10, 0x10, 0x20, 0xE0, 0x00, 0x1E, 0x12, 0x11, 0x11, 0x11, 0x1F, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 97
|
||||
0xFE, 0x20, 0x20, 0x10, 0x10, 0x20, 0xC0, 0x1F, 0x08, 0x10, 0x10, 0x10, 0x18, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 98
|
||||
0xC0, 0x20, 0x10, 0x10, 0x20, 0x60, 0x80, 0x0F, 0x10, 0x10, 0x10, 0x10, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 99
|
||||
0xC0, 0x20, 0x10, 0x10, 0x20, 0x40, 0xFE, 0x0F, 0x10, 0x10, 0x10, 0x10, 0x08, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 100
|
||||
0xC0, 0x20, 0x10, 0x10, 0x20, 0x60, 0x80, 0x0F, 0x19, 0x11, 0x11, 0x11, 0x19, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 101
|
||||
0x20, 0xFE, 0x22, 0x22, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 102
|
||||
0xC0, 0x20, 0x10, 0x10, 0x20, 0x40, 0xE0, 0x0F, 0x90, 0x90, 0x90, 0x90, 0xC8, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 103
|
||||
0xFE, 0x20, 0x20, 0x10, 0x10, 0x20, 0xC0, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 104
|
||||
0xE2, 0x1F, 0x00, // 105
|
||||
0x00, 0xE2, 0x80, 0xFF, 0x00, 0x00, // 106
|
||||
0xFE, 0x00, 0x00, 0x80, 0x60, 0x20, 0x00, 0x1F, 0x01, 0x01, 0x02, 0x0C, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 107
|
||||
0xFE, 0x1F, 0x00, // 108
|
||||
0xE0, 0x20, 0x20, 0x10, 0x10, 0x60, 0xC0, 0x20, 0x10, 0x10, 0x20, 0xC0, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 109
|
||||
0xE0, 0x20, 0x20, 0x10, 0x10, 0x20, 0xC0, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 110
|
||||
0xC0, 0x20, 0x20, 0x10, 0x20, 0x20, 0xC0, 0x0F, 0x18, 0x10, 0x10, 0x10, 0x18, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 111
|
||||
0xE0, 0x20, 0x20, 0x10, 0x10, 0x20, 0xC0, 0xFF, 0x08, 0x10, 0x10, 0x10, 0x18, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 112
|
||||
0xC0, 0x20, 0x10, 0x10, 0x20, 0x40, 0xE0, 0x0F, 0x10, 0x10, 0x10, 0x10, 0x08, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 113
|
||||
0xE0, 0x20, 0x20, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 114
|
||||
0xE0, 0x20, 0x10, 0x10, 0x20, 0x60, 0x08, 0x11, 0x11, 0x11, 0x12, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 115
|
||||
0x20, 0x20, 0xFC, 0x20, 0x00, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // 116
|
||||
0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x18, 0x10, 0x10, 0x10, 0x08, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 117
|
||||
0x20, 0xE0, 0x00, 0x00, 0x00, 0x80, 0x60, 0x20, 0x00, 0x00, 0x03, 0x1C, 0x1C, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 118
|
||||
0xE0, 0x00, 0x00, 0x00, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x20, 0x00, 0x0F, 0x18, 0x07, 0x00, 0x00, 0x07, 0x18, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 119
|
||||
0x00, 0x20, 0x40, 0x80, 0x80, 0x40, 0x20, 0x10, 0x18, 0x0C, 0x03, 0x03, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 120
|
||||
0x20, 0xE0, 0x00, 0x00, 0x00, 0x80, 0x60, 0x20, 0x00, 0x80, 0x83, 0x7C, 0x1C, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 121
|
||||
0x20, 0x20, 0x20, 0xA0, 0x60, 0x20, 0x18, 0x14, 0x13, 0x11, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 122
|
||||
0x00, 0xF8, 0x06, 0x02, 0x01, 0x3E, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, // 123
|
||||
0xFC, 0x7F, 0x00, // 124
|
||||
0x02, 0x02, 0xFC, 0x00, 0x00, 0x80, 0x80, 0x7E, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, // 125
|
||||
0x00, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 126
|
||||
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,165 +0,0 @@
|
|||
|
||||
|
||||
/*
|
||||
*
|
||||
* roboto32
|
||||
*
|
||||
* created with FontCreator
|
||||
* written by F. Maximilian Thiele
|
||||
*
|
||||
* http://www.apetech.de/fontCreator
|
||||
* me@apetech.de
|
||||
*
|
||||
* File Name : roboto32.h
|
||||
* Date : 18.09.2014
|
||||
* Font size in bytes : 40065
|
||||
* Font width : 10
|
||||
* Font height : 33
|
||||
* Font first char : 32
|
||||
* Font last char : 128
|
||||
* Font used chars : 96
|
||||
*
|
||||
* The font data are defined as
|
||||
*
|
||||
* struct _FONT_ {
|
||||
* uint16_t font_Size_in_Bytes_over_all_included_Size_it_self;
|
||||
* uint8_t font_Width_in_Pixel_for_fixed_drawing;
|
||||
* uint8_t font_Height_in_Pixel_for_all_characters;
|
||||
* unit8_t font_First_Char;
|
||||
* uint8_t font_Char_Count;
|
||||
*
|
||||
* uint8_t font_Char_Widths[font_Last_Char - font_First_Char +1];
|
||||
* // for each character the separate width in pixels,
|
||||
* // characters < 128 have an implicit virtual right empty row
|
||||
*
|
||||
* uint8_t font_data[];
|
||||
* // bit field of all characters
|
||||
*/
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <avr/pgmspace.h>
|
||||
|
||||
#ifndef ROBOTO32_H
|
||||
#define ROBOTO32_H
|
||||
|
||||
#define ROBOTO32_WIDTH 10
|
||||
#define ROBOTO32_HEIGHT 33
|
||||
|
||||
static const uint8_t roboto32[] PROGMEM = {
|
||||
0x9C, 0x81, // size
|
||||
0x0A, // width
|
||||
0x21, // height
|
||||
0x20, // first char
|
||||
0x60, // char count
|
||||
|
||||
// char widths
|
||||
0x00, 0x03, 0x05, 0x11, 0x0E, 0x14, 0x12, 0x02, 0x08, 0x08,
|
||||
0x0D, 0x10, 0x03, 0x07, 0x02, 0x0C, 0x0E, 0x08, 0x0E, 0x0E,
|
||||
0x10, 0x0D, 0x0E, 0x0F, 0x0E, 0x0F, 0x02, 0x04, 0x0D, 0x0D,
|
||||
0x0D, 0x0C, 0x19, 0x13, 0x0F, 0x11, 0x10, 0x0E, 0x0F, 0x11,
|
||||
0x11, 0x02, 0x0E, 0x11, 0x0D, 0x16, 0x11, 0x12, 0x0F, 0x12,
|
||||
0x10, 0x11, 0x11, 0x10, 0x12, 0x1B, 0x12, 0x12, 0x11, 0x05,
|
||||
0x0B, 0x05, 0x0B, 0x0E, 0x06, 0x0D, 0x0E, 0x0D, 0x0D, 0x0E,
|
||||
0x0A, 0x0D, 0x0D, 0x02, 0x05, 0x0E, 0x02, 0x18, 0x0D, 0x0F,
|
||||
0x0E, 0x0D, 0x09, 0x0C, 0x08, 0x0D, 0x0E, 0x16, 0x0E, 0x0E,
|
||||
0x0E, 0x09, 0x01, 0x09, 0x12, 0x00,
|
||||
|
||||
// font data
|
||||
0x00, 0xF8, 0xF8, 0x00, 0xFF, 0xFF, 0x80, 0x87, 0x87, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, // 33
|
||||
0xFC, 0x1C, 0x00, 0x00, 0xFC, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 34
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xF8, 0x08, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x78, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0xF4, 0x7F, 0x05, 0x04, 0x04, 0x04, 0xC4, 0xFE, 0x0F, 0x04, 0x04, 0x04, 0x0C, 0x0C, 0x0C, 0xCC, 0xFE, 0x0F, 0x0C, 0x0C, 0x0C, 0x0C, 0xFC, 0x7F, 0x0D, 0x0C, 0x0C, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 35
|
||||
0x00, 0xC0, 0xF0, 0x30, 0x18, 0x18, 0x1F, 0x1F, 0x18, 0x18, 0x30, 0x70, 0xE0, 0x80, 0x00, 0x0F, 0x1E, 0x30, 0x30, 0x60, 0x60, 0xC0, 0xC0, 0x80, 0x80, 0x00, 0x03, 0x03, 0x78, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x83, 0xFF, 0x7C, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x1E, 0x1E, 0x02, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 36
|
||||
0xE0, 0x30, 0x18, 0x08, 0x08, 0x18, 0x10, 0xF0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x1C, 0x10, 0x30, 0x10, 0x10, 0x18, 0x0F, 0x03, 0x80, 0xE0, 0x38, 0x0C, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xE0, 0x38, 0x0C, 0x07, 0x01, 0x00, 0xF8, 0xFE, 0x03, 0x01, 0x01, 0x01, 0x03, 0xCE, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x02, 0x02, 0x02, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 37
|
||||
0x00, 0x00, 0x00, 0xE0, 0x70, 0x18, 0x18, 0x18, 0x18, 0x18, 0x30, 0xF0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, 0xDE, 0x78, 0x60, 0xF0, 0x98, 0x0C, 0x06, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xFE, 0xC7, 0x81, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0E, 0x1C, 0xB0, 0xE0, 0xF0, 0xBF, 0x0F, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x02, 0x02, 0x02, 0x03, 0x03, 0x01, 0x01, 0x00, 0x01, 0x03, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 38
|
||||
0xFC, 0x0C, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 39
|
||||
0x00, 0x00, 0xC0, 0xF0, 0x38, 0x0C, 0x07, 0x02, 0xE0, 0xFE, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0F, 0x1C, 0x70, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, // 40
|
||||
0x03, 0x06, 0x0C, 0x38, 0xF0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x1F, 0x00, 0x80, 0xC0, 0x70, 0x1C, 0x0F, 0x01, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 41
|
||||
0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x01, 0x81, 0xE3, 0x73, 0x1A, 0x0F, 0x0F, 0x3A, 0x63, 0xC3, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 42
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xFF, 0xFF, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 43
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x20, 0x3F, 0x0F, 0x00, 0x00, 0x00, // 44
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 45
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, // 46
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xF0, 0x38, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xF0, 0x3C, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0xF0, 0x3E, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0E, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 47
|
||||
0x00, 0xC0, 0x70, 0x30, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x30, 0xE0, 0xC0, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x3F, 0xFF, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xE0, 0x7F, 0x1F, 0x00, 0x00, 0x01, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 48
|
||||
0x20, 0x30, 0x30, 0x30, 0x10, 0x10, 0xF8, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 49
|
||||
0xC0, 0xE0, 0x30, 0x10, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x30, 0xE0, 0xC0, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0x70, 0x3F, 0x0F, 0x00, 0x00, 0x80, 0xC0, 0x60, 0x30, 0x1C, 0x0E, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 50
|
||||
0xC0, 0xE0, 0x70, 0x30, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x30, 0xF0, 0xC0, 0x00, 0x01, 0x01, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x60, 0xE0, 0xB0, 0x9F, 0x0F, 0x00, 0x70, 0xE0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC3, 0xFF, 0x3C, 0x00, 0x01, 0x01, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 51
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, 0x38, 0xF8, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x70, 0x38, 0x0E, 0x07, 0x01, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x08, 0x0E, 0x0B, 0x09, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0xFF, 0xFF, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 52
|
||||
0x00, 0xF8, 0xF8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0xFC, 0xFF, 0x20, 0x30, 0x10, 0x10, 0x18, 0x18, 0x30, 0x30, 0x60, 0xE0, 0x80, 0xF0, 0xE0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0x3F, 0x00, 0x01, 0x01, 0x03, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 53
|
||||
0x00, 0x80, 0xE0, 0x70, 0x30, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x10, 0x00, 0x00, 0xFC, 0xFF, 0x61, 0x30, 0x10, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x30, 0xE0, 0xC0, 0x0F, 0x7F, 0xF0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xF1, 0x7F, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x02, 0x02, 0x02, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 54
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x98, 0xD8, 0x78, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xF0, 0x3C, 0x0F, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFE, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 55
|
||||
0x80, 0xE0, 0x70, 0x30, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x30, 0xF0, 0xE0, 0x00, 0x07, 0x1F, 0xB8, 0xB0, 0xE0, 0x60, 0x40, 0x60, 0x60, 0xE0, 0xB0, 0x9C, 0x0F, 0x03, 0xFE, 0xE7, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0xFF, 0x7E, 0x00, 0x01, 0x01, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 56
|
||||
0x00, 0xC0, 0xE0, 0x70, 0x30, 0x18, 0x18, 0x18, 0x18, 0x18, 0x10, 0x70, 0xE0, 0xC0, 0x00, 0x1E, 0xFF, 0xE1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC1, 0xFF, 0xFC, 0x00, 0x00, 0x01, 0x03, 0x03, 0x06, 0x06, 0x06, 0x06, 0x02, 0x03, 0x81, 0xF0, 0x7F, 0x07, 0x00, 0x00, 0x01, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 57
|
||||
0x00, 0x00, 0x0C, 0x0C, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, // 58
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x0C, 0x00, 0x80, 0x80, 0x00, 0x20, 0x3F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, // 59
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0x60, 0x60, 0x20, 0x30, 0x30, 0x18, 0x18, 0x0C, 0x0C, 0x06, 0x01, 0x01, 0x03, 0x03, 0x02, 0x06, 0x04, 0x0C, 0x0C, 0x18, 0x18, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 60
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 61
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0C, 0x0C, 0x08, 0x18, 0x10, 0x30, 0x30, 0x60, 0x60, 0x40, 0xC0, 0x80, 0x30, 0x30, 0x18, 0x18, 0x0C, 0x0C, 0x04, 0x06, 0x06, 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 62
|
||||
0xC0, 0xE0, 0x70, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x30, 0xF0, 0xC0, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0x70, 0x1F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 63
|
||||
0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0x40, 0x60, 0x20, 0x30, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x30, 0x20, 0x60, 0x40, 0xC0, 0x80, 0x00, 0x00, 0xC0, 0xF8, 0x1C, 0x07, 0x01, 0x00, 0x00, 0x00, 0xC0, 0x70, 0x30, 0x18, 0x08, 0x08, 0x08, 0x18, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0E, 0xF8, 0xFF, 0xC3, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xCF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x60, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xE0, 0x3F, 0x01, 0x07, 0x1C, 0x30, 0x60, 0xC0, 0xC0, 0x80, 0x83, 0x03, 0x02, 0x02, 0x02, 0x03, 0x81, 0x80, 0x81, 0x83, 0x02, 0x02, 0x02, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 64
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x78, 0x78, 0xE0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x7C, 0x1F, 0x03, 0x00, 0x00, 0x01, 0x0F, 0x7C, 0xE0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x7C, 0x1F, 0x0F, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0F, 0x0F, 0x7C, 0xE0, 0x80, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 65
|
||||
0xF8, 0xF8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x10, 0x30, 0x70, 0xE0, 0xC0, 0x00, 0xFF, 0xFF, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0xF0, 0x9F, 0x0F, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC1, 0xFF, 0x7E, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 66
|
||||
0x00, 0x80, 0xC0, 0x60, 0x30, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x30, 0x30, 0xE0, 0xC0, 0x00, 0xFC, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x0F, 0x3F, 0xF0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xE0, 0x78, 0x18, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 67
|
||||
0xF8, 0xF8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x10, 0x30, 0x30, 0x60, 0xC0, 0x80, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFE, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xC0, 0x70, 0x3F, 0x0F, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 68
|
||||
0xF8, 0xF8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xFF, 0xFF, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 69
|
||||
0xF8, 0xF8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xFF, 0xFF, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 70
|
||||
0x00, 0x80, 0xC0, 0x60, 0x30, 0x10, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x30, 0x70, 0xE0, 0x80, 0xFC, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x83, 0x83, 0x07, 0x3F, 0x78, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 71
|
||||
0xF8, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xF8, 0xFF, 0xFF, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 72
|
||||
0xF8, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x03, 0x00, 0x00, // 73
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x30, 0xF0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xFF, 0x3F, 0x00, 0x00, 0x01, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 74
|
||||
0xF8, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0x30, 0x18, 0x08, 0x00, 0xFF, 0xFF, 0x40, 0x40, 0x40, 0xE0, 0xF0, 0x98, 0x0C, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x06, 0x0C, 0x38, 0x70, 0xE0, 0xC0, 0x80, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 75
|
||||
0xF8, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 76
|
||||
0xF8, 0xF8, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x78, 0xF8, 0xF8, 0xFF, 0xFF, 0x00, 0x03, 0x1F, 0x78, 0xE0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xF0, 0x3C, 0x0F, 0x01, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0F, 0x3C, 0xF0, 0x80, 0xC0, 0xF8, 0x1E, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 77
|
||||
0xF8, 0xF8, 0x70, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xF8, 0xFF, 0xFF, 0x00, 0x01, 0x03, 0x0E, 0x1C, 0x70, 0xE0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x1C, 0x38, 0xE0, 0xC0, 0xFF, 0xFF, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 78
|
||||
0x00, 0x80, 0xC0, 0x60, 0x30, 0x10, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x30, 0x30, 0xE0, 0xC0, 0x80, 0x00, 0xFE, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0xFC, 0x0F, 0x3F, 0xF0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0x78, 0x3F, 0x07, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 79
|
||||
0xF8, 0xF8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x10, 0x30, 0x70, 0xE0, 0xC0, 0xFF, 0xFF, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xC0, 0x60, 0x7F, 0x1F, 0xFF, 0xFF, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 80
|
||||
0x00, 0x80, 0xC0, 0x60, 0x30, 0x10, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x30, 0x30, 0xE0, 0xC0, 0x80, 0x00, 0xFE, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0xFC, 0x0F, 0x3F, 0xF0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0x78, 0x3F, 0x07, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x07, 0x0E, 0x1C, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 81
|
||||
0xF8, 0xF8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x10, 0x30, 0x70, 0xE0, 0xC0, 0x00, 0xFF, 0xFF, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xE0, 0xB0, 0x3F, 0x0F, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0xFF, 0xFE, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 82
|
||||
0x00, 0x80, 0xE0, 0x70, 0x30, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x10, 0x30, 0xE0, 0xC0, 0x00, 0x00, 0x07, 0x0F, 0x18, 0x30, 0x30, 0x60, 0x60, 0x60, 0xC0, 0xC0, 0xC0, 0x80, 0x80, 0x00, 0x03, 0x03, 0x10, 0x70, 0xE0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x81, 0xC3, 0xFE, 0x3C, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 83
|
||||
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xF8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 84
|
||||
0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xF8, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x7F, 0xF8, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xE0, 0x7F, 0x1F, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 85
|
||||
0x38, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xF8, 0x18, 0x00, 0x00, 0x07, 0x3F, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xF8, 0x1F, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x3E, 0xF0, 0xC0, 0xC0, 0xF8, 0x3F, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 86
|
||||
0x18, 0xF8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xF8, 0x78, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x78, 0x08, 0x00, 0x01, 0x1F, 0xFC, 0xC0, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFC, 0x1F, 0x01, 0x00, 0x03, 0x3F, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x7F, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1F, 0xFC, 0xC0, 0xF0, 0x7F, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1F, 0xFC, 0xC0, 0xF0, 0x7F, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 87
|
||||
0x08, 0x18, 0x78, 0xE0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xF0, 0x38, 0x18, 0x08, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x1E, 0xB8, 0xF0, 0xF0, 0xBC, 0x0E, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, 0x78, 0x1C, 0x0F, 0x03, 0x00, 0x01, 0x03, 0x0E, 0x1C, 0x70, 0xE0, 0x80, 0x00, 0x00, 0x02, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 88
|
||||
0x18, 0x78, 0xE0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xE0, 0x70, 0x38, 0x08, 0x00, 0x00, 0x00, 0x03, 0x0F, 0x3C, 0x70, 0xC0, 0x00, 0xC0, 0xE0, 0x38, 0x1E, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 89
|
||||
0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x98, 0xF8, 0x78, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, 0x38, 0x1C, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0x70, 0x38, 0x0E, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 90
|
||||
0xFF, 0x03, 0x03, 0x03, 0x03, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, // 91
|
||||
0x18, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1F, 0xF8, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1F, 0x78, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0F, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 92
|
||||
0x03, 0x03, 0x03, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x60, 0x60, 0x60, 0x7F, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, // 93
|
||||
0x00, 0x00, 0x00, 0x80, 0xF0, 0x18, 0xF0, 0xC0, 0x00, 0x00, 0x00, 0x40, 0x78, 0x1E, 0x07, 0x00, 0x00, 0x00, 0x07, 0x1E, 0x78, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 94
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 95
|
||||
0x08, 0x08, 0x18, 0x30, 0x60, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 96
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x38, 0x0C, 0x06, 0x06, 0x02, 0x02, 0x02, 0x06, 0x06, 0x1C, 0xF8, 0xE0, 0xF8, 0xDC, 0x06, 0x06, 0x02, 0x03, 0x03, 0x03, 0x03, 0x83, 0xC3, 0xFF, 0xFF, 0x00, 0x01, 0x03, 0x03, 0x02, 0x02, 0x02, 0x03, 0x01, 0x01, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 97
|
||||
0xFC, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x18, 0x0C, 0x04, 0x06, 0x02, 0x02, 0x06, 0x06, 0x0E, 0x1C, 0xF8, 0xE0, 0xFF, 0xFF, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x3F, 0x03, 0x03, 0x00, 0x01, 0x03, 0x03, 0x02, 0x02, 0x02, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 98
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xF8, 0x1C, 0x06, 0x06, 0x02, 0x02, 0x02, 0x06, 0x06, 0x0C, 0x78, 0x70, 0x7F, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xE0, 0x60, 0x00, 0x00, 0x01, 0x03, 0x03, 0x02, 0x02, 0x02, 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 99
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFC, 0xE0, 0xF8, 0x1C, 0x0E, 0x06, 0x06, 0x02, 0x02, 0x06, 0x04, 0x0C, 0xFF, 0xFF, 0x3F, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0x01, 0x03, 0x03, 0x02, 0x02, 0x02, 0x03, 0x01, 0x01, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 100
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x78, 0x1C, 0x0C, 0x06, 0x02, 0x02, 0x02, 0x06, 0x06, 0x0C, 0xF8, 0xF0, 0x07, 0x7F, 0xF3, 0xC3, 0x83, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x83, 0x03, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 101
|
||||
0x00, 0x00, 0x00, 0xF0, 0xFC, 0x0C, 0x06, 0x06, 0x06, 0x04, 0x06, 0x06, 0x06, 0xFF, 0xFF, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 102
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xF8, 0x1C, 0x0E, 0x06, 0x06, 0x02, 0x02, 0x06, 0x04, 0x0C, 0xF0, 0xFE, 0x3F, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x80, 0xC1, 0x83, 0x83, 0x82, 0x82, 0x82, 0x83, 0xC3, 0xE1, 0x7F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, // 103
|
||||
0xFC, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x30, 0x08, 0x04, 0x06, 0x02, 0x02, 0x06, 0x06, 0x0E, 0x7C, 0xF8, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 104
|
||||
0x0C, 0x0C, 0xFE, 0xFE, 0xFF, 0xFF, 0x03, 0x03, 0x00, 0x00, // 105
|
||||
0x00, 0x00, 0x00, 0x0C, 0x0C, 0x00, 0x00, 0x00, 0xFE, 0xFE, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x80, 0x80, 0xE0, 0x7F, 0x1F, 0x80, 0x80, 0x00, 0x00, 0x00, // 106
|
||||
0xFC, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x80, 0xC0, 0x60, 0x38, 0x1C, 0x0E, 0x06, 0x02, 0x00, 0xFF, 0xFF, 0x03, 0x03, 0x03, 0x07, 0x0E, 0x18, 0x70, 0xE0, 0xC0, 0x80, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 107
|
||||
0xFC, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x03, 0x00, 0x00, // 108
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFE, 0x30, 0x0C, 0x04, 0x06, 0x02, 0x02, 0x06, 0x06, 0x0E, 0xFC, 0xF0, 0x38, 0x0C, 0x04, 0x06, 0x02, 0x02, 0x06, 0x06, 0x0C, 0xFC, 0xF0, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 109
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFE, 0x30, 0x08, 0x04, 0x06, 0x02, 0x02, 0x06, 0x06, 0x0E, 0x7C, 0xF8, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 110
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x78, 0x1C, 0x0C, 0x06, 0x06, 0x02, 0x02, 0x06, 0x06, 0x0C, 0x1C, 0xF8, 0xE0, 0x07, 0x7F, 0xF0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xFD, 0x3F, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 111
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFE, 0x18, 0x0C, 0x06, 0x06, 0x02, 0x02, 0x06, 0x06, 0x0E, 0x1C, 0xF8, 0xE0, 0xFF, 0xFF, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xFF, 0x3F, 0xFF, 0xFF, 0x00, 0x01, 0x03, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x01, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 112
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xF8, 0x1C, 0x0E, 0x06, 0x02, 0x02, 0x02, 0x06, 0x04, 0x0C, 0xFC, 0xFE, 0x3F, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0x01, 0x03, 0x03, 0x02, 0x02, 0x02, 0x03, 0x01, 0x01, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, // 113
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFE, 0x30, 0x0C, 0x04, 0x06, 0x06, 0x06, 0x02, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 114
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xFC, 0x8C, 0x06, 0x06, 0x02, 0x02, 0x06, 0x06, 0x0E, 0x3C, 0x38, 0xE0, 0xE0, 0x01, 0x01, 0x03, 0x03, 0x02, 0x06, 0x06, 0x0C, 0xDC, 0xF8, 0x00, 0x01, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 115
|
||||
0x00, 0x00, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0xFF, 0xFF, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 116
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFE, 0x1F, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7F, 0xFF, 0x00, 0x00, 0x01, 0x03, 0x03, 0x02, 0x02, 0x02, 0x03, 0x01, 0x01, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 117
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x3E, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xF8, 0x1E, 0x06, 0x00, 0x00, 0x00, 0x07, 0x3E, 0xF0, 0x80, 0xC0, 0xF8, 0x1F, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 118
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x3E, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0xF8, 0x1E, 0x1E, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x80, 0xF8, 0x3E, 0x06, 0x00, 0x00, 0x03, 0x1F, 0xFC, 0xC0, 0xE0, 0x7C, 0x0F, 0x01, 0x00, 0x00, 0x01, 0x0F, 0x7C, 0xE0, 0x80, 0xF8, 0x1F, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 119
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x1E, 0x38, 0xE0, 0xC0, 0x00, 0x80, 0xE0, 0x70, 0x3C, 0x0E, 0x06, 0x02, 0x00, 0x00, 0xC0, 0xE0, 0x38, 0x1D, 0x07, 0x0F, 0x1C, 0x70, 0xE0, 0x80, 0x00, 0x00, 0x02, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 120
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x3E, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xF8, 0x3E, 0x06, 0x00, 0x00, 0x01, 0x07, 0x3E, 0xF8, 0xC0, 0xC0, 0xF8, 0x3F, 0x07, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0xC0, 0x78, 0x1F, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 121
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x86, 0xC6, 0x76, 0x3E, 0x0E, 0x06, 0x00, 0x00, 0x80, 0xC0, 0x70, 0x38, 0x1C, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 122
|
||||
0x00, 0x00, 0x00, 0x00, 0xF0, 0xF8, 0x0C, 0x04, 0x06, 0x00, 0x00, 0x80, 0xE0, 0x7F, 0x1F, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x0E, 0xFC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x3F, 0x60, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 123
|
||||
0xF8, 0xFF, 0xFF, 0x3F, 0x00, // 124
|
||||
0x02, 0x06, 0x0C, 0x1C, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFC, 0x06, 0x03, 0x03, 0x80, 0xC0, 0xC0, 0x70, 0x3F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 125
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0x40, 0x40, 0xC0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x06, 0x06, 0x04, 0x04, 0x06, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 126
|
||||
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,74 +0,0 @@
|
|||
|
||||
|
||||
/*
|
||||
*
|
||||
* roboto70
|
||||
*
|
||||
* created with FontCreator
|
||||
* written by F. Maximilian Thiele
|
||||
*
|
||||
* http://www.apetech.de/fontCreator
|
||||
* me@apetech.de
|
||||
*
|
||||
* File Name : roboto70.h
|
||||
* Date : 18.09.2014
|
||||
* Font size in bytes : 15623
|
||||
* Font width : 10
|
||||
* Font height : 51
|
||||
* Font first char : 48
|
||||
* Font last char : 59
|
||||
* Font used chars : 11
|
||||
*
|
||||
* The font data are defined as
|
||||
*
|
||||
* struct _FONT_ {
|
||||
* uint16_t font_Size_in_Bytes_over_all_included_Size_it_self;
|
||||
* uint8_t font_Width_in_Pixel_for_fixed_drawing;
|
||||
* uint8_t font_Height_in_Pixel_for_all_characters;
|
||||
* unit8_t font_First_Char;
|
||||
* uint8_t font_Char_Count;
|
||||
*
|
||||
* uint8_t font_Char_Widths[font_Last_Char - font_First_Char +1];
|
||||
* // for each character the separate width in pixels,
|
||||
* // characters < 128 have an implicit virtual right empty row
|
||||
*
|
||||
* uint8_t font_data[];
|
||||
* // bit field of all characters
|
||||
*/
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <avr/pgmspace.h>
|
||||
|
||||
#ifndef ROBOTO70_H
|
||||
#define ROBOTO70_H
|
||||
|
||||
#define ROBOTO70_WIDTH 10
|
||||
#define ROBOTO70_HEIGHT 51
|
||||
|
||||
static const uint8_t roboto70[] PROGMEM = {
|
||||
0x3D, 0x07, // size
|
||||
0x0A, // width
|
||||
0x33, // height
|
||||
0x30, // first char
|
||||
0x0B, // char count
|
||||
|
||||
// char widths
|
||||
0x1F, 0x10, 0x20, 0x20, 0x24, 0x1D, 0x1F, 0x20, 0x20, 0x1F,
|
||||
0x04,
|
||||
|
||||
// font data
|
||||
0x00, 0x00, 0x80, 0xE0, 0xF0, 0xF8, 0xFC, 0x3C, 0x1E, 0x1E, 0x0F, 0x0F, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x0F, 0x0F, 0x1E, 0x3E, 0x7C, 0xFC, 0xF8, 0xF0, 0xC0, 0x80, 0x00, 0x00, 0xC0, 0xFE, 0xFF, 0xFF, 0x3F, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFC, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x01, 0x07, 0x1F, 0x3F, 0x7F, 0xFC, 0xF0, 0xE0, 0xC0, 0xC0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xC0, 0xC0, 0xE0, 0xF0, 0xFC, 0x7F, 0x3F, 0x1F, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x60, 0x60, 0x60, 0x60, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0x60, 0x60, 0x60, 0x60, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 48
|
||||
0x38, 0x38, 0x38, 0x38, 0x3C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1E, 0x1E, 0x1E, 0xFE, 0xFE, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, // 49
|
||||
0x00, 0x80, 0xE0, 0xF0, 0xF8, 0x7C, 0x3C, 0x1E, 0x1E, 0x0F, 0x0F, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x0F, 0x0F, 0x1E, 0x3E, 0x7C, 0xFC, 0xF8, 0xF0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x7F, 0x7F, 0x7F, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xE0, 0xF0, 0xFE, 0x7F, 0x3F, 0x0F, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0x7E, 0x3F, 0x1F, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0xF0, 0xF8, 0x7E, 0x3F, 0x1F, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFE, 0xBF, 0x9F, 0x87, 0x83, 0x81, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, // 50
|
||||
0x00, 0x00, 0x80, 0xE0, 0xF0, 0xF8, 0xFC, 0x7C, 0x3E, 0x1E, 0x0F, 0x0F, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x0F, 0x0F, 0x1E, 0x1E, 0x3E, 0xFC, 0xF8, 0xF0, 0xE0, 0x80, 0x00, 0x00, 0x00, 0x1C, 0x1F, 0x1F, 0x1F, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xFF, 0xFF, 0xFF, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xC0, 0xC0, 0xC0, 0xE0, 0xF0, 0x78, 0x7C, 0x3F, 0x1F, 0x0F, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x07, 0x07, 0x07, 0x07, 0x0E, 0x0E, 0x1E, 0x3C, 0x7C, 0xF8, 0xF0, 0xE0, 0x80, 0x00, 0x70, 0xF0, 0xF0, 0xF0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xEF, 0xFF, 0xFF, 0xFF, 0x38, 0x00, 0x07, 0x0F, 0x3F, 0x7F, 0x7E, 0xF8, 0xF0, 0xE0, 0xC0, 0xC0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xC0, 0xC0, 0xE0, 0xE0, 0xF0, 0xFC, 0x7F, 0x3F, 0x0F, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x60, 0x60, 0x60, 0x60, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0x60, 0x60, 0x60, 0x60, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 51
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xF0, 0xF8, 0xFE, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xF0, 0xF8, 0xFE, 0x3F, 0x1F, 0x07, 0x03, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xE0, 0xF0, 0xFC, 0x7E, 0x3F, 0x0F, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, 0xF8, 0xFC, 0x7F, 0x1F, 0x0F, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x1E, 0x1F, 0x1F, 0x1F, 0x1F, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0xFF, 0xFF, 0xFF, 0xFF, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 52
|
||||
0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x3F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xE0, 0xF0, 0x70, 0x78, 0x78, 0x38, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x78, 0x78, 0xF8, 0xF0, 0xE0, 0xE0, 0xC0, 0x00, 0x00, 0x00, 0x08, 0x0F, 0x0F, 0x0F, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x1F, 0xFF, 0xFF, 0xFE, 0xF0, 0xE0, 0xE0, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x1F, 0x3F, 0x7F, 0xFC, 0xF0, 0xE0, 0xE0, 0xC0, 0xC0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xC0, 0xC0, 0xE0, 0xF0, 0xFC, 0x7F, 0x3F, 0x1F, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x60, 0x60, 0x60, 0x60, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0x60, 0x60, 0x60, 0x60, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 53
|
||||
0x00, 0x00, 0x00, 0x80, 0xE0, 0xF0, 0xF8, 0xF8, 0x7C, 0x3E, 0x1E, 0x0F, 0x0F, 0x0F, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x0F, 0x0F, 0x1E, 0x1E, 0x04, 0x00, 0x00, 0x00, 0x00, 0x80, 0xF8, 0xFE, 0xFF, 0x7F, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0xE0, 0xE0, 0x70, 0x78, 0x38, 0x3C, 0x1C, 0x1C, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1C, 0x3C, 0x7C, 0x78, 0xF8, 0xF0, 0xE0, 0xC0, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x1F, 0xFF, 0xFF, 0xFE, 0xF0, 0x0F, 0xFF, 0xFF, 0xFF, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x07, 0x0F, 0x3F, 0x7F, 0x7C, 0xF8, 0xF0, 0xE0, 0xC0, 0xC0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xC0, 0xC0, 0xE0, 0xF0, 0xF8, 0x7E, 0x3F, 0x1F, 0x0F, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x60, 0x60, 0x60, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0x60, 0x60, 0x60, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 54
|
||||
0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x8F, 0xCF, 0xFF, 0xFF, 0x7F, 0x3F, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, 0xF8, 0xFC, 0x3F, 0x1F, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xF0, 0xFC, 0xFF, 0x3F, 0x0F, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xF8, 0xFF, 0xFF, 0x3F, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFE, 0xFF, 0xFF, 0x3F, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 55
|
||||
0x00, 0x00, 0x00, 0xC0, 0xF0, 0xF8, 0xFC, 0x7C, 0x3E, 0x1E, 0x0F, 0x0F, 0x0F, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x0F, 0x0F, 0x1F, 0x1E, 0x3E, 0xFC, 0xF8, 0xF0, 0xE0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x01, 0x07, 0x1F, 0x3F, 0x3E, 0x78, 0xF0, 0xE0, 0xE0, 0xC0, 0xC0, 0xC0, 0x80, 0x80, 0x80, 0x80, 0x80, 0xC0, 0xC0, 0xC0, 0xE0, 0xE0, 0xF0, 0x7C, 0x3F, 0x1F, 0x0F, 0x07, 0x01, 0x00, 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0x3C, 0x1C, 0x1E, 0x0E, 0x07, 0x07, 0x07, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x07, 0x07, 0x07, 0x0F, 0x0E, 0x1E, 0x3C, 0x7C, 0xF8, 0xF0, 0xE0, 0xC0, 0x00, 0x78, 0xFF, 0xFF, 0xFF, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x07, 0x1F, 0x3F, 0x7F, 0xFC, 0xF8, 0xF0, 0xE0, 0xC0, 0xC0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xC0, 0xC0, 0xC0, 0xE0, 0xF0, 0xF8, 0xFE, 0x7F, 0x3F, 0x0F, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x60, 0x60, 0x60, 0x60, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0x60, 0x60, 0x60, 0x60, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 56
|
||||
0x00, 0x00, 0x80, 0xC0, 0xF0, 0xF8, 0xFC, 0x7C, 0x3E, 0x1E, 0x0F, 0x0F, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x0F, 0x0F, 0x1E, 0x1E, 0x3C, 0xFC, 0xF8, 0xF0, 0xE0, 0xC0, 0x00, 0x00, 0xE0, 0xFE, 0xFF, 0xFF, 0x3F, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1F, 0xFF, 0xFF, 0xFF, 0xF0, 0x3F, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x01, 0x07, 0x1F, 0x3F, 0x7F, 0xFC, 0xF8, 0xF0, 0xE0, 0xC0, 0xC0, 0xC0, 0x80, 0x80, 0x80, 0x80, 0x80, 0xC0, 0xC0, 0xC0, 0xE0, 0xE0, 0x70, 0x78, 0x3E, 0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xC0, 0xC0, 0xC0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xC0, 0xC0, 0xE0, 0xE0, 0xF0, 0xFC, 0x7F, 0x3F, 0x1F, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x60, 0x60, 0x60, 0x60, 0x60, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0x60, 0x60, 0x60, 0x60, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 57
|
||||
0x00, 0x00, 0x00, 0x00, 0xE0, 0xE0, 0xE0, 0xE0, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xE0, 0xE0, 0xE0, 0x60, 0x60, 0x60, 0x60 // 58
|
||||
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,63 +0,0 @@
|
|||
#include <SPI.h> //uncomment when using SPI_MODE_NORMAL or SPI_MODE_EXTENDED
|
||||
#include <ILI_SdSpi.h>
|
||||
#include <ILI_SdFatConfig.h>
|
||||
#include <ILI9341_due_gText.h>
|
||||
#include <ILI9341_due.h>
|
||||
|
||||
#include "fonts\jokerman_255.h"
|
||||
|
||||
#define TFT_DC 10
|
||||
#define TFT_CS 8
|
||||
#define TFT_RST 9
|
||||
|
||||
ILI9341_due myTFT(TFT_CS, TFT_DC, TFT_RST);
|
||||
ILI9341_due_gText t1(&myTFT);
|
||||
|
||||
void setup()
|
||||
{
|
||||
Serial.begin(9600);
|
||||
|
||||
bool result = myTFT.begin();
|
||||
|
||||
Serial.print("TFT begin successful: ");
|
||||
Serial.println(result ? "YES" : "NO");
|
||||
myTFT.fillScreen(ILI9341_BLACK);
|
||||
|
||||
t1.defineArea(18, 32, 222, 287);
|
||||
t1.selectFont(jokerman_255);
|
||||
//t1.setFontMode(gTextFontMode_Transparent);
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
t1.setFontColor(255,230,0,0,0,0);
|
||||
t1.drawString("0", gTextAlignMiddleCenter, gTextEraseFullLine);
|
||||
delay(750);
|
||||
t1.setFontColor(232,157,12);
|
||||
t1.drawString("1", gTextAlignMiddleCenter, gTextEraseFullLine);
|
||||
delay(750);
|
||||
t1.setFontColor(255,88,0);
|
||||
t1.drawString("2", gTextAlignMiddleCenter, gTextEraseFullLine);
|
||||
delay(750);
|
||||
t1.setFontColor(232,12,15);
|
||||
t1.drawString("3", gTextAlignMiddleCenter, gTextEraseFullLine);
|
||||
delay(750);
|
||||
t1.setFontColor(227,13,255);
|
||||
t1.drawString("4", gTextAlignMiddleCenter, gTextEraseFullLine);
|
||||
delay(750);
|
||||
t1.setFontColor(57,0,255);
|
||||
t1.drawString("5", gTextAlignMiddleCenter, gTextEraseFullLine);
|
||||
delay(750);
|
||||
t1.setFontColor(12,103,232);
|
||||
t1.drawString("6", gTextAlignMiddleCenter, gTextEraseFullLine);
|
||||
delay(750);
|
||||
t1.setFontColor(0,255,243);
|
||||
t1.drawString("7", gTextAlignMiddleCenter, gTextEraseFullLine);
|
||||
delay(750);
|
||||
t1.setFontColor(12,232,73);
|
||||
t1.drawString("8", gTextAlignMiddleCenter, gTextEraseFullLine);
|
||||
delay(750);
|
||||
t1.setFontColor(132,255,13);
|
||||
t1.drawString("9", gTextAlignMiddleCenter, gTextEraseFullLine);
|
||||
delay(750);
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
//#include <SPI.h> //uncomment when using SPI_MODE_NORMAL or SPI_MODE_EXTENDED
|
||||
#include <ILI_SdSpi.h>
|
||||
#include <ILI_SdFatConfig.h>
|
||||
#include <ILI9341_due_gText.h>
|
||||
#include <ILI9341_due.h>
|
||||
|
||||
#include "fonts\Arial_bold_14.h"
|
||||
|
||||
#define TFT_CS 10
|
||||
#define TFT_DC 9
|
||||
|
||||
ILI9341_due myTFT(TFT_CS, TFT_DC);
|
||||
|
||||
void setup()
|
||||
{
|
||||
Serial.begin(9600);
|
||||
|
||||
bool result = myTFT.begin();
|
||||
|
||||
Serial.print("TFT begin successful: ");
|
||||
Serial.println(result ? "YES" : "NO");
|
||||
|
||||
myTFT.fillScreen(ILI9341_BLUE);
|
||||
myTFT.setRotation(iliRotation270);
|
||||
|
||||
ILI9341_due_gText t1(&myTFT);
|
||||
t1.defineArea(100, 110, 220, 130);
|
||||
t1.selectFont(Arial_bold_14);
|
||||
t1.setFontLetterSpacing(5);
|
||||
t1.setFontColor(ILI9341_WHITE, ILI9341_BLUE);
|
||||
t1.drawString("Hello World", gTextAlignMiddleCenter);
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
|
||||
/* add main program code here */
|
||||
|
||||
}
|
|
@ -1,410 +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 <SPI.h>
|
||||
#include <ILI_SdSpi.h>
|
||||
#include <ILI_SdFatConfig.h>
|
||||
#include <ILI9341_due_gText.h>
|
||||
#include <ILI9341_due.h>
|
||||
|
||||
// For the Adafruit shield, these are the default.
|
||||
|
||||
// For the Adafruit shield, these are the default.
|
||||
#define TFT_DC PA15
|
||||
#define TFT_CS PB4
|
||||
#define rst PB3
|
||||
|
||||
// Use hardware SPI (on Uno, #13, #12, #11) and the above for CS/DC
|
||||
ILI9341_due tft = ILI9341_due(TFT_CS, TFT_DC, rst);
|
||||
|
||||
void setup() {
|
||||
delay (5000);
|
||||
Serial.begin(115200);
|
||||
while (!Serial) ; // wait for Arduino Serial Monitor
|
||||
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)"));
|
||||
|
||||
Serial.print(F("Screen fill "));
|
||||
Serial.println(testFillScreen());
|
||||
delay(200);
|
||||
|
||||
Serial.print(F("Text "));
|
||||
Serial.println(testText());
|
||||
delay(600);
|
||||
|
||||
Serial.print(F("Lines "));
|
||||
Serial.println(testLines(ILI9341_CYAN));
|
||||
delay(200);
|
||||
|
||||
Serial.print(F("Horiz/Vert Lines "));
|
||||
Serial.println(testFastLines(ILI9341_RED, ILI9341_BLUE));
|
||||
delay(200);
|
||||
|
||||
Serial.print(F("Rectangles (outline) "));
|
||||
Serial.println(testRects(ILI9341_GREEN));
|
||||
delay(200);
|
||||
|
||||
Serial.print(F("Rectangles (filled) "));
|
||||
Serial.println(testFilledRects(ILI9341_YELLOW, ILI9341_MAGENTA));
|
||||
delay(200);
|
||||
|
||||
Serial.print(F("Circles (filled) "));
|
||||
Serial.println(testFilledCircles(10, ILI9341_MAGENTA));
|
||||
|
||||
Serial.print(F("Circles (outline) "));
|
||||
Serial.println(testCircles(10, ILI9341_WHITE));
|
||||
delay(200);
|
||||
|
||||
Serial.print(F("Triangles (outline) "));
|
||||
Serial.println(testTriangles());
|
||||
delay(200);
|
||||
|
||||
Serial.print(F("Triangles (filled) "));
|
||||
Serial.println(testFilledTriangles());
|
||||
delay(200);
|
||||
|
||||
Serial.print(F("Rounded rects (outline) "));
|
||||
Serial.println(testRoundRects());
|
||||
delay(200);
|
||||
|
||||
Serial.print(F("Rounded rects (filled) "));
|
||||
Serial.println(testFilledRoundRects());
|
||||
delay(200);
|
||||
|
||||
Serial.println(F("Done!"));
|
||||
|
||||
}
|
||||
|
||||
|
||||
void loop(void) {
|
||||
runTests();
|
||||
return;
|
||||
for(uint8_t rotation=0; rotation<4; rotation++) {
|
||||
tft.setRotation((iliRotation)rotation);
|
||||
testText();
|
||||
delay(1000);
|
||||
}
|
||||
}
|
||||
|
||||
void runTests()
|
||||
{
|
||||
Serial.print(F("Screen fill "));
|
||||
Serial.println(testFillScreen());
|
||||
// delay(200);
|
||||
|
||||
Serial.print(F("Text "));
|
||||
Serial.println(testText());
|
||||
// delay(600);
|
||||
|
||||
Serial.print(F("Lines "));
|
||||
Serial.println(testLines(ILI9341_CYAN));
|
||||
// delay(200);
|
||||
|
||||
Serial.print(F("Horiz/Vert Lines "));
|
||||
Serial.println(testFastLines(ILI9341_RED, ILI9341_BLUE));
|
||||
// delay(200);
|
||||
|
||||
Serial.print(F("Rectangles (outline) "));
|
||||
Serial.println(testRects(ILI9341_GREEN));
|
||||
delay(200);
|
||||
|
||||
Serial.print(F("Rectangles (filled) "));
|
||||
Serial.println(testFilledRects(ILI9341_YELLOW, ILI9341_MAGENTA));
|
||||
// delay(200);
|
||||
|
||||
Serial.print(F("Circles (filled) "));
|
||||
Serial.println(testFilledCircles(10, ILI9341_MAGENTA));
|
||||
|
||||
Serial.print(F("Circles (outline) "));
|
||||
Serial.println(testCircles(10, ILI9341_WHITE));
|
||||
// delay(200);
|
||||
|
||||
Serial.print(F("Triangles (outline) "));
|
||||
Serial.println(testTriangles());
|
||||
// delay(200);
|
||||
|
||||
Serial.print(F("Triangles (filled) "));
|
||||
Serial.println(testFilledTriangles());
|
||||
// delay(200);
|
||||
|
||||
Serial.print(F("Rounded rects (outline) "));
|
||||
Serial.println(testRoundRects());
|
||||
// delay(200);
|
||||
|
||||
Serial.print(F("Rounded rects (filled) "));
|
||||
Serial.println(testFilledRoundRects());
|
||||
// delay(200);
|
||||
|
||||
|
||||
}
|
||||
|
||||
unsigned long testFillScreen() {
|
||||
unsigned long start = micros();
|
||||
// tft.fillScreen(ILI9341_BLACK);
|
||||
tft.fillScreen(ILI9341_RED);
|
||||
tft.fillScreen(ILI9341_GREEN);
|
||||
tft.fillScreen(ILI9341_BLUE);
|
||||
tft.fillScreen(ILI9341_BLACK);
|
||||
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);
|
||||
|
||||
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
|
||||
|
||||
tft.fillScreen(ILI9341_BLACK);
|
||||
|
||||
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;
|
||||
|
||||
tft.fillScreen(ILI9341_BLACK);
|
||||
|
||||
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;
|
||||
|
||||
tft.fillScreen(ILI9341_BLACK);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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(0, 0, 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, i));
|
||||
t += micros() - start;
|
||||
tft.drawTriangle(cx, cy - i, cx - i, cy + i, cx + i, cy + i,
|
||||
tft.color565(i, i, 0));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
return micros() - start;
|
||||
}
|
|
@ -1,427 +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 <ILI_SdSpi.h>
|
||||
#include <ILI_SdFatConfig.h>
|
||||
#include <ILI9341_due_gText.h>
|
||||
#include <ILI9341_due.h>
|
||||
#include "fonts\Arial_bold_14.h"
|
||||
|
||||
|
||||
#define TFT_DC 10
|
||||
#define TFT_CS 8
|
||||
#define TFT_RST 9
|
||||
|
||||
// Use hardware SPI (on Uno, #13, #12, #11) and the above for CS/DC
|
||||
ILI9341_due tft = ILI9341_due(TFT_CS, TFT_DC, TFT_RST);
|
||||
|
||||
ILI9341_due_gText t1(&tft);
|
||||
long Screenfill,
|
||||
Text,
|
||||
Lines,
|
||||
HorizVertLines,
|
||||
Rectanglesoutline,
|
||||
Rectanglesfilled,
|
||||
Circlesfilled,
|
||||
Circlesoutline,
|
||||
Trianglesoutline,
|
||||
Trianglesfilled,
|
||||
Roundedrectsoutline,
|
||||
Roundedrectsfilled;
|
||||
|
||||
void setup() {
|
||||
|
||||
|
||||
Serial.begin(9600);
|
||||
while (!Serial) ; // wait for Arduino Serial Monitor
|
||||
Serial.println("ILI9341 Test!");
|
||||
|
||||
tft.begin();
|
||||
tft.setRotation(iliRotation270);
|
||||
tft.fillScreen(ILI9341_BLUE);
|
||||
t1.defineArea(30, 30, 26, 12, Arial_bold_14);
|
||||
t1.selectFont(Arial_bold_14);
|
||||
t1.setFontLetterSpacing(2);
|
||||
t1.setFontColor(ILI9341_WHITE, ILI9341_BLUE);
|
||||
|
||||
#if SPI_MODE_NORMAL
|
||||
char mode[] = "SPI_MODE_NORMAL";
|
||||
#elif SPI_MODE_EXTENDED
|
||||
char mode[] = "SPI_MODE_EXTENDED";
|
||||
#elif SPI_MODE_DMA
|
||||
char mode[] = "SPI_MODE_DMA";
|
||||
|
||||
#endif
|
||||
t1.drawString(mode, tft.width()/2 - t1.stringWidth(mode) / 2 - 30, 80);
|
||||
|
||||
delay(3000);
|
||||
tft.setRotation(iliRotation0);
|
||||
// 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)"));
|
||||
|
||||
Serial.print(F("Screen fill "));
|
||||
unsigned long start = micros();
|
||||
Serial.println(Screenfill = testFillScreen());
|
||||
// delay(200);
|
||||
|
||||
Serial.print(F("Text "));
|
||||
Serial.println(Text = testText());
|
||||
// delay(200);
|
||||
|
||||
Serial.print(F("Lines "));
|
||||
Serial.println(Lines = testLines(ILI9341_CYAN));
|
||||
// delay(200);
|
||||
|
||||
Serial.print(F("Horiz/Vert Lines "));
|
||||
Serial.println(HorizVertLines = testFastLines(ILI9341_RED, ILI9341_BLUE));
|
||||
// delay(200);
|
||||
|
||||
Serial.print(F("Rectangles (outline) "));
|
||||
Serial.println(Rectanglesoutline = testRects(ILI9341_GREEN));
|
||||
// delay(200);
|
||||
|
||||
Serial.print(F("Rectangles (filled) "));
|
||||
Serial.println(Rectanglesfilled = testFilledRects(ILI9341_YELLOW, ILI9341_MAGENTA));
|
||||
// delay(200);
|
||||
|
||||
Serial.print(F("Circles (filled) "));
|
||||
Serial.println(Circlesfilled = testFilledCircles(10, ILI9341_MAGENTA));
|
||||
|
||||
Serial.print(F("Circles (outline) "));
|
||||
Serial.println(Circlesoutline = testCircles(10, ILI9341_WHITE));
|
||||
// delay(200);
|
||||
|
||||
Serial.print(F("Triangles (outline) "));
|
||||
Serial.println(Trianglesoutline = testTriangles());
|
||||
// delay(200);
|
||||
|
||||
Serial.print(F("Triangles (filled) "));
|
||||
Serial.println(Trianglesfilled = testFilledTriangles());
|
||||
// delay(200);
|
||||
|
||||
Serial.print(F("Rounded rects (outline) "));
|
||||
Serial.println(Roundedrectsoutline = testRoundRects());
|
||||
// delay(200);
|
||||
|
||||
Serial.print(F("Rounded rects (filled) "));
|
||||
Serial.println(Roundedrectsfilled = testFilledRoundRects());
|
||||
// delay(200);
|
||||
|
||||
|
||||
Serial.println(F("Done!"));
|
||||
|
||||
tft.fillScreen(ILI9341_BLUE);
|
||||
tft.setRotation(iliRotation270);
|
||||
t1.cursorToXY(45, 80);
|
||||
t1.print("Total time: ");
|
||||
t1.print((micros() - start)/1000);
|
||||
t1.print(" ms");
|
||||
|
||||
delay(2000);
|
||||
printStats();
|
||||
|
||||
}
|
||||
|
||||
void printStats()
|
||||
{
|
||||
tft.setRotation(iliRotation270);
|
||||
tft.fillScreen(ILI9341_BLUE);
|
||||
t1.cursorTo(0, 0);
|
||||
t1.print("Screen fill "); t1.cursorTo(18); t1.print(Screenfill);
|
||||
t1.cursorTo(0, 1);
|
||||
t1.print("Text "); t1.cursorTo(18); t1.print(Text);
|
||||
t1.cursorTo(0, 2);
|
||||
t1.print("Lines "); t1.cursorTo(18); t1.print(Lines);
|
||||
t1.cursorTo(0, 3);
|
||||
t1.print("Horiz/Vert Lines "); t1.cursorTo(18); t1.print(HorizVertLines);
|
||||
t1.cursorTo(0, 4);
|
||||
t1.print("Rectangles (outline) "); t1.cursorTo(18); t1.print(Rectanglesoutline);
|
||||
t1.cursorTo(0, 5);
|
||||
t1.print("Rectangles (filled) "); t1.cursorTo(18); t1.print(Rectanglesfilled);
|
||||
t1.cursorTo(0, 6);
|
||||
t1.print("Circles (filled) "); t1.cursorTo(18); t1.print(Circlesfilled);
|
||||
t1.cursorTo(0, 7);
|
||||
t1.print("Circles (outline) "); t1.cursorTo(18); t1.print(Circlesoutline);
|
||||
t1.cursorTo(0, 8);
|
||||
t1.print("Triangles (outline) "); t1.cursorTo(18); t1.print(Trianglesoutline);
|
||||
t1.cursorTo(0, 9);
|
||||
t1.print("Triangles (filled) "); t1.cursorTo(18); t1.print(Trianglesfilled);
|
||||
t1.cursorTo(0, 10);
|
||||
t1.print("Rounded rects (outline) "); t1.cursorTo(18); t1.print(Roundedrectsoutline);
|
||||
t1.cursorTo(0, 11);
|
||||
t1.print("Rounded rects (filled) "); t1.cursorTo(18); t1.print(Roundedrectsfilled);
|
||||
|
||||
}
|
||||
|
||||
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);
|
||||
tft.fillScreen(ILI9341_RED);
|
||||
tft.fillScreen(ILI9341_GREEN);
|
||||
tft.fillScreen(ILI9341_BLUE);
|
||||
tft.fillScreen(ILI9341_BLACK);
|
||||
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);
|
||||
|
||||
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
|
||||
|
||||
tft.fillScreen(ILI9341_BLACK);
|
||||
|
||||
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;
|
||||
|
||||
tft.fillScreen(ILI9341_BLACK);
|
||||
|
||||
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;
|
||||
|
||||
tft.fillScreen(ILI9341_BLACK);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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(0, 0, 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, i));
|
||||
t += micros() - start;
|
||||
tft.drawTriangle(cx, cy - i, cx - i, cy + i, cx + i, cy + i,
|
||||
tft.color565(i, i, 0));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
return micros() - start;
|
||||
}
|
Before Width: | Height: | Size: 150 KiB |
Before Width: | Height: | Size: 225 KiB |
Before Width: | Height: | Size: 150 KiB |
Before Width: | Height: | Size: 225 KiB |
Before Width: | Height: | Size: 150 KiB |
Before Width: | Height: | Size: 225 KiB |
Before Width: | Height: | Size: 150 KiB |
Before Width: | Height: | Size: 225 KiB |
Before Width: | Height: | Size: 150 KiB |
Before Width: | Height: | Size: 225 KiB |
Before Width: | Height: | Size: 150 KiB |
Before Width: | Height: | Size: 225 KiB |
Before Width: | Height: | Size: 150 KiB |
Before Width: | Height: | Size: 225 KiB |
Before Width: | Height: | Size: 150 KiB |
Before Width: | Height: | Size: 225 KiB |
Before Width: | Height: | Size: 150 KiB |
Before Width: | Height: | Size: 225 KiB |
Before Width: | Height: | Size: 150 KiB |
Before Width: | Height: | Size: 225 KiB |
Before Width: | Height: | Size: 150 KiB |
Before Width: | Height: | Size: 225 KiB |
Before Width: | Height: | Size: 150 KiB |
Before Width: | Height: | Size: 225 KiB |
|
@ -1,320 +0,0 @@
|
|||
/*
|
||||
This sketch is demonstrating loading images from an SD card.
|
||||
To run this sketch, copy images from the images folder into the root of an SD card
|
||||
(either those with .bmp extension or those with .565 extension (those will load faster)).
|
||||
Modify the extension of the files in loop() depending on which files you copied onto SD.
|
||||
|
||||
Depending on the length of the cables between Arduino and SD card pins you might want
|
||||
to change SD_SPI_SPEED to either SPI_FULL_SPEED (if you have a shield directly connected to
|
||||
Arduino pins) or SPI_QUARTER_SPEED if you have long cables. SPI_HALF_SPEED was the maximum
|
||||
I could use as I had the display with SD slot on a breadboard.
|
||||
Obviously you have to modify CS, DC pins for TFT and SD appropriately.
|
||||
|
||||
You can generate your own .565 images from 24bit BMPs by using BMP24toILI565 converter which
|
||||
you can find in the Tools folder on GitHub:
|
||||
https://github.com/marekburiak/ILI9341_due/tree/master/tools
|
||||
*/
|
||||
|
||||
#include <SPI.h>
|
||||
#include <SdFat.h>
|
||||
#include <SdFatUtil.h>
|
||||
#include <ILI_SdSpi.h>
|
||||
#include <ILI_SdFatConfig.h>
|
||||
#include <ILI9341_due_gText.h>
|
||||
#include <ILI9341_due.h>
|
||||
|
||||
// CS and DC for the LCD
|
||||
#define LCD_CS 10 // Chip Select for LCD
|
||||
#define LCD_DC 9 // Command/Data for LCD
|
||||
|
||||
#define SD_CS 7 // Chip Select for SD card
|
||||
|
||||
#define BUFFPIXELCOUNT 320 // size of the buffer in pixels
|
||||
#define SD_SPI_SPEED SPI_HALF_SPEED // SD card SPI speed, try SPI_FULL_SPEED
|
||||
|
||||
SdFat sd; // set filesystem
|
||||
SdFile bmpFile; // set filesystem
|
||||
//ArduinoOutStream cout(Serial);
|
||||
|
||||
ILI9341_due tft(LCD_CS, LCD_DC);
|
||||
|
||||
// store error strings in flash to save RAM
|
||||
#define error(s) sd.errorHalt_P(PSTR(s))
|
||||
|
||||
void setup()
|
||||
{
|
||||
Serial.begin(9600);
|
||||
|
||||
tft.begin();
|
||||
tft.setRotation(iliRotation270); // landscape
|
||||
progmemPrint(PSTR("Initializing SD card..."));
|
||||
|
||||
if (!sd.begin(SD_CS, SD_SPI_SPEED)){
|
||||
progmemPrintln(PSTR("failed!"));
|
||||
return;
|
||||
}
|
||||
progmemPrintln(PSTR("OK!"));
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
if (tft.getRotation() == iliRotation90 || tft.getRotation() == iliRotation270){
|
||||
bmpDraw("giraffe.565", 0, 0);
|
||||
delay(2000);
|
||||
bmpDraw("SOLDHO~1.565", 0, 0);
|
||||
delay(2000);
|
||||
bmpDraw("GLOOMY~1.565", 0, 0);
|
||||
delay(2000);
|
||||
bmpDraw("MOTIVA~1.565", 0, 0);
|
||||
delay(2000);
|
||||
}
|
||||
else
|
||||
{
|
||||
bmpDraw("smokeP.565", 0, 0);
|
||||
delay(2000);
|
||||
bmpDraw("origP.565", 0, 0);
|
||||
delay(2000);
|
||||
bmpDraw("radioP.565", 0, 0);
|
||||
delay(2000);
|
||||
bmpDraw("stopP.565", 0, 0);
|
||||
delay(2000);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 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 RAM but
|
||||
// makes loading a little faster.
|
||||
|
||||
void bmpDraw(char* filename, int x, int y) {
|
||||
|
||||
SdFile bmpFile;
|
||||
int bmpWidth, bmpHeight; // W+H in pixels
|
||||
uint8_t bmpDepth; // Bit depth (currently must be 24)
|
||||
uint8_t headerSize;
|
||||
uint32_t bmpImageoffset; // Start of image data in file
|
||||
uint32_t rowSize; // Not always = bmpWidth; may have padding
|
||||
uint32_t fileSize;
|
||||
boolean goodBmp = false; // Set to true on valid header parse
|
||||
boolean flip = true; // BMP is stored bottom-to-top
|
||||
uint16_t w, h, row, col;
|
||||
uint8_t r, g, b;
|
||||
uint32_t pos = 0, startTime;
|
||||
|
||||
if ((x >= tft.width()) || (y >= tft.height())) return;
|
||||
|
||||
progmemPrint(PSTR("Loading image '"));
|
||||
Serial.print(filename);
|
||||
Serial.println('\'');
|
||||
startTime = millis();
|
||||
// Open requested file on SD card
|
||||
if (!bmpFile.open(filename, O_READ)) {
|
||||
Serial.println("File open failed.");
|
||||
return;
|
||||
}
|
||||
else {
|
||||
//Serial.println("File opened.");
|
||||
}
|
||||
|
||||
// Parse BMP header
|
||||
if (read16(bmpFile) == 0x4D42) { // BMP signature
|
||||
fileSize = read32(bmpFile);
|
||||
//progmemPrint(PSTR("File size: ")); Serial.println(fileSize);
|
||||
(void)read32(bmpFile); // Read & ignore creator bytes
|
||||
bmpImageoffset = read32(bmpFile); // Start of image data
|
||||
//progmemPrint(PSTR("Image Offset: ")); Serial.println(bmpImageoffset, DEC);
|
||||
// Read DIB header
|
||||
headerSize = read32(bmpFile);
|
||||
//progmemPrint(PSTR("Header size: ")); Serial.println(headerSize);
|
||||
bmpWidth = read32(bmpFile);
|
||||
bmpHeight = read32(bmpFile);
|
||||
if (read16(bmpFile) == 1) { // # planes -- must be '1'
|
||||
bmpDepth = read16(bmpFile); // bits per pixel
|
||||
//progmemPrint(PSTR("Bit Depth: ")); Serial.println(bmpDepth);
|
||||
if (read32(bmpFile) == 0) // 0 = uncompressed
|
||||
{
|
||||
//progmemPrint(PSTR("Image size: "));
|
||||
//Serial.print(bmpWidth);
|
||||
//Serial.print('x');
|
||||
//Serial.println(bmpHeight);
|
||||
|
||||
// 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.setAddrWindow(x, y, x + w - 1, y + h - 1);
|
||||
|
||||
if (bmpDepth == 16) //565 format
|
||||
{
|
||||
goodBmp = true; // Supported BMP format -- proceed!
|
||||
|
||||
uint8_t buffer[2 * BUFFPIXELCOUNT]; // pixel buffer (contains already formatted data for ILI9341 display)
|
||||
|
||||
bmpFile.seekSet(54); //skip header
|
||||
uint32_t totalPixels = bmpWidth*bmpHeight;
|
||||
uint16_t numFullBufferRuns = totalPixels / BUFFPIXELCOUNT;
|
||||
for (uint32_t p = 0; p < numFullBufferRuns; p++) {
|
||||
// read pixels into the buffer
|
||||
bmpFile.read(buffer, 2 * BUFFPIXELCOUNT);
|
||||
// push them to the diplay
|
||||
tft.pushColors565(buffer, 0, 2 * BUFFPIXELCOUNT);
|
||||
}
|
||||
|
||||
// render any remaining pixels that did not fully fit the buffer
|
||||
uint32_t remainingPixels = totalPixels % BUFFPIXELCOUNT;
|
||||
if (remainingPixels > 0)
|
||||
{
|
||||
bmpFile.read(buffer, 2 * remainingPixels);
|
||||
tft.pushColors565(buffer, 0, 2 * remainingPixels);
|
||||
}
|
||||
|
||||
}
|
||||
else if (bmpDepth == 24) // standard 24bit bmp
|
||||
{
|
||||
goodBmp = true; // Supported BMP format -- proceed!
|
||||
uint16_t bufferSize = min(w, BUFFPIXELCOUNT);
|
||||
uint8_t sdbuffer[3 * bufferSize]; // pixel in buffer (R+G+B per pixel)
|
||||
uint16_t lcdbuffer[bufferSize]; // pixel out buffer (16-bit per pixel)
|
||||
|
||||
// BMP rows are padded (if needed) to 4-byte boundary
|
||||
rowSize = (bmpWidth * 3 + 3) & ~3;
|
||||
|
||||
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.curPosition() != pos) { // Need seek?
|
||||
bmpFile.seekSet(pos);
|
||||
}
|
||||
|
||||
for (col = 0; col < w; col += bufferSize)
|
||||
{
|
||||
// read pixels into the buffer
|
||||
bmpFile.read(sdbuffer, 3 * bufferSize);
|
||||
|
||||
// convert color
|
||||
for (int p = 0; p < bufferSize; p++)
|
||||
{
|
||||
b = sdbuffer[3 * p];
|
||||
g = sdbuffer[3 * p + 1];
|
||||
r = sdbuffer[3 * p + 2];
|
||||
lcdbuffer[p] = tft.color565(r, g, b);
|
||||
}
|
||||
// push buffer to TFT
|
||||
tft.pushColors(lcdbuffer, 0, bufferSize);
|
||||
}
|
||||
|
||||
// render any remaining pixels that did not fully fit the buffer
|
||||
uint16_t remainingPixels = w % bufferSize;
|
||||
if (remainingPixels > 0)
|
||||
{
|
||||
bmpFile.read(sdbuffer, 3 * remainingPixels);
|
||||
|
||||
for (int p = 0; p < remainingPixels; p++)
|
||||
{
|
||||
b = sdbuffer[3 * p];
|
||||
g = sdbuffer[3 * p + 1];
|
||||
r = sdbuffer[3 * p + 2];
|
||||
lcdbuffer[p] = tft.color565(r, g, b);
|
||||
}
|
||||
|
||||
tft.pushColors(lcdbuffer, 0, remainingPixels);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
progmemPrint(PSTR("Unsupported Bit Depth."));
|
||||
}
|
||||
|
||||
if (goodBmp)
|
||||
{
|
||||
progmemPrint(PSTR("Loaded in "));
|
||||
Serial.print(millis() - startTime);
|
||||
Serial.println(" ms");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bmpFile.close();
|
||||
if (!goodBmp) progmemPrintln(PSTR("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(SdFile& f) {
|
||||
uint16_t result;
|
||||
((uint8_t *)&result)[0] = f.read(); // LSB
|
||||
((uint8_t *)&result)[1] = f.read(); // MSB
|
||||
return result;
|
||||
}
|
||||
|
||||
uint32_t read32(SdFile& 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;
|
||||
}
|
||||
|
||||
// Copy string from flash to serial port
|
||||
// Source string MUST be inside a PSTR() declaration!
|
||||
void progmemPrint(const char *str) {
|
||||
char c;
|
||||
while (c = pgm_read_byte(str++)) Serial.print(c);
|
||||
}
|
||||
|
||||
// Same as above, with trailing newline
|
||||
void progmemPrintln(const char *str) {
|
||||
progmemPrint(str);
|
||||
Serial.println();
|
||||
}
|
||||
|
||||
//void PrintHex8(uint8_t *data, uint8_t length) // prints 8-bit data in hex
|
||||
//{
|
||||
// char tmp[length*5+1];
|
||||
// byte first;
|
||||
// byte second;
|
||||
// for (int i=0; i<length; i++) {
|
||||
// first = (data[i] >> 4) & 0x0f;
|
||||
// second = data[i] & 0x0f;
|
||||
// // base for converting single digit numbers to ASCII is 48
|
||||
// // base for 10-16 to become upper-case characters A-F is 55
|
||||
// // note: difference is 7
|
||||
// tmp[i*5] = 48; // add leading 0
|
||||
// tmp[i*5+1] = 120; // add leading x
|
||||
// tmp[i*5+2] = first+48;
|
||||
// tmp[i*5+3] = second+48;
|
||||
// tmp[i*5+4] = 32; // add trailing space
|
||||
// if (first > 9) tmp[i*5+2] += 7;
|
||||
// if (second > 9) tmp[i*5+3] += 7;
|
||||
// }
|
||||
// tmp[length*5] = 0;
|
||||
// Serial.print(tmp);
|
||||
//}
|
|
@ -1,341 +0,0 @@
|
|||
// UTFT Demo ported to ILI9341_due library by TFTLCDCyg
|
||||
|
||||
// Based on Demo 320x240 Serial of UTFT library
|
||||
// UTFT-web: http://www.henningkarlsen.com/electronics
|
||||
|
||||
#include <SPI.h>
|
||||
|
||||
// ILI9341_due NEW lib by Marek Buriak http://marekburiak.github.io/ILI9341_due/
|
||||
#include <SPI.h>
|
||||
#include <ILI_SdSpi.h>
|
||||
#include <ILI_SdFatConfig.h>
|
||||
#include <ILI9341_due_gText.h>
|
||||
#include <ILI9341_due.h>
|
||||
#include "fonts\Arial14.h"
|
||||
//#include "Streaming.h"
|
||||
// For the Adafruit shield, these are the default.
|
||||
|
||||
#define TFT_DC 10
|
||||
#define TFT_CS 8
|
||||
#define rst 9
|
||||
|
||||
// Use hardware SPI (on Uno, #13, #12, #11) and the above for CS/DC
|
||||
ILI9341_due tft = ILI9341_due(TFT_CS, TFT_DC, rst);
|
||||
|
||||
ILI9341_due_gText t1(&tft);
|
||||
char textBuff[20];
|
||||
|
||||
// Color set
|
||||
#define BLACK 0x0000
|
||||
#define RED 0xF800
|
||||
#define GREEN 0x07E0
|
||||
//#define BLUE 0x001F
|
||||
#define BLUE 0x102E
|
||||
#define CYAN 0x07FF
|
||||
#define MAGENTA 0xF81F
|
||||
#define YELLOW 0xFFE0
|
||||
#define ORANGE 0xFD20
|
||||
#define GREENYELLOW 0xAFE5
|
||||
#define DARKGREEN 0x03E0
|
||||
#define WHITE 0xFFFF
|
||||
|
||||
uint16_t color;
|
||||
uint16_t colorFONDO=BLACK;
|
||||
|
||||
void setup()
|
||||
{
|
||||
delay (5000);
|
||||
randomSeed(analogRead(0));
|
||||
|
||||
// TFT 2.2" SPI
|
||||
Serial.begin(115200);
|
||||
tft.begin();
|
||||
tft.setRotation(iliRotation270);
|
||||
tft.fillScreen(colorFONDO);
|
||||
t1.defineArea(0, 0, 320, 240);
|
||||
t1.selectFont(Arial14);
|
||||
}
|
||||
|
||||
void ILI9341duenodelay()
|
||||
{
|
||||
int buf[318];
|
||||
int x, x2;
|
||||
int y, y2;
|
||||
int r;
|
||||
|
||||
tft.fillScreen(colorFONDO);
|
||||
|
||||
int timeinit= millis();
|
||||
|
||||
|
||||
//ILI9341due NEW
|
||||
tft.fillRect(0, 0, 320, 15,RED);
|
||||
t1.setFontColor(WHITE, RED);
|
||||
t1.drawString("* ILI9341_due UTFT 240x320 Demo *", 47,0);
|
||||
tft.fillRect(0, 226, 320, 240,tft.color565(64, 64, 64));
|
||||
t1.setFontColor(YELLOW, tft.color565(64, 64, 64));
|
||||
t1.drawString("<http://electronics.henningkarlsen.com>", gTextAlignBottomCenter,227);
|
||||
|
||||
//ILI9341due NEW
|
||||
tft.drawRect(0, 15, 320, 211,BLUE);
|
||||
|
||||
//ILI9341due NEW
|
||||
// Draw crosshairs
|
||||
tft.drawLine(159, 15, 159, 224,BLUE);
|
||||
tft.drawLine(1, 119, 318, 119,BLUE);
|
||||
for (int i=9; i<310; i+=10)
|
||||
tft.drawLine(i, 117, i, 121,BLUE);
|
||||
for (int i=19; i<220; i+=10)
|
||||
tft.drawLine(157, i, 161, i, BLUE);
|
||||
// Draw sin-, cos- and tan-lines
|
||||
t1.setFontColor(CYAN, BLACK);
|
||||
t1.drawString("Sin", 5,17);
|
||||
for (int i=1; i<318; i++)
|
||||
{
|
||||
tft.drawPixel(i,119+(sin(((i*1.13)*3.14)/180)*95),CYAN);
|
||||
}
|
||||
t1.setFontColor(RED, BLACK);
|
||||
t1.drawString("Cos", 5,29);
|
||||
for (int i=1; i<318; i++)
|
||||
{
|
||||
tft.drawPixel(i,119+(cos(((i*1.13)*3.14)/180)*95),RED);
|
||||
}
|
||||
t1.setFontColor(YELLOW, BLACK);
|
||||
t1.drawString("Tan", 5,41);
|
||||
for (int i=1; i<318; i++)
|
||||
{
|
||||
tft.drawPixel(i,119+(tan(((i*1.13)*3.14)/180)),YELLOW);
|
||||
}
|
||||
// delay(2000);
|
||||
|
||||
|
||||
//ILI9341due NEW
|
||||
tft.fillRect(1,16,318,209,BLACK);
|
||||
tft.drawLine(159, 16, 159, 224,BLUE);
|
||||
tft.drawLine(1, 119, 318, 119,BLUE);
|
||||
|
||||
// Draw a moving sinewave
|
||||
x=1;
|
||||
for (int i=1; i<(318*20); i++)
|
||||
{
|
||||
x++;
|
||||
if (x==319)
|
||||
x=1;
|
||||
if (i>319)
|
||||
{
|
||||
if ((x==159)||(buf[x-1]==119))
|
||||
color = BLUE;
|
||||
else
|
||||
color = BLACK;
|
||||
tft.drawPixel(x,buf[x-1],color);
|
||||
}
|
||||
y=119+(sin(((i*1.1)*3.14)/180)*(90-(i / 100)));
|
||||
tft.drawPixel(x,y,CYAN);
|
||||
buf[x-1]=y;
|
||||
}
|
||||
// delay(2000);
|
||||
|
||||
|
||||
//ILI9341due NEW
|
||||
tft.fillRect(1,16,318,209,BLACK);
|
||||
|
||||
// Draw some filled rectangles
|
||||
for (int i=1; i<6; i++)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 1:
|
||||
color = MAGENTA;
|
||||
break;
|
||||
case 2:
|
||||
color = RED;
|
||||
break;
|
||||
case 3:
|
||||
color = GREEN;
|
||||
break;
|
||||
case 4:
|
||||
color = BLUE;
|
||||
break;
|
||||
case 5:
|
||||
color = YELLOW;
|
||||
break;
|
||||
}
|
||||
tft.fillRect(70+(i*20), 30+(i*20), 60, 60,color);
|
||||
}
|
||||
// delay(2000);
|
||||
|
||||
|
||||
//ILI9341due NEW
|
||||
tft.fillRect(1,16,318,209,BLACK);
|
||||
|
||||
// Draw some filled, rounded rectangles
|
||||
for (int i=1; i<6; i++)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 1:
|
||||
color = MAGENTA;
|
||||
break;
|
||||
case 2:
|
||||
color = RED;
|
||||
break;
|
||||
case 3:
|
||||
color = GREEN;
|
||||
break;
|
||||
case 4:
|
||||
color = BLUE;
|
||||
break;
|
||||
case 5:
|
||||
color = YELLOW;
|
||||
break;
|
||||
}
|
||||
tft.fillRoundRect(190-(i*20), 30+(i*20), 60, 60,3,color);
|
||||
}
|
||||
// delay(2000);
|
||||
|
||||
|
||||
//ILI9341due NEW
|
||||
tft.fillRect(1,16,318,209,BLACK);
|
||||
|
||||
// Draw some filled circles
|
||||
for (int i=1; i<6; i++)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 1:
|
||||
color = MAGENTA;
|
||||
break;
|
||||
case 2:
|
||||
color = RED;
|
||||
break;
|
||||
case 3:
|
||||
color = GREEN;
|
||||
break;
|
||||
case 4:
|
||||
color = BLUE;
|
||||
break;
|
||||
case 5:
|
||||
color = YELLOW;
|
||||
break;
|
||||
}
|
||||
tft.fillCircle(100+(i*20),60+(i*20), 30, color);
|
||||
}
|
||||
// delay(2000);
|
||||
|
||||
|
||||
//ILI9341due NEW
|
||||
tft.fillRect(1,16,318,209,BLACK);
|
||||
|
||||
// Draw some lines in a pattern
|
||||
for (int i=17; i<222; i+=5)
|
||||
{
|
||||
tft.drawLine(1, i, (i*1.44)-10, 224, RED);
|
||||
}
|
||||
for (int i=222; i>17; i-=5)
|
||||
{
|
||||
tft.drawLine(318, i, (i*1.44)-11, 15,RED);
|
||||
}
|
||||
for (int i=222; i>17; i-=5)
|
||||
{
|
||||
tft.drawLine(1, i, 331-(i*1.44), 15, CYAN);
|
||||
}
|
||||
for (int i=17; i<222; i+=5)
|
||||
{
|
||||
tft.drawLine(318, i, 330-(i*1.44), 223, CYAN);
|
||||
}
|
||||
// delay(2000);
|
||||
|
||||
|
||||
//ILI9341due NEW
|
||||
tft.fillRect(1,16,318,209,BLACK);
|
||||
|
||||
// Draw some random circles
|
||||
for (int i=0; i<100; i++)
|
||||
{
|
||||
color = tft.color565(random(255), random(255), random(255));
|
||||
x=32+random(256);
|
||||
y=45+random(146);
|
||||
r=random(30);
|
||||
tft.drawCircle(x, y, r, color);
|
||||
}
|
||||
// delay(2000);
|
||||
|
||||
|
||||
//ILI9341due NEW
|
||||
tft.fillRect(1,16,318,209,BLACK);
|
||||
// Draw some random rectangles
|
||||
for (int i=0; i<100; i++)
|
||||
{
|
||||
color = tft.color565(random(255), random(255), random(255));
|
||||
x=2 + random(165);
|
||||
y=16+ random(100);
|
||||
x2=random(165);
|
||||
y2=random(115);
|
||||
tft.drawRect(x, y, x2, y2, color);
|
||||
}
|
||||
// delay(2000);
|
||||
|
||||
|
||||
//ILI9341due NEW
|
||||
tft.fillRect(1,16,318,209,BLACK);
|
||||
// Draw some random rounded rectangles
|
||||
for (int i=0; i<100; i++)
|
||||
{
|
||||
color = tft.color565(random(255), random(255), random(255));
|
||||
x=2+random(165);
|
||||
y=16+random(100);
|
||||
x2=random(165);
|
||||
y2=random(115);
|
||||
tft.drawRoundRect(x, y, x2, y2,3,color);
|
||||
|
||||
}
|
||||
// delay(2000);
|
||||
|
||||
//ILI9341due NEW
|
||||
tft.fillRect(1,16,318,209,BLACK);
|
||||
|
||||
for (int i=0; i<100; i++)
|
||||
{
|
||||
color = tft.color565(random(255), random(255), random(255));
|
||||
x=2+random(316);
|
||||
y=16+random(209);
|
||||
x2=2+random(316);
|
||||
y2=16+random(209);
|
||||
tft.drawLine(x, y, x2, y2, color);
|
||||
}
|
||||
//delay(2000);
|
||||
|
||||
|
||||
//ILI9341due NEW
|
||||
tft.fillRect(1,16,318,209,BLACK);
|
||||
|
||||
for (int i=0; i<10000; i++)
|
||||
{
|
||||
color = tft.color565(random(255), random(255), random(255));
|
||||
tft.drawPixel(2+random(316), 16+random(209), color);
|
||||
}
|
||||
int timetest = millis() -timeinit;
|
||||
//delay(2000);
|
||||
|
||||
|
||||
//ILI9341due NEW
|
||||
tft.fillRect(0,0,320,240,BLUE);
|
||||
tft.fillRoundRect(80, 70, 159, 99,3,RED);
|
||||
t1.setFontColor(WHITE, RED);
|
||||
t1.drawString("That's it!", 130,93);
|
||||
t1.drawString("Restarting in a", 117, 119);
|
||||
t1.drawString("few seconds...", 117, 132);
|
||||
|
||||
t1.setFontColor(WHITE, BLUE);
|
||||
t1.drawString("Runtime: (msecs)", 112, 210);
|
||||
|
||||
sprintf(textBuff, "%d", timetest);
|
||||
t1.drawString(textBuff, 146, 225);
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
ILI9341duenodelay();
|
||||
delay(5000);
|
||||
}
|
||||
|
|
@ -1,173 +0,0 @@
|
|||
|
||||
|
||||
/*
|
||||
*
|
||||
* Arial_14
|
||||
*
|
||||
* created with FontCreator
|
||||
* written by F. Maximilian Thiele
|
||||
*
|
||||
* http://www.apetech.de/fontCreator
|
||||
* me@apetech.de
|
||||
*
|
||||
* File Name : Arial14.h
|
||||
* Date : 02.05.2008
|
||||
* Font size in bytes : 7788
|
||||
* Font width : 10
|
||||
* Font height : 14
|
||||
* Font first char : 32
|
||||
* Font last char : 128
|
||||
* Font used chars : 96
|
||||
*
|
||||
* The font data are defined as
|
||||
*
|
||||
* struct _FONT_ {
|
||||
* uint16_t font_Size_in_Bytes_over_all_included_Size_it_self;
|
||||
* uint8_t font_Width_in_Pixel_for_fixed_drawing;
|
||||
* uint8_t font_Height_in_Pixel_for_all_characters;
|
||||
* unit8_t font_First_Char;
|
||||
* uint8_t font_Char_Count;
|
||||
*
|
||||
* uint8_t font_Char_Widths[font_Last_Char - font_First_Char +1];
|
||||
* // for each character the separate width in pixels,
|
||||
* // characters < 128 have an implicit virtual right empty row
|
||||
*
|
||||
* uint8_t font_data[];
|
||||
* // bit field of all characters
|
||||
*/
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <avr/pgmspace.h>
|
||||
|
||||
#ifndef ARIAL_14_H
|
||||
#define ARIAL_14_H
|
||||
|
||||
#define ARIAL_14_WIDTH 10
|
||||
#define ARIAL_14_HEIGHT 14
|
||||
|
||||
/*
|
||||
* added to allow fontname to match header file name.
|
||||
* as well as keep the old name for backward compability
|
||||
*/
|
||||
|
||||
#define Arial14 Arial_14
|
||||
|
||||
static const uint8_t Arial_14[] PROGMEM = {
|
||||
0x1E, 0x6C, // size
|
||||
0x0A, // width
|
||||
0x0E, // height
|
||||
0x20, // first char
|
||||
0x60, // char count
|
||||
|
||||
// char widths
|
||||
0x00, 0x01, 0x03, 0x08, 0x07, 0x0A, 0x08, 0x01, 0x03, 0x03,
|
||||
0x05, 0x07, 0x01, 0x04, 0x01, 0x04, 0x06, 0x03, 0x06, 0x06,
|
||||
0x07, 0x06, 0x06, 0x06, 0x06, 0x06, 0x01, 0x01, 0x06, 0x06,
|
||||
0x06, 0x06, 0x0D, 0x09, 0x07, 0x08, 0x08, 0x07, 0x07, 0x09,
|
||||
0x07, 0x01, 0x05, 0x08, 0x07, 0x09, 0x07, 0x09, 0x07, 0x09,
|
||||
0x08, 0x07, 0x07, 0x07, 0x09, 0x0D, 0x08, 0x09, 0x08, 0x02,
|
||||
0x04, 0x02, 0x05, 0x08, 0x02, 0x06, 0x06, 0x05, 0x06, 0x06,
|
||||
0x04, 0x06, 0x06, 0x01, 0x02, 0x06, 0x01, 0x09, 0x06, 0x06,
|
||||
0x06, 0x06, 0x04, 0x05, 0x04, 0x06, 0x07, 0x09, 0x06, 0x07,
|
||||
0x06, 0x03, 0x01, 0x03, 0x07, 0x07,
|
||||
|
||||
// font data
|
||||
0xFE, 0x14, // 33
|
||||
0x1E, 0x00, 0x1E, 0x00, 0x00, 0x00, // 34
|
||||
0x90, 0x90, 0xF8, 0x96, 0x90, 0xF8, 0x96, 0x90, 0x00, 0x1C, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, // 35
|
||||
0x18, 0x24, 0x22, 0xFF, 0x42, 0x42, 0x84, 0x08, 0x10, 0x10, 0x3C, 0x10, 0x08, 0x04, // 36
|
||||
0x1C, 0x22, 0x22, 0x1C, 0xC0, 0x30, 0x8C, 0x42, 0x40, 0x80, 0x00, 0x00, 0x10, 0x0C, 0x00, 0x00, 0x0C, 0x10, 0x10, 0x0C, // 37
|
||||
0x80, 0x5C, 0x22, 0x62, 0x92, 0x0C, 0x80, 0x00, 0x0C, 0x10, 0x10, 0x10, 0x10, 0x0C, 0x08, 0x10, // 38
|
||||
0x1E, 0x00, // 39
|
||||
0xF0, 0x0C, 0x02, 0x1C, 0x60, 0x80, // 40
|
||||
0x02, 0x0C, 0xF0, 0x80, 0x60, 0x1C, // 41
|
||||
0x04, 0x14, 0x0E, 0x14, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, // 42
|
||||
0x40, 0x40, 0x40, 0xF8, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, // 43
|
||||
0x00, 0x70, // 44
|
||||
0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, // 45
|
||||
0x00, 0x10, // 46
|
||||
0x00, 0xC0, 0x38, 0x06, 0x18, 0x04, 0x00, 0x00, // 47
|
||||
0xFC, 0x02, 0x02, 0x02, 0x02, 0xFC, 0x0C, 0x10, 0x10, 0x10, 0x10, 0x0C, // 48
|
||||
0x08, 0x04, 0xFE, 0x00, 0x00, 0x1C, // 49
|
||||
0x0C, 0x02, 0x02, 0x82, 0x42, 0x3C, 0x10, 0x18, 0x14, 0x10, 0x10, 0x10, // 50
|
||||
0x0C, 0x02, 0x22, 0x22, 0x22, 0xDC, 0x0C, 0x10, 0x10, 0x10, 0x10, 0x0C, // 51
|
||||
0x80, 0x40, 0x30, 0x08, 0x04, 0xFE, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x1C, 0x04, // 52
|
||||
0x38, 0x16, 0x12, 0x12, 0x12, 0xE2, 0x0C, 0x10, 0x10, 0x10, 0x18, 0x04, // 53
|
||||
0xF8, 0x44, 0x22, 0x22, 0x22, 0xC4, 0x0C, 0x10, 0x10, 0x10, 0x10, 0x0C, // 54
|
||||
0x02, 0x02, 0x02, 0xE2, 0x1A, 0x06, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, // 55
|
||||
0xDC, 0x22, 0x22, 0x22, 0x22, 0xDC, 0x0C, 0x10, 0x10, 0x10, 0x10, 0x0C, // 56
|
||||
0x3C, 0x42, 0x42, 0x42, 0x22, 0xFC, 0x08, 0x10, 0x10, 0x10, 0x08, 0x04, // 57
|
||||
0x08, 0x10, // 58
|
||||
0x08, 0x70, // 59
|
||||
0x40, 0xA0, 0xA0, 0x10, 0x10, 0x08, 0x00, 0x00, 0x00, 0x04, 0x04, 0x08, // 60
|
||||
0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 61
|
||||
0x08, 0x10, 0x10, 0xA0, 0xA0, 0x40, 0x08, 0x04, 0x04, 0x00, 0x00, 0x00, // 62
|
||||
0x0C, 0x02, 0x82, 0x42, 0x22, 0x1C, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, // 63
|
||||
0xE0, 0x18, 0x04, 0xC4, 0x22, 0x12, 0x12, 0x12, 0xA2, 0x72, 0x04, 0x08, 0xF0, 0x0C, 0x30, 0x40, 0x4C, 0x90, 0x90, 0x90, 0x88, 0x9C, 0x90, 0x50, 0x4C, 0x20, // 64
|
||||
0x00, 0x80, 0xE0, 0x9C, 0x82, 0x9C, 0xE0, 0x80, 0x00, 0x18, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x18, // 65
|
||||
0xFE, 0x22, 0x22, 0x22, 0x22, 0x22, 0xDC, 0x1C, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0C, // 66
|
||||
0xF8, 0x04, 0x02, 0x02, 0x02, 0x02, 0x04, 0x08, 0x04, 0x08, 0x10, 0x10, 0x10, 0x10, 0x08, 0x04, // 67
|
||||
0xFE, 0x02, 0x02, 0x02, 0x02, 0x02, 0x04, 0xF8, 0x1C, 0x10, 0x10, 0x10, 0x10, 0x10, 0x08, 0x04, // 68
|
||||
0xFE, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x1C, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, // 69
|
||||
0xFE, 0x22, 0x22, 0x22, 0x22, 0x22, 0x02, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 70
|
||||
0xF8, 0x04, 0x02, 0x02, 0x02, 0x42, 0x42, 0x44, 0xC8, 0x04, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x08, 0x04, // 71
|
||||
0xFE, 0x20, 0x20, 0x20, 0x20, 0x20, 0xFE, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, // 72
|
||||
0xFE, 0x1C, // 73
|
||||
0x00, 0x00, 0x00, 0x00, 0xFE, 0x0C, 0x10, 0x10, 0x10, 0x0C, // 74
|
||||
0xFE, 0x80, 0x40, 0x20, 0x50, 0x88, 0x04, 0x02, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x04, 0x08, 0x10, // 75
|
||||
0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, // 76
|
||||
0xFE, 0x0C, 0x30, 0xC0, 0x00, 0xC0, 0x30, 0x0C, 0xFE, 0x1C, 0x00, 0x00, 0x04, 0x18, 0x04, 0x00, 0x00, 0x1C, // 77
|
||||
0xFE, 0x04, 0x18, 0x60, 0x80, 0x00, 0xFE, 0x1C, 0x00, 0x00, 0x00, 0x04, 0x08, 0x1C, // 78
|
||||
0xF8, 0x04, 0x02, 0x02, 0x02, 0x02, 0x02, 0x04, 0xF8, 0x04, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x08, 0x04, // 79
|
||||
0xFE, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3C, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 80
|
||||
0xF8, 0x04, 0x02, 0x02, 0x02, 0x02, 0x02, 0x04, 0xF8, 0x04, 0x08, 0x10, 0x10, 0x10, 0x14, 0x08, 0x1C, 0x10, // 81
|
||||
0xFE, 0x42, 0x42, 0x42, 0xC2, 0x42, 0x42, 0x3C, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x04, 0x08, 0x10, // 82
|
||||
0x1C, 0x22, 0x22, 0x22, 0x42, 0x42, 0x8C, 0x0C, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0C, // 83
|
||||
0x02, 0x02, 0x02, 0xFE, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, // 84
|
||||
0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x04, 0x08, 0x10, 0x10, 0x10, 0x08, 0x04, // 85
|
||||
0x06, 0x18, 0x60, 0x80, 0x00, 0x80, 0x60, 0x18, 0x06, 0x00, 0x00, 0x00, 0x04, 0x18, 0x04, 0x00, 0x00, 0x00, // 86
|
||||
0x06, 0x38, 0xC0, 0x00, 0xC0, 0x3C, 0x02, 0x3C, 0xC0, 0x00, 0xC0, 0x38, 0x06, 0x00, 0x00, 0x04, 0x18, 0x04, 0x00, 0x00, 0x00, 0x04, 0x18, 0x04, 0x00, 0x00, // 87
|
||||
0x02, 0x0C, 0x90, 0x60, 0x60, 0x90, 0x0C, 0x02, 0x10, 0x0C, 0x00, 0x00, 0x00, 0x04, 0x0C, 0x10, // 88
|
||||
0x02, 0x04, 0x18, 0x20, 0xC0, 0x20, 0x18, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x00, // 89
|
||||
0x00, 0x02, 0x82, 0x42, 0x22, 0x1A, 0x06, 0x02, 0x10, 0x18, 0x14, 0x10, 0x10, 0x10, 0x10, 0x10, // 90
|
||||
0xFE, 0x02, 0xFC, 0x80, // 91
|
||||
0x06, 0x38, 0xC0, 0x00, 0x00, 0x00, 0x04, 0x18, // 92
|
||||
0x02, 0xFE, 0x80, 0xFC, // 93
|
||||
0x20, 0x1C, 0x02, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, // 94
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, // 95
|
||||
0x02, 0x04, 0x00, 0x00, // 96
|
||||
0x10, 0x88, 0x48, 0x48, 0x48, 0xF0, 0x0C, 0x10, 0x10, 0x10, 0x08, 0x1C, // 97
|
||||
0xFE, 0x10, 0x08, 0x08, 0x08, 0xF0, 0x1C, 0x08, 0x10, 0x10, 0x10, 0x0C, // 98
|
||||
0xF0, 0x08, 0x08, 0x08, 0x10, 0x0C, 0x10, 0x10, 0x10, 0x08, // 99
|
||||
0xF0, 0x08, 0x08, 0x08, 0x10, 0xFE, 0x0C, 0x10, 0x10, 0x10, 0x08, 0x1C, // 100
|
||||
0xF0, 0x48, 0x48, 0x48, 0x48, 0x70, 0x0C, 0x10, 0x10, 0x10, 0x10, 0x08, // 101
|
||||
0x08, 0xFC, 0x0A, 0x0A, 0x00, 0x1C, 0x00, 0x00, // 102
|
||||
0xF0, 0x08, 0x08, 0x08, 0x10, 0xF8, 0x4C, 0x90, 0x90, 0x90, 0x88, 0x7C, // 103
|
||||
0xFE, 0x10, 0x08, 0x08, 0x08, 0xF0, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x1C, // 104
|
||||
0xFA, 0x1C, // 105
|
||||
0x00, 0xFA, 0x80, 0x7C, // 106
|
||||
0xFE, 0x80, 0x40, 0xA0, 0x10, 0x08, 0x1C, 0x00, 0x00, 0x00, 0x0C, 0x10, // 107
|
||||
0xFE, 0x1C, // 108
|
||||
0xF8, 0x10, 0x08, 0x08, 0xF0, 0x10, 0x08, 0x08, 0xF0, 0x1C, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x1C, // 109
|
||||
0xF8, 0x10, 0x08, 0x08, 0x08, 0xF0, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x1C, // 110
|
||||
0xF0, 0x08, 0x08, 0x08, 0x08, 0xF0, 0x0C, 0x10, 0x10, 0x10, 0x10, 0x0C, // 111
|
||||
0xF8, 0x10, 0x08, 0x08, 0x08, 0xF0, 0xFC, 0x08, 0x10, 0x10, 0x10, 0x0C, // 112
|
||||
0xF0, 0x08, 0x08, 0x08, 0x10, 0xF8, 0x0C, 0x10, 0x10, 0x10, 0x08, 0xFC, // 113
|
||||
0xF8, 0x10, 0x08, 0x08, 0x1C, 0x00, 0x00, 0x00, // 114
|
||||
0x30, 0x48, 0x48, 0x48, 0x90, 0x08, 0x10, 0x10, 0x10, 0x0C, // 115
|
||||
0x08, 0xFE, 0x08, 0x08, 0x00, 0x1C, 0x10, 0x10, // 116
|
||||
0xF8, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x0C, 0x10, 0x10, 0x10, 0x08, 0x1C, // 117
|
||||
0x18, 0x60, 0x80, 0x00, 0x80, 0x60, 0x18, 0x00, 0x00, 0x04, 0x18, 0x04, 0x00, 0x00, // 118
|
||||
0x18, 0xE0, 0x00, 0xE0, 0x18, 0xE0, 0x00, 0xE0, 0x18, 0x00, 0x04, 0x18, 0x04, 0x00, 0x04, 0x18, 0x04, 0x00, // 119
|
||||
0x08, 0x30, 0xC0, 0xC0, 0x30, 0x08, 0x10, 0x0C, 0x00, 0x00, 0x0C, 0x10, // 120
|
||||
0x18, 0x60, 0x80, 0x00, 0x80, 0x60, 0x18, 0x00, 0x80, 0x8C, 0x70, 0x0C, 0x00, 0x00, // 121
|
||||
0x08, 0x08, 0x88, 0x68, 0x18, 0x08, 0x10, 0x18, 0x14, 0x10, 0x10, 0x10, // 122
|
||||
0x80, 0x7C, 0x02, 0x00, 0x7C, 0x80, // 123
|
||||
0xFE, 0xFC, // 124
|
||||
0x02, 0x7C, 0x80, 0x80, 0x7C, 0x00, // 125
|
||||
0x40, 0x20, 0x20, 0x60, 0x40, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 126
|
||||
0xFC, 0x04, 0x04, 0x04, 0x04, 0x04, 0xFC, 0x1C, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1C // 127
|
||||
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,167 +0,0 @@
|
|||
|
||||
|
||||
/*
|
||||
*
|
||||
* Arial Bold 14
|
||||
*
|
||||
* created with FontCreator
|
||||
* written by F. Maximilian Thiele
|
||||
*
|
||||
* http://www.apetech.de/fontCreator
|
||||
* me@apetech.de
|
||||
*
|
||||
* File Name : arial_bold_14
|
||||
* Date : 29.01.2005
|
||||
* Font size in bytes : 8712
|
||||
* Font width : 10
|
||||
* Font height : 14
|
||||
* Font first char : 32
|
||||
* Font last char : 128
|
||||
* Font used chars : 96
|
||||
*
|
||||
* The font data are defined as
|
||||
*
|
||||
* struct _FONT_ {
|
||||
* uint16_t font_Size_in_Bytes_over_all_included_Size_it_self;
|
||||
* uint8_t font_Width_in_Pixel_for_fixed_drawing;
|
||||
* uint8_t font_Height_in_Pixel_for_all_characters;
|
||||
* unit8_t font_First_Char;
|
||||
* uint8_t font_Char_Count;
|
||||
*
|
||||
* uint8_t font_Char_Widths[font_Last_Char - font_First_Char +1];
|
||||
* // for each character the separate width in pixels,
|
||||
* // characters < 128 have an implicit virtual right empty row
|
||||
*
|
||||
* uint8_t font_data[];
|
||||
* // bit field of all characters
|
||||
*/
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <avr/pgmspace.h>
|
||||
|
||||
#ifndef ARIAL_BOLD_14_H
|
||||
#define ARIAL_BOLD_14_H
|
||||
|
||||
#define ARIAL_BOLD_14_WIDTH 10
|
||||
#define ARIAL_BOLD_14_HEIGHT 14
|
||||
|
||||
static const uint8_t Arial_bold_14[] PROGMEM = {
|
||||
0x22, 0x08, // size
|
||||
0x0A, // width
|
||||
0x0E, // height
|
||||
0x20, // first char
|
||||
0x60, // char count
|
||||
|
||||
// char widths
|
||||
0x04, 0x02, 0x05, 0x06, 0x07, 0x08, 0x09, 0x02, 0x03, 0x03,
|
||||
0x05, 0x08, 0x02, 0x04, 0x02, 0x04, 0x07, 0x04, 0x07, 0x07,
|
||||
0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x02, 0x02, 0x07, 0x07,
|
||||
0x07, 0x08, 0x0E, 0x09, 0x08, 0x08, 0x08, 0x07, 0x07, 0x09,
|
||||
0x08, 0x02, 0x07, 0x08, 0x07, 0x0B, 0x08, 0x09, 0x07, 0x09,
|
||||
0x09, 0x07, 0x08, 0x08, 0x09, 0x0D, 0x07, 0x08, 0x08, 0x04,
|
||||
0x04, 0x04, 0x06, 0x08, 0x03, 0x07, 0x07, 0x06, 0x07, 0x07,
|
||||
0x05, 0x07, 0x07, 0x02, 0x03, 0x06, 0x02, 0x0A, 0x07, 0x07,
|
||||
0x07, 0x07, 0x05, 0x06, 0x05, 0x07, 0x07, 0x0B, 0x06, 0x07,
|
||||
0x05, 0x05, 0x01, 0x05, 0x07, 0x08,
|
||||
|
||||
// font data
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 32
|
||||
0xFE, 0xFE, 0x18, 0x18, // 33
|
||||
0x1E, 0x1E, 0x00, 0x1E, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, // 34
|
||||
0x90, 0xF8, 0x9E, 0x90, 0xF8, 0x9E, 0x1C, 0x00, 0x00, 0x1C, 0x00, 0x00, // 35
|
||||
0x18, 0x3C, 0x26, 0xFF, 0x66, 0xCC, 0x88, 0x04, 0x0C, 0x18, 0x3C, 0x18, 0x0C, 0x04, // 36
|
||||
0x1C, 0x22, 0x1C, 0xC0, 0x30, 0x8E, 0x40, 0x80, 0x00, 0x00, 0x18, 0x04, 0x00, 0x0C, 0x10, 0x0C, // 37
|
||||
0x80, 0xCC, 0x7E, 0x72, 0xF2, 0xDE, 0x0C, 0x80, 0x00, 0x0C, 0x1C, 0x10, 0x10, 0x10, 0x1C, 0x0C, 0x1C, 0x10, // 38
|
||||
0x1E, 0x1E, 0x00, 0x00, // 39
|
||||
0xF0, 0xFC, 0x06, 0x1C, 0x7C, 0xC0, // 40
|
||||
0x06, 0xFC, 0xF0, 0xC0, 0x7C, 0x1C, // 41
|
||||
0x14, 0x14, 0x0E, 0x14, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, // 42
|
||||
0x60, 0x60, 0x60, 0xFC, 0xFC, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x0C, 0x0C, 0x00, 0x00, 0x00, // 43
|
||||
0x00, 0x00, 0x58, 0x38, // 44
|
||||
0xC0, 0xC0, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, // 45
|
||||
0x00, 0x00, 0x18, 0x18, // 46
|
||||
0x00, 0xC0, 0x38, 0x06, 0x18, 0x04, 0x00, 0x00, // 47
|
||||
0xF8, 0xFC, 0x0E, 0x06, 0x0E, 0xFC, 0xF8, 0x04, 0x0C, 0x1C, 0x18, 0x1C, 0x0C, 0x04, // 48
|
||||
0x18, 0x0C, 0xFE, 0xFE, 0x00, 0x00, 0x1C, 0x1C, // 49
|
||||
0x18, 0x1C, 0x86, 0xC6, 0x66, 0x3E, 0x1C, 0x18, 0x1C, 0x1C, 0x18, 0x18, 0x18, 0x18, // 50
|
||||
0x88, 0x8C, 0x06, 0x26, 0x26, 0xFE, 0xDC, 0x04, 0x0C, 0x1C, 0x18, 0x18, 0x0C, 0x04, // 51
|
||||
0xC0, 0xE0, 0xB8, 0x8C, 0xFE, 0xFE, 0x80, 0x04, 0x04, 0x04, 0x04, 0x1C, 0x1C, 0x04, // 52
|
||||
0x70, 0x7E, 0x3E, 0x36, 0x36, 0xF6, 0xC6, 0x0C, 0x1C, 0x18, 0x18, 0x18, 0x0C, 0x04, // 53
|
||||
0xF8, 0xFC, 0x6E, 0x66, 0x66, 0xEE, 0xCC, 0x04, 0x0C, 0x18, 0x18, 0x18, 0x1C, 0x0C, // 54
|
||||
0x06, 0x06, 0x06, 0xE6, 0x76, 0x1E, 0x06, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x00, // 55
|
||||
0x9C, 0xFE, 0x66, 0x66, 0x66, 0xFE, 0x9C, 0x0C, 0x1C, 0x18, 0x18, 0x18, 0x1C, 0x0C, // 56
|
||||
0x3C, 0x7E, 0x66, 0x66, 0x66, 0xFC, 0xF8, 0x0C, 0x1C, 0x18, 0x18, 0x1C, 0x0C, 0x04, // 57
|
||||
0x18, 0x18, 0x18, 0x18, // 58
|
||||
0x18, 0x18, 0x58, 0x38, // 59
|
||||
0x60, 0x60, 0xF0, 0xF0, 0x98, 0x98, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x0C, // 60
|
||||
0xD8, 0xD8, 0xD8, 0xD8, 0xD8, 0xD8, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 61
|
||||
0x0C, 0x98, 0x98, 0xF0, 0xF0, 0x60, 0x60, 0x0C, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, // 62
|
||||
0x08, 0x0C, 0x06, 0xC6, 0xE6, 0x76, 0x3C, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, // 63
|
||||
0xE0, 0x30, 0x08, 0xC4, 0xF6, 0x3A, 0x1A, 0x1A, 0xF2, 0xFA, 0x7E, 0x04, 0x08, 0xF0, 0x0C, 0x30, 0x60, 0x4C, 0x9C, 0x98, 0x98, 0x8C, 0x9C, 0x9C, 0x90, 0x48, 0x4C, 0x20, // 64
|
||||
0x00, 0xC0, 0xF8, 0xBE, 0x86, 0xBE, 0xF8, 0xC0, 0x00, 0x18, 0x1C, 0x04, 0x04, 0x04, 0x04, 0x04, 0x1C, 0x18, // 65
|
||||
0xFE, 0xFE, 0x66, 0x66, 0x66, 0x66, 0xFE, 0xDC, 0x1C, 0x1C, 0x18, 0x18, 0x18, 0x18, 0x1C, 0x0C, // 66
|
||||
0xF8, 0xFC, 0x0E, 0x06, 0x06, 0x0E, 0x9C, 0x08, 0x04, 0x0C, 0x1C, 0x18, 0x18, 0x1C, 0x0C, 0x04, // 67
|
||||
0xFE, 0xFE, 0x06, 0x06, 0x06, 0x0E, 0xFC, 0xF8, 0x1C, 0x1C, 0x18, 0x18, 0x18, 0x1C, 0x0C, 0x04, // 68
|
||||
0xFE, 0xFE, 0x66, 0x66, 0x66, 0x66, 0x66, 0x1C, 0x1C, 0x18, 0x18, 0x18, 0x18, 0x18, // 69
|
||||
0xFE, 0xFE, 0x66, 0x66, 0x66, 0x66, 0x06, 0x1C, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, // 70
|
||||
0xF8, 0xFC, 0x0E, 0x06, 0x06, 0xC6, 0xCE, 0xDC, 0xC8, 0x04, 0x0C, 0x1C, 0x18, 0x18, 0x18, 0x18, 0x0C, 0x04, // 71
|
||||
0xFE, 0xFE, 0x60, 0x60, 0x60, 0x60, 0xFE, 0xFE, 0x1C, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x1C, // 72
|
||||
0xFE, 0xFE, 0x1C, 0x1C, // 73
|
||||
0x80, 0x80, 0x00, 0x00, 0x00, 0xFE, 0xFE, 0x0C, 0x1C, 0x18, 0x18, 0x18, 0x1C, 0x0C, // 74
|
||||
0xFE, 0xFE, 0x60, 0x30, 0x78, 0xEC, 0x86, 0x02, 0x1C, 0x1C, 0x00, 0x00, 0x00, 0x04, 0x1C, 0x18, // 75
|
||||
0xFE, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x1C, 0x18, 0x18, 0x18, 0x18, 0x18, // 76
|
||||
0xFE, 0xFE, 0x0E, 0x7C, 0xE0, 0x00, 0xE0, 0x7C, 0x0E, 0xFE, 0xFE, 0x1C, 0x1C, 0x00, 0x00, 0x0C, 0x1C, 0x0C, 0x00, 0x00, 0x1C, 0x1C, // 77
|
||||
0xFE, 0xFE, 0x1C, 0x78, 0xE0, 0x80, 0xFE, 0xFE, 0x1C, 0x1C, 0x00, 0x00, 0x04, 0x0C, 0x1C, 0x1C, // 78
|
||||
0xF8, 0xFC, 0x0E, 0x06, 0x06, 0x06, 0x0E, 0xFC, 0xF8, 0x04, 0x0C, 0x1C, 0x18, 0x18, 0x18, 0x1C, 0x0C, 0x04, // 79
|
||||
0xFE, 0xFE, 0x66, 0x66, 0x66, 0x7E, 0x3C, 0x1C, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, // 80
|
||||
0xF8, 0xFC, 0x0E, 0x06, 0x86, 0x06, 0x0E, 0xFC, 0xF8, 0x04, 0x0C, 0x1C, 0x18, 0x18, 0x1C, 0x0C, 0x1C, 0x24, // 81
|
||||
0xFE, 0xFE, 0x66, 0x66, 0xE6, 0xE6, 0xBE, 0x1C, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x00, 0x0C, 0x1C, 0x18, 0x10, // 82
|
||||
0x3C, 0x7E, 0x66, 0x66, 0x66, 0xEE, 0xCC, 0x0C, 0x1C, 0x18, 0x18, 0x18, 0x1C, 0x0C, // 83
|
||||
0x06, 0x06, 0x06, 0xFE, 0xFE, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x00, // 84
|
||||
0xFE, 0xFE, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFE, 0x04, 0x0C, 0x1C, 0x18, 0x18, 0x1C, 0x0C, 0x04, // 85
|
||||
0x02, 0x1E, 0xFC, 0xE0, 0x00, 0xE0, 0xFC, 0x1E, 0x02, 0x00, 0x00, 0x00, 0x1C, 0x1C, 0x1C, 0x00, 0x00, 0x00, // 86
|
||||
0x06, 0xFE, 0xF8, 0x00, 0xF0, 0xFE, 0x0E, 0xFE, 0xF0, 0x00, 0xF8, 0xFE, 0x06, 0x00, 0x00, 0x1C, 0x1C, 0x1C, 0x00, 0x00, 0x00, 0x1C, 0x1C, 0x1C, 0x00, 0x00, // 87
|
||||
0x06, 0x0E, 0xF8, 0xF0, 0xF8, 0x0E, 0x06, 0x18, 0x1C, 0x04, 0x00, 0x04, 0x1C, 0x18, // 88
|
||||
0x06, 0x0E, 0x38, 0xF0, 0xF0, 0x38, 0x0E, 0x06, 0x00, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x00, // 89
|
||||
0x06, 0x06, 0x86, 0xE6, 0x76, 0x1E, 0x0E, 0x06, 0x18, 0x1C, 0x1C, 0x18, 0x18, 0x18, 0x18, 0x18, // 90
|
||||
0xFE, 0xFE, 0x06, 0x06, 0xFC, 0xFC, 0xC0, 0xC0, // 91
|
||||
0x06, 0x38, 0xC0, 0x00, 0x00, 0x00, 0x04, 0x18, // 92
|
||||
0x06, 0x06, 0xFE, 0xFE, 0xC0, 0xC0, 0xFC, 0xFC, // 93
|
||||
0x20, 0x38, 0x0E, 0x0E, 0x38, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 94
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, // 95
|
||||
0x02, 0x06, 0x04, 0x00, 0x00, 0x00, // 96
|
||||
0x10, 0x98, 0xD8, 0x58, 0xF8, 0xF0, 0x00, 0x0C, 0x1C, 0x18, 0x18, 0x0C, 0x1C, 0x10, // 97
|
||||
0xFE, 0xFE, 0x30, 0x18, 0x38, 0xF0, 0xE0, 0x1C, 0x1C, 0x0C, 0x18, 0x1C, 0x0C, 0x04, // 98
|
||||
0xE0, 0xF0, 0x18, 0x18, 0x38, 0x30, 0x04, 0x0C, 0x18, 0x18, 0x1C, 0x0C, // 99
|
||||
0xE0, 0xF0, 0x38, 0x18, 0x30, 0xFE, 0xFE, 0x04, 0x0C, 0x1C, 0x18, 0x0C, 0x1C, 0x1C, // 100
|
||||
0xE0, 0xF0, 0xD8, 0xD8, 0xD8, 0xF0, 0xE0, 0x04, 0x0C, 0x18, 0x18, 0x18, 0x18, 0x08, // 101
|
||||
0x18, 0xFC, 0xFE, 0x1A, 0x1A, 0x00, 0x1C, 0x1C, 0x00, 0x00, // 102
|
||||
0xE0, 0xF0, 0x38, 0x18, 0x30, 0xF8, 0xF8, 0x64, 0xEC, 0xDC, 0xD8, 0xCC, 0xFC, 0x7C, // 103
|
||||
0xFE, 0xFE, 0x30, 0x18, 0x18, 0xF8, 0xF0, 0x1C, 0x1C, 0x00, 0x00, 0x00, 0x1C, 0x1C, // 104
|
||||
0xFA, 0xFA, 0x1C, 0x1C, // 105
|
||||
0x00, 0xFA, 0xFA, 0xC0, 0xFC, 0x7C, // 106
|
||||
0xFE, 0xFE, 0xE0, 0xF0, 0x98, 0x08, 0x1C, 0x1C, 0x00, 0x04, 0x1C, 0x18, // 107
|
||||
0xFE, 0xFE, 0x1C, 0x1C, // 108
|
||||
0xF8, 0xF8, 0x10, 0x18, 0xF8, 0xF0, 0x18, 0x18, 0xF8, 0xF0, 0x1C, 0x1C, 0x00, 0x00, 0x1C, 0x1C, 0x00, 0x00, 0x1C, 0x1C, // 109
|
||||
0xF8, 0xF8, 0x30, 0x18, 0x18, 0xF8, 0xF0, 0x1C, 0x1C, 0x00, 0x00, 0x00, 0x1C, 0x1C, // 110
|
||||
0xE0, 0xF0, 0x38, 0x18, 0x38, 0xF0, 0xE0, 0x04, 0x0C, 0x1C, 0x18, 0x1C, 0x0C, 0x04, // 111
|
||||
0xF8, 0xF8, 0x30, 0x18, 0x38, 0xF0, 0xE0, 0xFC, 0xFC, 0x0C, 0x18, 0x1C, 0x0C, 0x04, // 112
|
||||
0xE0, 0xF0, 0x38, 0x18, 0x30, 0xF8, 0xF8, 0x04, 0x0C, 0x1C, 0x18, 0x0C, 0xFC, 0xFC, // 113
|
||||
0xF8, 0xF8, 0x30, 0x18, 0x18, 0x1C, 0x1C, 0x00, 0x00, 0x00, // 114
|
||||
0x70, 0xF8, 0xD8, 0xD8, 0xD8, 0x90, 0x08, 0x18, 0x18, 0x18, 0x1C, 0x0C, // 115
|
||||
0x18, 0xFC, 0xFE, 0x18, 0x18, 0x00, 0x0C, 0x1C, 0x18, 0x18, // 116
|
||||
0xF8, 0xF8, 0x00, 0x00, 0x00, 0xF8, 0xF8, 0x0C, 0x1C, 0x18, 0x18, 0x0C, 0x1C, 0x1C, // 117
|
||||
0x38, 0xF8, 0xC0, 0x00, 0xC0, 0xF8, 0x38, 0x00, 0x00, 0x1C, 0x1C, 0x1C, 0x00, 0x00, // 118
|
||||
0x18, 0xF8, 0xE0, 0x00, 0xF0, 0x38, 0xF0, 0x00, 0xE0, 0xF8, 0x18, 0x00, 0x00, 0x1C, 0x1C, 0x0C, 0x00, 0x0C, 0x1C, 0x1C, 0x00, 0x00, // 119
|
||||
0x18, 0x38, 0xE0, 0xE0, 0x38, 0x18, 0x18, 0x1C, 0x04, 0x04, 0x1C, 0x18, // 120
|
||||
0x18, 0xF8, 0xE0, 0x00, 0xE0, 0xF8, 0x18, 0x00, 0x84, 0xFC, 0xF8, 0x3C, 0x04, 0x00, // 121
|
||||
0x18, 0x98, 0xD8, 0x78, 0x38, 0x1C, 0x1C, 0x18, 0x18, 0x18, // 122
|
||||
0x80, 0xFC, 0x7E, 0x06, 0x06, 0x00, 0x7C, 0xFC, 0xC0, 0xC0, // 123
|
||||
0xFE, 0xFC, // 124
|
||||
0x06, 0x06, 0x7E, 0xFC, 0x80, 0xC0, 0xC0, 0xFC, 0x7C, 0x00, // 125
|
||||
0x60, 0x30, 0x30, 0x70, 0x60, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 126
|
||||
0xFE, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0xFE, 0x1C, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1C // 127
|
||||
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,167 +0,0 @@
|
|||
|
||||
|
||||
/*
|
||||
*
|
||||
* Corsiva_12
|
||||
*
|
||||
* created with FontCreator
|
||||
* written by F. Maximilian Thiele
|
||||
*
|
||||
* http://www.apetech.de/fontCreator
|
||||
* me@apetech.de
|
||||
*
|
||||
* File Name : corsiva_12.h
|
||||
* Date : 29.01.2005
|
||||
* Font size in bytes : 5690
|
||||
* Font width : 10
|
||||
* Font height : 11
|
||||
* Font first char : 32
|
||||
* Font last char : 128
|
||||
* Font used chars : 96
|
||||
*
|
||||
* The font data are defined as
|
||||
*
|
||||
* struct _FONT_ {
|
||||
* uint16_t font_Size_in_Bytes_over_all_included_Size_it_self;
|
||||
* uint8_t font_Width_in_Pixel_for_fixed_drawing;
|
||||
* uint8_t font_Height_in_Pixel_for_all_characters;
|
||||
* unit8_t font_First_Char;
|
||||
* uint8_t font_Char_Count;
|
||||
*
|
||||
* uint8_t font_Char_Widths[font_Last_Char - font_First_Char +1];
|
||||
* // for each character the separate width in pixels,
|
||||
* // characters < 128 have an implicit virtual right empty row
|
||||
*
|
||||
* uint8_t font_data[];
|
||||
* // bit field of all characters
|
||||
*/
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <avr/pgmspace.h>
|
||||
|
||||
#ifndef CORSIVA_12_H
|
||||
#define CORSIVA_12_H
|
||||
|
||||
#define CORSIVA_12_WIDTH 10
|
||||
#define CORSIVA_12_HEIGHT 11
|
||||
|
||||
static const uint8_t Corsiva_12[] PROGMEM = {
|
||||
0x16, 0x3A, // size
|
||||
0x0A, // width
|
||||
0x0B, // height
|
||||
0x20, // first char
|
||||
0x60, // char count
|
||||
|
||||
// char widths
|
||||
0x03, 0x02, 0x02, 0x06, 0x05, 0x07, 0x09, 0x01, 0x03, 0x04,
|
||||
0x02, 0x05, 0x02, 0x03, 0x01, 0x05, 0x05, 0x04, 0x05, 0x04,
|
||||
0x05, 0x06, 0x05, 0x05, 0x05, 0x05, 0x02, 0x03, 0x05, 0x05,
|
||||
0x05, 0x04, 0x07, 0x07, 0x07, 0x06, 0x08, 0x07, 0x07, 0x07,
|
||||
0x0A, 0x05, 0x06, 0x09, 0x07, 0x09, 0x0A, 0x06, 0x07, 0x09,
|
||||
0x09, 0x06, 0x08, 0x08, 0x08, 0x0B, 0x09, 0x09, 0x07, 0x03,
|
||||
0x03, 0x04, 0x03, 0x06, 0x02, 0x04, 0x04, 0x04, 0x06, 0x04,
|
||||
0x06, 0x06, 0x04, 0x03, 0x04, 0x06, 0x03, 0x06, 0x04, 0x04,
|
||||
0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x06, 0x08, 0x07, 0x05,
|
||||
0x06, 0x03, 0x01, 0x04, 0x05, 0x06,
|
||||
|
||||
// font data
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 32
|
||||
0x80, 0x3E, 0x00, 0x00, // 33
|
||||
0x08, 0x06, 0x00, 0x00, // 34
|
||||
0xA0, 0x78, 0xAE, 0x78, 0x2E, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 35
|
||||
0x80, 0x8C, 0xF2, 0xBF, 0x62, 0x00, 0x20, 0x00, 0x00, 0x00, // 36
|
||||
0x1C, 0x92, 0x7E, 0x0C, 0xE2, 0x90, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 37
|
||||
0x70, 0xC8, 0xA8, 0xB8, 0x6C, 0xBE, 0x02, 0xC2, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // 38
|
||||
0x08, 0x00, // 39
|
||||
0xE0, 0x18, 0x06, 0x60, 0x80, 0x00, // 40
|
||||
0x00, 0x00, 0xC3, 0x3C, 0x40, 0x20, 0x00, 0x00, // 41
|
||||
0x0C, 0x0F, 0x00, 0x00, // 42
|
||||
0x10, 0x10, 0x7C, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // 43
|
||||
0x00, 0x80, 0x40, 0x20, // 44
|
||||
0x20, 0x20, 0x20, 0x00, 0x00, 0x00, // 45
|
||||
0x80, 0x00, // 46
|
||||
0x00, 0xC0, 0x30, 0x0C, 0x03, 0x60, 0x00, 0x00, 0x00, 0x00, // 47
|
||||
0x78, 0x84, 0x82, 0x42, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, // 48
|
||||
0x80, 0x88, 0xFC, 0x86, 0x00, 0x00, 0x00, 0x00, // 49
|
||||
0xC0, 0xC4, 0xA2, 0x92, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, // 50
|
||||
0xC0, 0x80, 0xDA, 0x76, 0x00, 0x00, 0x00, 0x00, // 51
|
||||
0x20, 0x30, 0xA8, 0x7E, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, // 52
|
||||
0x80, 0x80, 0x84, 0x4A, 0x32, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 53
|
||||
0x70, 0xAC, 0x94, 0x72, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, // 54
|
||||
0xC4, 0x32, 0x0A, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, // 55
|
||||
0xE0, 0xAC, 0x92, 0x6A, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, // 56
|
||||
0x80, 0x9C, 0x52, 0x72, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, // 57
|
||||
0x80, 0x08, 0x00, 0x00, // 58
|
||||
0x00, 0x80, 0x08, 0x40, 0x20, 0x00, // 59
|
||||
0x30, 0x30, 0x48, 0x48, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, // 60
|
||||
0x28, 0x28, 0x28, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, // 61
|
||||
0x48, 0x48, 0x48, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, // 62
|
||||
0x80, 0x36, 0x12, 0x0C, 0x00, 0x00, 0x00, 0x00, // 63
|
||||
0x70, 0xCC, 0xB4, 0xAA, 0xBA, 0x62, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 64
|
||||
0x00, 0x80, 0x4C, 0x32, 0x2E, 0xFE, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 65
|
||||
0x38, 0x24, 0x86, 0xFA, 0x8E, 0x8A, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 66
|
||||
0xF0, 0x8C, 0x04, 0x02, 0x82, 0x0C, 0x00, 0x20, 0x20, 0x20, 0x00, 0x00, // 67
|
||||
0x38, 0x4C, 0x86, 0xEA, 0x9A, 0x82, 0x46, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 68
|
||||
0x38, 0x84, 0xE2, 0x9E, 0x92, 0xBA, 0xC6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 69
|
||||
0x1C, 0x86, 0xE2, 0x9E, 0x12, 0x3A, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 70
|
||||
0x70, 0x8C, 0x84, 0x82, 0xD2, 0x32, 0x16, 0x00, 0x80, 0x80, 0xC0, 0x20, 0x00, 0x00, // 71
|
||||
0xC0, 0x8C, 0xC2, 0x3A, 0x16, 0x90, 0xF8, 0x86, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 72
|
||||
0x80, 0xC0, 0xFA, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, // 73
|
||||
0x00, 0x00, 0x0C, 0xC2, 0x3A, 0x06, 0x60, 0x40, 0x40, 0x20, 0x00, 0x00, // 74
|
||||
0x8C, 0x82, 0xF2, 0x1E, 0x78, 0x88, 0x06, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x40, 0x40, 0x40, // 75
|
||||
0x80, 0xC0, 0xB8, 0x84, 0x82, 0x82, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 76
|
||||
0x80, 0x9C, 0x62, 0x1E, 0xF8, 0x60, 0x90, 0xFC, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 77
|
||||
0x80, 0x0C, 0xE2, 0x12, 0x0E, 0xF0, 0x70, 0x0C, 0x02, 0x02, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 78
|
||||
0x78, 0xC4, 0x82, 0x82, 0x46, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 79
|
||||
0x38, 0xCC, 0x86, 0xFA, 0x92, 0x12, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 80
|
||||
0x78, 0xC4, 0x82, 0x82, 0x42, 0x26, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x60, 0xC0, 0x80, 0x80, 0x40, // 81
|
||||
0x38, 0xA4, 0x86, 0xFA, 0x32, 0xD2, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x40, 0x40, // 82
|
||||
0x80, 0x00, 0x0C, 0x92, 0xE2, 0x0E, 0x00, 0x20, 0x20, 0x20, 0x00, 0x00, // 83
|
||||
0x1C, 0x86, 0x82, 0xF2, 0x8E, 0x02, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 84
|
||||
0x0C, 0x7A, 0x86, 0x80, 0x80, 0x40, 0x30, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 85
|
||||
0x0C, 0x06, 0xFE, 0x42, 0x20, 0x10, 0x0C, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 86
|
||||
0x0C, 0x06, 0xFE, 0x32, 0x08, 0x04, 0xFE, 0x20, 0x10, 0x08, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 87
|
||||
0x00, 0x80, 0x40, 0x22, 0x1E, 0xF4, 0x82, 0x01, 0x01, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 88
|
||||
0x1C, 0x04, 0x82, 0xC6, 0xBC, 0x8C, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 89
|
||||
0x80, 0xC0, 0xA6, 0x92, 0x8A, 0x86, 0xC2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 90
|
||||
0x00, 0xF0, 0x0F, 0xC0, 0xA0, 0x00, // 91
|
||||
0x07, 0xFC, 0x80, 0x00, 0x00, 0x60, // 92
|
||||
0x00, 0x00, 0xF1, 0x0F, 0x80, 0xE0, 0x00, 0x00, // 93
|
||||
0x04, 0x02, 0x04, 0x00, 0x00, 0x00, // 94
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, // 95
|
||||
0x01, 0x02, 0x00, 0x00, // 96
|
||||
0xE0, 0x90, 0xC8, 0xB8, 0x00, 0x00, 0x00, 0x00, // 97
|
||||
0xE0, 0x9E, 0x49, 0x39, 0x00, 0x00, 0x00, 0x00, // 98
|
||||
0xE0, 0x90, 0x88, 0x48, 0x00, 0x00, 0x00, 0x00, // 99
|
||||
0xE0, 0x90, 0x48, 0xF8, 0x4E, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 100
|
||||
0xF0, 0xB0, 0xA8, 0x58, 0x00, 0x00, 0x00, 0x00, // 101
|
||||
0x00, 0x90, 0x78, 0x16, 0x01, 0x01, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, // 102
|
||||
0x00, 0xE0, 0x90, 0x88, 0xE8, 0x18, 0xE0, 0x80, 0x80, 0xC0, 0x60, 0x00, // 103
|
||||
0xE0, 0x1E, 0xD1, 0xB9, 0x00, 0x00, 0x00, 0x00, // 104
|
||||
0xE0, 0x38, 0x02, 0x00, 0x00, 0x00, // 105
|
||||
0x00, 0x90, 0x78, 0x02, 0x80, 0x60, 0x00, 0x00, // 106
|
||||
0xE0, 0x3E, 0xE9, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x40, 0x40, // 107
|
||||
0xE0, 0x9C, 0x42, 0x00, 0x00, 0x00, // 108
|
||||
0xC8, 0x38, 0xD0, 0x38, 0xF0, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 109
|
||||
0xE8, 0x18, 0xD0, 0xB8, 0x00, 0x00, 0x00, 0x00, // 110
|
||||
0xF0, 0x88, 0xC8, 0x38, 0x00, 0x00, 0x00, 0x00, // 111
|
||||
0x88, 0xF8, 0x90, 0x48, 0x38, 0xE0, 0x80, 0x00, 0x00, 0x00, // 112
|
||||
0xE0, 0x90, 0x88, 0xE8, 0x18, 0x00, 0x80, 0xC0, 0xA0, 0x00, // 113
|
||||
0xC8, 0x38, 0x10, 0x08, 0x00, 0x00, 0x00, 0x00, // 114
|
||||
0xC0, 0x98, 0xE8, 0x08, 0x00, 0x00, 0x00, 0x00, // 115
|
||||
0xE8, 0x9C, 0x88, 0x40, 0x00, 0x00, 0x00, 0x00, // 116
|
||||
0xE8, 0x98, 0xE0, 0x98, 0x00, 0x00, 0x00, 0x00, // 117
|
||||
0x10, 0x08, 0xF8, 0x88, 0x60, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 118
|
||||
0x10, 0x08, 0xF8, 0x88, 0x40, 0xF8, 0x40, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 119
|
||||
0x80, 0xD0, 0x58, 0xF0, 0x10, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x40, 0x60, // 120
|
||||
0x10, 0x18, 0xF0, 0xC0, 0x38, 0x80, 0x40, 0x20, 0x00, 0x00, // 121
|
||||
0x80, 0xD8, 0xA8, 0x98, 0xD8, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 122
|
||||
0xA0, 0xD8, 0x07, 0xE0, 0x80, 0x00, // 123
|
||||
0xFF, 0xE0, // 124
|
||||
0x00, 0x00, 0xD1, 0x2F, 0x80, 0xC0, 0x20, 0x00, // 125
|
||||
0x08, 0x08, 0x18, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // 126
|
||||
0xFF, 0x81, 0x81, 0x81, 0x81, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // 127
|
||||
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,157 +0,0 @@
|
|||
/*
|
||||
*
|
||||
* System5x7
|
||||
*
|
||||
*
|
||||
* File Name : System5x7.h
|
||||
* Date : 28 Oct 2008
|
||||
* Font size in bytes : 470
|
||||
* Font width : 5
|
||||
* Font height : 7
|
||||
* Font first char : 32
|
||||
* Font last char : 127
|
||||
* Font used chars : 94
|
||||
*
|
||||
* The font data are defined as
|
||||
*
|
||||
* struct _FONT_ {
|
||||
* uint16_t font_Size_in_Bytes_over_all_included_Size_it_self;
|
||||
* uint8_t font_Width_in_Pixel_for_fixed_drawing;
|
||||
* uint8_t font_Height_in_Pixel_for_all_characters;
|
||||
* unit8_t font_First_Char;
|
||||
* uint8_t font_Char_Count;
|
||||
*
|
||||
* uint8_t font_Char_Widths[font_Last_Char - font_First_Char +1];
|
||||
* // for each character the separate width in pixels,
|
||||
* // characters < 128 have an implicit virtual right empty row
|
||||
*
|
||||
* uint8_t font_data[];
|
||||
* // bit field of all characters
|
||||
*/
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <avr/pgmspace.h>
|
||||
|
||||
#ifndef SYSTEM5x7_H
|
||||
#define SYSTEM5x7_H
|
||||
|
||||
#define SYSTEM5x7_WIDTH 5
|
||||
#define SYSTEM5x7_HEIGHT 7
|
||||
|
||||
/*
|
||||
* added to allow fontname to match header file name.
|
||||
* as well as keep the old name for backward compability
|
||||
*/
|
||||
|
||||
#define SystemFont5x7 System5x7
|
||||
|
||||
static const uint8_t System5x7[] PROGMEM = {
|
||||
0x0, 0x0, // size of zero indicates fixed width font, actual length is width * height
|
||||
0x05, // width
|
||||
0x07, // height
|
||||
0x20, // first char
|
||||
0x60, // char count
|
||||
|
||||
// Fixed width; char width table not used !!!!
|
||||
|
||||
// font data
|
||||
0x00, 0x00, 0x00, 0x00, 0x00,// (space)
|
||||
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, 0x55, 0x22, 0x50,// &
|
||||
0x00, 0x05, 0x03, 0x00, 0x00,// '
|
||||
0x00, 0x1C, 0x22, 0x41, 0x00,// (
|
||||
0x00, 0x41, 0x22, 0x1C, 0x00,// )
|
||||
0x08, 0x2A, 0x1C, 0x2A, 0x08,// *
|
||||
0x08, 0x08, 0x3E, 0x08, 0x08,// +
|
||||
0x00, 0x50, 0x30, 0x00, 0x00,// ,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08,// -
|
||||
0x00, 0x60, 0x60, 0x00, 0x00,// .
|
||||
0x20, 0x10, 0x08, 0x04, 0x02,// /
|
||||
0x3E, 0x51, 0x49, 0x45, 0x3E,// 0
|
||||
0x00, 0x42, 0x7F, 0x40, 0x00,// 1
|
||||
0x42, 0x61, 0x51, 0x49, 0x46,// 2
|
||||
0x21, 0x41, 0x45, 0x4B, 0x31,// 3
|
||||
0x18, 0x14, 0x12, 0x7F, 0x10,// 4
|
||||
0x27, 0x45, 0x45, 0x45, 0x39,// 5
|
||||
0x3C, 0x4A, 0x49, 0x49, 0x30,// 6
|
||||
0x01, 0x71, 0x09, 0x05, 0x03,// 7
|
||||
0x36, 0x49, 0x49, 0x49, 0x36,// 8
|
||||
0x06, 0x49, 0x49, 0x29, 0x1E,// 9
|
||||
0x00, 0x36, 0x36, 0x00, 0x00,// :
|
||||
0x00, 0x56, 0x36, 0x00, 0x00,// ;
|
||||
0x00, 0x08, 0x14, 0x22, 0x41,// <
|
||||
0x14, 0x14, 0x14, 0x14, 0x14,// =
|
||||
0x41, 0x22, 0x14, 0x08, 0x00,// >
|
||||
0x02, 0x01, 0x51, 0x09, 0x06,// ?
|
||||
0x32, 0x49, 0x79, 0x41, 0x3E,// @
|
||||
0x7E, 0x11, 0x11, 0x11, 0x7E,// A
|
||||
0x7F, 0x49, 0x49, 0x49, 0x36,// B
|
||||
0x3E, 0x41, 0x41, 0x41, 0x22,// C
|
||||
0x7F, 0x41, 0x41, 0x22, 0x1C,// D
|
||||
0x7F, 0x49, 0x49, 0x49, 0x41,// E
|
||||
0x7F, 0x09, 0x09, 0x01, 0x01,// F
|
||||
0x3E, 0x41, 0x41, 0x51, 0x32,// G
|
||||
0x7F, 0x08, 0x08, 0x08, 0x7F,// H
|
||||
0x00, 0x41, 0x7F, 0x41, 0x00,// I
|
||||
0x20, 0x40, 0x41, 0x3F, 0x01,// J
|
||||
0x7F, 0x08, 0x14, 0x22, 0x41,// K
|
||||
0x7F, 0x40, 0x40, 0x40, 0x40,// L
|
||||
0x7F, 0x02, 0x04, 0x02, 0x7F,// M
|
||||
0x7F, 0x04, 0x08, 0x10, 0x7F,// N
|
||||
0x3E, 0x41, 0x41, 0x41, 0x3E,// O
|
||||
0x7F, 0x09, 0x09, 0x09, 0x06,// P
|
||||
0x3E, 0x41, 0x51, 0x21, 0x5E,// Q
|
||||
0x7F, 0x09, 0x19, 0x29, 0x46,// R
|
||||
0x46, 0x49, 0x49, 0x49, 0x31,// S
|
||||
0x01, 0x01, 0x7F, 0x01, 0x01,// T
|
||||
0x3F, 0x40, 0x40, 0x40, 0x3F,// U
|
||||
0x1F, 0x20, 0x40, 0x20, 0x1F,// V
|
||||
0x7F, 0x20, 0x18, 0x20, 0x7F,// W
|
||||
0x63, 0x14, 0x08, 0x14, 0x63,// X
|
||||
0x03, 0x04, 0x78, 0x04, 0x03,// Y
|
||||
0x61, 0x51, 0x49, 0x45, 0x43,// Z
|
||||
0x00, 0x00, 0x7F, 0x41, 0x41,// [
|
||||
0x02, 0x04, 0x08, 0x10, 0x20,// "\"
|
||||
0x41, 0x41, 0x7F, 0x00, 0x00,// ]
|
||||
0x04, 0x02, 0x01, 0x02, 0x04,// ^
|
||||
0x40, 0x40, 0x40, 0x40, 0x40,// _
|
||||
0x00, 0x01, 0x02, 0x04, 0x00,// `
|
||||
0x20, 0x54, 0x54, 0x54, 0x78,// a
|
||||
0x7F, 0x48, 0x44, 0x44, 0x38,// b
|
||||
0x38, 0x44, 0x44, 0x44, 0x20,// c
|
||||
0x38, 0x44, 0x44, 0x48, 0x7F,// d
|
||||
0x38, 0x54, 0x54, 0x54, 0x18,// e
|
||||
0x08, 0x7E, 0x09, 0x01, 0x02,// f
|
||||
0x08, 0x14, 0x54, 0x54, 0x3C,// g
|
||||
0x7F, 0x08, 0x04, 0x04, 0x78,// h
|
||||
0x00, 0x44, 0x7D, 0x40, 0x00,// i
|
||||
0x20, 0x40, 0x44, 0x3D, 0x00,// j
|
||||
0x00, 0x7F, 0x10, 0x28, 0x44,// k
|
||||
0x00, 0x41, 0x7F, 0x40, 0x00,// l
|
||||
0x7C, 0x04, 0x18, 0x04, 0x78,// m
|
||||
0x7C, 0x08, 0x04, 0x04, 0x78,// n
|
||||
0x38, 0x44, 0x44, 0x44, 0x38,// o
|
||||
0x7C, 0x14, 0x14, 0x14, 0x08,// p
|
||||
0x08, 0x14, 0x14, 0x18, 0x7C,// q
|
||||
0x7C, 0x08, 0x04, 0x04, 0x08,// r
|
||||
0x48, 0x54, 0x54, 0x54, 0x20,// s
|
||||
0x04, 0x3F, 0x44, 0x40, 0x20,// t
|
||||
0x3C, 0x40, 0x40, 0x20, 0x7C,// u
|
||||
0x1C, 0x20, 0x40, 0x20, 0x1C,// v
|
||||
0x3C, 0x40, 0x30, 0x40, 0x3C,// w
|
||||
0x44, 0x28, 0x10, 0x28, 0x44,// x
|
||||
0x0C, 0x50, 0x50, 0x50, 0x3C,// y
|
||||
0x44, 0x64, 0x54, 0x4C, 0x44,// z
|
||||
0x00, 0x08, 0x36, 0x41, 0x00,// {
|
||||
0x00, 0x00, 0x7F, 0x00, 0x00,// |
|
||||
0x00, 0x41, 0x36, 0x08, 0x00,// }
|
||||
0x08, 0x08, 0x2A, 0x1C, 0x08,// ->
|
||||
0x08, 0x1C, 0x2A, 0x08, 0x08 // <-
|
||||
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,116 +0,0 @@
|
|||
|
||||
|
||||
/*
|
||||
*
|
||||
* Verdana28
|
||||
*
|
||||
* created with FontCreator
|
||||
* written by F. Maximilian Thiele
|
||||
*
|
||||
* http://www.apetech.de/fontCreator
|
||||
* me@apetech.de
|
||||
*
|
||||
* File Name : Verdana_digits_24
|
||||
* Date : 01.05.2008
|
||||
* Font size in bytes : 3833
|
||||
* Font width : 10
|
||||
* Font height : 24
|
||||
* Font first char : 48
|
||||
* Font last char : 59
|
||||
* Font used chars : 11
|
||||
*
|
||||
* The font data are defined as
|
||||
*
|
||||
* struct _FONT_ {
|
||||
* uint16_t font_Size_in_Bytes_over_all_included_Size_it_self;
|
||||
* uint8_t font_Width_in_Pixel_for_fixed_drawing;
|
||||
* uint8_t font_Height_in_Pixel_for_all_characters;
|
||||
* unit8_t font_First_Char;
|
||||
* uint8_t font_Char_Count;
|
||||
*
|
||||
* uint8_t font_Char_Widths[font_Last_Char - font_First_Char +1];
|
||||
* // for each character the separate width in pixels,
|
||||
* // characters < 128 have an implicit virtual right empty
|
||||
row
|
||||
*
|
||||
* uint8_t font_data[];
|
||||
* // bit field of all characters
|
||||
*/
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <avr/pgmspace.h>
|
||||
|
||||
#ifndef VERDANA24_H
|
||||
#define VERDANA24_H
|
||||
|
||||
#define VERDANA24_WIDTH 10
|
||||
#define VERDANA24_HEIGHT 24
|
||||
|
||||
static const uint8_t Verdana24[] PROGMEM = {
|
||||
0x0E, 0xF9, // size
|
||||
0x0A, // width
|
||||
0x18, // height
|
||||
0x30, // first char
|
||||
0x0B, // char count
|
||||
|
||||
// char widths
|
||||
0x10, 0x0D, 0x0F, 0x0F, 0x11, 0x0F, 0x10, 0x10, 0x10, 0x10,
|
||||
0x04,
|
||||
|
||||
// font data
|
||||
0x80, 0xF0, 0xFC, 0x7E, 0x0E, 0x0F, 0x07, 0x07, 0x07, 0x07, 0x0F, 0x1E,
|
||||
0x7E, 0xFC, 0xF0, 0x80, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x01, 0x0F, 0x3F, 0x7E,
|
||||
0x70, 0xF0, 0xE0, 0xE0, 0xE0, 0xE0, 0xF0, 0x70, 0x7E, 0x3F, 0x0F, 0x01, //48
|
||||
|
||||
0x38, 0x38, 0x38, 0x38, 0x3C, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xFF, 0xFF, 0xFF, 0xE0, 0xE0,
|
||||
0xE0, 0xE0, 0xE0, // 49
|
||||
|
||||
0x00, 0x1E, 0x0E, 0x0E, 0x07, 0x07, 0x07, 0x07, 0x07, 0x0F, 0x1E, 0xFE,
|
||||
0xFC, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0xF0,
|
||||
0x78, 0x3E, 0x1F, 0x07, 0x01, 0x00, 0xF0, 0xF8, 0xFC, 0xFE, 0xEF, 0xE7,
|
||||
0xE3, 0xE1, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, // 50
|
||||
|
||||
0x00, 0x1E, 0x0E, 0x0E, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x0F, 0x1E,
|
||||
0xFE, 0xFC, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x1C, 0x1C, 0x1C,
|
||||
0x1E, 0x36, 0x77, 0xF3, 0xE1, 0xC0, 0x78, 0x70, 0x70, 0xF0, 0xE0, 0xE0,
|
||||
0xE0, 0xE0, 0xE0, 0xF0, 0x70, 0x78, 0x3F, 0x1F, 0x0F, // 51
|
||||
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xF0, 0xF8, 0x7C, 0x1E, 0xFF,
|
||||
0xFF, 0xFF, 0x00, 0x00, 0x00, 0xE0, 0xF0, 0xFC, 0xFE, 0xDF, 0xC7, 0xC3,
|
||||
0xC1, 0xC0, 0xC0, 0xC0, 0xFF, 0xFF, 0xFF, 0xC0, 0xC0, 0xC0, 0x01, 0x01,
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0xFF, 0xFF, 0xFF,
|
||||
0x01, 0x01, 0x01, // 52
|
||||
|
||||
0x00, 0xFF, 0xFF, 0xFF, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
|
||||
0x07, 0x07, 0x07, 0x00, 0x1F, 0x1F, 0x0F, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E,
|
||||
0x1E, 0x1C, 0x3C, 0xF8, 0xF8, 0xE0, 0x78, 0x70, 0x70, 0xF0, 0xE0, 0xE0,
|
||||
0xE0, 0xE0, 0xE0, 0xF0, 0x70, 0x7C, 0x3F, 0x1F, 0x07, // 53
|
||||
|
||||
0x00, 0xC0, 0xF0, 0xF8, 0x3C, 0x1E, 0x0E, 0x0E, 0x07, 0x07, 0x07, 0x07,
|
||||
0x07, 0x0F, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0x1C, 0x1C, 0x0E, 0x0E, 0x0E,
|
||||
0x0E, 0x0E, 0x0E, 0x1E, 0x3C, 0xF8, 0xF8, 0xE0, 0x03, 0x0F, 0x3F, 0x7C,
|
||||
0x78, 0xF0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0x70, 0x78, 0x3F, 0x1F, 0x07, //54
|
||||
|
||||
0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x87,
|
||||
0xE7, 0xFF, 0x7F, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0,
|
||||
0xF0, 0xFC, 0x3F, 0x0F, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0xE0,
|
||||
0xF8, 0xFC, 0x3F, 0x0F, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //55
|
||||
|
||||
0x00, 0xF0, 0xFC, 0xFE, 0x0E, 0x0F, 0x07, 0x07, 0x07, 0x07, 0x0F, 0x1E,
|
||||
0xFE, 0xFC, 0xF8, 0x00, 0x80, 0xE0, 0xF3, 0x77, 0x1F, 0x0E, 0x0E, 0x0C,
|
||||
0x1C, 0x1C, 0x1C, 0x3E, 0x77, 0xF3, 0xE0, 0x80, 0x0F, 0x1F, 0x3F, 0x78,
|
||||
0x70, 0xF0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0x70, 0x78, 0x3F, 0x1F, 0x0F, //56
|
||||
|
||||
0xE0, 0xF8, 0xFC, 0x1E, 0x0E, 0x07, 0x07, 0x07, 0x07, 0x07, 0x0F, 0x1E,
|
||||
0x3E, 0xFC, 0xF0, 0xC0, 0x07, 0x1F, 0x1F, 0x3C, 0x78, 0x70, 0x70, 0x70,
|
||||
0x70, 0x70, 0x70, 0x38, 0x38, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0xF0, 0xE0,
|
||||
0xE0, 0xE0, 0xE0, 0xE0, 0x70, 0x70, 0x78, 0x3C, 0x1F, 0x0F, 0x03, 0x00, //57
|
||||
|
||||
0xC0, 0xC0, 0xC0, 0xC0, 0x03, 0x03, 0x03, 0x03, 0xF0, 0xF0, 0xF0, 0xF0 // 58
|
||||
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,18 +0,0 @@
|
|||
/*
|
||||
* allFonts.h font header for GLCD library
|
||||
* The fonts listed below will be available in a sketch if this file is included
|
||||
*
|
||||
* If you create your own fonts you can add the header to this file
|
||||
*
|
||||
* Note that the build environment only holds a font in Flash if its selected
|
||||
* so there is no penalty to including a font file here if its not used
|
||||
*/
|
||||
|
||||
#include "SystemFont5x7.h" // system font
|
||||
#include "Arial14.h" // proportional font
|
||||
#include "Arial_bold_14.h" // Bold proportional font
|
||||
#include "Corsiva_12.h"
|
||||
#include "Verdana_digits_24.h" // large proportional font - numerals only
|
||||
#include "fixednums7x15.h" // fixed width font - numerals only
|
||||
#include "fixednums8x16.h" // fixed width font - numerals only
|
||||
#include "fixednums15x31.h" // fixed width font - numerals only
|
|
@ -1,127 +0,0 @@
|
|||
/*
|
||||
* Fixed width font for numbers
|
||||
*
|
||||
* This font is very useful when using overstrike as all characters & numbers
|
||||
* are all the same width.
|
||||
*
|
||||
* This font also contains a few special characters that are nice for certain applications
|
||||
* like clocks, signed values or decimal point values.
|
||||
*
|
||||
* The rendering code normally inserts a pad pixel so this size allows the font to fit
|
||||
* perfectly on 32 and 64 tall glcd displays.
|
||||
*
|
||||
* Font has also been squeezed to 15 pixels wide for better alignment on 128 & 192 pixel displays.
|
||||
*/
|
||||
|
||||
#ifndef FIXEDNUMS15x31_H
|
||||
#define FIXEDNUMS15x31_H
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <avr/pgmspace.h>
|
||||
|
||||
|
||||
static const uint8_t fixednums15x31[] PROGMEM = {
|
||||
0x0, 0x0, // size of zero indicates fixed width font
|
||||
15, // width
|
||||
31, // height
|
||||
'+', // first char (48)
|
||||
16, // char count
|
||||
// char '+'
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xfc, 0xfc, 0xfc, 0xfc, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
|
||||
// char ','
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcf, 0xcf, 0x3f, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
|
||||
// char '-'
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
|
||||
// char '.'
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
|
||||
// char '/'
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xff, 0xff, 0x0f,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xff, 0xff, 0x0f, 0x0f, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xf0, 0xf0, 0xff, 0xff, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
|
||||
// char '0'
|
||||
0xf0, 0xf0, 0xfc, 0xfc, 0x0f, 0x0f, 0x03, 0x03, 0x03, 0xcf, 0xcf, 0xfc, 0xfc, 0xf0, 0xf0,
|
||||
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xc0, 0xc0, 0x3c, 0x3f, 0x03, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0x3c, 0x3c, 0x03, 0x03, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0x00, 0x03, 0x03, 0x0f, 0x0f, 0x0c, 0x0c, 0x0c, 0x0f, 0x0f, 0x03, 0x03, 0x00, 0x00,
|
||||
|
||||
// char '1'
|
||||
0x30, 0x30, 0x30, 0x30, 0x3c, 0x3c, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0f, 0x0f, 0x0f, 0x0f, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,
|
||||
|
||||
// char '2'
|
||||
0xf0, 0xf0, 0xfc, 0xfc, 0x0f, 0x0f, 0x03, 0x03, 0x03, 0x03, 0x0f, 0xff, 0xfc, 0xfc, 0xf0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xf0, 0xff, 0x3f, 0x3f, 0x0f,
|
||||
0xc0, 0xc0, 0xf0, 0xf0, 0x3c, 0x3c, 0x0f, 0x0f, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x0f, 0x0f, 0x0f, 0x0f, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,
|
||||
|
||||
// char '3'
|
||||
0xf0, 0xf0, 0xfc, 0xfc, 0x0f, 0x0f, 0x03, 0x03, 0x03, 0x03, 0x0f, 0x1f, 0xfc, 0xfc, 0xf0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xff, 0xdf, 0x8f,
|
||||
0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff,
|
||||
0x00, 0x00, 0x03, 0x03, 0x0f, 0x0f, 0x0c, 0x0c, 0x0c, 0x0c, 0x0f, 0x0f, 0x03, 0x03, 0x00,
|
||||
|
||||
// char '4'
|
||||
0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xff, 0xff, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xfc, 0xfc, 0xff, 0xff, 0x03, 0x03, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xc0, 0xc0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00,
|
||||
|
||||
// char '5'
|
||||
0xff, 0xff, 0xff, 0xff, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
|
||||
0x0f, 0x0f, 0x0f, 0x0f, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x3c, 0xfc, 0xf0, 0xf0, 0xc0,
|
||||
0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0x00, 0x03, 0x03, 0x0f, 0x0f, 0x0c, 0x0c, 0x0c, 0x0c, 0x0f, 0x0f, 0x03, 0x03, 0x00,
|
||||
|
||||
// char '6'
|
||||
0x00, 0x00, 0xc0, 0xc0, 0xf0, 0xf0, 0x3c, 0x3c, 0x0f, 0x0f, 0x03, 0x03, 0x03, 0x03, 0x03,
|
||||
0xfc, 0xfc, 0xff, 0xff, 0x33, 0x33, 0x30, 0x30, 0x30, 0x30, 0xf0, 0xf0, 0xc0, 0xc0, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0x00, 0x03, 0x03, 0x0f, 0x0f, 0x0c, 0x0c, 0x0c, 0x0c, 0x0f, 0x0f, 0x03, 0x03, 0x00,
|
||||
|
||||
// char '7'
|
||||
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xff, 0xff, 0x3f, 0x3f, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0xff, 0xff, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
|
||||
// char '8'
|
||||
0xf0, 0xf0, 0xfc, 0xfc, 0x0f, 0x0f, 0x03, 0x03, 0x03, 0x0f, 0x0f, 0xfc, 0xfc, 0xf0, 0xf0,
|
||||
0x03, 0x03, 0xcf, 0xcf, 0xfc, 0xfc, 0x30, 0x30, 0x30, 0xfc, 0xfc, 0xcf, 0xcf, 0x03, 0x03,
|
||||
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0x00, 0x03, 0x03, 0x0f, 0x0f, 0x0c, 0x0c, 0x0c, 0x0f, 0x0f, 0x03, 0x03, 0x00, 0x00,
|
||||
|
||||
// char '9'
|
||||
0xe0, 0xf0, 0xfc, 0xfc, 0x0f, 0x0f, 0x03, 0x03, 0x03, 0x0f, 0x0f, 0xfc, 0xfc, 0xf0, 0xe0,
|
||||
0x07, 0x0f, 0x3f, 0x3f, 0xf0, 0xf0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xfc, 0xfc, 0x3f, 0x3f, 0x03,
|
||||
0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0f, 0x0f, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
|
||||
// char ':'
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x3c, 0x3c, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,92 +0,0 @@
|
|||
/*
|
||||
* Fixed width font for numbers
|
||||
*
|
||||
* This font is very useful when using overstrike as all characters & numbers
|
||||
* are all the same width.
|
||||
*
|
||||
* This font also contains a few special characters that are nice for certain applications
|
||||
* like clocks, signed values or decimal point values.
|
||||
*
|
||||
* When rendering code inserts a pad pixel this size allows the font to fit
|
||||
* perfectly on 32 and 64 tall glcd displays as well as 128 wide displays.
|
||||
*/
|
||||
|
||||
#ifndef FIXEDNUMS7x15_H
|
||||
#define FIXEDNUMS7x15_H
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <avr/pgmspace.h>
|
||||
|
||||
|
||||
static const uint8_t fixednums7x15[] PROGMEM = {
|
||||
0x0, 0x0, // size of zero indicates fixed width font
|
||||
7, // width
|
||||
15, // height
|
||||
'+', // first char (48)
|
||||
16, // char count
|
||||
// char '+'
|
||||
0x00, 0x80, 0x80, 0xe0, 0xe0, 0x80, 0x80,
|
||||
0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00,
|
||||
|
||||
// char ','
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x58, 0x38, 0x00, 0x00,
|
||||
|
||||
// char '-'
|
||||
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
|
||||
// char '.'
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00,
|
||||
|
||||
// char '/'
|
||||
0x00, 0x00, 0x00, 0xc0, 0xf0, 0x3c, 0x0f,
|
||||
0x00, 0x3c, 0x0f, 0x03, 0x00, 0x00, 0x00,
|
||||
|
||||
// char '0'
|
||||
0xfc, 0xfe, 0x03, 0xe1, 0x1b, 0xfe, 0xfc,
|
||||
0x0f, 0x1f, 0x36, 0x21, 0x30, 0x1f, 0x0f,
|
||||
|
||||
// char '1'
|
||||
0x04, 0x04, 0x06, 0xff, 0xff, 0x00, 0x00,
|
||||
0x20, 0x20, 0x20, 0x3f, 0x3f, 0x20, 0x20,
|
||||
|
||||
// char '2'
|
||||
0x0c, 0x0e, 0x03, 0x01, 0x81, 0xfe, 0x7c,
|
||||
0x38, 0x3c, 0x26, 0x23, 0x21, 0x20, 0x20,
|
||||
|
||||
// char '3'
|
||||
0x0c, 0x0e, 0x43, 0x41, 0x43, 0xfe, 0xbc,
|
||||
0x0c, 0x1c, 0x30, 0x20, 0x30, 0x1f, 0x0f,
|
||||
|
||||
// char '4'
|
||||
0x00, 0xe0, 0xfc, 0x1f, 0x83, 0x80, 0x00,
|
||||
0x0f, 0x0f, 0x08, 0x08, 0x3f, 0x3f, 0x08,
|
||||
|
||||
// char '5'
|
||||
0x3f, 0x3f, 0x21, 0x21, 0x61, 0xe1, 0x81,
|
||||
0x0c, 0x1c, 0x30, 0x20, 0x30, 0x3f, 0x0f,
|
||||
|
||||
// char '6'
|
||||
0xe0, 0xf8, 0x5c, 0x46, 0xc3, 0xc1, 0x01,
|
||||
0x0f, 0x1f, 0x30, 0x20, 0x30, 0x3f, 0x0f,
|
||||
|
||||
// char '7'
|
||||
0x01, 0x01, 0x01, 0x81, 0xf1, 0x7f, 0x0f,
|
||||
0x00, 0x00, 0x3c, 0x3f, 0x03, 0x00, 0x00,
|
||||
|
||||
// char '8'
|
||||
0x1c, 0xbe, 0xe3, 0x41, 0xe3, 0xbe, 0x1c,
|
||||
0x0f, 0x1f, 0x30, 0x20, 0x30, 0x1f, 0x0f,
|
||||
|
||||
// char '9'
|
||||
0x3c, 0x7e, 0xc3, 0x81, 0x81, 0xfe, 0xfc,
|
||||
0x20, 0x30, 0x38, 0x0c, 0x07, 0x03, 0x00,
|
||||
|
||||
// char ':'
|
||||
0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00,
|
||||
|
||||
};
|
||||
#endif
|
|
@ -1,50 +0,0 @@
|
|||
/*
|
||||
* Fixed width font file for numbers only.
|
||||
*
|
||||
* This font is very useful when using overstrike as all characters & numbers
|
||||
* are all the same width.
|
||||
*
|
||||
* This font file can be used when only numbers are needed.
|
||||
*
|
||||
* This font also contains a few special characters that are nice for certain applications
|
||||
* like clocks, signed values or decimal point values.
|
||||
*
|
||||
* Font is really 16 tall but this file is set to indicate 15 to allow it to line up with the lcd page size.
|
||||
* It works as the the bottom row in the glyph is whitespace anyway.
|
||||
* The rendering code normally inserts a pad pixel so this size allows additional rows
|
||||
* on 32 and 64 tall glcd displays.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef FIXEDNUMS8x16_H
|
||||
#define FIXEDNUMS8x16_H
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <avr/pgmspace.h>
|
||||
|
||||
|
||||
static const uint8_t fixednums8x16[] PROGMEM = {
|
||||
0x0, 0x0, // size of zero indicates fixed width font
|
||||
8, // width
|
||||
15, // height
|
||||
'+', // first char (48)
|
||||
16, // char count
|
||||
|
||||
0x80, 0x80, 0x80, 0xe0, 0xe0, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, // char '+'
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x70, 0x00, 0x00, 0x00, // char ','
|
||||
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // char '-'
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, // char '.'
|
||||
0x00, 0x00, 0x00, 0xc0, 0xf0, 0x3c, 0x0f, 0x03, 0x30, 0x3c, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, // char '/'
|
||||
0xfc, 0xfe, 0x03, 0x81, 0x61, 0x1b, 0xfe, 0xfc, 0x0f, 0x1f, 0x36, 0x21, 0x20, 0x30, 0x1f, 0x0f, // char '0'
|
||||
0x04, 0x04, 0x06, 0xff, 0xff, 0x00, 0x00, 0x00, 0x20, 0x20, 0x20, 0x3f, 0x3f, 0x20, 0x20, 0x20, // char '1'
|
||||
0x0c, 0x0e, 0x03, 0x01, 0x81, 0xc3, 0x7e, 0x3c, 0x38, 0x3c, 0x26, 0x23, 0x21, 0x20, 0x20, 0x20, // char '2'
|
||||
0x0c, 0x0e, 0x43, 0x41, 0x41, 0x43, 0xfe, 0xbc, 0x0c, 0x1c, 0x30, 0x20, 0x20, 0x30, 0x1f, 0x0f, // char '3'
|
||||
0x00, 0xe0, 0xfc, 0x1f, 0x83, 0x80, 0x00, 0x00, 0x0f, 0x0f, 0x08, 0x08, 0x3f, 0x3f, 0x08, 0x08, // char '4'
|
||||
0x3f, 0x3f, 0x21, 0x21, 0x21, 0x61, 0xc1, 0x81, 0x0c, 0x1c, 0x30, 0x20, 0x20, 0x30, 0x1f, 0x0f, // char '5'
|
||||
0xe0, 0xf8, 0x5c, 0x46, 0x43, 0xc1, 0x81, 0x01, 0x0f, 0x1f, 0x30, 0x20, 0x20, 0x30, 0x1f, 0x0f, // char '6'
|
||||
0x01, 0x01, 0x01, 0x01, 0x81, 0xf1, 0x7f, 0x0f, 0x00, 0x00, 0x00, 0x3c, 0x3f, 0x03, 0x00, 0x00, // char '7'
|
||||
0x1c, 0xbe, 0xe3, 0x41, 0x41, 0xe3, 0xbe, 0x1c, 0x0f, 0x1f, 0x30, 0x20, 0x20, 0x30, 0x1f, 0x0f, // char '8'
|
||||
0x3c, 0x7e, 0xc3, 0x81, 0x81, 0x83, 0xfe, 0xfc, 0x20, 0x20, 0x20, 0x30, 0x18, 0x0e, 0x07, 0x01, // char '9'
|
||||
0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00 // char ':
|
||||
};
|
||||
#endif
|
|
@ -1,263 +0,0 @@
|
|||
#ifndef FONT5X7_H
|
||||
#define FONT5X7_H
|
||||
|
||||
// Standard ASCII 5x7 font
|
||||
|
||||
static const 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 // FONT5X7_H
|
|
@ -1,38 +0,0 @@
|
|||
ILI9341_due KEYWORD1
|
||||
ILI9341_due_gText KEYWORD1
|
||||
ILI9341_BLACK LITERAL1
|
||||
ILI9341_BLUE LITERAL1
|
||||
ILI9341_RED LITERAL1
|
||||
ILI9341_GREEN LITERAL1
|
||||
ILI9341_CYAN LITERAL1
|
||||
ILI9341_MAGENTA LITERAL1
|
||||
ILI9341_YELLOW LITERAL1
|
||||
ILI9341_WHITE LITERAL1
|
||||
pushColor KEYWORD2
|
||||
fillScreen KEYWORD2
|
||||
drawPixel KEYWORD2
|
||||
drawFastVLine KEYWORD2
|
||||
drawFastHLine KEYWORD2
|
||||
drawRect KEYWORD2
|
||||
fillRect KEYWORD2
|
||||
setRotation KEYWORD2
|
||||
invertDisplay KEYWORD2
|
||||
setAddrWindow KEYWORD2
|
||||
color565 KEYWORD2
|
||||
readcommand8 KEYWORD2
|
||||
readPixel KEYWORD2
|
||||
drawCircle KEYWORD2
|
||||
fillCircle KEYWORD2
|
||||
drawTriangle KEYWORD2
|
||||
fillTriangle KEYWORD2
|
||||
drawRoundRect KEYWORD2
|
||||
fillRoundRect KEYWORD2
|
||||
drawBitmap KEYWORD2
|
||||
drawChar KEYWORD2
|
||||
setCursor KEYWORD2
|
||||
setTextColor KEYWORD2
|
||||
setTextSize KEYWORD2
|
||||
setTextWrap KEYWORD2
|
||||
drawLine KEYWORD2
|
||||
DefineArea KEYWORD2
|
||||
SelectFont KEYWORD2
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||
</startup>
|
||||
</configuration>
|
|
@ -1,58 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{D2F086B2-74B5-4256-BCEE-719106D306F9}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>BMP24toILI565</RootNamespace>
|
||||
<AssemblyName>BMP24toILI565</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
||||
<StartArguments>
|
||||
</StartArguments>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -1,20 +0,0 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BMP24toILI565", "BMP24toILI565.csproj", "{D2F086B2-74B5-4256-BCEE-719106D306F9}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{D2F086B2-74B5-4256-BCEE-719106D306F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D2F086B2-74B5-4256-BCEE-719106D306F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D2F086B2-74B5-4256-BCEE-719106D306F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D2F086B2-74B5-4256-BCEE-719106D306F9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -1,210 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BMP24toILI565
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
static private FileStream rgb24file;
|
||||
static private FileStream rgb16file;
|
||||
static private int bmpWidth, bmpHeight; // W+H in pixels
|
||||
static private int bmpDepth; // Bit depth (currently must be 24)
|
||||
static private UInt32 bmpImageoffset; // Start of image data in file
|
||||
static private int rowSize; // Not always = bmpWidth; may have padding
|
||||
static private bool goodBmp = false; // Set to true on valid header parse
|
||||
static private bool flip = true; // BMP is stored bottom-to-top
|
||||
static private UInt16 w, h, row, col;
|
||||
static private byte r, g, b;
|
||||
static private long pos = 0, startTime;
|
||||
static private bool first = true;
|
||||
|
||||
|
||||
private static void Main(string[] args)
|
||||
{
|
||||
string codeBase = Assembly.GetExecutingAssembly().CodeBase;
|
||||
string exeFilename = Path.GetFileName(codeBase);
|
||||
|
||||
if (args.Length == 0)
|
||||
{
|
||||
var bmpFiles = Directory.EnumerateFiles(Directory.GetCurrentDirectory(), "*.bmp").ToList();
|
||||
if (bmpFiles.Count == 0)
|
||||
Console.WriteLine("\nNo .bmp files found.");
|
||||
else
|
||||
bmpFiles.ForEach(i => ConvertImage(i));
|
||||
}
|
||||
else
|
||||
{
|
||||
ConvertImage(args[0]);
|
||||
}
|
||||
}
|
||||
|
||||
static void ConvertImage(string imageFilename)
|
||||
{
|
||||
if (File.Exists(imageFilename))
|
||||
{
|
||||
try
|
||||
{
|
||||
Console.WriteLine("\nConverting {0}...", imageFilename);
|
||||
rgb24file = new FileStream(imageFilename, FileMode.Open);
|
||||
if (rgb24file == null)
|
||||
{
|
||||
Console.WriteLine("Could not open {0}", imageFilename);
|
||||
return;
|
||||
}
|
||||
|
||||
rgb24file.Seek(0, SeekOrigin.Begin);
|
||||
|
||||
if (read16(rgb24file) != 0x4D42)
|
||||
{
|
||||
Console.WriteLine("Not a BMP file");
|
||||
return;
|
||||
}
|
||||
|
||||
// BMP signature
|
||||
Console.WriteLine("File size: {0}", read32(rgb24file));
|
||||
read32(rgb24file); // Read & ignore creator bytes
|
||||
bmpImageoffset = read32(rgb24file); // Start of image data
|
||||
Console.WriteLine("Image Offset: {0}", bmpImageoffset);
|
||||
// Read DIB header
|
||||
Console.WriteLine("Header size: {0}", read32(rgb24file));
|
||||
bmpWidth = (UInt16)read32(rgb24file);
|
||||
bmpHeight = (UInt16)read32(rgb24file);
|
||||
if (read16(rgb24file) != 1) // # planes -- must be '1'
|
||||
{
|
||||
Console.WriteLine("Number of planes must be 1");
|
||||
return;
|
||||
}
|
||||
|
||||
bmpDepth = read16(rgb24file); // bits per pixel
|
||||
Console.WriteLine("Bit Depth: {0}", bmpDepth);
|
||||
if (bmpDepth != 24)
|
||||
{
|
||||
Console.WriteLine("Image is not in 24bit");
|
||||
return;
|
||||
}
|
||||
|
||||
if (read32(rgb24file) != 0) // 0 = uncompressed
|
||||
{
|
||||
Console.WriteLine("BMP must be in uncompressed format");
|
||||
return;
|
||||
}
|
||||
|
||||
goodBmp = true; // Supported BMP format -- proceed!
|
||||
Console.WriteLine("Image size: {0}x{1}", bmpWidth, bmpHeight);
|
||||
|
||||
string outFilename = Path.ChangeExtension(imageFilename, "565");
|
||||
|
||||
Console.WriteLine("{0} created", outFilename);
|
||||
|
||||
rgb16file = new FileStream(outFilename, FileMode.Create);
|
||||
|
||||
if (rgb16file == null)
|
||||
{
|
||||
Console.WriteLine("Could not create file {0}", outFilename);
|
||||
return;
|
||||
}
|
||||
|
||||
var header = new byte[54];
|
||||
|
||||
rgb24file.Seek(0, SeekOrigin.Begin);
|
||||
rgb24file.Read(header, 0, 54);
|
||||
|
||||
header[0x1C] = 16; // updage bit depth to 16 bpp
|
||||
|
||||
rgb16file.Write(header, 0, 54);
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
var inRGB = new byte[3];
|
||||
var outRGB = new byte[2];
|
||||
|
||||
for (row = 0; row < bmpHeight; row++)
|
||||
{
|
||||
// For each scanline...
|
||||
|
||||
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;
|
||||
|
||||
rgb24file.Seek(pos, SeekOrigin.Begin);
|
||||
|
||||
for (var c = 0; c < 3 * bmpWidth; c += 3)
|
||||
{
|
||||
rgb24file.Read(inRGB, 0, 3);
|
||||
|
||||
UInt16 iliColor = to565(inRGB[2], inRGB[1], inRGB[0]);
|
||||
outRGB[0] = (byte)(iliColor >> 8);
|
||||
outRGB[1] = (byte)(iliColor & 0xFF);
|
||||
rgb16file.Write(outRGB, 0, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(ex.Message);
|
||||
Console.WriteLine(ex.StackTrace);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (rgb24file != null)
|
||||
{
|
||||
rgb24file.Close();
|
||||
rgb24file = null;
|
||||
}
|
||||
if (rgb16file != null)
|
||||
{
|
||||
rgb16file.Close();
|
||||
rgb16file = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("File {0} does not exists");
|
||||
}
|
||||
}
|
||||
|
||||
static private UInt16 to565(byte r, byte g, byte b)
|
||||
{
|
||||
return (UInt16)(((r & 0xF8) << 8) | ((g & 0xFC) << 3) | (b >> 3));
|
||||
//return ((red >> 3) << 11) | ((green >> 2) << 5) | (blue >> 3);
|
||||
}
|
||||
|
||||
static UInt16 read16(FileStream file)
|
||||
{
|
||||
var bytes = new byte[2];
|
||||
|
||||
file.Read(bytes, 0, 2);
|
||||
var word = (UInt16)(bytes[1] << 8 | bytes[0]);
|
||||
|
||||
return word;
|
||||
}
|
||||
|
||||
static UInt32 read32(FileStream file)
|
||||
{
|
||||
var bytes = new byte[4];
|
||||
|
||||
file.Read(bytes, 0, 4);
|
||||
var dword = (UInt32)(bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0]);
|
||||
|
||||
return dword;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("BMP24toILI565")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Microsoft")]
|
||||
[assembly: AssemblyProduct("BMP24toILI565")]
|
||||
[assembly: AssemblyCopyright("Copyright © Microsoft 2014")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("79edc0d8-9635-4e86-9a00-3e845d89d64b")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -1,210 +0,0 @@
|
|||
// BMP24toILI565.cpp : Defines the entry point for the console application.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <windows.h>
|
||||
#include "dirent.h"
|
||||
|
||||
FILE *rgb24file;
|
||||
FILE *rgb16file;
|
||||
int bmpWidth, bmpHeight; // W+H in pixels
|
||||
UINT16 bmpDepth; // Bit depth (currently must be 24)
|
||||
UINT32 bmpImageoffset; // Start of image data in file
|
||||
UINT32 rowSize; // Not always = bmpWidth; may have padding
|
||||
boolean goodBmp = false; // Set to true on valid header parse
|
||||
boolean flip = true; // BMP is stored bottom-to-top
|
||||
UINT16 w, h, row, col;
|
||||
UINT8 r, g, b;
|
||||
UINT32 pos = 0, startTime;
|
||||
bool first = true;
|
||||
DIR* dir;
|
||||
struct dirent *ent;
|
||||
|
||||
|
||||
//inline UINT16 read16(FILE *file)
|
||||
//{
|
||||
// UINT16 word;
|
||||
// fread(&word, 2, 1, file);
|
||||
// return word;
|
||||
//}
|
||||
|
||||
//inline UINT16 read32(FILE *file)
|
||||
//{
|
||||
// UINT32 dword;
|
||||
// fread(&dword, 4, 1, file);
|
||||
// return dword;
|
||||
//}
|
||||
|
||||
UINT16 read16(FILE *file) {
|
||||
UINT16 word;
|
||||
fread(&(((UINT8 *)&word)[0]), 1, 1, file);
|
||||
fread(&(((UINT8 *)&word)[1]), 1, 1, file);
|
||||
//((UINT8 *)&word)[0] = f.read(); // LSB
|
||||
//((UINT8 *)&word)[1] = f.read(); // MSB
|
||||
return word;
|
||||
}
|
||||
//
|
||||
UINT32 read32(FILE *file) {
|
||||
UINT32 dword;
|
||||
fread(&(((UINT8 *)&dword)[0]), 1, 1, file);
|
||||
fread(&(((UINT8 *)&dword)[1]), 1, 1, file);
|
||||
fread(&(((UINT8 *)&dword)[2]), 1, 1, file);
|
||||
fread(&(((UINT8 *)&dword)[3]), 1, 1, file);
|
||||
return dword;
|
||||
}
|
||||
|
||||
inline UINT16 to565(UINT8 r, UINT8 g, UINT8 b)
|
||||
{
|
||||
return ((r & 0xF8) << 8) | ((g & 0xFC) << 3) | (b >> 3);
|
||||
//return ((red >> 3) << 11) | ((green >> 2) << 5) | (blue >> 3);
|
||||
}
|
||||
|
||||
int convertImage(char* filename)
|
||||
{
|
||||
try
|
||||
{
|
||||
printf("\n");
|
||||
printf("Converting %s...\n", filename);
|
||||
rgb24file = fopen(filename, "rb");
|
||||
if (rgb24file == NULL)
|
||||
{
|
||||
printf("Could not find file %s \n", filename);
|
||||
return -1;
|
||||
}
|
||||
|
||||
fseek(rgb24file, 0, SEEK_SET);
|
||||
|
||||
if(read16(rgb24file) != 0x4D42) // BMP signature
|
||||
{
|
||||
printf("Not a BMP file.\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("File size: %u\n", read32(rgb24file));
|
||||
(void)read32(rgb24file); // Read & ignore creator bytes
|
||||
bmpImageoffset = read32(rgb24file); // Start of image data
|
||||
printf("Image Offset: %d\n", bmpImageoffset);
|
||||
// Read DIB header
|
||||
printf("Header size: %d\n", read32(rgb24file));
|
||||
bmpWidth = read32(rgb24file);
|
||||
bmpHeight = read32(rgb24file);
|
||||
|
||||
if(read16(rgb24file) != 1) // # planes -- must be '1'
|
||||
{
|
||||
printf("Number of planes must be 1\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
bmpDepth = read16(rgb24file); // bits per pixel
|
||||
printf("Bit Depth: %d\n", bmpDepth);
|
||||
|
||||
if(bmpDepth != 24)
|
||||
{
|
||||
printf("Image is not in 24bit\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(read32(rgb24file) != 0) // 0 = uncompressed
|
||||
{
|
||||
printf("BMP must be in uncompressed format\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
goodBmp = true; // Supported BMP format -- proceed!
|
||||
printf("Image size: %dx%d\n", bmpWidth, bmpHeight);
|
||||
|
||||
char outFilename[255];
|
||||
sprintf(outFilename, "%s", filename);
|
||||
sprintf(outFilename+strlen(filename)-3, "565");
|
||||
|
||||
printf("%s created\n", outFilename);
|
||||
rgb16file = fopen(outFilename, "wb");
|
||||
|
||||
if(rgb16file == NULL)
|
||||
{
|
||||
printf("Could not create file %s\n", outFilename);
|
||||
return -1;
|
||||
}
|
||||
|
||||
UINT8 header[54];
|
||||
fseek(rgb24file, 0, SEEK_SET);
|
||||
fread(header, 1, 54, rgb24file);
|
||||
|
||||
header[0x1C] = 16; // updage bit depth to 16 bpp
|
||||
|
||||
fwrite(header, 1, 54, rgb16file);
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
UINT8 inRGB[3], outRGB[2];
|
||||
|
||||
for (row=0; row<bmpHeight; row++) { // For each scanline...
|
||||
|
||||
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;
|
||||
|
||||
fseek(rgb24file, pos, SEEK_SET);
|
||||
|
||||
for(UINT16 c=0; c<3*bmpWidth; c+=3)
|
||||
{
|
||||
fread(inRGB, 1, 3, rgb24file);
|
||||
UINT16 iliColor = to565(inRGB[2], inRGB[1], inRGB[0]);
|
||||
outRGB[0] = iliColor >> 8;
|
||||
outRGB[1] = iliColor & 0xFF;
|
||||
fwrite(outRGB, 1, 2, rgb16file);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
printf("Error converting file\n");
|
||||
}
|
||||
|
||||
_fcloseall();
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
if (argc == 1)
|
||||
{
|
||||
if ((dir = opendir (".")) != NULL) {
|
||||
/* print all the files and directories within directory */
|
||||
int bmpFilesFound = 0;
|
||||
while ((ent = readdir(dir)) != NULL) {
|
||||
if(strncmp(ent->d_name + ent->d_namlen - 4, ".bmp", 4) == 0)
|
||||
{
|
||||
convertImage(ent->d_name);
|
||||
bmpFilesFound++;
|
||||
}
|
||||
}
|
||||
closedir (dir);
|
||||
if(bmpFilesFound == 0)
|
||||
{
|
||||
printf("\n");
|
||||
printf("No .bmp files found.\n");
|
||||
}
|
||||
} else {
|
||||
/* could not open directory */
|
||||
perror ("");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
convertImage(argv[1]);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BMP24toILI565", "BMP24toILI565.vcxproj", "{EFE947CC-711C-44E0-9FA5-605D37DD3E8C}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{EFE947CC-711C-44E0-9FA5-605D37DD3E8C}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{EFE947CC-711C-44E0-9FA5-605D37DD3E8C}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{EFE947CC-711C-44E0-9FA5-605D37DD3E8C}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{EFE947CC-711C-44E0-9FA5-605D37DD3E8C}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -1,95 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{EFE947CC-711C-44E0-9FA5-605D37DD3E8C}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>BMP24toILI565</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="stdafx.h" />
|
||||
<ClInclude Include="targetver.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="BMP24toILI565.cpp" />
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -1,36 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="stdafx.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="targetver.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="BMP24toILI565.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,40 +0,0 @@
|
|||
========================================================================
|
||||
CONSOLE APPLICATION : BMP24toILI565 Project Overview
|
||||
========================================================================
|
||||
|
||||
AppWizard has created this BMP24toILI565 application for you.
|
||||
|
||||
This file contains a summary of what you will find in each of the files that
|
||||
make up your BMP24toILI565 application.
|
||||
|
||||
|
||||
BMP24toILI565.vcxproj
|
||||
This is the main project file for VC++ projects generated using an Application Wizard.
|
||||
It contains information about the version of Visual C++ that generated the file, and
|
||||
information about the platforms, configurations, and project features selected with the
|
||||
Application Wizard.
|
||||
|
||||
BMP24toILI565.vcxproj.filters
|
||||
This is the filters file for VC++ projects generated using an Application Wizard.
|
||||
It contains information about the association between the files in your project
|
||||
and the filters. This association is used in the IDE to show grouping of files with
|
||||
similar extensions under a specific node (for e.g. ".cpp" files are associated with the
|
||||
"Source Files" filter).
|
||||
|
||||
BMP24toILI565.cpp
|
||||
This is the main application source file.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
Other standard files:
|
||||
|
||||
StdAfx.h, StdAfx.cpp
|
||||
These files are used to build a precompiled header (PCH) file
|
||||
named BMP24toILI565.pch and a precompiled types file named StdAfx.obj.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
Other notes:
|
||||
|
||||
AppWizard uses "TODO:" comments to indicate parts of the source code you
|
||||
should add to or customize.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
|
@ -1,838 +0,0 @@
|
|||
/*
|
||||
* dirent.h - dirent API for Microsoft Visual Studio
|
||||
*
|
||||
* Copyright (C) 2006-2012 Toni Ronkko
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* ``Software''), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL TONI RONKKO BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* $Id: dirent.h,v 1.20 2014/03/19 17:52:23 tronkko Exp $
|
||||
*/
|
||||
#ifndef DIRENT_H
|
||||
#define DIRENT_H
|
||||
|
||||
/*
|
||||
* Define architecture flags so we don't need to include windows.h.
|
||||
* Avoiding windows.h makes it simpler to use windows sockets in conjunction
|
||||
* with dirent.h.
|
||||
*/
|
||||
#if !defined(_68K_) && !defined(_MPPC_) && !defined(_X86_) && !defined(_IA64_) && !defined(_AMD64_) && defined(_M_IX86)
|
||||
# define _X86_
|
||||
#endif
|
||||
#if !defined(_68K_) && !defined(_MPPC_) && !defined(_X86_) && !defined(_IA64_) && !defined(_AMD64_) && defined(_M_AMD64)
|
||||
#define _AMD64_
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <windef.h>
|
||||
#include <winbase.h>
|
||||
#include <wchar.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <malloc.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
|
||||
/* Indicates that d_type field is available in dirent structure */
|
||||
#define _DIRENT_HAVE_D_TYPE
|
||||
|
||||
/* Indicates that d_namlen field is available in dirent structure */
|
||||
#define _DIRENT_HAVE_D_NAMLEN
|
||||
|
||||
/* Entries missing from MSVC 6.0 */
|
||||
#if !defined(FILE_ATTRIBUTE_DEVICE)
|
||||
# define FILE_ATTRIBUTE_DEVICE 0x40
|
||||
#endif
|
||||
|
||||
/* File type and permission flags for stat() */
|
||||
#if !defined(S_IFMT)
|
||||
# define S_IFMT _S_IFMT /* File type mask */
|
||||
#endif
|
||||
#if !defined(S_IFDIR)
|
||||
# define S_IFDIR _S_IFDIR /* Directory */
|
||||
#endif
|
||||
#if !defined(S_IFCHR)
|
||||
# define S_IFCHR _S_IFCHR /* Character device */
|
||||
#endif
|
||||
#if !defined(S_IFFIFO)
|
||||
# define S_IFFIFO _S_IFFIFO /* Pipe */
|
||||
#endif
|
||||
#if !defined(S_IFREG)
|
||||
# define S_IFREG _S_IFREG /* Regular file */
|
||||
#endif
|
||||
#if !defined(S_IREAD)
|
||||
# define S_IREAD _S_IREAD /* Read permission */
|
||||
#endif
|
||||
#if !defined(S_IWRITE)
|
||||
# define S_IWRITE _S_IWRITE /* Write permission */
|
||||
#endif
|
||||
#if !defined(S_IEXEC)
|
||||
# define S_IEXEC _S_IEXEC /* Execute permission */
|
||||
#endif
|
||||
#if !defined(S_IFIFO)
|
||||
# define S_IFIFO _S_IFIFO /* Pipe */
|
||||
#endif
|
||||
#if !defined(S_IFBLK)
|
||||
# define S_IFBLK 0 /* Block device */
|
||||
#endif
|
||||
#if !defined(S_IFLNK)
|
||||
# define S_IFLNK 0 /* Link */
|
||||
#endif
|
||||
#if !defined(S_IFSOCK)
|
||||
# define S_IFSOCK 0 /* Socket */
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# define S_IRUSR S_IREAD /* Read user */
|
||||
# define S_IWUSR S_IWRITE /* Write user */
|
||||
# define S_IXUSR 0 /* Execute user */
|
||||
# define S_IRGRP 0 /* Read group */
|
||||
# define S_IWGRP 0 /* Write group */
|
||||
# define S_IXGRP 0 /* Execute group */
|
||||
# define S_IROTH 0 /* Read others */
|
||||
# define S_IWOTH 0 /* Write others */
|
||||
# define S_IXOTH 0 /* Execute others */
|
||||
#endif
|
||||
|
||||
/* Maximum length of file name */
|
||||
#if !defined(PATH_MAX)
|
||||
# define PATH_MAX MAX_PATH
|
||||
#endif
|
||||
#if !defined(FILENAME_MAX)
|
||||
# define FILENAME_MAX MAX_PATH
|
||||
#endif
|
||||
#if !defined(NAME_MAX)
|
||||
# define NAME_MAX FILENAME_MAX
|
||||
#endif
|
||||
|
||||
/* File type flags for d_type */
|
||||
#define DT_UNKNOWN 0
|
||||
#define DT_REG S_IFREG
|
||||
#define DT_DIR S_IFDIR
|
||||
#define DT_FIFO S_IFIFO
|
||||
#define DT_SOCK S_IFSOCK
|
||||
#define DT_CHR S_IFCHR
|
||||
#define DT_BLK S_IFBLK
|
||||
#define DT_LNK S_IFLNK
|
||||
|
||||
/* Macros for converting between st_mode and d_type */
|
||||
#define IFTODT(mode) ((mode) & S_IFMT)
|
||||
#define DTTOIF(type) (type)
|
||||
|
||||
/*
|
||||
* File type macros. Note that block devices, sockets and links cannot be
|
||||
* distinguished on Windows and the macros S_ISBLK, S_ISSOCK and S_ISLNK are
|
||||
* only defined for compatibility. These macros should always return false
|
||||
* on Windows.
|
||||
*/
|
||||
#define S_ISFIFO(mode) (((mode) & S_IFMT) == S_IFIFO)
|
||||
#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
|
||||
#define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
|
||||
#define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK)
|
||||
#define S_ISSOCK(mode) (((mode) & S_IFMT) == S_IFSOCK)
|
||||
#define S_ISCHR(mode) (((mode) & S_IFMT) == S_IFCHR)
|
||||
#define S_ISBLK(mode) (((mode) & S_IFMT) == S_IFBLK)
|
||||
|
||||
/* Return the exact length of d_namlen without zero terminator */
|
||||
#define _D_EXACT_NAMLEN(p) ((p)->d_namlen)
|
||||
|
||||
/* Return number of bytes needed to store d_namlen */
|
||||
#define _D_ALLOC_NAMLEN(p) (PATH_MAX)
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* Wide-character version */
|
||||
struct _wdirent {
|
||||
long d_ino; /* Always zero */
|
||||
unsigned short d_reclen; /* Structure size */
|
||||
size_t d_namlen; /* Length of name without \0 */
|
||||
int d_type; /* File type */
|
||||
wchar_t d_name[PATH_MAX]; /* File name */
|
||||
};
|
||||
typedef struct _wdirent _wdirent;
|
||||
|
||||
struct _WDIR {
|
||||
struct _wdirent ent; /* Current directory entry */
|
||||
WIN32_FIND_DATAW data; /* Private file data */
|
||||
int cached; /* True if data is valid */
|
||||
HANDLE handle; /* Win32 search handle */
|
||||
wchar_t *patt; /* Initial directory name */
|
||||
};
|
||||
typedef struct _WDIR _WDIR;
|
||||
|
||||
static _WDIR *_wopendir (const wchar_t *dirname);
|
||||
static struct _wdirent *_wreaddir (_WDIR *dirp);
|
||||
static int _wclosedir (_WDIR *dirp);
|
||||
static void _wrewinddir (_WDIR* dirp);
|
||||
|
||||
|
||||
/* For compatibility with Symbian */
|
||||
#define wdirent _wdirent
|
||||
#define WDIR _WDIR
|
||||
#define wopendir _wopendir
|
||||
#define wreaddir _wreaddir
|
||||
#define wclosedir _wclosedir
|
||||
#define wrewinddir _wrewinddir
|
||||
|
||||
|
||||
/* Multi-byte character versions */
|
||||
struct dirent {
|
||||
long d_ino; /* Always zero */
|
||||
unsigned short d_reclen; /* Structure size */
|
||||
size_t d_namlen; /* Length of name without \0 */
|
||||
int d_type; /* File type */
|
||||
char d_name[PATH_MAX]; /* File name */
|
||||
};
|
||||
typedef struct dirent dirent;
|
||||
|
||||
struct DIR {
|
||||
struct dirent ent;
|
||||
struct _WDIR *wdirp;
|
||||
};
|
||||
typedef struct DIR DIR;
|
||||
|
||||
static DIR *opendir (const char *dirname);
|
||||
static struct dirent *readdir (DIR *dirp);
|
||||
static int closedir (DIR *dirp);
|
||||
static void rewinddir (DIR* dirp);
|
||||
|
||||
|
||||
/* Internal utility functions */
|
||||
static WIN32_FIND_DATAW *dirent_first (_WDIR *dirp);
|
||||
static WIN32_FIND_DATAW *dirent_next (_WDIR *dirp);
|
||||
|
||||
static int dirent_mbstowcs_s(
|
||||
size_t *pReturnValue,
|
||||
wchar_t *wcstr,
|
||||
size_t sizeInWords,
|
||||
const char *mbstr,
|
||||
size_t count);
|
||||
|
||||
static int dirent_wcstombs_s(
|
||||
size_t *pReturnValue,
|
||||
char *mbstr,
|
||||
size_t sizeInBytes,
|
||||
const wchar_t *wcstr,
|
||||
size_t count);
|
||||
|
||||
static void dirent_set_errno (int error);
|
||||
|
||||
/*
|
||||
* Open directory stream DIRNAME for read and return a pointer to the
|
||||
* internal working area that is used to retrieve individual directory
|
||||
* entries.
|
||||
*/
|
||||
static _WDIR*
|
||||
_wopendir(
|
||||
const wchar_t *dirname)
|
||||
{
|
||||
_WDIR *dirp = NULL;
|
||||
int error;
|
||||
|
||||
/* Must have directory name */
|
||||
if (dirname == NULL || dirname[0] == '\0') {
|
||||
dirent_set_errno (ENOENT);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Allocate new _WDIR structure */
|
||||
dirp = (_WDIR*) malloc (sizeof (struct _WDIR));
|
||||
if (dirp != NULL) {
|
||||
DWORD n;
|
||||
|
||||
/* Reset _WDIR structure */
|
||||
dirp->handle = INVALID_HANDLE_VALUE;
|
||||
dirp->patt = NULL;
|
||||
dirp->cached = 0;
|
||||
|
||||
/* Compute the length of full path plus zero terminator */
|
||||
n = GetFullPathNameW (dirname, 0, NULL, NULL);
|
||||
|
||||
/* Allocate room for absolute directory name and search pattern */
|
||||
dirp->patt = (wchar_t*) malloc (sizeof (wchar_t) * n + 16);
|
||||
if (dirp->patt) {
|
||||
|
||||
/*
|
||||
* Convert relative directory name to an absolute one. This
|
||||
* allows rewinddir() to function correctly even when current
|
||||
* working directory is changed between opendir() and rewinddir().
|
||||
*/
|
||||
n = GetFullPathNameW (dirname, n, dirp->patt, NULL);
|
||||
if (n > 0) {
|
||||
wchar_t *p;
|
||||
|
||||
/* Append search pattern \* to the directory name */
|
||||
p = dirp->patt + n;
|
||||
if (dirp->patt < p) {
|
||||
switch (p[-1]) {
|
||||
case '\\':
|
||||
case '/':
|
||||
case ':':
|
||||
/* Directory ends in path separator, e.g. c:\temp\ */
|
||||
/*NOP*/;
|
||||
break;
|
||||
|
||||
default:
|
||||
/* Directory name doesn't end in path separator */
|
||||
*p++ = '\\';
|
||||
}
|
||||
}
|
||||
*p++ = '*';
|
||||
*p = '\0';
|
||||
|
||||
/* Open directory stream and retrieve the first entry */
|
||||
if (dirent_first (dirp)) {
|
||||
/* Directory stream opened successfully */
|
||||
error = 0;
|
||||
} else {
|
||||
/* Cannot retrieve first entry */
|
||||
error = 1;
|
||||
dirent_set_errno (ENOENT);
|
||||
}
|
||||
|
||||
} else {
|
||||
/* Cannot retrieve full path name */
|
||||
dirent_set_errno (ENOENT);
|
||||
error = 1;
|
||||
}
|
||||
|
||||
} else {
|
||||
/* Cannot allocate memory for search pattern */
|
||||
error = 1;
|
||||
}
|
||||
|
||||
} else {
|
||||
/* Cannot allocate _WDIR structure */
|
||||
error = 1;
|
||||
}
|
||||
|
||||
/* Clean up in case of error */
|
||||
if (error && dirp) {
|
||||
_wclosedir (dirp);
|
||||
dirp = NULL;
|
||||
}
|
||||
|
||||
return dirp;
|
||||
}
|
||||
|
||||
/*
|
||||
* Read next directory entry. The directory entry is returned in dirent
|
||||
* structure in the d_name field. Individual directory entries returned by
|
||||
* this function include regular files, sub-directories, pseudo-directories
|
||||
* "." and ".." as well as volume labels, hidden files and system files.
|
||||
*/
|
||||
static struct _wdirent*
|
||||
_wreaddir(
|
||||
_WDIR *dirp)
|
||||
{
|
||||
WIN32_FIND_DATAW *datap;
|
||||
struct _wdirent *entp;
|
||||
|
||||
/* Read next directory entry */
|
||||
datap = dirent_next (dirp);
|
||||
if (datap) {
|
||||
size_t n;
|
||||
DWORD attr;
|
||||
|
||||
/* Pointer to directory entry to return */
|
||||
entp = &dirp->ent;
|
||||
|
||||
/*
|
||||
* Copy file name as wide-character string. If the file name is too
|
||||
* long to fit in to the destination buffer, then truncate file name
|
||||
* to PATH_MAX characters and zero-terminate the buffer.
|
||||
*/
|
||||
n = 0;
|
||||
while (n + 1 < PATH_MAX && datap->cFileName[n] != 0) {
|
||||
entp->d_name[n] = datap->cFileName[n];
|
||||
n++;
|
||||
}
|
||||
dirp->ent.d_name[n] = 0;
|
||||
|
||||
/* Length of file name excluding zero terminator */
|
||||
entp->d_namlen = n;
|
||||
|
||||
/* File type */
|
||||
attr = datap->dwFileAttributes;
|
||||
if ((attr & FILE_ATTRIBUTE_DEVICE) != 0) {
|
||||
entp->d_type = DT_CHR;
|
||||
} else if ((attr & FILE_ATTRIBUTE_DIRECTORY) != 0) {
|
||||
entp->d_type = DT_DIR;
|
||||
} else {
|
||||
entp->d_type = DT_REG;
|
||||
}
|
||||
|
||||
/* Reset dummy fields */
|
||||
entp->d_ino = 0;
|
||||
entp->d_reclen = sizeof (struct _wdirent);
|
||||
|
||||
} else {
|
||||
|
||||
/* Last directory entry read */
|
||||
entp = NULL;
|
||||
|
||||
}
|
||||
|
||||
return entp;
|
||||
}
|
||||
|
||||
/*
|
||||
* Close directory stream opened by opendir() function. This invalidates the
|
||||
* DIR structure as well as any directory entry read previously by
|
||||
* _wreaddir().
|
||||
*/
|
||||
static int
|
||||
_wclosedir(
|
||||
_WDIR *dirp)
|
||||
{
|
||||
int ok;
|
||||
if (dirp) {
|
||||
|
||||
/* Release search handle */
|
||||
if (dirp->handle != INVALID_HANDLE_VALUE) {
|
||||
FindClose (dirp->handle);
|
||||
dirp->handle = INVALID_HANDLE_VALUE;
|
||||
}
|
||||
|
||||
/* Release search pattern */
|
||||
if (dirp->patt) {
|
||||
free (dirp->patt);
|
||||
dirp->patt = NULL;
|
||||
}
|
||||
|
||||
/* Release directory structure */
|
||||
free (dirp);
|
||||
ok = /*success*/0;
|
||||
|
||||
} else {
|
||||
/* Invalid directory stream */
|
||||
dirent_set_errno (EBADF);
|
||||
ok = /*failure*/-1;
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
/*
|
||||
* Rewind directory stream such that _wreaddir() returns the very first
|
||||
* file name again.
|
||||
*/
|
||||
static void
|
||||
_wrewinddir(
|
||||
_WDIR* dirp)
|
||||
{
|
||||
if (dirp) {
|
||||
/* Release existing search handle */
|
||||
if (dirp->handle != INVALID_HANDLE_VALUE) {
|
||||
FindClose (dirp->handle);
|
||||
}
|
||||
|
||||
/* Open new search handle */
|
||||
dirent_first (dirp);
|
||||
}
|
||||
}
|
||||
|
||||
/* Get first directory entry (internal) */
|
||||
static WIN32_FIND_DATAW*
|
||||
dirent_first(
|
||||
_WDIR *dirp)
|
||||
{
|
||||
WIN32_FIND_DATAW *datap;
|
||||
|
||||
/* Open directory and retrieve the first entry */
|
||||
dirp->handle = FindFirstFileW (dirp->patt, &dirp->data);
|
||||
if (dirp->handle != INVALID_HANDLE_VALUE) {
|
||||
|
||||
/* a directory entry is now waiting in memory */
|
||||
datap = &dirp->data;
|
||||
dirp->cached = 1;
|
||||
|
||||
} else {
|
||||
|
||||
/* Failed to re-open directory: no directory entry in memory */
|
||||
dirp->cached = 0;
|
||||
datap = NULL;
|
||||
|
||||
}
|
||||
return datap;
|
||||
}
|
||||
|
||||
/* Get next directory entry (internal) */
|
||||
static WIN32_FIND_DATAW*
|
||||
dirent_next(
|
||||
_WDIR *dirp)
|
||||
{
|
||||
WIN32_FIND_DATAW *p;
|
||||
|
||||
/* Get next directory entry */
|
||||
if (dirp->cached != 0) {
|
||||
|
||||
/* A valid directory entry already in memory */
|
||||
p = &dirp->data;
|
||||
dirp->cached = 0;
|
||||
|
||||
} else if (dirp->handle != INVALID_HANDLE_VALUE) {
|
||||
|
||||
/* Get the next directory entry from stream */
|
||||
if (FindNextFileW (dirp->handle, &dirp->data) != FALSE) {
|
||||
/* Got a file */
|
||||
p = &dirp->data;
|
||||
} else {
|
||||
/* The very last entry has been processed or an error occured */
|
||||
FindClose (dirp->handle);
|
||||
dirp->handle = INVALID_HANDLE_VALUE;
|
||||
p = NULL;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
/* End of directory stream reached */
|
||||
p = NULL;
|
||||
|
||||
}
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
/*
|
||||
* Open directory stream using plain old C-string.
|
||||
*/
|
||||
static DIR*
|
||||
opendir(
|
||||
const char *dirname)
|
||||
{
|
||||
struct DIR *dirp;
|
||||
int error;
|
||||
|
||||
/* Must have directory name */
|
||||
if (dirname == NULL || dirname[0] == '\0') {
|
||||
dirent_set_errno (ENOENT);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Allocate memory for DIR structure */
|
||||
dirp = (DIR*) malloc (sizeof (struct DIR));
|
||||
if (dirp) {
|
||||
wchar_t wname[PATH_MAX];
|
||||
size_t n;
|
||||
|
||||
/* Convert directory name to wide-character string */
|
||||
error = dirent_mbstowcs_s (&n, wname, PATH_MAX, dirname, PATH_MAX);
|
||||
if (!error) {
|
||||
|
||||
/* Open directory stream using wide-character name */
|
||||
dirp->wdirp = _wopendir (wname);
|
||||
if (dirp->wdirp) {
|
||||
/* Directory stream opened */
|
||||
error = 0;
|
||||
} else {
|
||||
/* Failed to open directory stream */
|
||||
error = 1;
|
||||
}
|
||||
|
||||
} else {
|
||||
/*
|
||||
* Cannot convert file name to wide-character string. This
|
||||
* occurs if the string contains invalid multi-byte sequences or
|
||||
* the output buffer is too small to contain the resulting
|
||||
* string.
|
||||
*/
|
||||
error = 1;
|
||||
}
|
||||
|
||||
} else {
|
||||
/* Cannot allocate DIR structure */
|
||||
error = 1;
|
||||
}
|
||||
|
||||
/* Clean up in case of error */
|
||||
if (error && dirp) {
|
||||
free (dirp);
|
||||
dirp = NULL;
|
||||
}
|
||||
|
||||
return dirp;
|
||||
}
|
||||
|
||||
/*
|
||||
* Read next directory entry.
|
||||
*
|
||||
* When working with text consoles, please note that file names returned by
|
||||
* readdir() are represented in the default ANSI code page while any output to
|
||||
* console is typically formatted on another code page. Thus, non-ASCII
|
||||
* characters in file names will not usually display correctly on console. The
|
||||
* problem can be fixed in two ways: (1) change the character set of console
|
||||
* to 1252 using chcp utility and use Lucida Console font, or (2) use
|
||||
* _cprintf function when writing to console. The _cprinf() will re-encode
|
||||
* ANSI strings to the console code page so many non-ASCII characters will
|
||||
* display correcly.
|
||||
*/
|
||||
static struct dirent*
|
||||
readdir(
|
||||
DIR *dirp)
|
||||
{
|
||||
WIN32_FIND_DATAW *datap;
|
||||
struct dirent *entp;
|
||||
|
||||
/* Read next directory entry */
|
||||
datap = dirent_next (dirp->wdirp);
|
||||
if (datap) {
|
||||
size_t n;
|
||||
int error;
|
||||
|
||||
/* Attempt to convert file name to multi-byte string */
|
||||
error = dirent_wcstombs_s(
|
||||
&n, dirp->ent.d_name, PATH_MAX, datap->cFileName, PATH_MAX);
|
||||
|
||||
/*
|
||||
* If the file name cannot be represented by a multi-byte string,
|
||||
* then attempt to use old 8+3 file name. This allows traditional
|
||||
* Unix-code to access some file names despite of unicode
|
||||
* characters, although file names may seem unfamiliar to the user.
|
||||
*
|
||||
* Be ware that the code below cannot come up with a short file
|
||||
* name unless the file system provides one. At least
|
||||
* VirtualBox shared folders fail to do this.
|
||||
*/
|
||||
if (error && datap->cAlternateFileName[0] != '\0') {
|
||||
error = dirent_wcstombs_s(
|
||||
&n, dirp->ent.d_name, PATH_MAX,
|
||||
datap->cAlternateFileName, PATH_MAX);
|
||||
}
|
||||
|
||||
if (!error) {
|
||||
DWORD attr;
|
||||
|
||||
/* Initialize directory entry for return */
|
||||
entp = &dirp->ent;
|
||||
|
||||
/* Length of file name excluding zero terminator */
|
||||
entp->d_namlen = n - 1;
|
||||
|
||||
/* File attributes */
|
||||
attr = datap->dwFileAttributes;
|
||||
if ((attr & FILE_ATTRIBUTE_DEVICE) != 0) {
|
||||
entp->d_type = DT_CHR;
|
||||
} else if ((attr & FILE_ATTRIBUTE_DIRECTORY) != 0) {
|
||||
entp->d_type = DT_DIR;
|
||||
} else {
|
||||
entp->d_type = DT_REG;
|
||||
}
|
||||
|
||||
/* Reset dummy fields */
|
||||
entp->d_ino = 0;
|
||||
entp->d_reclen = sizeof (struct dirent);
|
||||
|
||||
} else {
|
||||
/*
|
||||
* Cannot convert file name to multi-byte string so construct
|
||||
* an errornous directory entry and return that. Note that
|
||||
* we cannot return NULL as that would stop the processing
|
||||
* of directory entries completely.
|
||||
*/
|
||||
entp = &dirp->ent;
|
||||
entp->d_name[0] = '?';
|
||||
entp->d_name[1] = '\0';
|
||||
entp->d_namlen = 1;
|
||||
entp->d_type = DT_UNKNOWN;
|
||||
entp->d_ino = 0;
|
||||
entp->d_reclen = 0;
|
||||
}
|
||||
|
||||
} else {
|
||||
/* No more directory entries */
|
||||
entp = NULL;
|
||||
}
|
||||
|
||||
return entp;
|
||||
}
|
||||
|
||||
/*
|
||||
* Close directory stream.
|
||||
*/
|
||||
static int
|
||||
closedir(
|
||||
DIR *dirp)
|
||||
{
|
||||
int ok;
|
||||
if (dirp) {
|
||||
|
||||
/* Close wide-character directory stream */
|
||||
ok = _wclosedir (dirp->wdirp);
|
||||
dirp->wdirp = NULL;
|
||||
|
||||
/* Release multi-byte character version */
|
||||
free (dirp);
|
||||
|
||||
} else {
|
||||
|
||||
/* Invalid directory stream */
|
||||
dirent_set_errno (EBADF);
|
||||
ok = /*failure*/-1;
|
||||
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
/*
|
||||
* Rewind directory stream to beginning.
|
||||
*/
|
||||
static void
|
||||
rewinddir(
|
||||
DIR* dirp)
|
||||
{
|
||||
/* Rewind wide-character string directory stream */
|
||||
_wrewinddir (dirp->wdirp);
|
||||
}
|
||||
|
||||
/* Convert multi-byte string to wide character string */
|
||||
static int
|
||||
dirent_mbstowcs_s(
|
||||
size_t *pReturnValue,
|
||||
wchar_t *wcstr,
|
||||
size_t sizeInWords,
|
||||
const char *mbstr,
|
||||
size_t count)
|
||||
{
|
||||
int error;
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1400
|
||||
|
||||
/* Microsoft Visual Studio 2005 or later */
|
||||
error = mbstowcs_s (pReturnValue, wcstr, sizeInWords, mbstr, count);
|
||||
|
||||
#else
|
||||
|
||||
/* Older Visual Studio or non-Microsoft compiler */
|
||||
size_t n;
|
||||
|
||||
/* Convert to wide-character string (or count characters) */
|
||||
n = mbstowcs (wcstr, mbstr, sizeInWords);
|
||||
if (!wcstr || n < count) {
|
||||
|
||||
/* Zero-terminate output buffer */
|
||||
if (wcstr && sizeInWords) {
|
||||
if (n >= sizeInWords) {
|
||||
n = sizeInWords - 1;
|
||||
}
|
||||
wcstr[n] = 0;
|
||||
}
|
||||
|
||||
/* Length of resuting multi-byte string WITH zero terminator */
|
||||
if (pReturnValue) {
|
||||
*pReturnValue = n + 1;
|
||||
}
|
||||
|
||||
/* Success */
|
||||
error = 0;
|
||||
|
||||
} else {
|
||||
|
||||
/* Could not convert string */
|
||||
error = 1;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
/* Convert wide-character string to multi-byte string */
|
||||
static int
|
||||
dirent_wcstombs_s(
|
||||
size_t *pReturnValue,
|
||||
char *mbstr,
|
||||
size_t sizeInBytes, /* max size of mbstr */
|
||||
const wchar_t *wcstr,
|
||||
size_t count)
|
||||
{
|
||||
int error;
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1400
|
||||
|
||||
/* Microsoft Visual Studio 2005 or later */
|
||||
error = wcstombs_s (pReturnValue, mbstr, sizeInBytes, wcstr, count);
|
||||
|
||||
#else
|
||||
|
||||
/* Older Visual Studio or non-Microsoft compiler */
|
||||
size_t n;
|
||||
|
||||
/* Convert to multi-byte string (or count the number of bytes needed) */
|
||||
n = wcstombs (mbstr, wcstr, sizeInBytes);
|
||||
if (!mbstr || n < count) {
|
||||
|
||||
/* Zero-terminate output buffer */
|
||||
if (mbstr && sizeInBytes) {
|
||||
if (n >= sizeInBytes) {
|
||||
n = sizeInBytes - 1;
|
||||
}
|
||||
mbstr[n] = '\0';
|
||||
}
|
||||
|
||||
/* Lenght of resulting multi-bytes string WITH zero-terminator */
|
||||
if (pReturnValue) {
|
||||
*pReturnValue = n + 1;
|
||||
}
|
||||
|
||||
/* Success */
|
||||
error = 0;
|
||||
|
||||
} else {
|
||||
|
||||
/* Cannot convert string */
|
||||
error = 1;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
/* Set errno variable */
|
||||
static void
|
||||
dirent_set_errno(
|
||||
int error)
|
||||
{
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1400
|
||||
|
||||
/* Microsoft Visual Studio 2005 and later */
|
||||
_set_errno (error);
|
||||
|
||||
#else
|
||||
|
||||
/* Non-Microsoft compiler or older Microsoft compiler */
|
||||
errno = error;
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /*DIRENT_H*/
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// BMP24toILI565.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
// TODO: reference any additional headers you need in STDAFX.H
|
||||
// and not in this file
|
|
@ -1,15 +0,0 @@
|
|||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently, but
|
||||
// are changed infrequently
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "targetver.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <tchar.h>
|
||||
|
||||
|
||||
|
||||
// TODO: reference additional headers your program requires here
|
|
@ -1,8 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
// Including SDKDDKVer.h defines the highest available Windows platform.
|
||||
|
||||
// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
|
||||
// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
|
||||
|
||||
#include <SDKDDKVer.h>
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||
</startup>
|
||||
</configuration>
|
|
@ -1,108 +0,0 @@
|
|||
namespace ILIScreenshotViewer
|
||||
{
|
||||
partial class Form1
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.pictureBox = new System.Windows.Forms.PictureBox();
|
||||
this.btnShow = new System.Windows.Forms.Button();
|
||||
this.lblFailed = new System.Windows.Forms.Label();
|
||||
this.btnSaveAs = new System.Windows.Forms.Button();
|
||||
this.saveFileDialog = new System.Windows.Forms.SaveFileDialog();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// pictureBox
|
||||
//
|
||||
this.pictureBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pictureBox.Location = new System.Drawing.Point(12, 12);
|
||||
this.pictureBox.Name = "pictureBox";
|
||||
this.pictureBox.Size = new System.Drawing.Size(320, 240);
|
||||
this.pictureBox.TabIndex = 0;
|
||||
this.pictureBox.TabStop = false;
|
||||
//
|
||||
// btnShow
|
||||
//
|
||||
this.btnShow.Location = new System.Drawing.Point(93, 258);
|
||||
this.btnShow.Name = "btnShow";
|
||||
this.btnShow.Size = new System.Drawing.Size(158, 23);
|
||||
this.btnShow.TabIndex = 2;
|
||||
this.btnShow.Text = "Load Image from Clipboard";
|
||||
this.btnShow.UseVisualStyleBackColor = true;
|
||||
this.btnShow.Click += new System.EventHandler(this.btnShow_Click);
|
||||
//
|
||||
// lblFailed
|
||||
//
|
||||
this.lblFailed.Location = new System.Drawing.Point(47, 84);
|
||||
this.lblFailed.Name = "lblFailed";
|
||||
this.lblFailed.Size = new System.Drawing.Size(251, 86);
|
||||
this.lblFailed.TabIndex = 3;
|
||||
this.lblFailed.Text = "Failed to load an image from clipboard";
|
||||
this.lblFailed.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.lblFailed.Visible = false;
|
||||
//
|
||||
// btnSaveAs
|
||||
//
|
||||
this.btnSaveAs.Location = new System.Drawing.Point(258, 258);
|
||||
this.btnSaveAs.Name = "btnSaveAs";
|
||||
this.btnSaveAs.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnSaveAs.TabIndex = 4;
|
||||
this.btnSaveAs.Text = "Save As...";
|
||||
this.btnSaveAs.UseVisualStyleBackColor = true;
|
||||
this.btnSaveAs.Visible = false;
|
||||
this.btnSaveAs.Click += new System.EventHandler(this.btnSaveAs_Click);
|
||||
//
|
||||
// saveFileDialog
|
||||
//
|
||||
this.saveFileDialog.Filter = "*.bmp|*.bmp|*.png|*.png|*.gif|*.gif|*.jpg|*.jpg|All Files (*.*)|*.*";
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(347, 294);
|
||||
this.Controls.Add(this.btnSaveAs);
|
||||
this.Controls.Add(this.lblFailed);
|
||||
this.Controls.Add(this.btnShow);
|
||||
this.Controls.Add(this.pictureBox);
|
||||
this.Name = "Form1";
|
||||
this.Text = "ILI Screenshot Viewer";
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.PictureBox pictureBox;
|
||||
private System.Windows.Forms.Button btnShow;
|
||||
private System.Windows.Forms.Label lblFailed;
|
||||
private System.Windows.Forms.Button btnSaveAs;
|
||||
private System.Windows.Forms.SaveFileDialog saveFileDialog;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,141 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ILIScreenshotViewer
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void btnShow_Click(object sender, EventArgs e)
|
||||
{
|
||||
lblFailed.Visible = false;
|
||||
var bitmap = new Bitmap(320, 240, PixelFormat.Format24bppRgb);
|
||||
|
||||
//var hexString = Clipboard.GetText();
|
||||
//for (int x = 0; x < 320; x++)
|
||||
//{
|
||||
// for (int y = 0; y < 240; y++)
|
||||
// {
|
||||
// var pixelColorString = hexString.Substring(4*x + 4*320*y, 4);
|
||||
|
||||
// var pix = Convert.ToUInt16(pixelColorString, 16);
|
||||
|
||||
|
||||
// //* For PixelFormat.Format16bppRgb565
|
||||
// //var r = BitConverter.GetBytes((UInt16)((pix & 0xF800) >> 11));
|
||||
|
||||
// int red = ((pix >> 11)*527 + 23) >> 6;
|
||||
// int green = (((pix >> 5) & 0x003F)*259 + 33) >> 6;
|
||||
// int blue = ((pix & 0x001F)*527 + 23) >> 6;
|
||||
|
||||
// bitmap.SetPixel(x, y, Color.FromArgb(red, green, blue));
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
string hexString = Clipboard.GetText();
|
||||
//for (int x = 0; x < 320; x++)
|
||||
//{
|
||||
// for (int y = 0; y < 240; y++)
|
||||
// {
|
||||
// var pixelColorString = hexString.Substring(6 * (x + 320 * y), 6);
|
||||
|
||||
// var r = Convert.ToByte(pixelColorString.Substring(0, 2), 16);
|
||||
// var g = Convert.ToByte(pixelColorString.Substring(2, 2), 16);
|
||||
// var b = Convert.ToByte(pixelColorString.Substring(4, 2), 16);
|
||||
|
||||
// //* For PixelFormat.Format16bppRgb565
|
||||
// //var r = BitConverter.GetBytes((UInt16)((pix & 0xF800) >> 11));
|
||||
|
||||
// //int red = ((pix >> 11) * 527 + 23) >> 6;
|
||||
// //int green = (((pix >> 5) & 0x003F) * 259 + 33) >> 6;
|
||||
// //int blue = ((pix & 0x001F) * 527 + 23) >> 6;
|
||||
|
||||
// bitmap.SetPixel(x, y, Color.FromArgb(r, g, b));
|
||||
// }
|
||||
//}
|
||||
int x = 0, y = 0;
|
||||
var totalImageDataSize = Convert.ToUInt32(hexString.Substring(hexString.Length - 8, 8), 16);
|
||||
if (hexString.Length - 8 == totalImageDataSize)
|
||||
{
|
||||
for (int i = 0; i < totalImageDataSize; i += 10) // 6 bytes for color, 4 bytes for length
|
||||
{
|
||||
var pixelColorString = hexString.Substring(i, 6);
|
||||
var r = Convert.ToByte(pixelColorString.Substring(0, 2), 16);
|
||||
var g = Convert.ToByte(pixelColorString.Substring(2, 2), 16);
|
||||
var b = Convert.ToByte(pixelColorString.Substring(4, 2), 16);
|
||||
|
||||
var pixelCountString = hexString.Substring(i + 6, 4);
|
||||
var pixelCount = Convert.ToUInt16(pixelCountString, 16);
|
||||
|
||||
for (int p = 0; p < pixelCount; p++)
|
||||
{
|
||||
bitmap.SetPixel(x, y, Color.FromArgb(r, g, b));
|
||||
x++;
|
||||
if (x > 319)
|
||||
{
|
||||
x = 0;
|
||||
y++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pictureBox.Image = bitmap;
|
||||
btnSaveAs.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
lblFailed.Text = "Image Data length mismatch.";
|
||||
pictureBox.Image = null;
|
||||
lblFailed.Visible = true;
|
||||
btnSaveAs.Visible = false;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
lblFailed.Text = "Failed to load an image from clipboard\nTry increasing ILI9341_SPI_CLKDIVIDER or\nchange to NORMAL or EXTENDED SPI mode.";
|
||||
pictureBox.Image = null;
|
||||
lblFailed.Visible = true;
|
||||
btnSaveAs.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void btnSaveAs_Click(object sender, EventArgs e)
|
||||
{
|
||||
saveFileDialog.FileName = Path.GetFileNameWithoutExtension(saveFileDialog.FileName);
|
||||
var result = saveFileDialog.ShowDialog();
|
||||
if (result == DialogResult.OK)
|
||||
{
|
||||
ImageFormat imageFormat = ImageFormat.Bmp;
|
||||
switch (Path.GetExtension(saveFileDialog.FileName).ToLower())
|
||||
{
|
||||
case ".jpg":
|
||||
imageFormat = ImageFormat.Jpeg;
|
||||
break;
|
||||
case ".png":
|
||||
imageFormat = ImageFormat.Png;
|
||||
break;
|
||||
case ".gif":
|
||||
imageFormat = ImageFormat.Gif;
|
||||
break;
|
||||
}
|
||||
pictureBox.Image.Save(saveFileDialog.FileName, imageFormat);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -1,123 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="saveFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
|
@ -1,82 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{AD6D4A3D-2F94-435B-836F-E617ED847F46}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ILIScreenshotViewer</RootNamespace>
|
||||
<AssemblyName>ILIScreenshotViewer</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Form1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form1.Designer.cs">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
|
@ -1,20 +0,0 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ILIScreenshotViewer", "ILIScreenshotViewer.csproj", "{AD6D4A3D-2F94-435B-836F-E617ED847F46}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{AD6D4A3D-2F94-435B-836F-E617ED847F46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AD6D4A3D-2F94-435B-836F-E617ED847F46}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AD6D4A3D-2F94-435B-836F-E617ED847F46}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AD6D4A3D-2F94-435B-836F-E617ED847F46}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|