Library for the Princeton PT6312 Vacuum Fluorescent Display (VFD) driver.
This library is documented here.
Font_7Seg.cpp@6:d3dc313a6840, 2016-01-20 (annotated)
- Committer:
- wim
- Date:
- Wed Jan 20 18:50:50 2016 +0000
- Revision:
- 6:d3dc313a6840
- Parent:
- 5:be9ec73af639
Rename Digit/Grid, added DVD462 code, added C2233 code, added fonts.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
wim | 5:be9ec73af639 | 1 | /* mbed LED Font Library, for Princeton PT6312 VFD controller as used in Cyberhome DVD462 and C2233 |
wim | 5:be9ec73af639 | 2 | * Copyright (c) 2015, v01: WH, Initial version, Test DVD462 and C2233 |
wim | 5:be9ec73af639 | 3 | * |
wim | 5:be9ec73af639 | 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
wim | 5:be9ec73af639 | 5 | * of this software and associated documentation files (the "Software"), to deal |
wim | 5:be9ec73af639 | 6 | * in the Software without restriction, including without limitation the rights |
wim | 5:be9ec73af639 | 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
wim | 5:be9ec73af639 | 8 | * copies of the Software, and to permit persons to whom the Software is |
wim | 5:be9ec73af639 | 9 | * furnished to do so, subject to the following conditions: |
wim | 5:be9ec73af639 | 10 | * |
wim | 5:be9ec73af639 | 11 | * The above copyright notice and this permission notice shall be included in |
wim | 5:be9ec73af639 | 12 | * all copies or substantial portions of the Software. |
wim | 5:be9ec73af639 | 13 | * |
wim | 5:be9ec73af639 | 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
wim | 5:be9ec73af639 | 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
wim | 5:be9ec73af639 | 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
wim | 5:be9ec73af639 | 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
wim | 5:be9ec73af639 | 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
wim | 5:be9ec73af639 | 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
wim | 5:be9ec73af639 | 20 | * THE SOFTWARE. |
wim | 5:be9ec73af639 | 21 | */ |
wim | 5:be9ec73af639 | 22 | #include "Font_7Seg.h" |
wim | 5:be9ec73af639 | 23 | |
wim | 5:be9ec73af639 | 24 | // Select one of the testboards for Princeton PT6312 VFD controller |
wim | 5:be9ec73af639 | 25 | #if (DVD462_TEST == 1) | (C2233_TEST == 1) |
wim | 5:be9ec73af639 | 26 | |
wim | 5:be9ec73af639 | 27 | //Mask for blending out and restoring Icons |
wim | 5:be9ec73af639 | 28 | const char MASK_ICON_GRID[][2] = { |
wim | 5:be9ec73af639 | 29 | {LO(S7_ICON_GR1), HI(S7_ICON_GR1)}, |
wim | 5:be9ec73af639 | 30 | {LO(S7_ICON_GR2), HI(S7_ICON_GR2)}, |
wim | 5:be9ec73af639 | 31 | {LO(S7_ICON_GR3), HI(S7_ICON_GR3)}, |
wim | 5:be9ec73af639 | 32 | {LO(S7_ICON_GR4), HI(S7_ICON_GR4)}, |
wim | 5:be9ec73af639 | 33 | {LO(S7_ICON_GR5), HI(S7_ICON_GR5)}, |
wim | 5:be9ec73af639 | 34 | {LO(S7_ICON_GR6), HI(S7_ICON_GR6)} |
wim | 5:be9ec73af639 | 35 | }; |
wim | 5:be9ec73af639 | 36 | |
wim | 5:be9ec73af639 | 37 | |
wim | 5:be9ec73af639 | 38 | |
wim | 5:be9ec73af639 | 39 | |
wim | 5:be9ec73af639 | 40 | // ASCII Font definition table for transmission to PT6312 |
wim | 5:be9ec73af639 | 41 | // |
wim | 5:be9ec73af639 | 42 | //#define FONT_7S_START 0x20 |
wim | 5:be9ec73af639 | 43 | //#define FONT_7S_END 0x7F |
wim | 5:be9ec73af639 | 44 | //#define FONT_7S_NR_CHARS (FONT_7_END - FONT_7S_START + 1) |
wim | 5:be9ec73af639 | 45 | |
wim | 5:be9ec73af639 | 46 | const char FONT_7S[] = { |
wim | 5:be9ec73af639 | 47 | C7_0, //48 0x30 |
wim | 5:be9ec73af639 | 48 | C7_1, |
wim | 5:be9ec73af639 | 49 | C7_2, |
wim | 5:be9ec73af639 | 50 | C7_3, |
wim | 5:be9ec73af639 | 51 | C7_4, |
wim | 5:be9ec73af639 | 52 | C7_5, |
wim | 5:be9ec73af639 | 53 | C7_6, |
wim | 5:be9ec73af639 | 54 | C7_7, |
wim | 5:be9ec73af639 | 55 | C7_8, |
wim | 5:be9ec73af639 | 56 | C7_9, |
wim | 5:be9ec73af639 | 57 | C7_A, //65 0x41, A |
wim | 5:be9ec73af639 | 58 | C7_B, |
wim | 5:be9ec73af639 | 59 | C7_C, |
wim | 5:be9ec73af639 | 60 | C7_D, |
wim | 5:be9ec73af639 | 61 | C7_E, |
wim | 5:be9ec73af639 | 62 | C7_F |
wim | 5:be9ec73af639 | 63 | };// 127 |
wim | 5:be9ec73af639 | 64 | |
wim | 5:be9ec73af639 | 65 | #endif |