1#ifndef SEGLCD_HT1621_LCM0844_H
2#define SEGLCD_HT1621_LCM0844_H
18 typedef enum : uint32_t {
54 typedef enum : uint32_t {
75 typedef enum : uint32_t {
110 void init()
override;
123 size_t write(uint8_t ch)
override;
282 count =
sizeof(map) /
sizeof(map[0]);
314 count =
sizeof(map) /
sizeof(map[0]);
325 {0x1A, {{
SYMBOL_ARROW_JUNCTION_TO_ACDC,
SYMBOL_BIT_ARROW_JUNCTION_TO_ACDC}, {
SYMBOL_ARROW_ACDC_TO_JUNCTION,
SYMBOL_BIT_ARROW_ACDC_TO_JUNCTION}, {
SYMBOL_ARROW_ACDC_TO_BATT,
SYMBOL_BIT_ARROW_ACDC_TO_BATT}, {
SYMBOL_ARROW_BATT_TO_ACDC,
SYMBOL_BIT_ARROW_BATT_TO_ACDC}, {
SYMBOL_AC_DC_CONVERT,
SYMBOL_BIT_AC_DC_CONVERT}}},
327 {0x1E, {{
SYMBOL_AC_LINE,
SYMBOL_BIT_AC_LINE}, {
SYMBOL_AC_SYMBOL,
SYMBOL_BIT_AC_SYMBOL}, {
SYMBOL_PV2_SYMBOL,
SYMBOL_BIT_PV2_SYMBOL}, {
SYMBOL_PV1_SYMBOL,
SYMBOL_BIT_PV1_SYMBOL}, {
SYMBOL_LINE_DCDC_TO_BATT,
SYMBOL_BIT_LINE_DCDC_TO_BATT}, {
SYMBOL_LINE_PV2_TO_DCDC,
SYMBOL_BIT_LINE_PV2_TO_DCDC}, {
SYMBOL_LINE_PV1_TO_DCDC,
SYMBOL_BIT_LINE_PV1_TO_DCDC}}},
329 count =
sizeof(map) /
sizeof(map[0]);
333 void _setDecimal(uint8_t row, uint8_t col,
bool state)
override;
HT1621 LCD segment display driver.
Definition SegDriver_HT1621.h:12
LCM0844 LCD (HT1621).
Definition SegLCD_HT1621_LCM0844.h:16
static const AddressMapping * _getSymbolMap(size_t &count)
Definition SegLCD_HT1621_LCM0844.h:318
void init() override
Initialize GPIO pins for communication.
Definition SegLCD_HT1621_LCM0844.cpp:8
static constexpr uint8_t UNIT_BIT_LEFT_MEGA_PREFIX
Definition SegLCD_HT1621_LCM0844.h:129
static constexpr uint8_t UNIT_BIT_RIGHT_WATT
Definition SegLCD_HT1621_LCM0844.h:150
static constexpr int8_t DECIMAL_COL_OFFSET
Definition SegLCD_HT1621_LCM0844.h:214
static constexpr uint8_t LABEL_BIT_PV1
Definition SegLCD_HT1621_LCM0844.h:163
static constexpr uint8_t UNIT_BIT_LEFT_WATT
Definition SegLCD_HT1621_LCM0844.h:135
static constexpr uint8_t SYMBOL_BIT_ARROW_JUNCTION_TO_ACDC
Definition SegLCD_HT1621_LCM0844.h:194
void clearSymbols(uint32_t symbols)
Definition SegLCD_HT1621_LCM0844.cpp:123
static constexpr uint8_t LABEL_BIT_PV2
Definition SegLCD_HT1621_LCM0844.h:164
void setMuteSymbol(bool state, uint8_t index=0)
Definition SegLCD_HT1621_LCM0844.cpp:142
size_t write(uint8_t ch) override
Definition SegLCD_HT1621_LCM0844.cpp:175
static constexpr uint8_t LABEL_BIT_OVERLOAD
Definition SegLCD_HT1621_LCM0844.h:175
static constexpr uint8_t UNIT_BIT_LEFT_WATT_HOUR_SUFFIX
Definition SegLCD_HT1621_LCM0844.h:139
static constexpr uint8_t LABEL_BIT_ERROR
Definition SegLCD_HT1621_LCM0844.h:172
static constexpr uint8_t SYMBOL_BIT_LEFT_ARROWS
Definition SegLCD_HT1621_LCM0844.h:183
SymbolFlags
Definition SegLCD_HT1621_LCM0844.h:75
@ SYMBOL_JUNCTION
Definition SegLCD_HT1621_LCM0844.h:88
@ SYMBOL_LINE_DCDC_TO_ACDC
Definition SegLCD_HT1621_LCM0844.h:98
@ SYMBOL_WARNING_TRIANGLE
Definition SegLCD_HT1621_LCM0844.h:78
@ SYMBOL_ARROW_JUNCTION_TO_ACDC
Definition SegLCD_HT1621_LCM0844.h:91
@ SYMBOL_LINE_JUNCTION_TO_LOAD
Definition SegLCD_HT1621_LCM0844.h:89
@ SYMBOL_ARROW_ACDC_TO_JUNCTION
Definition SegLCD_HT1621_LCM0844.h:92
@ SYMBOL_RIGHT_ARROWS
Definition SegLCD_HT1621_LCM0844.h:81
@ SYMBOL_LINE_PV2_TO_DCDC
Definition SegLCD_HT1621_LCM0844.h:105
@ SYMBOL_DC_DC_CONVERT
Definition SegLCD_HT1621_LCM0844.h:97
@ SYMBOL_UNDERLINES
Definition SegLCD_HT1621_LCM0844.h:82
@ SYMBOL_BULB
Definition SegLCD_HT1621_LCM0844.h:87
@ SYMBOL_PV1_SYMBOL
Definition SegLCD_HT1621_LCM0844.h:103
@ SYMBOL_ARROW_ACDC_TO_BATT
Definition SegLCD_HT1621_LCM0844.h:93
@ SYMBOL_AC_SYMBOL
Definition SegLCD_HT1621_LCM0844.h:101
@ SYMBOL_LEFT_ARROWS
Definition SegLCD_HT1621_LCM0844.h:80
@ SYMBOL_CENTER_FRAME
Definition SegLCD_HT1621_LCM0844.h:85
@ SYMBOL_AC_DC_CONVERT
Definition SegLCD_HT1621_LCM0844.h:95
@ SYMBOL_PV2_SYMBOL
Definition SegLCD_HT1621_LCM0844.h:102
@ SYMBOL_AC_LINE
Definition SegLCD_HT1621_LCM0844.h:100
@ SYMBOL_MAINTENANCE
Definition SegLCD_HT1621_LCM0844.h:77
@ SYMBOL_ARROW_BATT_TO_ACDC
Definition SegLCD_HT1621_LCM0844.h:94
@ SYMBOL_LINE_DCDC_TO_BATT
Definition SegLCD_HT1621_LCM0844.h:104
@ SYMBOL_MUTE
Definition SegLCD_HT1621_LCM0844.h:83
@ SYMBOL_LINE_PV1_TO_DCDC
Definition SegLCD_HT1621_LCM0844.h:106
@ SYMBOL_CLOCK
Definition SegLCD_HT1621_LCM0844.h:76
static constexpr uint8_t LOAD_MASK
Definition SegLCD_HT1621_LCM0844.h:223
void setLabels(uint32_t labels)
Definition SegLCD_HT1621_LCM0844.cpp:111
static constexpr uint8_t LABEL_BIT_BATT_FLD
Definition SegLCD_HT1621_LCM0844.h:179
static constexpr uint8_t LABEL_BIT_LEFT_BATT
Definition SegLCD_HT1621_LCM0844.h:166
static constexpr uint8_t SYMBOL_BIT_LINE_DCDC_TO_BATT
Definition SegLCD_HT1621_LCM0844.h:205
static constexpr uint8_t UNIT_BIT_LEFT_KILO_PREFIX
Definition SegLCD_HT1621_LCM0844.h:128
UnitFlags
Definition SegLCD_HT1621_LCM0844.h:18
@ UNIT_LEFT_MEGA_PREFIX
Definition SegLCD_HT1621_LCM0844.h:21
@ UNIT_RIGHT_PERCENT
Definition SegLCD_HT1621_LCM0844.h:45
@ UNIT_LEFT_AMPERE
Definition SegLCD_HT1621_LCM0844.h:28
@ UNIT_RIGHT_MEGA_PREFIX
Definition SegLCD_HT1621_LCM0844.h:51
@ UNIT_CENTER_MINUTE
Definition SegLCD_HT1621_LCM0844.h:33
@ UNIT_RIGHT_WATT_HOUR_SUFFIX
Definition SegLCD_HT1621_LCM0844.h:48
@ UNIT_RIGHT_AMPERE
Definition SegLCD_HT1621_LCM0844.h:43
@ UNIT_LEFT_HZ
Definition SegLCD_HT1621_LCM0844.h:24
@ UNIT_LEFT_VOLT
Definition SegLCD_HT1621_LCM0844.h:29
@ UNIT_RIGHT_WATT
Definition SegLCD_HT1621_LCM0844.h:42
@ UNIT_LEFT_PERCENT
Definition SegLCD_HT1621_LCM0844.h:30
@ UNIT_CENTER_HOUR
Definition SegLCD_HT1621_LCM0844.h:32
@ UNIT_LEFT_WATT
Definition SegLCD_HT1621_LCM0844.h:27
@ UNIT_RIGHT_HZ
Definition SegLCD_HT1621_LCM0844.h:39
@ UNIT_RIGHT_KILO_PREFIX
Definition SegLCD_HT1621_LCM0844.h:36
@ UNIT_RIGHT_VOLT
Definition SegLCD_HT1621_LCM0844.h:44
@ UNIT_LEFT_KILO_PREFIX
Definition SegLCD_HT1621_LCM0844.h:20
@ UNIT_LEFT_WATT_HOUR_SUFFIX
Definition SegLCD_HT1621_LCM0844.h:31
static constexpr uint8_t SYMBOL_BIT_AC_DC_CONVERT
Definition SegLCD_HT1621_LCM0844.h:198
static constexpr uint8_t DECIMAL_DIGITS[4]
Definition SegLCD_HT1621_LCM0844.h:212
static constexpr uint8_t SYMBOL_BIT_CENTER_FRAME
Definition SegLCD_HT1621_LCM0844.h:184
static constexpr uint8_t UNIT_BIT_RIGHT_AMPERE
Definition SegLCD_HT1621_LCM0844.h:151
static constexpr uint8_t LABEL_BIT_BATT_USER
Definition SegLCD_HT1621_LCM0844.h:180
static constexpr uint8_t UNIT_BIT_RIGHT_PERCENT
Definition SegLCD_HT1621_LCM0844.h:153
static constexpr uint8_t UNIT_BIT_LEFT_HZ
Definition SegLCD_HT1621_LCM0844.h:132
void clearLabels(uint32_t labels)
Definition SegLCD_HT1621_LCM0844.cpp:115
static constexpr uint8_t DECIMAL_POINT_BIT
Definition SegLCD_HT1621_LCM0844.h:213
void setBatteryLevel(uint8_t level)
Definition SegLCD_HT1621_LCM0844.cpp:18
static constexpr uint8_t SYMBOL_BIT_JUNCTION
Definition SegLCD_HT1621_LCM0844.h:192
static constexpr uint8_t LOAD_LEVEL_ADR
Definition SegLCD_HT1621_LCM0844.h:224
static constexpr uint8_t MAX_LOAD_LEVEL
Definition SegLCD_HT1621_LCM0844.h:222
static constexpr uint8_t SYMBOL_BIT_PV1_SYMBOL
Definition SegLCD_HT1621_LCM0844.h:204
static constexpr uint8_t SYMBOL_BIT_LINE_PV2_TO_DCDC
Definition SegLCD_HT1621_LCM0844.h:206
static constexpr uint8_t BATTERY_LEVEL_ADR
Definition SegLCD_HT1621_LCM0844.h:219
static constexpr uint8_t SYMBOL_BIT_MUTE
Definition SegLCD_HT1621_LCM0844.h:190
static constexpr uint8_t SYMBOL_BIT_MAINTENANCE
Definition SegLCD_HT1621_LCM0844.h:186
static constexpr uint8_t LABEL_BIT_BATT_AGM
Definition SegLCD_HT1621_LCM0844.h:178
static constexpr uint8_t SYMBOL_BIT_DC_DC_CONVERT
Definition SegLCD_HT1621_LCM0844.h:199
LabelFlags
Definition SegLCD_HT1621_LCM0844.h:54
@ LABEL_INPUT
Definition SegLCD_HT1621_LCM0844.h:59
@ LABEL_ERROR
Definition SegLCD_HT1621_LCM0844.h:66
@ LABEL_LOAD
Definition SegLCD_HT1621_LCM0844.h:65
@ LABEL_BATT_FLD
Definition SegLCD_HT1621_LCM0844.h:71
@ LABEL_PV1
Definition SegLCD_HT1621_LCM0844.h:57
@ LABEL_AC
Definition SegLCD_HT1621_LCM0844.h:56
@ LABEL_OVERLOAD
Definition SegLCD_HT1621_LCM0844.h:67
@ LABEL_BATT_USER
Definition SegLCD_HT1621_LCM0844.h:72
@ LABEL_RIGHT_BATT
Definition SegLCD_HT1621_LCM0844.h:64
@ LABEL_LEFT_BATT
Definition SegLCD_HT1621_LCM0844.h:60
@ LABEL_BATT_AGM
Definition SegLCD_HT1621_LCM0844.h:70
@ LABEL_OUTPUT
Definition SegLCD_HT1621_LCM0844.h:63
@ LABEL_PV2
Definition SegLCD_HT1621_LCM0844.h:58
static const AddressMapping * _getUnitMap(size_t &count)
Definition SegLCD_HT1621_LCM0844.h:237
static constexpr uint8_t RAM_SIZE
Definition SegLCD_HT1621_LCM0844.h:209
static constexpr uint8_t DIGITS
Definition SegLCD_HT1621_LCM0844.h:210
static constexpr uint8_t SYMBOL_BIT_LINE_PV1_TO_DCDC
Definition SegLCD_HT1621_LCM0844.h:207
void _setDecimal(uint8_t row, uint8_t col, bool state) override
Virtual method for setting decimal point.
Definition SegLCD_HT1621_LCM0844.cpp:147
static constexpr uint8_t SYMBOL_BIT_LINE_JUNCTION_TO_LOAD
Definition SegLCD_HT1621_LCM0844.h:193
static constexpr uint8_t UNIT_BIT_RIGHT_KILO_PREFIX
Definition SegLCD_HT1621_LCM0844.h:144
static const AddressMapping * _getLabelMap(size_t &count)
Definition SegLCD_HT1621_LCM0844.h:286
static constexpr uint8_t UNIT_BIT_RIGHT_MEGA_PREFIX
Definition SegLCD_HT1621_LCM0844.h:159
static constexpr uint8_t UNIT_BIT_LEFT_AMPERE
Definition SegLCD_HT1621_LCM0844.h:136
void setLoadLevel(uint8_t level)
Definition SegLCD_HT1621_LCM0844.cpp:35
static constexpr uint8_t SYMBOL_BIT_WARNING_TRIANGLE
Definition SegLCD_HT1621_LCM0844.h:187
static constexpr uint8_t UNIT_BIT_CENTER_HOUR
Definition SegLCD_HT1621_LCM0844.h:140
void setSymbols(uint32_t symbols)
Definition SegLCD_HT1621_LCM0844.cpp:119
void _updateUnits(uint32_t units, bool set)
Definition SegLCD_HT1621_LCM0844.cpp:52
static constexpr uint8_t SYMBOL_BIT_RIGHT_ARROWS
Definition SegLCD_HT1621_LCM0844.h:188
static constexpr uint8_t LABEL_BIT_AC
Definition SegLCD_HT1621_LCM0844.h:162
void setMaintenanceSymbol(bool state, uint8_t index=0)
Definition SegLCD_HT1621_LCM0844.cpp:132
static constexpr uint8_t MAX_BATTERY_LEVEL
Definition SegLCD_HT1621_LCM0844.h:217
uint8_t _mapSegments(uint8_t val)
Definition SegLCD_HT1621_LCM0844.cpp:205
static constexpr uint8_t SYMBOL_BIT_LINE_DCDC_TO_ACDC
Definition SegLCD_HT1621_LCM0844.h:200
static constexpr uint8_t SYMBOL_BIT_BULB
Definition SegLCD_HT1621_LCM0844.h:191
static constexpr uint8_t SYMBOL_BIT_ARROW_ACDC_TO_JUNCTION
Definition SegLCD_HT1621_LCM0844.h:195
void setWarningSymbol(bool state, uint8_t index=0)
Definition SegLCD_HT1621_LCM0844.cpp:137
static constexpr uint8_t UNIT_BIT_LEFT_PERCENT
Definition SegLCD_HT1621_LCM0844.h:138
static constexpr uint8_t LABEL_BIT_OUTPUT
Definition SegLCD_HT1621_LCM0844.h:169
static constexpr uint8_t SYMBOL_BIT_CLOCK
Definition SegLCD_HT1621_LCM0844.h:185
static constexpr uint8_t UNIT_BIT_LEFT_VOLT
Definition SegLCD_HT1621_LCM0844.h:137
static constexpr uint8_t UNIT_BIT_RIGHT_VOLT
Definition SegLCD_HT1621_LCM0844.h:152
static constexpr uint8_t SYMBOL_BIT_AC_LINE
Definition SegLCD_HT1621_LCM0844.h:201
static constexpr uint8_t UNIT_BIT_CENTER_MINUTE
Definition SegLCD_HT1621_LCM0844.h:141
void setClockSymbol(bool state, uint8_t index=0)
Definition SegLCD_HT1621_LCM0844.cpp:127
static constexpr uint8_t UNIT_BIT_RIGHT_HZ
Definition SegLCD_HT1621_LCM0844.h:147
void _updateLabels(uint32_t labels, bool set)
Definition SegLCD_HT1621_LCM0844.cpp:69
static constexpr uint8_t LABEL_BIT_RIGHT_BATT
Definition SegLCD_HT1621_LCM0844.h:170
static constexpr uint8_t LABEL_BIT_INPUT
Definition SegLCD_HT1621_LCM0844.h:165
static constexpr uint8_t SYMBOL_BIT_AC_SYMBOL
Definition SegLCD_HT1621_LCM0844.h:202
static constexpr uint8_t BATTERY_MASK
Definition SegLCD_HT1621_LCM0844.h:218
static constexpr uint8_t SYMBOL_BIT_PV2_SYMBOL
Definition SegLCD_HT1621_LCM0844.h:203
static constexpr uint8_t UNIT_BIT_RIGHT_WATT_HOUR_SUFFIX
Definition SegLCD_HT1621_LCM0844.h:156
void _updateSymbols(uint32_t symbols, bool set)
Definition SegLCD_HT1621_LCM0844.cpp:86
void setUnits(uint32_t units)
Definition SegLCD_HT1621_LCM0844.cpp:103
static constexpr uint8_t LABEL_BIT_LOAD
Definition SegLCD_HT1621_LCM0844.h:171
void clearUnits(uint32_t units)
Definition SegLCD_HT1621_LCM0844.cpp:107
static constexpr uint8_t SYMBOL_BIT_ARROW_ACDC_TO_BATT
Definition SegLCD_HT1621_LCM0844.h:196
static constexpr uint8_t SYMBOL_BIT_ARROW_BATT_TO_ACDC
Definition SegLCD_HT1621_LCM0844.h:197
static constexpr uint8_t SYMBOL_BIT_UNDERLINES
Definition SegLCD_HT1621_LCM0844.h:189
Definition SegLCD_HT1621_LCM0844.h:232
uint8_t address
Definition SegLCD_HT1621_LCM0844.h:233
FlagBit bits[8]
Definition SegLCD_HT1621_LCM0844.h:234
Definition SegLCD_HT1621_LCM0844.h:227
uint8_t bit
Definition SegLCD_HT1621_LCM0844.h:229
uint32_t flag
Definition SegLCD_HT1621_LCM0844.h:228