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.

Committer:
Wayne Roberts
Date:
Mon Aug 20 18:13:09 2018 -0700
Revision:
1:0817a150122b
Child:
2:ea9245bb1c53
add source files

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Wayne Roberts 1:0817a150122b 1 static uint8_t pktType;
Wayne Roberts 1:0817a150122b 2
Wayne Roberts 1:0817a150122b 3 static void chipModeChange(void);
Wayne Roberts 1:0817a150122b 4
Wayne Roberts 1:0817a150122b 5 static const menu_t gfsk_menu[];
Wayne Roberts 1:0817a150122b 6 static const menu_t flrc_menu[];
Wayne Roberts 1:0817a150122b 7
Wayne Roberts 1:0817a150122b 8 static void rxDone(uint8_t size, const pktStatus_t*);
Wayne Roberts 1:0817a150122b 9
Wayne Roberts 1:0817a150122b 10 static unsigned lora_bw_read(bool);
Wayne Roberts 1:0817a150122b 11 static menuMode_e lora_bw_write(unsigned sidx);
Wayne Roberts 1:0817a150122b 12 static const dropdown_item_t lora_bw_item;
Wayne Roberts 1:0817a150122b 13
Wayne Roberts 1:0817a150122b 14 static unsigned lora_cr_read_cb(bool);
Wayne Roberts 1:0817a150122b 15 static menuMode_e lora_cr_write_cb(unsigned sidx);
Wayne Roberts 1:0817a150122b 16 static const dropdown_item_t lora_cr_item;
Wayne Roberts 1:0817a150122b 17
Wayne Roberts 1:0817a150122b 18 static void modindex_print(void);
Wayne Roberts 1:0817a150122b 19 static bool modindex_write(const char*);
Wayne Roberts 1:0817a150122b 20 static const value_item_t gfsk_modindex_item;
Wayne Roberts 1:0817a150122b 21
Wayne Roberts 1:0817a150122b 22 static void lora_sf_print(void);
Wayne Roberts 1:0817a150122b 23 static bool lora_sf_write(const char*);
Wayne Roberts 1:0817a150122b 24 static const value_item_t lora_sf_item;
Wayne Roberts 1:0817a150122b 25
Wayne Roberts 1:0817a150122b 26 static unsigned gfsk_flrc_bt_read_cb(bool);
Wayne Roberts 1:0817a150122b 27 static menuMode_e gfsk_flrc_bt_write_cb(unsigned sidx);
Wayne Roberts 1:0817a150122b 28 static const dropdown_item_t gfsk_flrc_bt_item;
Wayne Roberts 1:0817a150122b 29
Wayne Roberts 1:0817a150122b 30 static unsigned gfsk_flrc_pl_read_cb(bool);
Wayne Roberts 1:0817a150122b 31 static menuMode_e gfsk_flrc_pl_write_cb(unsigned sidx);
Wayne Roberts 1:0817a150122b 32 static const dropdown_item_t gfsk_flrc_preamble_item;
Wayne Roberts 1:0817a150122b 33
Wayne Roberts 1:0817a150122b 34 static unsigned gfsk_flrc_bpsbw_read_cb(bool);
Wayne Roberts 1:0817a150122b 35 static menuMode_e gfsk_flrc_bpsbw_write_cb(unsigned sidx);
Wayne Roberts 1:0817a150122b 36 static const dropdown_item_t flrc_bitrate_item;
Wayne Roberts 1:0817a150122b 37 static const dropdown_item_t gfsk_bitrate_item;
Wayne Roberts 1:0817a150122b 38
Wayne Roberts 1:0817a150122b 39 static unsigned gfsk_synclen_read_cb(bool);
Wayne Roberts 1:0817a150122b 40 static menuMode_e gfsk_synclen_write_cb(unsigned sidx);
Wayne Roberts 1:0817a150122b 41 static const dropdown_item_t gfsk_synclen_item;
Wayne Roberts 1:0817a150122b 42
Wayne Roberts 1:0817a150122b 43 static bool gfsk_flrc_fixvar_read(void);
Wayne Roberts 1:0817a150122b 44 static bool gfsk_flrc_fixvar_push(void);
Wayne Roberts 1:0817a150122b 45 static const toggle_item_t gfsk_flrc_fixvar_item;
Wayne Roberts 1:0817a150122b 46
Wayne Roberts 1:0817a150122b 47 static unsigned gfsk_flrc_crclen_read_cb(bool);
Wayne Roberts 1:0817a150122b 48 static menuMode_e gfsk_flrc_crclen_write_cb (unsigned sidx);
Wayne Roberts 1:0817a150122b 49 static const dropdown_item_t gfsk_flrc_crclen_item;
Wayne Roberts 1:0817a150122b 50
Wayne Roberts 1:0817a150122b 51 static bool gfsk_flrc_whit_read(void);
Wayne Roberts 1:0817a150122b 52 static bool gfsk_flrc_whit_push(void);
Wayne Roberts 1:0817a150122b 53 static const toggle_item_t gfsk_flrc_whit_item;
Wayne Roberts 1:0817a150122b 54
Wayne Roberts 1:0817a150122b 55 static void gfsk_flrc_crcinit_print(void);
Wayne Roberts 1:0817a150122b 56 static bool gfsk_flrc_crcinit_write (const char*);
Wayne Roberts 1:0817a150122b 57 static const value_item_t gfsk_flrc_crcinit_item;
Wayne Roberts 1:0817a150122b 58
Wayne Roberts 1:0817a150122b 59 static void gfsk_flrc_crcpoly_print(void);
Wayne Roberts 1:0817a150122b 60 static bool gfsk_flrc_crcpoly_write(const char*);
Wayne Roberts 1:0817a150122b 61 static const value_item_t gfsk_flrc_crcpoly_item;
Wayne Roberts 1:0817a150122b 62
Wayne Roberts 1:0817a150122b 63 static bool gfsk_flrc_sync1en_read(void);
Wayne Roberts 1:0817a150122b 64 static bool gfsk_flrc_sync2en_read(void);
Wayne Roberts 1:0817a150122b 65 static bool gfsk_flrc_sync3en_read(void);
Wayne Roberts 1:0817a150122b 66 static bool gfsk_flrc_sync1en_push(void);
Wayne Roberts 1:0817a150122b 67 static bool gfsk_flrc_sync2en_push(void);
Wayne Roberts 1:0817a150122b 68 static bool gfsk_flrc_sync3en_push(void);
Wayne Roberts 1:0817a150122b 69 static const toggle_item_t gfsk_flrc_sync1en_item;
Wayne Roberts 1:0817a150122b 70 static const toggle_item_t gfsk_flrc_sync2en_item;
Wayne Roberts 1:0817a150122b 71 static const toggle_item_t gfsk_flrc_sync3en_item;
Wayne Roberts 1:0817a150122b 72
Wayne Roberts 1:0817a150122b 73 static void gfsk_flrc_sync1_print(void);
Wayne Roberts 1:0817a150122b 74 static void gfsk_flrc_sync2_print(void);
Wayne Roberts 1:0817a150122b 75 static void gfsk_flrc_sync3_print(void);
Wayne Roberts 1:0817a150122b 76 static bool gfsk_flrc_sync1_write(const char*);
Wayne Roberts 1:0817a150122b 77 static bool gfsk_flrc_sync2_write(const char*);
Wayne Roberts 1:0817a150122b 78 static bool gfsk_flrc_sync3_write(const char*);
Wayne Roberts 1:0817a150122b 79 static const value_item_t gfsk_flrc_sync1_item;
Wayne Roberts 1:0817a150122b 80 static const value_item_t gfsk_flrc_sync2_item;
Wayne Roberts 1:0817a150122b 81 static const value_item_t gfsk_flrc_sync3_item;
Wayne Roberts 1:0817a150122b 82
Wayne Roberts 1:0817a150122b 83 static void lora_pblLen_print(void);
Wayne Roberts 1:0817a150122b 84 static bool lora_pblLen_write(const char*);
Wayne Roberts 1:0817a150122b 85 static const value_item_t lora_pblLen_item;
Wayne Roberts 1:0817a150122b 86
Wayne Roberts 1:0817a150122b 87 static bool lora_fixlen_read(void);
Wayne Roberts 1:0817a150122b 88 static bool lora_fixlen_push(void);
Wayne Roberts 1:0817a150122b 89 static const toggle_item_t lora_fixlen_item;
Wayne Roberts 1:0817a150122b 90
Wayne Roberts 1:0817a150122b 91 static bool lora_crcon_read(void);
Wayne Roberts 1:0817a150122b 92 static bool lora_crcon_push(void);
Wayne Roberts 1:0817a150122b 93 static const toggle_item_t lora_crcon_item;
Wayne Roberts 1:0817a150122b 94
Wayne Roberts 1:0817a150122b 95 static bool lora_iqinv_read(void);
Wayne Roberts 1:0817a150122b 96 static bool lora_iqinv_push(void);
Wayne Roberts 1:0817a150122b 97 static const toggle_item_t lora_iqinv_item;
Wayne Roberts 1:0817a150122b 98
Wayne Roberts 1:0817a150122b 99 static unsigned flrc_cr_read_cb(bool);
Wayne Roberts 1:0817a150122b 100 static menuMode_e flrc_cr_write_cb(unsigned sidx);
Wayne Roberts 1:0817a150122b 101 static const dropdown_item_t flrc_cr_item;
Wayne Roberts 1:0817a150122b 102
Wayne Roberts 1:0817a150122b 103 static unsigned flrc_synclen_read_cb(bool);
Wayne Roberts 1:0817a150122b 104 static menuMode_e flrc_synclen_write_cb(unsigned sidx);
Wayne Roberts 1:0817a150122b 105 static const dropdown_item_t flrc_synclen_item;