37 int bits, rows, cols ; |
37 int bits, rows, cols ; |
38 int rsPin, strbPin ; |
38 int rsPin, strbPin ; |
39 int dataPins [8] ; |
39 int dataPins [8] ; |
40 int cx, cy ; |
40 int cx, cy ; |
41 }; |
41 }; |
|
42 |
42 extern struct lcdDataStruct *lcds [MAX_LCDS]; |
43 extern struct lcdDataStruct *lcds [MAX_LCDS]; |
|
44 extern sys_config Config; |
|
45 |
43 |
46 |
44 |
47 |
45 /* |
48 /* |
46 * Some LCD functions are extended shadow copies of the wiringPi functions. |
49 * Some LCD functions are extended shadow copies of the wiringPi functions. |
47 * The difference is that the lcdbuf will be updated with the contents on |
50 * The difference is that the lcdbuf will be updated with the contents on |
93 fprintf (stderr, "lcdInit failed\n") ; |
96 fprintf (stderr, "lcdInit failed\n") ; |
94 return -1 ; |
97 return -1 ; |
95 } |
98 } |
96 |
99 |
97 lcdClear (lcdHandle) ; |
100 lcdClear (lcdHandle) ; |
98 for (x = 0; x < 20; x++) |
101 for (x = 0; x < Config.lcd_cols; x++) |
99 for (y = 0; y < 4; y++) |
102 for (y = 0; y < Config.lcd_rows; y++) |
100 lcdbuf[lcdHandle][x][y] = ' '; |
103 lcdbuf[lcdHandle][x][y] = ' '; |
101 |
104 |
102 setBacklight (1) ; |
105 setBacklight (1) ; |
103 |
106 |
104 return 0 ; |
107 return 0 ; |