[BACK]Return to 44780var.h CVS log [TXT][DIR] Up to [local] / funnyos / dev / lcd

File: [local] / funnyos / dev / lcd / 44780var.h (download)

Revision 1.1, Mon Jan 7 20:24:48 2008 UTC (16 years, 3 months ago) by nbrk
Branch: MAIN
CVS Tags: HEAD

initial bits of driver for Hitachi HD44780-compatible LCD controllers.
machine dependent part sits in p64lcd.c;
it doesn't initialize LCD properly - missed some timings, i think.

unfortunately, i have fryed my brand-new 16x4 LCD and can't continue work right now..
very sadly, R.I.P :(

/*
 * $Id: 44780var.h,v 1.1 2008/01/07 20:24:48 nbrk Exp $
 */
#ifndef H44780VAR_H
#define H44780VAR_H
#include <sys/types.h>
//#include <dev/lcd/lcdvar.h>

struct h44780_busops {
	void 	(*write)(void *pldd, uint16_t data);
	uint8_t	(*read)(void *pldd);
	uint8_t	(*readbf)(void *pldd);
	void	(*strobe)(void *pldd);
	void 	*selfdd;
};


struct h44780_dd {
	struct h44780_busops	*h_bop;
//	struct lcd_ops			h_lcdops;

};

#define H44780_DELAY	do {volatile int __h44780_delay; for(__h44780_delay = 0; __h44780_delay < 1000; __h44780_delay++) ;} while(0)

#endif