Re: SAMA5D3 header files for C application development
From: yocto-bounces@... [mailto:yocto-bounces@...] On Behalf Of SAS NONEI'm assuming based on your questions that you are new to the device tree setup for ARM in the Linux kernel and how to make use of it on the kernel side and the userspace side. If so, I'd suggest you go to http://www.at91.com/linux4sam/bin/view/Linux4SAM/LinuxKernel and read the documentation linked in the "Changes introduced by Device Tree Support section". Then Atmel has documentation specific to their SPI and I2C with the Linux kernel documentation. Look under Documentation/devicetree/bindings/spi/spi_atmel.txt and Documentation/devicetree/bindings/i2c/i2c-at91.txt in your kernel source.
In summary, if you are lucky enough that the device you want to communicate with has device tree support, then you would add that device to your device tree files and follow their documentation on how to communicate with it from userspace. For example, I am using the AD5446 DAC on my hardware, and Analog Devices has excellent documentation of their DAC Linux kernel driver here: http://wiki.analog.com/resources/tools-software/linux-drivers/iio-dac/ad5446. For this device I open up a file and write a value for the desired output voltage, and then the driver takes care of communicating to the AD5446. Otherwise I think you can use the generic spidev interface for reading and writing data on the SPI port (and I think there is something similar for I2C?).
Since you have questions that are specific to your hardware, I think you may be able to get better answers on Atmel's AT91 forums or checking for information on Linux kernel driver support for your specific I2C and SPI devices. If you are having problems building an application with the Eclipse ADT and getting to run on your hardware, then let us know some specific details with the problems you are seeing.