thermferm/slcd.c

changeset 427
e8e548922e31
parent 426
e54611453d29
child 484
7362ebd40f26
equal deleted inserted replaced
426:e54611453d29 427:e8e548922e31
29 29
30 struct sockaddr_in sendaddr; /* Server send socket */ 30 struct sockaddr_in sendaddr; /* Server send socket */
31 int sock = -1; 31 int sock = -1;
32 uint16_t keys = 0x0000; 32 uint16_t keys = 0x0000;
33 uint16_t leds = 0x0400; /* LED's, buzzer, LCD backlight */ 33 uint16_t leds = 0x0400; /* LED's, buzzer, LCD backlight */
34 uint16_t oleds = 0x0400;
34 35
35 extern int debug; 36 extern int debug;
36 37
37 38
38 void putLCDsocket(int fd, uint16_t data) 39 void putLCDsocket(int fd, uint16_t data)
79 80
80 81
81 82
82 void slcdLEDs(int fd) 83 void slcdLEDs(int fd)
83 { 84 {
84 putLCDsocket(fd, leds); 85 if (leds != oleds)
86 putLCDsocket(fd, leds);
87 oleds = leds;
85 } 88 }
86 89
87 90
88 //void slcdHome(int fd) 91 //void slcdHome(int fd)
89 //{ 92 //{

mercurial