aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2019-12-14 20:58:36 +0100
committerHarald Welte <laforge@osmocom.org>2019-12-14 23:07:04 +0100
commitf620c3978c000ad08b0a25dbac767d97241dc69d (patch)
treee093937d11703013f0d399d28bab0f5d88b93f23
parenta14616c0963d9c03a0c612676de147b2526e297e (diff)
qmod: Don't print EEPROM operations in help when not supported
As of Change-Id I1c8cca2f7f0f0070d7bf1ade676e035c45e4d5ab, a firmware compiled without ALLOW_PEER_ERASE will not support resetting the hub or writing to its EEPROM. Let's make sure to remove those options also from the menu. Change-Id: I3071332d85e6168947384ddc230298d3293e4668
-rw-r--r--firmware/libboard/qmod/source/board_qmod.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/libboard/qmod/source/board_qmod.c b/firmware/libboard/qmod/source/board_qmod.c
index 0b03180..900a3bc 100644
--- a/firmware/libboard/qmod/source/board_qmod.c
+++ b/firmware/libboard/qmod/source/board_qmod.c
@@ -205,13 +205,17 @@ void board_exec_dbg_cmd(int ch)
printf("\tg\tswitch off LED 2\n\r");
printf("\tG\tswitch off LED 2\n\r");
if (qmod_sam3_is_12()) {
+#if (ALLOW_PEER_ERASE > 0)
printf("\tE\tprogram EEPROM\n\r");
printf("\te\tErase EEPROM\n\r");
+#endif
printf("\tO\tEnable PRTPWR_OVERRIDE\n\r");
printf("\to\tDisable PRTPWR_OVERRIDE\n\r");
+#if (ALLOW_PEER_ERASE > 0)
printf("\tH\tRelease HUB RESET (high)\n\r");
printf("\th\tAssert HUB RESET (low)\n\r");
printf("\tw\tWrite single byte in EEPROM\n\r");
+#endif
printf("\tr\tRead single byte from EEPROM\n\r");
}
printf("\tX\tRelease peer SAM3 from reset\n\r");