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

bouncing mail (and MiNT device drivers ;-)



In reply to a mail from nox@jelal.north.de. My mail back to this address
just keeps on bouncing :-(

Hi

>>>I'm trying to write a device driver for my new external keyboard. This is
>>>
>>>Anyway does that sound right? Alternatively is there an easier way to do
>>>it without having to go to the trouble of writing a complete driver?

>> well you could just use a pty...  or, take the virtual consoles, hack

Thanks - the angle I'm now working on is a interrupt handler which takes
stuff from the serial iorec and puts it into the keyboard iorec. I have
most of the parts worked out, but haven't got my interrupt handler debugged
yet.

>>> I also check for blocking in ioctl() which I
>> sorry what do you mean?

Well what I meant was that I wasn't just returning 'ready to read/write'
without making checks first. The following code is what I was using:

static long
fcon_ioctl(f, mode, buf)
 FILEPTR *f; int mode; void *buf;
{

 int num = 0;

 if (mode & FIONREAD){
  if (BCONSTAT(2)){
   num=1;
  }
  *((long *)buf) = num;
  return(0);  
 }
 if (mode & FIONWRITE){
  if (BCOSTAT(2)){
   num=1;
  }
  *((long *)buf) = num;
  return(0);  
 }
  return(EINVFN);
}

Thanks anyway for the other info. It seems like I have avoided writing a
device driver for this problem, but it nice to know how to do it!

:-)

Thanks

Roland.

@CiX