zephyr/samples/basic/disco
Erwan Gouriou 1cfec48646 samples: yaml: filter can be limited to GPIO_CONTROLLER
It is safe to assume that if X_GPIO_CONTROLLER is defined (hence
generated) X_GPIO_PIN should also be defined.
If this is not the case, this is an issue and letting the sample
build will reveal the issue.
Update the yaml filter to rely only on _GPIO_CONTROLLER #define's


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-12-17 08:18:56 -06:00
..
src samples/basic: disco: LED0 and LED1 might not share GPIO controller 2018-12-17 08:18:56 -06:00
CMakeLists.txt samples, tests: Use semi-accurate project names 2018-10-27 21:31:25 -04:00
prj.conf
README.rst samples: disco: make sample more generic 2018-12-11 13:13:26 -06:00
sample.yaml samples: yaml: filter can be limited to GPIO_CONTROLLER 2018-12-17 08:18:56 -06: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.

For example, on the following boards with additional LEDs, follow the
instructions below:

Nucleo-64 F103RB/F401RE boards
==============================

Connect two LEDs to PB5 and PB8 pins. PB5 is mapped to the
Arduino's D4 pin and PB8 to Arduino's D15. For more details about
these boards see:

- https://developer.mbed.org/platforms/ST-Nucleo-F103RB/
- https://developer.mbed.org/platforms/ST-Nucleo-F401RE/


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: :file:`samples/basic/disco`.

Nucleo F103RB
=============

.. zephyr-app-commands::
   :zephyr-app: samples/basic/disco
   :board: nucleo_f103rb
   :goals: build
   :compact:

Nucleo F401RE
=============

.. zephyr-app-commands::
   :zephyr-app: samples/basic/disco
   :board: nucleo_f401re
   :goals: build
   :compact:

reel Board
==========

.. zephyr-app-commands::
   :zephyr-app: samples/basic/disco
   :board: reel_board
   :goals: build
   :compact: