2016-09-26 21:14:03 +00:00
|
|
|
#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
|
2016-12-05 22:42:20 +00:00
|
|
|
#define SegmentDP (char)128 // Dot point
|
2016-09-26 21:14:03 +00:00
|
|
|
|
|
|
|
|
2016-11-29 19:00:47 +00:00
|
|
|
#define ASCIIZero 48
|
|
|
|
#define ASCIINine 57
|
|
|
|
#define ASCIIUppercaseA 65
|
|
|
|
#define ASCIIUppercaseZ 90
|
|
|
|
#define ASCIILowercaseA 97
|
|
|
|
#define ASCIILowercaseZ 122
|
|
|
|
|
|
|
|
|
2016-12-05 22:42:20 +00:00
|
|
|
/**
|
|
|
|
* _
|
|
|
|
* | |
|
|
|
|
* |_|
|
|
|
|
*
|
|
|
|
**/
|
|
|
|
#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
|
|
|
|
|
|
|
|
/**
|
2016-12-09 20:06:18 +00:00
|
|
|
*
|
2016-12-05 22:42:20 +00:00
|
|
|
* _
|
|
|
|
* |_|
|
|
|
|
*
|
|
|
|
**/
|
2016-12-09 20:06:18 +00:00
|
|
|
#define CharO SegmentC | SegmentD | SegmentE | SegmentG
|
2016-12-05 22:42:20 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* _
|
|
|
|
* |_|
|
|
|
|
* |
|
|
|
|
*
|
|
|
|
**/
|
|
|
|
#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
|
|
|
|
|
2016-09-26 21:14:03 +00:00
|
|
|
const byte SDNumberSegments[10] PROGMEM =
|
|
|
|
{
|
2016-12-05 22:42:20 +00:00
|
|
|
Char0, Char1, Char2, Char3, Char4, Char5, Char6, Char7, Char8, Char9
|
2016-09-26 21:14:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const byte SDCharacterSegments[26] PROGMEM =
|
|
|
|
{
|
2016-12-05 22:42:20 +00:00
|
|
|
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
|
2016-09-26 21:14:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|