Making Rtems Device Drivers using C?

Joel Sherrill <joel@OARcorp.com> joel.sherrill at OARcorp.com
Tue Jan 4 15:21:07 UTC 2005


Alex wrote:
> Hi,
> I would like to implement a simple device driver to answer printer port requests, but in the rtems documentation I only see referencies to develop rtems drivers using ada... I want to implement it using c, any how-to? any tutorial? any help?


You must be missing something.  All drivers are implemented in C and you
should avoid using Ada (or C++ for that matter) for them due to 
potential run-time actions you might not anticipate.  Both Ada and C++ 
have complex run-times that can use mutexes, block, or allocate
memory at times you might not like.

For an LPT driver, I would think a simple serial device driver
would be a sufficient model to copy.  If it isn't interrupt driven,
then you can probably get away with using the "polled single port"
console driver shell used by psim.

> Thank you
> 
> Alex
> 
> ________________________________________________________________________________
> Finalmente uma Caixa de Correio com todos os Extras: 21 MB + Anti-vírus + Filtro de
> mensagens indesejadas + Attachs 7MB + Bloqueador IOL + Conteúdos IOL + Ícones dinâmicos…
> Crie aqui a sua: http://www.iol.pt/correio/rodape.php?dst=0411151
> 


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
    Support Available             (256) 722-9985




More information about the users mailing list