Wim Huiskamp / PT6311

Dependents:   mbed_PT6311

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Font_16Seg.cpp Source File

Font_16Seg.cpp

00001 /* mbed VFD Font Library, for Princeton PT6311 VFD controller as used in VFDEM2
00002  * Copyright (c) 2016, v01: WH, Initial version for VFDEM2
00003  *
00004  * Permission is hereby granted, free of charge, to any person obtaining a copy
00005  * of this software and associated documentation files (the "Software"), to deal
00006  * in the Software without restriction, including without limitation the rights
00007  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
00008  * copies of the Software, and to permit persons to whom the Software is
00009  * furnished to do so, subject to the following conditions:
00010  *
00011  * The above copyright notice and this permission notice shall be included in
00012  * all copies or substantial portions of the Software.
00013  *
00014  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00015  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00016  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
00017  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00018  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
00019  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
00020  * THE SOFTWARE.
00021  */
00022 #include "Font_16Seg.h"
00023 
00024 // Select one of the testboards for Princeton PT6311 VFD controller
00025 #include "PT6311_Config.h"
00026 
00027 #if (VFDEM2_TEST == 1)
00028 
00029 //Mask for blending out and restoring Icons
00030 const char MASK_ICON_GRID[][3] = {
00031                                    {LO(S16_ICON_GR1), MD(S16_ICON_GR1), HI(S16_ICON_GR1)},
00032                                    {LO(S16_ICON_GR2), MD(S16_ICON_GR2), HI(S16_ICON_GR2)},
00033                                    {LO(S16_ICON_GR3), MD(S16_ICON_GR3), HI(S16_ICON_GR3)},
00034                                    {LO(S16_ICON_GR4), MD(S16_ICON_GR4), HI(S16_ICON_GR4)},
00035                                    {LO(S16_ICON_GR5), MD(S16_ICON_GR5), HI(S16_ICON_GR5)},
00036                                    {LO(S16_ICON_GR6), MD(S16_ICON_GR6), HI(S16_ICON_GR6)},
00037                                    {LO(S16_ICON_GR7), MD(S16_ICON_GR7), HI(S16_ICON_GR7)},
00038                                    {LO(S16_ICON_GR8), MD(S16_ICON_GR8), HI(S16_ICON_GR8)},
00039                                    {LO(S16_ICON_GR9), MD(S16_ICON_GR9), HI(S16_ICON_GR9)},
00040                                    {LO(S16_ICON_GR10), MD(S16_ICON_GR10), HI(S16_ICON_GR10)},
00041                                    {LO(S16_ICON_GR11), MD(S16_ICON_GR11), HI(S16_ICON_GR11)},
00042                                    {LO(S16_ICON_GR12), MD(S16_ICON_GR12), HI(S16_ICON_GR12)}
00043                                  };
00044 
00045 
00046 // ASCII Font definition table for transmission to PT6312
00047 //
00048 //#define FONT_16S_START     0x20
00049 //#define FONT_16S_END       0x7F
00050 //#define FONT_16S_NR_CHARS (FONT_16S_END - FONT_16S_START + 1)
00051  
00052 const short FONT_16S[] = { 
00053                             C16_SPC, //32 0x20, Space
00054                             C16_EXC,
00055                             C16_QTE,
00056                             C16_HSH,
00057                             C16_DLR,
00058                             C16_PCT,
00059                             C16_AMP,
00060                             C16_ACC,
00061                             C16_LBR,
00062                             C16_RBR,                   
00063                             C16_MLT,                            
00064                             C16_PLS,
00065                             C16_CMA,
00066                             C16_MIN,
00067                             C16_DOT,                             
00068                             C16_RS,
00069                             C16_0, //48 0x30
00070                             C16_1,
00071                             C16_2,
00072                             C16_3,
00073                             C16_4,                   
00074                             C16_5,
00075                             C16_6,
00076                             C16_7,
00077                             C16_8,
00078                             C16_9,
00079                             C16_COL, //58 0x3A
00080                             C16_SCL,
00081                             C16_LT,
00082                             C16_EQ,
00083                             C16_GT,
00084                             C16_QM,                             
00085                             C16_AT, //64 0x40
00086                             C16_A, //65 0x41, A
00087                             C16_B,
00088                             C16_C,
00089                             C16_D,
00090                             C16_E,
00091                             C16_F,
00092                             C16_G,
00093                             C16_H,
00094                             C16_I,
00095                             C16_J,                   
00096                             C16_K,
00097                             C16_L,
00098                             C16_M,
00099                             C16_N,
00100                             C16_O,
00101                             C16_P,
00102                             C16_Q,
00103                             C16_R,
00104                             C16_S,
00105                             C16_T,
00106                             C16_U,
00107                             C16_V,
00108                             C16_W,
00109                             C16_X,
00110                             C16_Y,
00111                             C16_Z, //90 0x5A, Z
00112                             C16_SBL, //91 0x5B
00113                             C16_LS,
00114                             C16_SBR,
00115                             C16_PWR,
00116                             C16_UDS,  
00117                             C16_ACC,                             
00118                             C16_A, //97 0x61, A replacing a
00119                             C16_B,
00120                             C16_C,
00121                             C16_D,
00122                             C16_E,
00123                             C16_F,
00124                             C16_G,
00125                             C16_H,
00126                             C16_I,
00127                             C16_J,                   
00128                             C16_K,
00129                             C16_L,
00130                             C16_M,
00131                             C16_N,
00132                             C16_O,
00133                             C16_P,
00134                             C16_Q,
00135                             C16_R,
00136                             C16_S,
00137                             C16_T,
00138                             C16_U,
00139                             C16_V,
00140                             C16_W,
00141                             C16_X,
00142                             C16_Y,
00143                             C16_Z, // 122 0x7A, Z replacing z
00144                             C16_CBL, // 123 0x7B
00145                             C16_OR,
00146                             C16_CBR,
00147                             C16_TLD,
00148                             C16_DEL
00149                            }; 
00150   
00151  // Wheel definition table for transmission to PT6311
00152 const int WHEEL_ANI[] = { UDC16_WHEEL0,
00153                           UDC16_WHEEL1,
00154                           UDC16_WHEEL2,
00155                           UDC16_WHEEL3,
00156                           UDC16_WHEEL4,
00157                           UDC16_WHEEL5,
00158                           UDC16_WHEEL6,
00159                           UDC16_WHEEL7 };
00160 
00161 #endif