We use the following commands to rename any
LED._GPIO_{CONTROLLER,PIN,FLAGS} to
DT_ALIAS_LED._GPIOS_{CONTROLLER,PIN,FLAGS}
git grep -l LED._GPIO_CONTROLLER | xargs sed -i 's/LED\(.\)_GPIO_CONTROLLER/DT_ALIAS_LED\1_GPIOS_CONTROLLER/g'
git grep -l LED._GPIO_PIN | xargs sed -i 's/LED\(.\)_GPIO_PIN/DT_ALIAS_LED\1_GPIOS_PIN/g'
git grep -l LED._GPIO_FLAGS | xargs sed -i 's/LED\(.\)_GPIO_FLAGS/DT_ALIAS_LED\1_GPIOS_FLAGS/g'
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
39 lines
949 B
ReStructuredText
39 lines
949 B
ReStructuredText
.. _blinky-sample:
|
|
|
|
Blinky Application
|
|
##################
|
|
|
|
Overview
|
|
********
|
|
|
|
The Blinky example shows how to configure GPIO pins as outputs which can also be
|
|
used to drive LEDs on the hardware usually delivered as "User LEDs" on many of
|
|
the supported boards in Zephyr.
|
|
|
|
Requirements
|
|
************
|
|
|
|
The demo assumes that an LED is connected to one of GPIO lines. The
|
|
sample code is configured to work on boards that have defined the led0
|
|
alias in their board device tree description file. Doing so will generate
|
|
these variables:
|
|
|
|
- DT_ALIAS_LED0_GPIOS_CONTROLLER
|
|
- DT_ALIAS_LED0_GPIOS_PIN
|
|
|
|
|
|
Building and Running
|
|
********************
|
|
|
|
This samples does not output anything to the console. It can be built and
|
|
flashed to a board as follows:
|
|
|
|
.. zephyr-app-commands::
|
|
:zephyr-app: samples/basic/blinky
|
|
:board: reel_board
|
|
:goals: build flash
|
|
:compact:
|
|
|
|
After flashing the image to the board, the user LED on the board should start to
|
|
blink.
|