1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2025-07-28 09:53:45 +02:00

Add <D HAL SHOW> command to list HAL device configuration.

Also, only display HAL device configurations at startup if DIAG_IO is #defined.
This commit is contained in:
Neil McKechnie
2021-08-27 15:44:26 +01:00
parent 7e601c38c4
commit 93dfdcce53
5 changed files with 27 additions and 11 deletions

View File

@@ -68,6 +68,8 @@ const int16_t HASH_KEYWORD_VPIN=-415;
const int16_t HASH_KEYWORD_C=67;
const int16_t HASH_KEYWORD_T=84;
const int16_t HASH_KEYWORD_LCN = 15137;
const int16_t HASH_KEYWORD_HAL = 10853;
const int16_t HASH_KEYWORD_SHOW = -21309;
#ifdef HAS_ENOUGH_MEMORY
const int16_t HASH_KEYWORD_WIFI = -5583;
const int16_t HASH_KEYWORD_ETHERNET = -30767;
@@ -874,6 +876,13 @@ bool DCCEXParser::parseD(Print *stream, int16_t params, int16_t p[])
IODevice::writeAnalogue(p[1], p[2], params>3 ? p[3] : 0);
break;
#if !defined(IO_MINIMAL_HAL)
case HASH_KEYWORD_HAL:
if (p[1] == HASH_KEYWORD_SHOW)
IODevice::DumpAll();
break;
#endif
default: // invalid/unknown
break;
}