galileo: Expand README for examples

This patch expands the instructions in examples/galileo/README.md.
This commit is contained in:
Michael LeMay 2016-01-06 17:21:36 -08:00
parent c9bffe6d5a
commit 3e64447631

View File

@ -12,10 +12,13 @@ you want to build gpio-output application, run the following command:
$ make TARGET=galileo EXAMPLE=gpio-output $ make TARGET=galileo EXAMPLE=gpio-output
``` ```
The corresponding EXAMPLE variable setting for each application is
listed to the right of its heading.
GPIO GPIO
---- ----
### GPIO Output ### GPIO Output (EXAMPLE=gpio-output)
This application shows how to use the GPIO driver APIs to manipulate output This application shows how to use the GPIO driver APIs to manipulate output
pins. This application sets the GPIO 4 pin as output pin and toggles its pins. This application sets the GPIO 4 pin as output pin and toggles its
@ -24,31 +27,36 @@ state at every half second.
For a visual effect, you should wire shield pin IO1 to a led in a protoboard. For a visual effect, you should wire shield pin IO1 to a led in a protoboard.
Once the application is running, you should see a blinking LED. Once the application is running, you should see a blinking LED.
### GPIO Input ### GPIO Input (EXAMPLE=gpio-input)
This application shows how to use the GPIO driver APIs to manipulate input This application shows how to use the GPIO driver APIs to manipulate
pins. This application uses default galileo pinmux initialization and sets input pins. This application uses default galileo pinmux
the GPIO 5 (IO2) as output pin and GPIO 6 (IO3) as input. It toggles the initialization and sets the GPIO 5 (shield pin IO2) as output pin and
output pin state at every half second and checks the value on input pin. GPIO 6 (shield pin IO3) as input. A jumper should be used to connect
the two pins. The application toggles the output pin state at every
half second and checks the value on input pin.
### GPIO Interrupt ### GPIO Interrupt (EXAMPLE=gpio-interrupt)
This application shows how to use the GPIO driver APIs to manipulate interrupt This application shows how to use the GPIO driver APIs to manipulate
pins. This application uses default galileo pinmux initialization and sets interrupt pins. This application uses default galileo pinmux
the GPIO 5 (IO2) as output pin and GPIO 6 (IO3) as interrupt. It toggles the initialization and sets the GPIO 5 (shield pin IO2) as output pin and
output pin stat at every half second in order to emulate an interrupt. This GPIO 6 (shield pin IO3) as interrupt. A jumper should be used to
triggers an interrupt and the application callback is called. You can confirm connect the two pins. It toggles the output pin stat at every half
that though the UART output. second in order to emulate an interrupt. This triggers an interrupt
and the application callback is called. You can confirm that though
the UART output.
I2C I2C
--- ---
### I2C LSM9DS0 ### I2C LSM9DS0 (EXAMPLE=i2c-LSM9DS0)
This application shows how to use I2C driver APIs to configure I2C Master This application shows how to use I2C driver APIs to configure I2C
controller and communicate with LSM9DS0 sensor. At every 5 seconds, the Master controller and communicate with an LSM9DS0 sensor if one has
application reads the "who am I" register from gyroscope sensor and prints if been connected as described below. At every 5 seconds, the application
the register value matches the expected value described in the spec [1]. reads the "who am I" register from gyroscope sensor and prints if the
register value matches the expected value described in the spec [1].
According to the sensor spec, to read the value in "who am I" register, we According to the sensor spec, to read the value in "who am I" register, we
should first perform an i2c write operation to select the register we want should first perform an i2c write operation to select the register we want