From f620c3978c000ad08b0a25dbac767d97241dc69d Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sat, 14 Dec 2019 20:58:36 +0100 Subject: [PATCH] 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 --- firmware/libboard/qmod/source/board_qmod.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/firmware/libboard/qmod/source/board_qmod.c b/firmware/libboard/qmod/source/board_qmod.c index 0b03180f..900a3bc1 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");