version 1.1, 2007/10/16 09:41:04 |
version 1.9, 2008/01/11 15:36:01 |
|
|
*/ |
*/ |
#ifndef _DEV_FCONS_FCONSVAR_H |
#ifndef _DEV_FCONS_FCONSVAR_H |
#define _DEV_FCONS_FCONSVAR_H |
#define _DEV_FCONS_FCONSVAR_H |
|
#include <sys/types.h> |
|
#include <libkern/queue.h> |
|
|
#define FCONS_WIDTH 80 |
#define FCONS_WIDTH 80 |
#define FCONS_HEIGHT 25 |
#define FCONS_HEIGHT 25 |
|
|
#define NFCONS 1 |
|
|
|
struct fcons_devdata { |
struct fcons_handle { |
/* current cursor position */ |
void *fh_ownerdd; /* similar to bh_ownerdd in bus_handle; XXX kill this cause it is ugly */ |
uint8_t currow; |
|
uint8_t curcol; |
|
|
|
|
char (*getc)(void *); |
|
void (*putc)(void *, char); |
}; |
}; |
|
|
|
|
struct consoleops { |
struct fcons_char { |
char (*getc)(struct device *); |
char fc_char; |
void (*putc)(struct device *, char); |
// struct fcons_char *fc_next; |
|
SIMPLEQ_ENTRY(fcons_char) fc_next; |
}; |
}; |
|
|
|
|
int fcons_devctl(struct device *devp, uint8_t ctl, void *data); |
struct fcons_dd { |
char fcons_getchar(struct device *devp); |
/* current cursor position */ |
void fcons_putchar(struct device *devp, char ch); |
uint8_t fd_currow; |
|
uint8_t fd_curcol; |
|
|
/* XXX */ |
/* input queue */ |
//#define putchar(x) fcons_putchar() |
// struct fcons_char *fd_iqueue; |
|
SIMPLEQ_HEAD(head, fcons_char) fd_iqhead; |
|
uint32_t fd_iqlength; |
|
|
|
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 */ |
/* devctl stuff */ |
#define DCFCONS_GETCURROW 0 |
#define DCFCONS_GETCURROW 0 |