-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathHmi4DinBox.h
More file actions
54 lines (43 loc) · 1.26 KB
/
Copy pathHmi4DinBox.h
File metadata and controls
54 lines (43 loc) · 1.26 KB
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
/*
Copyright (c) 2018-2023, Pascal JEAN aka epsilonrt
All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __HMI4DINBOX_PUBLIC_H__
#define __HMI4DINBOX_PUBLIC_H__
#define LED1 0
#define LED2 1
#define LED3 2
#define LED4 3
#define LED5 4
#define LED_RED LED1
#define LED_GREEN1 LED2
#define LED_GREEN2 LED3
#define LED_YELLOW1 LED4
#define LED_YELLOW2 LED5
#define KUP 1
#define KDOWN 2
#define KLEFT 3
#define KRIGHT 4
#define KCENTER 5
#define HMI4DINBOX_SLAVE_ADDR 0b0111111
#define LED_NB 5
#define LED_REG 0
#define BACKLIGHT_REG 1
#define KEY_REG 2
#define KEY_RELEASE (1<<7)
#ifdef __cplusplus
#include <WireHmi.h>
#include <WireLcd.h>
class Hmi4DinBox : public WireSlave {
public:
Hmi4DinBox (int hirqPin = -1, byte slaveAddress = HMI4DINBOX_SLAVE_ADDR);
bool begin (int lcdContrast = 25, bool lcdBoost = false); // contrast value range is 0-63, try 25@5V or 50@3.3V as a starting value
WireLeds led;
WireKeyboard keyb;
WireBackLight backlight;
WireLcd lcd;
};
#endif /* __cplusplus defined */
/* ========================================================================== */
#endif /* __HMI4DINBOX_PUBLIC_H__ */