[En-Nut-Discussion] Bitbanging Drivers: Configuration in library or user code

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Fri Sep 28 11:33:47 CEST 2012


the advantage of the bitbangig drivers is that they can use any GPIO
pin. At the moment most bitbanging driver however use fixed pins at library
compile time for these bitbanging things. Changing the default pins requires
the whole ethernut chain, with a change in the <board>.conf file and
eventually even in include/<arch>/<subarch>/dev/board.h and a recompile of
the library.
With a develoment board like an Arduino however, users probably don't want
to develop NUTOS but only use it. Maybe the distributor of the board has
already distributed per-compiled NUTOS libraries and so maybe there is no
NUTOS infrastructre on the users PC at all. So if the users want to user
other pins for configuration, they can't, if configuration is done in the

So I strongly suggest doing configuration of bitbanging drivers in the user
code. Ethernut should supply good defaults, but the user must be able to
easily  define.

With the One-Wire implementation I have asked for feedback on a user code
configurable driver. However there was no feedback so long. dev/owibus uses
different code to register a owibus. I could use the same code if we pass a
(GPIO PIN) user configuration when registering. Probably there are other
ideas. Any thoughts?

Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------

More information about the En-Nut-Discussion mailing list