This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Re: SPI infrastructure
- From: Savin Zlobec <savin at elatec dot si>
- To: Bart Veer <bartv at ecoscentric dot com>
- Cc: ecos-patches at sources dot redhat dot com
- Date: Thu, 26 Aug 2004 09:46:48 +0200
- Subject: Re: SPI infrastructure
Writting an SPI bus driver a few questions came to my mind:
- there are bus device table defines in spi.h, but I couldn't find
any method to do an lookup, it would be nice to have something
like cyg_spi_device *cyg_spi_lookup(cyg_spi_bus *bus, int device_num)
or even better cyg_spi_device *cyg_spi_lookup(int bus_num, int device_num).
- without lookup methods (it seems) the only way to assign an SPI
device to odher device drivers (like DataFlash driver) is to pass the
pointer to it (I guess the HAL_SPI_EXPORTED_DEVICES does this).
- the transfer and tick methods require the polled flag. The polled
mode would be used in configurations like RedBoot or at init times
and non polled mode when kernel is running - so since all
of the communication is done either in one or anodher mode
the polled mode could be set with set_config making the tick
and transfer methods lighter and clearer.
savin