[En-Nut-Discussion] Device Drivers

Harald Kipp harald.kipp at egnite.de
Mon Aug 16 10:37:29 CEST 2004

Hi Ed,

the main thing a driver provides is the NUTDEVICE
structure. Very simple drivers are devDebug0 and
devDebug1. They are output only and do not use

Please note, that Nut/OS drivers are required only,
if you want to make use of printf/scanf etc. This
may not fit to USB. Some interfaces need more than
just simple I/O. For example twif.c (I2C) uses a
completely different API. It's not a driver in the
sense of providing standard I/O access.

Don't be mislead by PC OS drivers. Their major task
is to run in kernel mode. With AVR, there's no memory
or I/O protection. Thus, no driver is required to
access the hardware or to process interrupts.


At 17:10 15.08.2004 -0700, you wrote:
>Content-class: urn:content-classes:message
>Content-Type: multipart/alternative;
>         boundary="----_=_NextPart_001_01C48325.60E87B36"
>What are the basics of writing a device driver?  I ve got an ATMega128 
>board with an FTDI245 USB chip on it and I d like to create a simple 
>driver for it so that I can read and write to it using standard i/o.  I m 
>trying to follow the uart driver code as an example but I m having some 
>difficulty is figuring it out.  Is there any sort of simple example 
>available or any additional information that could be helpful?

More information about the En-Nut-Discussion mailing list