tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Making a BSD system more braille friendly



Hello,

On Mon, 2 Jan 2017 10:42:44 +0100 (CET)
Enrico Mioso <mrkiko.rs%gmail.com@localhost> wrote:

> First of all, thank you for your hints and suggestions.
> 
> I answer only now because I wanted to take some time to look around a
> little bit. I saw for example the sys/dev/ic/vga.c driver does
> support this IOCTL, which would allow me to read a character. Would
> this approach work only when VGA mode is used (I don't know how this
> works actually in NetBSD)?

Most wsdisplay drivers should support those ioctl()s via vcons ( see
sys/dev/wscons/wsdisplay_vcons.c ) - more or less text buffers, virtual
console handling etc. for graphics displays. This didn't get much use
though, so there might be bugs. It should Just Work(tm) with the vga
driver though.

> And, to support something like VCS-like, where may I start to look?

Hmm, one relatively easy and non-invasive thing to try would be adding
another ioctl() which behaves more or less like a read() on a vcs
device - hand it a struct that contains a pointer to a buffer, size of
that buffer, and an offset, then fill that buffer like vcs would. It
should probably contain the buffer's geometry as well, for convenience,
since especially graphical ones are by no means guaranteed to be 80x25.
That would still be specific to vga or vcons but save you the trouble
of adding another character device that somehow has to interact with
wsdisplay ( which by itself has no concept of character and attribute
buffers ).

have fun
Michael


Home | Main Index | Thread Index | Old Index