Test program running on MAX32625MBED. Control through USB Serial commands using a terminal emulator such as teraterm or putty.
Dependencies: MaximTinyTester CmdLine MAX541 USBDevice
Diff: Test_Menu_MAX11043.cpp
- Revision:
- 90:d6ed8a8c5f26
- Parent:
- 89:20fd6ce5e4dd
- Child:
- 91:9e78c6194d6e
--- a/Test_Menu_MAX11043.cpp Fri Feb 28 07:59:58 2020 +0000 +++ b/Test_Menu_MAX11043.cpp Fri Feb 28 23:46:49 2020 +0000 @@ -457,7 +457,7 @@ // CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11043_device.status shadow of argname = status // CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11043_device.status argname = status // CODE GENERATOR: testMenuGlobalArgsDict['status']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['status']['argtype'] = 'uint32_t' +// CODE GENERATOR: testMenuGlobalArgsDict['status']['argtype'] = 'uint8_t' // CODE GENERATOR: testMenuGlobalArgsDict['status']['usedByCommandName'] = 'None' // CODE GENERATOR: testMenuGlobalArgsDict['status']['usedBytestMenuItemName'] = 'None' @@ -465,7 +465,7 @@ // CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11043_device.adca shadow of argname = ADCa // CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11043_device.adca argname = ADCa // CODE GENERATOR: testMenuGlobalArgsDict['ADCa']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['ADCa']['argtype'] = 'uint32_t' +// CODE GENERATOR: testMenuGlobalArgsDict['ADCa']['argtype'] = 'int' // CODE GENERATOR: testMenuGlobalArgsDict['ADCa']['usedByCommandName'] = 'None' // CODE GENERATOR: testMenuGlobalArgsDict['ADCa']['usedBytestMenuItemName'] = 'None' @@ -473,7 +473,7 @@ // CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11043_device.adcb shadow of argname = ADCb // CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11043_device.adcb argname = ADCb // CODE GENERATOR: testMenuGlobalArgsDict['ADCb']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['ADCb']['argtype'] = 'uint32_t' +// CODE GENERATOR: testMenuGlobalArgsDict['ADCb']['argtype'] = 'int' // CODE GENERATOR: testMenuGlobalArgsDict['ADCb']['usedByCommandName'] = 'None' // CODE GENERATOR: testMenuGlobalArgsDict['ADCb']['usedBytestMenuItemName'] = 'None' @@ -481,7 +481,7 @@ // CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11043_device.adcc shadow of argname = ADCc // CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11043_device.adcc argname = ADCc // CODE GENERATOR: testMenuGlobalArgsDict['ADCc']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['ADCc']['argtype'] = 'uint32_t' +// CODE GENERATOR: testMenuGlobalArgsDict['ADCc']['argtype'] = 'int' // CODE GENERATOR: testMenuGlobalArgsDict['ADCc']['usedByCommandName'] = 'None' // CODE GENERATOR: testMenuGlobalArgsDict['ADCc']['usedBytestMenuItemName'] = 'None' @@ -489,7 +489,7 @@ // CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11043_device.adcd shadow of argname = ADCd // CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11043_device.adcd argname = ADCd // CODE GENERATOR: testMenuGlobalArgsDict['ADCd']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['ADCd']['argtype'] = 'uint32_t' +// CODE GENERATOR: testMenuGlobalArgsDict['ADCd']['argtype'] = 'int' // CODE GENERATOR: testMenuGlobalArgsDict['ADCd']['usedByCommandName'] = 'None' // CODE GENERATOR: testMenuGlobalArgsDict['ADCd']['usedBytestMenuItemName'] = 'None' @@ -619,48 +619,49 @@ // CODE GENERATOR: testMenuGlobalArgsDict Consolidate common/global argument parsing // CODE GENERATOR: testMenuGlobalArgsDict['ADCa']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['ADCa']['argtype'] = 'uint32_t' +// CODE GENERATOR: testMenuGlobalArgsDict['ADCa']['argtype'] = 'int' // CODE GENERATOR: testMenuGlobalArgsDict['ADCa']['usedByCommandName'] = 'None' // CODE GENERATOR: testMenuGlobalArgsDict['ADCa']['usedBytestMenuItemName'] = 'None' - // parse argument uint32_t ADCa - uint32_t ADCa = 0; // ~~~ g_MAX11043_device.__WARNING_no_match_for_argname_ADCa_in_MAX11043_device_t__; // default to global property value - if (cmdLine.parse_uint32_dec("ADCa", ADCa)) - { + // parse argument int ADCa + //int ADCa = 0; // ~~~ g_MAX11043_device.__WARNING_no_match_for_argname_ADCa_in_MAX11043_device_t__; // default to global property value + //if (cmdLine.parse_int16_dec("ADCa", ADCa)) + // [Error] Test_Menu_MAX11043.cpp@627,49: invalid initialization of non-const reference of type 'int16_t& {aka short int&}' from an rvalue of type 'int16_t {aka short int}' + //{ // g_MAX11043_device.__WARNING_no_match_for_argname_ADCa_in_MAX11043_device_t__ = ADCa; // update global property value - } + //} // CODE GENERATOR: testMenuGlobalArgsDict['ADCb']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['ADCb']['argtype'] = 'uint32_t' +// CODE GENERATOR: testMenuGlobalArgsDict['ADCb']['argtype'] = 'int' // CODE GENERATOR: testMenuGlobalArgsDict['ADCb']['usedByCommandName'] = 'None' // CODE GENERATOR: testMenuGlobalArgsDict['ADCb']['usedBytestMenuItemName'] = 'None' - // parse argument uint32_t ADCb - uint32_t ADCb = 0; // ~~~ g_MAX11043_device.__WARNING_no_match_for_argname_ADCb_in_MAX11043_device_t__; // default to global property value - if (cmdLine.parse_uint32_dec("ADCb", ADCb)) - { - // g_MAX11043_device.__WARNING_no_match_for_argname_ADCb_in_MAX11043_device_t__ = ADCb; // update global property value - } + // parse argument int ADCb + //int ADCb = 0; // ~~~ g_MAX11043_device.__WARNING_no_match_for_argname_ADCb_in_MAX11043_device_t__; // default to global property value + //if (cmdLine.parse_int16_dec("ADCb", ADCb)) + //{ + // // g_MAX11043_device.__WARNING_no_match_for_argname_ADCb_in_MAX11043_device_t__ = ADCb; // update global property value + //} // CODE GENERATOR: testMenuGlobalArgsDict['ADCc']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['ADCc']['argtype'] = 'uint32_t' +// CODE GENERATOR: testMenuGlobalArgsDict['ADCc']['argtype'] = 'int' // CODE GENERATOR: testMenuGlobalArgsDict['ADCc']['usedByCommandName'] = 'None' // CODE GENERATOR: testMenuGlobalArgsDict['ADCc']['usedBytestMenuItemName'] = 'None' - // parse argument uint32_t ADCc - uint32_t ADCc = 0; // ~~~ g_MAX11043_device.__WARNING_no_match_for_argname_ADCc_in_MAX11043_device_t__; // default to global property value - if (cmdLine.parse_uint32_dec("ADCc", ADCc)) - { - // g_MAX11043_device.__WARNING_no_match_for_argname_ADCc_in_MAX11043_device_t__ = ADCc; // update global property value - } + // parse argument int ADCc + //int ADCc = 0; // ~~~ g_MAX11043_device.__WARNING_no_match_for_argname_ADCc_in_MAX11043_device_t__; // default to global property value + //if (cmdLine.parse_int16_dec("ADCc", ADCc)) + //{ + // // g_MAX11043_device.__WARNING_no_match_for_argname_ADCc_in_MAX11043_device_t__ = ADCc; // update global property value + //} // CODE GENERATOR: testMenuGlobalArgsDict['ADCd']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['ADCd']['argtype'] = 'uint32_t' +// CODE GENERATOR: testMenuGlobalArgsDict['ADCd']['argtype'] = 'int' // CODE GENERATOR: testMenuGlobalArgsDict['ADCd']['usedByCommandName'] = 'None' // CODE GENERATOR: testMenuGlobalArgsDict['ADCd']['usedBytestMenuItemName'] = 'None' - // parse argument uint32_t ADCd - uint32_t ADCd = 0; // ~~~ g_MAX11043_device.__WARNING_no_match_for_argname_ADCd_in_MAX11043_device_t__; // default to global property value - if (cmdLine.parse_uint32_dec("ADCd", ADCd)) - { - // g_MAX11043_device.__WARNING_no_match_for_argname_ADCd_in_MAX11043_device_t__ = ADCd; // update global property value - } + // parse argument int ADCd + //int ADCd = 0; // ~~~ g_MAX11043_device.__WARNING_no_match_for_argname_ADCd_in_MAX11043_device_t__; // default to global property value + //if (cmdLine.parse_int16_dec("ADCd", ADCd)) + //{ + // // g_MAX11043_device.__WARNING_no_match_for_argname_ADCd_in_MAX11043_device_t__ = ADCd; // update global property value + //} // CODE GENERATOR: testMenuGlobalArgsDict['VRef']['alias'] = 'None' // CODE GENERATOR: testMenuGlobalArgsDict['VRef']['argtype'] = 'double' @@ -685,12 +686,12 @@ } // CODE GENERATOR: testMenuGlobalArgsDict['status']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['status']['argtype'] = 'uint32_t' +// CODE GENERATOR: testMenuGlobalArgsDict['status']['argtype'] = 'uint8_t' // CODE GENERATOR: testMenuGlobalArgsDict['status']['usedByCommandName'] = 'None' // CODE GENERATOR: testMenuGlobalArgsDict['status']['usedBytestMenuItemName'] = 'None' - // parse argument uint32_t status - uint32_t status = g_MAX11043_device.status; // default to global property value - if (cmdLine.parse_uint32_dec("status", status)) + // parse argument uint8_t status + uint8_t status = g_MAX11043_device.status; // default to global property value + if (cmdLine.parse_uint8_dec("status", status)) { g_MAX11043_device.status = status; // update global property value } @@ -951,19 +952,19 @@ // CODE GENERATOR: @ command print uint16_t g_MAX11043_device.config cmdLine.serial().printf("config = "); cmdLine.serial().printf("%d = 0x%4.4x\r\n", g_MAX11043_device.config, g_MAX11043_device.config); -// CODE GENERATOR: @ command print uint32_t g_MAX11043_device.status +// CODE GENERATOR: @ command print uint8_t g_MAX11043_device.status cmdLine.serial().printf("status = "); - cmdLine.serial().printf("%d = 0x%8.8x\r\n", g_MAX11043_device.status, g_MAX11043_device.status); -// CODE GENERATOR: @ command print uint32_t g_MAX11043_device.adca + cmdLine.serial().printf("%d = 0x%2.2x\r\n", g_MAX11043_device.status, g_MAX11043_device.status); +// CODE GENERATOR: @ command print int g_MAX11043_device.adca cmdLine.serial().printf("adca = "); cmdLine.serial().printf("%d = 0x%8.8x\r\n", g_MAX11043_device.adca, g_MAX11043_device.adca); -// CODE GENERATOR: @ command print uint32_t g_MAX11043_device.adcb +// CODE GENERATOR: @ command print int g_MAX11043_device.adcb cmdLine.serial().printf("adcb = "); cmdLine.serial().printf("%d = 0x%8.8x\r\n", g_MAX11043_device.adcb, g_MAX11043_device.adcb); -// CODE GENERATOR: @ command print uint32_t g_MAX11043_device.adcc +// CODE GENERATOR: @ command print int g_MAX11043_device.adcc cmdLine.serial().printf("adcc = "); cmdLine.serial().printf("%d = 0x%8.8x\r\n", g_MAX11043_device.adcc, g_MAX11043_device.adcc); -// CODE GENERATOR: @ command print uint32_t g_MAX11043_device.adcd +// CODE GENERATOR: @ command print int g_MAX11043_device.adcd cmdLine.serial().printf("adcd = "); cmdLine.serial().printf("%d = 0x%8.8x\r\n", g_MAX11043_device.adcd, g_MAX11043_device.adcd); return true; // command handled by MAX11043