Test program running on MAX32625MBED. Control through USB Serial commands using a terminal emulator such as teraterm or putty.

Dependencies:   MaximTinyTester MAX11410 CmdLine USBDevice

Committer:
whismanoid
Date:
Mon Dec 23 03:50:51 2019 +0000
Revision:
42:236e108d8a88
Parent:
41:6f7c8adf9baf
Child:
43:fc6c2817c8dd
mbed Test_Menu_MAX11410.cpp *reg? fix missing return

Who changed what in which revision?

UserRevisionLine numberNew contents of line
whismanoid 35:8aa5dffe523d 1 // /*******************************************************************************
whismanoid 19:8f951e448ab1 2 // * Copyright (C) 2019 Maxim Integrated Products, Inc., All Rights Reserved.
whismanoid 19:8f951e448ab1 3 // *
whismanoid 19:8f951e448ab1 4 // * Permission is hereby granted, free of charge, to any person obtaining a
whismanoid 19:8f951e448ab1 5 // * copy of this software and associated documentation files (the "Software"),
whismanoid 19:8f951e448ab1 6 // * to deal in the Software without restriction, including without limitation
whismanoid 19:8f951e448ab1 7 // * the rights to use, copy, modify, merge, publish, distribute, sublicense,
whismanoid 19:8f951e448ab1 8 // * and/or sell copies of the Software, and to permit persons to whom the
whismanoid 19:8f951e448ab1 9 // * Software is furnished to do so, subject to the following conditions:
whismanoid 19:8f951e448ab1 10 // *
whismanoid 19:8f951e448ab1 11 // * The above copyright notice and this permission notice shall be included
whismanoid 19:8f951e448ab1 12 // * in all copies or substantial portions of the Software.
whismanoid 19:8f951e448ab1 13 // *
whismanoid 19:8f951e448ab1 14 // * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
whismanoid 19:8f951e448ab1 15 // * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
whismanoid 19:8f951e448ab1 16 // * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
whismanoid 19:8f951e448ab1 17 // * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
whismanoid 19:8f951e448ab1 18 // * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
whismanoid 19:8f951e448ab1 19 // * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
whismanoid 19:8f951e448ab1 20 // * OTHER DEALINGS IN THE SOFTWARE.
whismanoid 19:8f951e448ab1 21 // *
whismanoid 19:8f951e448ab1 22 // * Except as contained in this notice, the name of Maxim Integrated
whismanoid 19:8f951e448ab1 23 // * Products, Inc. shall not be used except as stated in the Maxim Integrated
whismanoid 19:8f951e448ab1 24 // * Products, Inc. Branding Policy.
whismanoid 19:8f951e448ab1 25 // *
whismanoid 19:8f951e448ab1 26 // * The mere transfer of this software does not imply any licenses
whismanoid 19:8f951e448ab1 27 // * of trade secrets, proprietary technology, copyrights, patents,
whismanoid 19:8f951e448ab1 28 // * trademarks, maskwork rights, or any other form of intellectual
whismanoid 19:8f951e448ab1 29 // * property whatsoever. Maxim Integrated Products, Inc. retains all
whismanoid 19:8f951e448ab1 30 // * ownership rights.
whismanoid 19:8f951e448ab1 31 // *******************************************************************************
whismanoid 19:8f951e448ab1 32 // */
whismanoid 35:8aa5dffe523d 33 #include "CmdLine.h"
whismanoid 35:8aa5dffe523d 34 // CODE GENERATOR: class declaration and docstrings
whismanoid 35:8aa5dffe523d 35 // CODE GENERATOR: example code includes
whismanoid 35:8aa5dffe523d 36 // example code includes
whismanoid 35:8aa5dffe523d 37 // standard include for target platform -- Platform_Include_Boilerplate
whismanoid 19:8f951e448ab1 38 #include "mbed.h"
whismanoid 35:8aa5dffe523d 39 // Platforms:
whismanoid 35:8aa5dffe523d 40 // - MAX32625MBED
whismanoid 35:8aa5dffe523d 41 // - supports mbed-os-5.11, requires USBDevice library
whismanoid 35:8aa5dffe523d 42 // - add https://developer.mbed.org/teams/MaximIntegrated/code/USBDevice/
whismanoid 35:8aa5dffe523d 43 // - remove max32630fthr library (if present)
whismanoid 35:8aa5dffe523d 44 // - remove MAX32620FTHR library (if present)
whismanoid 35:8aa5dffe523d 45 // - MAX32600MBED
whismanoid 35:8aa5dffe523d 46 // - remove max32630fthr library (if present)
whismanoid 35:8aa5dffe523d 47 // - remove MAX32620FTHR library (if present)
whismanoid 35:8aa5dffe523d 48 // - Windows 10 note: Don't connect HDK until you are ready to load new firmware into the board.
whismanoid 35:8aa5dffe523d 49 // - NUCLEO_F446RE
whismanoid 35:8aa5dffe523d 50 // - remove USBDevice library
whismanoid 35:8aa5dffe523d 51 // - remove max32630fthr library (if present)
whismanoid 35:8aa5dffe523d 52 // - remove MAX32620FTHR library (if present)
whismanoid 35:8aa5dffe523d 53 // - NUCLEO_F401RE
whismanoid 35:8aa5dffe523d 54 // - remove USBDevice library
whismanoid 35:8aa5dffe523d 55 // - remove max32630fthr library (if present)
whismanoid 35:8aa5dffe523d 56 // - remove MAX32620FTHR library (if present)
whismanoid 35:8aa5dffe523d 57 // - MAX32630FTHR
whismanoid 35:8aa5dffe523d 58 // - #include "max32630fthr.h"
whismanoid 35:8aa5dffe523d 59 // - add http://os.mbed.org/teams/MaximIntegrated/code/max32630fthr/
whismanoid 35:8aa5dffe523d 60 // - remove MAX32620FTHR library (if present)
whismanoid 35:8aa5dffe523d 61 // - MAX32620FTHR
whismanoid 35:8aa5dffe523d 62 // - #include "MAX32620FTHR.h"
whismanoid 35:8aa5dffe523d 63 // - remove max32630fthr library (if present)
whismanoid 35:8aa5dffe523d 64 // - add https://os.mbed.com/teams/MaximIntegrated/code/MAX32620FTHR/
whismanoid 35:8aa5dffe523d 65 // - not tested yet
whismanoid 35:8aa5dffe523d 66 // - MAX32625PICO
whismanoid 35:8aa5dffe523d 67 // - remove max32630fthr library (if present)
whismanoid 35:8aa5dffe523d 68 // - remove MAX32620FTHR library (if present)
whismanoid 35:8aa5dffe523d 69 // - not tested yet
whismanoid 35:8aa5dffe523d 70 //
whismanoid 35:8aa5dffe523d 71 // end Platform_Include_Boilerplate
whismanoid 19:8f951e448ab1 72 #include "MAX11410.h"
whismanoid 19:8f951e448ab1 73 #include "CmdLine.h"
whismanoid 35:8aa5dffe523d 74 // CODE GENERATOR: class declaration statement open
whismanoid 19:8f951e448ab1 75
whismanoid 35:8aa5dffe523d 76 // CODE GENERATOR: Test_Menu externs
whismanoid 35:8aa5dffe523d 77 #include "MAX11410.h"
whismanoid 35:8aa5dffe523d 78 extern MAX11410 g_MAX11410_device; // defined in main.cpp
whismanoid 19:8f951e448ab1 79
whismanoid 35:8aa5dffe523d 80 // CODE GENERATOR: build testMenuCommand list
whismanoid 35:8aa5dffe523d 81 // CODE GENERATOR: build testMenuGlobalArgsDict common/global argument list
whismanoid 35:8aa5dffe523d 82 // CODE GENERATOR: class member function declarations
whismanoid 35:8aa5dffe523d 83 // CODE GENERATOR: MAX11410 Command Name = Init (void) --> uint8_t
whismanoid 35:8aa5dffe523d 84 // CODE GENERATOR: Menu item hint description Menu item '!'
whismanoid 35:8aa5dffe523d 85 // CODE GENERATOR: Menu item '!' -- Menu item !
whismanoid 35:8aa5dffe523d 86 // CODE GENERATOR: test menu case '!':
whismanoid 35:8aa5dffe523d 87 // CODE GENERATOR: helpString '! -- Init'
whismanoid 35:8aa5dffe523d 88 // CODE GENERATOR: CMD_ 'None'
whismanoid 35:8aa5dffe523d 89 // CODE GENERATOR: CommandName 'Init'
whismanoid 35:8aa5dffe523d 90 // CODE GENERATOR: CommandParamIn 'void'
whismanoid 35:8aa5dffe523d 91 // CODE GENERATOR: CommandReturnType 'uint8_t'
whismanoid 35:8aa5dffe523d 92 // CODE GENERATOR: CommandPre ''
whismanoid 37:74aa97afa030 93 // CODE GENERATOR: CommandDocParamIn ''
whismanoid 37:74aa97afa030 94 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 35:8aa5dffe523d 95 // CODE GENERATOR: CommandPost ''
whismanoid 35:8aa5dffe523d 96 // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 97 // CODE GENERATOR: MAX11410 Command Name = VoltageOfCode_Unipolar (uint32_t value_u24) --> double
whismanoid 37:74aa97afa030 98 // CODE GENERATOR: no Menu item hint in description
whismanoid 37:74aa97afa030 99 // CODE GENERATOR: MAX11410 Command Name = VoltageOfCode_Bipolar_OffsetBinary (uint32_t value_u24) --> double
whismanoid 37:74aa97afa030 100 // CODE GENERATOR: no Menu item hint in description
whismanoid 37:74aa97afa030 101 // CODE GENERATOR: MAX11410 Command Name = VoltageOfCode_Bipolar_2sComplement (uint32_t value_u24) --> double
whismanoid 37:74aa97afa030 102 // CODE GENERATOR: no Menu item hint in description
whismanoid 37:74aa97afa030 103 // CODE GENERATOR: MAX11410 Command Name = VoltageOfCode (uint32_t value_u24) --> double
whismanoid 35:8aa5dffe523d 104 // CODE GENERATOR: no Menu item hint in description
whismanoid 35:8aa5dffe523d 105 // CODE GENERATOR: MAX11410 Command Name = RegWrite (MAX11410_CMD_enum_t regAddress, uint32_t regData) --> uint8_t
whismanoid 35:8aa5dffe523d 106 // CODE GENERATOR: no Menu item hint in description
whismanoid 35:8aa5dffe523d 107 // CODE GENERATOR: CommandDescriptionCMDWord = CMD_1aaa_aaaa_REGISTER_READ
whismanoid 35:8aa5dffe523d 108 // CODE GENERATOR: MAX11410 Command Name = RegWrite CMD_1aaa_aaaa_REGISTER_READ (MAX11410_CMD_enum_t regAddress, uint32_t regData) --> uint8_t
whismanoid 35:8aa5dffe523d 109 // CODE GENERATOR: MAX11410 Command Name = RegRead (MAX11410_CMD_enum_t regAddress, uint32_t* ptrRegData) --> uint8_t
whismanoid 35:8aa5dffe523d 110 // CODE GENERATOR: no Menu item hint in description
whismanoid 35:8aa5dffe523d 111 // CODE GENERATOR: CommandDescriptionCMDWord = CMD_1aaa_aaaa_REGISTER_READ
whismanoid 35:8aa5dffe523d 112 // CODE GENERATOR: MAX11410 Command Name = RegRead CMD_1aaa_aaaa_REGISTER_READ (MAX11410_CMD_enum_t regAddress, uint32_t* ptrRegData) --> uint8_t
whismanoid 35:8aa5dffe523d 113 // CODE GENERATOR: MAX11410 Command Name = RegSize (MAX11410_CMD_enum_t regAddress) --> uint8_t
whismanoid 35:8aa5dffe523d 114 // CODE GENERATOR: no Menu item hint in description
whismanoid 35:8aa5dffe523d 115 // CODE GENERATOR: MAX11410 Command Name = RegName (MAX11410_CMD_enum_t regAddress) --> const char*
whismanoid 35:8aa5dffe523d 116 // CODE GENERATOR: no Menu item hint in description
whismanoid 37:74aa97afa030 117 // CODE GENERATOR: MAX11410 Command Name = Configure_FILTER (uint8_t linef, uint8_t rate) --> uint8_t
whismanoid 37:74aa97afa030 118 // CODE GENERATOR: Menu item hint description Menu item 'XF'
whismanoid 37:74aa97afa030 119 // CODE GENERATOR: Menu item 'XF' -- Menu item XF
whismanoid 37:74aa97afa030 120 // CODE GENERATOR: MAX11410 help: XF uint8_t linef, uint8_t rate -- Configure_FILTER
whismanoid 37:74aa97afa030 121 // CODE GENERATOR: MAX11410 helpString: 'XF linef=? rate=? -- Configure_FILTER'
whismanoid 37:74aa97afa030 122 // CODE GENERATOR: test menu case 'XF':
whismanoid 37:74aa97afa030 123 // CODE GENERATOR: helpString 'XF linef=? rate=? -- Configure_FILTER'
whismanoid 37:74aa97afa030 124 // CODE GENERATOR: CMD_ 'None'
whismanoid 37:74aa97afa030 125 // CODE GENERATOR: CommandName 'Configure_FILTER'
whismanoid 37:74aa97afa030 126 // CODE GENERATOR: CommandParamIn 'uint8_t linef, uint8_t rate'
whismanoid 37:74aa97afa030 127 // CODE GENERATOR: CommandReturnType 'uint8_t'
whismanoid 37:74aa97afa030 128 // CODE GENERATOR: CommandPre ''
whismanoid 37:74aa97afa030 129 // CODE GENERATOR: CommandDocParamIn '@param[in] linef = filter type, default=MAX11410::MAX11410_LINEF_enum_t::LINEF_11_SINC4'
whismanoid 37:74aa97afa030 130 // CODE GENERATOR: CommandDocParamIn '@param[in] rate = output data rate selection, default=MAX11410::MAX11410_RATE_enum_t::RATE_0100'
whismanoid 37:74aa97afa030 131 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 37:74aa97afa030 132 // CODE GENERATOR: CommandPost ''
whismanoid 37:74aa97afa030 133 // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 134 // CODE GENERATOR: MAX11410 Command Name = Configure_PGA (uint8_t sigpath, uint8_t gain) --> uint8_t
whismanoid 37:74aa97afa030 135 // CODE GENERATOR: Menu item hint description Menu item 'XP'
whismanoid 37:74aa97afa030 136 // CODE GENERATOR: Menu item 'XP' -- Menu item XP
whismanoid 37:74aa97afa030 137 // CODE GENERATOR: MAX11410 help: XP uint8_t sigpath, uint8_t gain -- Configure_PGA
whismanoid 37:74aa97afa030 138 // CODE GENERATOR: MAX11410 helpString: 'XP sigpath=? gain=? -- Configure_PGA'
whismanoid 37:74aa97afa030 139 // CODE GENERATOR: test menu case 'XP':
whismanoid 37:74aa97afa030 140 // CODE GENERATOR: helpString 'XP sigpath=? gain=? -- Configure_PGA'
whismanoid 37:74aa97afa030 141 // CODE GENERATOR: CMD_ 'None'
whismanoid 37:74aa97afa030 142 // CODE GENERATOR: CommandName 'Configure_PGA'
whismanoid 37:74aa97afa030 143 // CODE GENERATOR: CommandParamIn 'uint8_t sigpath, uint8_t gain'
whismanoid 37:74aa97afa030 144 // CODE GENERATOR: CommandReturnType 'uint8_t'
whismanoid 37:74aa97afa030 145 // CODE GENERATOR: CommandPre ''
whismanoid 37:74aa97afa030 146 // CODE GENERATOR: CommandDocParamIn '@param[in] sigpath = signal path, default=MAX11410::MAX11410_SIG_PATH_enum_t::SIG_PATH_00_BUFFERED'
whismanoid 37:74aa97afa030 147 // CODE GENERATOR: CommandDocParamIn '@param[in] gain = gain selection, default=MAX11410::MAX11410_GAIN_enum_t::GAIN_000_1'
whismanoid 37:74aa97afa030 148 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 37:74aa97afa030 149 // CODE GENERATOR: CommandPost ''
whismanoid 37:74aa97afa030 150 // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 151 // CODE GENERATOR: MAX11410 Command Name = Configure_CTRL (uint8_t extclk, uint8_t u_bn, uint8_t format, uint8_t refbufp_en, uint8_t refbufn_en, uint8_t ref_sel) --> uint8_t
whismanoid 37:74aa97afa030 152 // CODE GENERATOR: Menu item hint description Menu item 'XC'
whismanoid 37:74aa97afa030 153 // CODE GENERATOR: Menu item 'XC' -- Menu item XC
whismanoid 37:74aa97afa030 154 // CODE GENERATOR: MAX11410 help: XC uint8_t extclk, uint8_t u_bn, uint8_t format, uint8_t refbufp_en, uint8_t refbufn_en, uint8_t ref_sel -- Configure_CTRL
whismanoid 37:74aa97afa030 155 // CODE GENERATOR: MAX11410 helpString: 'XC extclk=? u_bn=? format=? refbufp_en=? refbufn_en=? ref_sel=? -- Configure_CTRL'
whismanoid 37:74aa97afa030 156 // CODE GENERATOR: test menu case 'XC':
whismanoid 37:74aa97afa030 157 // CODE GENERATOR: helpString 'XC extclk=? u_bn=? format=? refbufp_en=? refbufn_en=? ref_sel=? -- Configure_CTRL'
whismanoid 37:74aa97afa030 158 // CODE GENERATOR: CMD_ 'None'
whismanoid 37:74aa97afa030 159 // CODE GENERATOR: CommandName 'Configure_CTRL'
whismanoid 37:74aa97afa030 160 // CODE GENERATOR: CommandParamIn 'uint8_t extclk, uint8_t u_bn, uint8_t format, uint8_t refbufp_en, uint8_t refbufn_en, uint8_t ref_sel'
whismanoid 37:74aa97afa030 161 // CODE GENERATOR: CommandReturnType 'uint8_t'
whismanoid 37:74aa97afa030 162 // CODE GENERATOR: CommandPre ''
whismanoid 37:74aa97afa030 163 // CODE GENERATOR: CommandDocParamIn '@param[in] extclk = external clock enable, default=0'
whismanoid 37:74aa97afa030 164 // CODE GENERATOR: CommandDocParamIn '@param[in] u_bn = unipolar input range enable, default=0'
whismanoid 37:74aa97afa030 165 // CODE GENERATOR: CommandDocParamIn '@param[in] format = offset binary format enable, default=0'
whismanoid 37:74aa97afa030 166 // CODE GENERATOR: CommandDocParamIn '@param[in] refbufp_en = REFP reference buffer enable, default=0'
whismanoid 37:74aa97afa030 167 // CODE GENERATOR: CommandDocParamIn '@param[in] refbufn_en = REFN reference buffer enable, default=0'
whismanoid 37:74aa97afa030 168 // CODE GENERATOR: CommandDocParamIn '@param[in] ref_sel = reference selection, default=MAX11410::MAX11410_REF_SEL_enum_t::REF_SEL_001_REF1P_REF1N'
whismanoid 37:74aa97afa030 169 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 37:74aa97afa030 170 // CODE GENERATOR: CommandPost ''
whismanoid 37:74aa97afa030 171 // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 172 // CODE GENERATOR: MAX11410 Command Name = Configure_SOURCE (uint8_t vbias_mode, uint8_t brn_mode, uint8_t idac_mode) --> uint8_t
whismanoid 37:74aa97afa030 173 // CODE GENERATOR: Menu item hint description Menu item 'XS'
whismanoid 37:74aa97afa030 174 // CODE GENERATOR: Menu item 'XS' -- Menu item XS
whismanoid 37:74aa97afa030 175 // CODE GENERATOR: MAX11410 help: XS uint8_t vbias_mode, uint8_t brn_mode, uint8_t idac_mode -- Configure_SOURCE
whismanoid 37:74aa97afa030 176 // CODE GENERATOR: MAX11410 helpString: 'XS vbias_mode=? brn_mode=? idac_mode=? -- Configure_SOURCE'
whismanoid 37:74aa97afa030 177 // CODE GENERATOR: test menu case 'XS':
whismanoid 37:74aa97afa030 178 // CODE GENERATOR: helpString 'XS vbias_mode=? brn_mode=? idac_mode=? -- Configure_SOURCE'
whismanoid 37:74aa97afa030 179 // CODE GENERATOR: CMD_ 'None'
whismanoid 37:74aa97afa030 180 // CODE GENERATOR: CommandName 'Configure_SOURCE'
whismanoid 37:74aa97afa030 181 // CODE GENERATOR: CommandParamIn 'uint8_t vbias_mode, uint8_t brn_mode, uint8_t idac_mode'
whismanoid 37:74aa97afa030 182 // CODE GENERATOR: CommandReturnType 'uint8_t'
whismanoid 37:74aa97afa030 183 // CODE GENERATOR: CommandPre ''
whismanoid 37:74aa97afa030 184 // CODE GENERATOR: CommandDocParamIn '@param[in] vbias_mode = _______, default=MAX11410::MAX11410_VBIAS_MODE_enum_t::VBIAS_MODE_00_Active'
whismanoid 37:74aa97afa030 185 // CODE GENERATOR: CommandDocParamIn '@param[in] brn_mode = _______, default=MAX11410::MAX11410_BRN_MODE_enum_t::BRN_MODE_00_disabled'
whismanoid 37:74aa97afa030 186 // CODE GENERATOR: CommandDocParamIn '@param[in] idac_mode = _______, default=MAX11410::MAX11410_IDAC_MODE_enum_t::IDAC_MODE_0000_10uA'
whismanoid 37:74aa97afa030 187 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 37:74aa97afa030 188 // CODE GENERATOR: CommandPost ''
whismanoid 37:74aa97afa030 189 // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 190 // CODE GENERATOR: MAX11410 Command Name = Configure_MUX_CTRL0 (uint8_t ainp, uint8_t ainn) --> uint8_t
whismanoid 37:74aa97afa030 191 // CODE GENERATOR: Menu item hint description Menu item 'XM'
whismanoid 37:74aa97afa030 192 // CODE GENERATOR: Menu item 'XM' -- Menu item XM
whismanoid 37:74aa97afa030 193 // CODE GENERATOR: MAX11410 help: XM uint8_t ainp, uint8_t ainn -- Configure_MUX_CTRL0
whismanoid 37:74aa97afa030 194 // CODE GENERATOR: MAX11410 helpString: 'XM ainp=? ainn=? -- Configure_MUX_CTRL0'
whismanoid 37:74aa97afa030 195 // CODE GENERATOR: test menu case 'XM':
whismanoid 37:74aa97afa030 196 // CODE GENERATOR: helpString 'XM ainp=? ainn=? -- Configure_MUX_CTRL0'
whismanoid 37:74aa97afa030 197 // CODE GENERATOR: CMD_ 'None'
whismanoid 37:74aa97afa030 198 // CODE GENERATOR: CommandName 'Configure_MUX_CTRL0'
whismanoid 37:74aa97afa030 199 // CODE GENERATOR: CommandParamIn 'uint8_t ainp, uint8_t ainn'
whismanoid 37:74aa97afa030 200 // CODE GENERATOR: CommandReturnType 'uint8_t'
whismanoid 37:74aa97afa030 201 // CODE GENERATOR: CommandPre ''
whismanoid 37:74aa97afa030 202 // CODE GENERATOR: CommandDocParamIn '@param[in] ainp = channel high side, default=MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0000_AIN0'
whismanoid 37:74aa97afa030 203 // CODE GENERATOR: CommandDocParamIn '@param[in] ainn = channel low side, default=MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1010_GND'
whismanoid 37:74aa97afa030 204 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 37:74aa97afa030 205 // CODE GENERATOR: CommandPost ''
whismanoid 37:74aa97afa030 206 // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 207 // CODE GENERATOR: MAX11410 Command Name = Configure_MUX_CTRL1 (uint8_t idac1_sel, uint8_t idac0_sel) --> uint8_t
whismanoid 37:74aa97afa030 208 // CODE GENERATOR: Menu item hint description Menu item 'XI'
whismanoid 37:74aa97afa030 209 // CODE GENERATOR: Menu item 'XI' -- Menu item XI
whismanoid 37:74aa97afa030 210 // CODE GENERATOR: MAX11410 help: XI uint8_t idac1_sel, uint8_t idac0_sel -- Configure_MUX_CTRL1
whismanoid 37:74aa97afa030 211 // CODE GENERATOR: MAX11410 helpString: 'XI idac1_sel=? idac0_sel=? -- Configure_MUX_CTRL1'
whismanoid 37:74aa97afa030 212 // CODE GENERATOR: test menu case 'XI':
whismanoid 37:74aa97afa030 213 // CODE GENERATOR: helpString 'XI idac1_sel=? idac0_sel=? -- Configure_MUX_CTRL1'
whismanoid 37:74aa97afa030 214 // CODE GENERATOR: CMD_ 'None'
whismanoid 37:74aa97afa030 215 // CODE GENERATOR: CommandName 'Configure_MUX_CTRL1'
whismanoid 37:74aa97afa030 216 // CODE GENERATOR: CommandParamIn 'uint8_t idac1_sel, uint8_t idac0_sel'
whismanoid 37:74aa97afa030 217 // CODE GENERATOR: CommandReturnType 'uint8_t'
whismanoid 37:74aa97afa030 218 // CODE GENERATOR: CommandPre ''
whismanoid 37:74aa97afa030 219 // CODE GENERATOR: CommandDocParamIn '@param[in] idac1_sel = channel high side, default=MAX11410::MAX11410_IDAC1_SEL_enum_t::IDAC1_SEL_1111_unconnected'
whismanoid 37:74aa97afa030 220 // CODE GENERATOR: CommandDocParamIn '@param[in] idac0_sel = channel low side, default=MAX11410::MAX11410_IDAC0_SEL_enum_t::IDAC0_SEL_1111_unconnected'
whismanoid 37:74aa97afa030 221 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 37:74aa97afa030 222 // CODE GENERATOR: CommandPost ''
whismanoid 37:74aa97afa030 223 // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 224 // CODE GENERATOR: MAX11410 Command Name = Configure_MUX_CTRL2 (uint8_t vbias_ain7_ain0_bitmap) --> uint8_t
whismanoid 37:74aa97afa030 225 // CODE GENERATOR: Menu item hint description Menu item 'XV'
whismanoid 37:74aa97afa030 226 // CODE GENERATOR: Menu item 'XV' -- Menu item XV
whismanoid 37:74aa97afa030 227 // CODE GENERATOR: MAX11410 help: XV uint8_t vbias_ain7_ain0_bitmap -- Configure_MUX_CTRL2
whismanoid 37:74aa97afa030 228 // CODE GENERATOR: MAX11410 helpString: 'XV vbias_ain7_ain0_bitmap=? -- Configure_MUX_CTRL2'
whismanoid 37:74aa97afa030 229 // CODE GENERATOR: test menu case 'XV':
whismanoid 37:74aa97afa030 230 // CODE GENERATOR: helpString 'XV vbias_ain7_ain0_bitmap=? -- Configure_MUX_CTRL2'
whismanoid 37:74aa97afa030 231 // CODE GENERATOR: CMD_ 'None'
whismanoid 37:74aa97afa030 232 // CODE GENERATOR: CommandName 'Configure_MUX_CTRL2'
whismanoid 37:74aa97afa030 233 // CODE GENERATOR: CommandParamIn 'uint8_t vbias_ain7_ain0_bitmap'
whismanoid 37:74aa97afa030 234 // CODE GENERATOR: CommandReturnType 'uint8_t'
whismanoid 37:74aa97afa030 235 // CODE GENERATOR: CommandPre ''
whismanoid 37:74aa97afa030 236 // CODE GENERATOR: CommandDocParamIn '@param[in] vbias_ain7_ain0_bitmap = bit map of AIN7..AIN0 enables for voltage bias, default=0'
whismanoid 37:74aa97afa030 237 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 37:74aa97afa030 238 // CODE GENERATOR: CommandPost ''
whismanoid 37:74aa97afa030 239 // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 240 // CODE GENERATOR: MAX11410 Command Name = Calibrate_Self_Offset_Gain (void) --> uint8_t
whismanoid 37:74aa97afa030 241 // CODE GENERATOR: Menu item hint description Menu item 'X0'
whismanoid 37:74aa97afa030 242 // CODE GENERATOR: Menu item 'X0' -- Menu item X0
whismanoid 37:74aa97afa030 243 // CODE GENERATOR: test menu case 'X0':
whismanoid 37:74aa97afa030 244 // CODE GENERATOR: helpString 'X0 -- Calibrate_Self_Offset_Gain'
whismanoid 37:74aa97afa030 245 // CODE GENERATOR: CMD_ 'None'
whismanoid 37:74aa97afa030 246 // CODE GENERATOR: CommandName 'Calibrate_Self_Offset_Gain'
whismanoid 37:74aa97afa030 247 // CODE GENERATOR: CommandParamIn 'void'
whismanoid 37:74aa97afa030 248 // CODE GENERATOR: CommandReturnType 'uint8_t'
whismanoid 37:74aa97afa030 249 // CODE GENERATOR: CommandPre ''
whismanoid 37:74aa97afa030 250 // CODE GENERATOR: CommandDocParamIn ''
whismanoid 37:74aa97afa030 251 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 37:74aa97afa030 252 // CODE GENERATOR: CommandPost ''
whismanoid 37:74aa97afa030 253 // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 254 // CODE GENERATOR: MAX11410 Command Name = Calibrate_PGA_Gain (void) --> uint8_t
whismanoid 37:74aa97afa030 255 // CODE GENERATOR: Menu item hint description Menu item 'X1'
whismanoid 37:74aa97afa030 256 // CODE GENERATOR: Menu item 'X1' -- Menu item X1
whismanoid 37:74aa97afa030 257 // CODE GENERATOR: test menu case 'X1':
whismanoid 37:74aa97afa030 258 // CODE GENERATOR: helpString 'X1 -- Calibrate_PGA_Gain'
whismanoid 37:74aa97afa030 259 // CODE GENERATOR: CMD_ 'None'
whismanoid 37:74aa97afa030 260 // CODE GENERATOR: CommandName 'Calibrate_PGA_Gain'
whismanoid 37:74aa97afa030 261 // CODE GENERATOR: CommandParamIn 'void'
whismanoid 37:74aa97afa030 262 // CODE GENERATOR: CommandReturnType 'uint8_t'
whismanoid 37:74aa97afa030 263 // CODE GENERATOR: CommandPre ''
whismanoid 37:74aa97afa030 264 // CODE GENERATOR: CommandDocParamIn ''
whismanoid 37:74aa97afa030 265 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 37:74aa97afa030 266 // CODE GENERATOR: CommandPost ''
whismanoid 37:74aa97afa030 267 // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 268 // CODE GENERATOR: MAX11410 Command Name = Calibrate_System_Offset_A (void) --> uint8_t
whismanoid 37:74aa97afa030 269 // CODE GENERATOR: Menu item hint description Menu item 'X4'
whismanoid 37:74aa97afa030 270 // CODE GENERATOR: Menu item 'X4' -- Menu item X4
whismanoid 37:74aa97afa030 271 // CODE GENERATOR: test menu case 'X4':
whismanoid 37:74aa97afa030 272 // CODE GENERATOR: helpString 'X4 -- Calibrate_System_Offset_A'
whismanoid 37:74aa97afa030 273 // CODE GENERATOR: CMD_ 'None'
whismanoid 37:74aa97afa030 274 // CODE GENERATOR: CommandName 'Calibrate_System_Offset_A'
whismanoid 37:74aa97afa030 275 // CODE GENERATOR: CommandParamIn 'void'
whismanoid 37:74aa97afa030 276 // CODE GENERATOR: CommandReturnType 'uint8_t'
whismanoid 37:74aa97afa030 277 // CODE GENERATOR: CommandPre ''
whismanoid 37:74aa97afa030 278 // CODE GENERATOR: CommandDocParamIn ''
whismanoid 37:74aa97afa030 279 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 37:74aa97afa030 280 // CODE GENERATOR: CommandPost ''
whismanoid 37:74aa97afa030 281 // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 282 // CODE GENERATOR: MAX11410 Command Name = Calibrate_System_Gain_A (void) --> uint8_t
whismanoid 37:74aa97afa030 283 // CODE GENERATOR: Menu item hint description Menu item 'X5'
whismanoid 37:74aa97afa030 284 // CODE GENERATOR: Menu item 'X5' -- Menu item X5
whismanoid 37:74aa97afa030 285 // CODE GENERATOR: test menu case 'X5':
whismanoid 37:74aa97afa030 286 // CODE GENERATOR: helpString 'X5 -- Calibrate_System_Gain_A'
whismanoid 37:74aa97afa030 287 // CODE GENERATOR: CMD_ 'None'
whismanoid 37:74aa97afa030 288 // CODE GENERATOR: CommandName 'Calibrate_System_Gain_A'
whismanoid 37:74aa97afa030 289 // CODE GENERATOR: CommandParamIn 'void'
whismanoid 37:74aa97afa030 290 // CODE GENERATOR: CommandReturnType 'uint8_t'
whismanoid 37:74aa97afa030 291 // CODE GENERATOR: CommandPre ''
whismanoid 37:74aa97afa030 292 // CODE GENERATOR: CommandDocParamIn ''
whismanoid 37:74aa97afa030 293 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 37:74aa97afa030 294 // CODE GENERATOR: CommandPost ''
whismanoid 37:74aa97afa030 295 // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 296 // CODE GENERATOR: MAX11410 Command Name = Calibrate_System_Offset_B (void) --> uint8_t
whismanoid 37:74aa97afa030 297 // CODE GENERATOR: Menu item hint description Menu item 'X6'
whismanoid 37:74aa97afa030 298 // CODE GENERATOR: Menu item 'X6' -- Menu item X6
whismanoid 37:74aa97afa030 299 // CODE GENERATOR: test menu case 'X6':
whismanoid 37:74aa97afa030 300 // CODE GENERATOR: helpString 'X6 -- Calibrate_System_Offset_B'
whismanoid 37:74aa97afa030 301 // CODE GENERATOR: CMD_ 'None'
whismanoid 37:74aa97afa030 302 // CODE GENERATOR: CommandName 'Calibrate_System_Offset_B'
whismanoid 37:74aa97afa030 303 // CODE GENERATOR: CommandParamIn 'void'
whismanoid 37:74aa97afa030 304 // CODE GENERATOR: CommandReturnType 'uint8_t'
whismanoid 37:74aa97afa030 305 // CODE GENERATOR: CommandPre ''
whismanoid 37:74aa97afa030 306 // CODE GENERATOR: CommandDocParamIn ''
whismanoid 37:74aa97afa030 307 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 37:74aa97afa030 308 // CODE GENERATOR: CommandPost ''
whismanoid 37:74aa97afa030 309 // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 310 // CODE GENERATOR: MAX11410 Command Name = Calibrate_System_Gain_B (void) --> uint8_t
whismanoid 37:74aa97afa030 311 // CODE GENERATOR: Menu item hint description Menu item 'X7'
whismanoid 37:74aa97afa030 312 // CODE GENERATOR: Menu item 'X7' -- Menu item X7
whismanoid 37:74aa97afa030 313 // CODE GENERATOR: test menu case 'X7':
whismanoid 37:74aa97afa030 314 // CODE GENERATOR: helpString 'X7 -- Calibrate_System_Gain_B'
whismanoid 37:74aa97afa030 315 // CODE GENERATOR: CMD_ 'None'
whismanoid 37:74aa97afa030 316 // CODE GENERATOR: CommandName 'Calibrate_System_Gain_B'
whismanoid 37:74aa97afa030 317 // CODE GENERATOR: CommandParamIn 'void'
whismanoid 37:74aa97afa030 318 // CODE GENERATOR: CommandReturnType 'uint8_t'
whismanoid 37:74aa97afa030 319 // CODE GENERATOR: CommandPre ''
whismanoid 37:74aa97afa030 320 // CODE GENERATOR: CommandDocParamIn ''
whismanoid 37:74aa97afa030 321 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 37:74aa97afa030 322 // CODE GENERATOR: CommandPost ''
whismanoid 37:74aa97afa030 323 // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 324 // CODE GENERATOR: MAX11410 Command Name = Configure_Voltage (MAX11410_AINP_SEL_enum_t ainp, MAX11410_AINN_SEL_enum_t ainn) --> uint8_t
whismanoid 35:8aa5dffe523d 325 // CODE GENERATOR: no Menu item hint in description
whismanoid 37:74aa97afa030 326 // CODE GENERATOR: MAX11410 Command Name = Read_All_Voltages (void) --> uint8_t
whismanoid 37:74aa97afa030 327 // CODE GENERATOR: Menu item hint description Menu item '$'
whismanoid 37:74aa97afa030 328 // CODE GENERATOR: Menu item '$' -- Menu item $
whismanoid 37:74aa97afa030 329 // CODE GENERATOR: test menu case '$':
whismanoid 37:74aa97afa030 330 // CODE GENERATOR: helpString '$ -- Read_All_Voltages'
whismanoid 37:74aa97afa030 331 // CODE GENERATOR: CMD_ 'None'
whismanoid 37:74aa97afa030 332 // CODE GENERATOR: CommandName 'Read_All_Voltages'
whismanoid 37:74aa97afa030 333 // CODE GENERATOR: CommandParamIn 'void'
whismanoid 37:74aa97afa030 334 // CODE GENERATOR: CommandReturnType 'uint8_t'
whismanoid 37:74aa97afa030 335 // CODE GENERATOR: CommandPre ''
whismanoid 37:74aa97afa030 336 // CODE GENERATOR: CommandDocParamIn ''
whismanoid 37:74aa97afa030 337 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 37:74aa97afa030 338 // CODE GENERATOR: CommandPost '@post AINcode[0..9]: measurement result LSB code'
whismanoid 37:74aa97afa030 339 // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 340 // CODE GENERATOR: MAX11410 Command Name = Measure_Voltage (MAX11410_AINP_SEL_enum_t ainp, MAX11410_AINN_SEL_enum_t ainn) --> double
whismanoid 37:74aa97afa030 341 // CODE GENERATOR: Menu item hint description Menu item 'V'
whismanoid 37:74aa97afa030 342 // CODE GENERATOR: Menu item 'V' -- Menu item V
whismanoid 37:74aa97afa030 343 // CODE GENERATOR: MAX11410 help: V MAX11410_AINP_SEL_enum_t ainp, MAX11410_AINN_SEL_enum_t ainn -- Measure_Voltage
whismanoid 37:74aa97afa030 344 // CODE GENERATOR: MAX11410 helpString: 'V -- Measure_Voltage'
whismanoid 37:74aa97afa030 345 // CODE GENERATOR: test menu case 'V':
whismanoid 37:74aa97afa030 346 // CODE GENERATOR: helpString 'V -- Measure_Voltage'
whismanoid 37:74aa97afa030 347 // CODE GENERATOR: CMD_ 'None'
whismanoid 37:74aa97afa030 348 // CODE GENERATOR: CommandName 'Measure_Voltage'
whismanoid 37:74aa97afa030 349 // CODE GENERATOR: CommandParamIn 'MAX11410_AINP_SEL_enum_t ainp, MAX11410_AINN_SEL_enum_t ainn'
whismanoid 37:74aa97afa030 350 // CODE GENERATOR: CommandReturnType 'double'
whismanoid 37:74aa97afa030 351 // CODE GENERATOR: CommandPre '@pre external connection REF2P-REF2N is a reference voltage'
whismanoid 37:74aa97afa030 352 // CODE GENERATOR: CommandPre '@pre VRef = Voltage of REF input, in Volts'
whismanoid 37:74aa97afa030 353 // CODE GENERATOR: CommandDocParamIn '@param[in] ainp = channel high side, default=AINP_SEL_0000_AIN0'
whismanoid 37:74aa97afa030 354 // CODE GENERATOR: CommandDocParamIn '@param[in] ainn = channel low side, default=AINN_SEL_1010_GND'
whismanoid 37:74aa97afa030 355 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 37:74aa97afa030 356 // CODE GENERATOR: CommandPost '@post AINcode[ainp]: measurement result LSB code'
whismanoid 37:74aa97afa030 357 // CODE GENERATOR: CommandReturn '@return ideal voltage calculated from raw LSB code and reference voltage'
whismanoid 37:74aa97afa030 358 // CODE GENERATOR: MAX11410 Command Name = Configure_RTD (MAX11410_AINP_SEL_enum_t rtd_iout, MAX11410_AINP_SEL_enum_t rtd_ainp, MAX11410_AINN_SEL_enum_t rtd_ainn) --> uint8_t
whismanoid 35:8aa5dffe523d 359 // CODE GENERATOR: no Menu item hint in description
whismanoid 37:74aa97afa030 360 // 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
whismanoid 37:74aa97afa030 361 // CODE GENERATOR: Menu item hint description Menu item 'R'
whismanoid 37:74aa97afa030 362 // CODE GENERATOR: Menu item 'R' -- Menu item R
whismanoid 37:74aa97afa030 363 // 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
whismanoid 37:74aa97afa030 364 // CODE GENERATOR: MAX11410 helpString: 'R -- Measure_RTD'
whismanoid 37:74aa97afa030 365 // CODE GENERATOR: test menu case 'R':
whismanoid 37:74aa97afa030 366 // CODE GENERATOR: helpString 'R -- Measure_RTD'
whismanoid 37:74aa97afa030 367 // CODE GENERATOR: CMD_ 'None'
whismanoid 37:74aa97afa030 368 // CODE GENERATOR: CommandName 'Measure_RTD'
whismanoid 37:74aa97afa030 369 // CODE GENERATOR: CommandParamIn 'MAX11410_AINP_SEL_enum_t rtd_iout, MAX11410_AINP_SEL_enum_t rtd_ainp, MAX11410_AINN_SEL_enum_t rtd_ainn'
whismanoid 37:74aa97afa030 370 // CODE GENERATOR: CommandReturnType 'double'
whismanoid 37:74aa97afa030 371 // CODE GENERATOR: CommandPre '@pre external connection REF1P-REF1N is a reference resistor'
whismanoid 37:74aa97afa030 372 // CODE GENERATOR: CommandPre '@pre VRef_REF1 = reference resistance in ohms, default=4999'
whismanoid 37:74aa97afa030 373 // CODE GENERATOR: CommandDocParamIn '@param[in] rtd_iout = channel RTD high side force, default=AINP_SEL_0111_AIN7'
whismanoid 37:74aa97afa030 374 // CODE GENERATOR: CommandDocParamIn '@param[in] rtd_ainp = channel RTD high side sense, default=AINP_SEL_1000_AIN8'
whismanoid 37:74aa97afa030 375 // CODE GENERATOR: CommandDocParamIn '@param[in] rtd_ainn = channel RTD low side, default=AINN_SEL_1001_AIN9'
whismanoid 37:74aa97afa030 376 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 37:74aa97afa030 377 // CODE GENERATOR: CommandPost '@post AINcode[rtd_ainp]: measurement result LSB code'
whismanoid 37:74aa97afa030 378 // CODE GENERATOR: CommandReturn '@return ideal voltage calculated from raw LSB code and reference voltage'
whismanoid 37:74aa97afa030 379 // CODE GENERATOR: MAX11410 Command Name = Configure_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) --> uint8_t
whismanoid 35:8aa5dffe523d 380 // CODE GENERATOR: no Menu item hint in description
whismanoid 37:74aa97afa030 381 // 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
whismanoid 37:74aa97afa030 382 // CODE GENERATOR: Menu item hint description Menu item 'T'
whismanoid 37:74aa97afa030 383 // CODE GENERATOR: Menu item 'T' -- Menu item T
whismanoid 37:74aa97afa030 384 // CODE GENERATOR: MAX11410 help: T 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
whismanoid 37:74aa97afa030 385 // CODE GENERATOR: MAX11410 helpString: 'T -- Measure_Thermocouple'
whismanoid 37:74aa97afa030 386 // CODE GENERATOR: test menu case 'T':
whismanoid 37:74aa97afa030 387 // CODE GENERATOR: helpString 'T -- Measure_Thermocouple'
whismanoid 37:74aa97afa030 388 // CODE GENERATOR: CMD_ 'None'
whismanoid 37:74aa97afa030 389 // CODE GENERATOR: CommandName 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 390 // CODE GENERATOR: CommandParamIn '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'
whismanoid 37:74aa97afa030 391 // CODE GENERATOR: CommandReturnType 'double'
whismanoid 37:74aa97afa030 392 // CODE GENERATOR: CommandPre ''
whismanoid 37:74aa97afa030 393 // CODE GENERATOR: CommandDocParamIn '@param[in] tc_ainp = channel of Thermocouple high side, default=AINP_SEL_0101_AIN5'
whismanoid 37:74aa97afa030 394 // CODE GENERATOR: CommandDocParamIn '@param[in] tc_ainn = channel of Thermocouple low side, default=AINN_SEL_0110_AIN6'
whismanoid 37:74aa97afa030 395 // CODE GENERATOR: CommandDocParamIn '@param[in] rtd_iout = channel RTD high side force, default=AINP_SEL_0111_AIN7'
whismanoid 37:74aa97afa030 396 // CODE GENERATOR: CommandDocParamIn '@param[in] rtd_ainp = channel RTD high side sense, default=AINP_SEL_1000_AIN8'
whismanoid 37:74aa97afa030 397 // CODE GENERATOR: CommandDocParamIn '@param[in] rtd_ainn = channel RTD low side, default=AINN_SEL_1001_AIN9'
whismanoid 37:74aa97afa030 398 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 37:74aa97afa030 399 // CODE GENERATOR: CommandPost '@post AINcode[tc_ainp]: measurement result LSB code'
whismanoid 37:74aa97afa030 400 // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure'
whismanoid 35:8aa5dffe523d 401 // CODE GENERATOR: testMenuGlobalArgsDict scan global property list g_MAX11410_device
whismanoid 35:8aa5dffe523d 402
whismanoid 37:74aa97afa030 403 // CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.VRef_REF0
whismanoid 37:74aa97afa030 404 // CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.VRef_REF0 argname = VRef_REF0
whismanoid 37:74aa97afa030 405 // CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF0']['alias'] = 'None'
whismanoid 37:74aa97afa030 406 // CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF0']['argtype'] = 'double'
whismanoid 37:74aa97afa030 407 // CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF0']['usedByCommandName'] = 'None'
whismanoid 37:74aa97afa030 408 // CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF0']['usedBytestMenuItemName'] = 'None'
whismanoid 37:74aa97afa030 409
whismanoid 37:74aa97afa030 410 // CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.VRef_REF1
whismanoid 37:74aa97afa030 411 // CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.VRef_REF1 argname = VRef_REF1
whismanoid 37:74aa97afa030 412 // CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF1']['alias'] = 'None'
whismanoid 37:74aa97afa030 413 // CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF1']['argtype'] = 'double'
whismanoid 37:74aa97afa030 414 // CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF1']['usedByCommandName'] = 'None'
whismanoid 37:74aa97afa030 415 // CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF1']['usedBytestMenuItemName'] = 'None'
whismanoid 37:74aa97afa030 416
whismanoid 37:74aa97afa030 417 // CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.VRef_REF2
whismanoid 37:74aa97afa030 418 // CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.VRef_REF2 argname = VRef_REF2
whismanoid 37:74aa97afa030 419 // CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF2']['alias'] = 'None'
whismanoid 37:74aa97afa030 420 // CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF2']['argtype'] = 'double'
whismanoid 37:74aa97afa030 421 // CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF2']['usedByCommandName'] = 'None'
whismanoid 37:74aa97afa030 422 // CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF2']['usedBytestMenuItemName'] = 'None'
whismanoid 37:74aa97afa030 423
whismanoid 37:74aa97afa030 424 // CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.VRef_AVDD
whismanoid 37:74aa97afa030 425 // CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.VRef_AVDD argname = VRef_AVDD
whismanoid 37:74aa97afa030 426 // CODE GENERATOR: testMenuGlobalArgsDict['VRef_AVDD']['alias'] = 'None'
whismanoid 37:74aa97afa030 427 // CODE GENERATOR: testMenuGlobalArgsDict['VRef_AVDD']['argtype'] = 'double'
whismanoid 37:74aa97afa030 428 // CODE GENERATOR: testMenuGlobalArgsDict['VRef_AVDD']['usedByCommandName'] = 'None'
whismanoid 37:74aa97afa030 429 // CODE GENERATOR: testMenuGlobalArgsDict['VRef_AVDD']['usedBytestMenuItemName'] = 'None'
whismanoid 37:74aa97afa030 430
whismanoid 37:74aa97afa030 431 // CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.ctrl
whismanoid 37:74aa97afa030 432 // CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.ctrl shadow of argname = ctrl
whismanoid 37:74aa97afa030 433 // CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.ctrl argname = ctrl
whismanoid 37:74aa97afa030 434 // CODE GENERATOR: testMenuGlobalArgsDict['ctrl']['alias'] = 'None'
whismanoid 37:74aa97afa030 435 // CODE GENERATOR: testMenuGlobalArgsDict['ctrl']['argtype'] = 'uint32_t'
whismanoid 37:74aa97afa030 436 // CODE GENERATOR: testMenuGlobalArgsDict['ctrl']['usedByCommandName'] = 'None'
whismanoid 37:74aa97afa030 437 // CODE GENERATOR: testMenuGlobalArgsDict['ctrl']['usedBytestMenuItemName'] = 'None'
whismanoid 37:74aa97afa030 438
whismanoid 37:74aa97afa030 439 // CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.pgaGain
whismanoid 37:74aa97afa030 440 // CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.pgaGain argname = pgaGain
whismanoid 37:74aa97afa030 441 // CODE GENERATOR: testMenuGlobalArgsDict['pgaGain']['alias'] = 'None'
whismanoid 37:74aa97afa030 442 // CODE GENERATOR: testMenuGlobalArgsDict['pgaGain']['argtype'] = 'uint8_t'
whismanoid 37:74aa97afa030 443 // CODE GENERATOR: testMenuGlobalArgsDict['pgaGain']['usedByCommandName'] = 'None'
whismanoid 37:74aa97afa030 444 // CODE GENERATOR: testMenuGlobalArgsDict['pgaGain']['usedBytestMenuItemName'] = 'None'
whismanoid 35:8aa5dffe523d 445
whismanoid 35:8aa5dffe523d 446 // CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.status
whismanoid 35:8aa5dffe523d 447 // CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.status shadow of argname = status
whismanoid 35:8aa5dffe523d 448 // CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.status argname = status
whismanoid 35:8aa5dffe523d 449 // CODE GENERATOR: testMenuGlobalArgsDict['status']['alias'] = 'None'
whismanoid 35:8aa5dffe523d 450 // CODE GENERATOR: testMenuGlobalArgsDict['status']['argtype'] = 'uint32_t'
whismanoid 35:8aa5dffe523d 451 // CODE GENERATOR: testMenuGlobalArgsDict['status']['usedByCommandName'] = 'None'
whismanoid 35:8aa5dffe523d 452 // CODE GENERATOR: testMenuGlobalArgsDict['status']['usedBytestMenuItemName'] = 'None'
whismanoid 35:8aa5dffe523d 453
whismanoid 35:8aa5dffe523d 454 // CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.data0
whismanoid 35:8aa5dffe523d 455 // CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.data0 shadow of argname = data0
whismanoid 35:8aa5dffe523d 456 // CODE GENERATOR: testMenuGlobalArgsDict add global property g_MAX11410_device.data0 argname = data0
whismanoid 35:8aa5dffe523d 457 // CODE GENERATOR: testMenuGlobalArgsDict['data0']['alias'] = 'None'
whismanoid 35:8aa5dffe523d 458 // CODE GENERATOR: testMenuGlobalArgsDict['data0']['argtype'] = 'uint32_t'
whismanoid 35:8aa5dffe523d 459 // CODE GENERATOR: testMenuGlobalArgsDict['data0']['usedByCommandName'] = 'None'
whismanoid 35:8aa5dffe523d 460 // CODE GENERATOR: testMenuGlobalArgsDict['data0']['usedBytestMenuItemName'] = 'None'
whismanoid 35:8aa5dffe523d 461
whismanoid 37:74aa97afa030 462 // CODE GENERATOR: testMenuGlobalArgsDict skip array property g_MAX11410_device.AINcode[10]
whismanoid 35:8aa5dffe523d 463
whismanoid 35:8aa5dffe523d 464 // CODE GENERATOR: scan testMenuCommand list for items that can be shortened to single character
whismanoid 37:74aa97afa030 465 // CODE GENERATOR: multiple commands begin with character 'X'
whismanoid 37:74aa97afa030 466 // CODE GENERATOR: multiple commands begin with character 'X'
whismanoid 37:74aa97afa030 467 // CODE GENERATOR: multiple commands begin with character 'X'
whismanoid 37:74aa97afa030 468 // CODE GENERATOR: multiple commands begin with character 'X'
whismanoid 37:74aa97afa030 469 // CODE GENERATOR: multiple commands begin with character 'X'
whismanoid 37:74aa97afa030 470 // CODE GENERATOR: multiple commands begin with character 'X'
whismanoid 37:74aa97afa030 471 // CODE GENERATOR: multiple commands begin with character 'X'
whismanoid 37:74aa97afa030 472 // CODE GENERATOR: multiple commands begin with character 'X'
whismanoid 37:74aa97afa030 473 // CODE GENERATOR: multiple commands begin with character 'X'
whismanoid 37:74aa97afa030 474 // CODE GENERATOR: multiple commands begin with character 'X'
whismanoid 37:74aa97afa030 475 // CODE GENERATOR: multiple commands begin with character 'X'
whismanoid 37:74aa97afa030 476 // CODE GENERATOR: multiple commands begin with character 'X'
whismanoid 35:8aa5dffe523d 477 // CODE GENERATOR: shorten testMenuCommand to single character if unambiguous
whismanoid 35:8aa5dffe523d 478 // CODE GENERATOR: testMenuCommand '!' already single character
whismanoid 37:74aa97afa030 479 // CODE GENERATOR: testMenuCommand '$' already single character
whismanoid 37:74aa97afa030 480 // CODE GENERATOR: testMenuCommand 'R' already single character
whismanoid 37:74aa97afa030 481 // CODE GENERATOR: testMenuCommand 'T' already single character
whismanoid 37:74aa97afa030 482 // CODE GENERATOR: testMenuCommand 'V' already single character
whismanoid 37:74aa97afa030 483 // CODE GENERATOR: cannot shorten testMenuCommand 'X0' to single character due to duplicates
whismanoid 37:74aa97afa030 484 // CODE GENERATOR: cannot shorten testMenuCommand 'X1' to single character due to duplicates
whismanoid 37:74aa97afa030 485 // CODE GENERATOR: cannot shorten testMenuCommand 'X4' to single character due to duplicates
whismanoid 37:74aa97afa030 486 // CODE GENERATOR: cannot shorten testMenuCommand 'X5' to single character due to duplicates
whismanoid 37:74aa97afa030 487 // CODE GENERATOR: cannot shorten testMenuCommand 'X6' to single character due to duplicates
whismanoid 37:74aa97afa030 488 // CODE GENERATOR: cannot shorten testMenuCommand 'X7' to single character due to duplicates
whismanoid 37:74aa97afa030 489 // CODE GENERATOR: cannot shorten testMenuCommand 'XC' to single character due to duplicates
whismanoid 37:74aa97afa030 490 // CODE GENERATOR: cannot shorten testMenuCommand 'XF' to single character due to duplicates
whismanoid 37:74aa97afa030 491 // CODE GENERATOR: cannot shorten testMenuCommand 'XI' to single character due to duplicates
whismanoid 37:74aa97afa030 492 // CODE GENERATOR: cannot shorten testMenuCommand 'XM' to single character due to duplicates
whismanoid 37:74aa97afa030 493 // CODE GENERATOR: cannot shorten testMenuCommand 'XP' to single character due to duplicates
whismanoid 37:74aa97afa030 494 // CODE GENERATOR: cannot shorten testMenuCommand 'XS' to single character due to duplicates
whismanoid 37:74aa97afa030 495 // CODE GENERATOR: cannot shorten testMenuCommand 'XV' to single character due to duplicates
whismanoid 35:8aa5dffe523d 496
whismanoid 35:8aa5dffe523d 497 // CODE GENERATOR: help menu
whismanoid 35:8aa5dffe523d 498 bool MAX11410_menu_help(CmdLine & cmdLine)
whismanoid 35:8aa5dffe523d 499 {
whismanoid 35:8aa5dffe523d 500 // CODE GENERATOR: command: !
whismanoid 35:8aa5dffe523d 501 // CODE GENERATOR: help: ! -- Init
whismanoid 35:8aa5dffe523d 502 cmdLine.serial().printf("\r\n ! -- Init");
whismanoid 37:74aa97afa030 503 // CODE GENERATOR: command: $
whismanoid 37:74aa97afa030 504 // CODE GENERATOR: help: $ -- Read_All_Voltages
whismanoid 37:74aa97afa030 505 cmdLine.serial().printf("\r\n $ -- Read_All_Voltages");
whismanoid 37:74aa97afa030 506 // CODE GENERATOR: command: R
whismanoid 37:74aa97afa030 507 // CODE GENERATOR: help: R -- Measure_RTD
whismanoid 37:74aa97afa030 508 cmdLine.serial().printf("\r\n R -- Measure_RTD");
whismanoid 37:74aa97afa030 509 // CODE GENERATOR: command: T
whismanoid 37:74aa97afa030 510 // CODE GENERATOR: help: T -- Measure_Thermocouple
whismanoid 37:74aa97afa030 511 cmdLine.serial().printf("\r\n T -- Measure_Thermocouple");
whismanoid 37:74aa97afa030 512 // CODE GENERATOR: command: V
whismanoid 37:74aa97afa030 513 // CODE GENERATOR: help: V -- Measure_Voltage
whismanoid 37:74aa97afa030 514 cmdLine.serial().printf("\r\n V -- Measure_Voltage");
whismanoid 37:74aa97afa030 515 // CODE GENERATOR: command: X0
whismanoid 37:74aa97afa030 516 // CODE GENERATOR: help: X0 -- Calibrate_Self_Offset_Gain
whismanoid 37:74aa97afa030 517 cmdLine.serial().printf("\r\n X0 -- Calibrate_Self_Offset_Gain");
whismanoid 37:74aa97afa030 518 // CODE GENERATOR: command: X1
whismanoid 37:74aa97afa030 519 // CODE GENERATOR: help: X1 -- Calibrate_PGA_Gain
whismanoid 37:74aa97afa030 520 cmdLine.serial().printf("\r\n X1 -- Calibrate_PGA_Gain");
whismanoid 37:74aa97afa030 521 // CODE GENERATOR: command: X4
whismanoid 37:74aa97afa030 522 // CODE GENERATOR: help: X4 -- Calibrate_System_Offset_A
whismanoid 37:74aa97afa030 523 cmdLine.serial().printf("\r\n X4 -- Calibrate_System_Offset_A");
whismanoid 37:74aa97afa030 524 // CODE GENERATOR: command: X5
whismanoid 37:74aa97afa030 525 // CODE GENERATOR: help: X5 -- Calibrate_System_Gain_A
whismanoid 37:74aa97afa030 526 cmdLine.serial().printf("\r\n X5 -- Calibrate_System_Gain_A");
whismanoid 37:74aa97afa030 527 // CODE GENERATOR: command: X6
whismanoid 37:74aa97afa030 528 // CODE GENERATOR: help: X6 -- Calibrate_System_Offset_B
whismanoid 37:74aa97afa030 529 cmdLine.serial().printf("\r\n X6 -- Calibrate_System_Offset_B");
whismanoid 37:74aa97afa030 530 // CODE GENERATOR: command: X7
whismanoid 37:74aa97afa030 531 // CODE GENERATOR: help: X7 -- Calibrate_System_Gain_B
whismanoid 37:74aa97afa030 532 cmdLine.serial().printf("\r\n X7 -- Calibrate_System_Gain_B");
whismanoid 37:74aa97afa030 533 // CODE GENERATOR: command: XC
whismanoid 37:74aa97afa030 534 // CODE GENERATOR: help: XC extclk=? u_bn=? format=? refbufp_en=? refbufn_en=? ref_sel=? -- Configure_CTRL
whismanoid 37:74aa97afa030 535 cmdLine.serial().printf("\r\n XC extclk=? u_bn=? format=? refbufp_en=? refbufn_en=? ref_sel=? -- Configure_CTRL");
whismanoid 37:74aa97afa030 536 // CODE GENERATOR: command: XF
whismanoid 37:74aa97afa030 537 // CODE GENERATOR: help: XF linef=? rate=? -- Configure_FILTER
whismanoid 37:74aa97afa030 538 cmdLine.serial().printf("\r\n XF linef=? rate=? -- Configure_FILTER");
whismanoid 37:74aa97afa030 539 // CODE GENERATOR: command: XI
whismanoid 37:74aa97afa030 540 // CODE GENERATOR: help: XI idac1_sel=? idac0_sel=? -- Configure_MUX_CTRL1
whismanoid 37:74aa97afa030 541 cmdLine.serial().printf("\r\n XI idac1_sel=? idac0_sel=? -- Configure_MUX_CTRL1");
whismanoid 37:74aa97afa030 542 // CODE GENERATOR: command: XM
whismanoid 37:74aa97afa030 543 // CODE GENERATOR: help: XM ainp=? ainn=? -- Configure_MUX_CTRL0
whismanoid 37:74aa97afa030 544 cmdLine.serial().printf("\r\n XM ainp=? ainn=? -- Configure_MUX_CTRL0");
whismanoid 37:74aa97afa030 545 // CODE GENERATOR: command: XP
whismanoid 37:74aa97afa030 546 // CODE GENERATOR: help: XP sigpath=? gain=? -- Configure_PGA
whismanoid 37:74aa97afa030 547 cmdLine.serial().printf("\r\n XP sigpath=? gain=? -- Configure_PGA");
whismanoid 37:74aa97afa030 548 // CODE GENERATOR: command: XS
whismanoid 37:74aa97afa030 549 // CODE GENERATOR: help: XS vbias_mode=? brn_mode=? idac_mode=? -- Configure_SOURCE
whismanoid 37:74aa97afa030 550 cmdLine.serial().printf("\r\n XS vbias_mode=? brn_mode=? idac_mode=? -- Configure_SOURCE");
whismanoid 37:74aa97afa030 551 // CODE GENERATOR: command: XV
whismanoid 37:74aa97afa030 552 // CODE GENERATOR: help: XV vbias_ain7_ain0_bitmap=? -- Configure_MUX_CTRL2
whismanoid 37:74aa97afa030 553 cmdLine.serial().printf("\r\n XV vbias_ain7_ain0_bitmap=? -- Configure_MUX_CTRL2");
whismanoid 35:8aa5dffe523d 554 //
whismanoid 35:8aa5dffe523d 555 cmdLine.serial().printf("\r\n @ -- print MAX11410 configuration");
whismanoid 37:74aa97afa030 556 // CODE GENERATOR: help menu if has_register_write_command: *regname? -- read register; *regname=regvalue -- write register
whismanoid 37:74aa97afa030 557 cmdLine.serial().printf("\r\n *regname? -- read register\r\n *regname=regvalue -- write register");
whismanoid 35:8aa5dffe523d 558 //
whismanoid 35:8aa5dffe523d 559 }
whismanoid 19:8f951e448ab1 560
whismanoid 19:8f951e448ab1 561 bool MAX11410_menu_onEOLcommandParser(CmdLine & cmdLine)
whismanoid 19:8f951e448ab1 562 {
whismanoid 35:8aa5dffe523d 563
whismanoid 35:8aa5dffe523d 564 // CODE GENERATOR: testMenuGlobalArgsDict Consolidate common/global argument parsing
whismanoid 35:8aa5dffe523d 565
whismanoid 37:74aa97afa030 566 // CODE GENERATOR: testMenuGlobalArgsDict['VRef_AVDD']['alias'] = 'None'
whismanoid 37:74aa97afa030 567 // CODE GENERATOR: testMenuGlobalArgsDict['VRef_AVDD']['argtype'] = 'double'
whismanoid 37:74aa97afa030 568 // CODE GENERATOR: testMenuGlobalArgsDict['VRef_AVDD']['usedByCommandName'] = 'None'
whismanoid 37:74aa97afa030 569 // CODE GENERATOR: testMenuGlobalArgsDict['VRef_AVDD']['usedBytestMenuItemName'] = 'None'
whismanoid 37:74aa97afa030 570 // parse argument double VRef_AVDD
whismanoid 37:74aa97afa030 571 double VRef_AVDD = g_MAX11410_device.VRef_AVDD; // default to global property value
whismanoid 37:74aa97afa030 572 if (cmdLine.parse_double("VRef_AVDD", VRef_AVDD))
whismanoid 37:74aa97afa030 573 {
whismanoid 37:74aa97afa030 574 g_MAX11410_device.VRef_AVDD = VRef_AVDD; // update global property value
whismanoid 37:74aa97afa030 575 }
whismanoid 37:74aa97afa030 576
whismanoid 37:74aa97afa030 577 // CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF0']['alias'] = 'None'
whismanoid 37:74aa97afa030 578 // CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF0']['argtype'] = 'double'
whismanoid 37:74aa97afa030 579 // CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF0']['usedByCommandName'] = 'None'
whismanoid 37:74aa97afa030 580 // CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF0']['usedBytestMenuItemName'] = 'None'
whismanoid 37:74aa97afa030 581 // parse argument double VRef_REF0
whismanoid 37:74aa97afa030 582 double VRef_REF0 = g_MAX11410_device.VRef_REF0; // default to global property value
whismanoid 37:74aa97afa030 583 if (cmdLine.parse_double("VRef_REF0", VRef_REF0))
whismanoid 28:d2ee1c57ff81 584 {
whismanoid 37:74aa97afa030 585 g_MAX11410_device.VRef_REF0 = VRef_REF0; // update global property value
whismanoid 37:74aa97afa030 586 }
whismanoid 37:74aa97afa030 587
whismanoid 37:74aa97afa030 588 // CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF1']['alias'] = 'None'
whismanoid 37:74aa97afa030 589 // CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF1']['argtype'] = 'double'
whismanoid 37:74aa97afa030 590 // CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF1']['usedByCommandName'] = 'None'
whismanoid 37:74aa97afa030 591 // CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF1']['usedBytestMenuItemName'] = 'None'
whismanoid 37:74aa97afa030 592 // parse argument double VRef_REF1
whismanoid 37:74aa97afa030 593 double VRef_REF1 = g_MAX11410_device.VRef_REF1; // default to global property value
whismanoid 37:74aa97afa030 594 if (cmdLine.parse_double("VRef_REF1", VRef_REF1))
whismanoid 37:74aa97afa030 595 {
whismanoid 37:74aa97afa030 596 g_MAX11410_device.VRef_REF1 = VRef_REF1; // update global property value
whismanoid 37:74aa97afa030 597 }
whismanoid 37:74aa97afa030 598
whismanoid 37:74aa97afa030 599 // CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF2']['alias'] = 'None'
whismanoid 37:74aa97afa030 600 // CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF2']['argtype'] = 'double'
whismanoid 37:74aa97afa030 601 // CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF2']['usedByCommandName'] = 'None'
whismanoid 37:74aa97afa030 602 // CODE GENERATOR: testMenuGlobalArgsDict['VRef_REF2']['usedBytestMenuItemName'] = 'None'
whismanoid 37:74aa97afa030 603 // parse argument double VRef_REF2
whismanoid 37:74aa97afa030 604 double VRef_REF2 = g_MAX11410_device.VRef_REF2; // default to global property value
whismanoid 37:74aa97afa030 605 if (cmdLine.parse_double("VRef_REF2", VRef_REF2))
whismanoid 37:74aa97afa030 606 {
whismanoid 37:74aa97afa030 607 g_MAX11410_device.VRef_REF2 = VRef_REF2; // update global property value
whismanoid 37:74aa97afa030 608 }
whismanoid 37:74aa97afa030 609
whismanoid 37:74aa97afa030 610 // CODE GENERATOR: testMenuGlobalArgsDict['ctrl']['alias'] = 'None'
whismanoid 37:74aa97afa030 611 // CODE GENERATOR: testMenuGlobalArgsDict['ctrl']['argtype'] = 'uint32_t'
whismanoid 37:74aa97afa030 612 // CODE GENERATOR: testMenuGlobalArgsDict['ctrl']['usedByCommandName'] = 'None'
whismanoid 37:74aa97afa030 613 // CODE GENERATOR: testMenuGlobalArgsDict['ctrl']['usedBytestMenuItemName'] = 'None'
whismanoid 37:74aa97afa030 614 // parse argument uint32_t ctrl
whismanoid 37:74aa97afa030 615 uint32_t ctrl = g_MAX11410_device.ctrl; // default to global property value
whismanoid 37:74aa97afa030 616 if (cmdLine.parse_uint32_dec("ctrl", ctrl))
whismanoid 37:74aa97afa030 617 {
whismanoid 37:74aa97afa030 618 g_MAX11410_device.ctrl = ctrl; // update global property value
whismanoid 28:d2ee1c57ff81 619 }
whismanoid 35:8aa5dffe523d 620
whismanoid 35:8aa5dffe523d 621 // CODE GENERATOR: testMenuGlobalArgsDict['data0']['alias'] = 'None'
whismanoid 35:8aa5dffe523d 622 // CODE GENERATOR: testMenuGlobalArgsDict['data0']['argtype'] = 'uint32_t'
whismanoid 35:8aa5dffe523d 623 // CODE GENERATOR: testMenuGlobalArgsDict['data0']['usedByCommandName'] = 'None'
whismanoid 35:8aa5dffe523d 624 // CODE GENERATOR: testMenuGlobalArgsDict['data0']['usedBytestMenuItemName'] = 'None'
whismanoid 35:8aa5dffe523d 625 // parse argument uint32_t data0
whismanoid 35:8aa5dffe523d 626 uint32_t data0 = g_MAX11410_device.data0; // default to global property value
whismanoid 35:8aa5dffe523d 627 if (cmdLine.parse_uint32_dec("data0", data0))
whismanoid 28:d2ee1c57ff81 628 {
whismanoid 35:8aa5dffe523d 629 g_MAX11410_device.data0 = data0; // update global property value
whismanoid 28:d2ee1c57ff81 630 }
whismanoid 35:8aa5dffe523d 631
whismanoid 37:74aa97afa030 632 // CODE GENERATOR: testMenuGlobalArgsDict['pgaGain']['alias'] = 'None'
whismanoid 37:74aa97afa030 633 // CODE GENERATOR: testMenuGlobalArgsDict['pgaGain']['argtype'] = 'uint8_t'
whismanoid 37:74aa97afa030 634 // CODE GENERATOR: testMenuGlobalArgsDict['pgaGain']['usedByCommandName'] = 'None'
whismanoid 37:74aa97afa030 635 // CODE GENERATOR: testMenuGlobalArgsDict['pgaGain']['usedBytestMenuItemName'] = 'None'
whismanoid 37:74aa97afa030 636 // parse argument uint8_t pgaGain
whismanoid 37:74aa97afa030 637 uint8_t pgaGain = g_MAX11410_device.pgaGain; // default to global property value
whismanoid 37:74aa97afa030 638 if (cmdLine.parse_uint8_dec("pgaGain", pgaGain))
whismanoid 37:74aa97afa030 639 {
whismanoid 37:74aa97afa030 640 g_MAX11410_device.pgaGain = pgaGain; // update global property value
whismanoid 37:74aa97afa030 641 }
whismanoid 37:74aa97afa030 642
whismanoid 35:8aa5dffe523d 643 // CODE GENERATOR: testMenuGlobalArgsDict['status']['alias'] = 'None'
whismanoid 35:8aa5dffe523d 644 // CODE GENERATOR: testMenuGlobalArgsDict['status']['argtype'] = 'uint32_t'
whismanoid 35:8aa5dffe523d 645 // CODE GENERATOR: testMenuGlobalArgsDict['status']['usedByCommandName'] = 'None'
whismanoid 35:8aa5dffe523d 646 // CODE GENERATOR: testMenuGlobalArgsDict['status']['usedBytestMenuItemName'] = 'None'
whismanoid 35:8aa5dffe523d 647 // parse argument uint32_t status
whismanoid 35:8aa5dffe523d 648 uint32_t status = g_MAX11410_device.status; // default to global property value
whismanoid 35:8aa5dffe523d 649 if (cmdLine.parse_uint32_dec("status", status))
whismanoid 19:8f951e448ab1 650 {
whismanoid 35:8aa5dffe523d 651 g_MAX11410_device.status = status; // update global property value
whismanoid 19:8f951e448ab1 652 }
whismanoid 35:8aa5dffe523d 653
whismanoid 35:8aa5dffe523d 654 switch (cmdLine[0])
whismanoid 35:8aa5dffe523d 655 {
whismanoid 37:74aa97afa030 656 // CODE GENERATOR: generate * command read/write reg *reg? *reg=value
whismanoid 37:74aa97afa030 657 case '*':
whismanoid 37:74aa97afa030 658 {
whismanoid 37:74aa97afa030 659 // if buffer starts with a regName:
whismanoid 37:74aa97afa030 660 // for each reg value (0..n) if(cmdLine.has_keyword(device.regName(r))):
whismanoid 37:74aa97afa030 661 cmdLine.serial().printf(" scan RegName... ");
whismanoid 37:74aa97afa030 662 for (uint8_t regAddress = 0; regAddress < 0x80; regAddress++)
whismanoid 37:74aa97afa030 663 {
whismanoid 37:74aa97afa030 664 uint32_t regData = 0;
whismanoid 37:74aa97afa030 665 bool is_regname_query = false;
whismanoid 37:74aa97afa030 666 bool is_regname_assignment = false;
whismanoid 37:74aa97afa030 667 if (cmdLine.parse_uint32_dec(g_MAX11410_device.RegName((MAX11410::MAX11410_CMD_enum_t)regAddress), regData))
whismanoid 37:74aa97afa030 668 {
whismanoid 37:74aa97afa030 669 cmdLine.serial().printf(" regAddress=0x%2.2X\r\n", (regAddress & 0xFF));
whismanoid 37:74aa97afa030 670 cmdLine.serial().printf(" RegName=%s\r\n", g_MAX11410_device.RegName((MAX11410::MAX11410_CMD_enum_t)regAddress));
whismanoid 41:6f7c8adf9baf 671 // accept regName "?" as "RegRead" by name
whismanoid 37:74aa97afa030 672 is_regname_query = (cmdLine.chSeparator == '?');
whismanoid 37:74aa97afa030 673 is_regname_assignment = (cmdLine.chSeparator == '=');
whismanoid 37:74aa97afa030 674 if (is_regname_query)
whismanoid 37:74aa97afa030 675 {
whismanoid 37:74aa97afa030 676 cmdLine.serial().printf(" RegRead");
whismanoid 37:74aa97afa030 677 g_MAX11410_device.RegRead((MAX11410::MAX11410_CMD_enum_t)regAddress, &regData);
whismanoid 37:74aa97afa030 678 cmdLine.serial().printf("regData=0x%6.6x\r\n", (regData & 0x00FFFFFF));
whismanoid 42:236e108d8a88 679 return true; // command handled by MAX11410
whismanoid 37:74aa97afa030 680 }
whismanoid 41:6f7c8adf9baf 681 // accept regName "=0x123456" as "RegWrite" by name
whismanoid 37:74aa97afa030 682 if (is_regname_assignment)
whismanoid 37:74aa97afa030 683 {
whismanoid 37:74aa97afa030 684 cmdLine.serial().printf(" RegWrite");
whismanoid 37:74aa97afa030 685 cmdLine.serial().printf("regData=0x%6.6x\r\n", (regData & 0x00FFFFFF));
whismanoid 37:74aa97afa030 686 g_MAX11410_device.RegWrite((MAX11410::MAX11410_CMD_enum_t)regAddress, regData);
whismanoid 37:74aa97afa030 687 return true; // command handled by MAX11410
whismanoid 37:74aa97afa030 688 }
whismanoid 37:74aa97afa030 689 }
whismanoid 37:74aa97afa030 690 } // end for regAddr
whismanoid 37:74aa97afa030 691 // not a valid register name
whismanoid 37:74aa97afa030 692 // read "all" registers by name
whismanoid 37:74aa97afa030 693 const uint8_t readAllRegFirst = 0x00; // first MAX11410 register address for read-all block
whismanoid 37:74aa97afa030 694 const uint8_t readAllRegLast = 0x39; // last MAX11410 register address for read-all block
whismanoid 37:74aa97afa030 695 Callback<void(size_t, uint8_t*, uint8_t*)> saved_onSPIprint_handler = g_MAX11410_device.onSPIprint;
whismanoid 37:74aa97afa030 696 g_MAX11410_device.onSPIprint = NULL;
whismanoid 37:74aa97afa030 697 for (uint8_t regAddress = readAllRegFirst; regAddress <= readAllRegLast; regAddress++)
whismanoid 37:74aa97afa030 698 {
whismanoid 37:74aa97afa030 699 uint32_t regData = 0;
whismanoid 37:74aa97afa030 700 if (g_MAX11410_device.RegSize((MAX11410::MAX11410_CMD_enum_t)regAddress) == 0) continue; // skip undefined regs
whismanoid 37:74aa97afa030 701 if (g_MAX11410_device.RegRead((MAX11410::MAX11410_CMD_enum_t)regAddress, &regData) == 0) continue; // skip unreadable regs
whismanoid 39:c1b4b3b85c28 702 cmdLine.serial().printf("%s=0x%6.6x\r\n", g_MAX11410_device.RegName((MAX11410::MAX11410_CMD_enum_t)regAddress), regData);
whismanoid 37:74aa97afa030 703 } // end for regAddr
whismanoid 37:74aa97afa030 704 g_MAX11410_device.onSPIprint = saved_onSPIprint_handler;
whismanoid 37:74aa97afa030 705 return true; // command handled by MAX11410
whismanoid 37:74aa97afa030 706 }
whismanoid 37:74aa97afa030 707 break;
whismanoid 37:74aa97afa030 708
whismanoid 35:8aa5dffe523d 709 // CODE GENERATOR: generate @ command print global property values of g_MAX11410_device
whismanoid 29:7d0bc70036be 710 case '@':
whismanoid 29:7d0bc70036be 711 {
whismanoid 37:74aa97afa030 712 // CODE GENERATOR: @ command print double g_MAX11410_device.VRef_REF0
whismanoid 37:74aa97afa030 713 cmdLine.serial().printf("VRef_REF0 = ");
whismanoid 37:74aa97afa030 714 cmdLine.serial().printf("%f\n", g_MAX11410_device.VRef_REF0);
whismanoid 37:74aa97afa030 715 // CODE GENERATOR: @ command print double g_MAX11410_device.VRef_REF1
whismanoid 37:74aa97afa030 716 cmdLine.serial().printf("VRef_REF1 = ");
whismanoid 37:74aa97afa030 717 cmdLine.serial().printf("%f\n", g_MAX11410_device.VRef_REF1);
whismanoid 37:74aa97afa030 718 // CODE GENERATOR: @ command print double g_MAX11410_device.VRef_REF2
whismanoid 37:74aa97afa030 719 cmdLine.serial().printf("VRef_REF2 = ");
whismanoid 37:74aa97afa030 720 cmdLine.serial().printf("%f\n", g_MAX11410_device.VRef_REF2);
whismanoid 37:74aa97afa030 721 // CODE GENERATOR: @ command print double g_MAX11410_device.VRef_AVDD
whismanoid 37:74aa97afa030 722 cmdLine.serial().printf("VRef_AVDD = ");
whismanoid 37:74aa97afa030 723 cmdLine.serial().printf("%f\n", g_MAX11410_device.VRef_AVDD);
whismanoid 37:74aa97afa030 724 // CODE GENERATOR: @ command print uint32_t g_MAX11410_device.ctrl
whismanoid 37:74aa97afa030 725 cmdLine.serial().printf("ctrl = ");
whismanoid 37:74aa97afa030 726 cmdLine.serial().printf("%d = 0x%8.8x\n", g_MAX11410_device.ctrl, g_MAX11410_device.ctrl);
whismanoid 37:74aa97afa030 727 // CODE GENERATOR: @ command print uint8_t g_MAX11410_device.pgaGain
whismanoid 37:74aa97afa030 728 cmdLine.serial().printf("pgaGain = ");
whismanoid 37:74aa97afa030 729 cmdLine.serial().printf("%d = 0x%2.2x\n", g_MAX11410_device.pgaGain, g_MAX11410_device.pgaGain);
whismanoid 35:8aa5dffe523d 730 // CODE GENERATOR: @ command print uint32_t g_MAX11410_device.status
whismanoid 35:8aa5dffe523d 731 cmdLine.serial().printf("status = ");
whismanoid 35:8aa5dffe523d 732 cmdLine.serial().printf("%d = 0x%8.8x\n", g_MAX11410_device.status, g_MAX11410_device.status);
whismanoid 35:8aa5dffe523d 733 // CODE GENERATOR: @ command print uint32_t g_MAX11410_device.data0
whismanoid 35:8aa5dffe523d 734 cmdLine.serial().printf("data0 = ");
whismanoid 35:8aa5dffe523d 735 cmdLine.serial().printf("%d = 0x%8.8x\n", g_MAX11410_device.data0, g_MAX11410_device.data0);
whismanoid 37:74aa97afa030 736 // CODE GENERATOR: @ command print uint32_t array g_MAX11410_device.AINcode[0..9]
whismanoid 37:74aa97afa030 737 for(int index = 0; (index < 10) && (index < 16); index++) {
whismanoid 37:74aa97afa030 738 cmdLine.serial().printf("AINcode[%d] = ", index);
whismanoid 37:74aa97afa030 739 cmdLine.serial().printf("%d = 0x%8.8x\n", g_MAX11410_device.AINcode[index], g_MAX11410_device.AINcode[index]);
whismanoid 37:74aa97afa030 740 }
whismanoid 35:8aa5dffe523d 741 return true; // command handled by MAX11410
whismanoid 35:8aa5dffe523d 742 break;
whismanoid 35:8aa5dffe523d 743 }
whismanoid 35:8aa5dffe523d 744 // CODE GENERATOR: TODO1: generate GPIO commands for LDAC, CLR, etc. based on device driver function names
whismanoid 35:8aa5dffe523d 745 // case 'G'..'Z','g'..'z' are reserved for GPIO commands
whismanoid 35:8aa5dffe523d 746 // case 'A'..'F','a'..'f' may be available if not claimed by bitstream commands
whismanoid 35:8aa5dffe523d 747
whismanoid 35:8aa5dffe523d 748 // CODE GENERATOR: test menu
whismanoid 35:8aa5dffe523d 749 // case '0'..'9','A'..'F','a'..'f' letters are reserved for bitstream commands
whismanoid 35:8aa5dffe523d 750 // has_register_write_command: case '0'..'9','A'..'F','a'..'f' letters are reserved for bitstream commands
whismanoid 35:8aa5dffe523d 751 // CODE GENERATOR: test menu case '!':
whismanoid 35:8aa5dffe523d 752 // CODE GENERATOR: helpString '! -- Init'
whismanoid 35:8aa5dffe523d 753 // CODE GENERATOR: CMD_ 'None'
whismanoid 35:8aa5dffe523d 754 // CODE GENERATOR: CommandName 'Init'
whismanoid 35:8aa5dffe523d 755 // CODE GENERATOR: CommandParamIn 'void'
whismanoid 35:8aa5dffe523d 756 // CODE GENERATOR: CommandReturnType 'uint8_t'
whismanoid 35:8aa5dffe523d 757 // CODE GENERATOR: CommandPre ''
whismanoid 37:74aa97afa030 758 // CODE GENERATOR: CommandDocParamIn ''
whismanoid 37:74aa97afa030 759 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 35:8aa5dffe523d 760 // CODE GENERATOR: CommandPost ''
whismanoid 35:8aa5dffe523d 761 // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure'
whismanoid 35:8aa5dffe523d 762 case '!':
whismanoid 35:8aa5dffe523d 763 {
whismanoid 35:8aa5dffe523d 764 // test menu command '!' handler:
whismanoid 35:8aa5dffe523d 765 // helpString='! -- Init'
whismanoid 35:8aa5dffe523d 766 // CMD_='None'
whismanoid 35:8aa5dffe523d 767 // CommandName='Init'
whismanoid 35:8aa5dffe523d 768 // CommandParamIn='void'
whismanoid 35:8aa5dffe523d 769 // CommandReturnType='uint8_t'
whismanoid 35:8aa5dffe523d 770 // @Pre=''
whismanoid 37:74aa97afa030 771 // @Param[in]=''
whismanoid 37:74aa97afa030 772 // @Param[out]=''
whismanoid 35:8aa5dffe523d 773 // @Post=''
whismanoid 35:8aa5dffe523d 774 // @Return='@return 1 on success; 0 on failure'
whismanoid 35:8aa5dffe523d 775 cmdLine.serial().printf("Init");
whismanoid 35:8aa5dffe523d 776 // call function Init
whismanoid 35:8aa5dffe523d 777 uint8_t result = g_MAX11410_device.Init();
whismanoid 35:8aa5dffe523d 778 cmdLine.serial().printf(" =%d", result);
whismanoid 35:8aa5dffe523d 779 return true; // command handled by MAX11410
whismanoid 35:8aa5dffe523d 780 } // end case '!'
whismanoid 35:8aa5dffe523d 781 break;
whismanoid 35:8aa5dffe523d 782
whismanoid 37:74aa97afa030 783 // CODE GENERATOR: test menu case '$':
whismanoid 37:74aa97afa030 784 // CODE GENERATOR: helpString '$ -- Read_All_Voltages'
whismanoid 37:74aa97afa030 785 // CODE GENERATOR: CMD_ 'None'
whismanoid 37:74aa97afa030 786 // CODE GENERATOR: CommandName 'Read_All_Voltages'
whismanoid 37:74aa97afa030 787 // CODE GENERATOR: CommandParamIn 'void'
whismanoid 37:74aa97afa030 788 // CODE GENERATOR: CommandReturnType 'uint8_t'
whismanoid 37:74aa97afa030 789 // CODE GENERATOR: CommandPre ''
whismanoid 37:74aa97afa030 790 // CODE GENERATOR: CommandDocParamIn ''
whismanoid 37:74aa97afa030 791 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 37:74aa97afa030 792 // CODE GENERATOR: CommandPost '@post AINcode[0..9]: measurement result LSB code'
whismanoid 37:74aa97afa030 793 // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 794 case '$':
whismanoid 37:74aa97afa030 795 {
whismanoid 37:74aa97afa030 796 // test menu command '$' handler:
whismanoid 37:74aa97afa030 797 // helpString='$ -- Read_All_Voltages'
whismanoid 37:74aa97afa030 798 // CMD_='None'
whismanoid 37:74aa97afa030 799 // CommandName='Read_All_Voltages'
whismanoid 37:74aa97afa030 800 // CommandParamIn='void'
whismanoid 37:74aa97afa030 801 // CommandReturnType='uint8_t'
whismanoid 37:74aa97afa030 802 // @Pre=''
whismanoid 37:74aa97afa030 803 // @Param[in]=''
whismanoid 37:74aa97afa030 804 // @Param[out]=''
whismanoid 37:74aa97afa030 805 // @Post='@post AINcode[0..9]: measurement result LSB code'
whismanoid 37:74aa97afa030 806 // @Return='@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 807 cmdLine.serial().printf("Read_All_Voltages");
whismanoid 37:74aa97afa030 808 // call function Read_All_Voltages
whismanoid 37:74aa97afa030 809 uint8_t result = g_MAX11410_device.Read_All_Voltages();
whismanoid 37:74aa97afa030 810 cmdLine.serial().printf(" =%d", result);
whismanoid 37:74aa97afa030 811 return true; // command handled by MAX11410
whismanoid 37:74aa97afa030 812 } // end case '$'
whismanoid 37:74aa97afa030 813 break;
whismanoid 37:74aa97afa030 814
whismanoid 37:74aa97afa030 815 // CODE GENERATOR: test menu case 'R':
whismanoid 37:74aa97afa030 816 // CODE GENERATOR: helpString 'R -- Measure_RTD'
whismanoid 37:74aa97afa030 817 // CODE GENERATOR: CMD_ 'None'
whismanoid 37:74aa97afa030 818 // CODE GENERATOR: CommandName 'Measure_RTD'
whismanoid 37:74aa97afa030 819 // CODE GENERATOR: CommandParamIn 'MAX11410_AINP_SEL_enum_t rtd_iout, MAX11410_AINP_SEL_enum_t rtd_ainp, MAX11410_AINN_SEL_enum_t rtd_ainn'
whismanoid 37:74aa97afa030 820 // CODE GENERATOR: CommandReturnType 'double'
whismanoid 37:74aa97afa030 821 // CODE GENERATOR: CommandPre '@pre external connection REF1P-REF1N is a reference resistor'
whismanoid 37:74aa97afa030 822 // CODE GENERATOR: CommandPre '@pre VRef_REF1 = reference resistance in ohms, default=4999'
whismanoid 37:74aa97afa030 823 // CODE GENERATOR: CommandDocParamIn '@param[in] rtd_iout = channel RTD high side force, default=AINP_SEL_0111_AIN7'
whismanoid 37:74aa97afa030 824 // CODE GENERATOR: CommandDocParamIn '@param[in] rtd_ainp = channel RTD high side sense, default=AINP_SEL_1000_AIN8'
whismanoid 37:74aa97afa030 825 // CODE GENERATOR: CommandDocParamIn '@param[in] rtd_ainn = channel RTD low side, default=AINN_SEL_1001_AIN9'
whismanoid 37:74aa97afa030 826 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 37:74aa97afa030 827 // CODE GENERATOR: CommandPost '@post AINcode[rtd_ainp]: measurement result LSB code'
whismanoid 37:74aa97afa030 828 // CODE GENERATOR: CommandReturn '@return ideal voltage calculated from raw LSB code and reference voltage'
whismanoid 37:74aa97afa030 829 case 'R':
whismanoid 37:74aa97afa030 830 {
whismanoid 37:74aa97afa030 831 // test menu command 'R' handler:
whismanoid 37:74aa97afa030 832 // helpString='R -- Measure_RTD'
whismanoid 37:74aa97afa030 833 // CMD_='None'
whismanoid 37:74aa97afa030 834 // CommandName='Measure_RTD'
whismanoid 37:74aa97afa030 835 // CommandParamIn='MAX11410_AINP_SEL_enum_t rtd_iout, MAX11410_AINP_SEL_enum_t rtd_ainp, MAX11410_AINN_SEL_enum_t rtd_ainn'
whismanoid 37:74aa97afa030 836 // CommandReturnType='double'
whismanoid 37:74aa97afa030 837 // @Pre='@pre external connection REF1P-REF1N is a reference resistor'
whismanoid 37:74aa97afa030 838 // @Pre='@pre VRef_REF1 = reference resistance in ohms, default=4999'
whismanoid 37:74aa97afa030 839 // @Param[in]='@param[in] rtd_iout = channel RTD high side force, default=AINP_SEL_0111_AIN7'
whismanoid 37:74aa97afa030 840 // @Param[in]='@param[in] rtd_ainp = channel RTD high side sense, default=AINP_SEL_1000_AIN8'
whismanoid 37:74aa97afa030 841 // @Param[in]='@param[in] rtd_ainn = channel RTD low side, default=AINN_SEL_1001_AIN9'
whismanoid 37:74aa97afa030 842 // @Param[out]=''
whismanoid 37:74aa97afa030 843 // @Post='@post AINcode[rtd_ainp]: measurement result LSB code'
whismanoid 37:74aa97afa030 844 // @Return='@return ideal voltage calculated from raw LSB code and reference voltage'
whismanoid 37:74aa97afa030 845 // parse argument list
whismanoid 37:74aa97afa030 846 // CODE GENERATOR: searching TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t' for constant 'Measure_RTD'
whismanoid 37:74aa97afa030 847 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0000_AIN0' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 848 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0001_AIN1' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 849 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0010_AIN2' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 850 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0011_AIN3' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 851 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0100_AIN4' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 852 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0101_AIN5' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 853 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0110_AIN6' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 854 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0111_AIN7' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 855 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1000_AIN8' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 856 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1001_AIN9' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 857 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1010_AVDD' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 858 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1011_unconnected' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 859 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1100_unconnected' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 860 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1101_unconnected' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 861 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1110_unconnected' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 862 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1111_unconnected' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 863 // 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'
whismanoid 37:74aa97afa030 864 // parse argument MAX11410::MAX11410_AINP_SEL_enum_t rtd_iout
whismanoid 37:74aa97afa030 865 MAX11410::MAX11410_AINP_SEL_enum_t rtd_iout = MAX11410::AINP_SEL_0111_AIN7; // --- g_MAX11410_device.__WARNING_no_match_for_argname_rtd_iout_in_MAX11410_device_t__; // default to global property value
whismanoid 37:74aa97afa030 866 if (cmdLine.parse_uint8_dec("rtd_iout", (uint8_t&)rtd_iout))
whismanoid 37:74aa97afa030 867 {
whismanoid 37:74aa97afa030 868 // g_MAX11410_device.__WARNING_no_match_for_argname_rtd_iout_in_MAX11410_device_t__ = rtd_iout; // update global property value
whismanoid 37:74aa97afa030 869 }
whismanoid 37:74aa97afa030 870 // CODE GENERATOR: searching TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t' for constant 'Measure_RTD'
whismanoid 37:74aa97afa030 871 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0000_AIN0' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 872 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0001_AIN1' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 873 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0010_AIN2' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 874 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0011_AIN3' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 875 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0100_AIN4' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 876 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0101_AIN5' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 877 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0110_AIN6' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 878 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0111_AIN7' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 879 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1000_AIN8' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 880 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1001_AIN9' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 881 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1010_AVDD' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 882 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1011_unconnected' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 883 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1100_unconnected' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 884 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1101_unconnected' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 885 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1110_unconnected' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 886 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1111_unconnected' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 887 // argname default_argvalue symbolic enum name specified in CommandDocParamIn @Param[in]='@param[in] rtd_ainp = channel RTD high side sense, default=AINP_SEL_1000_AIN8'
whismanoid 37:74aa97afa030 888 // parse argument MAX11410::MAX11410_AINP_SEL_enum_t rtd_ainp
whismanoid 37:74aa97afa030 889 MAX11410::MAX11410_AINP_SEL_enum_t rtd_ainp = MAX11410::AINP_SEL_1000_AIN8; // --- g_MAX11410_device.__WARNING_no_match_for_argname_rtd_ainp_in_MAX11410_device_t__; // default to global property value
whismanoid 37:74aa97afa030 890 if (cmdLine.parse_uint8_dec("rtd_ainp", (uint8_t&)rtd_ainp))
whismanoid 37:74aa97afa030 891 {
whismanoid 37:74aa97afa030 892 // g_MAX11410_device.__WARNING_no_match_for_argname_rtd_ainp_in_MAX11410_device_t__ = rtd_ainp; // update global property value
whismanoid 37:74aa97afa030 893 }
whismanoid 37:74aa97afa030 894 // CODE GENERATOR: searching TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t' for constant 'Measure_RTD'
whismanoid 37:74aa97afa030 895 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_0000_AIN0' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 896 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_0001_AIN1' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 897 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_0010_AIN2' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 898 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_0011_AIN3' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 899 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_0100_AIN4' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 900 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_0101_AIN5' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 901 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_0110_AIN6' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 902 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_0111_AIN7' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 903 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1000_AIN8' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 904 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1001_AIN9' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 905 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1010_GND' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 906 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1011_unconnected' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 907 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1100_unconnected' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 908 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1101_unconnected' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 909 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1110_unconnected' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 910 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1111_unconnected' vs constant 'Measure_RTD'
whismanoid 37:74aa97afa030 911 // argname default_argvalue symbolic enum name specified in CommandDocParamIn @Param[in]='@param[in] rtd_ainn = channel RTD low side, default=AINN_SEL_1001_AIN9'
whismanoid 37:74aa97afa030 912 // parse argument MAX11410::MAX11410_AINN_SEL_enum_t rtd_ainn
whismanoid 37:74aa97afa030 913 MAX11410::MAX11410_AINN_SEL_enum_t rtd_ainn = MAX11410::AINN_SEL_1001_AIN9; // --- g_MAX11410_device.__WARNING_no_match_for_argname_rtd_ainn_in_MAX11410_device_t__; // default to global property value
whismanoid 37:74aa97afa030 914 if (cmdLine.parse_uint8_dec("rtd_ainn", (uint8_t&)rtd_ainn))
whismanoid 37:74aa97afa030 915 {
whismanoid 37:74aa97afa030 916 // g_MAX11410_device.__WARNING_no_match_for_argname_rtd_ainn_in_MAX11410_device_t__ = rtd_ainn; // update global property value
whismanoid 37:74aa97afa030 917 }
whismanoid 37:74aa97afa030 918 // print arguments
whismanoid 37:74aa97afa030 919 cmdLine.serial().printf("Measure_RTD");
whismanoid 37:74aa97afa030 920 cmdLine.serial().printf(" rtd_iout=%d", rtd_iout);
whismanoid 37:74aa97afa030 921 cmdLine.serial().printf(" rtd_ainp=%d", rtd_ainp);
whismanoid 37:74aa97afa030 922 cmdLine.serial().printf(" rtd_ainn=%d", rtd_ainn);
whismanoid 37:74aa97afa030 923 cmdLine.serial().printf(" Measure_RTD"); // unique suffix
whismanoid 37:74aa97afa030 924 cmdLine.serial().printf("\r\n");
whismanoid 37:74aa97afa030 925 // call function Measure_RTD(rtd_iout, rtd_ainp, rtd_ainn)
whismanoid 37:74aa97afa030 926 double result = g_MAX11410_device.Measure_RTD(rtd_iout, rtd_ainp, rtd_ainn);
whismanoid 37:74aa97afa030 927 cmdLine.serial().printf(" =%d", result);
whismanoid 37:74aa97afa030 928 return true; // command handled by MAX11410
whismanoid 37:74aa97afa030 929 } // end case 'R'
whismanoid 37:74aa97afa030 930 break;
whismanoid 37:74aa97afa030 931
whismanoid 37:74aa97afa030 932 // CODE GENERATOR: test menu case 'T':
whismanoid 37:74aa97afa030 933 // CODE GENERATOR: helpString 'T -- Measure_Thermocouple'
whismanoid 37:74aa97afa030 934 // CODE GENERATOR: CMD_ 'None'
whismanoid 37:74aa97afa030 935 // CODE GENERATOR: CommandName 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 936 // CODE GENERATOR: CommandParamIn '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'
whismanoid 37:74aa97afa030 937 // CODE GENERATOR: CommandReturnType 'double'
whismanoid 37:74aa97afa030 938 // CODE GENERATOR: CommandPre ''
whismanoid 37:74aa97afa030 939 // CODE GENERATOR: CommandDocParamIn '@param[in] tc_ainp = channel of Thermocouple high side, default=AINP_SEL_0101_AIN5'
whismanoid 37:74aa97afa030 940 // CODE GENERATOR: CommandDocParamIn '@param[in] tc_ainn = channel of Thermocouple low side, default=AINN_SEL_0110_AIN6'
whismanoid 37:74aa97afa030 941 // CODE GENERATOR: CommandDocParamIn '@param[in] rtd_iout = channel RTD high side force, default=AINP_SEL_0111_AIN7'
whismanoid 37:74aa97afa030 942 // CODE GENERATOR: CommandDocParamIn '@param[in] rtd_ainp = channel RTD high side sense, default=AINP_SEL_1000_AIN8'
whismanoid 37:74aa97afa030 943 // CODE GENERATOR: CommandDocParamIn '@param[in] rtd_ainn = channel RTD low side, default=AINN_SEL_1001_AIN9'
whismanoid 37:74aa97afa030 944 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 37:74aa97afa030 945 // CODE GENERATOR: CommandPost '@post AINcode[tc_ainp]: measurement result LSB code'
whismanoid 37:74aa97afa030 946 // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 947 case 'T':
whismanoid 37:74aa97afa030 948 {
whismanoid 37:74aa97afa030 949 // test menu command 'T' handler:
whismanoid 37:74aa97afa030 950 // helpString='T -- Measure_Thermocouple'
whismanoid 37:74aa97afa030 951 // CMD_='None'
whismanoid 37:74aa97afa030 952 // CommandName='Measure_Thermocouple'
whismanoid 37:74aa97afa030 953 // CommandParamIn='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'
whismanoid 37:74aa97afa030 954 // CommandReturnType='double'
whismanoid 37:74aa97afa030 955 // @Pre=''
whismanoid 37:74aa97afa030 956 // @Param[in]='@param[in] tc_ainp = channel of Thermocouple high side, default=AINP_SEL_0101_AIN5'
whismanoid 37:74aa97afa030 957 // @Param[in]='@param[in] tc_ainn = channel of Thermocouple low side, default=AINN_SEL_0110_AIN6'
whismanoid 37:74aa97afa030 958 // @Param[in]='@param[in] rtd_iout = channel RTD high side force, default=AINP_SEL_0111_AIN7'
whismanoid 37:74aa97afa030 959 // @Param[in]='@param[in] rtd_ainp = channel RTD high side sense, default=AINP_SEL_1000_AIN8'
whismanoid 37:74aa97afa030 960 // @Param[in]='@param[in] rtd_ainn = channel RTD low side, default=AINN_SEL_1001_AIN9'
whismanoid 37:74aa97afa030 961 // @Param[out]=''
whismanoid 37:74aa97afa030 962 // @Post='@post AINcode[tc_ainp]: measurement result LSB code'
whismanoid 37:74aa97afa030 963 // @Return='@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 964 // parse argument list
whismanoid 37:74aa97afa030 965 // CODE GENERATOR: searching TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t' for constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 966 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0000_AIN0' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 967 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0001_AIN1' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 968 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0010_AIN2' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 969 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0011_AIN3' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 970 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0100_AIN4' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 971 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0101_AIN5' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 972 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0110_AIN6' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 973 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0111_AIN7' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 974 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1000_AIN8' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 975 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1001_AIN9' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 976 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1010_AVDD' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 977 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1011_unconnected' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 978 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1100_unconnected' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 979 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1101_unconnected' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 980 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1110_unconnected' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 981 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1111_unconnected' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 982 // 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'
whismanoid 37:74aa97afa030 983 // parse argument MAX11410::MAX11410_AINP_SEL_enum_t tc_ainp
whismanoid 37:74aa97afa030 984 MAX11410::MAX11410_AINP_SEL_enum_t tc_ainp = MAX11410::AINP_SEL_0101_AIN5; // --- g_MAX11410_device.__WARNING_no_match_for_argname_tc_ainp_in_MAX11410_device_t__; // default to global property value
whismanoid 37:74aa97afa030 985 if (cmdLine.parse_uint8_dec("tc_ainp", (uint8_t&)tc_ainp))
whismanoid 37:74aa97afa030 986 {
whismanoid 37:74aa97afa030 987 // g_MAX11410_device.__WARNING_no_match_for_argname_tc_ainp_in_MAX11410_device_t__ = tc_ainp; // update global property value
whismanoid 37:74aa97afa030 988 }
whismanoid 37:74aa97afa030 989 // CODE GENERATOR: searching TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t' for constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 990 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_0000_AIN0' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 991 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_0001_AIN1' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 992 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_0010_AIN2' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 993 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_0011_AIN3' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 994 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_0100_AIN4' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 995 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_0101_AIN5' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 996 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_0110_AIN6' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 997 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_0111_AIN7' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 998 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1000_AIN8' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 999 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1001_AIN9' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1000 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1010_GND' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1001 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1011_unconnected' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1002 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1100_unconnected' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1003 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1101_unconnected' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1004 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1110_unconnected' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1005 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1111_unconnected' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1006 // argname default_argvalue symbolic enum name specified in CommandDocParamIn @Param[in]='@param[in] tc_ainn = channel of Thermocouple low side, default=AINN_SEL_0110_AIN6'
whismanoid 37:74aa97afa030 1007 // parse argument MAX11410::MAX11410_AINN_SEL_enum_t tc_ainn
whismanoid 37:74aa97afa030 1008 MAX11410::MAX11410_AINN_SEL_enum_t tc_ainn = MAX11410::AINN_SEL_0110_AIN6; // --- g_MAX11410_device.__WARNING_no_match_for_argname_tc_ainn_in_MAX11410_device_t__; // default to global property value
whismanoid 37:74aa97afa030 1009 if (cmdLine.parse_uint8_dec("tc_ainn", (uint8_t&)tc_ainn))
whismanoid 37:74aa97afa030 1010 {
whismanoid 37:74aa97afa030 1011 // g_MAX11410_device.__WARNING_no_match_for_argname_tc_ainn_in_MAX11410_device_t__ = tc_ainn; // update global property value
whismanoid 37:74aa97afa030 1012 }
whismanoid 37:74aa97afa030 1013 // CODE GENERATOR: searching TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t' for constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1014 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0000_AIN0' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1015 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0001_AIN1' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1016 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0010_AIN2' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1017 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0011_AIN3' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1018 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0100_AIN4' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1019 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0101_AIN5' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1020 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0110_AIN6' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1021 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0111_AIN7' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1022 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1000_AIN8' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1023 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1001_AIN9' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1024 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1010_AVDD' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1025 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1011_unconnected' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1026 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1100_unconnected' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1027 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1101_unconnected' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1028 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1110_unconnected' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1029 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1111_unconnected' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1030 // 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'
whismanoid 37:74aa97afa030 1031 // parse argument MAX11410::MAX11410_AINP_SEL_enum_t rtd_iout
whismanoid 37:74aa97afa030 1032 MAX11410::MAX11410_AINP_SEL_enum_t rtd_iout = MAX11410::AINP_SEL_0111_AIN7; // --- g_MAX11410_device.__WARNING_no_match_for_argname_rtd_iout_in_MAX11410_device_t__; // default to global property value
whismanoid 37:74aa97afa030 1033 if (cmdLine.parse_uint8_dec("rtd_iout", (uint8_t&)rtd_iout))
whismanoid 37:74aa97afa030 1034 {
whismanoid 37:74aa97afa030 1035 // g_MAX11410_device.__WARNING_no_match_for_argname_rtd_iout_in_MAX11410_device_t__ = rtd_iout; // update global property value
whismanoid 37:74aa97afa030 1036 }
whismanoid 37:74aa97afa030 1037 // CODE GENERATOR: searching TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t' for constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1038 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0000_AIN0' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1039 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0001_AIN1' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1040 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0010_AIN2' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1041 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0011_AIN3' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1042 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0100_AIN4' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1043 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0101_AIN5' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1044 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0110_AIN6' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1045 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0111_AIN7' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1046 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1000_AIN8' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1047 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1001_AIN9' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1048 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1010_AVDD' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1049 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1011_unconnected' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1050 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1100_unconnected' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1051 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1101_unconnected' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1052 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1110_unconnected' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1053 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1111_unconnected' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1054 // argname default_argvalue symbolic enum name specified in CommandDocParamIn @Param[in]='@param[in] rtd_ainp = channel RTD high side sense, default=AINP_SEL_1000_AIN8'
whismanoid 37:74aa97afa030 1055 // parse argument MAX11410::MAX11410_AINP_SEL_enum_t rtd_ainp
whismanoid 37:74aa97afa030 1056 MAX11410::MAX11410_AINP_SEL_enum_t rtd_ainp = MAX11410::AINP_SEL_1000_AIN8; // --- g_MAX11410_device.__WARNING_no_match_for_argname_rtd_ainp_in_MAX11410_device_t__; // default to global property value
whismanoid 37:74aa97afa030 1057 if (cmdLine.parse_uint8_dec("rtd_ainp", (uint8_t&)rtd_ainp))
whismanoid 37:74aa97afa030 1058 {
whismanoid 37:74aa97afa030 1059 // g_MAX11410_device.__WARNING_no_match_for_argname_rtd_ainp_in_MAX11410_device_t__ = rtd_ainp; // update global property value
whismanoid 37:74aa97afa030 1060 }
whismanoid 37:74aa97afa030 1061 // CODE GENERATOR: searching TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t' for constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1062 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_0000_AIN0' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1063 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_0001_AIN1' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1064 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_0010_AIN2' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1065 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_0011_AIN3' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1066 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_0100_AIN4' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1067 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_0101_AIN5' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1068 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_0110_AIN6' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1069 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_0111_AIN7' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1070 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1000_AIN8' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1071 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1001_AIN9' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1072 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1010_GND' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1073 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1011_unconnected' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1074 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1100_unconnected' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1075 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1101_unconnected' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1076 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1110_unconnected' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1077 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1111_unconnected' vs constant 'Measure_Thermocouple'
whismanoid 37:74aa97afa030 1078 // argname default_argvalue symbolic enum name specified in CommandDocParamIn @Param[in]='@param[in] rtd_ainn = channel RTD low side, default=AINN_SEL_1001_AIN9'
whismanoid 37:74aa97afa030 1079 // parse argument MAX11410::MAX11410_AINN_SEL_enum_t rtd_ainn
whismanoid 37:74aa97afa030 1080 MAX11410::MAX11410_AINN_SEL_enum_t rtd_ainn = MAX11410::AINN_SEL_1001_AIN9; // --- g_MAX11410_device.__WARNING_no_match_for_argname_rtd_ainn_in_MAX11410_device_t__; // default to global property value
whismanoid 37:74aa97afa030 1081 if (cmdLine.parse_uint8_dec("rtd_ainn", (uint8_t&)rtd_ainn))
whismanoid 37:74aa97afa030 1082 {
whismanoid 37:74aa97afa030 1083 // g_MAX11410_device.__WARNING_no_match_for_argname_rtd_ainn_in_MAX11410_device_t__ = rtd_ainn; // update global property value
whismanoid 37:74aa97afa030 1084 }
whismanoid 37:74aa97afa030 1085 // print arguments
whismanoid 37:74aa97afa030 1086 cmdLine.serial().printf("Measure_Thermocouple");
whismanoid 37:74aa97afa030 1087 cmdLine.serial().printf(" tc_ainp=%d", tc_ainp);
whismanoid 37:74aa97afa030 1088 cmdLine.serial().printf(" tc_ainn=%d", tc_ainn);
whismanoid 37:74aa97afa030 1089 cmdLine.serial().printf(" rtd_iout=%d", rtd_iout);
whismanoid 37:74aa97afa030 1090 cmdLine.serial().printf(" rtd_ainp=%d", rtd_ainp);
whismanoid 37:74aa97afa030 1091 cmdLine.serial().printf(" rtd_ainn=%d", rtd_ainn);
whismanoid 37:74aa97afa030 1092 cmdLine.serial().printf(" Measure_Thermocouple"); // unique suffix
whismanoid 37:74aa97afa030 1093 cmdLine.serial().printf("\r\n");
whismanoid 37:74aa97afa030 1094 // call function Measure_Thermocouple(tc_ainp, tc_ainn, rtd_iout, rtd_ainp, rtd_ainn)
whismanoid 37:74aa97afa030 1095 double result = g_MAX11410_device.Measure_Thermocouple(tc_ainp, tc_ainn, rtd_iout, rtd_ainp, rtd_ainn);
whismanoid 37:74aa97afa030 1096 cmdLine.serial().printf(" =%d", result);
whismanoid 37:74aa97afa030 1097 return true; // command handled by MAX11410
whismanoid 37:74aa97afa030 1098 } // end case 'T'
whismanoid 37:74aa97afa030 1099 break;
whismanoid 37:74aa97afa030 1100
whismanoid 37:74aa97afa030 1101 // CODE GENERATOR: test menu case 'V':
whismanoid 37:74aa97afa030 1102 // CODE GENERATOR: helpString 'V -- Measure_Voltage'
whismanoid 37:74aa97afa030 1103 // CODE GENERATOR: CMD_ 'None'
whismanoid 37:74aa97afa030 1104 // CODE GENERATOR: CommandName 'Measure_Voltage'
whismanoid 37:74aa97afa030 1105 // CODE GENERATOR: CommandParamIn 'MAX11410_AINP_SEL_enum_t ainp, MAX11410_AINN_SEL_enum_t ainn'
whismanoid 37:74aa97afa030 1106 // CODE GENERATOR: CommandReturnType 'double'
whismanoid 37:74aa97afa030 1107 // CODE GENERATOR: CommandPre '@pre external connection REF2P-REF2N is a reference voltage'
whismanoid 37:74aa97afa030 1108 // CODE GENERATOR: CommandPre '@pre VRef = Voltage of REF input, in Volts'
whismanoid 37:74aa97afa030 1109 // CODE GENERATOR: CommandDocParamIn '@param[in] ainp = channel high side, default=AINP_SEL_0000_AIN0'
whismanoid 37:74aa97afa030 1110 // CODE GENERATOR: CommandDocParamIn '@param[in] ainn = channel low side, default=AINN_SEL_1010_GND'
whismanoid 37:74aa97afa030 1111 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 37:74aa97afa030 1112 // CODE GENERATOR: CommandPost '@post AINcode[ainp]: measurement result LSB code'
whismanoid 37:74aa97afa030 1113 // CODE GENERATOR: CommandReturn '@return ideal voltage calculated from raw LSB code and reference voltage'
whismanoid 37:74aa97afa030 1114 case 'V':
whismanoid 37:74aa97afa030 1115 {
whismanoid 37:74aa97afa030 1116 // test menu command 'V' handler:
whismanoid 37:74aa97afa030 1117 // helpString='V -- Measure_Voltage'
whismanoid 37:74aa97afa030 1118 // CMD_='None'
whismanoid 37:74aa97afa030 1119 // CommandName='Measure_Voltage'
whismanoid 37:74aa97afa030 1120 // CommandParamIn='MAX11410_AINP_SEL_enum_t ainp, MAX11410_AINN_SEL_enum_t ainn'
whismanoid 37:74aa97afa030 1121 // CommandReturnType='double'
whismanoid 37:74aa97afa030 1122 // @Pre='@pre external connection REF2P-REF2N is a reference voltage'
whismanoid 37:74aa97afa030 1123 // @Pre='@pre VRef = Voltage of REF input, in Volts'
whismanoid 37:74aa97afa030 1124 // @Param[in]='@param[in] ainp = channel high side, default=AINP_SEL_0000_AIN0'
whismanoid 37:74aa97afa030 1125 // @Param[in]='@param[in] ainn = channel low side, default=AINN_SEL_1010_GND'
whismanoid 37:74aa97afa030 1126 // @Param[out]=''
whismanoid 37:74aa97afa030 1127 // @Post='@post AINcode[ainp]: measurement result LSB code'
whismanoid 37:74aa97afa030 1128 // @Return='@return ideal voltage calculated from raw LSB code and reference voltage'
whismanoid 37:74aa97afa030 1129 // parse argument list
whismanoid 37:74aa97afa030 1130 // CODE GENERATOR: searching TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t' for constant 'Measure_Voltage'
whismanoid 37:74aa97afa030 1131 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0000_AIN0' vs constant 'Measure_Voltage'
whismanoid 37:74aa97afa030 1132 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0001_AIN1' vs constant 'Measure_Voltage'
whismanoid 37:74aa97afa030 1133 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0010_AIN2' vs constant 'Measure_Voltage'
whismanoid 37:74aa97afa030 1134 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0011_AIN3' vs constant 'Measure_Voltage'
whismanoid 37:74aa97afa030 1135 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0100_AIN4' vs constant 'Measure_Voltage'
whismanoid 37:74aa97afa030 1136 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0101_AIN5' vs constant 'Measure_Voltage'
whismanoid 37:74aa97afa030 1137 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0110_AIN6' vs constant 'Measure_Voltage'
whismanoid 37:74aa97afa030 1138 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0111_AIN7' vs constant 'Measure_Voltage'
whismanoid 37:74aa97afa030 1139 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1000_AIN8' vs constant 'Measure_Voltage'
whismanoid 37:74aa97afa030 1140 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1001_AIN9' vs constant 'Measure_Voltage'
whismanoid 37:74aa97afa030 1141 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1010_AVDD' vs constant 'Measure_Voltage'
whismanoid 37:74aa97afa030 1142 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1011_unconnected' vs constant 'Measure_Voltage'
whismanoid 37:74aa97afa030 1143 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1100_unconnected' vs constant 'Measure_Voltage'
whismanoid 37:74aa97afa030 1144 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1101_unconnected' vs constant 'Measure_Voltage'
whismanoid 37:74aa97afa030 1145 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1110_unconnected' vs constant 'Measure_Voltage'
whismanoid 37:74aa97afa030 1146 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_1111_unconnected' vs constant 'Measure_Voltage'
whismanoid 37:74aa97afa030 1147 // argname default_argvalue symbolic enum name specified in CommandDocParamIn @Param[in]='@param[in] ainp = channel high side, default=AINP_SEL_0000_AIN0'
whismanoid 37:74aa97afa030 1148 // parse argument MAX11410::MAX11410_AINP_SEL_enum_t ainp
whismanoid 37:74aa97afa030 1149 MAX11410::MAX11410_AINP_SEL_enum_t ainp = MAX11410::AINP_SEL_0000_AIN0; // --- g_MAX11410_device.__WARNING_no_match_for_argname_ainp_in_MAX11410_device_t__; // default to global property value
whismanoid 37:74aa97afa030 1150 if (cmdLine.parse_uint8_dec("ainp", (uint8_t&)ainp))
whismanoid 37:74aa97afa030 1151 {
whismanoid 37:74aa97afa030 1152 // g_MAX11410_device.__WARNING_no_match_for_argname_ainp_in_MAX11410_device_t__ = ainp; // update global property value
whismanoid 37:74aa97afa030 1153 }
whismanoid 37:74aa97afa030 1154 // CODE GENERATOR: searching TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t' for constant 'Measure_Voltage'
whismanoid 37:74aa97afa030 1155 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_0000_AIN0' vs constant 'Measure_Voltage'
whismanoid 37:74aa97afa030 1156 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_0001_AIN1' vs constant 'Measure_Voltage'
whismanoid 37:74aa97afa030 1157 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_0010_AIN2' vs constant 'Measure_Voltage'
whismanoid 37:74aa97afa030 1158 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_0011_AIN3' vs constant 'Measure_Voltage'
whismanoid 37:74aa97afa030 1159 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_0100_AIN4' vs constant 'Measure_Voltage'
whismanoid 37:74aa97afa030 1160 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_0101_AIN5' vs constant 'Measure_Voltage'
whismanoid 37:74aa97afa030 1161 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_0110_AIN6' vs constant 'Measure_Voltage'
whismanoid 37:74aa97afa030 1162 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_0111_AIN7' vs constant 'Measure_Voltage'
whismanoid 37:74aa97afa030 1163 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1000_AIN8' vs constant 'Measure_Voltage'
whismanoid 37:74aa97afa030 1164 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1001_AIN9' vs constant 'Measure_Voltage'
whismanoid 37:74aa97afa030 1165 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1010_GND' vs constant 'Measure_Voltage'
whismanoid 37:74aa97afa030 1166 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1011_unconnected' vs constant 'Measure_Voltage'
whismanoid 37:74aa97afa030 1167 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1100_unconnected' vs constant 'Measure_Voltage'
whismanoid 37:74aa97afa030 1168 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1101_unconnected' vs constant 'Measure_Voltage'
whismanoid 37:74aa97afa030 1169 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1110_unconnected' vs constant 'Measure_Voltage'
whismanoid 37:74aa97afa030 1170 // CODE GENERATOR: comparing TypedefEnum 'MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1111_unconnected' vs constant 'Measure_Voltage'
whismanoid 37:74aa97afa030 1171 // argname default_argvalue symbolic enum name specified in CommandDocParamIn @Param[in]='@param[in] ainn = channel low side, default=AINN_SEL_1010_GND'
whismanoid 37:74aa97afa030 1172 // parse argument MAX11410::MAX11410_AINN_SEL_enum_t ainn
whismanoid 37:74aa97afa030 1173 MAX11410::MAX11410_AINN_SEL_enum_t ainn = MAX11410::AINN_SEL_1010_GND; // --- g_MAX11410_device.__WARNING_no_match_for_argname_ainn_in_MAX11410_device_t__; // default to global property value
whismanoid 37:74aa97afa030 1174 if (cmdLine.parse_uint8_dec("ainn", (uint8_t&)ainn))
whismanoid 37:74aa97afa030 1175 {
whismanoid 37:74aa97afa030 1176 // g_MAX11410_device.__WARNING_no_match_for_argname_ainn_in_MAX11410_device_t__ = ainn; // update global property value
whismanoid 37:74aa97afa030 1177 }
whismanoid 37:74aa97afa030 1178 // print arguments
whismanoid 37:74aa97afa030 1179 cmdLine.serial().printf("Measure_Voltage");
whismanoid 37:74aa97afa030 1180 cmdLine.serial().printf(" ainp=%d", ainp);
whismanoid 37:74aa97afa030 1181 cmdLine.serial().printf(" ainn=%d", ainn);
whismanoid 37:74aa97afa030 1182 cmdLine.serial().printf(" Measure_Voltage"); // unique suffix
whismanoid 37:74aa97afa030 1183 cmdLine.serial().printf("\r\n");
whismanoid 37:74aa97afa030 1184 // call function Measure_Voltage(ainp, ainn)
whismanoid 37:74aa97afa030 1185 double result = g_MAX11410_device.Measure_Voltage(ainp, ainn);
whismanoid 37:74aa97afa030 1186 cmdLine.serial().printf(" =%d", result);
whismanoid 37:74aa97afa030 1187 return true; // command handled by MAX11410
whismanoid 37:74aa97afa030 1188 } // end case 'V'
whismanoid 37:74aa97afa030 1189 break;
whismanoid 37:74aa97afa030 1190
whismanoid 37:74aa97afa030 1191 // CODE GENERATOR: test menu case 'X0':
whismanoid 37:74aa97afa030 1192 // CODE GENERATOR: helpString 'X0 -- Calibrate_Self_Offset_Gain'
whismanoid 37:74aa97afa030 1193 // CODE GENERATOR: CMD_ 'None'
whismanoid 37:74aa97afa030 1194 // CODE GENERATOR: CommandName 'Calibrate_Self_Offset_Gain'
whismanoid 37:74aa97afa030 1195 // CODE GENERATOR: CommandParamIn 'void'
whismanoid 37:74aa97afa030 1196 // CODE GENERATOR: CommandReturnType 'uint8_t'
whismanoid 37:74aa97afa030 1197 // CODE GENERATOR: CommandPre ''
whismanoid 37:74aa97afa030 1198 // CODE GENERATOR: CommandDocParamIn ''
whismanoid 37:74aa97afa030 1199 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 37:74aa97afa030 1200 // CODE GENERATOR: CommandPost ''
whismanoid 37:74aa97afa030 1201 // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 1202 case 'X':
whismanoid 37:74aa97afa030 1203 {
whismanoid 37:74aa97afa030 1204 switch (cmdLine[1])
whismanoid 37:74aa97afa030 1205 {
whismanoid 37:74aa97afa030 1206 case '0':
whismanoid 37:74aa97afa030 1207 {
whismanoid 37:74aa97afa030 1208 // test menu command 'X0' handler:
whismanoid 37:74aa97afa030 1209 // helpString='X0 -- Calibrate_Self_Offset_Gain'
whismanoid 37:74aa97afa030 1210 // CMD_='None'
whismanoid 37:74aa97afa030 1211 // CommandName='Calibrate_Self_Offset_Gain'
whismanoid 37:74aa97afa030 1212 // CommandParamIn='void'
whismanoid 37:74aa97afa030 1213 // CommandReturnType='uint8_t'
whismanoid 37:74aa97afa030 1214 // @Pre=''
whismanoid 37:74aa97afa030 1215 // @Param[in]=''
whismanoid 37:74aa97afa030 1216 // @Param[out]=''
whismanoid 37:74aa97afa030 1217 // @Post=''
whismanoid 37:74aa97afa030 1218 // @Return='@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 1219 cmdLine.serial().printf("Calibrate_Self_Offset_Gain");
whismanoid 37:74aa97afa030 1220 // call function Calibrate_Self_Offset_Gain
whismanoid 37:74aa97afa030 1221 uint8_t result = g_MAX11410_device.Calibrate_Self_Offset_Gain();
whismanoid 37:74aa97afa030 1222 cmdLine.serial().printf(" =%d", result);
whismanoid 37:74aa97afa030 1223 return true; // command handled by MAX11410
whismanoid 37:74aa97afa030 1224 } // end nested case 'X0'
whismanoid 37:74aa97afa030 1225 break;
whismanoid 37:74aa97afa030 1226
whismanoid 37:74aa97afa030 1227 // CODE GENERATOR: test menu case 'X1':
whismanoid 37:74aa97afa030 1228 // CODE GENERATOR: helpString 'X1 -- Calibrate_PGA_Gain'
whismanoid 37:74aa97afa030 1229 // CODE GENERATOR: CMD_ 'None'
whismanoid 37:74aa97afa030 1230 // CODE GENERATOR: CommandName 'Calibrate_PGA_Gain'
whismanoid 37:74aa97afa030 1231 // CODE GENERATOR: CommandParamIn 'void'
whismanoid 37:74aa97afa030 1232 // CODE GENERATOR: CommandReturnType 'uint8_t'
whismanoid 37:74aa97afa030 1233 // CODE GENERATOR: CommandPre ''
whismanoid 37:74aa97afa030 1234 // CODE GENERATOR: CommandDocParamIn ''
whismanoid 37:74aa97afa030 1235 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 37:74aa97afa030 1236 // CODE GENERATOR: CommandPost ''
whismanoid 37:74aa97afa030 1237 // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 1238 case '1':
whismanoid 37:74aa97afa030 1239 {
whismanoid 37:74aa97afa030 1240 // test menu command 'X1' handler:
whismanoid 37:74aa97afa030 1241 // helpString='X1 -- Calibrate_PGA_Gain'
whismanoid 37:74aa97afa030 1242 // CMD_='None'
whismanoid 37:74aa97afa030 1243 // CommandName='Calibrate_PGA_Gain'
whismanoid 37:74aa97afa030 1244 // CommandParamIn='void'
whismanoid 37:74aa97afa030 1245 // CommandReturnType='uint8_t'
whismanoid 37:74aa97afa030 1246 // @Pre=''
whismanoid 37:74aa97afa030 1247 // @Param[in]=''
whismanoid 37:74aa97afa030 1248 // @Param[out]=''
whismanoid 37:74aa97afa030 1249 // @Post=''
whismanoid 37:74aa97afa030 1250 // @Return='@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 1251 cmdLine.serial().printf("Calibrate_PGA_Gain");
whismanoid 37:74aa97afa030 1252 // call function Calibrate_PGA_Gain
whismanoid 37:74aa97afa030 1253 uint8_t result = g_MAX11410_device.Calibrate_PGA_Gain();
whismanoid 37:74aa97afa030 1254 cmdLine.serial().printf(" =%d", result);
whismanoid 37:74aa97afa030 1255 return true; // command handled by MAX11410
whismanoid 37:74aa97afa030 1256 } // end nested case 'X1'
whismanoid 37:74aa97afa030 1257 break;
whismanoid 37:74aa97afa030 1258
whismanoid 37:74aa97afa030 1259 // CODE GENERATOR: test menu case 'X4':
whismanoid 37:74aa97afa030 1260 // CODE GENERATOR: helpString 'X4 -- Calibrate_System_Offset_A'
whismanoid 37:74aa97afa030 1261 // CODE GENERATOR: CMD_ 'None'
whismanoid 37:74aa97afa030 1262 // CODE GENERATOR: CommandName 'Calibrate_System_Offset_A'
whismanoid 37:74aa97afa030 1263 // CODE GENERATOR: CommandParamIn 'void'
whismanoid 37:74aa97afa030 1264 // CODE GENERATOR: CommandReturnType 'uint8_t'
whismanoid 37:74aa97afa030 1265 // CODE GENERATOR: CommandPre ''
whismanoid 37:74aa97afa030 1266 // CODE GENERATOR: CommandDocParamIn ''
whismanoid 37:74aa97afa030 1267 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 37:74aa97afa030 1268 // CODE GENERATOR: CommandPost ''
whismanoid 37:74aa97afa030 1269 // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 1270 case '4':
whismanoid 37:74aa97afa030 1271 {
whismanoid 37:74aa97afa030 1272 // test menu command 'X4' handler:
whismanoid 37:74aa97afa030 1273 // helpString='X4 -- Calibrate_System_Offset_A'
whismanoid 37:74aa97afa030 1274 // CMD_='None'
whismanoid 37:74aa97afa030 1275 // CommandName='Calibrate_System_Offset_A'
whismanoid 37:74aa97afa030 1276 // CommandParamIn='void'
whismanoid 37:74aa97afa030 1277 // CommandReturnType='uint8_t'
whismanoid 37:74aa97afa030 1278 // @Pre=''
whismanoid 37:74aa97afa030 1279 // @Param[in]=''
whismanoid 37:74aa97afa030 1280 // @Param[out]=''
whismanoid 37:74aa97afa030 1281 // @Post=''
whismanoid 37:74aa97afa030 1282 // @Return='@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 1283 cmdLine.serial().printf("Calibrate_System_Offset_A");
whismanoid 37:74aa97afa030 1284 // call function Calibrate_System_Offset_A
whismanoid 37:74aa97afa030 1285 uint8_t result = g_MAX11410_device.Calibrate_System_Offset_A();
whismanoid 37:74aa97afa030 1286 cmdLine.serial().printf(" =%d", result);
whismanoid 37:74aa97afa030 1287 return true; // command handled by MAX11410
whismanoid 37:74aa97afa030 1288 } // end nested case 'X4'
whismanoid 37:74aa97afa030 1289 break;
whismanoid 37:74aa97afa030 1290
whismanoid 37:74aa97afa030 1291 // CODE GENERATOR: test menu case 'X5':
whismanoid 37:74aa97afa030 1292 // CODE GENERATOR: helpString 'X5 -- Calibrate_System_Gain_A'
whismanoid 37:74aa97afa030 1293 // CODE GENERATOR: CMD_ 'None'
whismanoid 37:74aa97afa030 1294 // CODE GENERATOR: CommandName 'Calibrate_System_Gain_A'
whismanoid 37:74aa97afa030 1295 // CODE GENERATOR: CommandParamIn 'void'
whismanoid 37:74aa97afa030 1296 // CODE GENERATOR: CommandReturnType 'uint8_t'
whismanoid 37:74aa97afa030 1297 // CODE GENERATOR: CommandPre ''
whismanoid 37:74aa97afa030 1298 // CODE GENERATOR: CommandDocParamIn ''
whismanoid 37:74aa97afa030 1299 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 37:74aa97afa030 1300 // CODE GENERATOR: CommandPost ''
whismanoid 37:74aa97afa030 1301 // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 1302 case '5':
whismanoid 37:74aa97afa030 1303 {
whismanoid 37:74aa97afa030 1304 // test menu command 'X5' handler:
whismanoid 37:74aa97afa030 1305 // helpString='X5 -- Calibrate_System_Gain_A'
whismanoid 37:74aa97afa030 1306 // CMD_='None'
whismanoid 37:74aa97afa030 1307 // CommandName='Calibrate_System_Gain_A'
whismanoid 37:74aa97afa030 1308 // CommandParamIn='void'
whismanoid 37:74aa97afa030 1309 // CommandReturnType='uint8_t'
whismanoid 37:74aa97afa030 1310 // @Pre=''
whismanoid 37:74aa97afa030 1311 // @Param[in]=''
whismanoid 37:74aa97afa030 1312 // @Param[out]=''
whismanoid 37:74aa97afa030 1313 // @Post=''
whismanoid 37:74aa97afa030 1314 // @Return='@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 1315 cmdLine.serial().printf("Calibrate_System_Gain_A");
whismanoid 37:74aa97afa030 1316 // call function Calibrate_System_Gain_A
whismanoid 37:74aa97afa030 1317 uint8_t result = g_MAX11410_device.Calibrate_System_Gain_A();
whismanoid 37:74aa97afa030 1318 cmdLine.serial().printf(" =%d", result);
whismanoid 37:74aa97afa030 1319 return true; // command handled by MAX11410
whismanoid 37:74aa97afa030 1320 } // end nested case 'X5'
whismanoid 37:74aa97afa030 1321 break;
whismanoid 37:74aa97afa030 1322
whismanoid 37:74aa97afa030 1323 // CODE GENERATOR: test menu case 'X6':
whismanoid 37:74aa97afa030 1324 // CODE GENERATOR: helpString 'X6 -- Calibrate_System_Offset_B'
whismanoid 37:74aa97afa030 1325 // CODE GENERATOR: CMD_ 'None'
whismanoid 37:74aa97afa030 1326 // CODE GENERATOR: CommandName 'Calibrate_System_Offset_B'
whismanoid 37:74aa97afa030 1327 // CODE GENERATOR: CommandParamIn 'void'
whismanoid 37:74aa97afa030 1328 // CODE GENERATOR: CommandReturnType 'uint8_t'
whismanoid 37:74aa97afa030 1329 // CODE GENERATOR: CommandPre ''
whismanoid 37:74aa97afa030 1330 // CODE GENERATOR: CommandDocParamIn ''
whismanoid 37:74aa97afa030 1331 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 37:74aa97afa030 1332 // CODE GENERATOR: CommandPost ''
whismanoid 37:74aa97afa030 1333 // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 1334 case '6':
whismanoid 37:74aa97afa030 1335 {
whismanoid 37:74aa97afa030 1336 // test menu command 'X6' handler:
whismanoid 37:74aa97afa030 1337 // helpString='X6 -- Calibrate_System_Offset_B'
whismanoid 37:74aa97afa030 1338 // CMD_='None'
whismanoid 37:74aa97afa030 1339 // CommandName='Calibrate_System_Offset_B'
whismanoid 37:74aa97afa030 1340 // CommandParamIn='void'
whismanoid 37:74aa97afa030 1341 // CommandReturnType='uint8_t'
whismanoid 37:74aa97afa030 1342 // @Pre=''
whismanoid 37:74aa97afa030 1343 // @Param[in]=''
whismanoid 37:74aa97afa030 1344 // @Param[out]=''
whismanoid 37:74aa97afa030 1345 // @Post=''
whismanoid 37:74aa97afa030 1346 // @Return='@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 1347 cmdLine.serial().printf("Calibrate_System_Offset_B");
whismanoid 37:74aa97afa030 1348 // call function Calibrate_System_Offset_B
whismanoid 37:74aa97afa030 1349 uint8_t result = g_MAX11410_device.Calibrate_System_Offset_B();
whismanoid 37:74aa97afa030 1350 cmdLine.serial().printf(" =%d", result);
whismanoid 37:74aa97afa030 1351 return true; // command handled by MAX11410
whismanoid 37:74aa97afa030 1352 } // end nested case 'X6'
whismanoid 37:74aa97afa030 1353 break;
whismanoid 37:74aa97afa030 1354
whismanoid 37:74aa97afa030 1355 // CODE GENERATOR: test menu case 'X7':
whismanoid 37:74aa97afa030 1356 // CODE GENERATOR: helpString 'X7 -- Calibrate_System_Gain_B'
whismanoid 37:74aa97afa030 1357 // CODE GENERATOR: CMD_ 'None'
whismanoid 37:74aa97afa030 1358 // CODE GENERATOR: CommandName 'Calibrate_System_Gain_B'
whismanoid 37:74aa97afa030 1359 // CODE GENERATOR: CommandParamIn 'void'
whismanoid 37:74aa97afa030 1360 // CODE GENERATOR: CommandReturnType 'uint8_t'
whismanoid 37:74aa97afa030 1361 // CODE GENERATOR: CommandPre ''
whismanoid 37:74aa97afa030 1362 // CODE GENERATOR: CommandDocParamIn ''
whismanoid 37:74aa97afa030 1363 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 37:74aa97afa030 1364 // CODE GENERATOR: CommandPost ''
whismanoid 37:74aa97afa030 1365 // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 1366 case '7':
whismanoid 37:74aa97afa030 1367 {
whismanoid 37:74aa97afa030 1368 // test menu command 'X7' handler:
whismanoid 37:74aa97afa030 1369 // helpString='X7 -- Calibrate_System_Gain_B'
whismanoid 37:74aa97afa030 1370 // CMD_='None'
whismanoid 37:74aa97afa030 1371 // CommandName='Calibrate_System_Gain_B'
whismanoid 37:74aa97afa030 1372 // CommandParamIn='void'
whismanoid 37:74aa97afa030 1373 // CommandReturnType='uint8_t'
whismanoid 37:74aa97afa030 1374 // @Pre=''
whismanoid 37:74aa97afa030 1375 // @Param[in]=''
whismanoid 37:74aa97afa030 1376 // @Param[out]=''
whismanoid 37:74aa97afa030 1377 // @Post=''
whismanoid 37:74aa97afa030 1378 // @Return='@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 1379 cmdLine.serial().printf("Calibrate_System_Gain_B");
whismanoid 37:74aa97afa030 1380 // call function Calibrate_System_Gain_B
whismanoid 37:74aa97afa030 1381 uint8_t result = g_MAX11410_device.Calibrate_System_Gain_B();
whismanoid 37:74aa97afa030 1382 cmdLine.serial().printf(" =%d", result);
whismanoid 37:74aa97afa030 1383 return true; // command handled by MAX11410
whismanoid 37:74aa97afa030 1384 } // end nested case 'X7'
whismanoid 37:74aa97afa030 1385 break;
whismanoid 37:74aa97afa030 1386
whismanoid 37:74aa97afa030 1387 // CODE GENERATOR: test menu case 'XC':
whismanoid 37:74aa97afa030 1388 // CODE GENERATOR: helpString 'XC extclk=? u_bn=? format=? refbufp_en=? refbufn_en=? ref_sel=? -- Configure_CTRL'
whismanoid 37:74aa97afa030 1389 // CODE GENERATOR: CMD_ 'None'
whismanoid 37:74aa97afa030 1390 // CODE GENERATOR: CommandName 'Configure_CTRL'
whismanoid 37:74aa97afa030 1391 // CODE GENERATOR: CommandParamIn 'uint8_t extclk, uint8_t u_bn, uint8_t format, uint8_t refbufp_en, uint8_t refbufn_en, uint8_t ref_sel'
whismanoid 37:74aa97afa030 1392 // CODE GENERATOR: CommandReturnType 'uint8_t'
whismanoid 37:74aa97afa030 1393 // CODE GENERATOR: CommandPre ''
whismanoid 37:74aa97afa030 1394 // CODE GENERATOR: CommandDocParamIn '@param[in] extclk = external clock enable, default=0'
whismanoid 37:74aa97afa030 1395 // CODE GENERATOR: CommandDocParamIn '@param[in] u_bn = unipolar input range enable, default=0'
whismanoid 37:74aa97afa030 1396 // CODE GENERATOR: CommandDocParamIn '@param[in] format = offset binary format enable, default=0'
whismanoid 37:74aa97afa030 1397 // CODE GENERATOR: CommandDocParamIn '@param[in] refbufp_en = REFP reference buffer enable, default=0'
whismanoid 37:74aa97afa030 1398 // CODE GENERATOR: CommandDocParamIn '@param[in] refbufn_en = REFN reference buffer enable, default=0'
whismanoid 37:74aa97afa030 1399 // CODE GENERATOR: CommandDocParamIn '@param[in] ref_sel = reference selection, default=MAX11410::MAX11410_REF_SEL_enum_t::REF_SEL_001_REF1P_REF1N'
whismanoid 37:74aa97afa030 1400 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 37:74aa97afa030 1401 // CODE GENERATOR: CommandPost ''
whismanoid 37:74aa97afa030 1402 // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 1403 case 'C':
whismanoid 37:74aa97afa030 1404 {
whismanoid 37:74aa97afa030 1405 // test menu command 'XC' handler:
whismanoid 37:74aa97afa030 1406 // helpString='XC extclk=? u_bn=? format=? refbufp_en=? refbufn_en=? ref_sel=? -- Configure_CTRL'
whismanoid 37:74aa97afa030 1407 // CMD_='None'
whismanoid 37:74aa97afa030 1408 // CommandName='Configure_CTRL'
whismanoid 37:74aa97afa030 1409 // CommandParamIn='uint8_t extclk, uint8_t u_bn, uint8_t format, uint8_t refbufp_en, uint8_t refbufn_en, uint8_t ref_sel'
whismanoid 37:74aa97afa030 1410 // CommandReturnType='uint8_t'
whismanoid 37:74aa97afa030 1411 // @Pre=''
whismanoid 37:74aa97afa030 1412 // @Param[in]='@param[in] extclk = external clock enable, default=0'
whismanoid 37:74aa97afa030 1413 // @Param[in]='@param[in] u_bn = unipolar input range enable, default=0'
whismanoid 37:74aa97afa030 1414 // @Param[in]='@param[in] format = offset binary format enable, default=0'
whismanoid 37:74aa97afa030 1415 // @Param[in]='@param[in] refbufp_en = REFP reference buffer enable, default=0'
whismanoid 37:74aa97afa030 1416 // @Param[in]='@param[in] refbufn_en = REFN reference buffer enable, default=0'
whismanoid 37:74aa97afa030 1417 // @Param[in]='@param[in] ref_sel = reference selection, default=MAX11410::MAX11410_REF_SEL_enum_t::REF_SEL_001_REF1P_REF1N'
whismanoid 37:74aa97afa030 1418 // @Param[out]=''
whismanoid 37:74aa97afa030 1419 // @Post=''
whismanoid 37:74aa97afa030 1420 // @Return='@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 1421 // parse argument list
whismanoid 37:74aa97afa030 1422 // argname default_argvalue numeric literal specified in CommandDocParamIn @Param[in]='@param[in] extclk = external clock enable, default=0'
whismanoid 37:74aa97afa030 1423 // parse argument uint8_t extclk
whismanoid 37:74aa97afa030 1424 uint8_t extclk = (uint8_t)0; // --- g_MAX11410_device.__WARNING_no_match_for_argname_extclk_in_MAX11410_device_t__; // default to global property value
whismanoid 37:74aa97afa030 1425 if (cmdLine.parse_uint8_dec("extclk", extclk))
whismanoid 37:74aa97afa030 1426 {
whismanoid 37:74aa97afa030 1427 // g_MAX11410_device.__WARNING_no_match_for_argname_extclk_in_MAX11410_device_t__ = extclk; // update global property value
whismanoid 37:74aa97afa030 1428 }
whismanoid 37:74aa97afa030 1429 // argname default_argvalue numeric literal specified in CommandDocParamIn @Param[in]='@param[in] u_bn = unipolar input range enable, default=0'
whismanoid 37:74aa97afa030 1430 // parse argument uint8_t u_bn
whismanoid 37:74aa97afa030 1431 uint8_t u_bn = (uint8_t)0; // --- g_MAX11410_device.__WARNING_no_match_for_argname_u_bn_in_MAX11410_device_t__; // default to global property value
whismanoid 37:74aa97afa030 1432 if (cmdLine.parse_uint8_dec("u_bn", u_bn))
whismanoid 37:74aa97afa030 1433 {
whismanoid 37:74aa97afa030 1434 // g_MAX11410_device.__WARNING_no_match_for_argname_u_bn_in_MAX11410_device_t__ = u_bn; // update global property value
whismanoid 37:74aa97afa030 1435 }
whismanoid 37:74aa97afa030 1436 // argname default_argvalue numeric literal specified in CommandDocParamIn @Param[in]='@param[in] format = offset binary format enable, default=0'
whismanoid 37:74aa97afa030 1437 // parse argument uint8_t format
whismanoid 37:74aa97afa030 1438 uint8_t format = (uint8_t)0; // --- g_MAX11410_device.__WARNING_no_match_for_argname_format_in_MAX11410_device_t__; // default to global property value
whismanoid 37:74aa97afa030 1439 if (cmdLine.parse_uint8_dec("format", format))
whismanoid 37:74aa97afa030 1440 {
whismanoid 37:74aa97afa030 1441 // g_MAX11410_device.__WARNING_no_match_for_argname_format_in_MAX11410_device_t__ = format; // update global property value
whismanoid 37:74aa97afa030 1442 }
whismanoid 37:74aa97afa030 1443 // argname default_argvalue numeric literal specified in CommandDocParamIn @Param[in]='@param[in] refbufp_en = REFP reference buffer enable, default=0'
whismanoid 37:74aa97afa030 1444 // parse argument uint8_t refbufp_en
whismanoid 37:74aa97afa030 1445 uint8_t refbufp_en = (uint8_t)0; // --- g_MAX11410_device.__WARNING_no_match_for_argname_refbufp_en_in_MAX11410_device_t__; // default to global property value
whismanoid 37:74aa97afa030 1446 if (cmdLine.parse_uint8_dec("refbufp_en", refbufp_en))
whismanoid 37:74aa97afa030 1447 {
whismanoid 37:74aa97afa030 1448 // g_MAX11410_device.__WARNING_no_match_for_argname_refbufp_en_in_MAX11410_device_t__ = refbufp_en; // update global property value
whismanoid 37:74aa97afa030 1449 }
whismanoid 37:74aa97afa030 1450 // argname default_argvalue numeric literal specified in CommandDocParamIn @Param[in]='@param[in] refbufn_en = REFN reference buffer enable, default=0'
whismanoid 37:74aa97afa030 1451 // parse argument uint8_t refbufn_en
whismanoid 37:74aa97afa030 1452 uint8_t refbufn_en = (uint8_t)0; // --- g_MAX11410_device.__WARNING_no_match_for_argname_refbufn_en_in_MAX11410_device_t__; // default to global property value
whismanoid 37:74aa97afa030 1453 if (cmdLine.parse_uint8_dec("refbufn_en", refbufn_en))
whismanoid 37:74aa97afa030 1454 {
whismanoid 37:74aa97afa030 1455 // g_MAX11410_device.__WARNING_no_match_for_argname_refbufn_en_in_MAX11410_device_t__ = refbufn_en; // update global property value
whismanoid 37:74aa97afa030 1456 }
whismanoid 37:74aa97afa030 1457 // argname default_argvalue symbolic name specified in CommandDocParamIn @Param[in]='@param[in] ref_sel = reference selection, default=MAX11410::MAX11410_REF_SEL_enum_t::REF_SEL_001_REF1P_REF1N'
whismanoid 37:74aa97afa030 1458 // parse argument uint8_t ref_sel
whismanoid 37:74aa97afa030 1459 uint8_t ref_sel = (uint8_t)MAX11410::REF_SEL_001_REF1P_REF1N; // --- g_MAX11410_device.__WARNING_no_match_for_argname_ref_sel_in_MAX11410_device_t__; // default to global property value
whismanoid 37:74aa97afa030 1460 if (cmdLine.parse_uint8_dec("ref_sel", ref_sel))
whismanoid 37:74aa97afa030 1461 {
whismanoid 37:74aa97afa030 1462 // g_MAX11410_device.__WARNING_no_match_for_argname_ref_sel_in_MAX11410_device_t__ = ref_sel; // update global property value
whismanoid 37:74aa97afa030 1463 }
whismanoid 37:74aa97afa030 1464 // print arguments
whismanoid 37:74aa97afa030 1465 cmdLine.serial().printf("Configure_CTRL");
whismanoid 37:74aa97afa030 1466 cmdLine.serial().printf(" extclk=%d", extclk);
whismanoid 37:74aa97afa030 1467 cmdLine.serial().printf(" u_bn=%d", u_bn);
whismanoid 37:74aa97afa030 1468 cmdLine.serial().printf(" format=%d", format);
whismanoid 37:74aa97afa030 1469 cmdLine.serial().printf(" refbufp_en=%d", refbufp_en);
whismanoid 37:74aa97afa030 1470 cmdLine.serial().printf(" refbufn_en=%d", refbufn_en);
whismanoid 37:74aa97afa030 1471 cmdLine.serial().printf(" ref_sel=%d", ref_sel);
whismanoid 37:74aa97afa030 1472 cmdLine.serial().printf("\r\n");
whismanoid 37:74aa97afa030 1473 // call function Configure_CTRL(extclk, u_bn, format, refbufp_en, refbufn_en, ref_sel)
whismanoid 37:74aa97afa030 1474 uint8_t result = g_MAX11410_device.Configure_CTRL(extclk, u_bn, format, refbufp_en, refbufn_en, ref_sel);
whismanoid 37:74aa97afa030 1475 cmdLine.serial().printf(" =%d", result);
whismanoid 37:74aa97afa030 1476 return true; // command handled by MAX11410
whismanoid 37:74aa97afa030 1477 } // end nested case 'XC'
whismanoid 37:74aa97afa030 1478 break;
whismanoid 37:74aa97afa030 1479
whismanoid 37:74aa97afa030 1480 // CODE GENERATOR: test menu case 'XF':
whismanoid 37:74aa97afa030 1481 // CODE GENERATOR: helpString 'XF linef=? rate=? -- Configure_FILTER'
whismanoid 37:74aa97afa030 1482 // CODE GENERATOR: CMD_ 'None'
whismanoid 37:74aa97afa030 1483 // CODE GENERATOR: CommandName 'Configure_FILTER'
whismanoid 37:74aa97afa030 1484 // CODE GENERATOR: CommandParamIn 'uint8_t linef, uint8_t rate'
whismanoid 37:74aa97afa030 1485 // CODE GENERATOR: CommandReturnType 'uint8_t'
whismanoid 37:74aa97afa030 1486 // CODE GENERATOR: CommandPre ''
whismanoid 37:74aa97afa030 1487 // CODE GENERATOR: CommandDocParamIn '@param[in] linef = filter type, default=MAX11410::MAX11410_LINEF_enum_t::LINEF_11_SINC4'
whismanoid 37:74aa97afa030 1488 // CODE GENERATOR: CommandDocParamIn '@param[in] rate = output data rate selection, default=MAX11410::MAX11410_RATE_enum_t::RATE_0100'
whismanoid 37:74aa97afa030 1489 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 37:74aa97afa030 1490 // CODE GENERATOR: CommandPost ''
whismanoid 37:74aa97afa030 1491 // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 1492 case 'F':
whismanoid 37:74aa97afa030 1493 {
whismanoid 37:74aa97afa030 1494 // test menu command 'XF' handler:
whismanoid 37:74aa97afa030 1495 // helpString='XF linef=? rate=? -- Configure_FILTER'
whismanoid 37:74aa97afa030 1496 // CMD_='None'
whismanoid 37:74aa97afa030 1497 // CommandName='Configure_FILTER'
whismanoid 37:74aa97afa030 1498 // CommandParamIn='uint8_t linef, uint8_t rate'
whismanoid 37:74aa97afa030 1499 // CommandReturnType='uint8_t'
whismanoid 37:74aa97afa030 1500 // @Pre=''
whismanoid 37:74aa97afa030 1501 // @Param[in]='@param[in] linef = filter type, default=MAX11410::MAX11410_LINEF_enum_t::LINEF_11_SINC4'
whismanoid 37:74aa97afa030 1502 // @Param[in]='@param[in] rate = output data rate selection, default=MAX11410::MAX11410_RATE_enum_t::RATE_0100'
whismanoid 37:74aa97afa030 1503 // @Param[out]=''
whismanoid 37:74aa97afa030 1504 // @Post=''
whismanoid 37:74aa97afa030 1505 // @Return='@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 1506 // parse argument list
whismanoid 37:74aa97afa030 1507 // argname default_argvalue symbolic name specified in CommandDocParamIn @Param[in]='@param[in] linef = filter type, default=MAX11410::MAX11410_LINEF_enum_t::LINEF_11_SINC4'
whismanoid 37:74aa97afa030 1508 // parse argument uint8_t linef
whismanoid 37:74aa97afa030 1509 uint8_t linef = (uint8_t)MAX11410::LINEF_11_SINC4; // --- g_MAX11410_device.__WARNING_no_match_for_argname_linef_in_MAX11410_device_t__; // default to global property value
whismanoid 37:74aa97afa030 1510 if (cmdLine.parse_uint8_dec("linef", linef))
whismanoid 37:74aa97afa030 1511 {
whismanoid 37:74aa97afa030 1512 // g_MAX11410_device.__WARNING_no_match_for_argname_linef_in_MAX11410_device_t__ = linef; // update global property value
whismanoid 37:74aa97afa030 1513 }
whismanoid 37:74aa97afa030 1514 // argname default_argvalue symbolic name specified in CommandDocParamIn @Param[in]='@param[in] rate = output data rate selection, default=MAX11410::MAX11410_RATE_enum_t::RATE_0100'
whismanoid 37:74aa97afa030 1515 // parse argument uint8_t rate
whismanoid 37:74aa97afa030 1516 uint8_t rate = (uint8_t)MAX11410::RATE_0100; // --- g_MAX11410_device.__WARNING_no_match_for_argname_rate_in_MAX11410_device_t__; // default to global property value
whismanoid 37:74aa97afa030 1517 if (cmdLine.parse_uint8_dec("rate", rate))
whismanoid 37:74aa97afa030 1518 {
whismanoid 37:74aa97afa030 1519 // g_MAX11410_device.__WARNING_no_match_for_argname_rate_in_MAX11410_device_t__ = rate; // update global property value
whismanoid 37:74aa97afa030 1520 }
whismanoid 37:74aa97afa030 1521 // print arguments
whismanoid 37:74aa97afa030 1522 cmdLine.serial().printf("Configure_FILTER");
whismanoid 37:74aa97afa030 1523 cmdLine.serial().printf(" linef=%d", linef);
whismanoid 37:74aa97afa030 1524 cmdLine.serial().printf(" rate=%d", rate);
whismanoid 37:74aa97afa030 1525 cmdLine.serial().printf("\r\n");
whismanoid 37:74aa97afa030 1526 // call function Configure_FILTER(linef, rate)
whismanoid 37:74aa97afa030 1527 uint8_t result = g_MAX11410_device.Configure_FILTER(linef, rate);
whismanoid 37:74aa97afa030 1528 cmdLine.serial().printf(" =%d", result);
whismanoid 37:74aa97afa030 1529 return true; // command handled by MAX11410
whismanoid 37:74aa97afa030 1530 } // end nested case 'XF'
whismanoid 37:74aa97afa030 1531 break;
whismanoid 37:74aa97afa030 1532
whismanoid 37:74aa97afa030 1533 // CODE GENERATOR: test menu case 'XI':
whismanoid 37:74aa97afa030 1534 // CODE GENERATOR: helpString 'XI idac1_sel=? idac0_sel=? -- Configure_MUX_CTRL1'
whismanoid 37:74aa97afa030 1535 // CODE GENERATOR: CMD_ 'None'
whismanoid 37:74aa97afa030 1536 // CODE GENERATOR: CommandName 'Configure_MUX_CTRL1'
whismanoid 37:74aa97afa030 1537 // CODE GENERATOR: CommandParamIn 'uint8_t idac1_sel, uint8_t idac0_sel'
whismanoid 37:74aa97afa030 1538 // CODE GENERATOR: CommandReturnType 'uint8_t'
whismanoid 37:74aa97afa030 1539 // CODE GENERATOR: CommandPre ''
whismanoid 37:74aa97afa030 1540 // CODE GENERATOR: CommandDocParamIn '@param[in] idac1_sel = channel high side, default=MAX11410::MAX11410_IDAC1_SEL_enum_t::IDAC1_SEL_1111_unconnected'
whismanoid 37:74aa97afa030 1541 // CODE GENERATOR: CommandDocParamIn '@param[in] idac0_sel = channel low side, default=MAX11410::MAX11410_IDAC0_SEL_enum_t::IDAC0_SEL_1111_unconnected'
whismanoid 37:74aa97afa030 1542 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 37:74aa97afa030 1543 // CODE GENERATOR: CommandPost ''
whismanoid 37:74aa97afa030 1544 // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 1545 case 'I':
whismanoid 37:74aa97afa030 1546 {
whismanoid 37:74aa97afa030 1547 // test menu command 'XI' handler:
whismanoid 37:74aa97afa030 1548 // helpString='XI idac1_sel=? idac0_sel=? -- Configure_MUX_CTRL1'
whismanoid 37:74aa97afa030 1549 // CMD_='None'
whismanoid 37:74aa97afa030 1550 // CommandName='Configure_MUX_CTRL1'
whismanoid 37:74aa97afa030 1551 // CommandParamIn='uint8_t idac1_sel, uint8_t idac0_sel'
whismanoid 37:74aa97afa030 1552 // CommandReturnType='uint8_t'
whismanoid 37:74aa97afa030 1553 // @Pre=''
whismanoid 37:74aa97afa030 1554 // @Param[in]='@param[in] idac1_sel = channel high side, default=MAX11410::MAX11410_IDAC1_SEL_enum_t::IDAC1_SEL_1111_unconnected'
whismanoid 37:74aa97afa030 1555 // @Param[in]='@param[in] idac0_sel = channel low side, default=MAX11410::MAX11410_IDAC0_SEL_enum_t::IDAC0_SEL_1111_unconnected'
whismanoid 37:74aa97afa030 1556 // @Param[out]=''
whismanoid 37:74aa97afa030 1557 // @Post=''
whismanoid 37:74aa97afa030 1558 // @Return='@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 1559 // parse argument list
whismanoid 37:74aa97afa030 1560 // argname default_argvalue symbolic name specified in CommandDocParamIn @Param[in]='@param[in] idac1_sel = channel high side, default=MAX11410::MAX11410_IDAC1_SEL_enum_t::IDAC1_SEL_1111_unconnected'
whismanoid 37:74aa97afa030 1561 // parse argument uint8_t idac1_sel
whismanoid 37:74aa97afa030 1562 uint8_t idac1_sel = (uint8_t)MAX11410::IDAC1_SEL_1111_unconnected; // --- g_MAX11410_device.__WARNING_no_match_for_argname_idac1_sel_in_MAX11410_device_t__; // default to global property value
whismanoid 37:74aa97afa030 1563 if (cmdLine.parse_uint8_dec("idac1_sel", idac1_sel))
whismanoid 37:74aa97afa030 1564 {
whismanoid 37:74aa97afa030 1565 // g_MAX11410_device.__WARNING_no_match_for_argname_idac1_sel_in_MAX11410_device_t__ = idac1_sel; // update global property value
whismanoid 37:74aa97afa030 1566 }
whismanoid 37:74aa97afa030 1567 // argname default_argvalue symbolic name specified in CommandDocParamIn @Param[in]='@param[in] idac0_sel = channel low side, default=MAX11410::MAX11410_IDAC0_SEL_enum_t::IDAC0_SEL_1111_unconnected'
whismanoid 37:74aa97afa030 1568 // parse argument uint8_t idac0_sel
whismanoid 37:74aa97afa030 1569 uint8_t idac0_sel = (uint8_t)MAX11410::IDAC0_SEL_1111_unconnected; // --- g_MAX11410_device.__WARNING_no_match_for_argname_idac0_sel_in_MAX11410_device_t__; // default to global property value
whismanoid 37:74aa97afa030 1570 if (cmdLine.parse_uint8_dec("idac0_sel", idac0_sel))
whismanoid 37:74aa97afa030 1571 {
whismanoid 37:74aa97afa030 1572 // g_MAX11410_device.__WARNING_no_match_for_argname_idac0_sel_in_MAX11410_device_t__ = idac0_sel; // update global property value
whismanoid 37:74aa97afa030 1573 }
whismanoid 37:74aa97afa030 1574 // print arguments
whismanoid 37:74aa97afa030 1575 cmdLine.serial().printf("Configure_MUX_CTRL1");
whismanoid 37:74aa97afa030 1576 cmdLine.serial().printf(" idac1_sel=%d", idac1_sel);
whismanoid 37:74aa97afa030 1577 cmdLine.serial().printf(" idac0_sel=%d", idac0_sel);
whismanoid 37:74aa97afa030 1578 cmdLine.serial().printf("\r\n");
whismanoid 37:74aa97afa030 1579 // call function Configure_MUX_CTRL1(idac1_sel, idac0_sel)
whismanoid 37:74aa97afa030 1580 uint8_t result = g_MAX11410_device.Configure_MUX_CTRL1(idac1_sel, idac0_sel);
whismanoid 37:74aa97afa030 1581 cmdLine.serial().printf(" =%d", result);
whismanoid 37:74aa97afa030 1582 return true; // command handled by MAX11410
whismanoid 37:74aa97afa030 1583 } // end nested case 'XI'
whismanoid 37:74aa97afa030 1584 break;
whismanoid 37:74aa97afa030 1585
whismanoid 37:74aa97afa030 1586 // CODE GENERATOR: test menu case 'XM':
whismanoid 37:74aa97afa030 1587 // CODE GENERATOR: helpString 'XM ainp=? ainn=? -- Configure_MUX_CTRL0'
whismanoid 37:74aa97afa030 1588 // CODE GENERATOR: CMD_ 'None'
whismanoid 37:74aa97afa030 1589 // CODE GENERATOR: CommandName 'Configure_MUX_CTRL0'
whismanoid 37:74aa97afa030 1590 // CODE GENERATOR: CommandParamIn 'uint8_t ainp, uint8_t ainn'
whismanoid 37:74aa97afa030 1591 // CODE GENERATOR: CommandReturnType 'uint8_t'
whismanoid 37:74aa97afa030 1592 // CODE GENERATOR: CommandPre ''
whismanoid 37:74aa97afa030 1593 // CODE GENERATOR: CommandDocParamIn '@param[in] ainp = channel high side, default=MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0000_AIN0'
whismanoid 37:74aa97afa030 1594 // CODE GENERATOR: CommandDocParamIn '@param[in] ainn = channel low side, default=MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1010_GND'
whismanoid 37:74aa97afa030 1595 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 37:74aa97afa030 1596 // CODE GENERATOR: CommandPost ''
whismanoid 37:74aa97afa030 1597 // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 1598 case 'M':
whismanoid 37:74aa97afa030 1599 {
whismanoid 37:74aa97afa030 1600 // test menu command 'XM' handler:
whismanoid 37:74aa97afa030 1601 // helpString='XM ainp=? ainn=? -- Configure_MUX_CTRL0'
whismanoid 37:74aa97afa030 1602 // CMD_='None'
whismanoid 37:74aa97afa030 1603 // CommandName='Configure_MUX_CTRL0'
whismanoid 37:74aa97afa030 1604 // CommandParamIn='uint8_t ainp, uint8_t ainn'
whismanoid 37:74aa97afa030 1605 // CommandReturnType='uint8_t'
whismanoid 37:74aa97afa030 1606 // @Pre=''
whismanoid 37:74aa97afa030 1607 // @Param[in]='@param[in] ainp = channel high side, default=MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0000_AIN0'
whismanoid 37:74aa97afa030 1608 // @Param[in]='@param[in] ainn = channel low side, default=MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1010_GND'
whismanoid 37:74aa97afa030 1609 // @Param[out]=''
whismanoid 37:74aa97afa030 1610 // @Post=''
whismanoid 37:74aa97afa030 1611 // @Return='@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 1612 // parse argument list
whismanoid 37:74aa97afa030 1613 // argname default_argvalue symbolic name specified in CommandDocParamIn @Param[in]='@param[in] ainp = channel high side, default=MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0000_AIN0'
whismanoid 37:74aa97afa030 1614 // parse argument uint8_t ainp
whismanoid 37:74aa97afa030 1615 uint8_t ainp = (uint8_t)MAX11410::AINP_SEL_0000_AIN0; // --- g_MAX11410_device.__WARNING_no_match_for_argname_ainp_in_MAX11410_device_t__; // default to global property value
whismanoid 37:74aa97afa030 1616 if (cmdLine.parse_uint8_dec("ainp", ainp))
whismanoid 37:74aa97afa030 1617 {
whismanoid 37:74aa97afa030 1618 // g_MAX11410_device.__WARNING_no_match_for_argname_ainp_in_MAX11410_device_t__ = ainp; // update global property value
whismanoid 37:74aa97afa030 1619 }
whismanoid 37:74aa97afa030 1620 // argname default_argvalue symbolic name specified in CommandDocParamIn @Param[in]='@param[in] ainn = channel low side, default=MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1010_GND'
whismanoid 37:74aa97afa030 1621 // parse argument uint8_t ainn
whismanoid 37:74aa97afa030 1622 uint8_t ainn = (uint8_t)MAX11410::AINN_SEL_1010_GND; // --- g_MAX11410_device.__WARNING_no_match_for_argname_ainn_in_MAX11410_device_t__; // default to global property value
whismanoid 37:74aa97afa030 1623 if (cmdLine.parse_uint8_dec("ainn", ainn))
whismanoid 37:74aa97afa030 1624 {
whismanoid 37:74aa97afa030 1625 // g_MAX11410_device.__WARNING_no_match_for_argname_ainn_in_MAX11410_device_t__ = ainn; // update global property value
whismanoid 37:74aa97afa030 1626 }
whismanoid 37:74aa97afa030 1627 // print arguments
whismanoid 37:74aa97afa030 1628 cmdLine.serial().printf("Configure_MUX_CTRL0");
whismanoid 37:74aa97afa030 1629 cmdLine.serial().printf(" ainp=%d", ainp);
whismanoid 37:74aa97afa030 1630 cmdLine.serial().printf(" ainn=%d", ainn);
whismanoid 37:74aa97afa030 1631 cmdLine.serial().printf("\r\n");
whismanoid 37:74aa97afa030 1632 // call function Configure_MUX_CTRL0(ainp, ainn)
whismanoid 37:74aa97afa030 1633 uint8_t result = g_MAX11410_device.Configure_MUX_CTRL0(ainp, ainn);
whismanoid 37:74aa97afa030 1634 cmdLine.serial().printf(" =%d", result);
whismanoid 37:74aa97afa030 1635 return true; // command handled by MAX11410
whismanoid 37:74aa97afa030 1636 } // end nested case 'XM'
whismanoid 37:74aa97afa030 1637 break;
whismanoid 37:74aa97afa030 1638
whismanoid 37:74aa97afa030 1639 // CODE GENERATOR: test menu case 'XP':
whismanoid 37:74aa97afa030 1640 // CODE GENERATOR: helpString 'XP sigpath=? gain=? -- Configure_PGA'
whismanoid 37:74aa97afa030 1641 // CODE GENERATOR: CMD_ 'None'
whismanoid 37:74aa97afa030 1642 // CODE GENERATOR: CommandName 'Configure_PGA'
whismanoid 37:74aa97afa030 1643 // CODE GENERATOR: CommandParamIn 'uint8_t sigpath, uint8_t gain'
whismanoid 37:74aa97afa030 1644 // CODE GENERATOR: CommandReturnType 'uint8_t'
whismanoid 37:74aa97afa030 1645 // CODE GENERATOR: CommandPre ''
whismanoid 37:74aa97afa030 1646 // CODE GENERATOR: CommandDocParamIn '@param[in] sigpath = signal path, default=MAX11410::MAX11410_SIG_PATH_enum_t::SIG_PATH_00_BUFFERED'
whismanoid 37:74aa97afa030 1647 // CODE GENERATOR: CommandDocParamIn '@param[in] gain = gain selection, default=MAX11410::MAX11410_GAIN_enum_t::GAIN_000_1'
whismanoid 37:74aa97afa030 1648 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 37:74aa97afa030 1649 // CODE GENERATOR: CommandPost ''
whismanoid 37:74aa97afa030 1650 // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 1651 case 'P':
whismanoid 37:74aa97afa030 1652 {
whismanoid 37:74aa97afa030 1653 // test menu command 'XP' handler:
whismanoid 37:74aa97afa030 1654 // helpString='XP sigpath=? gain=? -- Configure_PGA'
whismanoid 37:74aa97afa030 1655 // CMD_='None'
whismanoid 37:74aa97afa030 1656 // CommandName='Configure_PGA'
whismanoid 37:74aa97afa030 1657 // CommandParamIn='uint8_t sigpath, uint8_t gain'
whismanoid 37:74aa97afa030 1658 // CommandReturnType='uint8_t'
whismanoid 37:74aa97afa030 1659 // @Pre=''
whismanoid 37:74aa97afa030 1660 // @Param[in]='@param[in] sigpath = signal path, default=MAX11410::MAX11410_SIG_PATH_enum_t::SIG_PATH_00_BUFFERED'
whismanoid 37:74aa97afa030 1661 // @Param[in]='@param[in] gain = gain selection, default=MAX11410::MAX11410_GAIN_enum_t::GAIN_000_1'
whismanoid 37:74aa97afa030 1662 // @Param[out]=''
whismanoid 37:74aa97afa030 1663 // @Post=''
whismanoid 37:74aa97afa030 1664 // @Return='@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 1665 // parse argument list
whismanoid 37:74aa97afa030 1666 // argname default_argvalue symbolic name specified in CommandDocParamIn @Param[in]='@param[in] sigpath = signal path, default=MAX11410::MAX11410_SIG_PATH_enum_t::SIG_PATH_00_BUFFERED'
whismanoid 37:74aa97afa030 1667 // parse argument uint8_t sigpath
whismanoid 37:74aa97afa030 1668 uint8_t sigpath = (uint8_t)MAX11410::SIG_PATH_00_BUFFERED; // --- g_MAX11410_device.__WARNING_no_match_for_argname_sigpath_in_MAX11410_device_t__; // default to global property value
whismanoid 37:74aa97afa030 1669 if (cmdLine.parse_uint8_dec("sigpath", sigpath))
whismanoid 37:74aa97afa030 1670 {
whismanoid 37:74aa97afa030 1671 // g_MAX11410_device.__WARNING_no_match_for_argname_sigpath_in_MAX11410_device_t__ = sigpath; // update global property value
whismanoid 37:74aa97afa030 1672 }
whismanoid 37:74aa97afa030 1673 // argname default_argvalue symbolic name specified in CommandDocParamIn @Param[in]='@param[in] gain = gain selection, default=MAX11410::MAX11410_GAIN_enum_t::GAIN_000_1'
whismanoid 37:74aa97afa030 1674 // parse argument uint8_t gain
whismanoid 37:74aa97afa030 1675 uint8_t gain = (uint8_t)MAX11410::GAIN_000_1; // --- g_MAX11410_device.__WARNING_no_match_for_argname_gain_in_MAX11410_device_t__; // default to global property value
whismanoid 37:74aa97afa030 1676 if (cmdLine.parse_uint8_dec("gain", gain))
whismanoid 37:74aa97afa030 1677 {
whismanoid 37:74aa97afa030 1678 // g_MAX11410_device.__WARNING_no_match_for_argname_gain_in_MAX11410_device_t__ = gain; // update global property value
whismanoid 37:74aa97afa030 1679 }
whismanoid 37:74aa97afa030 1680 // print arguments
whismanoid 37:74aa97afa030 1681 cmdLine.serial().printf("Configure_PGA");
whismanoid 37:74aa97afa030 1682 cmdLine.serial().printf(" sigpath=%d", sigpath);
whismanoid 37:74aa97afa030 1683 cmdLine.serial().printf(" gain=%d", gain);
whismanoid 37:74aa97afa030 1684 cmdLine.serial().printf("\r\n");
whismanoid 37:74aa97afa030 1685 // call function Configure_PGA(sigpath, gain)
whismanoid 37:74aa97afa030 1686 uint8_t result = g_MAX11410_device.Configure_PGA(sigpath, gain);
whismanoid 37:74aa97afa030 1687 cmdLine.serial().printf(" =%d", result);
whismanoid 37:74aa97afa030 1688 return true; // command handled by MAX11410
whismanoid 37:74aa97afa030 1689 } // end nested case 'XP'
whismanoid 37:74aa97afa030 1690 break;
whismanoid 37:74aa97afa030 1691
whismanoid 37:74aa97afa030 1692 // CODE GENERATOR: test menu case 'XS':
whismanoid 37:74aa97afa030 1693 // CODE GENERATOR: helpString 'XS vbias_mode=? brn_mode=? idac_mode=? -- Configure_SOURCE'
whismanoid 37:74aa97afa030 1694 // CODE GENERATOR: CMD_ 'None'
whismanoid 37:74aa97afa030 1695 // CODE GENERATOR: CommandName 'Configure_SOURCE'
whismanoid 37:74aa97afa030 1696 // CODE GENERATOR: CommandParamIn 'uint8_t vbias_mode, uint8_t brn_mode, uint8_t idac_mode'
whismanoid 37:74aa97afa030 1697 // CODE GENERATOR: CommandReturnType 'uint8_t'
whismanoid 37:74aa97afa030 1698 // CODE GENERATOR: CommandPre ''
whismanoid 37:74aa97afa030 1699 // CODE GENERATOR: CommandDocParamIn '@param[in] vbias_mode = _______, default=MAX11410::MAX11410_VBIAS_MODE_enum_t::VBIAS_MODE_00_Active'
whismanoid 37:74aa97afa030 1700 // CODE GENERATOR: CommandDocParamIn '@param[in] brn_mode = _______, default=MAX11410::MAX11410_BRN_MODE_enum_t::BRN_MODE_00_disabled'
whismanoid 37:74aa97afa030 1701 // CODE GENERATOR: CommandDocParamIn '@param[in] idac_mode = _______, default=MAX11410::MAX11410_IDAC_MODE_enum_t::IDAC_MODE_0000_10uA'
whismanoid 37:74aa97afa030 1702 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 37:74aa97afa030 1703 // CODE GENERATOR: CommandPost ''
whismanoid 37:74aa97afa030 1704 // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 1705 case 'S':
whismanoid 37:74aa97afa030 1706 {
whismanoid 37:74aa97afa030 1707 // test menu command 'XS' handler:
whismanoid 37:74aa97afa030 1708 // helpString='XS vbias_mode=? brn_mode=? idac_mode=? -- Configure_SOURCE'
whismanoid 37:74aa97afa030 1709 // CMD_='None'
whismanoid 37:74aa97afa030 1710 // CommandName='Configure_SOURCE'
whismanoid 37:74aa97afa030 1711 // CommandParamIn='uint8_t vbias_mode, uint8_t brn_mode, uint8_t idac_mode'
whismanoid 37:74aa97afa030 1712 // CommandReturnType='uint8_t'
whismanoid 37:74aa97afa030 1713 // @Pre=''
whismanoid 37:74aa97afa030 1714 // @Param[in]='@param[in] vbias_mode = _______, default=MAX11410::MAX11410_VBIAS_MODE_enum_t::VBIAS_MODE_00_Active'
whismanoid 37:74aa97afa030 1715 // @Param[in]='@param[in] brn_mode = _______, default=MAX11410::MAX11410_BRN_MODE_enum_t::BRN_MODE_00_disabled'
whismanoid 37:74aa97afa030 1716 // @Param[in]='@param[in] idac_mode = _______, default=MAX11410::MAX11410_IDAC_MODE_enum_t::IDAC_MODE_0000_10uA'
whismanoid 37:74aa97afa030 1717 // @Param[out]=''
whismanoid 37:74aa97afa030 1718 // @Post=''
whismanoid 37:74aa97afa030 1719 // @Return='@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 1720 // parse argument list
whismanoid 37:74aa97afa030 1721 // argname default_argvalue symbolic name specified in CommandDocParamIn @Param[in]='@param[in] vbias_mode = _______, default=MAX11410::MAX11410_VBIAS_MODE_enum_t::VBIAS_MODE_00_Active'
whismanoid 37:74aa97afa030 1722 // parse argument uint8_t vbias_mode
whismanoid 37:74aa97afa030 1723 uint8_t vbias_mode = (uint8_t)MAX11410::VBIAS_MODE_00_Active; // --- g_MAX11410_device.__WARNING_no_match_for_argname_vbias_mode_in_MAX11410_device_t__; // default to global property value
whismanoid 37:74aa97afa030 1724 if (cmdLine.parse_uint8_dec("vbias_mode", vbias_mode))
whismanoid 37:74aa97afa030 1725 {
whismanoid 37:74aa97afa030 1726 // g_MAX11410_device.__WARNING_no_match_for_argname_vbias_mode_in_MAX11410_device_t__ = vbias_mode; // update global property value
whismanoid 37:74aa97afa030 1727 }
whismanoid 37:74aa97afa030 1728 // argname default_argvalue symbolic name specified in CommandDocParamIn @Param[in]='@param[in] brn_mode = _______, default=MAX11410::MAX11410_BRN_MODE_enum_t::BRN_MODE_00_disabled'
whismanoid 37:74aa97afa030 1729 // parse argument uint8_t brn_mode
whismanoid 37:74aa97afa030 1730 uint8_t brn_mode = (uint8_t)MAX11410::BRN_MODE_00_disabled; // --- g_MAX11410_device.__WARNING_no_match_for_argname_brn_mode_in_MAX11410_device_t__; // default to global property value
whismanoid 37:74aa97afa030 1731 if (cmdLine.parse_uint8_dec("brn_mode", brn_mode))
whismanoid 37:74aa97afa030 1732 {
whismanoid 37:74aa97afa030 1733 // g_MAX11410_device.__WARNING_no_match_for_argname_brn_mode_in_MAX11410_device_t__ = brn_mode; // update global property value
whismanoid 37:74aa97afa030 1734 }
whismanoid 37:74aa97afa030 1735 // argname default_argvalue symbolic name specified in CommandDocParamIn @Param[in]='@param[in] idac_mode = _______, default=MAX11410::MAX11410_IDAC_MODE_enum_t::IDAC_MODE_0000_10uA'
whismanoid 37:74aa97afa030 1736 // parse argument uint8_t idac_mode
whismanoid 37:74aa97afa030 1737 uint8_t idac_mode = (uint8_t)MAX11410::IDAC_MODE_0000_10uA; // --- g_MAX11410_device.__WARNING_no_match_for_argname_idac_mode_in_MAX11410_device_t__; // default to global property value
whismanoid 37:74aa97afa030 1738 if (cmdLine.parse_uint8_dec("idac_mode", idac_mode))
whismanoid 37:74aa97afa030 1739 {
whismanoid 37:74aa97afa030 1740 // g_MAX11410_device.__WARNING_no_match_for_argname_idac_mode_in_MAX11410_device_t__ = idac_mode; // update global property value
whismanoid 37:74aa97afa030 1741 }
whismanoid 37:74aa97afa030 1742 // print arguments
whismanoid 37:74aa97afa030 1743 cmdLine.serial().printf("Configure_SOURCE");
whismanoid 37:74aa97afa030 1744 cmdLine.serial().printf(" vbias_mode=%d", vbias_mode);
whismanoid 37:74aa97afa030 1745 cmdLine.serial().printf(" brn_mode=%d", brn_mode);
whismanoid 37:74aa97afa030 1746 cmdLine.serial().printf(" idac_mode=%d", idac_mode);
whismanoid 37:74aa97afa030 1747 cmdLine.serial().printf("\r\n");
whismanoid 37:74aa97afa030 1748 // call function Configure_SOURCE(vbias_mode, brn_mode, idac_mode)
whismanoid 37:74aa97afa030 1749 uint8_t result = g_MAX11410_device.Configure_SOURCE(vbias_mode, brn_mode, idac_mode);
whismanoid 37:74aa97afa030 1750 cmdLine.serial().printf(" =%d", result);
whismanoid 37:74aa97afa030 1751 return true; // command handled by MAX11410
whismanoid 37:74aa97afa030 1752 } // end nested case 'XS'
whismanoid 37:74aa97afa030 1753 break;
whismanoid 37:74aa97afa030 1754
whismanoid 37:74aa97afa030 1755 // CODE GENERATOR: test menu case 'XV':
whismanoid 37:74aa97afa030 1756 // CODE GENERATOR: helpString 'XV vbias_ain7_ain0_bitmap=? -- Configure_MUX_CTRL2'
whismanoid 37:74aa97afa030 1757 // CODE GENERATOR: CMD_ 'None'
whismanoid 37:74aa97afa030 1758 // CODE GENERATOR: CommandName 'Configure_MUX_CTRL2'
whismanoid 37:74aa97afa030 1759 // CODE GENERATOR: CommandParamIn 'uint8_t vbias_ain7_ain0_bitmap'
whismanoid 37:74aa97afa030 1760 // CODE GENERATOR: CommandReturnType 'uint8_t'
whismanoid 37:74aa97afa030 1761 // CODE GENERATOR: CommandPre ''
whismanoid 37:74aa97afa030 1762 // CODE GENERATOR: CommandDocParamIn '@param[in] vbias_ain7_ain0_bitmap = bit map of AIN7..AIN0 enables for voltage bias, default=0'
whismanoid 37:74aa97afa030 1763 // CODE GENERATOR: CommandDocParamOut ''
whismanoid 37:74aa97afa030 1764 // CODE GENERATOR: CommandPost ''
whismanoid 37:74aa97afa030 1765 // CODE GENERATOR: CommandReturn '@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 1766 case 'V':
whismanoid 37:74aa97afa030 1767 {
whismanoid 37:74aa97afa030 1768 // test menu command 'XV' handler:
whismanoid 37:74aa97afa030 1769 // helpString='XV vbias_ain7_ain0_bitmap=? -- Configure_MUX_CTRL2'
whismanoid 37:74aa97afa030 1770 // CMD_='None'
whismanoid 37:74aa97afa030 1771 // CommandName='Configure_MUX_CTRL2'
whismanoid 37:74aa97afa030 1772 // CommandParamIn='uint8_t vbias_ain7_ain0_bitmap'
whismanoid 37:74aa97afa030 1773 // CommandReturnType='uint8_t'
whismanoid 37:74aa97afa030 1774 // @Pre=''
whismanoid 37:74aa97afa030 1775 // @Param[in]='@param[in] vbias_ain7_ain0_bitmap = bit map of AIN7..AIN0 enables for voltage bias, default=0'
whismanoid 37:74aa97afa030 1776 // @Param[out]=''
whismanoid 37:74aa97afa030 1777 // @Post=''
whismanoid 37:74aa97afa030 1778 // @Return='@return 1 on success; 0 on failure'
whismanoid 37:74aa97afa030 1779 // parse argument list
whismanoid 37:74aa97afa030 1780 // argname default_argvalue numeric literal specified in CommandDocParamIn @Param[in]='@param[in] vbias_ain7_ain0_bitmap = bit map of AIN7..AIN0 enables for voltage bias, default=0'
whismanoid 37:74aa97afa030 1781 // parse argument uint8_t vbias_ain7_ain0_bitmap
whismanoid 37:74aa97afa030 1782 uint8_t vbias_ain7_ain0_bitmap = (uint8_t)0; // --- g_MAX11410_device.__WARNING_no_match_for_argname_vbias_ain7_ain0_bitmap_in_MAX11410_device_t__; // default to global property value
whismanoid 37:74aa97afa030 1783 if (cmdLine.parse_uint8_dec("vbias_ain7_ain0_bitmap", vbias_ain7_ain0_bitmap))
whismanoid 37:74aa97afa030 1784 {
whismanoid 37:74aa97afa030 1785 // g_MAX11410_device.__WARNING_no_match_for_argname_vbias_ain7_ain0_bitmap_in_MAX11410_device_t__ = vbias_ain7_ain0_bitmap; // update global property value
whismanoid 37:74aa97afa030 1786 }
whismanoid 37:74aa97afa030 1787 // print arguments
whismanoid 37:74aa97afa030 1788 cmdLine.serial().printf("Configure_MUX_CTRL2");
whismanoid 37:74aa97afa030 1789 cmdLine.serial().printf(" vbias_ain7_ain0_bitmap=%d", vbias_ain7_ain0_bitmap);
whismanoid 37:74aa97afa030 1790 cmdLine.serial().printf("\r\n");
whismanoid 37:74aa97afa030 1791 // call function Configure_MUX_CTRL2(vbias_ain7_ain0_bitmap)
whismanoid 37:74aa97afa030 1792 uint8_t result = g_MAX11410_device.Configure_MUX_CTRL2(vbias_ain7_ain0_bitmap);
whismanoid 37:74aa97afa030 1793 cmdLine.serial().printf(" =%d", result);
whismanoid 37:74aa97afa030 1794 return true; // command handled by MAX11410
whismanoid 37:74aa97afa030 1795 } // end nested case 'XV'
whismanoid 37:74aa97afa030 1796 break;
whismanoid 37:74aa97afa030 1797
whismanoid 37:74aa97afa030 1798 } // end nested switch (cmdLine[1])
whismanoid 37:74aa97afa030 1799 break;
whismanoid 37:74aa97afa030 1800 } // end case 'X'
whismanoid 35:8aa5dffe523d 1801 // has_register_write_command: case '0'..'9','A'..'F','a'..'f' letters are reserved for bitstream commands
whismanoid 35:8aa5dffe523d 1802 case '0': case '1': case '2': case '3': case '4':
whismanoid 35:8aa5dffe523d 1803 case '5': case '6': case '7': case '8': case '9':
whismanoid 35:8aa5dffe523d 1804 case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
whismanoid 35:8aa5dffe523d 1805 case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
whismanoid 35:8aa5dffe523d 1806 {
whismanoid 35:8aa5dffe523d 1807 // hexadecimal codes get parsed as bytecodes
whismanoid 30:9eb6eff512e7 1808 //
whismanoid 35:8aa5dffe523d 1809 // parse_byteCount_byteList_dec() assumes all keyword args have already been removed from the buffer
whismanoid 35:8aa5dffe523d 1810 // parse cmdLine byte list --> int byteCount; int mosiData[MAX_SPI_BYTE_COUNT];
whismanoid 35:8aa5dffe523d 1811 #define MAX_SPI_BYTE_COUNT 32
whismanoid 35:8aa5dffe523d 1812 size_t byteCount = byteCount;
whismanoid 35:8aa5dffe523d 1813 static char mosiData[MAX_SPI_BYTE_COUNT];
whismanoid 35:8aa5dffe523d 1814 static char misoData[MAX_SPI_BYTE_COUNT];
whismanoid 35:8aa5dffe523d 1815 if (cmdLine.parse_byteCount_byteList_hex(byteCount, mosiData,
whismanoid 35:8aa5dffe523d 1816 MAX_SPI_BYTE_COUNT))
whismanoid 35:8aa5dffe523d 1817 {
whismanoid 35:8aa5dffe523d 1818 // if length is 1 byte then operation is RegRead, otherwise RegWrite
whismanoid 35:8aa5dffe523d 1819 // register_read_function 'RegRead'
whismanoid 35:8aa5dffe523d 1820 // register_write_function 'RegWrite'
whismanoid 35:8aa5dffe523d 1821 // register_name_function 'RegName'
whismanoid 35:8aa5dffe523d 1822 // register_size_function 'RegSize'
whismanoid 35:8aa5dffe523d 1823 MAX11410::MAX11410_CMD_enum_t regAddress = (MAX11410::MAX11410_CMD_enum_t)((mosiData[0] &~ MAX11410::CMD_1aaa_aaaa_REGISTER_READ) & 0xFF);
whismanoid 35:8aa5dffe523d 1824 cmdLine.serial().printf(" regAddress=0x%2.2x\r\n", (regAddress & 0xFF));
whismanoid 35:8aa5dffe523d 1825 cmdLine.serial().printf(" RegName=%s\r\n", g_MAX11410_device.RegName(regAddress));
whismanoid 35:8aa5dffe523d 1826 uint32_t regData = 0;
whismanoid 35:8aa5dffe523d 1827 int regSize = g_MAX11410_device.RegSize(regAddress);
whismanoid 35:8aa5dffe523d 1828 cmdLine.serial().printf(" RegSize=%d\r\n", regSize);
whismanoid 35:8aa5dffe523d 1829 switch(regSize)
whismanoid 35:8aa5dffe523d 1830 {
whismanoid 35:8aa5dffe523d 1831 case 8:
whismanoid 35:8aa5dffe523d 1832 regData = ((uint32_t)mosiData[1] & 0xFF);
whismanoid 35:8aa5dffe523d 1833 break;
whismanoid 35:8aa5dffe523d 1834 case 16:
whismanoid 35:8aa5dffe523d 1835 regData = (((uint32_t)mosiData[1] & 0xFF) << 8) + ((uint32_t)mosiData[2] & 0xFF);
whismanoid 35:8aa5dffe523d 1836 break;
whismanoid 35:8aa5dffe523d 1837 case 24:
whismanoid 35:8aa5dffe523d 1838 regData = (((uint32_t)mosiData[1] & 0xFF) << 16) + (((uint32_t)mosiData[2] & 0xFF) << 8) + ((uint32_t)mosiData[3] & 0xFF);
whismanoid 35:8aa5dffe523d 1839 break;
whismanoid 35:8aa5dffe523d 1840 }
whismanoid 35:8aa5dffe523d 1841 if ((byteCount == 1) || (regAddress & MAX11410::CMD_1aaa_aaaa_REGISTER_READ))
whismanoid 35:8aa5dffe523d 1842 {
whismanoid 35:8aa5dffe523d 1843 cmdLine.serial().printf(" RegRead");
whismanoid 35:8aa5dffe523d 1844 g_MAX11410_device.RegRead(regAddress, &regData);
whismanoid 35:8aa5dffe523d 1845 cmdLine.serial().printf("regData=0x%6.6x\r\n", (regData & 0x00FFFFFF));
whismanoid 35:8aa5dffe523d 1846 }
whismanoid 35:8aa5dffe523d 1847 else
whismanoid 35:8aa5dffe523d 1848 {
whismanoid 35:8aa5dffe523d 1849 cmdLine.serial().printf(" RegWrite regData=0x%6.6X\r\n", (regData & 0x00FFFFFF));
whismanoid 35:8aa5dffe523d 1850 g_MAX11410_device.RegWrite(regAddress, regData);
whismanoid 35:8aa5dffe523d 1851 }
whismanoid 35:8aa5dffe523d 1852 // is there support function shadow regValue of regAddr?
whismanoid 35:8aa5dffe523d 1853 }
whismanoid 35:8aa5dffe523d 1854 return true; // command handled by MAX11410
whismanoid 30:9eb6eff512e7 1855 //
whismanoid 35:8aa5dffe523d 1856 } // end case '0'..'9','A'..'F','a'..'f'
whismanoid 29:7d0bc70036be 1857 break;
whismanoid 19:8f951e448ab1 1858 } // end switch (cmdLine[0])
whismanoid 35:8aa5dffe523d 1859 return false; // command not handled by MAX11410
whismanoid 19:8f951e448ab1 1860 } // end bool MAX11410_menu_onEOLcommandParser(CmdLine & cmdLine)
whismanoid 35:8aa5dffe523d 1861
whismanoid 35:8aa5dffe523d 1862 // CODE GENERATOR: class declaration statement close