[BACK]Return to fconsvar.h CVS log [TXT][DIR] Up to [local] / funnyos / dev / fcons

File: [local] / funnyos / dev / fcons / fconsvar.h (download)

Revision 1.6, Tue Oct 16 21:07:19 2007 UTC (16 years, 7 months ago) by init
Branch: MAIN
Changes since 1.5: +3 -9 lines

kill unused comments; kill #define NTACONS and correct fcons_{get|put}char() to take void *ddp

/*
 * $Id: fconsvar.h,v 1.6 2007/10/16 21:07:19 init Exp $
 */
#ifndef _DEV_FCONS_FCONSVAR_H
#define _DEV_FCONS_FCONSVAR_H

#define FCONS_WIDTH 	80
#define FCONS_HEIGHT 	25

struct fcons_handle {
	void 	*fh_ownerdd;	/* similar to bh_ownerdd in bus_handle; XXX kill this cause it is ugly */

	char 	(*getc)(void *);
	void	(*putc)(void *, char);
};


struct fcons_dd {
	/* current cursor position */
	uint8_t currow;
	uint8_t curcol;

	struct fcons_handle fd_fh;
};


int 	fcons_devctl(struct device *devp, uint8_t ctl, void *data);
char 	fcons_getchar(void *ddp);
void 	fcons_putchar(void *ddp, char ch);

/* devctl stuff */
#define DCFCONS_GETCURROW	0
#define DCFCONS_GETCURCOL	1
#define DCFCONS_PUTCHAR 	2
#define DCFCONS_GETCHAR 	3


#endif /* _DEV_FCONS_FCONSVAR_H */