check for correct device response; add timeouts for socket (fixes LCDd hang up

e.g. when device disappear) (all by M. Bialonczyk)
This commit is contained in:
mmdolze
2011-03-30 06:35:22 +00:00
parent 5fbc384be5
commit 788ef58b99
3 changed files with 134 additions and 63 deletions
+5 -6
View File
@@ -1,15 +1,14 @@
#ifndef HD_ETHLCD_H
#define HD_ETHLCD_H
#include "lcd.h" /* for Driver */
// initialise this particular driver
/* initialise this particular driver */
int hd_init_ethlcd(Driver *drvthis);
#define ETHLCD_DRV_NAME "ethlcd"
#define DEFAULT_ETHLCD_PORT 2425
#define ETHLCD_DRV_NAME "ethlcd"
#define DEFAULT_ETHLCD_PORT 2425
#define ETHLCD_TIMEOUT 5
// ethlcd protocol constants:
/* ethlcd protocol constants: */
#define ETHLCD_SEND_INSTR 0x01
#define ETHLCD_SEND_DATA 0x02
#define ETHLCD_GET_BUTTONS 0x03