Changes

User:Pau pajuelo

793 bytes added, 13:25, 6 August 2012
no edit summary
=== Overview ===
 
This program is based in [http://git.isee.biz/?p=pub/scm/linux-omap-2.6.git;a=blob;f=Documentation/spi/spidev_test.c;h=16feda9014692a87a4996bf51d759ab9e7500ee5;hb=refs/heads/linux-2.6.37.y spidev_test] and it was edited to run with LIS3DH accelerometer, program can be explained in four parts:
 
'''Connection properties:''' program lets change via parameters SPI configurations like: device, max speed, delay, bits per word, clock phase, clock polarity, etc. If you don't use any of this parameters program will use default options for LIS3DH communication.
 
'''Read mode: '''Reads a word from a register.
 
'''Write mode: '''Writes a word in a register.
 
'''Test mode:''' Reads X, Y and Z axes from accelerometer.
 
We recommend to read peripheral datasheet before use or modify program.
=== Compile program ===
4,199
edits