HD44780 and SED1330 now use lpt-port.h
This commit is contained in:
@@ -62,6 +62,7 @@
|
|||||||
|
|
||||||
#include "hd44780-4bit.h"
|
#include "hd44780-4bit.h"
|
||||||
#include "hd44780.h"
|
#include "hd44780.h"
|
||||||
|
#include "lpt-port.h"
|
||||||
|
|
||||||
#include "port.h"
|
#include "port.h"
|
||||||
#include "shared/str.h"
|
#include "shared/str.h"
|
||||||
|
|||||||
@@ -53,6 +53,7 @@
|
|||||||
|
|
||||||
#include "hd44780-ext8bit.h"
|
#include "hd44780-ext8bit.h"
|
||||||
#include "hd44780.h"
|
#include "hd44780.h"
|
||||||
|
#include "lpt-port.h"
|
||||||
|
|
||||||
#include "port.h"
|
#include "port.h"
|
||||||
#include "lcd_sem.h"
|
#include "lcd_sem.h"
|
||||||
|
|||||||
@@ -81,27 +81,4 @@ extern HD44780_functions *hd44780_functions;
|
|||||||
|
|
||||||
#define POSITION 0x80
|
#define POSITION 0x80
|
||||||
|
|
||||||
// Parallel port pin definitions
|
|
||||||
// Output lines
|
|
||||||
#define nSTRB 0x01 /* negative logic */
|
|
||||||
#define STRB 0x01
|
|
||||||
#define nLF 0x02
|
|
||||||
#define LF 0x02
|
|
||||||
#define INIT 0x04 /* the only positive logic output line */
|
|
||||||
#define nSEL 0x08
|
|
||||||
#define SEL 0x08
|
|
||||||
|
|
||||||
#define OUTMASK 0x0B /* SEL, LF and STRB are hardware inverted */
|
|
||||||
|
|
||||||
// Input lines
|
|
||||||
#define nFAULT 0x08
|
|
||||||
#define FAULT 0x08
|
|
||||||
#define SELIN 0x10
|
|
||||||
#define PAPEREND 0x20
|
|
||||||
#define nACK 0x40
|
|
||||||
#define ACK 0x40
|
|
||||||
#define BUSY 0x80
|
|
||||||
|
|
||||||
#define INMASK 0x84 /* BUSY input and the IRQ indicator are inverted */
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -51,6 +51,7 @@
|
|||||||
|
|
||||||
#include "hd44780-serialLpt.h"
|
#include "hd44780-serialLpt.h"
|
||||||
#include "hd44780.h"
|
#include "hd44780.h"
|
||||||
|
#include "lpt-port.h"
|
||||||
|
|
||||||
#include "port.h"
|
#include "port.h"
|
||||||
#include "shared/str.h"
|
#include "shared/str.h"
|
||||||
|
|||||||
@@ -60,6 +60,7 @@
|
|||||||
|
|
||||||
#include "hd44780-winamp.h"
|
#include "hd44780-winamp.h"
|
||||||
#include "hd44780.h"
|
#include "hd44780.h"
|
||||||
|
#include "lpt-port.h"
|
||||||
|
|
||||||
#include "port.h"
|
#include "port.h"
|
||||||
#include "shared/str.h"
|
#include "shared/str.h"
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
// This file contains defines to control the LPT port.
|
||||||
|
// A lot of this was originally in hd44780-low.h
|
||||||
|
|
||||||
|
#ifndef LPT_PORT_H
|
||||||
|
#define LPT_PORT_H
|
||||||
|
|
||||||
|
|
||||||
|
/* Output data
|
||||||
|
* Write to baseaddress+0
|
||||||
|
*/
|
||||||
|
// Straight-forward use, no defines needed for this...
|
||||||
|
|
||||||
|
|
||||||
|
/* Control output lines
|
||||||
|
* Write to baseaddress+2
|
||||||
|
*/
|
||||||
|
#define nSTRB 0x01 /* negative logic */
|
||||||
|
#define STRB 0x01
|
||||||
|
#define nLF 0x02
|
||||||
|
#define LF 0x02
|
||||||
|
#define INIT 0x04 /* the only positive logic output line */
|
||||||
|
#define nSEL 0x08
|
||||||
|
#define SEL 0x08
|
||||||
|
#define ENIRQ 0x10 /* Enable IRQ via ACK line */
|
||||||
|
#define ENBI 0x20 /* Enable bi-directional port */
|
||||||
|
|
||||||
|
#define OUTMASK 0x0B /* SEL, LF and STRB are hardware inverted */
|
||||||
|
/* Use this mask only for the control output lines */
|
||||||
|
/* XOR with this mask ( ^ OUTMASK ) */
|
||||||
|
|
||||||
|
|
||||||
|
/* Control input lines
|
||||||
|
* Read from baseaddress+1
|
||||||
|
*/
|
||||||
|
#define nFAULT 0x08
|
||||||
|
#define FAULT 0x08
|
||||||
|
#define SELIN 0x10
|
||||||
|
#define PAPEREND 0x20
|
||||||
|
#define nACK 0x40
|
||||||
|
#define ACK 0x40
|
||||||
|
#define BUSY 0x80
|
||||||
|
#define IRQ 0x02
|
||||||
|
|
||||||
|
#define INMASK 0x84 /* BUSY input and the IRQ indicator are inverted */
|
||||||
|
/* Use this mask only for the control input lines */
|
||||||
|
/* XOR with this mask ( ^ OUTMASK ) */
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -383,7 +383,7 @@ sed1330_init( lcd_logical_driver * driver, char *args )
|
|||||||
struct sched_param param;
|
struct sched_param param;
|
||||||
param.sched_priority=1;
|
param.sched_priority=1;
|
||||||
if (( sched_setscheduler(0, SCHED_RR, ¶m)) == -1) {
|
if (( sched_setscheduler(0, SCHED_RR, ¶m)) == -1) {
|
||||||
report( RPT_ERR, "HD44780_init: failed (%s)", strerror (errno));
|
report( RPT_ERR, "SED1330: init failed (%s)", strerror (errno));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user