Doubts about NutRegisterSpiDevice

Uwe Bonnes <bon-1JbLm1bU5j5ZIx36JBfelj3+ndqKAYMe9FMPySWZwLkb1SvskN2V4Q@public.gmane.org>
Newsgroups gmane.comp.hardware.microcontrollers.ethernut
Message-ID <[email protected]>
Hello,

in the tradition of public soliloquy here another subject feedback would be
welcome:

For SPI devices, NutRegisterSpiDevice() stores the NUTSPINODE SPI bus
information in dev_icb. The Interface control block is used for general
interface information, and e.g. Ethernet drivers expectes IFNET as icb. So a
SPI-connected ethernet device can't use our present net infrastructure.

The device control blockdev_dcb thereas is normally used for storing driver
specific information and NUTSPINODE has an entry node_dcb for layering
devices specific information.

So I think NutRegisterSpiDevice() is the wrong approach and a better
functionality to register a device would should store NUTSPINODE as dev_dcb.

To keep backward compatibility I think about adding a NutSpiRegisterDevice()
function similar to NutRegisterSpiDevice(), but storing NUTSPINODE in
dev_dcb.

Do I miss something? Any objections?

Thanks
-- 
Uwe Bonnes                bon-1JbLm1bU5j5ZIx36JBfelj3+ndqKAYMe9FMPySWZwLkb1SvskN2V4Q@public.gmane.org

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.