From 87d322cc9ea4a9c8bac6e272248ac638c31cc100 Mon Sep 17 00:00:00 2001
From: Alexandre Abadie <alexandre.abadie@inria.fr>
Date: Sun, 25 Feb 2018 14:22:30 +0100
Subject: [PATCH] pkg/semtech-loramac: improve package documentation

---
 pkg/semtech-loramac/doc.txt | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/pkg/semtech-loramac/doc.txt b/pkg/semtech-loramac/doc.txt
index 85e5bf14d4..b3719dd0dd 100644
--- a/pkg/semtech-loramac/doc.txt
+++ b/pkg/semtech-loramac/doc.txt
@@ -53,14 +53,14 @@
  *     sx127x_t sx127x;  /* SX1272/6 device descriptor */
  *     /* define the required keys for OTAA, e.g over-the-air activation (the
  *        null arrays need to be updated with valid LoRa values) */
- *     static uint8_t deveui[LORAMAC_DEVEUI_LEN] = { 0x00, 0x00, 0x00, 0x00, \
- *                                                   0x00, 0x00, 0x00, 0x00 }
- *     static uint8_t appeui[LORAMAC_APPEUI_LEN] = { 0x00, 0x00, 0x00, 0x00, \
- *                                                   0x00, 0x00, 0x00, 0x00 }
- *     static uint8_t appeui[LORAMAC_APPKEY_LEN] = { 0x00, 0x00, 0x00, 0x00, \
- *                                                   0x00, 0x00, 0x00, 0x00, \
- *                                                   0x00, 0x00, 0x00, 0x00, \
- *                                                   0x00, 0x00, 0x00, 0x00 }
+ *     static const uint8_t deveui[LORAMAC_DEVEUI_LEN] = { 0x00, 0x00, 0x00, 0x00, \
+ *                                                         0x00, 0x00, 0x00, 0x00 };
+ *     static const uint8_t appeui[LORAMAC_APPEUI_LEN] = { 0x00, 0x00, 0x00, 0x00, \
+ *                                                         0x00, 0x00, 0x00, 0x00 };
+ *     static const uint8_t appkey[LORAMAC_APPKEY_LEN] = { 0x00, 0x00, 0x00, 0x00, \
+ *                                                         0x00, 0x00, 0x00, 0x00, \
+ *                                                         0x00, 0x00, 0x00, 0x00, \
+ *                                                         0x00, 0x00, 0x00, 0x00 };
  * ```
  *
  * Now in the `main` function:
@@ -92,9 +92,10 @@
  *
  *     /* 5. send some data using confirmable mode on port 10 and assuming no
  *           data is received */
+ *     char *message = "This is RIOT";
  *     semtech_loramac_rx_data_t rx_data;
  *     semtech_loramac_send(LORAMAC_TX_CNF, 10,
-                            (uint8_t *)"This is RIOT", 13, &rx_data);
+                            (uint8_t *)message, strlen(message), &rx_data);
  * }
  * ```
  *
-- 
GitLab