This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]