Digital Scale 1.0 Digital Scale

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
display.h
Go to the documentation of this file.
1 /*
2 * display.h
3 *
4 * Created: 01.12.2017 12:52:47
5 * Author: Robert Loos
6 */
7
8
9 #ifndef DISPLAY_H_
10 #define DISPLAY_H_
11
12
13 extern void NextDigit(void);
14 extern void Int8toDisplayHex(uint8_t b, volatile uint8_t *p);
15 extern void Int16toDisplayHex(uint16_t i,volatile uint8_t *p);
16 extern void Int24toDisplayHex(uint32_t l, volatile uint8_t *p);
17
28 typedef enum {
29 DISPLAY_NORMAL,
30 DISPLAY_ALT_SHOW_NORMAL,
31 DISPLAY_ALT_SHOW_ALT
32 } DISPLAY_MODE_t;
33 extern volatile DISPLAY_MODE_t displayMode;
43 extern volatile uint8_t displayBlinkMask;
44
45 #define BLINK_SLOW 1
46 #define BLINK_FAST 2
47 #define BLINK_ALT 4
48
50 extern volatile uint8_t displayBrightness;
51 extern volatile uint8_t display[7], display_alt[7];
52 extern const uint8_t chars[];
53 void SetDisplayCLR(volatile uint8_t *adr);
54 void SetDisplayCAL(void);
55 void SetDisplayRESET(volatile uint8_t *adr);
56 void SetDisplayAuto0(volatile uint8_t *adr);
57 void SetDisplayDontTouch(void);
58 void SetDisplayRef(void);
59 void SetDisplayAltLoBat(void);
60 void SetDisplayAltUncal(void);
61 void SetDisplayDefCon(void);
62 void SetDisplayHiRes(void);
63 void SetDisplayLoRes(void);
64
69 static inline void DisplayNormal(void)
70 {
71 displayMode=DISPLAY_NORMAL;
72 }
73
81 static inline void DisplayAlt(void)
82 {
83 if (displayMode==DISPLAY_NORMAL)
84 {
85 displayMode=DISPLAY_ALT_SHOW_NORMAL;
86 }
87 }
88
89 // Non-hex characters
90 static const uint8_t DISPLAY_L=0x10;
91 static const uint8_t DISPLAY_n=0x11;
92 static const uint8_t DISPLAY_r=0x12;
93 static const uint8_t DISPLAY_t=0x13;
94 static const uint8_t DISPLAY_MINUS=0x14;
95 static const uint8_t DISPLAY_DEGREE=0x15;
96 static const uint8_t DISPLAY_SPACE=0x16;
97 static const uint8_t DISPLAY_u=0x17;
98 static const uint8_t DISPLAY_o=0x18;
99 static const uint8_t DISPLAY_c=0x19;
100 static const uint8_t DISPLAY_h=0x1a;
101 static const uint8_t DISPLAY_APOSTROPHE=0x1b;
102 static const uint8_t DISPLAY_H=0x1c;
103
104 #endif /* DISPLAY_H_ */