samples: button: convert to rst and expand documentation

Change-Id: I8839d565325659ec1c00c9eb513a4dfa29cd6e2d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
diff --git a/samples/basic/button/README.rst b/samples/basic/button/README.rst
new file mode 100644
index 0000000..8ee6c87
--- /dev/null
+++ b/samples/basic/button/README.rst
@@ -0,0 +1,51 @@
+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
+- cc3200_launchxl
+- frdm_k64f
+- nrf51_pca10028
+- nrf52840_pca10056
+- nrf52_pca10040
+- nucleo_f103rb
+- quark_d2000_crb
+- 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
+
+   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.
diff --git a/samples/basic/button/README.txt b/samples/basic/button/README.txt
deleted file mode 100644
index e2e9e74..0000000
--- a/samples/basic/button/README.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-Title: Button demo
-
-Description:
-
-A simple button demo showcasing the use of GPIO input with interrupts.
-
-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
-
-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.
-
---------------------------------------------------------------------------------
-
-Building and Running Project:
-
-It can be built for a nucleo_f103rb board as follows:
-
-    make
-
-The code may need adaption before running the code on another board.
-
---------------------------------------------------------------------------------
-
-Troubleshooting:
-
-Problems caused by out-dated project information can be addressed by
-issuing one of the following commands then rebuilding the project:
-
-    make clean          # discard results of previous builds
-                        # but keep existing configuration info
-or
-    make pristine       # discard results of previous builds
-                        # and restore pre-defined configuration info
-
---------------------------------------------------------------------------------