[En-Nut-Discussion] Bitbanging Drivers: Configuration in library or user code
Uwe Bonnes
bon at elektron.ikp.physik.tu-darmstadt.de
Fri Sep 28 15:39:16 CEST 2012
>>>>> "Harald" == Harald Kipp <harald.kipp at egnite.de> writes:
Harald> Hi Uwe, On 28.09.2012 11:33, Uwe Bonnes wrote:
>> the advantage of the bitbangig drivers is that they can use any GPIO
>> pin.
Harald> This is just one aspect. Another idea behind the GPIO API is,
Harald> that you can get a new board up and running without much
Harald> effort. Porting the Nut/OS kernel to a new platform can be done
Harald> in a few days. But Nut/OS is not very interesting as a kernel,
Harald> it's main advantage is peripheral support. If we have a number
Harald> of platform independent bit-banging drivers based on the GPIO
Harald> API, you only need to port this API first, which should be quite
Harald> easy. As soon as this is done, you may use I2C, SPI and more,
Harald> based on the GPIO drivers. That further means, that you can
Harald> access FAT formatted memory cards, calendar chips, serial flash
Harald> etc. with standard C I/O functions.
Harald> When more time is available, you may add better drivers using
Harald> the peripheral hardware of that chip.
I didn't mention that aspect to keep the mail short.
...
Harald> Your latest changes to gpio_avr try to combine both, having the
Harald> clean code of the runtime API without too much processor
Harald> overhead.
Should I go ahead and change the nut/dev code still using porttrans to the
use of the GPIO api?
I tried for
nut/dev/sbi_mmc.c | 92 ++++++++++++++++++-----------------------------------
1 files changed, 31 insertions(+), 61 deletions(-)
and got smaller code.
However I don't know about the status of the GPIO api on Platforms beside
AVR and STM32. And I have no hardware to test..
...
Harald> I haven't done anything with 1wire so far, sorry.
I don't want you to test the code. But I want some feedback about how the
interface is designed.
Harald> In general I have another problem with your latest changes, but
Harald> will open up a different thread for this.
I think it is solved now as some later mail from you implies.
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