PT6315 VFD driver. Supports DVDR3510.
Font_16Seg.cpp@0:d93c23711ca8, 2016-01-20 (annotated)
- Committer:
- wim
- Date:
- Wed Jan 20 19:24:17 2016 +0000
- Revision:
- 0:d93c23711ca8
PT6315 VFD driver library. Supports DVDR3510. First release.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
wim | 0:d93c23711ca8 | 1 | /* mbed VFD Font Library, for Princeton PT6315 VFD controller as used in DVDR3510 |
wim | 0:d93c23711ca8 | 2 | * Copyright (c) 2016, v01: WH, Initial version for DVDR3510 |
wim | 0:d93c23711ca8 | 3 | * |
wim | 0:d93c23711ca8 | 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
wim | 0:d93c23711ca8 | 5 | * of this software and associated documentation files (the "Software"), to deal |
wim | 0:d93c23711ca8 | 6 | * in the Software without restriction, including without limitation the rights |
wim | 0:d93c23711ca8 | 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
wim | 0:d93c23711ca8 | 8 | * copies of the Software, and to permit persons to whom the Software is |
wim | 0:d93c23711ca8 | 9 | * furnished to do so, subject to the following conditions: |
wim | 0:d93c23711ca8 | 10 | * |
wim | 0:d93c23711ca8 | 11 | * The above copyright notice and this permission notice shall be included in |
wim | 0:d93c23711ca8 | 12 | * all copies or substantial portions of the Software. |
wim | 0:d93c23711ca8 | 13 | * |
wim | 0:d93c23711ca8 | 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
wim | 0:d93c23711ca8 | 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
wim | 0:d93c23711ca8 | 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
wim | 0:d93c23711ca8 | 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
wim | 0:d93c23711ca8 | 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
wim | 0:d93c23711ca8 | 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
wim | 0:d93c23711ca8 | 20 | * THE SOFTWARE. |
wim | 0:d93c23711ca8 | 21 | */ |
wim | 0:d93c23711ca8 | 22 | #include "Font_16Seg.h" |
wim | 0:d93c23711ca8 | 23 | |
wim | 0:d93c23711ca8 | 24 | // Select one of the testboards for Princeton PT6315 VFD controller |
wim | 0:d93c23711ca8 | 25 | #include "PT6315_Config.h" |
wim | 0:d93c23711ca8 | 26 | |
wim | 0:d93c23711ca8 | 27 | #if (DVDR3510_TEST == 1) |
wim | 0:d93c23711ca8 | 28 | |
wim | 0:d93c23711ca8 | 29 | //Mask for blending out and restoring Icons |
wim | 0:d93c23711ca8 | 30 | const char MASK_ICON_GRID[][3] = { |
wim | 0:d93c23711ca8 | 31 | {LO(S16_ICON_GR1), MD(S16_ICON_GR1), HI(S16_ICON_GR1)}, |
wim | 0:d93c23711ca8 | 32 | {LO(S16_ICON_GR2), MD(S16_ICON_GR2), HI(S16_ICON_GR2)}, |
wim | 0:d93c23711ca8 | 33 | {LO(S16_ICON_GR3), MD(S16_ICON_GR3), HI(S16_ICON_GR3)}, |
wim | 0:d93c23711ca8 | 34 | {LO(S16_ICON_GR4), MD(S16_ICON_GR4), HI(S16_ICON_GR4)}, |
wim | 0:d93c23711ca8 | 35 | {LO(S16_ICON_GR5), MD(S16_ICON_GR5), HI(S16_ICON_GR5)}, |
wim | 0:d93c23711ca8 | 36 | {LO(S16_ICON_GR6), MD(S16_ICON_GR6), HI(S16_ICON_GR6)}, |
wim | 0:d93c23711ca8 | 37 | {LO(S16_ICON_GR7), MD(S16_ICON_GR7), HI(S16_ICON_GR7)}, |
wim | 0:d93c23711ca8 | 38 | {LO(S16_ICON_GR8), MD(S16_ICON_GR8), HI(S16_ICON_GR8)}, |
wim | 0:d93c23711ca8 | 39 | {LO(S16_ICON_GR9), MD(S16_ICON_GR9), HI(S16_ICON_GR9)}, |
wim | 0:d93c23711ca8 | 40 | {LO(S16_ICON_GR10), MD(S16_ICON_GR10), HI(S16_ICON_GR10)}, |
wim | 0:d93c23711ca8 | 41 | {LO(S16_ICON_GR11), MD(S16_ICON_GR11), HI(S16_ICON_GR11)} |
wim | 0:d93c23711ca8 | 42 | }; |
wim | 0:d93c23711ca8 | 43 | |
wim | 0:d93c23711ca8 | 44 | |
wim | 0:d93c23711ca8 | 45 | // ASCII Font definition table for transmission to PT6315 |
wim | 0:d93c23711ca8 | 46 | // |
wim | 0:d93c23711ca8 | 47 | //#define FONT_16S_START 0x20 |
wim | 0:d93c23711ca8 | 48 | //#define FONT_16S_END 0x7F |
wim | 0:d93c23711ca8 | 49 | //#define FONT_16S_NR_CHARS (FONT_16S_END - FONT_16S_START + 1) |
wim | 0:d93c23711ca8 | 50 | |
wim | 0:d93c23711ca8 | 51 | const short FONT_16S[] = { |
wim | 0:d93c23711ca8 | 52 | C16_SPC, //32 0x20, Space |
wim | 0:d93c23711ca8 | 53 | C16_EXC, |
wim | 0:d93c23711ca8 | 54 | C16_QTE, |
wim | 0:d93c23711ca8 | 55 | C16_HSH, |
wim | 0:d93c23711ca8 | 56 | C16_DLR, |
wim | 0:d93c23711ca8 | 57 | C16_PCT, |
wim | 0:d93c23711ca8 | 58 | C16_AMP, |
wim | 0:d93c23711ca8 | 59 | C16_ACC, |
wim | 0:d93c23711ca8 | 60 | C16_LBR, |
wim | 0:d93c23711ca8 | 61 | C16_RBR, |
wim | 0:d93c23711ca8 | 62 | C16_MLT, |
wim | 0:d93c23711ca8 | 63 | C16_PLS, |
wim | 0:d93c23711ca8 | 64 | C16_CMA, |
wim | 0:d93c23711ca8 | 65 | C16_MIN, |
wim | 0:d93c23711ca8 | 66 | C16_DOT, |
wim | 0:d93c23711ca8 | 67 | C16_RS, |
wim | 0:d93c23711ca8 | 68 | C16_0, //48 0x30 |
wim | 0:d93c23711ca8 | 69 | C16_1, |
wim | 0:d93c23711ca8 | 70 | C16_2, |
wim | 0:d93c23711ca8 | 71 | C16_3, |
wim | 0:d93c23711ca8 | 72 | C16_4, |
wim | 0:d93c23711ca8 | 73 | C16_5, |
wim | 0:d93c23711ca8 | 74 | C16_6, |
wim | 0:d93c23711ca8 | 75 | C16_7, |
wim | 0:d93c23711ca8 | 76 | C16_8, |
wim | 0:d93c23711ca8 | 77 | C16_9, |
wim | 0:d93c23711ca8 | 78 | C16_COL, //58 0x3A |
wim | 0:d93c23711ca8 | 79 | C16_SCL, |
wim | 0:d93c23711ca8 | 80 | C16_LT, |
wim | 0:d93c23711ca8 | 81 | C16_EQ, |
wim | 0:d93c23711ca8 | 82 | C16_GT, |
wim | 0:d93c23711ca8 | 83 | C16_QM, |
wim | 0:d93c23711ca8 | 84 | C16_AT, //64 0x40 |
wim | 0:d93c23711ca8 | 85 | C16_A, //65 0x41, A |
wim | 0:d93c23711ca8 | 86 | C16_B, |
wim | 0:d93c23711ca8 | 87 | C16_C, |
wim | 0:d93c23711ca8 | 88 | C16_D, |
wim | 0:d93c23711ca8 | 89 | C16_E, |
wim | 0:d93c23711ca8 | 90 | C16_F, |
wim | 0:d93c23711ca8 | 91 | C16_G, |
wim | 0:d93c23711ca8 | 92 | C16_H, |
wim | 0:d93c23711ca8 | 93 | C16_I, |
wim | 0:d93c23711ca8 | 94 | C16_J, |
wim | 0:d93c23711ca8 | 95 | C16_K, |
wim | 0:d93c23711ca8 | 96 | C16_L, |
wim | 0:d93c23711ca8 | 97 | C16_M, |
wim | 0:d93c23711ca8 | 98 | C16_N, |
wim | 0:d93c23711ca8 | 99 | C16_O, |
wim | 0:d93c23711ca8 | 100 | C16_P, |
wim | 0:d93c23711ca8 | 101 | C16_Q, |
wim | 0:d93c23711ca8 | 102 | C16_R, |
wim | 0:d93c23711ca8 | 103 | C16_S, |
wim | 0:d93c23711ca8 | 104 | C16_T, |
wim | 0:d93c23711ca8 | 105 | C16_U, |
wim | 0:d93c23711ca8 | 106 | C16_V, |
wim | 0:d93c23711ca8 | 107 | C16_W, |
wim | 0:d93c23711ca8 | 108 | C16_X, |
wim | 0:d93c23711ca8 | 109 | C16_Y, |
wim | 0:d93c23711ca8 | 110 | C16_Z, //90 0x5A, Z |
wim | 0:d93c23711ca8 | 111 | C16_SBL, //91 0x5B |
wim | 0:d93c23711ca8 | 112 | C16_LS, |
wim | 0:d93c23711ca8 | 113 | C16_SBR, |
wim | 0:d93c23711ca8 | 114 | C16_PWR, |
wim | 0:d93c23711ca8 | 115 | C16_UDS, |
wim | 0:d93c23711ca8 | 116 | C16_ACC, |
wim | 0:d93c23711ca8 | 117 | C16_A, //97 0x61, A replacing a |
wim | 0:d93c23711ca8 | 118 | C16_B, |
wim | 0:d93c23711ca8 | 119 | C16_C, |
wim | 0:d93c23711ca8 | 120 | C16_D, |
wim | 0:d93c23711ca8 | 121 | C16_E, |
wim | 0:d93c23711ca8 | 122 | C16_F, |
wim | 0:d93c23711ca8 | 123 | C16_G, |
wim | 0:d93c23711ca8 | 124 | C16_H, |
wim | 0:d93c23711ca8 | 125 | C16_I, |
wim | 0:d93c23711ca8 | 126 | C16_J, |
wim | 0:d93c23711ca8 | 127 | C16_K, |
wim | 0:d93c23711ca8 | 128 | C16_L, |
wim | 0:d93c23711ca8 | 129 | C16_M, |
wim | 0:d93c23711ca8 | 130 | C16_N, |
wim | 0:d93c23711ca8 | 131 | C16_O, |
wim | 0:d93c23711ca8 | 132 | C16_P, |
wim | 0:d93c23711ca8 | 133 | C16_Q, |
wim | 0:d93c23711ca8 | 134 | C16_R, |
wim | 0:d93c23711ca8 | 135 | C16_S, |
wim | 0:d93c23711ca8 | 136 | C16_T, |
wim | 0:d93c23711ca8 | 137 | C16_U, |
wim | 0:d93c23711ca8 | 138 | C16_V, |
wim | 0:d93c23711ca8 | 139 | C16_W, |
wim | 0:d93c23711ca8 | 140 | C16_X, |
wim | 0:d93c23711ca8 | 141 | C16_Y, |
wim | 0:d93c23711ca8 | 142 | C16_Z, // 122 0x7A, Z replacing z |
wim | 0:d93c23711ca8 | 143 | C16_CBL, // 123 0x7B |
wim | 0:d93c23711ca8 | 144 | C16_OR, |
wim | 0:d93c23711ca8 | 145 | C16_CBR, |
wim | 0:d93c23711ca8 | 146 | C16_TLD, |
wim | 0:d93c23711ca8 | 147 | C16_DEL |
wim | 0:d93c23711ca8 | 148 | }; |
wim | 0:d93c23711ca8 | 149 | |
wim | 0:d93c23711ca8 | 150 | // Wheel definition table for transmission to PT6315 |
wim | 0:d93c23711ca8 | 151 | const int WHEEL_ANI[] = { UDC16_WHEEL0, |
wim | 0:d93c23711ca8 | 152 | UDC16_WHEEL1, |
wim | 0:d93c23711ca8 | 153 | UDC16_WHEEL2, |
wim | 0:d93c23711ca8 | 154 | UDC16_WHEEL3, |
wim | 0:d93c23711ca8 | 155 | UDC16_WHEEL4, |
wim | 0:d93c23711ca8 | 156 | UDC16_WHEEL5, |
wim | 0:d93c23711ca8 | 157 | UDC16_WHEEL6, |
wim | 0:d93c23711ca8 | 158 | UDC16_WHEEL7 }; |
wim | 0:d93c23711ca8 | 159 | |
wim | 0:d93c23711ca8 | 160 | #endif |