[En-Nut-Discussion] node_cs definition in NUTSPINODE

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Thu Feb 23 11:27:48 CET 2012


>>>>> "Ulrich" == Ulrich Prinz <ulrich.prinz at googlemail.com> writes:

    Ulrich> Hi!
    >>  was not a good idea. In practice you will configure Nut/OS for a
    >> specific board once and never change it.

    Ulrich> I fully agree :)

I disagree:

With adrino-like board or the STM32 discovery boards, you have ample pin
headers and on a jumper board people would like to connect external SPI
devices with their CS_N connected to some arbitray GPIO. But probably in
that situation they don't like to do an extra branch of their NUTOS library.

And with Jose's question for decoded chip selects even more requirements
arise. What if the User could provide his own Stm32SpiChipSelect() function,
perhaps by making the Stm32SpiChipSelect() definition in the library
__weak__? And with an 32 bit argument to encode the GPIO Pin!

    >>  Furthermore, Nut/OS doesn't currently allow to re-use a device. If
    >> you got 4 DataFlash chips, you'll need devSpiAt45d0 to
    >> devSpiAt45d3. Each SPI bus device has a fixed hardware chip select.
    >> 
    Ulrich> Right, there must be one ICB per used ChipSelect even the SPI
    Ulrich> bus itself is reused.

Think also about the zillion of SPI devices where we don't have a NUTOS
driver. Users should be able to use these devices too, even on the same SPI
bus as e.g. devSpiAt45d0 with only a diffent CS. 

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