Skip to content

Commit 747c87c

Browse files
author
michael
committed
ported r847 (new Display CW12832 128x32) from volker_dev
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@929 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
1 parent 21b3132 commit 747c87c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

drv_Cwlinux.c

+5-3
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,10 @@ typedef struct {
8383
/* Fixme: number of gpo's should be verified */
8484

8585
static MODEL Models[] = {
86+
/* type, name, rows, cols, xres/char, yres/char, gpo's, gpi's, definable chars, protocol */
8687
{0x01, "CW1602", 2, 16, 5, 7, 2, 2, 8, 1},
8788
{0x02, "CW12232", 4, 20, 6, 8, 2, 2, 16, 2},
89+
{0x03, "CW12832", 4, 21, 6, 8, 2, 2, 16, 2},
8890
{0xff, "Unknown", -1, -1, -1, -1, -1, -1, -1, -1}
8991
};
9092

@@ -173,7 +175,7 @@ static void drv_CW1602_defchar(const int ascii, const unsigned char *buffer)
173175
static void drv_CW12232_defchar(const int ascii, const unsigned char *buffer)
174176
{
175177
int i, j;
176-
char cmd[10] = "\376Nn123456\375";
178+
char cmd[10] = "\376Nn123456\375"; /* 0xfe 'N' [1..16] (6 Bytes Data) 0xfd */
177179

178180
cmd[2] = (char) ascii;
179181

@@ -319,7 +321,7 @@ static int drv_CW_start(const char *section)
319321
if (drv_generic_serial_open(section, Name, 0) < 0)
320322
return -1;
321323

322-
/* read firmware version */
324+
/* read firmware version: 0xfe '1' 0xfd */
323325
drv_generic_serial_write("\3761\375", 3);
324326
usleep(100000);
325327
if (drv_generic_serial_read(buffer, 2) != 2) {
@@ -328,7 +330,7 @@ static int drv_CW_start(const char *section)
328330
info("Cwlinux Firmware V%d.%d", (int) buffer[0], (int) buffer[1]);
329331
}
330332

331-
/* read model mumber */
333+
/* read model mumber: 0xfe 0x30 0xfd */
332334
drv_generic_serial_write("\3760\375", 3);
333335
usleep(100000);
334336
if (drv_generic_serial_read(buffer, 2) != 2) {

0 commit comments

Comments
 (0)