FreeCalypso > hg > freecalypso-sw
comparison rvinterf/lowlevel/rviflcd.c @ 909:16ed75e266f2
rvinterf LCD output inversion option implemented
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 07 Sep 2015 17:25:30 +0000 |
parents | ed5dcc53e0b3 |
children |
comparison
equal
deleted
inserted
replaced
908:ed5dcc53e0b3 | 909:16ed75e266f2 |
---|---|
12 extern u_char rxpkt[]; | 12 extern u_char rxpkt[]; |
13 extern size_t rxpkt_len; | 13 extern size_t rxpkt_len; |
14 | 14 |
15 char *extlcd_program; | 15 char *extlcd_program; |
16 FILE *extlcd_pout; | 16 FILE *extlcd_pout; |
17 u_char extlcd_invert; | |
17 | 18 |
18 void | 19 void |
19 open_extlcd_pipe() | 20 open_extlcd_pipe() |
20 { | 21 { |
21 extlcd_pout = popen(extlcd_program, "w"); | 22 extlcd_pout = popen(extlcd_program, "w"); |
30 { | 31 { |
31 int i; | 32 int i; |
32 | 33 |
33 fprintf(extlcd_pout, "%u %u ", rxpkt[1], rxpkt[2]); | 34 fprintf(extlcd_pout, "%u %u ", rxpkt[1], rxpkt[2]); |
34 for (i = 3; i < rxpkt_len; i += 2) | 35 for (i = 3; i < rxpkt_len; i += 2) |
35 fprintf(extlcd_pout, "%02X%02X", rxpkt[i+1], rxpkt[i]); | 36 fprintf(extlcd_pout, "%02X%02X", rxpkt[i+1] ^ extlcd_invert, |
37 rxpkt[i] ^ extlcd_invert); | |
36 fputc('\n', extlcd_pout); | 38 fputc('\n', extlcd_pout); |
37 fflush(extlcd_pout); | 39 fflush(extlcd_pout); |
38 } | 40 } |