forked from WiseLord/ampcontrol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
display.h
127 lines (97 loc) · 2.21 KB
/
display.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#ifndef DISPLAY_H
#define DISPLAY_H
#include <inttypes.h>
#include "rtc.h"
#include "alarm.h"
#include "audio/audio.h"
#ifdef KS0066_16X2_PCF8574
#define KS0066
#endif
#ifdef KS0066_16X2
#define KS0066
#endif
#ifdef KS0066
#include "display/ks0066.h"
#define MIN_BRIGHTNESS KS0066_MIN_BRIGHTNESS
#define MAX_BRIGHTNESS KS0066_MAX_BRIGHTNESS
#define writeString(x) ks0066WriteString(x)
#define displayClear() ks0066Clear()
#elif defined(LS020)
#include "display/ls020.h"
#define MIN_BRIGHTNESS LS020_MIN_BRIGHTNESS
#define MAX_BRIGHTNESS LS020_MAX_BRIGHTNESS
#define writeString(x) ls020WriteString(x)
#define displayClear() ls020Clear()
#else
#include "display/gdfb.h"
#define MIN_BRIGHTNESS GD_MIN_BRIGHTNESS
#define MAX_BRIGHTNESS GD_MAX_BRIGHTNESS
#define writeString(x) gdWriteString(x)
#define displayClear() gdClear()
#endif
/* Backlight state */
#define BACKLIGHT_ON 1
#define BACKLIGHT_OFF 0
/* Radio tuning mode */
#define MODE_RADIO_TUNE 1
#define MODE_RADIO_CHAN 0
/* String buffer */
#define STR_BUFSIZE 20
/* Spectrum output mode */
enum {
SP_MODE_METER = 0,
SP_MODE_STEREO,
SP_MODE_MIXED,
SP_MODE_END
};
enum {
FALL_SPEED_LOW = 0,
FALL_SPEED_MIDDLE,
FALL_SPEED_FAST,
FALL_SPEED_END
};
enum {
LCD_LEVELS = 0,
LCD_BAR,
LCD_ALARM,
LCD_END
};
enum {
SYM_STEREO_DEGREE = 0,
SYM_MUTE_CROSS,
SYM_LOUDNESS_CROSS,
SYM_SURROUND_CROSS,
SYM_EFFECT_3D_CROSS,
SYM_TONE_DEFEAT_CROSS,
SYM_STEREO_MONO,
SYM_END
};
void displayInit(void);
uint8_t **getTxtLabels(void);
void setDefDisplay(uint8_t value);
uint8_t getDefDisplay();
void nextRcCmd(void);
void switchTestMode(uint8_t index);
void showRcInfo(void);
void showTemp(void);
void showRadio(uint8_t tune);
void showMute(void);
void showLoudness(void);
void showSurround(void);
void showEffect3d(void);
void showToneDefeat(void);
void showBrWork(void);
void changeBrWork(int8_t diff);
void showSndParam(sndMode mode);
void showTime(void);
void showAlarm(void);
void showTimer(int16_t timer);
void switchSpMode(void);
void switchFallSpeed(void);
void getSpectrum(void);
void showSpectrum(void);
void setWorkBrightness(void);
void setStbyBrightness(void);
void displayPowerOff(void);
void displayUpdate(void);
#endif /* DISPLAY_H */