[En-Nut-Discussion] GPIO again ;-)

bon at elektron.ikp.physik.tu-darmstadt.de bon at elektron.ikp.physik.tu-darmstadt.de
Wed Sep 18 12:20:49 CEST 2013


Hello,

working and easy configurable bitbanging driver for i2c/spi/jtag/owi and
possible other protocoll allow easy startup on new
architectures/families. However our efforts so long had all some drawbacks:

- porttran.h exposed too much functionality, leading to code that could not
be implemented on some architetecture.
- NutGpio Api that also coudn't cope with the AVR architecture. This
approach also introduced run-time configurable drivers that causes trouble
in the NutOs context.

I checked in SVN now piotrans.h somehow based on porttran.h with a limited
subset of functions. Implementations for i2cbus, jtag and owi are provided,
with normal *.conf library build-time configuration and with nut/app test
code. Most checks were done on STM32 and some tests on AVR8.

Help is needed with the other architectures! Mostly the GPIO_INIT()
function has to be implemented, that should power up and clock the port and
leave it as input with no pull-up/downs.

As piotrans.h needs work with archs beside STM32/AVR, I didn't touch the
bitbanging SPI drivers. If there is consense and GPIO_INIT implemented for
most archs, I will try to consolidate the bitbanging spi drivers and use
piotran.h for them.

Work done on jtag_gpio may already impact some arch by missing arch-support
in piotran.h. Sorry!

Bye
-- 
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