zephyr/samples/basic/disco
David B. Kinder 505cc2bb0e doc: use :zephyr_file: where appropriate
A new role :zephyr_file: is available that renders to a link to the file
or folder in GitHub.  Find appropriate references using :file: and
convert to :zephyr_file: to take advantage of its linking capability.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-03-09 09:50:27 -05:00
..
src samples/basic: disco: LED0 and LED1 might not share GPIO controller 2018-12-17 08:18:56 -06:00
CMakeLists.txt cmake: increase minimal required version to 3.13.1 2019-01-03 11:51:29 -05:00
prj.conf samples/basic/disco: Add support for Nucleo F401RE and A101 2016-12-25 19:16:37 +00:00
README.rst doc: use :zephyr_file: where appropriate 2019-03-09 09:50:27 -05:00
sample.yaml samples: define harness for samples 2019-03-04 08:14:29 -05:00

.. _disco-sample:

Disco demo
##########

Overview
********

A simple 'disco' demo. The demo assumes that 2 LEDs are connected to
GPIO outputs of the MCU/board.


Wiring
******

This sample should work on board with multiple built-in LEDs without any
changes, otherwise, the code may need some changes before running on various
board: set PORT, LED0 and LED1 according to the board's GPIO configuration.

Building and Running
*********************

After startup, the program looks up a predefined GPIO device defined by 'PORT',
and configures pins 'LED0' and 'LED1' in output mode.  During each iteration of
the main loop, the state of GPIO lines will be changed so that one of the lines
is in high state, while the other is in low, thus switching the LEDs on and off
in an alternating pattern.

This project does not output to the serial console, but instead causes two LEDs
connected to the GPIO device to blink in an alternating pattern.

The sample can be found here: :zephyr_file:`samples/basic/disco`.