aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhejl <>2004-02-01 11:51:22 +0000
committerhejl <>2004-02-01 11:51:22 +0000
commitf270a16b33144203d3568b2fa12e309c1bfc91eb (patch)
tree77810a2c4cfd1f1244bbd6371298b3ac3ac58e43
parent161f0e969c3d2609bec305189f27b565794d7248 (diff)
downloadlcd4linux-f270a16b33144203d3568b2fa12e309c1bfc91eb.tar.gz
[lcd4linux @ 2004-02-01 11:51:22 by hejl]
Fixes for busy flag
-rw-r--r--drv_HD44780.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/drv_HD44780.c b/drv_HD44780.c
index c3d776e..371adec 100644
--- a/drv_HD44780.c
+++ b/drv_HD44780.c
@@ -1,4 +1,4 @@
-/* $Id: drv_HD44780.c,v 1.8 2004/02/01 08:05:12 reinelt Exp $
+/* $Id: drv_HD44780.c,v 1.9 2004/02/01 11:51:22 hejl Exp $
*
* new style driver for HD44780-based displays
*
@@ -29,6 +29,9 @@
*
*
* $Log: drv_HD44780.c,v $
+ * Revision 1.9 2004/02/01 11:51:22 hejl
+ * Fixes for busy flag
+ *
* Revision 1.8 2004/02/01 08:05:12 reinelt
* Crystalfontz 633 extensions (CRC checking and stuff)
* Models table for HD44780
@@ -315,7 +318,9 @@ static void drv_HD_byte (unsigned char controller, unsigned char data, unsigned
static void drv_HD_command (unsigned char controller, unsigned char cmd, int delay)
{
unsigned char enable;
-
+
+ if (UseBusy) wait_for_busy_flag(controller);
+
if (Bits==8) {
// enable signal: 'controller' is a bitmask
@@ -357,8 +362,6 @@ static void drv_HD_data (unsigned char controller, char *string, int len, int de
// sanity check
if (len<=0) return;
- if (UseBusy) wait_for_busy_flag(controller);
-
if (Bits==8) {
// enable signal: 'controller' is a bitmask
@@ -599,13 +602,13 @@ static int drv_HD_start (char *section)
cfg_number(section, "UseBusy", 0, 0, 1, &UseBusy);
// make sure we don't use the busy flag with RW wired to GND
- if (UseBusy && SIGNAL_RW) {
+ if (UseBusy && !SIGNAL_RW) {
error("%s: Busyflag is to be used, but RW is wired to GND", Name);
UseBusy=0;
}
- // make shure the display supports busy-flag checking in 4-Bit-Mode
- // at the moment this is inly possible with martin Hejl's gpio driver,
+ // make sure the display supports busy-flag checking in 4-Bit-Mode
+ // at the moment this is inly possible with Martin Hejl's gpio driver,
// which allows to use 4 bits as input and 4 bits as output
if (UseBusy && Bits==4 && !(Capabilities&CAP_BUSY4BIT)) {
error("%s: Model '%s' does not support busy-flag checking in 4-bit-mode", Name, Models[Model].name);
23a4cba5a0b7e45cc5a72624&follow=1'>global variable for backlight colorvolker1-0/+1 2007-06-20keypad support completed; new property brightness implementedvolker1-40/+175 2007-06-20maximum value for brightness is 8volker1-2/+2 2007-06-17buttons for X11 driver (thanks to Volker Gering)michael1-8/+49 2007-06-17Apple has no utsbuf.domainname (thanks to Volker Gering)michael1-1/+1 2007-06-17strndup() replacementmichael1-0/+24 2007-06-17better usage output by Volker Geringmichael1-4/+20 2007-06-08Image driver libgd dependancy fixmichael5-6/+31 2007-06-04big MPD patch from Robert Buchholzmichael1-79/+86 2007-05-19gps plugin, code by michu / www.neophob.commichael7-0/+580 2007-05-17compile error on m68k fixed (debian bug 405898)michael3-10/+170 2007-05-04typo in LUIse driver fixedmichael1-1/+1 2007-05-02some compiler warnings fixedmichael6-8/+14 2007-04-30LCD4Linux-0.10.1-RC2michael1-1/+1 2007-04-30ChangeLog updatedmichael1-1782/+3099 2007-04-30svn2cl moved and optimizedmichael1-6/+0