Hi, folks
Sorry if this the wrong list to post my question. Please
redirect me a more appropriate one if my question does
not belong here.
We have a microcontroller device responsible for for
functions like LCD control, watchdog timer, etc. The
only way to talk to it is via serial port. Currenly we have
several processes (lcd process, watchdog daemon, etc) that
try to talk to this device, and we are facing synchronization
problems (several processes request some info from controller
almost simultaneously and get them in wrong order).
We were thinking of implementing a kernel module that
will act as a mediator between user space processes and
serial port. My question is: how does one interface tty driver
from kernel module ? We need the ability to configure the
serial port (baud rate, raw mode etc.), to write to serial port
and to register a callback invoked when data becomes
available.
We know it's simpler to write a user space process listening
on a socket, accepting requests from other processes and
redirecting them to serial port. But on embedded system like
ours introducing a new process is too much overhead.
Thanks in advice for your help.
Felix.
|