From ed75f0a2c5e39a87d64d7c8b5c3631f2b76dae6e Mon Sep 17 00:00:00 2001
From: Alexandre Abadie <alexandre.abadie@inria.fr>
Date: Sun, 2 Dec 2018 17:38:17 +0100
Subject: [PATCH] usb-kw41z: improve doc and sort module dependencies

---
 boards/usb-kw41z/Makefile.dep |  2 +-
 boards/usb-kw41z/doc.txt      | 41 ++++++++++++++++++++++++++++++++---
 2 files changed, 39 insertions(+), 4 deletions(-)

diff --git a/boards/usb-kw41z/Makefile.dep b/boards/usb-kw41z/Makefile.dep
index a73981801a..72bad09a72 100644
--- a/boards/usb-kw41z/Makefile.dep
+++ b/boards/usb-kw41z/Makefile.dep
@@ -1,6 +1,6 @@
 ifneq (,$(filter saul_default,$(USEMODULE)))
-  USEMODULE += saul_gpio
   USEMODULE += saul_adc
+  USEMODULE += saul_gpio
 endif
 
 include $(RIOTCPU)/kinetis/Makefile.dep
diff --git a/boards/usb-kw41z/doc.txt b/boards/usb-kw41z/doc.txt
index dc8b28d0cb..063303aebf 100644
--- a/boards/usb-kw41z/doc.txt
+++ b/boards/usb-kw41z/doc.txt
@@ -1,5 +1,40 @@
 /**
- * @defgroup    boards_usb-kw41z NXP USB-KW41Z Board
- * @ingroup     boards
- * @brief       Support for the USB-KW41Z
+@defgroup    boards_usb-kw41z NXP USB-KW41Z Board
+@ingroup     boards
+@brief       Support for the USB-KW41Z
+
+### Overview
+
+The [NXP USB-KW41Z][board-web-page] board a development platform with a
+convenient USB dongle form factor.
+
+The USB-KW41Z provides a radio device with Bluetooth Low Energy and/or IEEE
+802.15.4.
+
+
+<img src="https://www.nxp.com/assets/images/en/block-diagrams/USB-KW41Z-GHOSTED.jpg"
+     alt="USB-KW41Z" style="height:800px;"/>
+
+[board-web-page]: https://www.nxp.com/products/wireless/bluetooth-low-energy-ble/bluetooth-low-energy-ieee-802.15.4-packet-sniffer-usb-dongle:USB-KW41Z
+
+
+### Flash the board
+
+To flash the board using OpenOCD, it needs to be changed from the factory
+programmed sniffer application to an OpenSDA application used for flashing and
+debugging.
+
+1. Follow the [Quick Start Guide at NXP.com][[quick-start-guide]]:
+  - click on "2. Get Software" -> "Choose a Development Path: USB-KW41Z Development Platform"
+  - scroll down to "2.3 Load Segger JLink OpenSDA App"
+  - follow the instructions
+
+2. Use `BOARD=usb-kw41z` with the `make` command.<br/>
+   Example with `hello-world` application:
+```
+     make BOARD=usb-kw41z -C examples/hello-world flash term
+```
+
+[quick-start-guide]: https://www.nxp.com/products/wireless/bluetooth-low-energy-ble/bluetooth-low-energy-ieee-802.15.4-packet-sniffer-usb-dongle:USB-KW41Z?&tab=In-Depth_Tab&tid=van/usb-kw41z/startnow
+
  */
-- 
GitLab