[chbot] Opps sorry - that subject should be "More cheap ARM boards!"
cdhmanning at gmail.com
Fri Mar 15 03:02:33 GMT 2013
On Friday 15 March 2013 11:42:51 Paul Davey wrote:
> > My main question always is - what is the software API for the SPI/I2C
> > interfaces?
> The software interface to the SPI/I2C on these will be either (If you write
> bare metal code and do not use linux) the direct register access that will
> be somewhat similar to most micros and descriptions will be available in
> the programming manual for the A10, or (If you use linux) the interface
> will be the linux stack for that device, the SPI stack for SPI and I2C for
> I2C I believe there are drivers that expose userland interfaces to these
> kernel interfaces however most of these require adding definitions for the
> devices to the kernel board init routine so you have to recompile the
> kernel to change the devices. The linux stacks for these are meant to
> arbitrate access to the bus for everything in the kernel so there are
> usually delays that will be incurred that are not present on bare metal
> microcontrollers since these have no need to share these buses properly.
> Also notice that atleast one of the I2C interfaces is used for the HDMI
> display for the EDID interface.
That is correct.
There are two distinct interfaces:
* One is for use inside the kernel to make higher level drivers (eg. to make
an I2C flash device look like a flash device rather than a raw I2C device).
* One to provide raw access to the I2C device from userland. This uses an
interface in linux/i2c.h which allows to to set up a sequence of I2C
operations as a transaction.
More information about the Chchrobotics