-/* $Id: drv_HD44780.c,v 1.33 2004/08/29 13:03:41 reinelt Exp $
+/* $Id: drv_HD44780.c,v 1.34 2004/09/18 08:22:59 reinelt Exp $
*
* new style driver for HD44780-based displays
*
*
*
* $Log: drv_HD44780.c,v $
+ * Revision 1.34 2004/09/18 08:22:59 reinelt
+ * drv_generic_parport_status() to read status lines
+ *
* Revision 1.33 2004/08/29 13:03:41 reinelt
*
* added RouterBoard driver
/* wait for command completion */
if (!UseBusy) udelay(delay);
-
+
}
-/* $Id: drv_generic_parport.c,v 1.8 2004/06/26 12:04:59 reinelt Exp $
+/* $Id: drv_generic_parport.c,v 1.9 2004/09/18 08:22:59 reinelt Exp $
*
* generic driver helper for serial and parport access
*
*
*
* $Log: drv_generic_parport.c,v $
+ * Revision 1.9 2004/09/18 08:22:59 reinelt
+ * drv_generic_parport_status() to read status lines
+ *
* Revision 1.8 2004/06/26 12:04:59 reinelt
*
* uh-oh... the last CVS log message messed up things a lot...
}
+unsigned char drv_generic_parport_status (void)
+{
+ unsigned char mask =
+ PARPORT_STATUS_ERROR |
+ PARPORT_STATUS_SELECT |
+ PARPORT_STATUS_PAPEROUT |
+ PARPORT_STATUS_ACK |
+ PARPORT_STATUS_BUSY;
+
+ unsigned char data;
+
+#ifdef WITH_PPDEV
+ if (PPdev) {
+ ioctl (PPfd, PPRSTATUS, &data);
+ } else
+#endif
+ {
+ data = inb (Port+1);
+ }
+
+ /* clear unused bits */
+ data &= mask;
+
+ return data;
+}
+
+
void drv_generic_parport_control (const unsigned char mask, const unsigned char value)
{
unsigned char val;
-/* $Id: drv_generic_parport.h,v 1.5 2004/06/26 12:04:59 reinelt Exp $
+/* $Id: drv_generic_parport.h,v 1.6 2004/09/18 08:22:59 reinelt Exp $
*
* generic driver helper for parallel port displays
*
*
*
* $Log: drv_generic_parport.h,v $
+ * Revision 1.6 2004/09/18 08:22:59 reinelt
+ * drv_generic_parport_status() to read status lines
+ *
* Revision 1.5 2004/06/26 12:04:59 reinelt
*
* uh-oh... the last CVS log message messed up things a lot...
* 0 - write to parport
* 1 - read from parport
*
+ * unsigned char drv_generic_parport_status (void)
+ * reads control lines
+ *
* void drv_generic_parport_control (unsigned char mask, unsigned char value)
* frobs control line and takes care of inverted signals
*
unsigned char drv_generic_parport_wire_ctrl (const char *name, const char *deflt);
unsigned char drv_generic_parport_wire_data (const char *name, const char *deflt);
void drv_generic_parport_direction (const int direction);
+unsigned char drv_generic_parport_status (void);
void drv_generic_parport_control (const unsigned char mask, const unsigned char value);
void drv_generic_parport_toggle (const unsigned char bit, const int level, const int delay);
void drv_generic_parport_data (const unsigned char data);
}
+Display SC1602D {
+ Driver 'HD44780'
+ Port '/dev/parports/0'
+ Bits '8'
+ Size '16x2'
+ asc255bug 0
+ Icons 1
+ Wire {
+ RW 'GND'
+ RS 'AUTOFD'
+ ENABLE 'STROBE'
+ GPO 'INIT'
+ }
+}
+
+
+Display LCM-162 {
+ Driver 'HD44780'
+ Port '/dev/parports/0'
+ Bits '8'
+ Size '16x2'
+ UseBusy 1
+ asc255bug 0
+ Icons 1
+ Wire {
+ RW 'INIT'
+ RS 'SELECT'
+ ENABLE 'AUTOFD'
+ }
+}
+
+
Display M50530-24x8 {
Driver 'M50530'
Port '/dev/parports/0'
# delta= step to change value by each time it's read.
# barno - ten different test bar values can be set up, with barno=0..9
# if delta=0, just returns the value of bar n instead of changing it.
- expression test::bar(0,100,50,1)
- expression2 test::bar(1,100,0,1)
- length 10
- max 100
+ expression test::bar(0,30,25,1)
+ expression2 test::bar(1,30,0,1)
+ length 6
+ max 50
direction 'E'
- update 200
+ update 10
}
Widget BarTestVal {
}
Row2 {
Col1 'Disk'
- Col11 'DiskBar'
+ #Col11 'DiskBar'
+ Col11 'BarTest'
}
# Row2 {
# Col1 'Heartbeat'
#Display 'MI240'
#Display 'CW12232'
#Display 'HD44780-20x4'
+#Display 'SC1602D'
+Display 'LCM-162'
#Display 'CF631'
#Display 'CF632'
#Display 'CF633'
#Display 'CT20x4'
#Display 'T6963-240x64'
#Display 'XWindow'
-Display 'USBLCD'
+#Display 'USBLCD'
#Display 'Image'
-Layout 'Default'
-#Layout 'L16x2'
+#Layout 'Default'
+Layout 'L16x2'
#Layout 'L20x2'
#Layout 'Test'