[En-Nut-Discussion] Device driver using TWI and 1-wire
harald.kipp at egnite.de
Mon Jun 14 11:34:25 CEST 2004
>I would like to know if there is any documentation on how to implement
>drivers for Nut/OS or how memory should be handled when new sensor data is
>generated (who owns the memory?). The device generates an interrupt signal
>when new data is ready and it needs to be collected directly. Is there a
>driver implemented today that work in a similar way that I can have a look at?
In general, there is no specific requirement for
a device driver at all. You can use any AVR sample
code and run it with Nut/OS.
No need to register an interrupt handler either.
You can simply use SIGNAL or INTERRUPT like you
would do without any RTOS.
The initial idea with NutRegisterIrqHandler() was,
to have a central point for later enhancements. This
had been used by Oliver, to implement a separate
interrupt stack and may be used later for performance
For some tasks like fast timer interrupts, this may
be too much overhead. In this case you can still
use native interrupt handling.
Writing a specific device driver is an advantage,
if you want to use stdio routines, like printf, scanf
etc. Right now this is only available for UARTs
There is no such thing like memory ownership. This
would require an MMU.
>Also, has anyone implemented anything for a the Dallas DS2760 or ds2770
>1-wire devices? (the ds2760 is the same chip as used in the ipaq h5450) I
>am planning to develop a battery backup for the ethernut and I feel it
>would be nice to have some battery monitoring functions together with the
Hope, you intend to use the Ethernut 1 design, as the
battery would not enjoy much fun with the LAN91C111. :-)
Michael Fischer informed me, that he got quite far with
a CPLD implementation of a state machine, which handles
CompactFlash handshake for Ethernut without blind delay
loops. This hardware with Michael's WLAN driver and
a battery charger...that would make a really cool Ethernut.
More information about the En-Nut-Discussion