-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.h
49 lines (40 loc) · 1.33 KB
/
main.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//
// Created by pstadler on 06.10.19.
//
#ifndef FB_MAIN_H
#define FB_MAIN_H
#include <stdbool.h>
#include "configuration.h"
struct Measurement {
uint32_t tTrigger;
uint32_t tBlack;
uint32_t tWhite;
};
typedef enum {
FBSTATE_ERROR_MEASURE = -2, /* Error whilst measurement */
FBSTATE_ERROR = -1, /* General, unknown error */
FBSTATE_INITIALIZE = 0, /* Pre-idle state */
FBSTATE_IDLE, /* Waiting, idle */
FBSTATE_READY_FOR_MEASUREMENTS, /* Conditions clear for (next) measurement series */
FBSTATE_READY, /* Conditions clear for (next) measure (single measure) */
} FB_STATE;
typedef enum {
FBMODE_HOME,
FBMODE_TEST,
FBMODE_CALIB,
} FB_MODE;
typedef enum {
FBCOLOR_B2W,
FBCOLOR_B2R,
FBCOLOR_R2G
} FB_COLORMODE;
struct FbDevState {
FB_STATE state; /* Internal state machine */
FB_MODE mode; /* Internal mode */
FB_COLORMODE colorm; /* Color mode */
uint8_t homesw_mode;
uint32_t n_measurements; /* Number of measurements per series, default = 100 */
bool isCalibrated;
char displayName[EDID_MAX_DISPLAY_NAME]; /* Manufacturer's display name (edid) */
};
#endif //FB_MAIN_H