NerfStatTrak/SegmentDisplayChars.h

327 lines
4.0 KiB
C
Raw Normal View History

#ifndef SegmentDisplayChars_h
#define SegmentDisplayChars_h
#include "avr/pgmspace.h"
#define SegmentA 1 // Top
#define SegmentB 2 // Top right
#define SegmentC 4 // Bottom right
#define SegmentD 8 // Bottom
#define SegmentE 16 // Bottom left
#define SegmentF 32 // Top left
#define SegmentG 64 // Middle
#define SegmentDP (char)128 // Dot point
#define ASCIIZero 48
#define ASCIINine 57
#define ASCIIUppercaseA 65
#define ASCIIUppercaseZ 90
#define ASCIILowercaseA 97
#define ASCIILowercaseZ 122
/**
* _
* | |
* |_|
*
**/
#define Char0 SegmentA | SegmentB | SegmentC | SegmentD | SegmentE | SegmentF
/**
*
* |
* |
*
**/
#define Char1 SegmentB | SegmentC
/**
* _
* _|
* |_
*
**/
#define Char2 SegmentA | SegmentB | SegmentD | SegmentE | SegmentG
/**
* _
* _|
* _|
*
**/
#define Char3 SegmentA | SegmentB | SegmentC | SegmentD | SegmentG
/**
*
* |_|
* |
*
**/
#define Char4 SegmentB | SegmentC | SegmentF | SegmentG
/**
* _
* |_
* _|
*
**/
#define Char5 SegmentA | SegmentC | SegmentD | SegmentF | SegmentG
/**
* _
* |_
* |_|
*
**/
#define Char6 SegmentA | SegmentC | SegmentD | SegmentE | SegmentF | SegmentG
/**
* _
* |
* |
*
**/
#define Char7 SegmentA | SegmentB | SegmentC
/**
* _
* |_|
* |_|
*
**/
#define Char8 SegmentA | SegmentB | SegmentC | SegmentD | SegmentE | SegmentF | SegmentG
/**
* _
* |_|
* _|
*
**/
#define Char9 SegmentA | SegmentB | SegmentC | SegmentD | SegmentF | SegmentG
/**
* _
* |_|
* | |
*
**/
#define CharA SegmentA | SegmentB | SegmentC | SegmentE | SegmentF | SegmentG
/**
*
* |_
* |_|
*
**/
#define CharB SegmentC | SegmentD | SegmentE | SegmentF | SegmentG
/**
* _
* |
* |_
*
**/
#define CharC SegmentA | SegmentD | SegmentE | SegmentF
/**
*
* _|
* |_|
*
**/
#define CharD SegmentB | SegmentC | SegmentD | SegmentE | SegmentG
/**
* _
* |_
* |_
*
**/
#define CharE SegmentA | SegmentD | SegmentE | SegmentF | SegmentG
/**
* _
* |_
* |
*
**/
#define CharF SegmentA | SegmentE | SegmentF | SegmentG
/**
* _
* |_|
* _|
*
**/
#define CharG SegmentA | SegmentB | SegmentC | SegmentD | SegmentF | SegmentG
/**
*
* |_|
* | |
*
**/
#define CharH SegmentB | SegmentC | SegmentE | SegmentF | SegmentG
/**
*
* |
* |
*
**/
#define CharI SegmentE | SegmentF
/**
*
* |
* |_|
*
**/
#define CharJ SegmentB | SegmentC | SegmentD | SegmentE
/**
*
* |_
* |
*
**/
#define CharK SegmentE | SegmentF | SegmentG
/**
*
* |
* |_
*
**/
#define CharL SegmentD | SegmentE | SegmentF
/**
* _
*
* | |
*
**/
#define CharM SegmentA | SegmentC | SegmentE
/**
*
* _
* | |
*
**/
#define CharN SegmentC | SegmentE | SegmentG
/**
*
* _
* |_|
*
**/
#define CharO SegmentC | SegmentD | SegmentE | SegmentG
/**
* _
* |_|
* |
*
**/
#define CharP SegmentA | SegmentB | SegmentE | SegmentF | SegmentG
/**
* _
* |_|
* |
*
**/
#define CharQ SegmentA | SegmentB | SegmentC | SegmentF | SegmentG
/**
*
* _
* |
*
**/
#define CharR SegmentE | SegmentG
/**
* _
* |_
* _|
*
**/
#define CharS SegmentA | SegmentC | SegmentD | SegmentF | SegmentG
/**
*
* |_
* |_
*
**/
#define CharT SegmentD | SegmentE | SegmentF | SegmentG
/**
*
* | |
* |_|
*
**/
#define CharU SegmentB | SegmentC | SegmentD | SegmentE | SegmentF
/**
*
*
* |_|
*
**/
#define CharV SegmentC | SegmentD | SegmentE
/**
*
* | |
* _
*
**/
#define CharW SegmentB | SegmentD | SegmentF
/**
*
* _|
* |
*
**/
#define CharX SegmentB | SegmentC | SegmentG
/**
*
* |_|
* _|
*
**/
#define CharY SegmentB | SegmentC | SegmentD | SegmentF | SegmentG
/**
* _
* _|
* |_
*
**/
#define CharZ SegmentA | SegmentB | SegmentD | SegmentE | SegmentG
const byte SDNumberSegments[10] PROGMEM =
{
Char0, Char1, Char2, Char3, Char4, Char5, Char6, Char7, Char8, Char9
};
const byte SDCharacterSegments[26] PROGMEM =
{
CharA, CharB, CharC, CharD, CharE, CharF, CharG, CharH, CharI, CharJ, CharK, CharL, CharM,
CharN, CharO, CharP, CharQ, CharR, CharS, CharT, CharU, CharV, CharW, CharX, CharY, CharZ
};
#endif