Demo for MAXREFDES99

Dependencies:   MAX7219 mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers maxrefdes99.cpp Source File

maxrefdes99.cpp

Go to the documentation of this file.
00001 /******************************************************************//**
00002 * @file maxrefdes99.cpp
00003 * Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved.
00004 *
00005 * Permission is hereby granted, free of charge, to any person obtaining a
00006 * copy of this software and associated documentation files (the "Software"),
00007 * to deal in the Software without restriction, including without limitation
00008 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
00009 * and/or sell copies of the Software, and to permit persons to whom the
00010 * Software is furnished to do so, subject to the following conditions:
00011 *
00012 * The above copyright notice and this permission notice shall be included
00013 * in all copies or substantial portions of the Software.
00014 *
00015 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00016 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00017 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00018 * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
00019 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
00020 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
00021 * OTHER DEALINGS IN THE SOFTWARE.
00022 *
00023 * Except as contained in this notice, the name of Maxim Integrated
00024 * Products, Inc. shall not be used except as stated in the Maxim Integrated
00025 * Products, Inc. Branding Policy.
00026 *
00027 * The mere transfer of this software does not imply any licenses
00028 * of trade secrets, proprietary technology, copyrights, patents,
00029 * trademarks, maskwork rights, or any other form of intellectual
00030 * property whatsoever. Maxim Integrated Products, Inc. retains all
00031 * ownership rights.
00032 **********************************************************************/
00033 
00034 
00035 #include "maxrefdes99.h"
00036 
00037 
00038 //5x7 character bit map
00039 static const uint8_t font_5x7[95][6] = {
00040     {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, //SPACE
00041     {0x00, 0x00, 0x00, 0xf2, 0x00, 0x00}, //!
00042     {0x00, 0x00, 0xe0, 0x00, 0xe0, 0x00}, //"
00043     {0x00, 0x28, 0xfe, 0x28, 0xfe, 0x28}, //#
00044     {0x00, 0x24, 0x54, 0xfe, 0x54, 0x48}, //$
00045     {0x00, 0xc4, 0xc8, 0x10, 0x26, 0x46}, //%
00046     {0x00, 0x6c, 0x92, 0xaa, 0x44, 0x0a}, //&
00047     {0x00, 0x00, 0xa0, 0xc0, 0x00, 0x00}, //'
00048     {0x00, 0x00, 0x38, 0x44, 0x82, 0x00}, //(
00049     {0x00, 0x00, 0x82, 0x44, 0x38, 0x00}, //)
00050     {0x00, 0x28, 0x10, 0x7c, 0x10, 0x28}, //*
00051     {0x00, 0x10, 0x10, 0x7c, 0x10, 0x10}, //+
00052     {0x00, 0x00, 0x0a, 0x0c, 0x00, 0x00}, //,
00053     {0x00, 0x10, 0x10, 0x10, 0x10, 0x10}, //-
00054     {0x00, 0x00, 0x06, 0x06, 0x00, 0x00}, //.
00055     {0x00, 0x04, 0x08, 0x10, 0x20, 0x40}, ///
00056     {0x00, 0x7c, 0x8a, 0x92, 0xa2, 0x7c}, //0
00057     {0x00, 0x00, 0x42, 0xfe, 0x02, 0x00}, //1
00058     {0x00, 0x42, 0x86, 0x8a, 0x92, 0x62}, //2
00059     {0x00, 0x84, 0x82, 0xa2, 0xd2, 0x8c}, //3
00060     {0x00, 0x18, 0x28, 0x48, 0xfe, 0x08}, //4
00061     {0x00, 0xe4, 0xa2, 0xa2, 0xa2, 0x9c}, //5
00062     {0x00, 0x3c, 0x52, 0x92, 0x92, 0x0c}, //6
00063     {0x00, 0x80, 0x8e, 0x90, 0xa0, 0xc0}, //7
00064     {0x00, 0x6c, 0x92, 0x92, 0x92, 0x6c}, //8
00065     {0x00, 0x60, 0x92, 0x92, 0x94, 0x78}, //9
00066     {0x00, 0x6c, 0x6c, 0x00, 0x00, 0x00}, //:
00067     {0x00, 0x6a, 0x6c, 0x00, 0x00, 0x00}, //;
00068     {0x00, 0x10, 0x28, 0x44, 0x82, 0x00}, //<
00069     {0x00, 0x28, 0x28, 0x28, 0x28, 0x28}, //=
00070     {0x00, 0x00, 0x82, 0x44, 0x28, 0x10}, //>
00071     {0x00, 0x40, 0x80, 0x8a, 0x90, 0x60}, //?
00072     {0x00, 0x0c, 0x92, 0x9e, 0x82, 0x7c}, //@
00073     {0x00, 0x7e, 0x88, 0x88, 0x88, 0x7e}, //A
00074     {0x00, 0xfe, 0x92, 0x92, 0x92, 0x6c}, //B
00075     {0x00, 0x7c, 0x82, 0x82, 0x82, 0x44}, //C
00076     {0x00, 0xfe, 0x82, 0x82, 0x44, 0x38}, //D
00077     {0x00, 0xfe, 0x92, 0x92, 0x92, 0x82}, //E
00078     {0x00, 0xfe, 0x90, 0x90, 0x90, 0x80}, //F
00079     {0x00, 0x7c, 0x82, 0x92, 0x92, 0x5e}, //G
00080     {0x00, 0xfe, 0x10, 0x10, 0x10, 0xfe}, //H
00081     {0x00, 0x00, 0x82, 0xfe, 0x82, 0x00}, //I
00082     {0x00, 0x04, 0x02, 0x82, 0xfc, 0x80}, //J
00083     {0x00, 0xfe, 0x10, 0x28, 0x44, 0x82}, //K
00084     {0x00, 0xfe, 0x02, 0x02, 0x02, 0x02}, //L
00085     {0x00, 0xfe, 0x40, 0x30, 0x40, 0xfe}, //M
00086     {0x00, 0xfe, 0x20, 0x10, 0x08, 0xfe}, //N
00087     {0x00, 0x7c, 0x82, 0x82, 0x82, 0x7c}, //O
00088     {0x00, 0xfe, 0x90, 0x90, 0x90, 0x60}, //P
00089     {0x00, 0x7c, 0x82, 0x8a, 0x84, 0x7a}, //Q
00090     {0x00, 0xfe, 0x90, 0x98, 0x94, 0x62}, //R
00091     {0x00, 0x62, 0x92, 0x92, 0x92, 0x8c}, //S
00092     {0x00, 0x80, 0x80, 0xfe, 0x80, 0x80}, //T
00093     {0x00, 0xfc, 0x02, 0x02, 0x02, 0xfc}, //U
00094     {0x00, 0xf8, 0x04, 0x02, 0x04, 0xf8}, //V
00095     {0x00, 0xfc, 0x02, 0x0c, 0x02, 0xfc}, //W
00096     {0x00, 0xc6, 0x28, 0x10, 0x28, 0xc6}, //X
00097     {0x00, 0xe0, 0x10, 0x0e, 0x10, 0xe0}, //Y
00098     {0x00, 0x86, 0x8a, 0x92, 0xa2, 0xc2}, //Z
00099     {0x00, 0x00, 0xfe, 0x82, 0x82, 0x00}, //[
00100     {0x00, 0x40, 0x20, 0x10, 0x08, 0x04}, //backslash
00101     {0x00, 0x00, 0x82, 0x82, 0xfe, 0x00}, //]
00102     {0x00, 0x20, 0x40, 0x80, 0x40, 0x20}, //^
00103     {0x00, 0x02, 0x02, 0x02, 0x02, 0x02}, //_
00104     {0x00, 0x00, 0x80, 0x40, 0x20, 0x00}, //`
00105     {0x00, 0x04, 0x2a, 0x2a, 0x2a, 0x1e}, //a
00106     {0x00, 0xfe, 0x0a, 0x12, 0x12, 0x0c}, //b
00107     {0x00, 0x1c, 0x22, 0x22, 0x22, 0x04}, //c
00108     {0x00, 0x1c, 0x22, 0x22, 0x12, 0xfe}, //d
00109     {0x00, 0x1c, 0x2a, 0x2a, 0x2a, 0x18}, //e
00110     {0x00, 0x10, 0x7e, 0x90, 0x80, 0x40}, //f
00111     {0x00, 0x30, 0x4a, 0x4a, 0x4a, 0x7c}, //g
00112     {0x00, 0xfe, 0x10, 0x20, 0x20, 0x1e}, //h
00113     {0x00, 0x00, 0x22, 0xbe, 0x02, 0x00}, //i
00114     {0x00, 0x04, 0x02, 0x22, 0xbc, 0x00}, //j
00115     {0x00, 0xfe, 0x08, 0x14, 0x22, 0x00}, //k
00116     {0x00, 0x00, 0x82, 0xfe, 0x02, 0x00}, //l
00117     {0x00, 0x1e, 0x20, 0x1a, 0x22, 0x1e}, //m
00118     {0x00, 0x3e, 0x10, 0x20, 0x20, 0x1e}, //n
00119     {0x00, 0x1c, 0x22, 0x22, 0x22, 0x1c}, //o
00120     {0x00, 0x3e, 0x28, 0x28, 0x28, 0x10}, //p
00121     {0x00, 0x10, 0x28, 0x28, 0x18, 0x3e}, //q
00122     {0x00, 0x3e, 0x10, 0x20, 0x20, 0x10}, //r
00123     {0x00, 0x12, 0x2a, 0x2a, 0x2a, 0x04}, //s
00124     {0x00, 0x20, 0xfc, 0x22, 0x02, 0x04}, //t
00125     {0x00, 0x3c, 0x02, 0x02, 0x04, 0x3e}, //u
00126     {0x00, 0x38, 0x04, 0x02, 0x04, 0x38}, //v
00127     {0x00, 0x3c, 0x02, 0x0c, 0x02, 0x3c}, //w
00128     {0x00, 0x22, 0x14, 0x08, 0x14, 0x22}, //x
00129     {0x00, 0x30, 0x0a, 0x0a, 0x0a, 0x3c}, //y
00130     {0x00, 0x22, 0x26, 0x2a, 0x32, 0x22}, //z
00131     {0x00, 0x00, 0x10, 0x6c, 0x82, 0x00}, //{
00132     {0x00, 0x00, 0x00, 0xfe, 0x00, 0x00}, //|
00133     {0x00, 0x00, 0x82, 0x6c, 0x10, 0x00}, //}
00134     {0x00, 0x30, 0x40, 0x30, 0x08, 0x30}  //~
00135 };
00136 
00137 
00138 /*******************************************************************************
00139 * 16*16 character bit map for Aerial bold fonts
00140 * These font data taken from the rinkydinkelectronic.com 
00141 * All fonts are considered Public Domain. This means that 
00142 * you are free to use them as you see fit in any project, 
00143 * commercial or not.
00144 * Important note: Commercial projects will still need a 
00145 * commercial license for any libraries used
00146 *********************************************************************************/
00147 
00148 static const uint8_t Aerial_bold_font_16x16[95][32] = {
00149 
00150     {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00151     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00152     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00153     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // SPACE
00154 
00155     {0x0,0x0,0x0,0x0,0x0,0x0,0x3F,0x3F,
00156     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00157     0x0,0x0,0x0,0x0,0x0,0x0,0xEC,0xEC,
00158     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // !
00159 
00160     {0x0,0x0,0x0,0x0,0x0,0x3C,0x3C,0x0,
00161     0x0,0x3C,0x3C,0x0,0x0,0x0,0x0,0x0,
00162     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00163     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, //"
00164 
00165     {0x0,0x0,0x6,0x6,0x6,0xF,0x3F,0x36,
00166     0xF,0x3F,0x36,0x6,0x0,0x0,0x0,0x0,
00167     0x0,0x0,0x60,0x6C,0xFC,0xF0,0x6C,0xFC,
00168     0xF0,0x60,0x60,0x60,0x0,0x0,0x0,0x0},// #
00169 
00170     {0x0,0x0,0x0,0x0,0xE,0x1F,0x33,0x7F,
00171     0x31,0x18,0x8,0x0,0x0,0x0,0x0,0x0,
00172     0x0,0x0,0x0,0x0,0x30,0x38,0x8C,0xFE,
00173     0xCC,0xF8,0x70,0x0,0x0,0x0,0x0,0x0}, //$
00174 
00175     {0x0,0x1E,0x3F,0x21,0x21,0x3F,0x1E,0x0,
00176     0x3,0x7,0x1C,0x38,0x20,0x0,0x0,0x0,
00177     0x0,0x0,0x0,0x0,0x4,0xC,0x38,0xF0,
00178     0xC0,0x0,0x78,0xFC,0x84,0x84,0xFC,0x78},//%
00179 
00180     {0x0,0x0,0x0,0x0,0x1C,0x3F,0x33,0x33,
00181     0x33,0x3E,0x1C,0x0,0x0,0x0,0x0,0x0,
00182     0x0,0x0,0x0,0x70,0xF8,0x8C,0xC,0xCC,
00183     0xEC,0x78,0x38,0xF8,0x5C,0x8,0x0,0x0},//&
00184 
00185     {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3C,
00186     0x3C,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00187     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00188     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0},//'
00189 
00190     {0x0,0x0,0x0,0x0,0x0,0xF,0x3F,0x70,
00191     0x40,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00192     0x0,0x0,0x0,0x0,0x0,0xE0,0xF8,0x1C,
00193     0x4,0x0,0x0,0x0,0x0,0x0,0x0,0x0},//(
00194 
00195     {0x0,0x0,0x0,0x0,0x0,0x40,0x70,0x3F,
00196     0xF,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00197     0x0,0x0,0x0,0x0,0x0,0x4,0x1C,0xF8,
00198     0xE0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, //}  
00199 
00200     {0x0,0x0,0x3,0x3,0x1,0x1,0xF,0xF,
00201     0xF,0x1,0x1,0x3,0x3,0x0,0x0,0x0,
00202     0x0,0x0,0x0,0x10,0x30,0xF8,0xE0,0xC0,
00203     0xE0,0xF8,0x30,0x10,0x0,0x0,0x0,0x0},//*
00204 
00205     {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00206     0x7,0x7,0x0,0x0,0x0,0x0,0x0,0x0,
00207     0x0,0x0,0x0,0x0,0x0,0xC0,0xC0,0xC0,
00208     0xF8,0xF8,0xC0,0xC0,0xC0,0x0,0x0,0x0},//+
00209 
00210     {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00211     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00212     0x0,0x0,0x0,0x0,0x0,0x0,0x32,0x3C,
00213     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, //,
00214 
00215     {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00216     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00217     0x0,0x0,0x0,0x0,0x0,0x0,0xC0,0xC0,
00218     0xC0,0xC0,0xC0,0x0,0x0,0x0,0x0,0x0},// -
00219  
00220     {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00221     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00222     0x0,0x0,0x0,0x0,0x0,0x0,0x18,0x18,
00223     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // .
00224 
00225     {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00226     0xF,0x3F,0x30,0x0,0x0,0x0,0x0,0x0,
00227     0x0,0x0,0x0,0x0,0x0,0x0,0xC,0xFC,
00228     0xF0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // /
00229 
00230     {0x0,0x0,0x0,0x0,0xF,0x1F,0x38,0x30,
00231     0x30,0x38,0x1F,0xF,0x0,0x0,0x0,0x0,
00232     0x0,0x0,0x0,0x0,0xF0,0xF8,0x1C,0xC,
00233     0xC,0x1C,0xF8,0xF0,0x0,0x0,0x0,0x0}, // 0
00234 
00235     {0x0,0x0,0x0,0x0,0x6,0xC,0x18,0x3F,
00236     0x3F,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00237     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xFC,
00238     0xFC,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // 1
00239 
00240     {0x0,0x0,0x0,0x0,0xC,0x1C,0x38,0x30,
00241     0x30,0x31,0x1F,0xE,0x0,0x0,0x0,0x0,
00242     0x0,0x0,0x0,0x0,0xC,0x1C,0x3C,0x6C,
00243     0xEC,0xCC,0x8C,0xC,0x0,0x0,0x0,0x0},// 2
00244 
00245     {0x0,0x0,0x0,0x0,0x8,0x18,0x38,0x33,
00246     0x33,0x33,0x3F,0x1C,0x0,0x0,0x0,0x0,
00247     0x0,0x0,0x0,0x0,0x30,0x38,0x1C,0xC,
00248     0xC,0x9C,0xF8,0xF0,0x0,0x0,0x0,0x0}, // 3
00249 
00250     {0x0,0x0,0x0,0x0,0x0,0x0,0x3,0x7,
00251     0x1C,0x3F,0x3F,0x0,0x0,0x0,0x0,0x0,
00252     0x0,0x0,0x0,0x0,0x70,0xF0,0xB0,0x30,
00253     0x30,0xFC,0xFC,0x30,0x0,0x0,0x0,0x0},//4
00254 
00255     {0x0,0x0,0x0,0x0,0x7,0x3F,0x3B,0x33,
00256     0x33,0x33,0x31,0x0,0x0,0x0,0x0,0x0,
00257     0x0,0x0,0x0,0x0,0xB0,0xB8,0x1C,0xC,
00258     0xC,0x9C,0xF8,0xF0,0x0,0x0,0x0,0x0}, //5
00259 
00260     {0x0,0x0,0x0,0x0,0x7,0x1F,0x39,0x33,
00261     0x33,0x33,0x39,0x18,0x0,0x0,0x0,0x0,
00262     0x0,0x0,0x0,0x0,0xE0,0xF8,0x9C,0xC,
00263     0xC,0x8C,0xF8,0xF0,0x0,0x0,0x0,0x0}, //6
00264 
00265     {0x0,0x0,0x0,0x0,0x30,0x30,0x30,0x31,
00266     0x37,0x3E,0x38,0x30,0x0,0x0,0x0,0x0,
00267     0x0,0x0,0x0,0x0,0x0,0x0,0x3C,0xFC,
00268     0xE0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // 7
00269 
00270     {0x0,0x0,0x0,0x0,0xE,0x1F,0x31,0x31,
00271     0x31,0x31,0x1F,0xE,0x0,0x0,0x0,0x0,
00272     0x0,0x0,0x0,0x0,0x70,0xF8,0x8C,0x8C,
00273     0x8C,0x8C,0xF8,0x70,0x0,0x0,0x0,0x0}, //8 
00274 
00275     {0x0,0x0,0x0,0x0,0xF,0x1F,0x31,0x30,
00276     0x30,0x39,0x1F,0x7,0x0,0x0,0x0,0x0,
00277     0x0,0x0,0x0,0x0,0x18,0x9C,0xCC,0xCC,
00278     0xCC,0x9C,0xF8,0xE0,0x0,0x0,0x0,0x0}, //9
00279 
00280     {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x18,
00281     0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00282     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30,
00283     0x30,0x0,0x0,0x0,0x0,0x0,0x0,0x0},  // :
00284 
00285     {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x18,
00286     0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00287     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x32,
00288     0x3C,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // ;
00289 
00290     {0x0,0x0,0x0,0x0,0x1,0x1,0x3,0x3,
00291     0x6,0x6,0xC,0x0,0x0,0x0,0x0,0x0,
00292     0x0,0x0,0x0,0x80,0xC0,0xC0,0x60,0x60,
00293     0x30,0x30,0x18,0x0,0x0,0x0,0x0,0x0}, // <
00294 
00295     {0x0,0x0,0x0,0xC,0xC,0xC,0xC,0xC,
00296     0xC,0xC,0xC,0xC,0x0,0x0,0x0,0x0,
00297     0x0,0x0,0x0,0xC0,0xC0,0xC0,0xC0,0xC0,
00298     0xC0,0xC0,0xC0,0xC0,0x0,0x0,0x0,0x0}, // =
00299 
00300     {0x0,0x0,0x0,0x0,0xC,0x6,0x6,0x3,
00301     0x3,0x1,0x1,0x0,0x0,0x0,0x0,0x0,
00302     0x0,0x0,0x0,0x0,0x18,0x30,0x30,0x60,
00303     0x60,0xC0,0xC0,0x80,0x0,0x0,0x0,0x0}, // >
00304 
00305     {0x0,0x0,0x0,0x0,0xC,0x1C,0x38,0x30,
00306     0x31,0x33,0x1F,0xE,0x0,0x0,0x0,0x0,
00307     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xEC,
00308     0xEC,0x80,0x0,0x0,0x0,0x0,0x0,0x0}, // ?
00309 
00310     {0x0,0x0,0x7,0x18,0x27,0x6F,0x58,0x58,
00311     0x4F,0x5F,0x38,0x30,0x1F,0x0,0x0,0x0,
00312     0x0,0x0,0xC0,0x20,0x90,0xC8,0xC8,0x88,
00313     0xC8,0xC8,0x48,0x90,0x20,0x0,0x0,0x0}, //@
00314 
00315     {0x0,0x0,0x0,0x0,0x1,0xF,0x3E,0x30,
00316     0x3E,0xF,0x1,0x0,0x0,0x0,0x0,0x0,
00317     0x0,0x0,0x4,0x3C,0xF8,0xE0,0x60,0x60,
00318     0x60,0xE0,0xF8,0x3C,0x4,0x0,0x0,0x0}, // A
00319 
00320     {0x0,0x0,0x0,0x3F,0x3F,0x31,0x31,0x31,
00321     0x31,0x31,0x3F,0x1E,0x0,0x0,0x0,0x0,
00322     0x0,0x0,0x0,0xFC,0xFC,0x8C,0x8C,0x8C,
00323     0x8C,0x8C,0x8C,0xF8,0x70,0x0,0x0,0x0}, // B
00324 
00325     {0x0,0x0,0x0,0x7,0x1F,0x1C,0x30,0x30,
00326     0x30,0x30,0x38,0x1C,0x8,0x0,0x0,0x0,
00327     0x0,0x0,0x0,0xE0,0xF8,0x38,0xC,0xC,
00328     0xC,0xC,0x1C,0x38,0x10,0x0,0x0,0x0}, // C
00329 
00330     {0x0,0x0,0x0,0x3F,0x3F,0x30,0x30,0x30,
00331     0x30,0x30,0x18,0x1F,0x7,0x0,0x0,0x0,
00332     0x0,0x0,0x0,0xFC,0xFC,0xC,0xC,0xC,
00333     0xC,0xC,0x18,0xF8,0xE0,0x0,0x0,0x0}, // D 
00334 
00335     {0x0,0x0,0x0,0x0,0x3F,0x3F,0x31,0x31,
00336     0x31,0x31,0x31,0x31,0x31,0x0,0x0,0x0,
00337     0x0,0x0,0x0,0x0,0xFC,0xFC,0x8C,0x8C,
00338     0x8C,0x8C,0x8C,0x8C,0x8C,0x0,0x0,0x0}, // E
00339 
00340     {0x0,0x0,0x0,0x0,0x3F,0x3F,0x31,0x31,
00341     0x31,0x31,0x31,0x30,0x0,0x0,0x0,0x0,
00342     0x0,0x0,0x0,0x0,0xFC,0xFC,0x80,0x80,
00343     0x80,0x80,0x80,0x0,0x0,0x0,0x0,0x0}, // F
00344 
00345     {0x0,0x0,0x7,0x1F,0x1C,0x30,0x30,0x30,
00346     0x30,0x30,0x38,0x1C,0x8,0x0,0x0,0x0,
00347     0x0,0x0,0xE0,0xF8,0x38,0xC,0xC,0xC,
00348     0xCC,0xCC,0xDC,0xF8,0xF8,0x0,0x0,0x0}, //G
00349 
00350     {0x0,0x0,0x0,0x3F,0x3F,0x1,0x1,0x1,
00351     0x1,0x1,0x1,0x3F,0x3F,0x0,0x0,0x0,
00352     0x0,0x0,0x0,0xFC,0xFC,0x80,0x80,0x80,
00353     0x80,0x80,0x80,0xFC,0xFC,0x0,0x0,0x0}, //H
00354 
00355     {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3F,
00356     0x3F,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00357     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xFC,
00358     0xFC,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // I
00359 
00360     {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00361     0x0,0x0,0x3F,0x3F,0x0,0x0,0x0,0x0,
00362     0x0,0x0,0x0,0x0,0x30,0x38,0x1C,0xC,
00363     0xC,0x1C,0xF8,0xF0,0x0,0x0,0x0,0x0}, // J
00364 
00365     {0x0,0x0,0x0,0x3F,0x3F,0x0,0x1,0x3,
00366     0x7,0xD,0x18,0x30,0x20,0x0,0x0,0x0,
00367     0x0,0x0,0x0,0xFC,0xFC,0xC0,0x80,0x0,
00368     0x80,0xE0,0x70,0x3C,0xC,0x0,0x0,0x0}, //K
00369  
00370     {0x0,0x0,0x0,0x0,0x3F,0x3F,0x0,0x0,
00371     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00372     0x0,0x0,0x0,0x0,0xFC,0xFC,0xC,0xC,
00373     0xC,0xC,0xC,0xC,0x0,0x0,0x0,0x0},    // L
00374 
00375     {0x0,0x0,0x3F,0x3F,0x3C,0xF,0x1,0x0,
00376     0x1,0xF,0x3C,0x3F,0x3F,0x0,0x0,0x0,
00377     0x0,0x0,0xFC,0xFC,0x0,0xC0,0xF8,0x3C,
00378     0xF8,0xC0,0x0,0xFC,0xFC,0x0,0x0,0x0},  // M
00379 
00380     {0x0,0x0,0x0,0x3F,0x3F,0x1C,0xE,0x3,
00381     0x1,0x0,0x0,0x3F,0x3F,0x0,0x0,0x0,
00382     0x0,0x0,0x0,0xFC,0xFC,0x0,0x0,0x80,
00383     0xC0,0x70,0x38,0xFC,0xFC,0x0,0x0,0x0},  // N
00384 
00385     {0x0,0x0,0x7,0x1F,0x18,0x30,0x30,0x30,
00386     0x30,0x30,0x18,0x1F,0x7,0x0,0x0,0x0,
00387     0x0,0x0,0xE0,0xF8,0x18,0xC,0xC,0xC,
00388     0xC,0xC,0x18,0xF8,0xE0,0x0,0x0,0x0},  // O 
00389 
00390     {0x0,0x0,0x0,0x0,0x3F,0x3F,0x31,0x31,
00391     0x31,0x31,0x3B,0x1F,0xE,0x0,0x0,0x0,
00392     0x0,0x0,0x0,0x0,0xFC,0xFC,0x80,0x80,
00393     0x80,0x80,0x80,0x0,0x0,0x0,0x0,0x0}, // P
00394 
00395     {0x0,0x0,0x7,0x1F,0x18,0x30,0x30,0x30,
00396     0x30,0x30,0x18,0x1F,0x7,0x0,0x0,0x0,
00397     0x0,0x0,0xE0,0xF8,0x18,0xC,0xC,0x2C,
00398     0x3C,0x18,0x3C,0xFE,0xE2,0x0,0x0,0x0},// Q
00399 
00400     {0x0,0x0,0x0,0x3F,0x3F,0x31,0x31,0x31,
00401     0x31,0x31,0x3B,0x1F,0xE,0x0,0x0,0x0,
00402     0x0,0x0,0x0,0xFC,0xFC,0x80,0x80,0x80,
00403     0xC0,0xE0,0x78,0x3C,0xC,0x4,0x0,0x0}, // R
00404 
00405     {0x0,0x0,0x0,0x0,0xE,0x1F,0x3B,0x33,
00406     0x31,0x31,0x39,0x1C,0xC,0x0,0x0,0x0,
00407     0x0,0x0,0x0,0x0,0x30,0x38,0x1C,0x8C,
00408     0x8C,0x8C,0xDC,0xF8,0x70,0x0,0x0,0x0}, //S
00409 
00410     {0x0,0x0,0x0,0x30,0x30,0x30,0x30,0x3F,
00411     0x3F,0x30,0x30,0x30,0x30,0x0,0x0,0x0,
00412     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xFC,
00413     0xFC,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, //T 
00414 
00415     {0x0,0x0,0x0,0x3F,0x3F,0x0,0x0,0x0,
00416     0x0,0x0,0x0,0x3F,0x3F,0x0,0x0,0x0,
00417     0x0,0x0,0x0,0xF0,0xF8,0x1C,0xC,0xC,
00418     0xC,0xC,0x1C,0xF8,0xF0,0x0,0x0,0x0}, //U
00419 
00420     {0x0,0x0,0x20,0x3C,0x1F,0x3,0x0,0x0,
00421     0x0,0x3,0x1F,0x3C,0x20,0x0,0x0,0x0,
00422     0x0,0x0,0x0,0x0,0x80,0xE0,0xFC,0x1C,
00423     0xFC,0xE0,0x80,0x0,0x0,0x0,0x0,0x0},//V 
00424 
00425     {0x0,0x0,0x38,0x3F,0x7,0x0,0x7,0x3F,
00426     0x38,0x3F,0x7,0x0,0x7,0x3F,0x38,0x0,
00427     0x0,0x0,0x0,0xC0,0xFC,0x3C,0xFC,0xC0,
00428     0x0,0xC0,0xFC,0x3C,0xFC,0xC0,0x0,0x0}, // W
00429 
00430     {0x0,0x0,0x0,0x30,0x38,0x1E,0x7,0x3,
00431     0x7,0x1E,0x38,0x30,0x0,0x0,0x0,0x0,
00432     0x0,0x0,0x0,0xC,0x1C,0x78,0xE0,0xC0,
00433     0xE0,0x78,0x1C,0xC,0x0,0x0,0x0,0x0}, // X
00434 
00435     {0x0,0x0,0x0,0x30,0x38,0x1E,0x7,0x1,
00436     0x1,0x7,0x1E,0x38,0x30,0x0,0x0,0x0,
00437     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xFC,
00438     0xFC,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // Y 
00439 
00440     {0x0,0x0,0x0,0x0,0x0,0x30,0x30,0x30,
00441     0x33,0x37,0x3E,0x38,0x30,0x0,0x0,0x0,
00442     0x0,0x0,0x0,0x0,0xC,0x1C,0x7C,0xEC,
00443     0xCC,0xC,0xC,0xC,0xC,0x0,0x0,0x0}, // Z
00444 
00445     {0x0,0x0,0x0,0x0,0x0,0x0,0x7F,0x7F,
00446     0x60,0x60,0x0,0x0,0x0,0x0,0x0,0x0,
00447     0x0,0x0,0x0,0x0,0x0,0x0,0xFE,0xFE,
00448     0x6,0x6,0x0,0x0,0x0,0x0,0x0,0x0},  // [
00449 
00450     {0x0,0x0,0x0,0x0,0x0,0x0,0x30,0x3F,
00451     0xF,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00452     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00453     0xF0,0xFC,0xC,0x0,0x0,0x0,0x0,0x0}, // backslash
00454 
00455     {0x0,0x0,0x0,0x0,0x0,0x0,0x60,0x60,
00456     0x7F,0x7F,0x0,0x0,0x0,0x0,0x0,0x0,
00457     0x0,0x0,0x0,0x0,0x0,0x0,0x6,0x6,
00458     0xFE,0xFE,0x0,0x0,0x0,0x0,0x0,0x0}, // ]
00459 
00460     {0x0,0x0,0x0,0x0,0x1,0xF,0x3E,0x70,
00461     0x70,0x3E,0xF,0x1,0x0,0x0,0x0,0x0,
00462     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00463     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // ^
00464 
00465     {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00466     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00467     0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6,
00468     0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6}, // _
00469 
00470     {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20,
00471     0x30,0x10,0x0,0x0,0x0,0x0,0x0,0x0,
00472     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00473     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // `
00474 
00475     {0x0,0x0,0x0,0x0,0x6,0xE,0xC,0xD,
00476     0xD,0xF,0x7,0x0,0x0,0x0,0x0,0x0,
00477     0x0,0x0,0x0,0x0,0x70,0xF8,0xD8,0x98,
00478     0x98,0xF0,0xF8,0x8,0x0,0x0,0x0,0x0}, // a
00479 
00480     {0x0,0x0,0x0,0x0,0x7F,0x7F,0x6,0xC,
00481     0xC,0xE,0x7,0x3,0x0,0x0,0x0,0x0,
00482     0x0,0x0,0x0,0x0,0xF8,0xF8,0x30,0x18,
00483     0x18,0x38,0xF0,0xE0,0x0,0x0,0x0,0x0}, // b
00484 
00485     {0x0,0x0,0x0,0x0,0x3,0x7,0xE,0xC,
00486     0xC,0xE,0x6,0x0,0x0,0x0,0x0,0x0,
00487     0x0,0x0,0x0,0x0,0xE0,0xF0,0x38,0x18,
00488     0x18,0x38,0x30,0x0,0x0,0x0,0x0,0x0}, //c
00489 
00490     {0x0,0x0,0x0,0x0,0x3,0x7,0xE,0xC,
00491     0xC,0x6,0x7F,0x7F,0x0,0x0,0x0,0x0,
00492     0x0,0x0,0x0,0x0,0xE0,0xF0,0x38,0x18,
00493     0x18,0x30,0xF8,0xF8,0x0,0x0,0x0,0x0}, // d
00494 
00495     {0x0,0x0,0x0,0x0,0x3,0x7,0xD,0xD,
00496     0xD,0x7,0x3,0x0,0x0,0x0,0x0,0x0,
00497     0x0,0x0,0x0,0x0,0xE0,0xF0,0xB8,0x98,
00498     0x98,0xB0,0xA0,0x0,0x0,0x0,0x0,0x0},  // e
00499 
00500     {0x0,0x0,0x0,0x0,0xC,0x3F,0x7F,0x6C,
00501     0x6C,0x60,0x0,0x0,0x0,0x0,0x0,0x0,
00502     0x0,0x0,0x0,0x0,0x0,0xF8,0xF8,0x0,
00503     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0},   // f
00504 
00505     {0x0,0x0,0x0,0x7,0xF,0x1C,0x18,0x18,
00506     0xC,0x1F,0x1F,0x0,0x0,0x0,0x0,0x0,
00507     0x0,0x0,0x0,0xCC,0xEE,0x76,0x36,0x36,
00508     0x66,0xFE,0xFC,0x0,0x0,0x0,0x0,0x0}, // g
00509 
00510     {0x0,0x0,0x0,0x0,0x7F,0x7F,0x6,0xC,
00511     0xC,0xC,0xF,0x7,0x0,0x0,0x0,0x0,
00512     0x0,0x0,0x0,0x0,0xF8,0xF8,0x0,0x0,
00513     0x0,0x0,0xF8,0xF8,0x0,0x0,0x0,0x0}, //h
00514 
00515     {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x37,
00516     0x37,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00517     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xF8,
00518     0xF8,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // i
00519 
00520     {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x37,
00521     0x37,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00522     0x0,0x0,0x0,0x0,0x0,0x3,0x3,0xFF,
00523     0xFE,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // j
00524 
00525     {0x0,0x0,0x0,0x0,0x7F,0x7F,0x1,0x3,
00526     0x7,0xC,0x8,0x0,0x0,0x0,0x0,0x0,
00527     0x0,0x0,0x0,0x0,0xF8,0xF8,0xC0,0x80,
00528     0xE0,0xF8,0x18,0x0,0x0,0x0,0x0,0x0}, // k
00529 
00530     {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7F,
00531     0x7F,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00532     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xF8,
00533     0xF8,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // l
00534 
00535     {0x0,0x0,0xF,0xF,0x6,0xC,0xC,0xF,
00536     0x7,0x6,0xC,0xC,0xF,0x7,0x0,0x0,
00537     0x0,0x0,0xF8,0xF8,0x0,0x0,0x0,0xF8,
00538     0xF8,0x0,0x0,0x0,0xF8,0xF8,0x0,0x0},// m
00539 
00540     0x0,0x0,0x0,0x0,0xF,0xF,0x6,0xC,
00541     0xC,0xC,0xF,0x7,0x0,0x0,0x0,0x0,
00542     0x0,0x0,0x0,0x0,0xF8,0xF8,0x0,0x0,
00543     0x0,0x0,0xF8,0xF8,0x0,0x0,0x0,0x0, // n
00544 
00545     {0x0,0x0,0x0,0x0,0x3,0x7,0xE,0xC,
00546     0xC,0xE,0x7,0x3,0x0,0x0,0x0,0x0,
00547     0x0,0x0,0x0,0x0,0xE0,0xF0,0x38,0x18,
00548     0x18,0x38,0xF0,0xE0,0x0,0x0,0x0,0x0}, // o
00549 
00550     {0x0,0x0,0x0,0x0,0xF,0xF,0x6,0xC,
00551     0xC,0xE,0x7,0x3,0x0,0x0,0x0,0x0,
00552     0x0,0x0,0x0,0x0,0xFF,0xFF,0x30,0x18,
00553     0x18,0x38,0xF0,0xE0,0x0,0x0,0x0,0x0}, // p
00554 
00555     {0x0,0x0,0x0,0x0,0x3,0x7,0xE,0xC,
00556     0xC,0x6,0xF,0xF,0x0,0x0,0x0,0x0,
00557     0x0,0x0,0x0,0x0,0xE0,0xF0,0x38,0x18,
00558     0x18,0x30,0xFF,0xFF,0x0,0x0,0x0,0x0}, //q
00559 
00560     {0x0,0x0,0x0,0x0,0x0,0x0,0xF,0xF,
00561     0x6,0xC,0xC,0xC,0x0,0x0,0x0,0x0,
00562     0x0,0x0,0x0,0x0,0x0,0x0,0xF8,0xF8,
00563     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, //r
00564 
00565     {0x0,0x0,0x0,0x0,0x7,0xF,0xD,0xD,
00566     0xC,0xE,0x6,0x0,0x0,0x0,0x0,0x0,
00567     0x0,0x0,0x0,0x0,0x30,0xB8,0x98,0x98,
00568     0xD8,0xF8,0x70,0x0,0x0,0x0,0x0,0x0}, // s
00569 
00570     {0x0,0x0,0x0,0x0,0x0,0xC,0x3F,0x7F,
00571     0xC,0xC,0x0,0x0,0x0,0x0,0x0,0x0,
00572     0x0,0x0,0x0,0x0,0x0,0x0,0xF0,0xF8,
00573     0x18,0x18,0x0,0x0,0x0,0x0,0x0,0x0}, // t
00574 
00575     {0x0,0x0,0x0,0x0,0xF,0xF,0x0,0x0,
00576     0x0,0x0,0xF,0xF,0x0,0x0,0x0,0x0,
00577     0x0,0x0,0x0,0x0,0xF0,0xF8,0x18,0x18,
00578     0x18,0x30,0xF8,0xF8,0x0,0x0,0x0,0x0}, // u
00579 
00580     {0x0,0x0,0x0,0x0,0x0,0xE,0xF,0x1,
00581     0x0,0x1,0xF,0xE,0x0,0x0,0x0,0x0,
00582     0x0,0x0,0x0,0x0,0x0,0x0,0xC0,0xF8,
00583     0x38,0xF8,0xC0,0x0,0x0,0x0,0x0,0x0}, // v
00584 
00585     {0x0,0x0,0xC,0xF,0x3,0x0,0x1,0xF,
00586     0xE,0xF,0x1,0x0,0x3,0xF,0xC,0x0,
00587     0x0,0x0,0x0,0xC0,0xF8,0x38,0xF8,0xC0,
00588     0x0,0xC0,0xF8,0x38,0xF8,0xC0,0x0,0x0}, // w
00589 
00590     {0x0,0x0,0x0,0x0,0x0,0xC,0xE,0x7,
00591     0x1,0x7,0xE,0xC,0x0,0x0,0x0,0x0,
00592     0x0,0x0,0x0,0x0,0x0,0x18,0x38,0xF0,
00593     0xC0,0xF0,0x38,0x18,0x0,0x0,0x0,0x0}, // x
00594 
00595     {0x0,0x0,0x0,0x0,0xC,0xF,0x3,0x0,
00596     0x0,0x0,0x3,0xF,0xC,0x0,0x0,0x0,
00597     0x0,0x0,0x0,0x0,0x0,0x3,0xE3,0xFF,
00598     0x3E,0xF8,0xE0,0x0,0x0,0x0,0x0,0x0}, // y
00599 
00600     {0x0,0x0,0x0,0x0,0x0,0x0,0xC,0xC,
00601     0xC,0xD,0xF,0xF,0xC,0x0,0x0,0x0,
00602     0x0,0x0,0x0,0x0,0x0,0x0,0x18,0x78,
00603     0xF8,0xD8,0x98,0x18,0x18,0x0,0x0,0x0}, //z
00604 
00605     {0x0,0x0,0x0,0x0,0x3,0x3,0x7F,0xFC,
00606     0xC0,0xC0,0x0,0x0,0x0,0x0,0x0,0x0,
00607     0x0,0x0,0x0,0x0,0x0,0x0,0xFC,0xFE,
00608     0x6,0x6,0x0,0x0,0x0,0x0,0x0,0x0}, // {
00609 
00610     {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xFF,
00611     0xFF,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00612     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xFF,
00613     0xFF,0x0,0x0,0x0,0x0,0x0,0x0,0x0},  // |
00614 
00615     {0x0,0x0,0x0,0x0,0x0,0x0,0xC0,0xC0,
00616     0xFC,0x7F,0x3,0x3,0x0,0x0,0x0,0x0,
00617     0x0,0x0,0x0,0x0,0x0,0x0,0x6,0x6,
00618     0xFE,0xFC,0x0,0x0,0x0,0x0,0x0,0x0}, // }
00619 
00620     {0x0,0x0,0x0,0x0,0x18,0x30,0x30,0x30,
00621     0x38,0x18,0x18,0x18,0x30,0x0,0x0,0x0,
00622     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00623     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // ~
00624 };
00625 
00626 // Manually created 16*16 character bit map 
00627 static const uint8_t Manual_font_16x16[95][32] = {
00628     
00629     // Note: Number 0-9, char A-Z and char a-z  bit map data created manually, other 
00630     // font bit map data taken from Aerial_bold font
00631     
00632     {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00633     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00634     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00635     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // SPACE
00636 
00637     {0x0,0x0,0x0,0x0,0x0,0x0,0x3F,0x3F,
00638     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00639     0x0,0x0,0x0,0x0,0x0,0x0,0xEC,0xEC,
00640     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // !
00641 
00642     {0x0,0x0,0x0,0x0,0x0,0x3C,0x3C,0x0,
00643     0x0,0x3C,0x3C,0x0,0x0,0x0,0x0,0x0,
00644     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00645     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, //"
00646 
00647     {0x0,0x0,0x6,0x6,0x6,0xF,0x3F,0x36,
00648     0xF,0x3F,0x36,0x6,0x0,0x0,0x0,0x0,
00649     0x0,0x0,0x60,0x6C,0xFC,0xF0,0x6C,0xFC,
00650     0xF0,0x60,0x60,0x60,0x0,0x0,0x0,0x0},// #
00651 
00652     {0x0,0x0,0x0,0x0,0xE,0x1F,0x33,0x7F,
00653     0x31,0x18,0x8,0x0,0x0,0x0,0x0,0x0,
00654     0x0,0x0,0x0,0x0,0x30,0x38,0x8C,0xFE,
00655     0xCC,0xF8,0x70,0x0,0x0,0x0,0x0,0x0}, //$
00656 
00657     {0x0,0x1E,0x3F,0x21,0x21,0x3F,0x1E,0x0,
00658     0x3,0x7,0x1C,0x38,0x20,0x0,0x0,0x0,
00659     0x0,0x0,0x0,0x0,0x4,0xC,0x38,0xF0,
00660     0xC0,0x0,0x78,0xFC,0x84,0x84,0xFC,0x78},//%
00661 
00662     {0x0,0x0,0x0,0x0,0x1C,0x3F,0x33,0x33,
00663     0x33,0x3E,0x1C,0x0,0x0,0x0,0x0,0x0,
00664     0x0,0x0,0x0,0x70,0xF8,0x8C,0xC,0xCC,
00665     0xEC,0x78,0x38,0xF8,0x5C,0x8,0x0,0x0},//&
00666 
00667     {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3C,
00668     0x3C,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00669     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00670     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0},//'
00671 
00672     {0x0,0x0,0x0,0x0,0x0,0xF,0x3F,0x70,
00673     0x40,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00674     0x0,0x0,0x0,0x0,0x0,0xE0,0xF8,0x1C,
00675     0x4,0x0,0x0,0x0,0x0,0x0,0x0,0x0},//(
00676 
00677     {0x0,0x0,0x0,0x0,0x0,0x40,0x70,0x3F,
00678     0xF,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00679     0x0,0x0,0x0,0x0,0x0,0x4,0x1C,0xF8,
00680     0xE0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, //}  
00681 
00682     {0x0,0x0,0x3,0x3,0x1,0x1,0xF,0xF,
00683     0xF,0x1,0x1,0x3,0x3,0x0,0x0,0x0,
00684     0x0,0x0,0x0,0x10,0x30,0xF8,0xE0,0xC0,
00685     0xE0,0xF8,0x30,0x10,0x0,0x0,0x0,0x0},//*
00686 
00687     {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00688     0x7,0x7,0x0,0x0,0x0,0x0,0x0,0x0,
00689     0x0,0x0,0x0,0x0,0x0,0xC0,0xC0,0xC0,
00690     0xF8,0xF8,0xC0,0xC0,0xC0,0x0,0x0,0x0},//+
00691 
00692     {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00693     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00694     0x0,0x0,0x0,0x0,0x0,0x0,0x32,0x3C,
00695     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, //,
00696 
00697     {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00698     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00699     0x0,0x0,0x0,0x0,0x0,0x0,0xC0,0xC0,
00700     0xC0,0xC0,0xC0,0x0,0x0,0x0,0x0,0x0},// -
00701  
00702     {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00703     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00704     0x0,0x0,0x0,0x0,0x0,0x0,0x18,0x18,
00705     0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // .
00706 
00707     {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00708     0xF,0x3F,0x30,0x0,0x0,0x0,0x0,0x0,
00709     0x0,0x0,0x0,0x0,0x0,0x0,0xC,0xFC,
00710     0xF0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // /
00711     
00712     {0x00,0x00,0x3F,0x7F,0x7F,0x60,0x60,0x60, 
00713     0x61,0x63,0x66,0x7F,0x7F,0x3F,0x00,0x00, 
00714     0x00,0x00,0xFE,0xFF,0xFF,0x33,0x63,0xC3,
00715     0x83,0x03,0x03,0xFF,0xFF,0x0FE,0x00,0x00}, // 0
00716     
00717     {0x00,0x00,0x00,0x00,0x08,0x18,0x3F,0x7F, 
00718     0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,  
00719     0x00,0x00,0x00,0x00,0x00,0x03,0xFF,0xFF,
00720     0xFF,0xFF,0x03,0x00,0x00,0x00,0x00,0x00 }, //  1
00721     
00722     {0x00,0x00,0x30,0x70,0x60,0x60,0x60,0x60, 
00723     0x61,0x63,0x66,0x7C,0x38,0x30,0x00,0x00,  
00724     0x00,0x00,0x06,0x0E,0x1E,0x36,0x66,0xC6,
00725     0x86,0x06,0x06,0x06,0x06,0x06,0x00,0x00 }, // 2  
00726 
00727     {0x00,0x00,0x30,0x70,0x60,0x60,0x60,0x60, 
00728     0x61,0x63,0x66,0x7E,0x7C,0x38,0x00,0x00,  
00729     0x00,0x00,0x0C,0x0E,0x06,0x06,0x06,0x06,
00730     0x86,0xC6,0x66,0x7E,0x3E,0x1C,0x00,0x00 }, // 3
00731  
00732     {0x00,0x00,0x00,0x01,0x03,0x06,0xC,0x18, 
00733     0x30,0x7F,0xFF,0xFF,0x00,0x00,0x00,0x00,  
00734     0x00,0x00,0xE0,0xE0,0x60,0x60,0x60,0x60,
00735     0x60,0xFE,0xFE,0xFE,0x60,0x60,0x00,0x00 }, // 4    
00736     
00737     {0x00,0x00,0x7F,0x7F,0x7F,0x61,0x61,0x61, 
00738      0x61,0x61,0x61,0x61,0x61,0x60,0x00,0x00,  
00739      0x00,0x00,0x04,0x86,0x86,0x86,0x86,0x86,
00740      0x86,0x86,0x86,0xFE,0xFE,0xFC,0x00,0x00 }, // 5
00741    
00742     {0x00,0x00,0x3F,0x7F,0x7F,0x61,0x61,0x61, 
00743      0x61,0x61,0x61,0x61,0x61,0x20,0x00,0x00,  
00744      0x00,0x00,0xFC,0xFE,0xFE,0x86,0x86,0x86,
00745      0x86,0x86,0x86,0xFE,0xFE,0xFC,0x00,0x00 }, // 6
00746    
00747     {0x00,0x00,0x00,0x30,0x30,0x30,0x30,0x30, 
00748      0x30,0x30,0x31,0x3F,0x3E,0x00,0x00,0x00,  
00749      0x00,0x00,0x00,0x00,0x06,0x0C,0x18,0x30,
00750      0x60,0xC0,0x80,0x00,0x00,0x00,0x00,0x00 }, // 7
00751  
00752     {0x00,0x00,0x3F,0x7F,0x7F,0x60,0x60,0x60, 
00753      0x60,0x60,0x60,0x7F,0x7F,0x3F,0x00,0x00, 
00754      0x00,0x00,0x3E,0xFF,0xFF,0xC3,0xC3,0xC3,
00755      0xC3,0xC3,0xC3,0xFF,0xFF,0x03E,0x00,0x00}, // 8
00756 
00757     {0x00,0x00,0x3F,0x7F,0x7F,0x60,0x60,0x60, 
00758      0x60,0x60,0x60,0x7F,0x7F,0x3F,0x00,0x00, 
00759      0x00,0x00,0x86,0xC7,0xC3,0xC3,0xC3,0xC3,
00760      0xC3,0xC3,0xC3,0xFF,0xFF,0x0FE,0x00,0x00}, // 9 
00761       
00762     {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x18,
00763      0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00764      0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30,
00765      0x30,0x0,0x0,0x0,0x0,0x0,0x0,0x0},  // :
00766 
00767     {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x18,
00768      0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00769      0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x32,
00770      0x3C,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // ;
00771 
00772     {0x0,0x0,0x0,0x0,0x1,0x1,0x3,0x3,
00773      0x6,0x6,0xC,0x0,0x0,0x0,0x0,0x0,
00774      0x0,0x0,0x0,0x80,0xC0,0xC0,0x60,0x60,
00775      0x30,0x30,0x18,0x0,0x0,0x0,0x0,0x0}, // <
00776 
00777     {0x0,0x0,0x0,0xC,0xC,0xC,0xC,0xC,
00778      0xC,0xC,0xC,0xC,0x0,0x0,0x0,0x0,
00779      0x0,0x0,0x0,0xC0,0xC0,0xC0,0xC0,0xC0,
00780      0xC0,0xC0,0xC0,0xC0,0x0,0x0,0x0,0x0}, // =
00781 
00782     {0x0,0x0,0x0,0x0,0xC,0x6,0x6,0x3,
00783      0x3,0x1,0x1,0x0,0x0,0x0,0x0,0x0,
00784      0x0,0x0,0x0,0x0,0x18,0x30,0x30,0x60,
00785      0x60,0xC0,0xC0,0x80,0x0,0x0,0x0,0x0}, // >
00786 
00787     {0x0,0x0,0x0,0x0,0xC,0x1C,0x38,0x30,
00788      0x31,0x33,0x1F,0xE,0x0,0x0,0x0,0x0,
00789      0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xEC,
00790      0xEC,0x80,0x0,0x0,0x0,0x0,0x0,0x0}, // ?
00791 
00792     {0x0,0x0,0x7,0x18,0x27,0x6F,0x58,0x58,
00793      0x4F,0x5F,0x38,0x30,0x1F,0x0,0x0,0x0,
00794      0x0,0x0,0xC0,0x20,0x90,0xC8,0xC8,0x88,
00795      0xC8,0xC8,0x48,0x90,0x20,0x0,0x0,0x0}, //@
00796                                                    
00797     {0x00,0x00,0x3F,0x7F,0x7F,0x60,0x60,0x60, 
00798      0x60,0x60,0x60,0x7F,0x7F,0x3F,0x00,0x00, 
00799      0x00,0x00,0xFF,0xFF,0xFF,0x60,0x60,0x60,  
00800      0x60,0x60,0x60,0xFF,0xFF,0xFF,0x00,0x00 }, // A 
00801   
00802     {0x00,0x00,0x7F,0x7F,0x7F,0x60,0x60,0x60, 
00803      0x60,0x60,0x60,0x7F,0x07F,0x3E,0x00,0x00, 
00804      0x00,0x00,0xFF,0xFF,0xFF,0xC3,0xC3,0xC3,
00805      0xC3,0xC3,0xC3,0xFF,0xFF,0x3E,0x00,0x00}, // B    
00806  
00807     {0x00,0x00,0x3F,0x7F,0x7F,0x60,0x60,0x60, 
00808      0x60,0x60,0x60,0x70,0x30,0x00,0x00,0x00, 
00809      0x00,0x00,0xFE,0xFF,0xFF,0x03,0x03,0x03,
00810      0x03,0x03,0x03,0x07,0x06,0x00,0x00,0x00}, // C
00811 
00812     {0x00,0x00,0x7F,0x7F,0x7F,0x60,0x60,0x60, 
00813      0x60,0x60,0x60,0x70,0x3F,0x1F,0x00,0x00, 
00814      0x00,0x00,0xFF,0xFF,0xFF,0x03,0x03,0x03,
00815      0x03,0x03,0x03,0x07,0xFE,0x0FC,0x00,0x00}, // D
00816 
00817     {0x00,0x00,0x07F,0x7F,0x7F,0x60,0x60,0x60, 
00818      0x60,0x60,0x60,0x60,0x60,0x060,0x00,0x00, 
00819      0x00,0x00,0xFF,0xFF,0xFF,0xC3,0xC3,0xC3,
00820      0xC3,0xC3,0xC3,0xC3,0x03,0x03,0x00,0x00}, // E
00821        
00822     {0x00,0x00,0x7F,0x7F,0x7F,0x60,0x60,0x60,  
00823      0x60,0x60,0x60,0x60,0x60,0x060,0x00,0x00, 
00824      0x00,0x00,0xFF,0xFF,0xFF,0xC0,0xC0,0xC0,
00825      0xC0,0xC0,0xC0,0xC0,0x00,0x00,0x00,0x00}, // F 
00826 
00827     {0x00,0x00,0x3F,0x7F,0x7F,0x60,0x60,0x60,  
00828      0x60,0x60,0x60,0x78,0x38,0x18,0x00,0x00, 
00829      0x00,0x00,0xFE,0xFF,0xFF,0x03,0x03,0x03,
00830      0x03,0x23,0x33,0x3F,0x3F,0x3F,0x00,0x00}, // G
00831    
00832     {0x00,0x00,0x7F,0x7F,0x7F,0x00,0x00,0x00,  
00833      0x00,0x00,0x00,0x7F,0x7F,0x7F,0x00,0x00, 
00834      0x00,0x00,0xFF,0xFF,0xFF,0xC0,0xC0,0xC0,
00835      0xC0,0xC0,0xC0,0xFF,0xFF,0xFF,0x00,0x00 }, // H
00836 
00837     {0x00,0x00,0x00,0x00,0x60,0x60,0x7F,0x7F, 
00838      0x7F,0x7F,0x60,0x60,0x00,0x00,0x00,0x00,  
00839      0x00,0x00,0x00,0x00,0x03,0x03,0xFF,0xFF,
00840      0xFF,0xFF,0x03,0x03,0x00,0x00,0x00,0x00 }, // I
00841 
00842     {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 
00843      0x00,0x00,0x00,0x7F,0x7F,0x7F,0x00,0x00, 
00844      0x00,0x00,0x00,0x01E,0x1F,0x1F,0x03,0x03,
00845      0x03,0x03,0x03,0xFF,0xFF,0xFE,0x00,0x00 }, // J
00846 
00847     {0x00,0x00,0x7F,0x7F,0x7F,0x03,0x03,0x06,  
00848      0x0C,0x18,0x30,0x60,0x60,0x00,0x00,0x00,  
00849      0x00,0x00,0xFE,0xFE,0xFE,0xC0,0xC0,0x60,
00850      0x30,0x18,0x0C,0x06,0x06,0x00,0x00,0x00 }, // K
00851 
00852     {0x00,0x00,0x7F,0x7F,0x7F,0x00,0x00,0x00, 
00853      0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  
00854      0x00,0x00,0xFF,0xFF,0xFF,0x03,0x03,0x03,
00855      0x03,0x03,0x03,0x03,0x03,0x00,0x00,0x00 }, // L
00856 
00857     {0x00,0x00,0x7F,0x7F,0x7F,0x1C,0x0E,0x07, 
00858      0x07,0x0E,0x1C,0x7F,0x7F,0x7F,0x00,0x00, 
00859      0x00,0x00,0xFC,0xFC,0xFC,0x00,0x00,0x80,
00860      0x80,0x00,0x00,0xFC,0xFC,0xFC,0x00,0x00 }, // M
00861    
00862     {0x00,0x00,0x7F,0x7F,0x7F,0x38,0x1C,0x07, 
00863      0x03,0x00,0x00,0x7F,0x7F,0x7F,0x00,0x00, 
00864      0x00,0x00,0xFC,0xFC,0xFC,0x00,0x00,0x00,
00865      0x80,0xE0,0x70,0xFC,0xFC,0xFC,0x00,0x00 }, // N
00866 
00867     {0x00,0x00,0x3F,0x7F,0x7F,0x60,0x60,0x60, 
00868      0x60,0x60,0x60,0x7F,0x7F,0x3F,0x00,0x00, 
00869      0x00,0x00,0xFE,0xFF,0xFF,0x03,0x03,0x03,
00870      0x03,0x03,0x03,0xFF,0xFF,0x0FE,0x00,0x00}, // O
00871    
00872     {0x00,0x00,0x07F,0x7F,0x7F,0x60,0x60,0x60, 
00873      0x60,0x60,0x60,0x7F,0x7F,0x03F,0x00,0x00,  
00874      0x00,0x00,0xFF,0xFF,0xFF,0xC0,0xC0,0xC0,
00875      0xC0,0xC0,0xC0,0xC0,0xC0,0x80,0x00,0x00}, // P
00876   
00877     {0x00,0x00,0x3F,0x7F,0x60,0x60,0x60,0x60, 
00878      0x60,0x60,0x60,0x60,0x7F,0x3F,0x00,0x00, 
00879      0x00,0x00,0xF8,0xFC,0x0C,0x0C,0x0C,0x0C,
00880      0x0C,0x0C,0x3C,0x3C,0xFE,0xFF,0x03,0x00}, // Q
00881 
00882     {0x00,0x00,0x07F,0x7F,0x7F,0x61,0x61,0x61, 
00883      0x61,0x61,0x61,0x7F,0x7F,0x03F,0x00,0x00, 
00884      0x00,0x00,0xFF,0xFF,0xFF,0xC0,0xE0,0xF0,
00885      0xB8,0x9C,0x8E,0x87,0x83,0x03,0x00,0x00}, // R
00886  
00887     {0x00,0x00,0x1E,0x3F,0x73,0x61,0x61,0x61, 
00888      0x61,0x61,0x61,0x70,0x30,0x00,0x00,0x00, 
00889      0x00,0x00,0x0C,0x0C,0x86,0x86,0x86,0x86,
00890      0x86,0x86,0xC6,0xFC,0x78,0x00,0x00,0x00}, // S  
00891     
00892     {0x00,0x00,0x10,0x30,0x30,0x30,0x30,0x3F, 
00893      0x3F,0x30,0x30,0x30,0x30,0x10,0x00,0x00, 
00894      0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,
00895      0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, // T
00896   
00897     {0x00,0x00,0x7F,0x7F,0x7F,0x00,0x00,0x00, 
00898      0x00,0x00,0x00,0x7F,0x7F,0x7F,0x00,0x00,  
00899      0x00,0x00,0xFC,0xFE,0xFE,0x06,0x06,0x06,
00900      0x06,0x06,0x06,0xFE,0xFE,0xFC,0x00,0x00 }, // U
00901   
00902     {0x60,0x70,0x1C,0x0F,0x03,0x00,0x00,  
00903      0x00,0x00,0x00,0x00,0x03,0x0F,0x1C,0x70,0x60,  
00904      0x00,0x00,0x00,0x00,0xC0,0xF0,0x3C,0x06,
00905      0x06,0x3C,0xF0,0xC0,0x00,0x00,0x00,0x00 }, // V  
00906   
00907     {0x00,0x00,0x7F,0x7F,0x7F,0x00,0x00,0x00, 
00908      0x00,0x00,0x00,0x7F,0x7F,0x7F,0x00,0x00,  
00909      0x00,0x00,0xFC,0xFE,0xFE,0x1C,0x38,0x70,
00910      0x70,0x38,0x1C,0xFE,0xFE,0xFC,0x00,0x00 }, // W
00911    
00912     {0x00,0x00,0x60,0x70,0x78,0x0E,0x07,0x03, 
00913      0x03,0x07,0x0E,0x78,0x70,0x60,0x00,0x00,  
00914      0x00,0x00,0x06,0x0E,0x1E,0x70,0xE0,0xC0,
00915      0xC0,0xE0,0x70,0x1E,0x0E,0x06,0x00,0x00 }, // X
00916     
00917     {0x00,0x00,0x20,0x30,0x18,0x0C,0x06,0x03, 
00918      0x03,0x06,0x0C,0x18,0x30,0x20,0x00,0x00,  
00919      0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,
00920      0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, // Y 
00921 
00922     {0x00,0x00,0x70,0x70,0x60,0x60,0x60,0x61, 
00923      0x63,0x67,0x6E,0x78,0x70,0x60,0x00,0x00,  
00924      0x00,0x00,0x06,0x0E,0x3E,0x76,0xE6,0xC6,
00925      0x86,0x06,0x06,0x06,0x0E,0x0E,0x00,0x00 }, // Z 
00926     
00927     {0x0,0x0,0x0,0x0,0x0,0x0,0x7F,0x7F,
00928      0x60,0x60,0x0,0x0,0x0,0x0,0x0,0x0,
00929      0x0,0x0,0x0,0x0,0x0,0x0,0xFE,0xFE,
00930      0x6,0x6,0x0,0x0,0x0,0x0,0x0,0x0},  // [
00931 
00932     {0x0,0x0,0x0,0x0,0x0,0x0,0x30,0x3F,
00933      0xF,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00934      0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00935      0xF0,0xFC,0xC,0x0,0x0,0x0,0x0,0x0}, // backslash
00936 
00937     {0x0,0x0,0x0,0x0,0x0,0x0,0x60,0x60,
00938      0x7F,0x7F,0x0,0x0,0x0,0x0,0x0,0x0,
00939      0x0,0x0,0x0,0x0,0x0,0x0,0x6,0x6,
00940      0xFE,0xFE,0x0,0x0,0x0,0x0,0x0,0x0}, // ]
00941 
00942     {0x0,0x0,0x0,0x0,0x1,0xF,0x3E,0x70,
00943      0x70,0x3E,0xF,0x1,0x0,0x0,0x0,0x0,
00944      0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00945      0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // ^
00946 
00947     {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00948      0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00949      0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6,
00950      0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6}, // _
00951 
00952     {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20,
00953      0x30,0x10,0x0,0x0,0x0,0x0,0x0,0x0,
00954      0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00955      0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // `
00956 
00957     {0x0,0x0,0x0,0x04,0x09,0x19,0x19,0x19,
00958      0x0F,0x07,0x0,0x0,0x0,0x0,0x0,0x0,
00959      0x0,0x0,0x0,0xE0,0xB0,0x30,0x30,0x20,
00960      0xF0,0xF0,0x10,0x0,0x0,0x0,0x0,0x0}, // a
00961 
00962     {0x0,0x0,0xFF,0xFF,0xFC,0x8,0x18,0x18,
00963      0x1C,0xF,0x3,0x0,0x0,0x0,0x0,0x0,
00964      0x0,0x0,0xF0,0xF0,0x60,0x30,0x30,0x30,
00965      0x60,0xE0,0x80,0x0,0x0,0x0,0x0,0x0}, // b
00966 
00967     {0x0,0x0,0x07,0x0F,0x0C,0x18,0x18,0x18,
00968      0xC,0x4,0x0,0x0,0x0,0x0,0x0,0x0,
00969      0x0,0x0,0xC0,0xE0,0x60,0x30,0x30,0x30,
00970      0x60,0x40,0x0,0x0,0x0,0x0,0x0,0x0}, // c
00971 
00972     {0x0,0x0,0x03,0x07,0x0C,0x18,0x18,0x18,
00973      0xFF,0xFF,0x0,0x0,0x0,0x0,0x0,0x0,
00974      0x0,0x0,0xC0,0xE0,0x60,0x30,0x30,0x30,
00975      0xF8,0xF8,0x0,0x0,0x0,0x0,0x0,0x0}, // d
00976 
00977     {0x0,0x0,0x03,0x0F,0x0D,0x19,0x19,0x19,
00978      0x19,0x0F,0x06,0x0,0x0,0x0,0x0,0x0,
00979      0x0,0x0,0xC0,0xE0,0x30,0x30,0x10,0x30,
00980      0x30,0x60,0x40,0x0,0x0,0x0,0x0,0x0}, // e
00981 
00982     {0x0,0x0,0x0,0x0,0x00,0x03,0x03,0x3F,
00983      0x7F,0x43,0x03,0x0,0x0,0x0,0x0,0x0,
00984      0x0,0x0,0x0,0x0,0x0,0x0,0x00,0xFE,
00985      0xFE,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // f
00986 
00987     {0x0,0x0,0x01,0x07,0x0E,0x08,0x08,0x0C,
00988      0x0F,0x1F,0x00,0x0,0x0,0x0,0x0,0x0,
00989      0x0,0x0,0x84,0xE2,0x62,0x23,0x23,0x63,
00990      0xFE,0xFC,0x0,0x0,0x0,0x0,0x0,0x0}, // g
00991 
00992     {0x0,0x0,0x00,0x3F,0x3F,0x03,0x02,0x03,
00993      0x03,0x01,0x0,0x0,0x0,0x0,0x0,0x0,
00994      0x0,0x0,0x0,0xFC,0xFC,0x0,0x0,0x0,
00995      0xFC,0xFC,0x0,0x0,0x0,0x0,0x0,0x0}, // h
00996 
00997     {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x06F,
00998      0x6F,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
00999      0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xF0,
01000      0xF0,0x00,0x0,0x0,0x0,0x0,0x0,0x0}, // i
01001 
01002     {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xDF,
01003      0xDF,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
01004      0x0,0x0,0x0,0x0,0x0,0x08,0x0C,0xFC,
01005      0xF8,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // j
01006 
01007     {0x0,0x0,0xFF,0xFF,0x03,0x03,0x07,0x0C,
01008      0x18,0x30,0x0,0x0,0x0,0x0,0x0,0x0,
01009      0x0,0x0,0xF0,0xF0,0x80,0x0,0x80,0xE0,
01010      0x30,0x10,0x0,0x0,0x0,0x0,0x0,0x0}, // k
01011 
01012     {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3F,
01013      0x3F,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
01014      0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xFC,
01015      0xFC,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // l
01016 
01017     {0x0,0x0,0x08,0x1F,0x1F,0x18,0x18,0x18,
01018      0x1F,0x1F,0x18,0x18,0x18,0x1F,0x0F,0x0,
01019      0x0,0x0,0x0,0xF0,0xF0,0x0,0x0,0x0,
01020      0xF0,0xF0,0x0,0x0,0x0,0xF0,0xF0,0x0}, // m
01021 
01022     {0x0,0x0,0x1F,0x0F,0x0C,0x18,0x18,0x1C,
01023      0x0F,0x07,0x0,0x0,0x0,0x0,0x0,0x0,
01024      0x0,0x0,0xF0,0xF0,0x0,0x0,0x0,0x0,
01025      0xF0,0xF0,0x0,0x0,0x0,0x0,0x0,0x0}, // n
01026 
01027     {0x0,0x0,0x03,0x07,0x0C,0x18,0x18,0x18,
01028      0x0C,0x07,0x03,0x0,0x0,0x0,0x0,0x0,
01029      0x0,0x0,0x80,0xC0,0x60,0x30,0x30,0x30,
01030      0x60,0xC0,0x80,0x0,0x0,0x0,0x0,0x0}, // o
01031 
01032     {0x0,0x0,0x0,0x1F,0x1F,0x0C,0x08,0x08,
01033      0x0C,0x07,0x03,0x0,0x0,0x0,0x0,0x0,
01034      0x0,0x0,0x0,0xFE,0xFE,0x30,0x10,0x10,
01035      0x30,0xE0,0xC0,0x0,0x0,0x0,0x0,0x0}, // p
01036 
01037     {0x0,0x0,0x01,0x07,0x0C,0x08,0x08,0x0C,
01038      0x1F,0x1F,0x0,0x0,0x0,0x0,0x0,0x0,
01039      0x0,0x0,0x80,0xE0,0x30,0x10,0x10,0x30,
01040      0xFE,0xFE,0x0,0x0,0x0,0x0,0x0,0x0}, // q
01041 
01042     {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1F,
01043      0x1F,0x0C,0x08,0x0C,0x0,0x0,0x0,0x0,
01044      0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xF0,
01045      0xF0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // r
01046 
01047     {0x0,0x0,0x0,0x07,0x0F,0x19,0x19,0x0D,
01048      0x04,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
01049      0x0,0x0,0x0,0x60,0x30,0x18,0x98,0xB0,
01050      0xE0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // s
01051 
01052     {0x0,0x0,0x0,0x0,0x0,0x0,0x03,0x3F,
01053      0x3F,0x03,0x0,0x0,0x0,0x0,0x0,0x0,
01054      0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xF8,
01055      0xFC,0x0C,0x08,0x0,0x0,0x0,0x0,0x0}, // t
01056 
01057     {0x0,0x0,0x1F,0x1F,0x0,0x0,0x0,0x0,
01058      0x1F,0x1F,0x0,0x0,0x0,0x0,0x0,0x0,
01059      0x0,0x0,0xC0,0xE0,0x70,0x30,0x30,0x60,
01060      0xF0,0xF0,0x0,0x0,0x0,0x0,0x0,0x0}, // u
01061 
01062     {0x0,0x0,0x0C,0x0F,0x01,0x0,0x0,0x01,
01063      0x0F,0x0C,0x0,0x0,0x0,0x0,0x0,0x0,
01064      0x0,0x0,0x0,0x80,0xE0,0x30,0x30,0xE0,
01065      0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // v
01066 
01067     {0x0,0x0,0x18,0x1F,0x0,0x0,0x07,0x0E,
01068     0x07,0x0,0x0,0x1F,0x18,0x0,0x0,0x0,
01069     0x0,0x0,0x0,0xC0,0x60,0x60,0xC0,0x0,
01070     0xC0,0x60,0x60,0xC0,0x0,0x0,0x0,0x0}, // w
01071 
01072     {0x0,0x0,0x0,0x0,0x08,0x0C,0x06,0x03,
01073      0x03,0x06,0x0C,0x08,0x0,0x0,0x0,0x0,
01074      0x0,0x0,0x0,0x0,0x10,0x30,0x60,0xC0,
01075      0xC0,0x60,0x30,0x10,0x0,0x0,0x0,0x0}, // x
01076 
01077     {0x0,0x0,0x08,0x0C,0x06,0x03,0x01,0x01,
01078      0x03,0x06,0x0C,0x08,0x0,0x0,0x0,0x0,
01079      0x0,0x0,0x0C,0x18,0x30,0x60,0xC0,0x80,
01080      0x00,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // y
01081 
01082     {0x0,0x0,0x08,0x08,0x08,0x09,0x0B,0x0E,
01083      0x0C,0x08,0x0,0x0,0x0,0x0,0x0,0x0,
01084      0x0,0x0,0x30,0x070,0xD0,0x90,0x10,0x10,
01085      0x10,0x10,0x0,0x0,0x0,0x0,0x0,0x0}, // z
01086 
01087     {0x0,0x0,0x0,0x0,0x3,0x3,0x7F,0xFC,
01088      0xC0,0xC0,0x0,0x0,0x0,0x0,0x0,0x0,
01089      0x0,0x0,0x0,0x0,0x0,0x0,0xFC,0xFE,
01090      0x6,0x6,0x0,0x0,0x0,0x0,0x0,0x0}, // {
01091 
01092     {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xFF,
01093      0xFF,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
01094      0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xFF,
01095      0xFF,0x0,0x0,0x0,0x0,0x0,0x0,0x0},  // |
01096 
01097     {0x0,0x0,0x0,0x0,0x0,0x0,0xC0,0xC0,
01098      0xFC,0x7F,0x3,0x3,0x0,0x0,0x0,0x0,
01099      0x0,0x0,0x0,0x0,0x0,0x0,0x6,0x6,
01100      0xFE,0xFC,0x0,0x0,0x0,0x0,0x0,0x0}, // }
01101 
01102     {0x0,0x0,0x0,0x0,0x18,0x30,0x30,0x30,
01103      0x38,0x18,0x18,0x18,0x30,0x0,0x0,0x0,
01104      0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
01105      0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}, // ~
01106     };
01107 
01108 
01109 
01110 static uint8_t display_buff[1024];
01111 static uint8_t display_buff_16x16[32];
01112 static uint16_t buff_end =0;
01113 static uint8_t disp_buff1[512];
01114 static uint8_t disp_buff2[512];
01115 static uint8_t temp_buff1[512];
01116 static uint8_t temp_buff2[512];
01117 static uint8_t temp_buff[256];
01118 
01119 static const uint8_t DISPLAY_BUFF_START = 0;
01120 static const uint8_t DISPLAY_BUFF_END = 31;
01121 static const uint32_t MAX_STRING_LENGTH = 32;
01122 static char str[MAX_STRING_LENGTH];
01123 
01124 
01125 //*********************************************************************
01126 void print_char(Max7219 *p_display, uint8_t position99, char c)
01127 {
01128     uint8_t idx;
01129     uint8_t char_buff[6];
01130     uint8_t device;
01131     uint8_t wrap_device;
01132     uint8_t wrap_idx;
01133     uint8_t buff_start = position99;
01134     
01135     memcpy(char_buff, &(font_5x7[c - 0x20][0]), 6);
01136 
01137     if(position99 < 33)
01138     {
01139         //get device and device_position
01140         if(position99 > 8)
01141         {
01142             if(position99%8)
01143             {
01144                 device = ((position99/8) + 1);
01145                 position99 = position99%8;
01146             }
01147             else
01148             {
01149                 device = position99/8;
01150                 position99 = 8;
01151             }
01152         }
01153         else
01154         {
01155             device = 1;
01156         }
01157         //check for dispaly wrap around 
01158         //(moving to next 8x8 grid cause character doesn't fit on current one)
01159         if(position99 > 3)
01160         {
01161             wrap_idx = (9 - position99);
01162             if(device < 4)
01163             {
01164                 wrap_device = (device + 1);
01165             }
01166             else
01167             {
01168                 wrap_device = 1;
01169             }
01170         }
01171         else
01172         {
01173             wrap_idx = 6; //make bigger than idx, not used
01174             wrap_device = 0; //not used
01175         }
01176         //print character to position
01177         for(idx = 0; idx < 6; idx++)
01178         {
01179             //check for wrap
01180             if((idx >= wrap_idx)  && (device != 4))
01181             {
01182                 p_display->write_digit(wrap_device, ((idx - wrap_idx) + 1), char_buff[idx]);
01183             }
01184             else
01185             {
01186                 p_display->write_digit(device, (position99 + idx), char_buff[idx]);
01187             }
01188             buff_end = ((buff_start - 1) + idx);
01189             display_buff[buff_end] = char_buff[idx];
01190         }
01191     }
01192     else
01193     {
01194         for(idx = 0; idx < 6; idx++)
01195         {
01196             buff_end = ((buff_start - 1) + idx);
01197             display_buff[buff_end] = char_buff[idx];
01198         }
01199     }
01200 }
01201 
01202 //*********************************************************************
01203 void print_string(Max7219 *p_display, uint8_t position, const char *s)
01204 {
01205     uint8_t idx = 0;
01206     
01207     while(s[idx] != '\0')
01208     {
01209         print_char(p_display, (position + (idx*6)), s[idx]);
01210         idx++;
01211     } 
01212 }
01213 
01214 //*********************************************************************
01215 void shift_display_right(Max7219 *p_display, uint8_t count, uint8_t ms_delay)
01216 {
01217     uint16_t idx, idy;
01218     uint8_t position99;
01219     
01220     for(idx = 0; idx < count; idx++)
01221     {
01222         for(idy = 0; idy < (buff_end + 1); idy++)
01223         {
01224             if(idy == buff_end)
01225             {
01226                 temp_buff[0] = display_buff[idy];
01227             }
01228             else
01229             {
01230                 temp_buff[idy + 1] = display_buff[idy];
01231             }
01232         }
01233         for(idy = 0; idy < (buff_end + 1); idy++)
01234         {
01235             //save shifted display in buffer
01236             display_buff[idy] = temp_buff[idy];
01237             if(idy <= DISPLAY_BUFF_END)
01238             {
01239                 position99 = ((idy - DISPLAY_BUFF_START) + 1);
01240                 if(position99 > 24)
01241                 {
01242                     if(position99 % 8)
01243                     {
01244                         position99 = position99  % 8;
01245                     }
01246                     else
01247                     {
01248                          position99 = 8;
01249                     }
01250                     p_display->write_digit(4, position99, display_buff[idy]);
01251                 }
01252                 else if(position99 > 16)
01253                 {
01254                     if(position99 % 8)
01255                     {
01256                         position99 = position99  % 8;
01257                     }
01258                     else
01259                     {
01260                          position99 = 8;
01261                     }
01262                     p_display->write_digit(3, position99, display_buff[idy]);
01263                 }
01264                 else if(position99 > 8)
01265                 {
01266                     if(position99 % 8)
01267                     {
01268                         position99 = position99  % 8;
01269                     }
01270                     else
01271                     {
01272                         position99 = 8;
01273                     }
01274                     p_display->write_digit(2, position99, display_buff[idy]);
01275                 }
01276                 else
01277                 {
01278                     p_display->write_digit(1, position99, display_buff[idy]);
01279                 }
01280             }
01281         }
01282         wait_ms(ms_delay);
01283     }
01284 }
01285 
01286 //*********************************************************************
01287 void shift_display_left(Max7219 *p_display, uint8_t count, uint8_t ms_delay)
01288 {
01289     uint16_t idx, idy;
01290     uint8_t position99;
01291     
01292     for(idx = 0; idx < count; idx++)
01293     {
01294         for(idy = 0; idy < (buff_end + 1); idy++)
01295         {
01296             if(idy == 0)
01297             {
01298                 temp_buff[buff_end] = display_buff[idy];
01299             }
01300             else
01301             {
01302                 temp_buff[idy - 1] = display_buff[idy];
01303             }
01304         }
01305         for(idy = 0; idy < (buff_end + 1); idy++)
01306         {
01307             //save shifted display in buffer
01308             display_buff[idy] = temp_buff[idy];
01309             if(idy <= DISPLAY_BUFF_END)
01310             {
01311                 position99 = ((idy - DISPLAY_BUFF_START) + 1);
01312                 if(position99 > 24)
01313                 {
01314                     if(position99 % 8)
01315                     {
01316                         position99 = position99  % 8;
01317                     }
01318                     else
01319                     {
01320                          position99 = 8;
01321                     }
01322                     p_display->write_digit(4, position99, display_buff[idy]);
01323                 }
01324                 else if(position99 > 16)
01325                 {
01326                     if(position99 % 8)
01327                     {
01328                         position99 = position99  % 8;
01329                     }
01330                     else
01331                     {
01332                          position99 = 8;
01333                     }
01334                     p_display->write_digit(3, position99, display_buff[idy]);
01335                 }
01336                 else if(position99 > 8)
01337                 {
01338                     if(position99 % 8)
01339                     {
01340                         position99 = position99  % 8;
01341                     }
01342                     else
01343                     {
01344                         position99 = 8;
01345                     }
01346                     p_display->write_digit(2, position99, display_buff[idy]);
01347                 }
01348                 else
01349                 {
01350                     p_display->write_digit(1, position99, display_buff[idy]);
01351                 }
01352             }
01353         }
01354         wait_ms(ms_delay);
01355     }
01356 }
01357 
01358 
01359 //*********************************************************************
01360 void quad_all_on(Max7219 *p_display, uint8_t quad)
01361 {
01362     if(quad > 1)
01363     {
01364         for(uint8_t idx = 0; idx < 8; idx++)
01365         {
01366             display_buff[((quad - 1)*8) + DISPLAY_BUFF_START + idx] = 0xFF;
01367         }
01368     }
01369     else
01370     {
01371         for(uint8_t idx = 0; idx < 8; idx++)
01372         {
01373             display_buff[idx + DISPLAY_BUFF_START] = 0xFF;
01374         }
01375     }
01376     if(buff_end < (quad * 8))
01377     {
01378         buff_end = (quad * 8);
01379     }
01380     p_display->device_all_on(quad);
01381 }
01382 
01383 //*********************************************************************
01384 void quad_all_off(Max7219 *p_display, uint8_t quad)
01385 {
01386     if(quad > 1)
01387     {
01388         for(uint8_t idx = 0; idx < 8; idx++)
01389         {
01390             display_buff[((quad - 1)*8) + DISPLAY_BUFF_START + idx] = 0;
01391         }
01392     }
01393     else
01394     {
01395         for(uint8_t idx = 0; idx < 8; idx++)
01396         {
01397             display_buff[idx + DISPLAY_BUFF_START] = 0;
01398         }
01399     }
01400 
01401     //is buff_end in the quad?
01402     if((((quad - 1) * 8) < buff_end) && ((quad * 8) > buff_end))
01403     {
01404         buff_end = ((quad - 1) * 8);
01405     }
01406     //leave it alone otherwise
01407     p_display->device_all_off(quad);
01408 }
01409 
01410 //*********************************************************************
01411 void all_on(Max7219 *p_display)
01412 {
01413     for(uint16_t idx = 0; idx < 32; idx++)
01414     {
01415         display_buff[idx] = 0xFF;
01416     }
01417     if(buff_end < 32)
01418     {
01419         buff_end = 32;
01420     }
01421     p_display->display_all_on();
01422 }
01423 
01424 //*********************************************************************
01425 void all_off(Max7219 *p_display)
01426 {
01427     for(uint16_t idx = 0; idx < 32; idx++)
01428     {
01429         display_buff[idx] = 0;
01430     }
01431     if(buff_end < 32)
01432     {
01433         buff_end = 0;
01434     }
01435     p_display->display_all_off();
01436 }
01437 
01438 //*********************************************************************
01439 void demo(Max7219 *display, max7219_configuration_t display_config, bool endless_loop)
01440 {
01441     uint8_t position = 1;
01442     uint8_t idx = 0;
01443     do
01444     {
01445         all_off(display);
01446         if(position > 25)
01447         {
01448             position = 1;
01449         }
01450         printf("\nPosition = %d\n", position);
01451         for(idx = 0x20; idx < 0x7F; idx++)
01452         {
01453             print_char(display, position, (char) idx);
01454             wait(0.25);
01455         }
01456         position = (position + 8);
01457         all_on(display);
01458         for(idx = 0; idx < 16; idx++)
01459         {
01460             display_config.intensity = 15 - idx;
01461             display->init_display(display_config);
01462             wait_ms(50);
01463         } 
01464         for(idx = 0; idx < 16; idx++)
01465         {
01466             display_config.intensity = idx;
01467             display->init_display(display_config);
01468             wait_ms(100);
01469         } 
01470         wait_ms(100);
01471         all_off(display);
01472         wait_ms(100);
01473         
01474         quad_all_on(display, 1);
01475         wait_ms(500);
01476         shift_display_right(display, 32, 100);
01477         shift_display_left(display, 32, 100);
01478         all_off(display);
01479         wait_ms(100);
01480         
01481         print_string(display, 1, "Maxim");
01482         wait_ms(100);
01483         shift_display_right(display, 32, 100);
01484         shift_display_left(display, 32, 100);
01485         wait_ms(100);
01486     }
01487     while(endless_loop);
01488 }
01489 
01490 //*********************************************************************
01491 void endless_scroll_display(Max7219 *display, uint32_t scroll_right)
01492 {
01493     if(scroll_right)
01494     {
01495         printf("\nScrolling Right\n");
01496         while(1)
01497         {
01498             shift_display_right(display, 1, 100);
01499         }
01500     }
01501     else
01502     {
01503         printf("\nScrolling Left\n");
01504         while(1)
01505         {
01506             shift_display_left(display, 1, 100);
01507         }
01508     }
01509 }
01510 
01511 /********************************************************************/
01512 void get_16x16_character(char c, uint8_t *char_buff, uint8_t font_type)
01513 {
01514     uint8_t idx;
01515     
01516     switch(font_type)
01517     {
01518         case 1: // Use 16x16 Aerial bold font
01519                 for(idx = 0; idx < 32; idx++) 
01520                 {
01521                     //Get byte of char from map & store in buffer
01522                     char_buff[idx] = Aerial_bold_font_16x16[c - 0x20][idx];
01523                 }
01524                 break; 
01525         case 2: // Use For 16x16 manual font 
01526                 for(idx = 0; idx < 32; idx++) 
01527                 {
01528                     //Get byte of char from map & store in buffer
01529                     char_buff[idx] = Manual_font_16x16[c - 0x20][idx];
01530                 }
01531                 break;
01532         default : //Use 16x16 Aerial bold font
01533                 for(idx = 0; idx < 32; idx++) 
01534                 {
01535                     //Get byte of char from map & store in buffer
01536                     char_buff[idx] = Aerial_bold_font_16x16[c - 0x20][idx];
01537                 }
01538                 break; 
01539     } //end of switch       
01540 }
01541 
01542 void print_char_16x16(Max7219 *p_display, uint16_t position, char c, uint8_t font_type)
01543 {
01544    
01545     uint8_t idx,device;
01546     uint8_t char_buff[32]; 
01547     uint16_t buff_start = position;
01548     
01549     get_16x16_character(c, char_buff,font_type);
01550     //Write bit map data to display device and store it in buffer 
01551     for(device = 1; device < 5; device++)
01552     {
01553         for(idx = 0; idx < 8; idx++)
01554         {
01555             p_display->write_digit(device, (idx+1), char_buff[idx + ( device - 1) * 8]); 
01556             //Get index for display buffer, keeps image of display for shifting
01557             buff_end = (device - 1) * 8 + idx + buff_start;
01558             //Wrap buffer back around 
01559             if(buff_end > 1023)
01560             {
01561                 buff_end -= 1023;
01562             }
01563             display_buff[buff_end] = char_buff[idx + ( device - 1) * 8];
01564          } 
01565     }
01566     buff_end +=1;
01567     //Arrange single character data in buffers as upper and lower row   
01568     for(idx = 0;idx < 16; idx++)
01569     {
01570         disp_buff1[idx] = display_buff[idx];
01571         disp_buff2[idx] = display_buff[idx+16];
01572     }
01573 }
01574 
01575 void print_string_16x16(Max7219 *p_display, char *s,uint8_t font_type)
01576 {
01577     uint16_t idx1=0,idy1=0;
01578     
01579     while(s[idx1] != '\0')
01580     {
01581         print_char_16x16(p_display, (idx1 * 32), s[idx1], font_type);
01582         idx1++;
01583         wait_ms(200);
01584     } 
01585     //Arrange character data in upper and lower row data 
01586     for (idy1=0; idy1 < (buff_end/32); idy1++)
01587     {
01588         for(idx1 = 0; idx1 < 16; idx1++)
01589         {
01590             disp_buff1[idx1 + (16 * idy1)] = display_buff[idx1 + (32 * idy1)];
01591             disp_buff2[idx1 + (16 * idy1)] = display_buff[idx1 + 16 + (32 * idy1)];
01592         }
01593     }
01594     // Clear buffer for next iteration
01595     for(idx1 = 0; idx1 < 1024; idx1++)
01596     display_buff[idx1] = 0;
01597 }
01598 
01599 //*********************************************************************
01600 void shift_display_right_16x16(Max7219 *p_display, uint8_t count, uint8_t delay)
01601 {
01602     uint16_t idx1, idy1;
01603     uint8_t position,device;
01604                      
01605     for(idx1 = 0; idx1 < count; idx1++)
01606     {
01607         // Right shift data in display buffer 1 & 2  
01608         for(idy1 = 0; idy1 < buff_end/2; idy1++)
01609         {
01610             if(idy1 == ((buff_end/2)-1))
01611             {
01612                 temp_buff1[0] = disp_buff1[(buff_end/2) - 1];
01613                 temp_buff2[0] = disp_buff2[(buff_end/2) - 1];
01614             }
01615             else 
01616             {
01617                 temp_buff1[idy1 + 1] = disp_buff1[idy1];
01618                 temp_buff2[idy1 + 1] = disp_buff2[idy1];
01619             }
01620         }
01621         // Save shifted data in the display buffer 1 & 2
01622         for(idy1 = 0; idy1 < buff_end/2; idy1++) 
01623         { 
01624             disp_buff1[idy1] = temp_buff1[idy1]; 
01625             disp_buff2[idy1] = temp_buff2[idy1]; 
01626         }
01627         for(idy1 = 0; idy1 < 16; idy1++) 
01628         {
01629             display_buff_16x16[idy1] = disp_buff1[idy1];
01630             display_buff_16x16[idy1 + 16] = disp_buff2[idy1];
01631         }
01632         position = 0; 
01633         for(device = 1; device < 5; device++)
01634         {
01635             for(idy1 = 0; idy1 < 8; idy1++)
01636             {
01637                 p_display->write_digit(device, (idy1 + 1), display_buff_16x16[idy1 + position]); 
01638             }
01639             position+= 8; 
01640         } 
01641         wait_ms(delay);  
01642     }
01643 }
01644 
01645 //*********************************************************************
01646 void shift_display_left_16x16(Max7219 *p_display, uint8_t count, uint8_t delay)
01647 {
01648     uint16_t idx1,idy1;
01649     uint8_t position,device;
01650     
01651     for(idx1 = 0; idx1 < count; idx1++)
01652     {
01653         // Left shift data in display buffer 1 & 2  
01654         for(idy1 = 0; idy1 < buff_end/2; idy1++)
01655         {
01656             if(idy1 == 0)
01657             {
01658                 temp_buff1[(buff_end/2) - 1] = disp_buff1[idy1];
01659                 temp_buff2[(buff_end/2) - 1] = disp_buff2[idy1];
01660             }
01661             else 
01662             {
01663                 temp_buff1[idy1 - 1] = disp_buff1[idy1];
01664                 temp_buff2[idy1 - 1] = disp_buff2[idy1];
01665             }
01666         }
01667         // Save shifted data in the display buffer 1 & 2 
01668         for(idy1 = 0; idy1 < buff_end/2; idy1++) 
01669         { 
01670             disp_buff1[idy1] = temp_buff1[idy1]; 
01671             disp_buff2[idy1] = temp_buff2[idy1]; 
01672         }
01673         for(idy1 = 0; idy1 < 16; idy1++) 
01674         {
01675             display_buff_16x16[idy1] = disp_buff1[idy1];
01676             display_buff_16x16[idy1 + 16] = disp_buff2[idy1];  
01677         }
01678         position = 0; 
01679         for(device = 1; device < 5; device++)
01680         {
01681             for(idy1 = 0; idy1 < 8; idy1++)
01682             {
01683                 p_display->write_digit(device, (idy1+1), display_buff_16x16[idy1 + position]); 
01684             }
01685             position+= 8; 
01686         }
01687     wait_ms(delay);
01688     }
01689 }
01690 
01691 //*********************************************************************
01692 void demo_16x16(Max7219 *display, max7219_configuration_t display_config, uint8_t font_type, bool endless_loop)
01693 {
01694     uint8_t index = 0;
01695     
01696     do
01697     {
01698         all_off(display);
01699         for(index = 0x20; index < 0x7F; index++)
01700         {
01701             print_char_16x16(display, 0, (char) index, font_type);
01702             wait(0.25);
01703         }
01704         all_on(display);
01705         for(index = 0; index < 16; index++)
01706         {
01707             display_config.intensity = 15 - index;
01708             display->init_display(display_config);
01709             wait_ms(50);
01710         } 
01711         for(index = 0; index < 16; index++)
01712         {
01713             display_config.intensity = index;
01714             display->init_display(display_config);
01715             wait_ms(100);
01716         } 
01717         wait_ms(100);
01718         all_off(display);
01719         wait_ms(100);
01720         
01721         all_on(display);
01722         wait_ms(500);
01723         // Display character then shift right and left
01724         print_char_16x16(display, 0, 'A', font_type);
01725         wait_ms(500);
01726         shift_display_right_16x16(display, 32, 100);
01727         shift_display_left_16x16(display, 32, 100);
01728         all_off(display);
01729         wait_ms(100);
01730         // Display string then shift right and left
01731         print_string_16x16(display, "Maxim", font_type);
01732         wait_ms(500);
01733         shift_display_right_16x16(display, 32, 100);
01734         shift_display_left_16x16(display, 32, 100);
01735         wait_ms(100);
01736     }
01737     while(endless_loop);
01738 }
01739 
01740 //*********************************************************************
01741 void endless_scroll_display_16x16(Max7219 *display, uint32_t scroll_right)
01742 {
01743     if(scroll_right)
01744     {
01745         printf("\nScrolling Right\n");
01746         while(1)
01747         {
01748             shift_display_right_16x16(display, 1, 100);
01749         }
01750     }
01751     else
01752     {
01753         printf("\nScrolling Left\n");
01754         while(1)
01755         {
01756             shift_display_left_16x16(display, 1, 100);
01757         }
01758     }
01759 }
01760 
01761 //*********************************************************************
01762 uint32_t print_menu(void)
01763 {
01764     uint32_t user_input;
01765     
01766     printf("\nPlease select an option below:\n");
01767     printf("%t1. Select font\n");
01768     printf("%t2. Set Brightness\n");
01769     printf("%t3. Print a character to given position\n");
01770     printf("%t4. Print a string to position\n");
01771     printf("%t5. Shift display given number of position and direction\n"); 
01772     printf("%t6. Clear display\n");
01773     printf("%t7. Run the Demo Routine\n");
01774     printf("%t8. Scroll Display In Endless Loop, left or right\n");
01775     printf("%t9. Quit\n\n");
01776     
01777     user_input = get_user_input(NULL, 9);
01778     
01779     return(user_input);
01780 }
01781 
01782 //*********************************************************************
01783 uint32_t get_user_input(char *msg, uint32_t max_val)
01784 {
01785     uint32_t user_input;
01786     
01787     do
01788     {
01789         printf(msg);
01790         
01791         //get user input
01792         fgets(str, MAX_STRING_LENGTH, stdin);
01793                
01794         //Remove trailing newline and CR, if there.
01795         if((strlen(str) > 0 ) && (str[strlen(str) - 1] == 0x0A) && (str[strlen(str) - 2] == 0x0D))
01796         {
01797             str[strlen(str) - 1] = '\0';
01798             str[strlen(str) - 1] = '\0';
01799         }
01800         user_input = strtoul(str, NULL, 0);
01801         printf("\nYou entered = %d\n", user_input);
01802         
01803         if(user_input > max_val)
01804         {
01805             printf("\nOut of range\n");
01806         }
01807     }
01808     while(user_input > max_val);
01809     
01810     return(user_input);
01811 }
01812 
01813 //*********************************************************************
01814 char get_user_char(char *msg)
01815 {
01816     
01817     do
01818     {
01819         printf(msg);
01820         
01821         //get user input
01822         fflush(stdin);
01823         fgets(str, 4, stdin);
01824         fflush(stdin);
01825         //Remove trailing newline and CR, if there.
01826         if((strlen(str) > 0 ) && (str[strlen(str) - 1] == 0x0A) && (str[strlen(str) - 2] == 0x0D))
01827         {
01828             str[strlen(str) - 1] = '\0';
01829             str[strlen(str) - 1] = '\0';
01830         }
01831         
01832         printf("\nYou entered = %c\n", str[0]);
01833         
01834         if((str[0] < 0x20) || (str[0] > 0x7E))
01835         {
01836             printf("\nOut of range\n");
01837         }
01838     }
01839     while((str[0] < 0x20) || (str[0] > 0x7E));
01840     
01841     return(str[0]);
01842 }
01843 
01844 
01845 //*********************************************************************
01846 char * get_user_string(char *msg)
01847 {
01848     printf(msg);
01849     //get user input
01850     fgets(str, MAX_STRING_LENGTH, stdin);
01851     //Remove trailing newline and CR, if there.
01852     if((strlen(str) > 0 ) && (str[strlen(str) - 1] == 0x0A) && (str[strlen(str) - 2] == 0x0D))
01853     {
01854         str[strlen(str) - 1] = '\0';
01855         str[strlen(str) - 1] = '\0';
01856     }
01857     
01858     return(str);
01859 }