zephyr/samples/basic/button
Gil Pitney 4f67a6c76d cc3200: Remove TI cc3200 SOC and LaunchXL board support
Per ZEP-1958, Phase 2 of adding CC3220sf LaunchXL support,
was to "deprecate the CC3200 launchxl support in Zephyr
(redundant to the CC3220)."

Effectively, the CC3220 SOC replaces the CC3200.

This patch removes the following:
* the imported CC3200 SDK
* CC3200 SOC, board, DTS files.
* adjusts other files where cc3200 was mentioned.

Also, it fixes explicit references to CC3200 in generic
CC32xx driver files.

Jira: ZEP-1958

Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
2017-08-15 11:02:48 -05:00
..
src samples: convert to using newly introduced integer sized types 2017-04-21 09:53:53 -05:00
Makefile
README.rst cc3200: Remove TI cc3200 SOC and LaunchXL board support 2017-08-15 11:02:48 -05:00
prj.conf
sample.yaml tests: samples: convert testcase files to yaml 2017-06-21 20:56:53 -04:00

README.rst

.. _button-sample:

Button demo
###########

Overview
********

A simple button demo showcasing the use of GPIO input with interrupts.

Requirements
************

The demo assumes that a push button is connected to one of GPIO lines. The
sample code is configured to work on boards with user defined buttons and that
have defined the SW0_* variable in board.h

To use this sample, you will require a board that defines the user switch in its
header file. The :file:`board.h` must define the following variables:

- SW0_GPIO_NAME
- SW0_GPIO_PIN

The following boards currently define the above variables:

- bbc_microbit
- cc3220sf_launchxl
- frdm_k64f
- nrf51_pca10028
- nrf52840_pca10056
- nrf52_pca10040
- nucleo_f103rb
- :ref:`quark_d2000_devboard`
- quark_se_c1000_devboard
- quark_se_c1000_ss_devboard


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

This sample can be built for multiple boards, in this example we will build it
for the nucleo_f103rb board:

.. code-block:: console

   $ cd samples/basic/button
   $ make BOARD=nucleo_f103rb


After startup, the program looks up a predefined GPIO device, and configures the
pin in input mode, enabling interrupt generation on falling edge. During each
iteration of the main loop, the state of GPIO line is monitored and printed to
the serial console. When the input button gets pressed, the interrupt handler
will print an information about this event along with its timestamp.