add support vor vdr-wakeup
This commit is contained in:
@@ -181,7 +181,7 @@ hd_init_serial (Driver *drvthis)
|
|||||||
|
|
||||||
/* Get serial device to use */
|
/* Get serial device to use */
|
||||||
strncpy(device, drvthis->config_get_string(drvthis->name, "device", 0, DEFAULT_DEVICE), sizeof(device));
|
strncpy(device, drvthis->config_get_string(drvthis->name, "device", 0, DEFAULT_DEVICE), sizeof(device));
|
||||||
device[sizeof(device)-1]=0;
|
device[sizeof(device)-1] = '\0';
|
||||||
report (RPT_INFO,"HD44780: serial: using device: %s", device);
|
report (RPT_INFO,"HD44780: serial: using device: %s", device);
|
||||||
|
|
||||||
/* Set up io port correctly, and open it... */
|
/* Set up io port correctly, and open it... */
|
||||||
@@ -243,7 +243,9 @@ serial_HD44780_senddata (PrivateData *p, unsigned char displayID, unsigned char
|
|||||||
|
|
||||||
if (flags == RS_DATA) {
|
if (flags == RS_DATA) {
|
||||||
/* Do we need a DATA indicator byte? */
|
/* Do we need a DATA indicator byte? */
|
||||||
if( SERIAL_IF.data_escape!=0 && ch<SERIAL_IF.data_escape_max ) {
|
if ((SERIAL_IF.data_escape != '\0') &&
|
||||||
|
(ch >= SERIAL_IF.data_escape_min) &&
|
||||||
|
(ch < SERIAL_IF.data_escape_max)) {
|
||||||
write(p->fd, &SERIAL_IF.data_escape, 1);
|
write(p->fd, &SERIAL_IF.data_escape, 1);
|
||||||
}
|
}
|
||||||
write(p->fd, &ch, 1);
|
write(p->fd, &ch, 1);
|
||||||
@@ -266,6 +268,7 @@ serial_HD44780_scankeypad (PrivateData *p)
|
|||||||
{
|
{
|
||||||
unsigned char buffer = 0;
|
unsigned char buffer = 0;
|
||||||
char hangcheck = 100;
|
char hangcheck = 100;
|
||||||
|
|
||||||
read(p->fd, &buffer, 1);
|
read(p->fd, &buffer, 1);
|
||||||
if (buffer == SERIAL_IF.keypad_escape) {
|
if (buffer == SERIAL_IF.keypad_escape) {
|
||||||
while (hangcheck > 0) {
|
while (hangcheck > 0) {
|
||||||
|
|||||||
@@ -11,7 +11,8 @@ typedef struct SerialInterface {
|
|||||||
char name[SERIALIF_NAME_LENGTH];
|
char name[SERIALIF_NAME_LENGTH];
|
||||||
char instruction_escape;
|
char instruction_escape;
|
||||||
char data_escape;
|
char data_escape;
|
||||||
char data_escape_max; /* data escape upper limit */
|
char data_escape_min; /* escaped data lower limit */
|
||||||
|
char data_escape_max; /* escaped data upper limit */
|
||||||
unsigned int default_bitrate;
|
unsigned int default_bitrate;
|
||||||
char if_bits;
|
char if_bits;
|
||||||
char keypad;
|
char keypad;
|
||||||
@@ -23,11 +24,12 @@ typedef struct SerialInterface {
|
|||||||
/* List of connectiontypes managed by this driver, if you change
|
/* List of connectiontypes managed by this driver, if you change
|
||||||
something here, remember also to change hd44780-drivers.h */
|
something here, remember also to change hd44780-drivers.h */
|
||||||
static const SerialInterface serial_interfaces[] = {
|
static const SerialInterface serial_interfaces[] = {
|
||||||
/* name instr data ^ bitrate bits K esc B esc */
|
/* name instr data v ^ bitrate bits K esc B esc */
|
||||||
{"picanlcd", 0x11, 0x12, 0x20, 9600, 8, 0, 0, 0, 0 },
|
{ "picanlcd", 0x11, 0x12, 0x00, 0x20, 9600, 8, 0, 0x00, 0, 0 },
|
||||||
{"lcdserializer", 0xFE, 0, 0, 9600, 8, 0, 0, 0, 0 },
|
{ "lcdserializer", 0xFE, 0, 0x00, 0x00, 9600, 8, 0, 0x00, 0, 0 },
|
||||||
{"los-panel", 0xFE, 0, 0, 9600, 4, 1, 0xFE, 1, 0 },
|
{ "los-panel", 0xFE, 0, 0x00, 0x00, 9600, 4, 1, 0xFE, 1, 0 },
|
||||||
{"vdr-lcd", 0xFE, 0, 0, 9600, 4, 0, 0, 0, 0 }
|
{ "vdr-lcd", 0xFE, 0, 0x00, 0x00, 9600, 4, 0, 0x00, 0, 0 }
|
||||||
|
{ "vdr-wakeup", 0xC0, 0xC4, 0xC0, 0xD0, 9600, 4, 0, 0x00, 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
/* initialize this particular driver */
|
/* initialize this particular driver */
|
||||||
|
|||||||
Reference in New Issue
Block a user