Test program running on MAX32625MBED. Control through USB Serial commands using a terminal emulator such as teraterm or putty.
Dependencies: MaximTinyTester MAX11410 CmdLine USBDevice
Diff: Test_Menu_MAX11410.cpp
- Revision:
- 63:708490d6a29f
- Parent:
- 62:2fec85611ebe
- Child:
- 64:5e9555fda955
--- a/Test_Menu_MAX11410.cpp Tue Apr 07 05:32:28 2020 +0000 +++ b/Test_Menu_MAX11410.cpp Mon Apr 13 03:02:14 2020 +0000 @@ -95,17 +95,41 @@ // CODE GENERATOR: CommandPost '' // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure' // CODE GENERATOR: CommandDocTest '@test Init() expect 1' -// CODE GENERATOR: CommandDocTest '@test RegRead(MAX11410::CMD_r001_0001_xxxx_xxxx_xxxx_xxxx_xxxx_xddd_PART_ID, buffer) expect 1 expect-buffer 0x000F02' -// CODE GENERATOR: CommandDocTest '@test RegRead(MAX11410::CMD_r000_0100_dddd_xddd_GP0_CTRL, buffer) expect 1 expect-buffer 0x00' -// CODE GENERATOR: CommandDocTest '@test RegRead(MAX11410::CMD_r000_0101_dddd_xddd_GP1_CTRL, buffer) expect 1 expect-buffer 0x00' -// CODE GENERATOR: CommandDocTest '@test RegRead(MAX11410::CMD_r000_0111_xddd_dddd_GP_SEQ_ADDR, buffer) expect 1 expect-buffer 0x00003a' -// CODE GENERATOR: CommandDocTest '@test RegRead(MAX11410::CMD_r000_1000_x0dd_dddd_FILTER, buffer) expect 1 expect-buffer 0x00' -// CODE GENERATOR: CommandDocTest '@test RegRead(MAX11410::CMD_r000_1001_dddd_dddd_CTRL, buffer) expect 1 expect-buffer 0x000001' -// CODE GENERATOR: CommandDocTest '@test RegRead(MAX11410::CMD_r000_1010_dddd_dddd_SOURCE, buffer) expect 1 expect-buffer 0x00' -// CODE GENERATOR: CommandDocTest '@test RegRead(MAX11410::CMD_r000_1011_dddd_dddd_MUX_CTRL0, buffer) expect 1 expect-buffer 0x0000ff' -// CODE GENERATOR: CommandDocTest '@test RegRead(MAX11410::CMD_r000_1100_dddd_dddd_MUX_CTRL1, buffer) expect 1 expect-buffer 0x0000ff' -// CODE GENERATOR: CommandDocTest '@test RegRead(MAX11410::CMD_r000_1101_dddd_dddd_MUX_CTRL2, buffer) expect 1 expect-buffer 0x00' -// CODE GENERATOR: CommandDocTest '@test RegRead(MAX11410::CMD_r000_1110_xxdd_xddd_PGA, buffer) expect 1 expect-buffer 0x00' +// CODE GENERATOR: CommandDocTest '@test group POR // verify initial register values (enabled by default)' +// CODE GENERATOR: CommandDocTest '@test group POR RegRead(MAX11410::CMD_r001_0001_xxxx_xxxx_xxxx_xxxx_xxxx_xddd_PART_ID, buffer) expect 1 expect-buffer 0x000F02' +// CODE GENERATOR: CommandDocTest '@test group POR RegRead(MAX11410::CMD_r000_0100_dddd_xddd_GP0_CTRL, buffer) expect 1 expect-buffer 0x00' +// CODE GENERATOR: CommandDocTest '@test group POR RegRead(MAX11410::CMD_r000_0101_dddd_xddd_GP1_CTRL, buffer) expect 1 expect-buffer 0x00' +// CODE GENERATOR: CommandDocTest '@test group POR RegRead(MAX11410::CMD_r000_0111_xddd_dddd_GP_SEQ_ADDR, buffer) expect 1 expect-buffer 0x00003a' +// CODE GENERATOR: CommandDocTest '@test group POR RegRead(MAX11410::CMD_r000_1000_x0dd_dddd_FILTER, buffer) expect 1 expect-buffer 0x00' +// CODE GENERATOR: CommandDocTest '@test group POR RegRead(MAX11410::CMD_r000_1001_dddd_dddd_CTRL, buffer) expect 1 expect-buffer 0x000001' +// CODE GENERATOR: CommandDocTest '@test group POR RegRead(MAX11410::CMD_r000_1010_dddd_dddd_SOURCE, buffer) expect 1 expect-buffer 0x00' +// CODE GENERATOR: CommandDocTest '@test group POR RegRead(MAX11410::CMD_r000_1011_dddd_dddd_MUX_CTRL0, buffer) expect 1 expect-buffer 0x0000ff' +// CODE GENERATOR: CommandDocTest '@test group POR RegRead(MAX11410::CMD_r000_1100_dddd_dddd_MUX_CTRL1, buffer) expect 1 expect-buffer 0x0000ff' +// CODE GENERATOR: CommandDocTest '@test group POR RegRead(MAX11410::CMD_r000_1101_dddd_dddd_MUX_CTRL2, buffer) expect 1 expect-buffer 0x00' +// CODE GENERATOR: CommandDocTest '@test group POR RegRead(MAX11410::CMD_r000_1110_xxdd_xddd_PGA, buffer) expect 1 expect-buffer 0x00' +// CODE GENERATOR: CommandDocTest '@test group RES1KA0A1TOGND // measure a 1kohm resistor between (AIN0,AIN1) and AGND to verify ref2_v (disabled by default)' +// CODE GENERATOR: CommandDocTest '@test group RES1KA0A1TOGNDMORE // measure a 1kohm resistor between (AIN0,AIN1) and AGND to verify ref2_v in more detail' +// CODE GENERATOR: CommandDocTest '@test group RES1KA0A1TOGNDMORE tinyTester.print("measure a 1kohm resistor between (AIN0,AIN1) and AGND to verify ref2_v")' +// CODE GENERATOR: CommandDocTest '@test group RES1KA0A1TOGND tinyTester.settle_time_msec = 1000 // default 250' +// CODE GENERATOR: CommandDocTest '@test group RES1KA0A1TOGND RegWrite(0x0C, 0xF1) expect 1 // *mux_ctrl1=0xf1 drives current source from AIN1' +// CODE GENERATOR: CommandDocTest '@test group RES1KA0A1TOGNDMORE RegWrite(0x0A, 0x03) expect 1 // *source=0x03 idac_mode=100uA, 1k resistor 0.1V' +// CODE GENERATOR: CommandDocTest '@test group RES1KA0A1TOGNDMORE tinyTester.print("idac_mode=100uA, 1k resistor 0.1V")' +// CODE GENERATOR: CommandDocTest '@test group RES1KA0A1TOGNDMORE tinyTester.Wait_Output_Settling()' +// CODE GENERATOR: CommandDocTest '@test group RES1KA0A1TOGND_BAD Measure_Voltage(0,10) // TODO1 #175 MAX11410 Self Test why does Measure_Voltage(0,10) without expect cause an mbed hard fault?' +// CODE GENERATOR: CommandDocTest '@test group RES1KA0A1TOGNDMORE Measure_Voltage(0,10) expect 0.1' +// CODE GENERATOR: CommandDocTest '@test group RES1KA0A1TOGNDMORE AINcode[0] expect (uint32_t)337731 within 33773 // idac_mode=100uA, 1k resistor 0.1V' +// CODE GENERATOR: CommandDocTest '@test group RES1KA0A1TOGNDMORE RegWrite(0x0A, 0x0D) expect 1 // *source=0x0d idac_mode=800uA, 1k resistor 0.8V' +// CODE GENERATOR: CommandDocTest '@test group RES1KA0A1TOGNDMORE tinyTester.print("idac_mode=800uA, 1k resistor 0.8V")' +// CODE GENERATOR: CommandDocTest '@test group RES1KA0A1TOGNDMORE tinyTester.Wait_Output_Settling()' +// CODE GENERATOR: CommandDocTest '@test group RES1KA0A1TOGND_BAD Measure_Voltage(0,10) // TODO1 #175 MAX11410 Self Test why does Measure_Voltage(0,10) without expect cause an mbed hard fault?' +// CODE GENERATOR: CommandDocTest '@test group RES1KA0A1TOGNDMORE Measure_Voltage(0,10) expect 0.8' +// CODE GENERATOR: CommandDocTest '@test group RES1KA0A1TOGNDMORE AINcode[0] expect (uint32_t)2724467 within 33773 // idac_mode=800uA, 1k resistor 0.8V' +// CODE GENERATOR: CommandDocTest '@test group RES1KA0A1TOGND RegWrite(0x0A, 0x0B) expect 1 // *source=0x0b idac_mode=400uA, 1k resistor 0.4V' +// CODE GENERATOR: CommandDocTest '@test group RES1KA0A1TOGNDMORE tinyTester.print("idac_mode=400uA, 1k resistor 0.4V")' +// CODE GENERATOR: CommandDocTest '@test group RES1KA0A1TOGND tinyTester.Wait_Output_Settling()' +// CODE GENERATOR: CommandDocTest '@test group RES1KA0A1TOGND_BAD Measure_Voltage(0,10) // TODO1 #175 MAX11410 Self Test why does Measure_Voltage(0,10) without expect cause an mbed hard fault?' +// CODE GENERATOR: CommandDocTest '@test group RES1KA0A1TOGND Measure_Voltage(0,10) expect 0.4' +// CODE GENERATOR: CommandDocTest '@test group RES1KA0A1TOGNDMORE AINcode[0] expect (uint32_t)1343163 within 33773 // idac_mode=400uA, 1k resistor 0.4V' // CODE GENERATOR: CommandDocTest '@test tinyTester.print("check filter register is writeable")' // CODE GENERATOR: CommandDocTest '@test RegWrite(0x08, 0x34) expect 1' // CODE GENERATOR: CommandDocTest '@test tinyTester.print("check filter register is readable")' @@ -397,8 +421,8 @@ // CODE GENERATOR: CommandPost '@post AINcode[ainp]: measurement result LSB code' // CODE GENERATOR: CommandReturn '@return ideal voltage calculated from raw LSB code and reference voltage' // CODE GENERATOR: MAX11410 Command Name = Measure_RTD (MAX11410_AINP_SEL_enum_t rtd_iout, MAX11410_AINP_SEL_enum_t rtd_ainp, MAX11410_AINN_SEL_enum_t rtd_ainn) --> double -// CODE GENERATOR: Menu item hint description Menu item 'R' -> rtd_resistance, RTD_Temperature -// CODE GENERATOR: Menu item 'R' -> rtd_resistance, RTD_Temperature -- Menu item R +// CODE GENERATOR: Menu item hint description Menu item 'R' -> rtd_ohm, rtd_degc +// CODE GENERATOR: Menu item 'R' -> rtd_ohm, rtd_degc -- Menu item R // CODE GENERATOR: MAX11410 help: R MAX11410_AINP_SEL_enum_t rtd_iout, MAX11410_AINP_SEL_enum_t rtd_ainp, MAX11410_AINN_SEL_enum_t rtd_ainn -- Measure_RTD // CODE GENERATOR: MAX11410 helpString: 'R -- Measure_RTD' // CODE GENERATOR: test menu case 'R': @@ -408,24 +432,24 @@ // CODE GENERATOR: CommandParamIn 'MAX11410_AINP_SEL_enum_t rtd_iout, MAX11410_AINP_SEL_enum_t rtd_ainp, MAX11410_AINN_SEL_enum_t rtd_ainn' // CODE GENERATOR: CommandReturnType 'double' // CODE GENERATOR: CommandPre '@pre external connection REF1P-REF1N is a reference resistor' -// CODE GENERATOR: CommandPre '@pre VRef_REF1 = reference resistance in ohms, default=4999' +// CODE GENERATOR: CommandPre '@pre ref1_v = reference resistance in ohms, default=4999' // CODE GENERATOR: CommandDocParamIn '@param[in] rtd_iout = channel RTD high side force, default=AINP_SEL_0111_AIN7' // CODE GENERATOR: CommandDocParamIn '@param[in] rtd_ainp = channel RTD high side sense, default=AINP_SEL_1000_AIN8' // CODE GENERATOR: CommandDocParamIn '@param[in] rtd_ainn = channel RTD low side, default=AINN_SEL_1001_AIN9' // CODE GENERATOR: CommandDocParamOut '' // CODE GENERATOR: CommandPost '@post AINcode[rtd_ainp]: measurement result LSB code' -// CODE GENERATOR: CommandPost '@post rtd_resistance: measurement result resistance in Ohms' -// CODE GENERATOR: CommandPost '@post RTD_Temperature: Temperature calculated from RTD Resistance; Thermocouple Cold Junction, in degrees C' +// CODE GENERATOR: CommandPost '@post rtd_ohm: measurement result resistance in Ohms' +// CODE GENERATOR: CommandPost '@post rtd_degc: Temperature calculated from RTD Resistance; Thermocouple Cold Junction, in degrees C' // CODE GENERATOR: CommandReturn '@return resistance calculated from raw LSB code and reference resistance' -// CODE GENERATOR: MAX11410 Command Name = TemperatureOfRTD_PT1000 (double rtd_resistance) --> double +// CODE GENERATOR: MAX11410 Command Name = TemperatureOfRTD_PT1000 (double rtd_ohm) --> double // CODE GENERATOR: no Menu item hint in description -// CODE GENERATOR: MAX11410 Command Name = TemperatureOfRTD_PT100 (double rtd_resistance) --> double +// CODE GENERATOR: MAX11410 Command Name = TemperatureOfRTD_PT100 (double rtd_ohm) --> double // CODE GENERATOR: no Menu item hint in description -// CODE GENERATOR: MAX11410 Command Name = TemperatureOfRTD (double rtd_resistance) --> double +// CODE GENERATOR: MAX11410 Command Name = TemperatureOfRTD (double rtd_ohm) --> double // CODE GENERATOR: no Menu item hint in description // CODE GENERATOR: MAX11410 Command Name = Measure_Thermocouple (MAX11410_AINP_SEL_enum_t tc_ainp, MAX11410_AINN_SEL_enum_t tc_ainn, MAX11410_AINP_SEL_enum_t rtd_iout, MAX11410_AINP_SEL_enum_t rtd_ainp, MAX11410_AINN_SEL_enum_t rtd_ainn) --> double -// CODE GENERATOR: Menu item hint description Menu item 'TM' -> tc_voltage, tc_deltaT, tc_Temperature -// CODE GENERATOR: Menu item 'TM' -> tc_voltage, tc_deltaT, tc_Temperature -- Menu item TM +// CODE GENERATOR: Menu item hint description Menu item 'TM' -> tc_v, tc_delta_degc, tc_degc +// CODE GENERATOR: Menu item 'TM' -> tc_v, tc_delta_degc, tc_degc -- Menu item TM // CODE GENERATOR: MAX11410 help: TM MAX11410_AINP_SEL_enum_t tc_ainp, MAX11410_AINN_SEL_enum_t tc_ainn, MAX11410_AINP_SEL_enum_t rtd_iout, MAX11410_AINP_SEL_enum_t rtd_ainp, MAX11410_AINN_SEL_enum_t rtd_ainn -- Measure_Thermocouple // CODE GENERATOR: MAX11410 helpString: 'TM -- Measure_Thermocouple' // CODE GENERATOR: test menu case 'TM': @@ -442,78 +466,43 @@ // CODE GENERATOR: CommandDocParamIn '@param[in] rtd_ainn = channel RTD low side, default=AINN_SEL_1001_AIN9' // CODE GENERATOR: CommandDocParamOut '' // CODE GENERATOR: CommandPost '@post AINcode[tc_ainp]: measurement result LSB code' -// CODE GENERATOR: CommandPost '@post tc_voltage: raw thermocouple voltage in Volts' -// CODE GENERATOR: CommandPost '@post tc_deltaT: temperature in degC above cold junction' -// CODE GENERATOR: CommandPost '@post tc_Temperature: temperature in degC' +// CODE GENERATOR: CommandPost '@post tc_v: raw thermocouple voltage in Volts' +// CODE GENERATOR: CommandPost '@post tc_delta_degc: temperature in degC above cold junction' +// CODE GENERATOR: CommandPost '@post tc_degc: temperature in degC' // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure' -// CODE GENERATOR: MAX11410 Command Name = TemperatureOfTC_TypeK (double tc_voltage) --> double +// CODE GENERATOR: MAX11410 Command Name = TemperatureOfTC_TypeK (double tc_v) --> double // CODE GENERATOR: no Menu item hint in description // CODE GENERATOR: MAX11410 Command Name = temperatureDegC_polynomial (double thermocouple_voltage_uV, int num_coefficients, double coefficients[]) --> double // CODE GENERATOR: no Menu item hint in description // CODE GENERATOR: testMenuGlobalArgsDict scan global property list g_MAX11410_device -// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.VRef_REF0 -// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.VRef_REF0 argname = VRef_REF0 -// CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF0']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF0']['argtype'] = 'double' -// CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF0']['usedByCommandName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF0']['usedBytestMenuItemName'] = 'None' - -// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.VRef_REF1 -// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.VRef_REF1 argname = VRef_REF1 -// CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF1']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF1']['argtype'] = 'double' -// CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF1']['usedByCommandName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF1']['usedBytestMenuItemName'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.ref0_v +// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.ref0_v argname = ref0_v +// CODE GENERATOR: testMenuGlobalArgsDict['ref0_v']['alias'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['ref0_v']['argtype'] = 'double' +// CODE GENERATOR: testMenuGlobalArgsDict['ref0_v']['usedByCommandName'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['ref0_v']['usedBytestMenuItemName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.VRef_REF2 -// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.VRef_REF2 argname = VRef_REF2 -// CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF2']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF2']['argtype'] = 'double' -// CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF2']['usedByCommandName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF2']['usedBytestMenuItemName'] = 'None' - -// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.VRef_AVDD -// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.VRef_AVDD argname = VRef_AVDD -// CODE GENERATOR: testMenuGlobalArgsDict['VRef_AVDD']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['VRef_AVDD']['argtype'] = 'double' -// CODE GENERATOR: testMenuGlobalArgsDict['VRef_AVDD']['usedByCommandName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['VRef_AVDD']['usedBytestMenuItemName'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.ref1_v +// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.ref1_v argname = ref1_v +// CODE GENERATOR: testMenuGlobalArgsDict['ref1_v']['alias'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['ref1_v']['argtype'] = 'double' +// CODE GENERATOR: testMenuGlobalArgsDict['ref1_v']['usedByCommandName'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['ref1_v']['usedBytestMenuItemName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.rtd_resistance -// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.rtd_resistance argname = rtd_resistance -// CODE GENERATOR: testMenuGlobalArgsDict['rtd_resistance']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['rtd_resistance']['argtype'] = 'double' -// CODE GENERATOR: testMenuGlobalArgsDict['rtd_resistance']['usedByCommandName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['rtd_resistance']['usedBytestMenuItemName'] = 'None' - -// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.RTD_Temperature -// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.RTD_Temperature argname = RTD_Temperature -// CODE GENERATOR: testMenuGlobalArgsDict['RTD_Temperature']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['RTD_Temperature']['argtype'] = 'double' -// CODE GENERATOR: testMenuGlobalArgsDict['RTD_Temperature']['usedByCommandName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['RTD_Temperature']['usedBytestMenuItemName'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.ref2_v +// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.ref2_v argname = ref2_v +// CODE GENERATOR: testMenuGlobalArgsDict['ref2_v']['alias'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['ref2_v']['argtype'] = 'double' +// CODE GENERATOR: testMenuGlobalArgsDict['ref2_v']['usedByCommandName'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['ref2_v']['usedBytestMenuItemName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.tc_voltage -// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.tc_voltage argname = tc_voltage -// CODE GENERATOR: testMenuGlobalArgsDict['tc_voltage']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['tc_voltage']['argtype'] = 'double' -// CODE GENERATOR: testMenuGlobalArgsDict['tc_voltage']['usedByCommandName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['tc_voltage']['usedBytestMenuItemName'] = 'None' - -// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.tc_deltaT -// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.tc_deltaT argname = tc_deltaT -// CODE GENERATOR: testMenuGlobalArgsDict['tc_deltaT']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['tc_deltaT']['argtype'] = 'double' -// CODE GENERATOR: testMenuGlobalArgsDict['tc_deltaT']['usedByCommandName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['tc_deltaT']['usedBytestMenuItemName'] = 'None' - -// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.tc_Temperature -// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.tc_Temperature argname = tc_Temperature -// CODE GENERATOR: testMenuGlobalArgsDict['tc_Temperature']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['tc_Temperature']['argtype'] = 'double' -// CODE GENERATOR: testMenuGlobalArgsDict['tc_Temperature']['usedByCommandName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['tc_Temperature']['usedBytestMenuItemName'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.avdd_v +// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.avdd_v argname = avdd_v +// CODE GENERATOR: testMenuGlobalArgsDict['avdd_v']['alias'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['avdd_v']['argtype'] = 'double' +// CODE GENERATOR: testMenuGlobalArgsDict['avdd_v']['usedByCommandName'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['avdd_v']['usedBytestMenuItemName'] = 'None' // CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.ctrl // CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.ctrl shadow of argname = ctrl @@ -523,50 +512,60 @@ // CODE GENERATOR: testMenuGlobalArgsDict['ctrl']['usedByCommandName'] = 'None' // CODE GENERATOR: testMenuGlobalArgsDict['ctrl']['usedBytestMenuItemName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.pgaGain -// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.pgaGain argname = pgaGain -// CODE GENERATOR: testMenuGlobalArgsDict['pgaGain']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['pgaGain']['argtype'] = 'uint8_t' -// CODE GENERATOR: testMenuGlobalArgsDict['pgaGain']['usedByCommandName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['pgaGain']['usedBytestMenuItemName'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict omit read-only property uint8_t g_MAX11410_device.pgaGain +// CODE GENERATOR: testMenuGlobalArgsDict omit read-only property uint32_t g_MAX11410_device.status +// CODE GENERATOR: testMenuGlobalArgsDict omit read-only property uint32_t g_MAX11410_device.data0 +// CODE GENERATOR: testMenuGlobalArgsDict skip array property g_MAX11410_device.AINcode[11] +// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.loop_limit +// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.loop_limit argname = loop_limit +// CODE GENERATOR: testMenuGlobalArgsDict['loop_limit']['alias'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['loop_limit']['argtype'] = 'int' +// CODE GENERATOR: testMenuGlobalArgsDict['loop_limit']['usedByCommandName'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['loop_limit']['usedBytestMenuItemName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.status -// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.status shadow of argname = status -// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.status argname = status -// CODE GENERATOR: testMenuGlobalArgsDict['status']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['status']['argtype'] = 'uint32_t' -// CODE GENERATOR: testMenuGlobalArgsDict['status']['usedByCommandName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['status']['usedBytestMenuItemName'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict omit read-only property MAX11410::MAX11410_CMD_enum_t* g_MAX11410_device.readAllStatusList +// CODE GENERATOR: testMenuGlobalArgsDict omit read-only property uint8_t g_MAX11410_device.readAllStatusListLen +// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.rtd_ms +// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.rtd_ms argname = rtd_ms +// CODE GENERATOR: testMenuGlobalArgsDict['rtd_ms']['alias'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['rtd_ms']['argtype'] = 'int' +// CODE GENERATOR: testMenuGlobalArgsDict['rtd_ms']['usedByCommandName'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['rtd_ms']['usedBytestMenuItemName'] = 'None' + +// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.rtd_ohm +// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.rtd_ohm argname = rtd_ohm +// CODE GENERATOR: testMenuGlobalArgsDict['rtd_ohm']['alias'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['rtd_ohm']['argtype'] = 'double' +// CODE GENERATOR: testMenuGlobalArgsDict['rtd_ohm']['usedByCommandName'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['rtd_ohm']['usedBytestMenuItemName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.data0 -// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.data0 shadow of argname = data0 -// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.data0 argname = data0 -// CODE GENERATOR: testMenuGlobalArgsDict['data0']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['data0']['argtype'] = 'uint32_t' -// CODE GENERATOR: testMenuGlobalArgsDict['data0']['usedByCommandName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['data0']['usedBytestMenuItemName'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.rtd_degc +// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.rtd_degc argname = rtd_degc +// CODE GENERATOR: testMenuGlobalArgsDict['rtd_degc']['alias'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['rtd_degc']['argtype'] = 'double' +// CODE GENERATOR: testMenuGlobalArgsDict['rtd_degc']['usedByCommandName'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['rtd_degc']['usedBytestMenuItemName'] = 'None' + +// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.tc_v +// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.tc_v argname = tc_v +// CODE GENERATOR: testMenuGlobalArgsDict['tc_v']['alias'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['tc_v']['argtype'] = 'double' +// CODE GENERATOR: testMenuGlobalArgsDict['tc_v']['usedByCommandName'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['tc_v']['usedBytestMenuItemName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict skip array property g_MAX11410_device.AINcode[11] -// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.futility_countdown_limit -// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.futility_countdown_limit argname = futility_countdown_limit -// CODE GENERATOR: testMenuGlobalArgsDict['futility_countdown_limit']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['futility_countdown_limit']['argtype'] = 'int' -// CODE GENERATOR: testMenuGlobalArgsDict['futility_countdown_limit']['usedByCommandName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['futility_countdown_limit']['usedBytestMenuItemName'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.tc_delta_degc +// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.tc_delta_degc argname = tc_delta_degc +// CODE GENERATOR: testMenuGlobalArgsDict['tc_delta_degc']['alias'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['tc_delta_degc']['argtype'] = 'double' +// CODE GENERATOR: testMenuGlobalArgsDict['tc_delta_degc']['usedByCommandName'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['tc_delta_degc']['usedBytestMenuItemName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.readAllStatusList -// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.readAllStatusList argname = readAllStatusList -// CODE GENERATOR: testMenuGlobalArgsDict['readAllStatusList']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['readAllStatusList']['argtype'] = 'MAX11410::MAX11410_CMD_enum_t*' -// CODE GENERATOR: testMenuGlobalArgsDict['readAllStatusList']['usedByCommandName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['readAllStatusList']['usedBytestMenuItemName'] = 'None' - -// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.readAllStatusListLen -// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.readAllStatusListLen argname = readAllStatusListLen -// CODE GENERATOR: testMenuGlobalArgsDict['readAllStatusListLen']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['readAllStatusListLen']['argtype'] = 'uint8_t' -// CODE GENERATOR: testMenuGlobalArgsDict['readAllStatusListLen']['usedByCommandName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['readAllStatusListLen']['usedBytestMenuItemName'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.tc_degc +// CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.tc_degc argname = tc_degc +// CODE GENERATOR: testMenuGlobalArgsDict['tc_degc']['alias'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['tc_degc']['argtype'] = 'double' +// CODE GENERATOR: testMenuGlobalArgsDict['tc_degc']['usedByCommandName'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['tc_degc']['usedBytestMenuItemName'] = 'None' // CODE GENERATOR: scan testMenuCommand list for items that can be shortened to single character @@ -686,59 +685,15 @@ // CODE GENERATOR: testMenuGlobalArgsDict Consolidate common/global argument parsing -// CODE GENERATOR: testMenuGlobalArgsDict['RTD_Temperature']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['RTD_Temperature']['argtype'] = 'double' -// CODE GENERATOR: testMenuGlobalArgsDict['RTD_Temperature']['usedByCommandName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['RTD_Temperature']['usedBytestMenuItemName'] = 'None' - // parse argument double RTD_Temperature - double RTD_Temperature = g_MAX11410_device.RTD_Temperature; // default to global property value - if (cmdLine.parse_double("RTD_Temperature", RTD_Temperature)) - { - g_MAX11410_device.RTD_Temperature = RTD_Temperature; // update global property value - } - -// CODE GENERATOR: testMenuGlobalArgsDict['VRef_AVDD']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['VRef_AVDD']['argtype'] = 'double' -// CODE GENERATOR: testMenuGlobalArgsDict['VRef_AVDD']['usedByCommandName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['VRef_AVDD']['usedBytestMenuItemName'] = 'None' - // parse argument double VRef_AVDD - double VRef_AVDD = g_MAX11410_device.VRef_AVDD; // default to global property value - if (cmdLine.parse_double("VRef_AVDD", VRef_AVDD)) +// CODE GENERATOR: testMenuGlobalArgsDict['avdd_v']['alias'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['avdd_v']['argtype'] = 'double' +// CODE GENERATOR: testMenuGlobalArgsDict['avdd_v']['usedByCommandName'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['avdd_v']['usedBytestMenuItemName'] = 'None' + // parse argument double avdd_v + double avdd_v = g_MAX11410_device.avdd_v; // default to global property value + if (cmdLine.parse_double("avdd_v", avdd_v)) { - g_MAX11410_device.VRef_AVDD = VRef_AVDD; // update global property value - } - -// CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF0']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF0']['argtype'] = 'double' -// CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF0']['usedByCommandName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF0']['usedBytestMenuItemName'] = 'None' - // parse argument double VRef_REF0 - double VRef_REF0 = g_MAX11410_device.VRef_REF0; // default to global property value - if (cmdLine.parse_double("VRef_REF0", VRef_REF0)) - { - g_MAX11410_device.VRef_REF0 = VRef_REF0; // update global property value - } - -// CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF1']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF1']['argtype'] = 'double' -// CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF1']['usedByCommandName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF1']['usedBytestMenuItemName'] = 'None' - // parse argument double VRef_REF1 - double VRef_REF1 = g_MAX11410_device.VRef_REF1; // default to global property value - if (cmdLine.parse_double("VRef_REF1", VRef_REF1)) - { - g_MAX11410_device.VRef_REF1 = VRef_REF1; // update global property value - } - -// CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF2']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF2']['argtype'] = 'double' -// CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF2']['usedByCommandName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF2']['usedBytestMenuItemName'] = 'None' - // parse argument double VRef_REF2 - double VRef_REF2 = g_MAX11410_device.VRef_REF2; // default to global property value - if (cmdLine.parse_double("VRef_REF2", VRef_REF2)) - { - g_MAX11410_device.VRef_REF2 = VRef_REF2; // update global property value + g_MAX11410_device.avdd_v = avdd_v; // update global property value } // CODE GENERATOR: testMenuGlobalArgsDict['ctrl']['alias'] = 'None' @@ -752,103 +707,114 @@ g_MAX11410_device.ctrl = ctrl; // update global property value } -// CODE GENERATOR: testMenuGlobalArgsDict['data0']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['data0']['argtype'] = 'uint32_t' -// CODE GENERATOR: testMenuGlobalArgsDict['data0']['usedByCommandName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['data0']['usedBytestMenuItemName'] = 'None' - // parse argument uint32_t data0 - uint32_t data0 = g_MAX11410_device.data0; // default to global property value - if (cmdLine.parse_uint32_dec("data0", data0)) +// CODE GENERATOR: testMenuGlobalArgsDict['loop_limit']['alias'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['loop_limit']['argtype'] = 'int' +// CODE GENERATOR: testMenuGlobalArgsDict['loop_limit']['usedByCommandName'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['loop_limit']['usedBytestMenuItemName'] = 'None' + // parse argument int loop_limit + int loop_limit = g_MAX11410_device.loop_limit; // default to global property value + if (cmdLine.parse_int_dec("loop_limit", loop_limit)) { - g_MAX11410_device.data0 = data0; // update global property value + g_MAX11410_device.loop_limit = loop_limit; // update global property value } -// CODE GENERATOR: testMenuGlobalArgsDict['futility_countdown_limit']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['futility_countdown_limit']['argtype'] = 'int' -// CODE GENERATOR: testMenuGlobalArgsDict['futility_countdown_limit']['usedByCommandName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['futility_countdown_limit']['usedBytestMenuItemName'] = 'None' - // parse argument int futility_countdown_limit - int futility_countdown_limit = g_MAX11410_device.futility_countdown_limit; // default to global property value - if (cmdLine.parse_int_dec("futility_countdown_limit", futility_countdown_limit)) +// CODE GENERATOR: testMenuGlobalArgsDict['ref0_v']['alias'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['ref0_v']['argtype'] = 'double' +// CODE GENERATOR: testMenuGlobalArgsDict['ref0_v']['usedByCommandName'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['ref0_v']['usedBytestMenuItemName'] = 'None' + // parse argument double ref0_v + double ref0_v = g_MAX11410_device.ref0_v; // default to global property value + if (cmdLine.parse_double("ref0_v", ref0_v)) { - g_MAX11410_device.futility_countdown_limit = futility_countdown_limit; // update global property value + g_MAX11410_device.ref0_v = ref0_v; // update global property value } -// CODE GENERATOR: testMenuGlobalArgsDict['pgaGain']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['pgaGain']['argtype'] = 'uint8_t' -// CODE GENERATOR: testMenuGlobalArgsDict['pgaGain']['usedByCommandName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['pgaGain']['usedBytestMenuItemName'] = 'None' - // parse argument uint8_t pgaGain - uint8_t pgaGain = g_MAX11410_device.pgaGain; // default to global property value - if (cmdLine.parse_uint8_dec("pgaGain", pgaGain)) +// CODE GENERATOR: testMenuGlobalArgsDict['ref1_v']['alias'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['ref1_v']['argtype'] = 'double' +// CODE GENERATOR: testMenuGlobalArgsDict['ref1_v']['usedByCommandName'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['ref1_v']['usedBytestMenuItemName'] = 'None' + // parse argument double ref1_v + double ref1_v = g_MAX11410_device.ref1_v; // default to global property value + if (cmdLine.parse_double("ref1_v", ref1_v)) { - g_MAX11410_device.pgaGain = pgaGain; // update global property value + g_MAX11410_device.ref1_v = ref1_v; // update global property value } -// CODE GENERATOR: testMenuGlobalArgsDict['readAllStatusListLen']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['readAllStatusListLen']['argtype'] = 'uint8_t' -// CODE GENERATOR: testMenuGlobalArgsDict['readAllStatusListLen']['usedByCommandName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['readAllStatusListLen']['usedBytestMenuItemName'] = 'None' - // parse argument uint8_t readAllStatusListLen - uint8_t readAllStatusListLen = g_MAX11410_device.readAllStatusListLen; // default to global property value - if (cmdLine.parse_uint8_dec("readAllStatusListLen", readAllStatusListLen)) +// CODE GENERATOR: testMenuGlobalArgsDict['ref2_v']['alias'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['ref2_v']['argtype'] = 'double' +// CODE GENERATOR: testMenuGlobalArgsDict['ref2_v']['usedByCommandName'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['ref2_v']['usedBytestMenuItemName'] = 'None' + // parse argument double ref2_v + double ref2_v = g_MAX11410_device.ref2_v; // default to global property value + if (cmdLine.parse_double("ref2_v", ref2_v)) { - g_MAX11410_device.readAllStatusListLen = readAllStatusListLen; // update global property value + g_MAX11410_device.ref2_v = ref2_v; // update global property value } -// CODE GENERATOR: testMenuGlobalArgsDict['rtd_resistance']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['rtd_resistance']['argtype'] = 'double' -// CODE GENERATOR: testMenuGlobalArgsDict['rtd_resistance']['usedByCommandName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['rtd_resistance']['usedBytestMenuItemName'] = 'None' - // parse argument double rtd_resistance - double rtd_resistance = g_MAX11410_device.rtd_resistance; // default to global property value - if (cmdLine.parse_double("rtd_resistance", rtd_resistance)) +// CODE GENERATOR: testMenuGlobalArgsDict['rtd_degc']['alias'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['rtd_degc']['argtype'] = 'double' +// CODE GENERATOR: testMenuGlobalArgsDict['rtd_degc']['usedByCommandName'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['rtd_degc']['usedBytestMenuItemName'] = 'None' + // parse argument double rtd_degc + double rtd_degc = g_MAX11410_device.rtd_degc; // default to global property value + if (cmdLine.parse_double("rtd_degc", rtd_degc)) { - g_MAX11410_device.rtd_resistance = rtd_resistance; // update global property value + g_MAX11410_device.rtd_degc = rtd_degc; // update global property value } -// CODE GENERATOR: testMenuGlobalArgsDict['status']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['status']['argtype'] = 'uint32_t' -// CODE GENERATOR: testMenuGlobalArgsDict['status']['usedByCommandName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['status']['usedBytestMenuItemName'] = 'None' - // parse argument uint32_t status - uint32_t status = g_MAX11410_device.status; // default to global property value - if (cmdLine.parse_uint32_dec("status", status)) +// CODE GENERATOR: testMenuGlobalArgsDict['rtd_ms']['alias'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['rtd_ms']['argtype'] = 'int' +// CODE GENERATOR: testMenuGlobalArgsDict['rtd_ms']['usedByCommandName'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['rtd_ms']['usedBytestMenuItemName'] = 'None' + // parse argument int rtd_ms + int rtd_ms = g_MAX11410_device.rtd_ms; // default to global property value + if (cmdLine.parse_int_dec("rtd_ms", rtd_ms)) { - g_MAX11410_device.status = status; // update global property value + g_MAX11410_device.rtd_ms = rtd_ms; // update global property value } -// CODE GENERATOR: testMenuGlobalArgsDict['tc_Temperature']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['tc_Temperature']['argtype'] = 'double' -// CODE GENERATOR: testMenuGlobalArgsDict['tc_Temperature']['usedByCommandName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['tc_Temperature']['usedBytestMenuItemName'] = 'None' - // parse argument double tc_Temperature - double tc_Temperature = g_MAX11410_device.tc_Temperature; // default to global property value - if (cmdLine.parse_double("tc_Temperature", tc_Temperature)) +// CODE GENERATOR: testMenuGlobalArgsDict['rtd_ohm']['alias'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['rtd_ohm']['argtype'] = 'double' +// CODE GENERATOR: testMenuGlobalArgsDict['rtd_ohm']['usedByCommandName'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['rtd_ohm']['usedBytestMenuItemName'] = 'None' + // parse argument double rtd_ohm + double rtd_ohm = g_MAX11410_device.rtd_ohm; // default to global property value + if (cmdLine.parse_double("rtd_ohm", rtd_ohm)) { - g_MAX11410_device.tc_Temperature = tc_Temperature; // update global property value + g_MAX11410_device.rtd_ohm = rtd_ohm; // update global property value } -// CODE GENERATOR: testMenuGlobalArgsDict['tc_deltaT']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['tc_deltaT']['argtype'] = 'double' -// CODE GENERATOR: testMenuGlobalArgsDict['tc_deltaT']['usedByCommandName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['tc_deltaT']['usedBytestMenuItemName'] = 'None' - // parse argument double tc_deltaT - double tc_deltaT = g_MAX11410_device.tc_deltaT; // default to global property value - if (cmdLine.parse_double("tc_deltaT", tc_deltaT)) +// CODE GENERATOR: testMenuGlobalArgsDict['tc_degc']['alias'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['tc_degc']['argtype'] = 'double' +// CODE GENERATOR: testMenuGlobalArgsDict['tc_degc']['usedByCommandName'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['tc_degc']['usedBytestMenuItemName'] = 'None' + // parse argument double tc_degc + double tc_degc = g_MAX11410_device.tc_degc; // default to global property value + if (cmdLine.parse_double("tc_degc", tc_degc)) { - g_MAX11410_device.tc_deltaT = tc_deltaT; // update global property value + g_MAX11410_device.tc_degc = tc_degc; // update global property value } -// CODE GENERATOR: testMenuGlobalArgsDict['tc_voltage']['alias'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['tc_voltage']['argtype'] = 'double' -// CODE GENERATOR: testMenuGlobalArgsDict['tc_voltage']['usedByCommandName'] = 'None' -// CODE GENERATOR: testMenuGlobalArgsDict['tc_voltage']['usedBytestMenuItemName'] = 'None' - // parse argument double tc_voltage - double tc_voltage = g_MAX11410_device.tc_voltage; // default to global property value - if (cmdLine.parse_double("tc_voltage", tc_voltage)) +// CODE GENERATOR: testMenuGlobalArgsDict['tc_delta_degc']['alias'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['tc_delta_degc']['argtype'] = 'double' +// CODE GENERATOR: testMenuGlobalArgsDict['tc_delta_degc']['usedByCommandName'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['tc_delta_degc']['usedBytestMenuItemName'] = 'None' + // parse argument double tc_delta_degc + double tc_delta_degc = g_MAX11410_device.tc_delta_degc; // default to global property value + if (cmdLine.parse_double("tc_delta_degc", tc_delta_degc)) { - g_MAX11410_device.tc_voltage = tc_voltage; // update global property value + g_MAX11410_device.tc_delta_degc = tc_delta_degc; // update global property value + } + +// CODE GENERATOR: testMenuGlobalArgsDict['tc_v']['alias'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['tc_v']['argtype'] = 'double' +// CODE GENERATOR: testMenuGlobalArgsDict['tc_v']['usedByCommandName'] = 'None' +// CODE GENERATOR: testMenuGlobalArgsDict['tc_v']['usedBytestMenuItemName'] = 'None' + // parse argument double tc_v + double tc_v = g_MAX11410_device.tc_v; // default to global property value + if (cmdLine.parse_double("tc_v", tc_v)) + { + g_MAX11410_device.tc_v = tc_v; // update global property value } switch (cmdLine[0]) @@ -905,56 +871,76 @@ } break; -// CODE GENERATOR: generate @ command print global property values of g_MAX11410_device +// CODE GENERATOR: generate @ command print global property values of g_MAX11410_device case '@': { -// CODE GENERATOR: @ command print double g_MAX11410_device.VRef_REF0 - cmdLine.serial().printf("VRef_REF0 = "); - cmdLine.serial().printf("%f\r\n", g_MAX11410_device.VRef_REF0); -// CODE GENERATOR: @ command print double g_MAX11410_device.VRef_REF1 - cmdLine.serial().printf("VRef_REF1 = "); - cmdLine.serial().printf("%f\r\n", g_MAX11410_device.VRef_REF1); -// CODE GENERATOR: @ command print double g_MAX11410_device.VRef_REF2 - cmdLine.serial().printf("VRef_REF2 = "); - cmdLine.serial().printf("%f\r\n", g_MAX11410_device.VRef_REF2); -// CODE GENERATOR: @ command print double g_MAX11410_device.VRef_AVDD - cmdLine.serial().printf("VRef_AVDD = "); - cmdLine.serial().printf("%f\r\n", g_MAX11410_device.VRef_AVDD); -// CODE GENERATOR: @ command print double g_MAX11410_device.rtd_resistance - cmdLine.serial().printf("rtd_resistance = "); - cmdLine.serial().printf("%f\r\n", g_MAX11410_device.rtd_resistance); -// CODE GENERATOR: @ command print double g_MAX11410_device.RTD_Temperature - cmdLine.serial().printf("RTD_Temperature = "); - cmdLine.serial().printf("%f\r\n", g_MAX11410_device.RTD_Temperature); -// CODE GENERATOR: @ command print double g_MAX11410_device.tc_voltage - cmdLine.serial().printf("tc_voltage = "); - cmdLine.serial().printf("%f\r\n", g_MAX11410_device.tc_voltage); -// CODE GENERATOR: @ command print double g_MAX11410_device.tc_deltaT - cmdLine.serial().printf("tc_deltaT = "); - cmdLine.serial().printf("%f\r\n", g_MAX11410_device.tc_deltaT); -// CODE GENERATOR: @ command print double g_MAX11410_device.tc_Temperature - cmdLine.serial().printf("tc_Temperature = "); - cmdLine.serial().printf("%f\r\n", g_MAX11410_device.tc_Temperature); +// CODE GENERATOR: @ command print double g_MAX11410_device.ref0_v + cmdLine.serial().printf("ref0_v = "); +// CODE GENERATOR: @ command print double g_MAX11410_device.ref0_v property name ending in physical units v + cmdLine.serial().printf("%f\r\n", g_MAX11410_device.ref0_v); +// CODE GENERATOR: @ command print double g_MAX11410_device.ref1_v + cmdLine.serial().printf("ref1_v = "); +// CODE GENERATOR: @ command print double g_MAX11410_device.ref1_v property name ending in physical units v + cmdLine.serial().printf("%f\r\n", g_MAX11410_device.ref1_v); +// CODE GENERATOR: @ command print double g_MAX11410_device.ref2_v + cmdLine.serial().printf("ref2_v = "); +// CODE GENERATOR: @ command print double g_MAX11410_device.ref2_v property name ending in physical units v + cmdLine.serial().printf("%f\r\n", g_MAX11410_device.ref2_v); +// CODE GENERATOR: @ command print double g_MAX11410_device.avdd_v + cmdLine.serial().printf("avdd_v = "); +// CODE GENERATOR: @ command print double g_MAX11410_device.avdd_v property name ending in physical units v + cmdLine.serial().printf("%f\r\n", g_MAX11410_device.avdd_v); // CODE GENERATOR: @ command print uint32_t g_MAX11410_device.ctrl cmdLine.serial().printf("ctrl = "); +// CODE GENERATOR: @ command print uint32_t g_MAX11410_device.ctrl no recognized physical unit, show both decimal and hexadecimal cmdLine.serial().printf("%ld = 0x%8.8lx\r\n", g_MAX11410_device.ctrl, g_MAX11410_device.ctrl); // CODE GENERATOR: @ command print uint8_t g_MAX11410_device.pgaGain cmdLine.serial().printf("pgaGain = "); +// CODE GENERATOR: @ command print uint8_t g_MAX11410_device.pgaGain no recognized physical unit, show both decimal and hexadecimal cmdLine.serial().printf("%d = 0x%2.2x\r\n", g_MAX11410_device.pgaGain, g_MAX11410_device.pgaGain); // CODE GENERATOR: @ command print uint32_t g_MAX11410_device.status cmdLine.serial().printf("status = "); +// CODE GENERATOR: @ command print uint32_t g_MAX11410_device.status no recognized physical unit, show both decimal and hexadecimal cmdLine.serial().printf("%ld = 0x%8.8lx\r\n", g_MAX11410_device.status, g_MAX11410_device.status); // CODE GENERATOR: @ command print uint32_t g_MAX11410_device.data0 cmdLine.serial().printf("data0 = "); +// CODE GENERATOR: @ command print uint32_t g_MAX11410_device.data0 no recognized physical unit, show both decimal and hexadecimal cmdLine.serial().printf("%ld = 0x%8.8lx\r\n", g_MAX11410_device.data0, g_MAX11410_device.data0); // CODE GENERATOR: @ command print uint32_t array g_MAX11410_device.AINcode[0..10] for(int index = 0; (index < 11) && (index < 16); index++) { cmdLine.serial().printf("AINcode[%d] = ", index); cmdLine.serial().printf("%ld = 0x%8.8lx\r\n", g_MAX11410_device.AINcode[index], g_MAX11410_device.AINcode[index]); } -// CODE GENERATOR: @ command print int g_MAX11410_device.futility_countdown_limit - cmdLine.serial().printf("futility_countdown_limit = "); - cmdLine.serial().printf("%d = 0x%2.2x\r\n", g_MAX11410_device.futility_countdown_limit, g_MAX11410_device.futility_countdown_limit); +// CODE GENERATOR: @ command print int g_MAX11410_device.loop_limit + cmdLine.serial().printf("loop_limit = "); +// CODE GENERATOR: @ command print int g_MAX11410_device.loop_limit no recognized physical unit, show both decimal and hexadecimal + cmdLine.serial().printf("%d = 0x%4.4x\r\n", g_MAX11410_device.loop_limit, g_MAX11410_device.loop_limit); +// CODE GENERATOR: @ command omit constant property MAX11410::MAX11410_CMD_enum_t* g_MAX11410_device.readAllStatusList +// CODE GENERATOR: @ command omit constant property uint8_t g_MAX11410_device.readAllStatusListLen +// CODE GENERATOR: @ command print int g_MAX11410_device.rtd_ms + cmdLine.serial().printf("rtd_ms = "); +// CODE GENERATOR: @ command print int g_MAX11410_device.rtd_ms property name ending in physical units ms + cmdLine.serial().printf("%d\r\n", g_MAX11410_device.rtd_ms); +// CODE GENERATOR: @ command print double g_MAX11410_device.rtd_ohm + cmdLine.serial().printf("rtd_ohm = "); +// CODE GENERATOR: @ command print double g_MAX11410_device.rtd_ohm property name ending in physical units ohm + cmdLine.serial().printf("%f\r\n", g_MAX11410_device.rtd_ohm); +// CODE GENERATOR: @ command print double g_MAX11410_device.rtd_degc + cmdLine.serial().printf("rtd_degc = "); +// CODE GENERATOR: @ command print double g_MAX11410_device.rtd_degc property name ending in physical units degc + cmdLine.serial().printf("%f\r\n", g_MAX11410_device.rtd_degc); +// CODE GENERATOR: @ command print double g_MAX11410_device.tc_v + cmdLine.serial().printf("tc_v = "); +// CODE GENERATOR: @ command print double g_MAX11410_device.tc_v property name ending in physical units v + cmdLine.serial().printf("%f\r\n", g_MAX11410_device.tc_v); +// CODE GENERATOR: @ command print double g_MAX11410_device.tc_delta_degc + cmdLine.serial().printf("tc_delta_degc = "); +// CODE GENERATOR: @ command print double g_MAX11410_device.tc_delta_degc property name ending in physical units degc + cmdLine.serial().printf("%f\r\n", g_MAX11410_device.tc_delta_degc); +// CODE GENERATOR: @ command print double g_MAX11410_device.tc_degc + cmdLine.serial().printf("tc_degc = "); +// CODE GENERATOR: @ command print double g_MAX11410_device.tc_degc property name ending in physical units degc + cmdLine.serial().printf("%f\r\n", g_MAX11410_device.tc_degc); return true; // command handled by MAX11410 break; } @@ -978,17 +964,41 @@ // CODE GENERATOR: CommandPost '' // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure' // CODE GENERATOR: CommandTest '@test Init() expect 1' -// CODE GENERATOR: CommandTest '@test RegRead(MAX11410::CMD_r001_0001_xxxx_xxxx_xxxx_xxxx_xxxx_xddd_PART_ID, buffer) expect 1 expect-buffer 0x000F02' -// CODE GENERATOR: CommandTest '@test RegRead(MAX11410::CMD_r000_0100_dddd_xddd_GP0_CTRL, buffer) expect 1 expect-buffer 0x00' -// CODE GENERATOR: CommandTest '@test RegRead(MAX11410::CMD_r000_0101_dddd_xddd_GP1_CTRL, buffer) expect 1 expect-buffer 0x00' -// CODE GENERATOR: CommandTest '@test RegRead(MAX11410::CMD_r000_0111_xddd_dddd_GP_SEQ_ADDR, buffer) expect 1 expect-buffer 0x00003a' -// CODE GENERATOR: CommandTest '@test RegRead(MAX11410::CMD_r000_1000_x0dd_dddd_FILTER, buffer) expect 1 expect-buffer 0x00' -// CODE GENERATOR: CommandTest '@test RegRead(MAX11410::CMD_r000_1001_dddd_dddd_CTRL, buffer) expect 1 expect-buffer 0x000001' -// CODE GENERATOR: CommandTest '@test RegRead(MAX11410::CMD_r000_1010_dddd_dddd_SOURCE, buffer) expect 1 expect-buffer 0x00' -// CODE GENERATOR: CommandTest '@test RegRead(MAX11410::CMD_r000_1011_dddd_dddd_MUX_CTRL0, buffer) expect 1 expect-buffer 0x0000ff' -// CODE GENERATOR: CommandTest '@test RegRead(MAX11410::CMD_r000_1100_dddd_dddd_MUX_CTRL1, buffer) expect 1 expect-buffer 0x0000ff' -// CODE GENERATOR: CommandTest '@test RegRead(MAX11410::CMD_r000_1101_dddd_dddd_MUX_CTRL2, buffer) expect 1 expect-buffer 0x00' -// CODE GENERATOR: CommandTest '@test RegRead(MAX11410::CMD_r000_1110_xxdd_xddd_PGA, buffer) expect 1 expect-buffer 0x00' +// CODE GENERATOR: CommandTest '@test group POR // verify initial register values (enabled by default)' +// CODE GENERATOR: CommandTest '@test group POR RegRead(MAX11410::CMD_r001_0001_xxxx_xxxx_xxxx_xxxx_xxxx_xddd_PART_ID, buffer) expect 1 expect-buffer 0x000F02' +// CODE GENERATOR: CommandTest '@test group POR RegRead(MAX11410::CMD_r000_0100_dddd_xddd_GP0_CTRL, buffer) expect 1 expect-buffer 0x00' +// CODE GENERATOR: CommandTest '@test group POR RegRead(MAX11410::CMD_r000_0101_dddd_xddd_GP1_CTRL, buffer) expect 1 expect-buffer 0x00' +// CODE GENERATOR: CommandTest '@test group POR RegRead(MAX11410::CMD_r000_0111_xddd_dddd_GP_SEQ_ADDR, buffer) expect 1 expect-buffer 0x00003a' +// CODE GENERATOR: CommandTest '@test group POR RegRead(MAX11410::CMD_r000_1000_x0dd_dddd_FILTER, buffer) expect 1 expect-buffer 0x00' +// CODE GENERATOR: CommandTest '@test group POR RegRead(MAX11410::CMD_r000_1001_dddd_dddd_CTRL, buffer) expect 1 expect-buffer 0x000001' +// CODE GENERATOR: CommandTest '@test group POR RegRead(MAX11410::CMD_r000_1010_dddd_dddd_SOURCE, buffer) expect 1 expect-buffer 0x00' +// CODE GENERATOR: CommandTest '@test group POR RegRead(MAX11410::CMD_r000_1011_dddd_dddd_MUX_CTRL0, buffer) expect 1 expect-buffer 0x0000ff' +// CODE GENERATOR: CommandTest '@test group POR RegRead(MAX11410::CMD_r000_1100_dddd_dddd_MUX_CTRL1, buffer) expect 1 expect-buffer 0x0000ff' +// CODE GENERATOR: CommandTest '@test group POR RegRead(MAX11410::CMD_r000_1101_dddd_dddd_MUX_CTRL2, buffer) expect 1 expect-buffer 0x00' +// CODE GENERATOR: CommandTest '@test group POR RegRead(MAX11410::CMD_r000_1110_xxdd_xddd_PGA, buffer) expect 1 expect-buffer 0x00' +// CODE GENERATOR: CommandTest '@test group RES1KA0A1TOGND // measure a 1kohm resistor between (AIN0,AIN1) and AGND to verify ref2_v (disabled by default)' +// CODE GENERATOR: CommandTest '@test group RES1KA0A1TOGNDMORE // measure a 1kohm resistor between (AIN0,AIN1) and AGND to verify ref2_v in more detail' +// CODE GENERATOR: CommandTest '@test group RES1KA0A1TOGNDMORE tinyTester.print("measure a 1kohm resistor between (AIN0,AIN1) and AGND to verify ref2_v")' +// CODE GENERATOR: CommandTest '@test group RES1KA0A1TOGND tinyTester.settle_time_msec = 1000 // default 250' +// CODE GENERATOR: CommandTest '@test group RES1KA0A1TOGND RegWrite(0x0C, 0xF1) expect 1 // *mux_ctrl1=0xf1 drives current source from AIN1' +// CODE GENERATOR: CommandTest '@test group RES1KA0A1TOGNDMORE RegWrite(0x0A, 0x03) expect 1 // *source=0x03 idac_mode=100uA, 1k resistor 0.1V' +// CODE GENERATOR: CommandTest '@test group RES1KA0A1TOGNDMORE tinyTester.print("idac_mode=100uA, 1k resistor 0.1V")' +// CODE GENERATOR: CommandTest '@test group RES1KA0A1TOGNDMORE tinyTester.Wait_Output_Settling()' +// CODE GENERATOR: CommandTest '@test group RES1KA0A1TOGND_BAD Measure_Voltage(0,10) // TODO1 #175 MAX11410 Self Test why does Measure_Voltage(0,10) without expect cause an mbed hard fault?' +// CODE GENERATOR: CommandTest '@test group RES1KA0A1TOGNDMORE Measure_Voltage(0,10) expect 0.1' +// CODE GENERATOR: CommandTest '@test group RES1KA0A1TOGNDMORE AINcode[0] expect (uint32_t)337731 within 33773 // idac_mode=100uA, 1k resistor 0.1V' +// CODE GENERATOR: CommandTest '@test group RES1KA0A1TOGNDMORE RegWrite(0x0A, 0x0D) expect 1 // *source=0x0d idac_mode=800uA, 1k resistor 0.8V' +// CODE GENERATOR: CommandTest '@test group RES1KA0A1TOGNDMORE tinyTester.print("idac_mode=800uA, 1k resistor 0.8V")' +// CODE GENERATOR: CommandTest '@test group RES1KA0A1TOGNDMORE tinyTester.Wait_Output_Settling()' +// CODE GENERATOR: CommandTest '@test group RES1KA0A1TOGND_BAD Measure_Voltage(0,10) // TODO1 #175 MAX11410 Self Test why does Measure_Voltage(0,10) without expect cause an mbed hard fault?' +// CODE GENERATOR: CommandTest '@test group RES1KA0A1TOGNDMORE Measure_Voltage(0,10) expect 0.8' +// CODE GENERATOR: CommandTest '@test group RES1KA0A1TOGNDMORE AINcode[0] expect (uint32_t)2724467 within 33773 // idac_mode=800uA, 1k resistor 0.8V' +// CODE GENERATOR: CommandTest '@test group RES1KA0A1TOGND RegWrite(0x0A, 0x0B) expect 1 // *source=0x0b idac_mode=400uA, 1k resistor 0.4V' +// CODE GENERATOR: CommandTest '@test group RES1KA0A1TOGNDMORE tinyTester.print("idac_mode=400uA, 1k resistor 0.4V")' +// CODE GENERATOR: CommandTest '@test group RES1KA0A1TOGND tinyTester.Wait_Output_Settling()' +// CODE GENERATOR: CommandTest '@test group RES1KA0A1TOGND_BAD Measure_Voltage(0,10) // TODO1 #175 MAX11410 Self Test why does Measure_Voltage(0,10) without expect cause an mbed hard fault?' +// CODE GENERATOR: CommandTest '@test group RES1KA0A1TOGND Measure_Voltage(0,10) expect 0.4' +// CODE GENERATOR: CommandTest '@test group RES1KA0A1TOGNDMORE AINcode[0] expect (uint32_t)1343163 within 33773 // idac_mode=400uA, 1k resistor 0.4V' // CODE GENERATOR: CommandTest '@test tinyTester.print("check filter register is writeable")' // CODE GENERATOR: CommandTest '@test RegWrite(0x08, 0x34) expect 1' // CODE GENERATOR: CommandTest '@test tinyTester.print("check filter register is readable")' @@ -1016,17 +1026,41 @@ // displayPost='' // @Return='@return 1 on success; 0 on failure' // @Test='@test Init() expect 1' - // @Test='@test RegRead(MAX11410::CMD_r001_0001_xxxx_xxxx_xxxx_xxxx_xxxx_xddd_PART_ID, buffer) expect 1 expect-buffer 0x000F02' - // @Test='@test RegRead(MAX11410::CMD_r000_0100_dddd_xddd_GP0_CTRL, buffer) expect 1 expect-buffer 0x00' - // @Test='@test RegRead(MAX11410::CMD_r000_0101_dddd_xddd_GP1_CTRL, buffer) expect 1 expect-buffer 0x00' - // @Test='@test RegRead(MAX11410::CMD_r000_0111_xddd_dddd_GP_SEQ_ADDR, buffer) expect 1 expect-buffer 0x00003a' - // @Test='@test RegRead(MAX11410::CMD_r000_1000_x0dd_dddd_FILTER, buffer) expect 1 expect-buffer 0x00' - // @Test='@test RegRead(MAX11410::CMD_r000_1001_dddd_dddd_CTRL, buffer) expect 1 expect-buffer 0x000001' - // @Test='@test RegRead(MAX11410::CMD_r000_1010_dddd_dddd_SOURCE, buffer) expect 1 expect-buffer 0x00' - // @Test='@test RegRead(MAX11410::CMD_r000_1011_dddd_dddd_MUX_CTRL0, buffer) expect 1 expect-buffer 0x0000ff' - // @Test='@test RegRead(MAX11410::CMD_r000_1100_dddd_dddd_MUX_CTRL1, buffer) expect 1 expect-buffer 0x0000ff' - // @Test='@test RegRead(MAX11410::CMD_r000_1101_dddd_dddd_MUX_CTRL2, buffer) expect 1 expect-buffer 0x00' - // @Test='@test RegRead(MAX11410::CMD_r000_1110_xxdd_xddd_PGA, buffer) expect 1 expect-buffer 0x00' + // @Test='@test group POR // verify initial register values (enabled by default)' + // @Test='@test group POR RegRead(MAX11410::CMD_r001_0001_xxxx_xxxx_xxxx_xxxx_xxxx_xddd_PART_ID, buffer) expect 1 expect-buffer 0x000F02' + // @Test='@test group POR RegRead(MAX11410::CMD_r000_0100_dddd_xddd_GP0_CTRL, buffer) expect 1 expect-buffer 0x00' + // @Test='@test group POR RegRead(MAX11410::CMD_r000_0101_dddd_xddd_GP1_CTRL, buffer) expect 1 expect-buffer 0x00' + // @Test='@test group POR RegRead(MAX11410::CMD_r000_0111_xddd_dddd_GP_SEQ_ADDR, buffer) expect 1 expect-buffer 0x00003a' + // @Test='@test group POR RegRead(MAX11410::CMD_r000_1000_x0dd_dddd_FILTER, buffer) expect 1 expect-buffer 0x00' + // @Test='@test group POR RegRead(MAX11410::CMD_r000_1001_dddd_dddd_CTRL, buffer) expect 1 expect-buffer 0x000001' + // @Test='@test group POR RegRead(MAX11410::CMD_r000_1010_dddd_dddd_SOURCE, buffer) expect 1 expect-buffer 0x00' + // @Test='@test group POR RegRead(MAX11410::CMD_r000_1011_dddd_dddd_MUX_CTRL0, buffer) expect 1 expect-buffer 0x0000ff' + // @Test='@test group POR RegRead(MAX11410::CMD_r000_1100_dddd_dddd_MUX_CTRL1, buffer) expect 1 expect-buffer 0x0000ff' + // @Test='@test group POR RegRead(MAX11410::CMD_r000_1101_dddd_dddd_MUX_CTRL2, buffer) expect 1 expect-buffer 0x00' + // @Test='@test group POR RegRead(MAX11410::CMD_r000_1110_xxdd_xddd_PGA, buffer) expect 1 expect-buffer 0x00' + // @Test='@test group RES1KA0A1TOGND // measure a 1kohm resistor between (AIN0,AIN1) and AGND to verify ref2_v (disabled by default)' + // @Test='@test group RES1KA0A1TOGNDMORE // measure a 1kohm resistor between (AIN0,AIN1) and AGND to verify ref2_v in more detail' + // @Test='@test group RES1KA0A1TOGNDMORE tinyTester.print("measure a 1kohm resistor between (AIN0,AIN1) and AGND to verify ref2_v")' + // @Test='@test group RES1KA0A1TOGND tinyTester.settle_time_msec = 1000 // default 250' + // @Test='@test group RES1KA0A1TOGND RegWrite(0x0C, 0xF1) expect 1 // *mux_ctrl1=0xf1 drives current source from AIN1' + // @Test='@test group RES1KA0A1TOGNDMORE RegWrite(0x0A, 0x03) expect 1 // *source=0x03 idac_mode=100uA, 1k resistor 0.1V' + // @Test='@test group RES1KA0A1TOGNDMORE tinyTester.print("idac_mode=100uA, 1k resistor 0.1V")' + // @Test='@test group RES1KA0A1TOGNDMORE tinyTester.Wait_Output_Settling()' + // @Test='@test group RES1KA0A1TOGND_BAD Measure_Voltage(0,10) // TODO1 #175 MAX11410 Self Test why does Measure_Voltage(0,10) without expect cause an mbed hard fault?' + // @Test='@test group RES1KA0A1TOGNDMORE Measure_Voltage(0,10) expect 0.1' + // @Test='@test group RES1KA0A1TOGNDMORE AINcode[0] expect (uint32_t)337731 within 33773 // idac_mode=100uA, 1k resistor 0.1V' + // @Test='@test group RES1KA0A1TOGNDMORE RegWrite(0x0A, 0x0D) expect 1 // *source=0x0d idac_mode=800uA, 1k resistor 0.8V' + // @Test='@test group RES1KA0A1TOGNDMORE tinyTester.print("idac_mode=800uA, 1k resistor 0.8V")' + // @Test='@test group RES1KA0A1TOGNDMORE tinyTester.Wait_Output_Settling()' + // @Test='@test group RES1KA0A1TOGND_BAD Measure_Voltage(0,10) // TODO1 #175 MAX11410 Self Test why does Measure_Voltage(0,10) without expect cause an mbed hard fault?' + // @Test='@test group RES1KA0A1TOGNDMORE Measure_Voltage(0,10) expect 0.8' + // @Test='@test group RES1KA0A1TOGNDMORE AINcode[0] expect (uint32_t)2724467 within 33773 // idac_mode=800uA, 1k resistor 0.8V' + // @Test='@test group RES1KA0A1TOGND RegWrite(0x0A, 0x0B) expect 1 // *source=0x0b idac_mode=400uA, 1k resistor 0.4V' + // @Test='@test group RES1KA0A1TOGNDMORE tinyTester.print("idac_mode=400uA, 1k resistor 0.4V")' + // @Test='@test group RES1KA0A1TOGND tinyTester.Wait_Output_Settling()' + // @Test='@test group RES1KA0A1TOGND_BAD Measure_Voltage(0,10) // TODO1 #175 MAX11410 Self Test why does Measure_Voltage(0,10) without expect cause an mbed hard fault?' + // @Test='@test group RES1KA0A1TOGND Measure_Voltage(0,10) expect 0.4' + // @Test='@test group RES1KA0A1TOGNDMORE AINcode[0] expect (uint32_t)1343163 within 33773 // idac_mode=400uA, 1k resistor 0.4V' // @Test='@test tinyTester.print("check filter register is writeable")' // @Test='@test RegWrite(0x08, 0x34) expect 1' // @Test='@test tinyTester.print("check filter register is readable")' @@ -1103,14 +1137,14 @@ // CODE GENERATOR: CommandParamIn 'MAX11410_AINP_SEL_enum_t rtd_iout, MAX11410_AINP_SEL_enum_t rtd_ainp, MAX11410_AINN_SEL_enum_t rtd_ainn' // CODE GENERATOR: CommandReturnType 'double' // CODE GENERATOR: CommandPre '@pre external connection REF1P-REF1N is a reference resistor' -// CODE GENERATOR: CommandPre '@pre VRef_REF1 = reference resistance in ohms, default=4999' +// CODE GENERATOR: CommandPre '@pre ref1_v = reference resistance in ohms, default=4999' // CODE GENERATOR: CommandDocParamIn '@param[in] rtd_iout = channel RTD high side force, default=AINP_SEL_0111_AIN7' // CODE GENERATOR: CommandDocParamIn '@param[in] rtd_ainp = channel RTD high side sense, default=AINP_SEL_1000_AIN8' // CODE GENERATOR: CommandDocParamIn '@param[in] rtd_ainn = channel RTD low side, default=AINN_SEL_1001_AIN9' // CODE GENERATOR: CommandDocParamOut '' // CODE GENERATOR: CommandPost '@post AINcode[rtd_ainp]: measurement result LSB code' -// CODE GENERATOR: CommandPost '@post rtd_resistance: measurement result resistance in Ohms' -// CODE GENERATOR: CommandPost '@post RTD_Temperature: Temperature calculated from RTD Resistance; Thermocouple Cold Junction, in degrees C' +// CODE GENERATOR: CommandPost '@post rtd_ohm: measurement result resistance in Ohms' +// CODE GENERATOR: CommandPost '@post rtd_degc: Temperature calculated from RTD Resistance; Thermocouple Cold Junction, in degrees C' // CODE GENERATOR: CommandReturn '@return resistance calculated from raw LSB code and reference resistance' // case 'R': // (single character) (testMenuFirstCharHandler="None") case 'R': @@ -1122,15 +1156,15 @@ // CommandParamIn='MAX11410_AINP_SEL_enum_t rtd_iout, MAX11410_AINP_SEL_enum_t rtd_ainp, MAX11410_AINN_SEL_enum_t rtd_ainn' // CommandReturnType='double' // @Pre='@pre external connection REF1P-REF1N is a reference resistor' - // @Pre='@pre VRef_REF1 = reference resistance in ohms, default=4999' + // @Pre='@pre ref1_v = reference resistance in ohms, default=4999' // @Param[in]='@param[in] rtd_iout = channel RTD high side force, default=AINP_SEL_0111_AIN7' // @Param[in]='@param[in] rtd_ainp = channel RTD high side sense, default=AINP_SEL_1000_AIN8' // @Param[in]='@param[in] rtd_ainn = channel RTD low side, default=AINN_SEL_1001_AIN9' // @Param[out]='' // @Post='@post AINcode[rtd_ainp]: measurement result LSB code' - // @Post='@post rtd_resistance: measurement result resistance in Ohms' - // @Post='@post RTD_Temperature: Temperature calculated from RTD Resistance; Thermocouple Cold Junction, in degrees C' - // displayPost='rtd_resistance, RTD_Temperature' + // @Post='@post rtd_ohm: measurement result resistance in Ohms' + // @Post='@post rtd_degc: Temperature calculated from RTD Resistance; Thermocouple Cold Junction, in degrees C' + // displayPost='rtd_ohm, rtd_degc' // @Return='@return resistance calculated from raw LSB code and reference resistance' // parse argument list // argname default_argvalue symbolic enum name specified in CommandDocParamIn @Param[in]='@param[in] rtd_iout = channel RTD high side force, default=AINP_SEL_0111_AIN7' @@ -1164,9 +1198,9 @@ // call function Measure_RTD(rtd_iout, rtd_ainp, rtd_ainn) double result = g_MAX11410_device.Measure_RTD(rtd_iout, rtd_ainp, rtd_ainn); cmdLine.serial().printf(" =%f\r\n", result); - // Menu item 'R' -> rtd_resistance, RTD_Temperature - cmdLine.serial().printf("%s=%1.6f\r\n", "rtd_resistance", g_MAX11410_device.rtd_resistance); - cmdLine.serial().printf("%s=%1.6f\r\n", "RTD_Temperature", g_MAX11410_device.RTD_Temperature); + // Menu item 'R' -> rtd_ohm, rtd_degc + cmdLine.serial().printf("%s=%1.6f\r\n", "rtd_ohm", g_MAX11410_device.rtd_ohm); + cmdLine.serial().printf("%s=%1.6f\r\n", "rtd_degc", g_MAX11410_device.rtd_degc); return true; // command handled by MAX11410 // CODE GENERATOR: bottom of loop: testMenuCommand="R", testMenuFirstCharHandler="None" } // end case 'R' @@ -1187,9 +1221,9 @@ // CODE GENERATOR: CommandDocParamIn '@param[in] rtd_ainn = channel RTD low side, default=AINN_SEL_1001_AIN9' // CODE GENERATOR: CommandDocParamOut '' // CODE GENERATOR: CommandPost '@post AINcode[tc_ainp]: measurement result LSB code' -// CODE GENERATOR: CommandPost '@post tc_voltage: raw thermocouple voltage in Volts' -// CODE GENERATOR: CommandPost '@post tc_deltaT: temperature in degC above cold junction' -// CODE GENERATOR: CommandPost '@post tc_Temperature: temperature in degC' +// CODE GENERATOR: CommandPost '@post tc_v: raw thermocouple voltage in Volts' +// CODE GENERATOR: CommandPost '@post tc_delta_degc: temperature in degC above cold junction' +// CODE GENERATOR: CommandPost '@post tc_degc: temperature in degC' // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure' // case 'T': // (single character) (testMenuFirstCharHandler="None") case 'T': @@ -1208,10 +1242,10 @@ // @Param[in]='@param[in] rtd_ainn = channel RTD low side, default=AINN_SEL_1001_AIN9' // @Param[out]='' // @Post='@post AINcode[tc_ainp]: measurement result LSB code' - // @Post='@post tc_voltage: raw thermocouple voltage in Volts' - // @Post='@post tc_deltaT: temperature in degC above cold junction' - // @Post='@post tc_Temperature: temperature in degC' - // displayPost='tc_voltage, tc_deltaT, tc_Temperature' + // @Post='@post tc_v: raw thermocouple voltage in Volts' + // @Post='@post tc_delta_degc: temperature in degC above cold junction' + // @Post='@post tc_degc: temperature in degC' + // displayPost='tc_v, tc_delta_degc, tc_degc' // @Return='@return 1 on success; 0 on failure' // parse argument list // argname default_argvalue symbolic enum name specified in CommandDocParamIn @Param[in]='@param[in] tc_ainp = channel of Thermocouple high side, default=AINP_SEL_0101_AIN5' @@ -1261,10 +1295,10 @@ // call function Measure_Thermocouple(tc_ainp, tc_ainn, rtd_iout, rtd_ainp, rtd_ainn) double result = g_MAX11410_device.Measure_Thermocouple(tc_ainp, tc_ainn, rtd_iout, rtd_ainp, rtd_ainn); cmdLine.serial().printf(" =%f\r\n", result); - // Menu item 'T' -> tc_voltage, tc_deltaT, tc_Temperature - cmdLine.serial().printf("%s=%1.6f\r\n", "tc_voltage", g_MAX11410_device.tc_voltage); - cmdLine.serial().printf("%s=%1.6f\r\n", "tc_deltaT", g_MAX11410_device.tc_deltaT); - cmdLine.serial().printf("%s=%1.6f\r\n", "tc_Temperature", g_MAX11410_device.tc_Temperature); + // Menu item 'T' -> tc_v, tc_delta_degc, tc_degc + cmdLine.serial().printf("%s=%1.6f\r\n", "tc_v", g_MAX11410_device.tc_v); + cmdLine.serial().printf("%s=%1.6f\r\n", "tc_delta_degc", g_MAX11410_device.tc_delta_degc); + cmdLine.serial().printf("%s=%1.6f\r\n", "tc_degc", g_MAX11410_device.tc_degc); return true; // command handled by MAX11410 // CODE GENERATOR: bottom of loop: testMenuCommand="T", testMenuFirstCharHandler="None" } // end case 'T'