[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] sleep() and wake() in device drivers
Hello again,
>
> > There are actually a couple more points about which I am not sure...
> > (ok, so I was wrong when I said I thought I had figured out most of it ;)
> > - does the .xdd need to initialize any fields of the `struct tty'
> > whose pointer it stores in f->devinfo and the dev_descr struct?
>
> No.
>
> > - the tty devices in the kernel seem to do their `normal' io in units of 4
> > bytes of which only the last is significant; is this true also for external
> > tty drivers?
>
> Yes.
>
> > It seems not to be true from what tests I have done, i.e. ser_write() reports
> > that bytes is equal to the number which my little test program passes to
> > write()
>
> Which ser_write() do you mean?
ser_write() is the write 'service function' provided by my device driver
(one of the functions in the DEVDRV struct), sorry I didn't make that clear.
I've had it print out its `bytes' parameter on the console, and it printed
the same number that the test program passes to MiNTLib's write(). Apparently
I've done something wrong somewhere else... :(
>
> Best you take a look on my serial drivers (uart, scc). They are tty
> drivers.
Thank you, that will probably make it a lot clearer to me.
Jonathan