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
This commit is contained in:
Harald Welte 2019-12-14 20:58:36 +01:00
parent a14616c096
commit f620c3978c
1 changed files with 4 additions and 0 deletions

View File

@ -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");