zephyr/samples/drivers/i2c_lsm9ds0
Andre Guedes 024cfe754e drivers: Replace DEV_OK by 0
This patch replaces all occurences of the macro DEV_OK by the actual
value 0 at the driver level. So this patch touch the files under
drivers/, include/ and samples/drivers/.

This patch is part of the effort to transition from DEV_* codes to
errno.h codes.

Change-Id: I69980ecb9755f2fb026de5668ae9c21a4ae62d1e
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-03-16 19:30:04 -04:00
..
src drivers: Replace DEV_OK by 0 2016-03-16 19:30:04 -04:00
Makefile
README i2c: Enable QMSI driver for Quark D2000 2016-02-20 02:51:49 +00:00
prj.conf

README

I2C LSM9DS0 Sample Application
==============================

This sample application illustrates how to use I2C APIs from Zephyr.
It requires an external device in order to work. The external device
is the accelerometer from LSM9DS0. The datasheet can be found in:
https://www.adafruit.com/datasheets/LSM9DS0.pdf

The application is very simple. It simply reads the 'WHO AM I' register
from the accelerometer and check if matches with the value described in
the datasheet.

Below follows the wiring information for each board this samples has been
tested.

--------------+-------------------+------------------
| LSM9DS0 pin | Quark SE Devboard | Quark D2000 CRB |
|             | pin               | pin             |
|-------------+-------------------+-----------------|
| VIN         | P4 pin 1          | J25 pin 1       |
| GND         | P4 pin 43         | J25 pin 2       |
| SCL         | P4 pin 31         | J21 pin 6       |
| SDA         | P4 pin 33         | J21 pin 5       |
| CSG         | P4 pin 29         | J25 pin 1       |
| SDOG        | P4 pin 17         | J25 pin 2       |
--------------+-------------------+------------------