thermferm/slcd.c

changeset 426
e54611453d29
parent 423
02653162b03b
child 427
e8e548922e31
equal deleted inserted replaced
425:c51265b518ce 426:e54611453d29
24 #include "slcd.h" 24 #include "slcd.h"
25 #include "futil.h" 25 #include "futil.h"
26 #include "xutil.h" 26 #include "xutil.h"
27 27
28 28
29 #define SLCD_NULL 0x0000
30 #define SLCD_CLEAR 0x0001
31 #define SLCD_MCLEAR 0x1fff
32 #define SLCD_HOME 0x0002
33 #define SLCD_MHOME 0x1ffe
34 #define SLCD_DGRAM 0x0080
35 #define SLCD_MDGRAM 0x1f80
36 #define SLCD_DATA 0x0200
37 #define SLCD_MDATA 0x1e00
38 #define SLCD_LEDS 0x0400
39 #define SLCD_MLEDS 0x1c00
40 #define SLCD_KEYS 0x0800
41 #define SLCD_MKEYS 0x1800
42 #define SLCD_MDEV 0xe000
43
44 #define SEND_PORT 6554
45
46 29
47 struct sockaddr_in sendaddr; /* Server send socket */ 30 struct sockaddr_in sendaddr; /* Server send socket */
48 int sock = -1; 31 int sock = -1;
49 uint16_t keys = 0x0000; 32 uint16_t keys = 0x0000;
33 uint16_t leds = 0x0400; /* LED's, buzzer, LCD backlight */
50 34
51 extern int debug; 35 extern int debug;
52 36
53 37
54 void putLCDsocket(int fd, uint16_t data) 38 void putLCDsocket(int fd, uint16_t data)
89 73
90 74
91 void slcdDummy(int fd) 75 void slcdDummy(int fd)
92 { 76 {
93 putLCDsocket(fd, SLCD_NULL); 77 putLCDsocket(fd, SLCD_NULL);
78 }
79
80
81
82 void slcdLEDs(int fd)
83 {
84 putLCDsocket(fd, leds);
94 } 85 }
95 86
96 87
97 //void slcdHome(int fd) 88 //void slcdHome(int fd)
98 //{ 89 //{

mercurial