Electronic Load  1.0
Programmable Constant Current Sink
screen.h
Go to the documentation of this file.
1 
5 #ifndef SCREEN_H_
6 #define SCREEN_H_
7 
8 #include "stdint.h"
9 #include "control.h"
10 
11 typedef uint8_t screenTimeout_t;
12 
18 typedef struct
19 {
21  uint8_t retval;
22 } screenItem_t;
23 
26 typedef struct
27 {
28  uint8_t numberOfItems;
30  screenItem_t *item[];
31 } screen_t;
32 
33 typedef enum {micro,milli,one,kilo,mega} prefixType;
41 typedef struct
42 {
43  uint8_t lastPrefix;
44  char value[6];
46 void formatPrefixValue(prefixValue_t *val,double newVal);
47 
50 typedef struct
51 {
57 
58 uint8_t doScreenManualTest(void);
59 uint8_t doScreenDischgTest(void);
60 void doScreenSystem(void);
61 
62 uint8_t Screen(screen_t *screen);
64 
65 extern screen_t screenVersion;
66 extern const char txtSetPoint_t[];
67 
68 #endif /* SCREEN_H_ */
uint8_t doScreenManualTest(void)
Definition: screen.c:216
prefixType
Definition: screen.h:33
Definition: screen.h:33
prefixValue_t r
Definition: screen.h:54
Definition: screen.h:33
uint8_t numberOfItems
Computed by initScreen()
Definition: screen.h:28
Contains the prefixValues for all sinks for display.
Definition: screen.h:50
uint8_t screenTimeout_t
Use a suitable unsigned type to allow the longest timeout you would need.
Definition: screen.h:11
Definition: screen.h:33
const char txtSetPoint_t[]
The Text for Set Point.
Definition: screen.c:200
prefixValue_t i
Definition: screen.h:53
uint8_t lastPrefix
Prefix used at last update.
Definition: screen.h:43
screen_t screenVersion
The Version Screen.
Definition: screen.c:133
prefixValue_t p
Definition: screen.h:55
screenTimeout_t timeout
If >0, the screen is terminated after <timeout> Seconds.
Definition: screen.h:29
The control_t is a union of all possible control types.
Definition: control.h:92
screenItem_t inSink1_s
Definition: screen.h:63
Holds the data for a screen item.
Definition: screen.h:18
uint8_t Screen(screen_t *screen)
Handles a screen.
Definition: screen.c:374
uint8_t doScreenDischgTest(void)
Definition: screen.c:262
control_t * control
E.g. the text of a text field or the enterNumber_t of an input field.
Definition: screen.h:20
uint8_t retval
If retval !=0 the screen terminates if the user presses enter.
Definition: screen.h:21
Holds the structure to build up a screen.
Definition: screen.h:26
void doScreenSystem(void)
prefixValue_t u
Definition: screen.h:52
Definition: screen.h:33
Holds the values for a prefix-value.
Definition: screen.h:41
Definition: screen.h:33
void formatPrefixValue(prefixValue_t *val, double newVal)
Formats a value using SI-Prefix Letters.
Definition: screen.c:522