Text menu driven ANSI/VT100 console test utility for LoRa transceivers

radio chip selection

Radio chip driver is not included, allowing choice of radio device.
If you're using SX1272 or SX1276, then import sx127x driver into your program.
if you're using SX1261 or SX1262, then import sx126x driver into your program.
if you're using SX1280, then import sx1280 driver into your program.
if you're using LR1110, then import LR1110 driver into your program.
If you're using NAmote72 or Murata discovery, then you must import only sx127x driver.
If you're using Type1SJ select target DISCO_L072CZ_LRWAN1 and import sx126x driver into your program.

This is VT100 text-based menu driven test program for SX12xx transceiver devices.
Serial console is divided into horizontally into top half and bottom half.
The bottom half serves as scrolling area to log activity.
The top half serves as menu, to configure the radio.
For all devices, the serial console operates at 115200 8N1, and requires terminal with ANSI-VT100 capability, such as putty/teraterm/minicom etc.
Use program only with keyboard up/down/left/right keys. Enter to change an item, or number for value item. Some items are single bit, requiring only enter key to toggle. Others with fixed choices give a drop-down menu.

Revision:
3:56fc764dee0a
Parent:
2:ea9245bb1c53
Child:
4:fa31fdf4ec8d
--- a/radio_sx128x_private.h	Wed Aug 22 09:50:32 2018 -0700
+++ b/radio_sx128x_private.h	Thu Nov 01 13:02:38 2018 -0700
@@ -5,6 +5,7 @@
 
         static const menu_t gfsk_menu[];
         static const menu_t flrc_menu[];
+        static const menu_t rng_menu[];
 
         static void rxDone(uint8_t size, const pktStatus_t*);
 
@@ -29,6 +30,51 @@
 
         /*************************************************/
 
+        static bool rng_role_read(void);
+        static bool rng_role_push(void);
+        static const toggle_item_t rng_role_item;
+
+        static bool tmp;
+
+        static void rng_id_send_print(void);
+        static bool rng_id_send_write(const char*);
+        static const value_item_t rng_id_send_item;
+
+        static void rng_slave_id_print(void);
+        static bool rng_slave_id_write(const char*);
+        static const value_item_t rng_slave_id_item;
+
+        static unsigned rng_idLength_read(bool);
+        static menuMode_e rng_idLength_write(unsigned sidx);
+        static const dropdown_item_t rng_idLength_item;
+
+        static void rng_delay_print(void);
+        static bool rng_delay_write(const char*);
+        static const value_item_t rng_delay_item;
+
+        static void rngTx(void);
+
+        static unsigned rng_resultMux_read(bool);
+        static menuMode_e rng_resultMux_write(unsigned sidx);
+        static const dropdown_item_t rng_resultMux_item;
+
+        static void rng_wndFltSize_print(void);
+        static bool rng_wndFltSize_write(const char*);
+        static const value_item_t rng_wndFltSize_item;
+
+        static void rng_rngRssiThresh_print(void);
+        static bool rng_rngRssiThresh_write(const char*);
+        static const value_item_t rng_rngRssiThresh_item;
+
+        static LoRaPktPar0_t LoRaPktPar0;
+        static const float bwMHzs[];
+
+        static const uint16_t rngDelays[3][6];
+        static void rngUpdateDelayCal(void);
+        static bool manualRngDelay;
+
+        /*************************************************/
+
         static void modindex_print(void);
         static bool modindex_write(const char*);
         static const value_item_t gfsk_modindex_item;
@@ -106,6 +152,11 @@
         static bool lora_iqinv_push(void);
         static const toggle_item_t lora_iqinv_item;
 
+        static void lora_ppg_print(void);
+        static bool lora_ppg_write(const char*);
+        static const value_item_t lora_ppg_item;
+        static uint16_t ppg;
+
         static unsigned flrc_cr_read(bool);
         static menuMode_e flrc_cr_write(unsigned sidx);
         static const dropdown_item_t flrc_cr_item;