Maxim Integrated MAX5719 20-bit, 0.05nV-sec DAC Test program running on MAX32625MBED. Control through USB Serial commands using a terminal emulator such as teraterm or putty.

Dependencies:   MaximTinyTester CmdLine MAX5719 USBDevice

Committer:
whismanoid
Date:
Wed Jun 30 15:45:03 2021 -0700
Revision:
36:5d768b0d40d2
Parent:
35:eb705b9c219f
help string code=? | code=1.234V

Who changed what in which revision?

UserRevisionLine numberNew contents of line
whismanoid 25:9d4012b0887f 1 // /*******************************************************************************
whismanoid 25:9d4012b0887f 2 // * Copyright (C) 2021 Maxim Integrated Products, Inc., All Rights Reserved.
whismanoid 25:9d4012b0887f 3 // *
whismanoid 25:9d4012b0887f 4 // * Permission is hereby granted, free of charge, to any person obtaining a
whismanoid 25:9d4012b0887f 5 // * copy of this software and associated documentation files (the "Software"),
whismanoid 25:9d4012b0887f 6 // * to deal in the Software without restriction, including without limitation
whismanoid 25:9d4012b0887f 7 // * the rights to use, copy, modify, merge, publish, distribute, sublicense,
whismanoid 25:9d4012b0887f 8 // * and/or sell copies of the Software, and to permit persons to whom the
whismanoid 25:9d4012b0887f 9 // * Software is furnished to do so, subject to the following conditions:
whismanoid 25:9d4012b0887f 10 // *
whismanoid 25:9d4012b0887f 11 // * The above copyright notice and this permission notice shall be included
whismanoid 25:9d4012b0887f 12 // * in all copies or substantial portions of the Software.
whismanoid 25:9d4012b0887f 13 // *
whismanoid 25:9d4012b0887f 14 // * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
whismanoid 25:9d4012b0887f 15 // * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
whismanoid 25:9d4012b0887f 16 // * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
whismanoid 25:9d4012b0887f 17 // * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
whismanoid 25:9d4012b0887f 18 // * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
whismanoid 25:9d4012b0887f 19 // * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
whismanoid 25:9d4012b0887f 20 // * OTHER DEALINGS IN THE SOFTWARE.
whismanoid 25:9d4012b0887f 21 // *
whismanoid 25:9d4012b0887f 22 // * Except as contained in this notice, the name of Maxim Integrated
whismanoid 25:9d4012b0887f 23 // * Products, Inc. shall not be used except as stated in the Maxim Integrated
whismanoid 25:9d4012b0887f 24 // * Products, Inc. Branding Policy.
whismanoid 25:9d4012b0887f 25 // *
whismanoid 25:9d4012b0887f 26 // * The mere transfer of this software does not imply any licenses
whismanoid 25:9d4012b0887f 27 // * of trade secrets, proprietary technology, copyrights, patents,
whismanoid 25:9d4012b0887f 28 // * trademarks, maskwork rights, or any other form of intellectual
whismanoid 25:9d4012b0887f 29 // * property whatsoever. Maxim Integrated Products, Inc. retains all
whismanoid 25:9d4012b0887f 30 // * ownership rights.
whismanoid 25:9d4012b0887f 31 // *******************************************************************************
whismanoid 25:9d4012b0887f 32 // */
whismanoid 25:9d4012b0887f 33 // example code includes
whismanoid 25:9d4012b0887f 34 // standard include for target platform -- Platform_Include_Boilerplate
whismanoid 25:9d4012b0887f 35 #include "mbed.h"
whismanoid 25:9d4012b0887f 36 // Platforms:
whismanoid 25:9d4012b0887f 37 // - MAX32625MBED
whismanoid 25:9d4012b0887f 38 // - supports mbed-os-5.11, requires USBDevice library
whismanoid 25:9d4012b0887f 39 // - add https://developer.mbed.org/teams/MaximIntegrated/code/USBDevice/
whismanoid 25:9d4012b0887f 40 // - remove max32630fthr library (if present)
whismanoid 25:9d4012b0887f 41 // - remove MAX32620FTHR library (if present)
whismanoid 25:9d4012b0887f 42 // - MAX32600MBED
whismanoid 25:9d4012b0887f 43 // - Please note the last supported version is Mbed OS 6.3.
whismanoid 25:9d4012b0887f 44 // - remove max32630fthr library (if present)
whismanoid 25:9d4012b0887f 45 // - remove MAX32620FTHR library (if present)
whismanoid 25:9d4012b0887f 46 // - Windows 10 note: Don't connect HDK until you are ready to load new firmware into the board.
whismanoid 25:9d4012b0887f 47 // - NUCLEO_F446RE
whismanoid 25:9d4012b0887f 48 // - remove USBDevice library
whismanoid 25:9d4012b0887f 49 // - remove max32630fthr library (if present)
whismanoid 25:9d4012b0887f 50 // - remove MAX32620FTHR library (if present)
whismanoid 25:9d4012b0887f 51 // - NUCLEO_F401RE
whismanoid 25:9d4012b0887f 52 // - remove USBDevice library
whismanoid 25:9d4012b0887f 53 // - remove max32630fthr library (if present)
whismanoid 25:9d4012b0887f 54 // - remove MAX32620FTHR library (if present)
whismanoid 25:9d4012b0887f 55 // - MAX32630FTHR
whismanoid 25:9d4012b0887f 56 // - #include "max32630fthr.h"
whismanoid 25:9d4012b0887f 57 // - add http://developer.mbed.org/teams/MaximIntegrated/code/max32630fthr/
whismanoid 25:9d4012b0887f 58 // - remove MAX32620FTHR library (if present)
whismanoid 25:9d4012b0887f 59 // - MAX32620FTHR
whismanoid 25:9d4012b0887f 60 // - #include "MAX32620FTHR.h"
whismanoid 25:9d4012b0887f 61 // - remove max32630fthr library (if present)
whismanoid 25:9d4012b0887f 62 // - add https://os.mbed.com/teams/MaximIntegrated/code/MAX32620FTHR/
whismanoid 25:9d4012b0887f 63 // - not tested yet
whismanoid 25:9d4012b0887f 64 // - MAX32625PICO
whismanoid 25:9d4012b0887f 65 // - #include "max32625pico.h"
whismanoid 25:9d4012b0887f 66 // - add https://os.mbed.com/users/switches/code/max32625pico/
whismanoid 25:9d4012b0887f 67 // - remove max32630fthr library (if present)
whismanoid 25:9d4012b0887f 68 // - remove MAX32620FTHR library (if present)
whismanoid 25:9d4012b0887f 69 // - not tested yet
whismanoid 25:9d4012b0887f 70 // - see https://os.mbed.com/users/switches/code/max32625pico/
whismanoid 25:9d4012b0887f 71 // - see https://os.mbed.com/users/switches/code/PICO_board_demo/
whismanoid 25:9d4012b0887f 72 // - see https://os.mbed.com/users/switches/code/PICO_USB_I2C_SPI/
whismanoid 25:9d4012b0887f 73 // - see https://os.mbed.com/users/switches/code/SerialInterface/
whismanoid 25:9d4012b0887f 74 // - Note: To load the MAX32625PICO firmware, hold the button while
whismanoid 25:9d4012b0887f 75 // connecting the USB cable, then copy firmware bin file
whismanoid 25:9d4012b0887f 76 // to the MAINTENANCE drive.
whismanoid 25:9d4012b0887f 77 // - see https://os.mbed.com/platforms/MAX32625PICO/
whismanoid 25:9d4012b0887f 78 // - see https://os.mbed.com/teams/MaximIntegrated/wiki/MAX32625PICO-Firmware-Updates
whismanoid 25:9d4012b0887f 79 //
whismanoid 25:9d4012b0887f 80 // end Platform_Include_Boilerplate
whismanoid 25:9d4012b0887f 81 #include "MAX5719.h"
whismanoid 25:9d4012b0887f 82 #include "CmdLine.h"
whismanoid 25:9d4012b0887f 83 #include "MaximTinyTester.h"
whismanoid 25:9d4012b0887f 84
whismanoid 25:9d4012b0887f 85 // optional: serial port
whismanoid 25:9d4012b0887f 86 // note: some platforms such as Nucleo-F446RE do not support the USBSerial library.
whismanoid 25:9d4012b0887f 87 // In those cases, remove the USBDevice lib from the project and rebuild.
whismanoid 25:9d4012b0887f 88 #if defined(TARGET_MAX32625MBED)
whismanoid 25:9d4012b0887f 89 #include "USBSerial.h"
whismanoid 25:9d4012b0887f 90 USBSerial serial; // virtual serial port over USB (DEV connector)
whismanoid 25:9d4012b0887f 91 #elif defined(TARGET_MAX32625PICO)
whismanoid 25:9d4012b0887f 92 #include "USBSerial.h"
whismanoid 25:9d4012b0887f 93 USBSerial serial; // virtual serial port over USB (DEV connector)
whismanoid 25:9d4012b0887f 94 #elif defined(TARGET_MAX32600MBED)
whismanoid 25:9d4012b0887f 95 #include "USBSerial.h"
whismanoid 25:9d4012b0887f 96 USBSerial serial; // virtual serial port over USB (DEV connector)
whismanoid 25:9d4012b0887f 97 #elif defined(TARGET_MAX32630MBED)
whismanoid 25:9d4012b0887f 98 #include "USBSerial.h"
whismanoid 25:9d4012b0887f 99 USBSerial serial; // virtual serial port over USB (DEV connector)
whismanoid 25:9d4012b0887f 100 #else
whismanoid 25:9d4012b0887f 101 //#include "USBSerial.h"
whismanoid 25:9d4012b0887f 102 Serial serial(USBTX, USBRX); // tx, rx
whismanoid 25:9d4012b0887f 103 #endif
whismanoid 25:9d4012b0887f 104
whismanoid 25:9d4012b0887f 105 void on_immediate_0x21(); // Unicode (U+0021) ! EXCLAMATION MARK
whismanoid 25:9d4012b0887f 106 void on_immediate_0x7b(); // Unicode (U+007B) { LEFT CURLY BRACKET
whismanoid 25:9d4012b0887f 107 void on_immediate_0x7d(); // Unicode (U+007D) } RIGHT CURLY BRACKET
whismanoid 25:9d4012b0887f 108
whismanoid 25:9d4012b0887f 109 #include "CmdLine.h"
whismanoid 25:9d4012b0887f 110
whismanoid 25:9d4012b0887f 111 # if HAS_DAPLINK_SERIAL
whismanoid 25:9d4012b0887f 112 CmdLine cmdLine_DAPLINKserial(DAPLINKserial, "DAPLINK");
whismanoid 25:9d4012b0887f 113 # endif // HAS_DAPLINK_SERIAL
whismanoid 25:9d4012b0887f 114 CmdLine cmdLine_serial(serial, "serial");
whismanoid 25:9d4012b0887f 115
whismanoid 25:9d4012b0887f 116
whismanoid 25:9d4012b0887f 117 //--------------------------------------------------
whismanoid 25:9d4012b0887f 118
whismanoid 25:9d4012b0887f 119
whismanoid 25:9d4012b0887f 120 #if defined(TARGET)
whismanoid 25:9d4012b0887f 121 // TARGET_NAME macros from targets/TARGET_Maxim/TARGET_MAX32625/device/mxc_device.h
whismanoid 25:9d4012b0887f 122 // Create a string definition for the TARGET
whismanoid 25:9d4012b0887f 123 #define STRING_ARG(arg) #arg
whismanoid 25:9d4012b0887f 124 #define STRING_NAME(name) STRING_ARG(name)
whismanoid 25:9d4012b0887f 125 #define TARGET_NAME STRING_NAME(TARGET)
whismanoid 25:9d4012b0887f 126 #elif defined(TARGET_MAX32600)
whismanoid 25:9d4012b0887f 127 #define TARGET_NAME "MAX32600"
whismanoid 25:9d4012b0887f 128 #elif defined(TARGET_LPC1768)
whismanoid 25:9d4012b0887f 129 #define TARGET_NAME "LPC1768"
whismanoid 25:9d4012b0887f 130 #elif defined(TARGET_NUCLEO_F446RE)
whismanoid 25:9d4012b0887f 131 #define TARGET_NAME "NUCLEO_F446RE"
whismanoid 25:9d4012b0887f 132 #elif defined(TARGET_NUCLEO_F401RE)
whismanoid 25:9d4012b0887f 133 #define TARGET_NAME "NUCLEO_F401RE"
whismanoid 25:9d4012b0887f 134 #else
whismanoid 25:9d4012b0887f 135 #error TARGET NOT DEFINED
whismanoid 25:9d4012b0887f 136 #endif
whismanoid 25:9d4012b0887f 137 #if defined(TARGET_MAX32630)
whismanoid 25:9d4012b0887f 138 //--------------------------------------------------
whismanoid 25:9d4012b0887f 139 // TARGET=MAX32630FTHR ARM Cortex-M4F 96MHz 2048kB Flash 512kB SRAM
whismanoid 25:9d4012b0887f 140 // +-------------[microUSB]-------------+
whismanoid 25:9d4012b0887f 141 // | J1 MAX32630FTHR J2 |
whismanoid 25:9d4012b0887f 142 // ______ | [ ] RST GND [ ] |
whismanoid 25:9d4012b0887f 143 // ______ | [ ] 3V3 BAT+[ ] |
whismanoid 25:9d4012b0887f 144 // ______ | [ ] 1V8 reset SW1 |
whismanoid 25:9d4012b0887f 145 // ______ | [ ] GND J4 J3 |
whismanoid 25:9d4012b0887f 146 // analogIn0/4 | [a] AIN_0 1.2Vfs (bat) SYS [ ] | switched BAT+
whismanoid 25:9d4012b0887f 147 // analogIn1/5 | [a] AIN_1 1.2Vfs PWR [ ] | external pwr btn
whismanoid 25:9d4012b0887f 148 // analogIn2 | [a] AIN_2 1.2Vfs +5V VBUS [ ] | USB +5V power
whismanoid 25:9d4012b0887f 149 // analogIn3 | [a] AIN_3 1.2Vfs 1-WIRE P4_0 [d] | D0 dig9
whismanoid 25:9d4012b0887f 150 // (I2C2.SDA) | [d] P5_7 SDA2 SRN P5_6 [d] | D1 dig8
whismanoid 25:9d4012b0887f 151 // (I2C2.SCL) | [d] P6_0 SCL2 SDIO3 P5_5 [d] | D2 dig7
whismanoid 25:9d4012b0887f 152 // D13/SCLK | [s] P5_0 SCLK SDIO2 P5_4 [d] | D3 dig6
whismanoid 25:9d4012b0887f 153 // D11/MOSI | [s] P5_1 MOSI SSEL P5_3 [d] | D4 dig5
whismanoid 25:9d4012b0887f 154 // D12/MISO | [s] P5_2 MISO RTS P3_3 [d] | D5 dig4
whismanoid 25:9d4012b0887f 155 // D10/CS | [s] P3_0 RX CTS P3_2 [d] | D6 dig3
whismanoid 25:9d4012b0887f 156 // D9 dig0 | [d] P3_1 TX SCL P3_5 [d] | D7 dig2
whismanoid 25:9d4012b0887f 157 // ______ | [ ] GND SDA P3_4 [d] | D8 dig1
whismanoid 25:9d4012b0887f 158 // | |
whismanoid 25:9d4012b0887f 159 // | XIP Flash MAX14690N |
whismanoid 25:9d4012b0887f 160 // | XIP_SCLK P1_0 SDA2 P5_7 |
whismanoid 25:9d4012b0887f 161 // | XIP_MOSI P1_1 SCL2 P6_0 |
whismanoid 25:9d4012b0887f 162 // | XIP_MISO P1_2 PMIC_INIT P3_7 |
whismanoid 25:9d4012b0887f 163 // | XIP_SSEL P1_3 MPC P2_7 |
whismanoid 25:9d4012b0887f 164 // | XIP_DIO2 P1_4 MON AIN_0 |
whismanoid 25:9d4012b0887f 165 // | XIP_DIO3 P1_5 |
whismanoid 25:9d4012b0887f 166 // | |
whismanoid 25:9d4012b0887f 167 // | PAN1326B MicroSD LED |
whismanoid 25:9d4012b0887f 168 // | BT_RX P0_0 SD_SCLK P0_4 r P2_4 |
whismanoid 25:9d4012b0887f 169 // | BT_TX P0_1 SD_MOSI P0_5 g P2_5 |
whismanoid 25:9d4012b0887f 170 // | BT_CTS P0_2 SD_MISO P0_6 b P2_6 |
whismanoid 25:9d4012b0887f 171 // | BT_RTS P0_3 SD_SSEL P0_7 |
whismanoid 25:9d4012b0887f 172 // | BT_RST P1_6 DETECT P2_2 |
whismanoid 25:9d4012b0887f 173 // | BT_CLK P1_7 SW2 P2_3 |
whismanoid 25:9d4012b0887f 174 // +------------------------------------+
whismanoid 25:9d4012b0887f 175 // MAX32630FTHR board has MAX14690 PMIC on I2C bus (P5_7 SDA, P6_0 SCL) at slave address 0101_000r 0x50 (or 0x28 for 7 MSbit address).
whismanoid 25:9d4012b0887f 176 // MAX32630FTHR board has BMI160 accelerometer on I2C bus (P5_7 SDA, P6_0 SCL) at slave address 1101_000r 0xD0 (or 0x68 for 7 MSbit address).
whismanoid 25:9d4012b0887f 177 // AIN_0 = AIN0 pin fullscale is 1.2V
whismanoid 25:9d4012b0887f 178 // AIN_1 = AIN1 pin fullscale is 1.2V
whismanoid 25:9d4012b0887f 179 // AIN_2 = AIN2 pin fullscale is 1.2V
whismanoid 25:9d4012b0887f 180 // AIN_3 = AIN3 pin fullscale is 1.2V
whismanoid 25:9d4012b0887f 181 // AIN_4 = AIN0 / 5.0 fullscale is 6.0V
whismanoid 25:9d4012b0887f 182 // AIN_5 = AIN1 / 5.0 fullscale is 6.0V
whismanoid 25:9d4012b0887f 183 // AIN_6 = VDDB / 4.0 fullscale is 4.8V
whismanoid 25:9d4012b0887f 184 // AIN_7 = VDD18 fullscale is 1.2V
whismanoid 25:9d4012b0887f 185 // AIN_8 = VDD12 fullscale is 1.2V
whismanoid 25:9d4012b0887f 186 // AIN_9 = VRTC / 2.0 fullscale is 2.4V
whismanoid 25:9d4012b0887f 187 // AIN_10 = x undefined?
whismanoid 25:9d4012b0887f 188 // AIN_11 = VDDIO / 4.0 fullscale is 4.8V
whismanoid 25:9d4012b0887f 189 // AIN_12 = VDDIOH / 4.0 fullscale is 4.8V
whismanoid 25:9d4012b0887f 190 //
whismanoid 25:9d4012b0887f 191 #include "max32630fthr.h"
whismanoid 25:9d4012b0887f 192 MAX32630FTHR pegasus(MAX32630FTHR::VIO_3V3);
whismanoid 25:9d4012b0887f 193 #define analogIn4_IS_HIGH_RANGE_OF_analogIn0 1
whismanoid 25:9d4012b0887f 194 // MAX32630FTHR board supports only internal VREF = 1.200V at bypass capacitor C15
whismanoid 25:9d4012b0887f 195 const float ADC_FULL_SCALE_VOLTAGE = 1.200;
whismanoid 25:9d4012b0887f 196 // Arduino connector
whismanoid 25:9d4012b0887f 197 #ifndef A0
whismanoid 25:9d4012b0887f 198 #define A0 AIN_0
whismanoid 25:9d4012b0887f 199 #endif
whismanoid 25:9d4012b0887f 200 #ifndef A1
whismanoid 25:9d4012b0887f 201 #define A1 AIN_1
whismanoid 25:9d4012b0887f 202 #endif
whismanoid 25:9d4012b0887f 203 #ifndef A2
whismanoid 25:9d4012b0887f 204 #define A2 AIN_2
whismanoid 25:9d4012b0887f 205 #endif
whismanoid 25:9d4012b0887f 206 #ifndef A3
whismanoid 25:9d4012b0887f 207 #define A3 AIN_3
whismanoid 25:9d4012b0887f 208 #endif
whismanoid 25:9d4012b0887f 209 #ifndef D0
whismanoid 25:9d4012b0887f 210 #define D0 P4_0
whismanoid 25:9d4012b0887f 211 #endif
whismanoid 25:9d4012b0887f 212 #ifndef D1
whismanoid 25:9d4012b0887f 213 #define D1 P5_6
whismanoid 25:9d4012b0887f 214 #endif
whismanoid 25:9d4012b0887f 215 #ifndef D2
whismanoid 25:9d4012b0887f 216 #define D2 P5_5
whismanoid 25:9d4012b0887f 217 #endif
whismanoid 25:9d4012b0887f 218 #ifndef D3
whismanoid 25:9d4012b0887f 219 #define D3 P5_4
whismanoid 25:9d4012b0887f 220 #endif
whismanoid 25:9d4012b0887f 221 #ifndef D4
whismanoid 25:9d4012b0887f 222 #define D4 P5_3
whismanoid 25:9d4012b0887f 223 #endif
whismanoid 25:9d4012b0887f 224 #ifndef D5
whismanoid 25:9d4012b0887f 225 #define D5 P3_3
whismanoid 25:9d4012b0887f 226 #endif
whismanoid 25:9d4012b0887f 227 #ifndef D6
whismanoid 25:9d4012b0887f 228 #define D6 P3_2
whismanoid 25:9d4012b0887f 229 #endif
whismanoid 25:9d4012b0887f 230 #ifndef D7
whismanoid 25:9d4012b0887f 231 #define D7 P3_5
whismanoid 25:9d4012b0887f 232 #endif
whismanoid 25:9d4012b0887f 233 #ifndef D8
whismanoid 25:9d4012b0887f 234 #define D8 P3_4
whismanoid 25:9d4012b0887f 235 #endif
whismanoid 25:9d4012b0887f 236 #ifndef D9
whismanoid 25:9d4012b0887f 237 #define D9 P3_1
whismanoid 25:9d4012b0887f 238 #endif
whismanoid 25:9d4012b0887f 239 #ifndef D10
whismanoid 25:9d4012b0887f 240 #define D10 P3_0
whismanoid 25:9d4012b0887f 241 #endif
whismanoid 25:9d4012b0887f 242 #ifndef D11
whismanoid 25:9d4012b0887f 243 #define D11 P5_1
whismanoid 25:9d4012b0887f 244 #endif
whismanoid 25:9d4012b0887f 245 #ifndef D12
whismanoid 25:9d4012b0887f 246 #define D12 P5_2
whismanoid 25:9d4012b0887f 247 #endif
whismanoid 25:9d4012b0887f 248 #ifndef D13
whismanoid 25:9d4012b0887f 249 #define D13 P5_0
whismanoid 25:9d4012b0887f 250 #endif
whismanoid 25:9d4012b0887f 251 //--------------------------------------------------
whismanoid 25:9d4012b0887f 252 #elif defined(TARGET_MAX32625MBED)
whismanoid 25:9d4012b0887f 253 //--------------------------------------------------
whismanoid 25:9d4012b0887f 254 // TARGET=MAX32625MBED ARM Cortex-M4F 96MHz 512kB Flash 160kB SRAM
whismanoid 25:9d4012b0887f 255 // +-------------------------------------+
whismanoid 25:9d4012b0887f 256 // | MAX32625MBED Arduino UNO header |
whismanoid 25:9d4012b0887f 257 // | |
whismanoid 25:9d4012b0887f 258 // | A5/SCL[ ] | P1_7 dig15
whismanoid 25:9d4012b0887f 259 // | A4/SDA[ ] | P1_6 dig14
whismanoid 25:9d4012b0887f 260 // | AREF=N/C[ ] |
whismanoid 25:9d4012b0887f 261 // | GND[ ] |
whismanoid 25:9d4012b0887f 262 // | [ ]N/C SCK/13[ ] | P1_0 dig13
whismanoid 25:9d4012b0887f 263 // | [ ]IOREF=3V3 MISO/12[ ] | P1_2 dig12
whismanoid 25:9d4012b0887f 264 // | [ ]RST MOSI/11[ ]~| P1_1 dig11
whismanoid 25:9d4012b0887f 265 // | [ ]3V3 CS/10[ ]~| P1_3 dig10
whismanoid 25:9d4012b0887f 266 // | [ ]5V0 9[ ]~| P1_5 dig9
whismanoid 25:9d4012b0887f 267 // | [ ]GND 8[ ] | P1_4 dig8
whismanoid 25:9d4012b0887f 268 // | [ ]GND |
whismanoid 25:9d4012b0887f 269 // | [ ]Vin 7[ ] | P0_7 dig7
whismanoid 25:9d4012b0887f 270 // | 6[ ]~| P0_6 dig6
whismanoid 25:9d4012b0887f 271 // AIN_0 | [ ]A0 5[ ]~| P0_5 dig5
whismanoid 25:9d4012b0887f 272 // AIN_1 | [ ]A1 4[ ] | P0_4 dig4
whismanoid 25:9d4012b0887f 273 // AIN_2 | [ ]A2 INT1/3[ ]~| P0_3 dig3
whismanoid 25:9d4012b0887f 274 // AIN_3 | [ ]A3 INT0/2[ ] | P0_2 dig2
whismanoid 25:9d4012b0887f 275 // dig16 P3_4 | [ ]A4/SDA RST SCK MISO TX>1[ ] | P0_1 dig1
whismanoid 25:9d4012b0887f 276 // dig17 P3_5 | [ ]A5/SCL [ ] [ ] [ ] RX<0[ ] | P0_0 dig0
whismanoid 25:9d4012b0887f 277 // | [ ] [ ] [ ] |
whismanoid 25:9d4012b0887f 278 // | UNO_R3 GND MOSI 5V ____________/
whismanoid 25:9d4012b0887f 279 // \_______________________/
whismanoid 25:9d4012b0887f 280 //
whismanoid 25:9d4012b0887f 281 // +------------------------+
whismanoid 25:9d4012b0887f 282 // | |
whismanoid 25:9d4012b0887f 283 // | MicroSD LED |
whismanoid 25:9d4012b0887f 284 // | SD_SCLK P2_4 r P3_0 |
whismanoid 25:9d4012b0887f 285 // | SD_MOSI P2_5 g P3_1 |
whismanoid 25:9d4012b0887f 286 // | SD_MISO P2_6 b P3_2 |
whismanoid 25:9d4012b0887f 287 // | SD_SSEL P2_7 y P3_3 |
whismanoid 25:9d4012b0887f 288 // | |
whismanoid 25:9d4012b0887f 289 // | DAPLINK BUTTONS |
whismanoid 25:9d4012b0887f 290 // | TX P2_1 SW3 P2_3 |
whismanoid 25:9d4012b0887f 291 // | RX P2_0 SW2 P2_2 |
whismanoid 25:9d4012b0887f 292 // +------------------------+
whismanoid 25:9d4012b0887f 293 //
whismanoid 25:9d4012b0887f 294 // AIN_0 = AIN0 pin fullscale is 1.2V
whismanoid 25:9d4012b0887f 295 // AIN_1 = AIN1 pin fullscale is 1.2V
whismanoid 25:9d4012b0887f 296 // AIN_2 = AIN2 pin fullscale is 1.2V
whismanoid 25:9d4012b0887f 297 // AIN_3 = AIN3 pin fullscale is 1.2V
whismanoid 25:9d4012b0887f 298 // AIN_4 = AIN0 / 5.0 fullscale is 6.0V
whismanoid 25:9d4012b0887f 299 // AIN_5 = AIN1 / 5.0 fullscale is 6.0V
whismanoid 25:9d4012b0887f 300 // AIN_6 = VDDB / 4.0 fullscale is 4.8V
whismanoid 25:9d4012b0887f 301 // AIN_7 = VDD18 fullscale is 1.2V
whismanoid 25:9d4012b0887f 302 // AIN_8 = VDD12 fullscale is 1.2V
whismanoid 25:9d4012b0887f 303 // AIN_9 = VRTC / 2.0 fullscale is 2.4V
whismanoid 25:9d4012b0887f 304 // AIN_10 = x undefined?
whismanoid 25:9d4012b0887f 305 // AIN_11 = VDDIO / 4.0 fullscale is 4.8V
whismanoid 25:9d4012b0887f 306 // AIN_12 = VDDIOH / 4.0 fullscale is 4.8V
whismanoid 25:9d4012b0887f 307 //
whismanoid 25:9d4012b0887f 308 //#include "max32625mbed.h" // ?
whismanoid 25:9d4012b0887f 309 //MAX32625MBED mbed(MAX32625MBED::VIO_3V3); // ?
whismanoid 25:9d4012b0887f 310 #define analogIn4_IS_HIGH_RANGE_OF_analogIn0 1
whismanoid 25:9d4012b0887f 311 // MAX32630FTHR board supports only internal VREF = 1.200V at bypass capacitor C15
whismanoid 25:9d4012b0887f 312 const float ADC_FULL_SCALE_VOLTAGE = 1.200; // TODO: ADC_FULL_SCALE_VOLTAGE Pico?
whismanoid 25:9d4012b0887f 313 // Arduino connector
whismanoid 25:9d4012b0887f 314 #ifndef A0
whismanoid 25:9d4012b0887f 315 #define A0 AIN_0
whismanoid 25:9d4012b0887f 316 #endif
whismanoid 25:9d4012b0887f 317 #ifndef A1
whismanoid 25:9d4012b0887f 318 #define A1 AIN_1
whismanoid 25:9d4012b0887f 319 #endif
whismanoid 25:9d4012b0887f 320 #ifndef A2
whismanoid 25:9d4012b0887f 321 #define A2 AIN_2
whismanoid 25:9d4012b0887f 322 #endif
whismanoid 25:9d4012b0887f 323 #ifndef A3
whismanoid 25:9d4012b0887f 324 #define A3 AIN_3
whismanoid 25:9d4012b0887f 325 #endif
whismanoid 25:9d4012b0887f 326 #ifndef D0
whismanoid 25:9d4012b0887f 327 #define D0 P0_0
whismanoid 25:9d4012b0887f 328 #endif
whismanoid 25:9d4012b0887f 329 #ifndef D1
whismanoid 25:9d4012b0887f 330 #define D1 P0_1
whismanoid 25:9d4012b0887f 331 #endif
whismanoid 25:9d4012b0887f 332 #ifndef D2
whismanoid 25:9d4012b0887f 333 #define D2 P0_2
whismanoid 25:9d4012b0887f 334 #endif
whismanoid 25:9d4012b0887f 335 #ifndef D3
whismanoid 25:9d4012b0887f 336 #define D3 P0_3
whismanoid 25:9d4012b0887f 337 #endif
whismanoid 25:9d4012b0887f 338 #ifndef D4
whismanoid 25:9d4012b0887f 339 #define D4 P0_4
whismanoid 25:9d4012b0887f 340 #endif
whismanoid 25:9d4012b0887f 341 #ifndef D5
whismanoid 25:9d4012b0887f 342 #define D5 P0_5
whismanoid 25:9d4012b0887f 343 #endif
whismanoid 25:9d4012b0887f 344 #ifndef D6
whismanoid 25:9d4012b0887f 345 #define D6 P0_6
whismanoid 25:9d4012b0887f 346 #endif
whismanoid 25:9d4012b0887f 347 #ifndef D7
whismanoid 25:9d4012b0887f 348 #define D7 P0_7
whismanoid 25:9d4012b0887f 349 #endif
whismanoid 25:9d4012b0887f 350 #ifndef D8
whismanoid 25:9d4012b0887f 351 #define D8 P1_4
whismanoid 25:9d4012b0887f 352 #endif
whismanoid 25:9d4012b0887f 353 #ifndef D9
whismanoid 25:9d4012b0887f 354 #define D9 P1_5
whismanoid 25:9d4012b0887f 355 #endif
whismanoid 25:9d4012b0887f 356 #ifndef D10
whismanoid 25:9d4012b0887f 357 #define D10 P1_3
whismanoid 25:9d4012b0887f 358 #endif
whismanoid 25:9d4012b0887f 359 #ifndef D11
whismanoid 25:9d4012b0887f 360 #define D11 P1_1
whismanoid 25:9d4012b0887f 361 #endif
whismanoid 25:9d4012b0887f 362 #ifndef D12
whismanoid 25:9d4012b0887f 363 #define D12 P1_2
whismanoid 25:9d4012b0887f 364 #endif
whismanoid 25:9d4012b0887f 365 #ifndef D13
whismanoid 25:9d4012b0887f 366 #define D13 P1_0
whismanoid 25:9d4012b0887f 367 #endif
whismanoid 25:9d4012b0887f 368 //--------------------------------------------------
whismanoid 25:9d4012b0887f 369 #elif defined(TARGET_MAX32600)
whismanoid 25:9d4012b0887f 370 // target MAX32600
whismanoid 25:9d4012b0887f 371 //
whismanoid 25:9d4012b0887f 372 #define analogIn4_IS_HIGH_RANGE_OF_analogIn0 0
whismanoid 25:9d4012b0887f 373 const float ADC_FULL_SCALE_VOLTAGE = 1.500;
whismanoid 25:9d4012b0887f 374 //
whismanoid 25:9d4012b0887f 375 //--------------------------------------------------
whismanoid 25:9d4012b0887f 376 #elif defined(TARGET_MAX32620FTHR)
whismanoid 25:9d4012b0887f 377 #warning "TARGET_MAX32620FTHR not previously tested; need to define pins..."
whismanoid 25:9d4012b0887f 378 #include "MAX32620FTHR.h"
whismanoid 25:9d4012b0887f 379 // Initialize I/O voltages on MAX32620FTHR board
whismanoid 25:9d4012b0887f 380 MAX32620FTHR fthr(MAX32620FTHR::VIO_3V3);
whismanoid 25:9d4012b0887f 381 //#define USE_LEDS 0 ?
whismanoid 25:9d4012b0887f 382 #define analogIn4_IS_HIGH_RANGE_OF_analogIn0 1
whismanoid 25:9d4012b0887f 383 #warning "TARGET_MAX32620FTHR not previously tested; need to verify ADC_FULL_SCALE_VOLTAGE..."
whismanoid 25:9d4012b0887f 384 const float ADC_FULL_SCALE_VOLTAGE = 1.200;
whismanoid 25:9d4012b0887f 385 //
whismanoid 25:9d4012b0887f 386 //--------------------------------------------------
whismanoid 25:9d4012b0887f 387 #elif defined(TARGET_MAX32625PICO)
whismanoid 25:9d4012b0887f 388 #warning "TARGET_MAX32625PICO not previously tested; need to define pins..."
whismanoid 25:9d4012b0887f 389 #include "max32625pico.h"
whismanoid 25:9d4012b0887f 390 // configure MAX32625PICO VDDIOH mode, and I/O voltages for DIP pins and SWD pins
whismanoid 25:9d4012b0887f 391 MAX32625PICO pico(
whismanoid 25:9d4012b0887f 392 // vddioh_mode_t iohMode
whismanoid 25:9d4012b0887f 393 //~ MAX32625PICO::IOH_OFF, // No connections to VDDIOH
whismanoid 25:9d4012b0887f 394 //~ MAX32625PICO::IOH_DIP_IN, // VDDIOH input from DIP pin 1 (AIN0)
whismanoid 25:9d4012b0887f 395 //~ MAX32625PICO::IOH_SWD_IN, // VDDIOH input from SWD pin 1
whismanoid 25:9d4012b0887f 396 MAX32625PICO::IOH_3V3, // VDDIOH = 3.3V from local supply
whismanoid 25:9d4012b0887f 397 //~ MAX32625PICO::IOH_DIP_OUT, // VDDIOH = 3.3V output to DIP pin 1
whismanoid 25:9d4012b0887f 398 //~ MAX32625PICO::IOH_SWD_OUT, // VDDIOH = 3.3V output to SWD pin 1
whismanoid 25:9d4012b0887f 399 //
whismanoid 25:9d4012b0887f 400 // vio_t dipVio = MAX32625PICO::VIO_1V8 or MAX32625PICO::VIO_IOH
whismanoid 25:9d4012b0887f 401 //~ MAX32625PICO::VIO_1V8, // 1.8V IO (local)
whismanoid 25:9d4012b0887f 402 MAX32625PICO::VIO_IOH, // Use VDDIOH (from DIP pin 1, or SWD pin1, or local 3.3V)
whismanoid 25:9d4012b0887f 403 //
whismanoid 25:9d4012b0887f 404 // vio_t swdVio
whismanoid 25:9d4012b0887f 405 //~ MAX32625PICO::VIO_1V8 // 1.8V IO (local)
whismanoid 25:9d4012b0887f 406 MAX32625PICO::VIO_IOH // Use VDDIOH (from DIP pin 1, or SWD pin1, or local 3.3V)
whismanoid 25:9d4012b0887f 407 );
whismanoid 25:9d4012b0887f 408 //#define USE_LEDS 0 ?
whismanoid 25:9d4012b0887f 409 #define analogIn4_IS_HIGH_RANGE_OF_analogIn0 1
whismanoid 25:9d4012b0887f 410 #warning "TARGET_MAX32625PICO not previously tested; need to verify ADC_FULL_SCALE_VOLTAGE..."
whismanoid 25:9d4012b0887f 411 const float ADC_FULL_SCALE_VOLTAGE = 1.200;
whismanoid 25:9d4012b0887f 412 //
whismanoid 25:9d4012b0887f 413 //--------------------------------------------------
whismanoid 25:9d4012b0887f 414 #elif defined(TARGET_NUCLEO_F446RE) || defined(TARGET_NUCLEO_F401RE)
whismanoid 25:9d4012b0887f 415 // TODO1: target NUCLEO_F446RE
whismanoid 25:9d4012b0887f 416 //
whismanoid 25:9d4012b0887f 417 // USER_BUTTON PC13
whismanoid 25:9d4012b0887f 418 // LED1 is shared with SPI_SCK on NUCLEO_F446RE PA_5, so don't use LED1.
whismanoid 25:9d4012b0887f 419 #define USE_LEDS 0
whismanoid 25:9d4012b0887f 420 // SPI spi(SPI_MOSI, SPI_MISO, SPI_SCK);
whismanoid 25:9d4012b0887f 421 // Serial serial(SERIAL_TX, SERIAL_RX);
whismanoid 25:9d4012b0887f 422 #define analogIn4_IS_HIGH_RANGE_OF_analogIn0 0
whismanoid 25:9d4012b0887f 423 const float ADC_FULL_SCALE_VOLTAGE = 3.300; // TODO: ADC_FULL_SCALE_VOLTAGE Pico?
whismanoid 25:9d4012b0887f 424 //
whismanoid 25:9d4012b0887f 425 //--------------------------------------------------
whismanoid 25:9d4012b0887f 426 #elif defined(TARGET_LPC1768)
whismanoid 25:9d4012b0887f 427 //--------------------------------------------------
whismanoid 25:9d4012b0887f 428 // TARGET=LPC1768 ARM Cortex-M3 100 MHz 512kB flash 64kB SRAM
whismanoid 25:9d4012b0887f 429 // +-------------[microUSB]-------------+
whismanoid 25:9d4012b0887f 430 // ______ | [ ] GND +3.3V VOUT [ ] | ______
whismanoid 25:9d4012b0887f 431 // ______ | [ ] 4.5V<VIN<9.0V +5.0V VU [ ] | ______
whismanoid 25:9d4012b0887f 432 // ______ | [ ] VB USB.IF- [ ] | ______
whismanoid 25:9d4012b0887f 433 // ______ | [ ] nR USB.IF+ [ ] | ______
whismanoid 25:9d4012b0887f 434 // digitalInOut0 | [ ] p5 MOSI ETHERNET.RD- [ ] | ______
whismanoid 25:9d4012b0887f 435 // digitalInOut1 | [ ] p6 MISO ETHERNET.RD+ [ ] | ______
whismanoid 25:9d4012b0887f 436 // digitalInOut2 | [ ] p7 SCLK ETHERNET.TD- [ ] | ______
whismanoid 25:9d4012b0887f 437 // digitalInOut3 | [ ] p8 ETHERNET.TD+ [ ] | ______
whismanoid 25:9d4012b0887f 438 // digitalInOut4 | [ ] p9 TX SDA USB.D- [ ] | ______
whismanoid 25:9d4012b0887f 439 // digitalInOut5 | [ ] p10 RX SCL USB.D+ [ ] | ______
whismanoid 25:9d4012b0887f 440 // digitalInOut6 | [ ] p11 MOSI CAN-RD p30 [ ] | digitalInOut13
whismanoid 25:9d4012b0887f 441 // digitalInOut7 | [ ] p12 MISO CAN-TD p29 [ ] | digitalInOut12
whismanoid 25:9d4012b0887f 442 // digitalInOut8 | [ ] p13 TX SCLK SDA TX p28 [ ] | digitalInOut11
whismanoid 25:9d4012b0887f 443 // digitalInOut9 | [ ] p14 RX SCL RX p27 [ ] | digitalInOut10
whismanoid 25:9d4012b0887f 444 // analogIn0 | [ ] p15 AIN0 3.3Vfs PWM1 p26 [ ] | pwmDriver1
whismanoid 25:9d4012b0887f 445 // analogIn1 | [ ] p16 AIN1 3.3Vfs PWM2 p25 [ ] | pwmDriver2
whismanoid 25:9d4012b0887f 446 // analogIn2 | [ ] p17 AIN2 3.3Vfs PWM3 p24 [ ] | pwmDriver3
whismanoid 25:9d4012b0887f 447 // analogIn3 | [ ] p18 AIN3 AOUT PWM4 p23 [ ] | pwmDriver4
whismanoid 25:9d4012b0887f 448 // analogIn4 | [ ] p19 AIN4 3.3Vfs PWM5 p22 [ ] | pwmDriver5
whismanoid 25:9d4012b0887f 449 // analogIn5 | [ ] p20 AIN5 3.3Vfs PWM6 p21 [ ] | pwmDriver6
whismanoid 25:9d4012b0887f 450 // +------------------------------------+
whismanoid 25:9d4012b0887f 451 // AIN6 = P0.3 = TGT_SBL_RXD?
whismanoid 25:9d4012b0887f 452 // AIN7 = P0.2 = TGT_SBL_TXD?
whismanoid 25:9d4012b0887f 453 //
whismanoid 25:9d4012b0887f 454 //--------------------------------------------------
whismanoid 25:9d4012b0887f 455 // LPC1768 board uses VREF = 3.300V +A3,3V thru L1 to bypass capacitor C14
whismanoid 25:9d4012b0887f 456 #define analogIn4_IS_HIGH_RANGE_OF_analogIn0 0
whismanoid 25:9d4012b0887f 457 const float ADC_FULL_SCALE_VOLTAGE = 3.300;
whismanoid 25:9d4012b0887f 458 #else // not defined(TARGET_LPC1768 etc.)
whismanoid 25:9d4012b0887f 459 //--------------------------------------------------
whismanoid 25:9d4012b0887f 460 // unknown target
whismanoid 25:9d4012b0887f 461 //--------------------------------------------------
whismanoid 25:9d4012b0887f 462 #endif // target definition
whismanoid 25:9d4012b0887f 463
whismanoid 25:9d4012b0887f 464
whismanoid 25:9d4012b0887f 465 //--------------------------------------------------
whismanoid 25:9d4012b0887f 466 // Option to dedicate SPI port pins
whismanoid 25:9d4012b0887f 467 //
whismanoid 25:9d4012b0887f 468 // SPI2_MOSI = P5_1
whismanoid 25:9d4012b0887f 469 // SPI2_MISO = P5_2
whismanoid 25:9d4012b0887f 470 // SPI2_SCK = P5_0
whismanoid 25:9d4012b0887f 471 // On this board I'm using P3_0 as spi_cs
whismanoid 25:9d4012b0887f 472 // SPI2_SS = P5_3
whismanoid 25:9d4012b0887f 473 // SPI2_SDIO2 = P5_4
whismanoid 25:9d4012b0887f 474 // SPI2_SDIO3 = P5_5
whismanoid 25:9d4012b0887f 475 // SPI2_SRN = P5_6
whismanoid 25:9d4012b0887f 476 //
whismanoid 25:9d4012b0887f 477 #ifndef HAS_SPI
whismanoid 25:9d4012b0887f 478 #define HAS_SPI 1
whismanoid 25:9d4012b0887f 479 #endif
whismanoid 25:9d4012b0887f 480 #if HAS_SPI
whismanoid 25:9d4012b0887f 481 #define SPI_MODE0 0
whismanoid 25:9d4012b0887f 482 #define SPI_MODE1 1
whismanoid 25:9d4012b0887f 483 #define SPI_MODE2 2
whismanoid 25:9d4012b0887f 484 #define SPI_MODE3 3
whismanoid 25:9d4012b0887f 485 //
whismanoid 25:9d4012b0887f 486 #if defined(TARGET_MAX32630)
whismanoid 25:9d4012b0887f 487 // Before setting global variables g_SPI_SCLK_Hz and g_SPI_dataMode,
whismanoid 25:9d4012b0887f 488 // workaround for TARGET_MAX32630 SPI_MODE2 SPI_MODE3 problem (issue #30)
whismanoid 25:9d4012b0887f 489 #warning "MAX32630 SPI workaround..."
whismanoid 25:9d4012b0887f 490 // replace SPI_MODE2 (CPOL=1,CPHA=0) with SPI_MODE1 (CPOL=0,CPHA=1) Falling Edge stable
whismanoid 25:9d4012b0887f 491 // replace SPI_MODE3 (CPOL=1,CPHA=1) with SPI_MODE0 (CPOL=0,CPHA=0) Rising Edge stable
whismanoid 25:9d4012b0887f 492 # if ((SPI_dataMode) == (SPI_MODE2))
whismanoid 25:9d4012b0887f 493 #warning "MAX32630 SPI_MODE2 workaround, changing SPI_dataMode to SPI_MODE1..."
whismanoid 25:9d4012b0887f 494 // SPI_dataMode SPI_MODE2 // CPOL=1,CPHA=0: Falling Edge stable; SCLK idle High
whismanoid 25:9d4012b0887f 495 # undef SPI_dataMode
whismanoid 25:9d4012b0887f 496 # define SPI_dataMode SPI_MODE1 // CPOL=0,CPHA=1: Falling Edge stable; SCLK idle Low
whismanoid 25:9d4012b0887f 497 # elif ((SPI_dataMode) == (SPI_MODE3))
whismanoid 25:9d4012b0887f 498 #warning "MAX32630 SPI_MODE3 workaround, changing SPI_dataMode to SPI_MODE0..."
whismanoid 25:9d4012b0887f 499 // SPI_dataMode SPI_MODE3 // CPOL=1,CPHA=1: Rising Edge stable; SCLK idle High
whismanoid 25:9d4012b0887f 500 # undef SPI_dataMode
whismanoid 25:9d4012b0887f 501 # define SPI_dataMode SPI_MODE0 // CPOL=0,CPHA=0: Rising Edge stable; SCLK idle Low
whismanoid 25:9d4012b0887f 502 # endif // workaround for TARGET_MAX32630 SPI_MODE2 SPI_MODE3 problem
whismanoid 25:9d4012b0887f 503 // workaround for TARGET_MAX32630 SPI_MODE2 SPI_MODE3 problem (issue #30)
whismanoid 25:9d4012b0887f 504 // limit SPI SCLK speed to 6MHz or less
whismanoid 25:9d4012b0887f 505 # if ((SPI_SCLK_Hz) > (6000000))
whismanoid 25:9d4012b0887f 506 #warning "MAX32630 SPI speed workaround, changing SPI_SCLK_Hz to 6000000 or 6MHz..."
whismanoid 25:9d4012b0887f 507 # undef SPI_SCLK_Hz
whismanoid 25:9d4012b0887f 508 # define SPI_SCLK_Hz 6000000 // 6MHz
whismanoid 25:9d4012b0887f 509 # endif
whismanoid 25:9d4012b0887f 510 #endif
whismanoid 25:9d4012b0887f 511 //
whismanoid 25:9d4012b0887f 512 uint32_t g_SPI_SCLK_Hz = 12000000; // platform limit 12MHz intSPI_SCLK_Platform_Max_MHz * 1000000
whismanoid 25:9d4012b0887f 513 // TODO1: validate g_SPI_SCLK_Hz against system clock frequency SystemCoreClock F_CPU
whismanoid 25:9d4012b0887f 514 #if defined(TARGET_NUCLEO_F446RE) || defined(TARGET_NUCLEO_F401RE)
whismanoid 25:9d4012b0887f 515 // Nucleo SPI frequency isn't working quite as expected...
whismanoid 25:9d4012b0887f 516 // Looks like STMF4 has an spi clock prescaler (2,4,8,16,32,64,128,256)
whismanoid 25:9d4012b0887f 517 // so 180MHz->[90.0, 45.0, 22.5, 11.25, 5.625, 2.8125, 1.40625, 0.703125]
whismanoid 25:9d4012b0887f 518 // %SC SCLK=1MHz sets spi frequency 703.125kHz
whismanoid 25:9d4012b0887f 519 // %SC SCLK=2MHz sets spi frequency 1.40625MHz
whismanoid 25:9d4012b0887f 520 // %SC SCLK=3MHz sets spi frequency 2.8125MHz
whismanoid 25:9d4012b0887f 521 // %SC SCLK=6MHz sets spi frequency 5.625MHz
whismanoid 25:9d4012b0887f 522 // %SC SCLK=12MHz sets spi frequency 11.25MHz
whismanoid 25:9d4012b0887f 523 // %SC SCLK=23MHz sets spi frequency 22.5MHz
whismanoid 25:9d4012b0887f 524 // %SC SCLK=45MHz sets spi frequency 45.0MHz
whismanoid 25:9d4012b0887f 525 // Don't know why I can't reach spi frequency 90.0MHz, but ok whatever.
whismanoid 25:9d4012b0887f 526 const uint32_t limit_min_SPI_SCLK_divisor = 2;
whismanoid 25:9d4012b0887f 527 const uint32_t limit_max_SPI_SCLK_divisor = 256;
whismanoid 25:9d4012b0887f 528 // not really a divisor, just a powers-of-two prescaler with no intermediate divisors.
whismanoid 25:9d4012b0887f 529 #else
whismanoid 25:9d4012b0887f 530 const uint32_t limit_min_SPI_SCLK_divisor = 2;
whismanoid 25:9d4012b0887f 531 const uint32_t limit_max_SPI_SCLK_divisor = 8191;
whismanoid 25:9d4012b0887f 532 #endif
whismanoid 25:9d4012b0887f 533 const uint32_t limit_max_SPI_SCLK_Hz = (SystemCoreClock / limit_min_SPI_SCLK_divisor); // F_CPU / 2; // 8MHz / 2 = 4MHz
whismanoid 25:9d4012b0887f 534 const uint32_t limit_min_SPI_SCLK_Hz = (SystemCoreClock / limit_max_SPI_SCLK_divisor); // F_CPU / 128; // 8MHz / 128 = 62.5kHz
whismanoid 25:9d4012b0887f 535 //
whismanoid 25:9d4012b0887f 536 uint8_t g_SPI_dataMode = SPI_MODE0; // TODO: missing definition SPI_dataMode;
whismanoid 25:9d4012b0887f 537 uint8_t g_SPI_cs_state = 1;
whismanoid 25:9d4012b0887f 538 //
whismanoid 25:9d4012b0887f 539 #endif
whismanoid 25:9d4012b0887f 540
whismanoid 25:9d4012b0887f 541
whismanoid 25:9d4012b0887f 542 // uncrustify-0.66.1 *INDENT-OFF*
whismanoid 25:9d4012b0887f 543 //--------------------------------------------------
whismanoid 25:9d4012b0887f 544 // Declare the DigitalInOut GPIO pins
whismanoid 25:9d4012b0887f 545 // Optional digitalInOut support. If there is only one it should be digitalInOut1.
whismanoid 25:9d4012b0887f 546 // D) Digital High/Low/Input Pin
whismanoid 25:9d4012b0887f 547 #if defined(TARGET_MAX32630)
whismanoid 25:9d4012b0887f 548 // +-------------[microUSB]-------------+
whismanoid 25:9d4012b0887f 549 // | J1 MAX32630FTHR J2 |
whismanoid 25:9d4012b0887f 550 // | [ ] RST GND [ ] |
whismanoid 25:9d4012b0887f 551 // | [ ] 3V3 BAT+[ ] |
whismanoid 25:9d4012b0887f 552 // | [ ] 1V8 reset SW1 |
whismanoid 25:9d4012b0887f 553 // | [ ] GND J4 J3 |
whismanoid 25:9d4012b0887f 554 // | [ ] AIN_0 1.2Vfs (bat) SYS [ ] |
whismanoid 25:9d4012b0887f 555 // | [ ] AIN_1 1.2Vfs PWR [ ] |
whismanoid 25:9d4012b0887f 556 // | [ ] AIN_2 1.2Vfs +5V VBUS [ ] |
whismanoid 25:9d4012b0887f 557 // | [ ] AIN_3 1.2Vfs 1-WIRE P4_0 [ ] | dig9
whismanoid 25:9d4012b0887f 558 // dig10 | [x] P5_7 SDA2 SRN P5_6 [ ] | dig8
whismanoid 25:9d4012b0887f 559 // dig11 | [x] P6_0 SCL2 SDIO3 P5_5 [ ] | dig7
whismanoid 25:9d4012b0887f 560 // dig12 | [x] P5_0 SCLK SDIO2 P5_4 [ ] | dig6
whismanoid 25:9d4012b0887f 561 // dig13 | [x] P5_1 MOSI SSEL P5_3 [x] | dig5
whismanoid 25:9d4012b0887f 562 // dig14 | [ ] P5_2 MISO RTS P3_3 [ ] | dig4
whismanoid 25:9d4012b0887f 563 // dig15 | [ ] P3_0 RX CTS P3_2 [ ] | dig3
whismanoid 25:9d4012b0887f 564 // dig0 | [ ] P3_1 TX SCL P3_5 [x] | dig2
whismanoid 25:9d4012b0887f 565 // | [ ] GND SDA P3_4 [x] | dig1
whismanoid 25:9d4012b0887f 566 // +------------------------------------+
whismanoid 25:9d4012b0887f 567 #define HAS_digitalInOut0 1 // P3_1 TARGET_MAX32630 J1.15
whismanoid 25:9d4012b0887f 568 #define HAS_digitalInOut1 1 // P3_4 TARGET_MAX32630 J3.12
whismanoid 25:9d4012b0887f 569 #define HAS_digitalInOut2 1 // P3_5 TARGET_MAX32630 J3.11
whismanoid 25:9d4012b0887f 570 #define HAS_digitalInOut3 1 // P3_2 TARGET_MAX32630 J3.10
whismanoid 25:9d4012b0887f 571 #define HAS_digitalInOut4 1 // P3_3 TARGET_MAX32630 J3.9
whismanoid 25:9d4012b0887f 572 #define HAS_digitalInOut5 1 // P5_3 TARGET_MAX32630 J3.8
whismanoid 25:9d4012b0887f 573 #define HAS_digitalInOut6 1 // P5_4 TARGET_MAX32630 J3.7
whismanoid 25:9d4012b0887f 574 #define HAS_digitalInOut7 1 // P5_5 TARGET_MAX32630 J3.6
whismanoid 25:9d4012b0887f 575 #define HAS_digitalInOut8 1 // P5_6 TARGET_MAX32630 J3.5
whismanoid 25:9d4012b0887f 576 #define HAS_digitalInOut9 1 // P4_0 TARGET_MAX32630 J3.4
whismanoid 25:9d4012b0887f 577 #if HAS_I2C
whismanoid 25:9d4012b0887f 578 // avoid resource conflict between P5_7, P6_0 I2C and DigitalInOut
whismanoid 25:9d4012b0887f 579 #define HAS_digitalInOut10 0 // P5_7 TARGET_MAX32630 J1.9
whismanoid 25:9d4012b0887f 580 #define HAS_digitalInOut11 0 // P6_0 TARGET_MAX32630 J1.10
whismanoid 25:9d4012b0887f 581 #else // HAS_I2C
whismanoid 25:9d4012b0887f 582 #define HAS_digitalInOut10 1 // P5_7 TARGET_MAX32630 J1.9
whismanoid 25:9d4012b0887f 583 #define HAS_digitalInOut11 1 // P6_0 TARGET_MAX32630 J1.10
whismanoid 25:9d4012b0887f 584 #endif // HAS_I2C
whismanoid 25:9d4012b0887f 585 #if HAS_SPI
whismanoid 25:9d4012b0887f 586 // avoid resource conflict between P5_0, P5_1, P5_2 SPI and DigitalInOut
whismanoid 25:9d4012b0887f 587 #define HAS_digitalInOut12 0 // P5_0 TARGET_MAX32630 J1.11
whismanoid 25:9d4012b0887f 588 #define HAS_digitalInOut13 0 // P5_1 TARGET_MAX32630 J1.12
whismanoid 25:9d4012b0887f 589 #define HAS_digitalInOut14 0 // P5_2 TARGET_MAX32630 J1.13
whismanoid 25:9d4012b0887f 590 #define HAS_digitalInOut15 0 // P3_0 TARGET_MAX32630 J1.14
whismanoid 25:9d4012b0887f 591 #else // HAS_SPI
whismanoid 25:9d4012b0887f 592 #define HAS_digitalInOut12 1 // P5_0 TARGET_MAX32630 J1.11
whismanoid 25:9d4012b0887f 593 #define HAS_digitalInOut13 1 // P5_1 TARGET_MAX32630 J1.12
whismanoid 25:9d4012b0887f 594 #define HAS_digitalInOut14 1 // P5_2 TARGET_MAX32630 J1.13
whismanoid 25:9d4012b0887f 595 #define HAS_digitalInOut15 1 // P3_0 TARGET_MAX32630 J1.14
whismanoid 25:9d4012b0887f 596 #endif // HAS_SPI
whismanoid 25:9d4012b0887f 597 #if HAS_digitalInOut0
whismanoid 25:9d4012b0887f 598 DigitalInOut digitalInOut0(P3_1, PIN_INPUT, PullUp, 1); // P3_1 TARGET_MAX32630 J1.15
whismanoid 25:9d4012b0887f 599 #endif
whismanoid 25:9d4012b0887f 600 #if HAS_digitalInOut1
whismanoid 25:9d4012b0887f 601 DigitalInOut digitalInOut1(P3_4, PIN_INPUT, PullUp, 1); // P3_4 TARGET_MAX32630 J3.12
whismanoid 25:9d4012b0887f 602 #endif
whismanoid 25:9d4012b0887f 603 #if HAS_digitalInOut2
whismanoid 25:9d4012b0887f 604 DigitalInOut digitalInOut2(P3_5, PIN_INPUT, PullUp, 1); // P3_5 TARGET_MAX32630 J3.11
whismanoid 25:9d4012b0887f 605 #endif
whismanoid 25:9d4012b0887f 606 #if HAS_digitalInOut3
whismanoid 25:9d4012b0887f 607 DigitalInOut digitalInOut3(P3_2, PIN_INPUT, PullUp, 1); // P3_2 TARGET_MAX32630 J3.10
whismanoid 25:9d4012b0887f 608 #endif
whismanoid 25:9d4012b0887f 609 #if HAS_digitalInOut4
whismanoid 25:9d4012b0887f 610 DigitalInOut digitalInOut4(P3_3, PIN_INPUT, PullUp, 1); // P3_3 TARGET_MAX32630 J3.9
whismanoid 25:9d4012b0887f 611 #endif
whismanoid 25:9d4012b0887f 612 #if HAS_digitalInOut5
whismanoid 25:9d4012b0887f 613 DigitalInOut digitalInOut5(P5_3, PIN_INPUT, PullUp, 1); // P5_3 TARGET_MAX32630 J3.8
whismanoid 25:9d4012b0887f 614 #endif
whismanoid 25:9d4012b0887f 615 #if HAS_digitalInOut6
whismanoid 25:9d4012b0887f 616 DigitalInOut digitalInOut6(P5_4, PIN_INPUT, PullUp, 1); // P5_4 TARGET_MAX32630 J3.7
whismanoid 25:9d4012b0887f 617 #endif
whismanoid 25:9d4012b0887f 618 #if HAS_digitalInOut7
whismanoid 25:9d4012b0887f 619 DigitalInOut digitalInOut7(P5_5, PIN_INPUT, PullUp, 1); // P5_5 TARGET_MAX32630 J3.6
whismanoid 25:9d4012b0887f 620 #endif
whismanoid 25:9d4012b0887f 621 #if HAS_digitalInOut8
whismanoid 25:9d4012b0887f 622 DigitalInOut digitalInOut8(P5_6, PIN_INPUT, PullUp, 1); // P5_6 TARGET_MAX32630 J3.5
whismanoid 25:9d4012b0887f 623 #endif
whismanoid 25:9d4012b0887f 624 #if HAS_digitalInOut9
whismanoid 25:9d4012b0887f 625 DigitalInOut digitalInOut9(P4_0, PIN_INPUT, PullUp, 1); // P4_0 TARGET_MAX32630 J3.4
whismanoid 25:9d4012b0887f 626 #endif
whismanoid 25:9d4012b0887f 627 #if HAS_digitalInOut10
whismanoid 25:9d4012b0887f 628 DigitalInOut digitalInOut10(P5_7, PIN_INPUT, PullUp, 1); // P5_7 TARGET_MAX32630 J1.9
whismanoid 25:9d4012b0887f 629 #endif
whismanoid 25:9d4012b0887f 630 #if HAS_digitalInOut11
whismanoid 25:9d4012b0887f 631 DigitalInOut digitalInOut11(P6_0, PIN_INPUT, PullUp, 1); // P6_0 TARGET_MAX32630 J1.10
whismanoid 25:9d4012b0887f 632 #endif
whismanoid 25:9d4012b0887f 633 #if HAS_digitalInOut12
whismanoid 25:9d4012b0887f 634 DigitalInOut digitalInOut12(P5_0, PIN_INPUT, PullUp, 1); // P5_0 TARGET_MAX32630 J1.11
whismanoid 25:9d4012b0887f 635 #endif
whismanoid 25:9d4012b0887f 636 #if HAS_digitalInOut13
whismanoid 25:9d4012b0887f 637 DigitalInOut digitalInOut13(P5_1, PIN_INPUT, PullUp, 1); // P5_1 TARGET_MAX32630 J1.12
whismanoid 25:9d4012b0887f 638 #endif
whismanoid 25:9d4012b0887f 639 #if HAS_digitalInOut14
whismanoid 25:9d4012b0887f 640 DigitalInOut digitalInOut14(P5_2, PIN_INPUT, PullUp, 1); // P5_2 TARGET_MAX32630 J1.13
whismanoid 25:9d4012b0887f 641 #endif
whismanoid 25:9d4012b0887f 642 #if HAS_digitalInOut15
whismanoid 25:9d4012b0887f 643 DigitalInOut digitalInOut15(P3_0, PIN_INPUT, PullUp, 1); // P3_0 TARGET_MAX32630 J1.14
whismanoid 25:9d4012b0887f 644 #endif
whismanoid 25:9d4012b0887f 645 //--------------------------------------------------
whismanoid 25:9d4012b0887f 646 #elif defined(TARGET_MAX32625MBED)
whismanoid 25:9d4012b0887f 647 // TARGET=MAX32625MBED ARM Cortex-M4F 96MHz 512kB Flash 160kB SRAM
whismanoid 25:9d4012b0887f 648 // +-------------------------------------+
whismanoid 25:9d4012b0887f 649 // | MAX32625MBED Arduino UNO header |
whismanoid 25:9d4012b0887f 650 // | |
whismanoid 25:9d4012b0887f 651 // | A5/SCL[ ] | P1_7 dig15
whismanoid 25:9d4012b0887f 652 // | A4/SDA[ ] | P1_6 dig14
whismanoid 25:9d4012b0887f 653 // | AREF=N/C[ ] |
whismanoid 25:9d4012b0887f 654 // | GND[ ] |
whismanoid 25:9d4012b0887f 655 // | [ ]N/C SCK/13[ ] | P1_0 dig13
whismanoid 25:9d4012b0887f 656 // | [ ]IOREF=3V3 MISO/12[ ] | P1_2 dig12
whismanoid 25:9d4012b0887f 657 // | [ ]RST MOSI/11[ ]~| P1_1 dig11
whismanoid 25:9d4012b0887f 658 // | [ ]3V3 CS/10[ ]~| P1_3 dig10
whismanoid 25:9d4012b0887f 659 // | [ ]5V0 9[ ]~| P1_5 dig9
whismanoid 25:9d4012b0887f 660 // | [ ]GND 8[ ] | P1_4 dig8
whismanoid 25:9d4012b0887f 661 // | [ ]GND |
whismanoid 25:9d4012b0887f 662 // | [ ]Vin 7[ ] | P0_7 dig7
whismanoid 25:9d4012b0887f 663 // | 6[ ]~| P0_6 dig6
whismanoid 25:9d4012b0887f 664 // AIN_0 | [ ]A0 5[ ]~| P0_5 dig5
whismanoid 25:9d4012b0887f 665 // AIN_1 | [ ]A1 4[ ] | P0_4 dig4
whismanoid 25:9d4012b0887f 666 // AIN_2 | [ ]A2 INT1/3[ ]~| P0_3 dig3
whismanoid 25:9d4012b0887f 667 // AIN_3 | [ ]A3 INT0/2[ ] | P0_2 dig2
whismanoid 25:9d4012b0887f 668 // dig16 P3_4 | [ ]A4/SDA RST SCK MISO TX>1[ ] | P0_1 dig1
whismanoid 25:9d4012b0887f 669 // dig17 P3_5 | [ ]A5/SCL [ ] [ ] [ ] RX<0[ ] | P0_0 dig0
whismanoid 25:9d4012b0887f 670 // | [ ] [ ] [ ] |
whismanoid 25:9d4012b0887f 671 // | UNO_R3 GND MOSI 5V ____________/
whismanoid 25:9d4012b0887f 672 // \_______________________/
whismanoid 25:9d4012b0887f 673 //
whismanoid 25:9d4012b0887f 674 #define HAS_digitalInOut0 1 // P0_0 TARGET_MAX32625MBED D0
whismanoid 25:9d4012b0887f 675 #define HAS_digitalInOut1 1 // P0_1 TARGET_MAX32625MBED D1
whismanoid 25:9d4012b0887f 676 #if APPLICATION_MAX11131
whismanoid 25:9d4012b0887f 677 #define HAS_digitalInOut2 0 // P0_2 TARGET_MAX32625MBED D2 -- MAX11131 EOC DigitalIn
whismanoid 25:9d4012b0887f 678 #else
whismanoid 25:9d4012b0887f 679 #define HAS_digitalInOut2 1 // P0_2 TARGET_MAX32625MBED D2
whismanoid 25:9d4012b0887f 680 #endif
whismanoid 25:9d4012b0887f 681 #define HAS_digitalInOut3 1 // P0_3 TARGET_MAX32625MBED D3
whismanoid 25:9d4012b0887f 682 #define HAS_digitalInOut4 1 // P0_4 TARGET_MAX32625MBED D4
whismanoid 25:9d4012b0887f 683 #define HAS_digitalInOut5 1 // P0_5 TARGET_MAX32625MBED D5
whismanoid 25:9d4012b0887f 684 #define HAS_digitalInOut6 1 // P0_6 TARGET_MAX32625MBED D6
whismanoid 25:9d4012b0887f 685 #define HAS_digitalInOut7 1 // P0_7 TARGET_MAX32625MBED D7
whismanoid 25:9d4012b0887f 686 #define HAS_digitalInOut8 1 // P1_4 TARGET_MAX32625MBED D8
whismanoid 25:9d4012b0887f 687 #if APPLICATION_MAX11131
whismanoid 25:9d4012b0887f 688 #define HAS_digitalInOut9 0 // P1_5 TARGET_MAX32625MBED D9 -- MAX11131 CNVST DigitalOut
whismanoid 25:9d4012b0887f 689 #else
whismanoid 25:9d4012b0887f 690 #define HAS_digitalInOut9 1 // P1_5 TARGET_MAX32625MBED D9
whismanoid 25:9d4012b0887f 691 #endif
whismanoid 25:9d4012b0887f 692 #if HAS_SPI
whismanoid 25:9d4012b0887f 693 // avoid resource conflict between P5_0, P5_1, P5_2 SPI and DigitalInOut
whismanoid 25:9d4012b0887f 694 #define HAS_digitalInOut10 0 // P1_3 TARGET_MAX32635MBED CS/10
whismanoid 25:9d4012b0887f 695 #define HAS_digitalInOut11 0 // P1_1 TARGET_MAX32635MBED MOSI/11
whismanoid 25:9d4012b0887f 696 #define HAS_digitalInOut12 0 // P1_2 TARGET_MAX32635MBED MISO/12
whismanoid 25:9d4012b0887f 697 #define HAS_digitalInOut13 0 // P1_0 TARGET_MAX32635MBED SCK/13
whismanoid 25:9d4012b0887f 698 #else // HAS_SPI
whismanoid 25:9d4012b0887f 699 #define HAS_digitalInOut10 1 // P1_3 TARGET_MAX32635MBED CS/10
whismanoid 25:9d4012b0887f 700 #define HAS_digitalInOut11 1 // P1_1 TARGET_MAX32635MBED MOSI/11
whismanoid 25:9d4012b0887f 701 #define HAS_digitalInOut12 1 // P1_2 TARGET_MAX32635MBED MISO/12
whismanoid 25:9d4012b0887f 702 #define HAS_digitalInOut13 1 // P1_0 TARGET_MAX32635MBED SCK/13
whismanoid 25:9d4012b0887f 703 #endif // HAS_SPI
whismanoid 25:9d4012b0887f 704 #if HAS_I2C
whismanoid 25:9d4012b0887f 705 // avoid resource conflict between P5_7, P6_0 I2C and DigitalInOut
whismanoid 25:9d4012b0887f 706 #define HAS_digitalInOut14 0 // P1_6 TARGET_MAX32635MBED A4/SDA (10pin digital connector)
whismanoid 25:9d4012b0887f 707 #define HAS_digitalInOut15 0 // P1_7 TARGET_MAX32635MBED A5/SCL (10pin digital connector)
whismanoid 25:9d4012b0887f 708 #define HAS_digitalInOut16 0 // P3_4 TARGET_MAX32635MBED A4/SDA (6pin analog connector)
whismanoid 25:9d4012b0887f 709 #define HAS_digitalInOut17 0 // P3_5 TARGET_MAX32635MBED A5/SCL (6pin analog connector)
whismanoid 25:9d4012b0887f 710 #else // HAS_I2C
whismanoid 25:9d4012b0887f 711 #define HAS_digitalInOut14 1 // P1_6 TARGET_MAX32635MBED A4/SDA (10pin digital connector)
whismanoid 25:9d4012b0887f 712 #define HAS_digitalInOut15 1 // P1_7 TARGET_MAX32635MBED A5/SCL (10pin digital connector)
whismanoid 25:9d4012b0887f 713 #define HAS_digitalInOut16 1 // P3_4 TARGET_MAX32635MBED A4/SDA (6pin analog connector)
whismanoid 25:9d4012b0887f 714 #define HAS_digitalInOut17 1 // P3_5 TARGET_MAX32635MBED A5/SCL (6pin analog connector)
whismanoid 25:9d4012b0887f 715 #endif // HAS_I2C
whismanoid 25:9d4012b0887f 716 #if HAS_digitalInOut0
whismanoid 25:9d4012b0887f 717 DigitalInOut digitalInOut0(P0_0, PIN_INPUT, PullUp, 1); // P0_0 TARGET_MAX32625MBED D0
whismanoid 25:9d4012b0887f 718 #endif
whismanoid 25:9d4012b0887f 719 #if HAS_digitalInOut1
whismanoid 25:9d4012b0887f 720 DigitalInOut digitalInOut1(P0_1, PIN_INPUT, PullUp, 1); // P0_1 TARGET_MAX32625MBED D1
whismanoid 25:9d4012b0887f 721 #endif
whismanoid 25:9d4012b0887f 722 #if HAS_digitalInOut2
whismanoid 25:9d4012b0887f 723 DigitalInOut digitalInOut2(P0_2, PIN_INPUT, PullUp, 1); // P0_2 TARGET_MAX32625MBED D2
whismanoid 25:9d4012b0887f 724 #endif
whismanoid 25:9d4012b0887f 725 #if HAS_digitalInOut3
whismanoid 25:9d4012b0887f 726 DigitalInOut digitalInOut3(P0_3, PIN_INPUT, PullUp, 1); // P0_3 TARGET_MAX32625MBED D3
whismanoid 25:9d4012b0887f 727 #endif
whismanoid 25:9d4012b0887f 728 #if HAS_digitalInOut4
whismanoid 25:9d4012b0887f 729 DigitalInOut digitalInOut4(P0_4, PIN_INPUT, PullUp, 1); // P0_4 TARGET_MAX32625MBED D4
whismanoid 25:9d4012b0887f 730 #endif
whismanoid 25:9d4012b0887f 731 #if HAS_digitalInOut5
whismanoid 25:9d4012b0887f 732 DigitalInOut digitalInOut5(P0_5, PIN_INPUT, PullUp, 1); // P0_5 TARGET_MAX32625MBED D5
whismanoid 25:9d4012b0887f 733 #endif
whismanoid 25:9d4012b0887f 734 #if HAS_digitalInOut6
whismanoid 25:9d4012b0887f 735 DigitalInOut digitalInOut6(P0_6, PIN_INPUT, PullUp, 1); // P0_6 TARGET_MAX32625MBED D6
whismanoid 25:9d4012b0887f 736 #endif
whismanoid 25:9d4012b0887f 737 #if HAS_digitalInOut7
whismanoid 25:9d4012b0887f 738 DigitalInOut digitalInOut7(P0_7, PIN_INPUT, PullUp, 1); // P0_7 TARGET_MAX32625MBED D7
whismanoid 25:9d4012b0887f 739 #endif
whismanoid 25:9d4012b0887f 740 #if HAS_digitalInOut8
whismanoid 25:9d4012b0887f 741 DigitalInOut digitalInOut8(P1_4, PIN_INPUT, PullUp, 1); // P1_4 TARGET_MAX32625MBED D8
whismanoid 25:9d4012b0887f 742 #endif
whismanoid 25:9d4012b0887f 743 #if HAS_digitalInOut9
whismanoid 25:9d4012b0887f 744 DigitalInOut digitalInOut9(P1_5, PIN_INPUT, PullUp, 1); // P1_5 TARGET_MAX32625MBED D9
whismanoid 25:9d4012b0887f 745 #endif
whismanoid 25:9d4012b0887f 746 #if HAS_digitalInOut10
whismanoid 25:9d4012b0887f 747 DigitalInOut digitalInOut10(P1_3, PIN_INPUT, PullUp, 1); // P1_3 TARGET_MAX32635MBED CS/10
whismanoid 25:9d4012b0887f 748 #endif
whismanoid 25:9d4012b0887f 749 #if HAS_digitalInOut11
whismanoid 25:9d4012b0887f 750 DigitalInOut digitalInOut11(P1_1, PIN_INPUT, PullUp, 1); // P1_1 TARGET_MAX32635MBED MOSI/11
whismanoid 25:9d4012b0887f 751 #endif
whismanoid 25:9d4012b0887f 752 #if HAS_digitalInOut12
whismanoid 25:9d4012b0887f 753 DigitalInOut digitalInOut12(P1_2, PIN_INPUT, PullUp, 1); // P1_2 TARGET_MAX32635MBED MISO/12
whismanoid 25:9d4012b0887f 754 #endif
whismanoid 25:9d4012b0887f 755 #if HAS_digitalInOut13
whismanoid 25:9d4012b0887f 756 DigitalInOut digitalInOut13(P1_0, PIN_INPUT, PullUp, 1); // P1_0 TARGET_MAX32635MBED SCK/13
whismanoid 25:9d4012b0887f 757 #endif
whismanoid 25:9d4012b0887f 758 #if HAS_digitalInOut14
whismanoid 25:9d4012b0887f 759 // Ensure that the unused I2C pins do not interfere with analog inputs A4 and A5
whismanoid 25:9d4012b0887f 760 // DigitalInOut mode can be one of PullUp, PullDown, PullNone, OpenDrain
whismanoid 25:9d4012b0887f 761 DigitalInOut digitalInOut14(P1_6, PIN_INPUT, OpenDrain, 1); // P1_6 TARGET_MAX32635MBED A4/SDA (10pin digital connector)
whismanoid 25:9d4012b0887f 762 #endif
whismanoid 25:9d4012b0887f 763 #if HAS_digitalInOut15
whismanoid 25:9d4012b0887f 764 // Ensure that the unused I2C pins do not interfere with analog inputs A4 and A5
whismanoid 25:9d4012b0887f 765 DigitalInOut digitalInOut15(P1_7, PIN_INPUT, OpenDrain, 1); // P1_7 TARGET_MAX32635MBED A5/SCL (10pin digital connector)
whismanoid 25:9d4012b0887f 766 #endif
whismanoid 25:9d4012b0887f 767 #if HAS_digitalInOut16
whismanoid 25:9d4012b0887f 768 // Ensure that the unused I2C pins do not interfere with analog inputs A4 and A5
whismanoid 25:9d4012b0887f 769 // DigitalInOut mode can be one of PullUp, PullDown, PullNone, OpenDrain
whismanoid 25:9d4012b0887f 770 // PullUp-->3.4V, PullDown-->1.7V, PullNone-->3.5V, OpenDrain-->0.00V
whismanoid 25:9d4012b0887f 771 DigitalInOut digitalInOut16(P3_4, PIN_INPUT, OpenDrain, 0); // P3_4 TARGET_MAX32635MBED A4/SDA (6pin analog connector)
whismanoid 25:9d4012b0887f 772 #endif
whismanoid 25:9d4012b0887f 773 #if HAS_digitalInOut17
whismanoid 25:9d4012b0887f 774 // Ensure that the unused I2C pins do not interfere with analog inputs A4 and A5
whismanoid 25:9d4012b0887f 775 DigitalInOut digitalInOut17(P3_5, PIN_INPUT, OpenDrain, 0); // P3_5 TARGET_MAX32635MBED A5/SCL (6pin analog connector)
whismanoid 25:9d4012b0887f 776 #endif
whismanoid 25:9d4012b0887f 777 //--------------------------------------------------
whismanoid 25:9d4012b0887f 778 #elif defined(TARGET_NUCLEO_F446RE) || defined(TARGET_NUCLEO_F401RE)
whismanoid 25:9d4012b0887f 779 #define HAS_digitalInOut0 0
whismanoid 25:9d4012b0887f 780 #define HAS_digitalInOut1 0
whismanoid 25:9d4012b0887f 781 #if APPLICATION_MAX11131
whismanoid 25:9d4012b0887f 782 // D2 -- MAX11131 EOC DigitalIn
whismanoid 25:9d4012b0887f 783 #define HAS_digitalInOut2 0
whismanoid 25:9d4012b0887f 784 #else
whismanoid 25:9d4012b0887f 785 #define HAS_digitalInOut2 1
whismanoid 25:9d4012b0887f 786 #endif
whismanoid 25:9d4012b0887f 787 #define HAS_digitalInOut3 1
whismanoid 25:9d4012b0887f 788 #define HAS_digitalInOut4 1
whismanoid 25:9d4012b0887f 789 #define HAS_digitalInOut5 1
whismanoid 25:9d4012b0887f 790 #define HAS_digitalInOut6 1
whismanoid 25:9d4012b0887f 791 #define HAS_digitalInOut7 1
whismanoid 25:9d4012b0887f 792 #if APPLICATION_MAX5715
whismanoid 25:9d4012b0887f 793 // D8 -- MAX5715 CLRb DigitalOut
whismanoid 25:9d4012b0887f 794 #define HAS_digitalInOut8 0
whismanoid 25:9d4012b0887f 795 #else
whismanoid 25:9d4012b0887f 796 #define HAS_digitalInOut8 1
whismanoid 25:9d4012b0887f 797 #endif
whismanoid 25:9d4012b0887f 798 #if APPLICATION_MAX5715
whismanoid 25:9d4012b0887f 799 // D9 -- MAX5715 LDACb DigitalOut
whismanoid 25:9d4012b0887f 800 #define HAS_digitalInOut9 0
whismanoid 25:9d4012b0887f 801 #elif APPLICATION_MAX11131
whismanoid 25:9d4012b0887f 802 // D9 -- MAX11131 CNVST DigitalOut
whismanoid 25:9d4012b0887f 803 #define HAS_digitalInOut9 0
whismanoid 25:9d4012b0887f 804 #else
whismanoid 25:9d4012b0887f 805 #define HAS_digitalInOut9 1
whismanoid 25:9d4012b0887f 806 #endif
whismanoid 25:9d4012b0887f 807 #if HAS_SPI
whismanoid 25:9d4012b0887f 808 // avoid resource conflict between P5_0, P5_1, P5_2 SPI and DigitalInOut
whismanoid 25:9d4012b0887f 809 // Arduino digital pin D10 SPI function is CS/10
whismanoid 25:9d4012b0887f 810 // Arduino digital pin D11 SPI function is MOSI/11
whismanoid 25:9d4012b0887f 811 // Arduino digital pin D12 SPI function is MISO/12
whismanoid 25:9d4012b0887f 812 // Arduino digital pin D13 SPI function is SCK/13
whismanoid 25:9d4012b0887f 813 #define HAS_digitalInOut10 0
whismanoid 25:9d4012b0887f 814 #define HAS_digitalInOut11 0
whismanoid 25:9d4012b0887f 815 #define HAS_digitalInOut12 0
whismanoid 25:9d4012b0887f 816 #define HAS_digitalInOut13 0
whismanoid 25:9d4012b0887f 817 #else // HAS_SPI
whismanoid 25:9d4012b0887f 818 #define HAS_digitalInOut10 1
whismanoid 25:9d4012b0887f 819 #define HAS_digitalInOut11 1
whismanoid 25:9d4012b0887f 820 #define HAS_digitalInOut12 1
whismanoid 25:9d4012b0887f 821 #define HAS_digitalInOut13 1
whismanoid 25:9d4012b0887f 822 #endif // HAS_SPI
whismanoid 25:9d4012b0887f 823 #if HAS_I2C
whismanoid 25:9d4012b0887f 824 // avoid resource conflict between P5_7, P6_0 I2C and DigitalInOut
whismanoid 25:9d4012b0887f 825 // Arduino digital pin D14 I2C function is A4/SDA (10pin digital connector)
whismanoid 25:9d4012b0887f 826 // Arduino digital pin D15 I2C function is A5/SCL (10pin digital connector)
whismanoid 25:9d4012b0887f 827 // Arduino digital pin D16 I2C function is A4/SDA (6pin analog connector)
whismanoid 25:9d4012b0887f 828 // Arduino digital pin D17 I2C function is A5/SCL (6pin analog connector)
whismanoid 25:9d4012b0887f 829 #define HAS_digitalInOut14 0
whismanoid 25:9d4012b0887f 830 #define HAS_digitalInOut15 0
whismanoid 25:9d4012b0887f 831 #define HAS_digitalInOut16 0
whismanoid 25:9d4012b0887f 832 #define HAS_digitalInOut17 0
whismanoid 25:9d4012b0887f 833 #else // HAS_I2C
whismanoid 25:9d4012b0887f 834 #define HAS_digitalInOut14 1
whismanoid 25:9d4012b0887f 835 #define HAS_digitalInOut15 1
whismanoid 25:9d4012b0887f 836 #define HAS_digitalInOut16 0
whismanoid 25:9d4012b0887f 837 #define HAS_digitalInOut17 0
whismanoid 25:9d4012b0887f 838 #endif // HAS_I2C
whismanoid 25:9d4012b0887f 839 #if HAS_digitalInOut0
whismanoid 25:9d4012b0887f 840 DigitalInOut digitalInOut0(D0, PIN_INPUT, PullUp, 1);
whismanoid 25:9d4012b0887f 841 #endif
whismanoid 25:9d4012b0887f 842 #if HAS_digitalInOut1
whismanoid 25:9d4012b0887f 843 DigitalInOut digitalInOut1(D1, PIN_INPUT, PullUp, 1);
whismanoid 25:9d4012b0887f 844 #endif
whismanoid 25:9d4012b0887f 845 #if HAS_digitalInOut2
whismanoid 25:9d4012b0887f 846 DigitalInOut digitalInOut2(D2, PIN_INPUT, PullUp, 1);
whismanoid 25:9d4012b0887f 847 #endif
whismanoid 25:9d4012b0887f 848 #if HAS_digitalInOut3
whismanoid 25:9d4012b0887f 849 DigitalInOut digitalInOut3(D3, PIN_INPUT, PullUp, 1);
whismanoid 25:9d4012b0887f 850 #endif
whismanoid 25:9d4012b0887f 851 #if HAS_digitalInOut4
whismanoid 25:9d4012b0887f 852 DigitalInOut digitalInOut4(D4, PIN_INPUT, PullUp, 1);
whismanoid 25:9d4012b0887f 853 #endif
whismanoid 25:9d4012b0887f 854 #if HAS_digitalInOut5
whismanoid 25:9d4012b0887f 855 DigitalInOut digitalInOut5(D5, PIN_INPUT, PullUp, 1);
whismanoid 25:9d4012b0887f 856 #endif
whismanoid 25:9d4012b0887f 857 #if HAS_digitalInOut6
whismanoid 25:9d4012b0887f 858 DigitalInOut digitalInOut6(D6, PIN_INPUT, PullUp, 1);
whismanoid 25:9d4012b0887f 859 #endif
whismanoid 25:9d4012b0887f 860 #if HAS_digitalInOut7
whismanoid 25:9d4012b0887f 861 DigitalInOut digitalInOut7(D7, PIN_INPUT, PullUp, 1);
whismanoid 25:9d4012b0887f 862 #endif
whismanoid 25:9d4012b0887f 863 #if HAS_digitalInOut8
whismanoid 25:9d4012b0887f 864 DigitalInOut digitalInOut8(D8, PIN_INPUT, PullUp, 1);
whismanoid 25:9d4012b0887f 865 #endif
whismanoid 25:9d4012b0887f 866 #if HAS_digitalInOut9
whismanoid 25:9d4012b0887f 867 DigitalInOut digitalInOut9(D9, PIN_INPUT, PullUp, 1);
whismanoid 25:9d4012b0887f 868 #endif
whismanoid 25:9d4012b0887f 869 #if HAS_digitalInOut10
whismanoid 25:9d4012b0887f 870 // Arduino digital pin D10 SPI function is CS/10
whismanoid 25:9d4012b0887f 871 DigitalInOut digitalInOut10(D10, PIN_INPUT, PullUp, 1);
whismanoid 25:9d4012b0887f 872 #endif
whismanoid 25:9d4012b0887f 873 #if HAS_digitalInOut11
whismanoid 25:9d4012b0887f 874 // Arduino digital pin D11 SPI function is MOSI/11
whismanoid 25:9d4012b0887f 875 DigitalInOut digitalInOut11(D11, PIN_INPUT, PullUp, 1);
whismanoid 25:9d4012b0887f 876 #endif
whismanoid 25:9d4012b0887f 877 #if HAS_digitalInOut12
whismanoid 25:9d4012b0887f 878 // Arduino digital pin D12 SPI function is MISO/12
whismanoid 25:9d4012b0887f 879 DigitalInOut digitalInOut12(D12, PIN_INPUT, PullUp, 1);
whismanoid 25:9d4012b0887f 880 #endif
whismanoid 25:9d4012b0887f 881 #if HAS_digitalInOut13
whismanoid 25:9d4012b0887f 882 // Arduino digital pin D13 SPI function is SCK/13
whismanoid 25:9d4012b0887f 883 DigitalInOut digitalInOut13(D13, PIN_INPUT, PullUp, 1);
whismanoid 25:9d4012b0887f 884 #endif
whismanoid 25:9d4012b0887f 885 #if HAS_digitalInOut14
whismanoid 25:9d4012b0887f 886 // Arduino digital pin D14 I2C function is A4/SDA (10pin digital connector)
whismanoid 25:9d4012b0887f 887 DigitalInOut digitalInOut14(D14, PIN_INPUT, PullUp, 1);
whismanoid 25:9d4012b0887f 888 #endif
whismanoid 25:9d4012b0887f 889 #if HAS_digitalInOut15
whismanoid 25:9d4012b0887f 890 // Arduino digital pin D15 I2C function is A5/SCL (10pin digital connector)
whismanoid 25:9d4012b0887f 891 DigitalInOut digitalInOut15(D15, PIN_INPUT, PullUp, 1);
whismanoid 25:9d4012b0887f 892 #endif
whismanoid 25:9d4012b0887f 893 #if HAS_digitalInOut16
whismanoid 25:9d4012b0887f 894 // Arduino digital pin D16 I2C function is A4/SDA (6pin analog connector)
whismanoid 25:9d4012b0887f 895 DigitalInOut digitalInOut16(D16, PIN_INPUT, PullUp, 1);
whismanoid 25:9d4012b0887f 896 #endif
whismanoid 25:9d4012b0887f 897 #if HAS_digitalInOut17
whismanoid 25:9d4012b0887f 898 // Arduino digital pin D17 I2C function is A5/SCL (6pin analog connector)
whismanoid 25:9d4012b0887f 899 DigitalInOut digitalInOut17(D17, PIN_INPUT, PullUp, 1);
whismanoid 25:9d4012b0887f 900 #endif
whismanoid 25:9d4012b0887f 901 //--------------------------------------------------
whismanoid 25:9d4012b0887f 902 #elif defined(TARGET_LPC1768)
whismanoid 25:9d4012b0887f 903 #define HAS_digitalInOut0 1
whismanoid 25:9d4012b0887f 904 #define HAS_digitalInOut1 1
whismanoid 25:9d4012b0887f 905 #define HAS_digitalInOut2 1
whismanoid 25:9d4012b0887f 906 #define HAS_digitalInOut3 1
whismanoid 25:9d4012b0887f 907 #define HAS_digitalInOut4 1
whismanoid 25:9d4012b0887f 908 #define HAS_digitalInOut5 1
whismanoid 25:9d4012b0887f 909 #define HAS_digitalInOut6 1
whismanoid 25:9d4012b0887f 910 #define HAS_digitalInOut7 1
whismanoid 25:9d4012b0887f 911 #define HAS_digitalInOut8 1
whismanoid 25:9d4012b0887f 912 #define HAS_digitalInOut9 1
whismanoid 25:9d4012b0887f 913 // #define HAS_digitalInOut10 1
whismanoid 25:9d4012b0887f 914 // #define HAS_digitalInOut11 1
whismanoid 25:9d4012b0887f 915 // #define HAS_digitalInOut12 1
whismanoid 25:9d4012b0887f 916 // #define HAS_digitalInOut13 1
whismanoid 25:9d4012b0887f 917 // #define HAS_digitalInOut14 1
whismanoid 25:9d4012b0887f 918 // #define HAS_digitalInOut15 1
whismanoid 25:9d4012b0887f 919 #if HAS_digitalInOut0
whismanoid 25:9d4012b0887f 920 DigitalInOut digitalInOut0(p5, PIN_INPUT, PullUp, 1); // TARGET_LPC1768 P0.9/I2STX_SDA/MOSI1/MAT2.3
whismanoid 25:9d4012b0887f 921 #endif
whismanoid 25:9d4012b0887f 922 #if HAS_digitalInOut1
whismanoid 25:9d4012b0887f 923 DigitalInOut digitalInOut1(p6, PIN_INPUT, PullUp, 1); // TARGET_LPC1768 P0.8/I2STX_WS/MISO1/MAT2.2
whismanoid 25:9d4012b0887f 924 #endif
whismanoid 25:9d4012b0887f 925 #if HAS_digitalInOut2
whismanoid 25:9d4012b0887f 926 DigitalInOut digitalInOut2(p7, PIN_INPUT, PullUp, 1); // TARGET_LPC1768 P0.7/I2STX_CLK/SCK1/MAT2.1
whismanoid 25:9d4012b0887f 927 #endif
whismanoid 25:9d4012b0887f 928 #if HAS_digitalInOut3
whismanoid 25:9d4012b0887f 929 DigitalInOut digitalInOut3(p8, PIN_INPUT, PullUp, 1); // TARGET_LPC1768 P0.6/I2SRX_SDA/SSEL1/MAT2.0
whismanoid 25:9d4012b0887f 930 #endif
whismanoid 25:9d4012b0887f 931 #if HAS_digitalInOut4
whismanoid 25:9d4012b0887f 932 DigitalInOut digitalInOut4(p9, PIN_INPUT, PullUp, 1); // TARGET_LPC1768 P0.0/CAN_RX1/TXD3/SDA1
whismanoid 25:9d4012b0887f 933 #endif
whismanoid 25:9d4012b0887f 934 #if HAS_digitalInOut5
whismanoid 25:9d4012b0887f 935 DigitalInOut digitalInOut5(p10, PIN_INPUT, PullUp, 1); // TARGET_LPC1768 P0.1/CAN_TX1/RXD3/SCL1
whismanoid 25:9d4012b0887f 936 #endif
whismanoid 25:9d4012b0887f 937 #if HAS_digitalInOut6
whismanoid 25:9d4012b0887f 938 DigitalInOut digitalInOut6(p11, PIN_INPUT, PullUp, 1); // TARGET_LPC1768 P0.18/DCD1/MOSI0/MOSI1
whismanoid 25:9d4012b0887f 939 #endif
whismanoid 25:9d4012b0887f 940 #if HAS_digitalInOut7
whismanoid 25:9d4012b0887f 941 DigitalInOut digitalInOut7(p12, PIN_INPUT, PullUp, 1); // TARGET_LPC1768 P0.17/CTS1/MISO0/MISO
whismanoid 25:9d4012b0887f 942 #endif
whismanoid 25:9d4012b0887f 943 #if HAS_digitalInOut8
whismanoid 25:9d4012b0887f 944 DigitalInOut digitalInOut8(p13, PIN_INPUT, PullUp, 1); // TARGET_LPC1768 P0.15/TXD1/SCK0/SCK
whismanoid 25:9d4012b0887f 945 #endif
whismanoid 25:9d4012b0887f 946 #if HAS_digitalInOut9
whismanoid 25:9d4012b0887f 947 DigitalInOut digitalInOut9(p14, PIN_INPUT, PullUp, 1); // TARGET_LPC1768 P0.16/RXD1/SSEL0/SSEL
whismanoid 25:9d4012b0887f 948 #endif
whismanoid 25:9d4012b0887f 949 //
whismanoid 25:9d4012b0887f 950 // these pins support analog input analogIn0 .. analogIn5
whismanoid 25:9d4012b0887f 951 //DigitalInOut digitalInOut_(p15, PIN_INPUT, PullUp, 1); // TARGET_LPC1768 P0.23/AD0.0/I2SRX_CLK/CAP3.0
whismanoid 25:9d4012b0887f 952 //DigitalInOut digitalInOut_(p16, PIN_INPUT, PullUp, 1); // TARGET_LPC1768 P0.24/AD0.1/I2SRX_WS/CAP3.1
whismanoid 25:9d4012b0887f 953 //DigitalInOut digitalInOut_(p17, PIN_INPUT, PullUp, 1); // TARGET_LPC1768 P0.25/AD0.2/I2SRX_SDA/TXD3
whismanoid 25:9d4012b0887f 954 //DigitalInOut digitalInOut_(p18, PIN_INPUT, PullUp, 1); // TARGET_LPC1768 P0.26/AD0.3/AOUT/RXD3
whismanoid 25:9d4012b0887f 955 //DigitalInOut digitalInOut_(p19, PIN_INPUT, PullUp, 1); // TARGET_LPC1768 P1.30/VBUS/AD0.4
whismanoid 25:9d4012b0887f 956 //DigitalInOut digitalInOut_(p20, PIN_INPUT, PullUp, 1); // TARGET_LPC1768 P1.31/SCK1/AD0.5
whismanoid 25:9d4012b0887f 957 //
whismanoid 25:9d4012b0887f 958 // these pins support PWM pwmDriver1 .. pwmDriver6
whismanoid 25:9d4012b0887f 959 //DigitalInOut digitalInOut_(p21, PIN_INPUT, PullUp, 1); // TARGET_LPC1768 P2.5/PWM1.6/DTR1/TRACEDATA0
whismanoid 25:9d4012b0887f 960 //DigitalInOut digitalInOut_(p22, PIN_INPUT, PullUp, 1); // TARGET_LPC1768 P2.4/PWM1.5/DSR1/TRACEDATA1
whismanoid 25:9d4012b0887f 961 //DigitalInOut digitalInOut_(p23, PIN_INPUT, PullUp, 1); // TARGET_LPC1768 P2.3/PWM1.4/DCD1/TRACEDATA2
whismanoid 25:9d4012b0887f 962 //DigitalInOut digitalInOut_(p24, PIN_INPUT, PullUp, 1); // TARGET_LPC1768 P2.2/PWM1.3/CTS1/TRACEDATA3
whismanoid 25:9d4012b0887f 963 //DigitalInOut digitalInOut_(p25, PIN_INPUT, PullUp, 1); // TARGET_LPC1768 P2.1/PWM1.2/RXD1
whismanoid 25:9d4012b0887f 964 //DigitalInOut digitalInOut_(p26, PIN_INPUT, PullUp, 1); // TARGET_LPC1768 P2.0/PWM1.1/TXD1/TRACECLK
whismanoid 25:9d4012b0887f 965 //
whismanoid 25:9d4012b0887f 966 // these could be additional digitalInOut pins
whismanoid 25:9d4012b0887f 967 #if HAS_digitalInOut10
whismanoid 25:9d4012b0887f 968 DigitalInOut digitalInOut10(p27, PIN_INPUT, PullUp, 1); // TARGET_LPC1768 P0.11/RXD2/SCL2/MAT3.1
whismanoid 25:9d4012b0887f 969 #endif
whismanoid 25:9d4012b0887f 970 #if HAS_digitalInOut11
whismanoid 25:9d4012b0887f 971 DigitalInOut digitalInOut11(p28, PIN_INPUT, PullUp, 1); // TARGET_LPC1768 P0.10/TXD2/SDA2/MAT3.0
whismanoid 25:9d4012b0887f 972 #endif
whismanoid 25:9d4012b0887f 973 #if HAS_digitalInOut12
whismanoid 25:9d4012b0887f 974 DigitalInOut digitalInOut12(p29, PIN_INPUT, PullUp, 1); // TARGET_LPC1768 P0.5/I2SRX_WS/CAN_TX2/CAP2.1
whismanoid 25:9d4012b0887f 975 #endif
whismanoid 25:9d4012b0887f 976 #if HAS_digitalInOut13
whismanoid 25:9d4012b0887f 977 DigitalInOut digitalInOut13(p30, PIN_INPUT, PullUp, 1); // TARGET_LPC1768 P0.4/I2SRX_CLK/CAN_RX2/CAP2.0
whismanoid 25:9d4012b0887f 978 #endif
whismanoid 25:9d4012b0887f 979 #if HAS_digitalInOut14
whismanoid 25:9d4012b0887f 980 DigitalInOut digitalInOut14(___, PIN_INPUT, PullUp, 1);
whismanoid 25:9d4012b0887f 981 #endif
whismanoid 25:9d4012b0887f 982 #if HAS_digitalInOut15
whismanoid 25:9d4012b0887f 983 DigitalInOut digitalInOut15(___, PIN_INPUT, PullUp, 1);
whismanoid 25:9d4012b0887f 984 #endif
whismanoid 25:9d4012b0887f 985 #else
whismanoid 25:9d4012b0887f 986 // unknown target
whismanoid 25:9d4012b0887f 987 #endif
whismanoid 25:9d4012b0887f 988 // uncrustify-0.66.1 *INDENT-ON*
whismanoid 25:9d4012b0887f 989 #if HAS_digitalInOut0 || HAS_digitalInOut1 \
whismanoid 25:9d4012b0887f 990 || HAS_digitalInOut2 || HAS_digitalInOut3 \
whismanoid 25:9d4012b0887f 991 || HAS_digitalInOut4 || HAS_digitalInOut5 \
whismanoid 25:9d4012b0887f 992 || HAS_digitalInOut6 || HAS_digitalInOut7 \
whismanoid 25:9d4012b0887f 993 || HAS_digitalInOut8 || HAS_digitalInOut9 \
whismanoid 25:9d4012b0887f 994 || HAS_digitalInOut10 || HAS_digitalInOut11 \
whismanoid 25:9d4012b0887f 995 || HAS_digitalInOut12 || HAS_digitalInOut13 \
whismanoid 25:9d4012b0887f 996 || HAS_digitalInOut14 || HAS_digitalInOut15 \
whismanoid 25:9d4012b0887f 997 || HAS_digitalInOut16 || HAS_digitalInOut17
whismanoid 25:9d4012b0887f 998 #define HAS_digitalInOuts 1
whismanoid 25:9d4012b0887f 999 #else
whismanoid 25:9d4012b0887f 1000 #warning "Note: There are no digitalInOut resources defined"
whismanoid 25:9d4012b0887f 1001 #endif
whismanoid 25:9d4012b0887f 1002
whismanoid 25:9d4012b0887f 1003 // uncrustify-0.66.1 *INDENT-OFF*
whismanoid 25:9d4012b0887f 1004 //--------------------------------------------------
whismanoid 25:9d4012b0887f 1005 // Declare the AnalogIn driver
whismanoid 25:9d4012b0887f 1006 // Optional analogIn support. If there is only one it should be analogIn1.
whismanoid 25:9d4012b0887f 1007 // A) analog input
whismanoid 25:9d4012b0887f 1008 #if defined(TARGET_MAX32630)
whismanoid 25:9d4012b0887f 1009 #define HAS_analogIn0 1
whismanoid 25:9d4012b0887f 1010 #define HAS_analogIn1 1
whismanoid 25:9d4012b0887f 1011 #define HAS_analogIn2 1
whismanoid 25:9d4012b0887f 1012 #define HAS_analogIn3 1
whismanoid 25:9d4012b0887f 1013 #define HAS_analogIn4 1
whismanoid 25:9d4012b0887f 1014 #define HAS_analogIn5 1
whismanoid 25:9d4012b0887f 1015 #define HAS_analogIn6 1
whismanoid 25:9d4012b0887f 1016 #define HAS_analogIn7 1
whismanoid 25:9d4012b0887f 1017 #define HAS_analogIn8 1
whismanoid 25:9d4012b0887f 1018 #define HAS_analogIn9 1
whismanoid 25:9d4012b0887f 1019 // #define HAS_analogIn10 0
whismanoid 25:9d4012b0887f 1020 // #define HAS_analogIn11 0
whismanoid 25:9d4012b0887f 1021 // #define HAS_analogIn12 0
whismanoid 25:9d4012b0887f 1022 // #define HAS_analogIn13 0
whismanoid 25:9d4012b0887f 1023 // #define HAS_analogIn14 0
whismanoid 25:9d4012b0887f 1024 // #define HAS_analogIn15 0
whismanoid 25:9d4012b0887f 1025 #if HAS_analogIn0
whismanoid 25:9d4012b0887f 1026 AnalogIn analogIn0(AIN_0); // TARGET_MAX32630 J1.5 AIN_0 = AIN0 pin fullscale is 1.2V
whismanoid 25:9d4012b0887f 1027 #endif
whismanoid 25:9d4012b0887f 1028 #if HAS_analogIn1
whismanoid 25:9d4012b0887f 1029 AnalogIn analogIn1(AIN_1); // TARGET_MAX32630 J1.6 AIN_1 = AIN1 pin fullscale is 1.2V
whismanoid 25:9d4012b0887f 1030 #endif
whismanoid 25:9d4012b0887f 1031 #if HAS_analogIn2
whismanoid 25:9d4012b0887f 1032 AnalogIn analogIn2(AIN_2); // TARGET_MAX32630 J1.7 AIN_2 = AIN2 pin fullscale is 1.2V
whismanoid 25:9d4012b0887f 1033 #endif
whismanoid 25:9d4012b0887f 1034 #if HAS_analogIn3
whismanoid 25:9d4012b0887f 1035 AnalogIn analogIn3(AIN_3); // TARGET_MAX32630 J1.8 AIN_3 = AIN3 pin fullscale is 1.2V
whismanoid 25:9d4012b0887f 1036 #endif
whismanoid 25:9d4012b0887f 1037 #if HAS_analogIn4
whismanoid 25:9d4012b0887f 1038 AnalogIn analogIn4(AIN_4); // TARGET_MAX32630 J1.5 AIN_4 = AIN0 / 5.0 fullscale is 6.0V
whismanoid 25:9d4012b0887f 1039 #endif
whismanoid 25:9d4012b0887f 1040 #if HAS_analogIn5
whismanoid 25:9d4012b0887f 1041 AnalogIn analogIn5(AIN_5); // TARGET_MAX32630 J1.6 AIN_5 = AIN1 / 5.0 fullscale is 6.0V
whismanoid 25:9d4012b0887f 1042 #endif
whismanoid 25:9d4012b0887f 1043 #if HAS_analogIn6
whismanoid 25:9d4012b0887f 1044 AnalogIn analogIn6(AIN_6); // TARGET_MAX32630 AIN_6 = VDDB / 4.0 fullscale is 4.8V
whismanoid 25:9d4012b0887f 1045 #endif
whismanoid 25:9d4012b0887f 1046 #if HAS_analogIn7
whismanoid 25:9d4012b0887f 1047 AnalogIn analogIn7(AIN_7); // TARGET_MAX32630 AIN_7 = VDD18 fullscale is 1.2V
whismanoid 25:9d4012b0887f 1048 #endif
whismanoid 25:9d4012b0887f 1049 #if HAS_analogIn8
whismanoid 25:9d4012b0887f 1050 AnalogIn analogIn8(AIN_8); // TARGET_MAX32630 AIN_8 = VDD12 fullscale is 1.2V
whismanoid 25:9d4012b0887f 1051 #endif
whismanoid 25:9d4012b0887f 1052 #if HAS_analogIn9
whismanoid 25:9d4012b0887f 1053 AnalogIn analogIn9(AIN_9); // TARGET_MAX32630 AIN_9 = VRTC / 2.0 fullscale is 2.4V
whismanoid 25:9d4012b0887f 1054 #endif
whismanoid 25:9d4012b0887f 1055 #if HAS_analogIn10
whismanoid 25:9d4012b0887f 1056 AnalogIn analogIn10(____); // TARGET_MAX32630 AIN_10 = x undefined?
whismanoid 25:9d4012b0887f 1057 #endif
whismanoid 25:9d4012b0887f 1058 #if HAS_analogIn11
whismanoid 25:9d4012b0887f 1059 AnalogIn analogIn11(____); // TARGET_MAX32630 AIN_11 = VDDIO / 4.0 fullscale is 4.8V
whismanoid 25:9d4012b0887f 1060 #endif
whismanoid 25:9d4012b0887f 1061 #if HAS_analogIn12
whismanoid 25:9d4012b0887f 1062 AnalogIn analogIn12(____); // TARGET_MAX32630 AIN_12 = VDDIOH / 4.0 fullscale is 4.8V
whismanoid 25:9d4012b0887f 1063 #endif
whismanoid 25:9d4012b0887f 1064 #if HAS_analogIn13
whismanoid 25:9d4012b0887f 1065 AnalogIn analogIn13(____);
whismanoid 25:9d4012b0887f 1066 #endif
whismanoid 25:9d4012b0887f 1067 #if HAS_analogIn14
whismanoid 25:9d4012b0887f 1068 AnalogIn analogIn14(____);
whismanoid 25:9d4012b0887f 1069 #endif
whismanoid 25:9d4012b0887f 1070 #if HAS_analogIn15
whismanoid 25:9d4012b0887f 1071 AnalogIn analogIn15(____);
whismanoid 25:9d4012b0887f 1072 #endif
whismanoid 25:9d4012b0887f 1073 //--------------------------------------------------
whismanoid 25:9d4012b0887f 1074 #elif defined(TARGET_MAX32625MBED)
whismanoid 25:9d4012b0887f 1075 #define HAS_analogIn0 1
whismanoid 25:9d4012b0887f 1076 #define HAS_analogIn1 1
whismanoid 25:9d4012b0887f 1077 #define HAS_analogIn2 1
whismanoid 25:9d4012b0887f 1078 #define HAS_analogIn3 1
whismanoid 25:9d4012b0887f 1079 #define HAS_analogIn4 1
whismanoid 25:9d4012b0887f 1080 #define HAS_analogIn5 1
whismanoid 25:9d4012b0887f 1081 #if HAS_analogIn0
whismanoid 25:9d4012b0887f 1082 AnalogIn analogIn0(AIN_0); // TARGET_MAX32630 J1.5 AIN_0 = AIN0 pin fullscale is 1.2V
whismanoid 25:9d4012b0887f 1083 #endif
whismanoid 25:9d4012b0887f 1084 #if HAS_analogIn1
whismanoid 25:9d4012b0887f 1085 AnalogIn analogIn1(AIN_1); // TARGET_MAX32630 J1.6 AIN_1 = AIN1 pin fullscale is 1.2V
whismanoid 25:9d4012b0887f 1086 #endif
whismanoid 25:9d4012b0887f 1087 #if HAS_analogIn2
whismanoid 25:9d4012b0887f 1088 AnalogIn analogIn2(AIN_2); // TARGET_MAX32630 J1.7 AIN_2 = AIN2 pin fullscale is 1.2V
whismanoid 25:9d4012b0887f 1089 #endif
whismanoid 25:9d4012b0887f 1090 #if HAS_analogIn3
whismanoid 25:9d4012b0887f 1091 AnalogIn analogIn3(AIN_3); // TARGET_MAX32630 J1.8 AIN_3 = AIN3 pin fullscale is 1.2V
whismanoid 25:9d4012b0887f 1092 #endif
whismanoid 25:9d4012b0887f 1093 #if HAS_analogIn4
whismanoid 25:9d4012b0887f 1094 AnalogIn analogIn4(AIN_4); // TARGET_MAX32630 J1.5 AIN_4 = AIN0 / 5.0 fullscale is 6.0V
whismanoid 25:9d4012b0887f 1095 #endif
whismanoid 25:9d4012b0887f 1096 #if HAS_analogIn5
whismanoid 25:9d4012b0887f 1097 AnalogIn analogIn5(AIN_5); // TARGET_MAX32630 J1.6 AIN_5 = AIN1 / 5.0 fullscale is 6.0V
whismanoid 25:9d4012b0887f 1098 #endif
whismanoid 25:9d4012b0887f 1099 //--------------------------------------------------
whismanoid 25:9d4012b0887f 1100 #elif defined(TARGET_MAX32620FTHR)
whismanoid 25:9d4012b0887f 1101 #warning "TARGET_MAX32620FTHR not previously tested; need to verify analogIn0..."
whismanoid 25:9d4012b0887f 1102 #define HAS_analogIn0 1
whismanoid 25:9d4012b0887f 1103 #define HAS_analogIn1 1
whismanoid 25:9d4012b0887f 1104 #define HAS_analogIn2 1
whismanoid 25:9d4012b0887f 1105 #define HAS_analogIn3 1
whismanoid 25:9d4012b0887f 1106 #define HAS_analogIn4 1
whismanoid 25:9d4012b0887f 1107 #define HAS_analogIn5 1
whismanoid 25:9d4012b0887f 1108 #define HAS_analogIn6 1
whismanoid 25:9d4012b0887f 1109 #define HAS_analogIn7 1
whismanoid 25:9d4012b0887f 1110 #define HAS_analogIn8 1
whismanoid 25:9d4012b0887f 1111 #define HAS_analogIn9 1
whismanoid 25:9d4012b0887f 1112 // #define HAS_analogIn10 0
whismanoid 25:9d4012b0887f 1113 // #define HAS_analogIn11 0
whismanoid 25:9d4012b0887f 1114 // #define HAS_analogIn12 0
whismanoid 25:9d4012b0887f 1115 // #define HAS_analogIn13 0
whismanoid 25:9d4012b0887f 1116 // #define HAS_analogIn14 0
whismanoid 25:9d4012b0887f 1117 // #define HAS_analogIn15 0
whismanoid 25:9d4012b0887f 1118 #if HAS_analogIn0
whismanoid 25:9d4012b0887f 1119 AnalogIn analogIn0(AIN_0); // TARGET_MAX32620FTHR J1.5 AIN_0 = AIN0 pin fullscale is 1.2V
whismanoid 25:9d4012b0887f 1120 #endif
whismanoid 25:9d4012b0887f 1121 #if HAS_analogIn1
whismanoid 25:9d4012b0887f 1122 AnalogIn analogIn1(AIN_1); // TARGET_MAX32620FTHR J1.6 AIN_1 = AIN1 pin fullscale is 1.2V
whismanoid 25:9d4012b0887f 1123 #endif
whismanoid 25:9d4012b0887f 1124 #if HAS_analogIn2
whismanoid 25:9d4012b0887f 1125 AnalogIn analogIn2(AIN_2); // TARGET_MAX32620FTHR J1.7 AIN_2 = AIN2 pin fullscale is 1.2V
whismanoid 25:9d4012b0887f 1126 #endif
whismanoid 25:9d4012b0887f 1127 #if HAS_analogIn3
whismanoid 25:9d4012b0887f 1128 AnalogIn analogIn3(AIN_3); // TARGET_MAX32620FTHR J1.8 AIN_3 = AIN3 pin fullscale is 1.2V
whismanoid 25:9d4012b0887f 1129 #endif
whismanoid 25:9d4012b0887f 1130 #if HAS_analogIn4
whismanoid 25:9d4012b0887f 1131 AnalogIn analogIn4(AIN_4); // TARGET_MAX32620FTHR J1.5 AIN_4 = AIN0 / 5.0 fullscale is 6.0V
whismanoid 25:9d4012b0887f 1132 #endif
whismanoid 25:9d4012b0887f 1133 #if HAS_analogIn5
whismanoid 25:9d4012b0887f 1134 AnalogIn analogIn5(AIN_5); // TARGET_MAX32620FTHR J1.6 AIN_5 = AIN1 / 5.0 fullscale is 6.0V
whismanoid 25:9d4012b0887f 1135 #endif
whismanoid 25:9d4012b0887f 1136 #if HAS_analogIn6
whismanoid 25:9d4012b0887f 1137 AnalogIn analogIn6(AIN_6); // TARGET_MAX32620FTHR AIN_6 = VDDB / 4.0 fullscale is 4.8V
whismanoid 25:9d4012b0887f 1138 #endif
whismanoid 25:9d4012b0887f 1139 #if HAS_analogIn7
whismanoid 25:9d4012b0887f 1140 AnalogIn analogIn7(AIN_7); // TARGET_MAX32620FTHR AIN_7 = VDD18 fullscale is 1.2V
whismanoid 25:9d4012b0887f 1141 #endif
whismanoid 25:9d4012b0887f 1142 #if HAS_analogIn8
whismanoid 25:9d4012b0887f 1143 AnalogIn analogIn8(AIN_8); // TARGET_MAX32620FTHR AIN_8 = VDD12 fullscale is 1.2V
whismanoid 25:9d4012b0887f 1144 #endif
whismanoid 25:9d4012b0887f 1145 #if HAS_analogIn9
whismanoid 25:9d4012b0887f 1146 AnalogIn analogIn9(AIN_9); // TARGET_MAX32620FTHR AIN_9 = VRTC / 2.0 fullscale is 2.4V
whismanoid 25:9d4012b0887f 1147 #endif
whismanoid 25:9d4012b0887f 1148 #if HAS_analogIn10
whismanoid 25:9d4012b0887f 1149 AnalogIn analogIn10(____); // TARGET_MAX32620FTHR AIN_10 = x undefined?
whismanoid 25:9d4012b0887f 1150 #endif
whismanoid 25:9d4012b0887f 1151 #if HAS_analogIn11
whismanoid 25:9d4012b0887f 1152 AnalogIn analogIn11(____); // TARGET_MAX32620FTHR AIN_11 = VDDIO / 4.0 fullscale is 4.8V
whismanoid 25:9d4012b0887f 1153 #endif
whismanoid 25:9d4012b0887f 1154 #if HAS_analogIn12
whismanoid 25:9d4012b0887f 1155 AnalogIn analogIn12(____); // TARGET_MAX32620FTHR AIN_12 = VDDIOH / 4.0 fullscale is 4.8V
whismanoid 25:9d4012b0887f 1156 #endif
whismanoid 25:9d4012b0887f 1157 #if HAS_analogIn13
whismanoid 25:9d4012b0887f 1158 AnalogIn analogIn13(____);
whismanoid 25:9d4012b0887f 1159 #endif
whismanoid 25:9d4012b0887f 1160 #if HAS_analogIn14
whismanoid 25:9d4012b0887f 1161 AnalogIn analogIn14(____);
whismanoid 25:9d4012b0887f 1162 #endif
whismanoid 25:9d4012b0887f 1163 #if HAS_analogIn15
whismanoid 25:9d4012b0887f 1164 AnalogIn analogIn15(____);
whismanoid 25:9d4012b0887f 1165 #endif
whismanoid 25:9d4012b0887f 1166 //--------------------------------------------------
whismanoid 25:9d4012b0887f 1167 #elif defined(TARGET_MAX32625PICO)
whismanoid 25:9d4012b0887f 1168 #warning "TARGET_MAX32625PICO not previously tested; need to verify analogIn0..."
whismanoid 25:9d4012b0887f 1169 #define HAS_analogIn0 1
whismanoid 25:9d4012b0887f 1170 #define HAS_analogIn1 1
whismanoid 25:9d4012b0887f 1171 #define HAS_analogIn2 1
whismanoid 25:9d4012b0887f 1172 #define HAS_analogIn3 1
whismanoid 25:9d4012b0887f 1173 #define HAS_analogIn4 1
whismanoid 25:9d4012b0887f 1174 #define HAS_analogIn5 1
whismanoid 25:9d4012b0887f 1175 #if HAS_analogIn0
whismanoid 25:9d4012b0887f 1176 AnalogIn analogIn0(AIN_0); // TARGET_MAX32630 J1.5 AIN_0 = AIN0 pin fullscale is 1.2V
whismanoid 25:9d4012b0887f 1177 #endif
whismanoid 25:9d4012b0887f 1178 #if HAS_analogIn1
whismanoid 25:9d4012b0887f 1179 AnalogIn analogIn1(AIN_1); // TARGET_MAX32630 J1.6 AIN_1 = AIN1 pin fullscale is 1.2V
whismanoid 25:9d4012b0887f 1180 #endif
whismanoid 25:9d4012b0887f 1181 #if HAS_analogIn2
whismanoid 25:9d4012b0887f 1182 AnalogIn analogIn2(AIN_2); // TARGET_MAX32630 J1.7 AIN_2 = AIN2 pin fullscale is 1.2V
whismanoid 25:9d4012b0887f 1183 #endif
whismanoid 25:9d4012b0887f 1184 #if HAS_analogIn3
whismanoid 25:9d4012b0887f 1185 AnalogIn analogIn3(AIN_3); // TARGET_MAX32630 J1.8 AIN_3 = AIN3 pin fullscale is 1.2V
whismanoid 25:9d4012b0887f 1186 #endif
whismanoid 25:9d4012b0887f 1187 #if HAS_analogIn4
whismanoid 25:9d4012b0887f 1188 AnalogIn analogIn4(AIN_4); // TARGET_MAX32630 J1.5 AIN_4 = AIN0 / 5.0 fullscale is 6.0V
whismanoid 25:9d4012b0887f 1189 #endif
whismanoid 25:9d4012b0887f 1190 #if HAS_analogIn5
whismanoid 25:9d4012b0887f 1191 AnalogIn analogIn5(AIN_5); // TARGET_MAX32630 J1.6 AIN_5 = AIN1 / 5.0 fullscale is 6.0V
whismanoid 25:9d4012b0887f 1192 #endif
whismanoid 25:9d4012b0887f 1193 //--------------------------------------------------
whismanoid 25:9d4012b0887f 1194 #elif defined(TARGET_MAX32600)
whismanoid 25:9d4012b0887f 1195 #define HAS_analogIn0 1
whismanoid 25:9d4012b0887f 1196 #define HAS_analogIn1 1
whismanoid 25:9d4012b0887f 1197 #define HAS_analogIn2 1
whismanoid 25:9d4012b0887f 1198 #define HAS_analogIn3 1
whismanoid 25:9d4012b0887f 1199 #define HAS_analogIn4 1
whismanoid 25:9d4012b0887f 1200 #define HAS_analogIn5 1
whismanoid 25:9d4012b0887f 1201 #if HAS_analogIn0
whismanoid 25:9d4012b0887f 1202 AnalogIn analogIn0(A0);
whismanoid 25:9d4012b0887f 1203 #endif
whismanoid 25:9d4012b0887f 1204 #if HAS_analogIn1
whismanoid 25:9d4012b0887f 1205 AnalogIn analogIn1(A1);
whismanoid 25:9d4012b0887f 1206 #endif
whismanoid 25:9d4012b0887f 1207 #if HAS_analogIn2
whismanoid 25:9d4012b0887f 1208 AnalogIn analogIn2(A2);
whismanoid 25:9d4012b0887f 1209 #endif
whismanoid 25:9d4012b0887f 1210 #if HAS_analogIn3
whismanoid 25:9d4012b0887f 1211 AnalogIn analogIn3(A3);
whismanoid 25:9d4012b0887f 1212 #endif
whismanoid 25:9d4012b0887f 1213 #if HAS_analogIn4
whismanoid 25:9d4012b0887f 1214 AnalogIn analogIn4(A4);
whismanoid 25:9d4012b0887f 1215 #endif
whismanoid 25:9d4012b0887f 1216 #if HAS_analogIn5
whismanoid 25:9d4012b0887f 1217 AnalogIn analogIn5(A5);
whismanoid 25:9d4012b0887f 1218 #endif
whismanoid 25:9d4012b0887f 1219 //--------------------------------------------------
whismanoid 25:9d4012b0887f 1220 #elif defined(TARGET_NUCLEO_F446RE)
whismanoid 25:9d4012b0887f 1221 #define HAS_analogIn0 1
whismanoid 25:9d4012b0887f 1222 #define HAS_analogIn1 1
whismanoid 25:9d4012b0887f 1223 #define HAS_analogIn2 1
whismanoid 25:9d4012b0887f 1224 #define HAS_analogIn3 1
whismanoid 25:9d4012b0887f 1225 #define HAS_analogIn4 1
whismanoid 25:9d4012b0887f 1226 #define HAS_analogIn5 1
whismanoid 25:9d4012b0887f 1227 #if HAS_analogIn0
whismanoid 25:9d4012b0887f 1228 AnalogIn analogIn0(A0);
whismanoid 25:9d4012b0887f 1229 #endif
whismanoid 25:9d4012b0887f 1230 #if HAS_analogIn1
whismanoid 25:9d4012b0887f 1231 AnalogIn analogIn1(A1);
whismanoid 25:9d4012b0887f 1232 #endif
whismanoid 25:9d4012b0887f 1233 #if HAS_analogIn2
whismanoid 25:9d4012b0887f 1234 AnalogIn analogIn2(A2);
whismanoid 25:9d4012b0887f 1235 #endif
whismanoid 25:9d4012b0887f 1236 #if HAS_analogIn3
whismanoid 25:9d4012b0887f 1237 AnalogIn analogIn3(A3);
whismanoid 25:9d4012b0887f 1238 #endif
whismanoid 25:9d4012b0887f 1239 #if HAS_analogIn4
whismanoid 25:9d4012b0887f 1240 AnalogIn analogIn4(A4);
whismanoid 25:9d4012b0887f 1241 #endif
whismanoid 25:9d4012b0887f 1242 #if HAS_analogIn5
whismanoid 25:9d4012b0887f 1243 AnalogIn analogIn5(A5);
whismanoid 25:9d4012b0887f 1244 #endif
whismanoid 25:9d4012b0887f 1245 //--------------------------------------------------
whismanoid 25:9d4012b0887f 1246 #elif defined(TARGET_NUCLEO_F401RE)
whismanoid 25:9d4012b0887f 1247 #define HAS_analogIn0 1
whismanoid 25:9d4012b0887f 1248 #define HAS_analogIn1 1
whismanoid 25:9d4012b0887f 1249 #define HAS_analogIn2 1
whismanoid 25:9d4012b0887f 1250 #define HAS_analogIn3 1
whismanoid 25:9d4012b0887f 1251 #define HAS_analogIn4 1
whismanoid 25:9d4012b0887f 1252 #define HAS_analogIn5 1
whismanoid 25:9d4012b0887f 1253 #if HAS_analogIn0
whismanoid 25:9d4012b0887f 1254 AnalogIn analogIn0(A0);
whismanoid 25:9d4012b0887f 1255 #endif
whismanoid 25:9d4012b0887f 1256 #if HAS_analogIn1
whismanoid 25:9d4012b0887f 1257 AnalogIn analogIn1(A1);
whismanoid 25:9d4012b0887f 1258 #endif
whismanoid 25:9d4012b0887f 1259 #if HAS_analogIn2
whismanoid 25:9d4012b0887f 1260 AnalogIn analogIn2(A2);
whismanoid 25:9d4012b0887f 1261 #endif
whismanoid 25:9d4012b0887f 1262 #if HAS_analogIn3
whismanoid 25:9d4012b0887f 1263 AnalogIn analogIn3(A3);
whismanoid 25:9d4012b0887f 1264 #endif
whismanoid 25:9d4012b0887f 1265 #if HAS_analogIn4
whismanoid 25:9d4012b0887f 1266 AnalogIn analogIn4(A4);
whismanoid 25:9d4012b0887f 1267 #endif
whismanoid 25:9d4012b0887f 1268 #if HAS_analogIn5
whismanoid 25:9d4012b0887f 1269 AnalogIn analogIn5(A5);
whismanoid 25:9d4012b0887f 1270 #endif
whismanoid 25:9d4012b0887f 1271 //--------------------------------------------------
whismanoid 25:9d4012b0887f 1272 // TODO1: TARGET=MAX32625MBED ARM Cortex-M4F 96MHz 512kB Flash 160kB SRAM
whismanoid 25:9d4012b0887f 1273 #elif defined(TARGET_LPC1768)
whismanoid 25:9d4012b0887f 1274 #define HAS_analogIn0 1
whismanoid 25:9d4012b0887f 1275 #define HAS_analogIn1 1
whismanoid 25:9d4012b0887f 1276 #define HAS_analogIn2 1
whismanoid 25:9d4012b0887f 1277 #define HAS_analogIn3 1
whismanoid 25:9d4012b0887f 1278 #define HAS_analogIn4 1
whismanoid 25:9d4012b0887f 1279 #define HAS_analogIn5 1
whismanoid 25:9d4012b0887f 1280 // #define HAS_analogIn6 1
whismanoid 25:9d4012b0887f 1281 // #define HAS_analogIn7 1
whismanoid 25:9d4012b0887f 1282 // #define HAS_analogIn8 1
whismanoid 25:9d4012b0887f 1283 // #define HAS_analogIn9 1
whismanoid 25:9d4012b0887f 1284 // #define HAS_analogIn10 1
whismanoid 25:9d4012b0887f 1285 // #define HAS_analogIn11 1
whismanoid 25:9d4012b0887f 1286 // #define HAS_analogIn12 1
whismanoid 25:9d4012b0887f 1287 // #define HAS_analogIn13 1
whismanoid 25:9d4012b0887f 1288 // #define HAS_analogIn14 1
whismanoid 25:9d4012b0887f 1289 // #define HAS_analogIn15 1
whismanoid 25:9d4012b0887f 1290 #if HAS_analogIn0
whismanoid 25:9d4012b0887f 1291 AnalogIn analogIn0(p15); // TARGET_LPC1768 P0.23/AD0.0/I2SRX_CLK/CAP3.0
whismanoid 25:9d4012b0887f 1292 #endif
whismanoid 25:9d4012b0887f 1293 #if HAS_analogIn1
whismanoid 25:9d4012b0887f 1294 AnalogIn analogIn1(p16); // TARGET_LPC1768 P0.24/AD0.1/I2SRX_WS/CAP3.1
whismanoid 25:9d4012b0887f 1295 #endif
whismanoid 25:9d4012b0887f 1296 #if HAS_analogIn2
whismanoid 25:9d4012b0887f 1297 AnalogIn analogIn2(p17); // TARGET_LPC1768 P0.25/AD0.2/I2SRX_SDA/TXD3
whismanoid 25:9d4012b0887f 1298 #endif
whismanoid 25:9d4012b0887f 1299 #if HAS_analogIn3
whismanoid 25:9d4012b0887f 1300 AnalogIn analogIn3(p18); // TARGET_LPC1768 P0.26/AD0.3/AOUT/RXD3
whismanoid 25:9d4012b0887f 1301 #endif
whismanoid 25:9d4012b0887f 1302 #if HAS_analogIn4
whismanoid 25:9d4012b0887f 1303 AnalogIn analogIn4(p19); // TARGET_LPC1768 P1.30/VBUS/AD0.4
whismanoid 25:9d4012b0887f 1304 #endif
whismanoid 25:9d4012b0887f 1305 #if HAS_analogIn5
whismanoid 25:9d4012b0887f 1306 AnalogIn analogIn5(p20); // TARGET_LPC1768 P1.31/SCK1/AD0.5
whismanoid 25:9d4012b0887f 1307 #endif
whismanoid 25:9d4012b0887f 1308 #if HAS_analogIn6
whismanoid 25:9d4012b0887f 1309 AnalogIn analogIn6(____);
whismanoid 25:9d4012b0887f 1310 #endif
whismanoid 25:9d4012b0887f 1311 #if HAS_analogIn7
whismanoid 25:9d4012b0887f 1312 AnalogIn analogIn7(____);
whismanoid 25:9d4012b0887f 1313 #endif
whismanoid 25:9d4012b0887f 1314 #if HAS_analogIn8
whismanoid 25:9d4012b0887f 1315 AnalogIn analogIn8(____);
whismanoid 25:9d4012b0887f 1316 #endif
whismanoid 25:9d4012b0887f 1317 #if HAS_analogIn9
whismanoid 25:9d4012b0887f 1318 AnalogIn analogIn9(____);
whismanoid 25:9d4012b0887f 1319 #endif
whismanoid 25:9d4012b0887f 1320 #if HAS_analogIn10
whismanoid 25:9d4012b0887f 1321 AnalogIn analogIn10(____);
whismanoid 25:9d4012b0887f 1322 #endif
whismanoid 25:9d4012b0887f 1323 #if HAS_analogIn11
whismanoid 25:9d4012b0887f 1324 AnalogIn analogIn11(____);
whismanoid 25:9d4012b0887f 1325 #endif
whismanoid 25:9d4012b0887f 1326 #if HAS_analogIn12
whismanoid 25:9d4012b0887f 1327 AnalogIn analogIn12(____);
whismanoid 25:9d4012b0887f 1328 #endif
whismanoid 25:9d4012b0887f 1329 #if HAS_analogIn13
whismanoid 25:9d4012b0887f 1330 AnalogIn analogIn13(____);
whismanoid 25:9d4012b0887f 1331 #endif
whismanoid 25:9d4012b0887f 1332 #if HAS_analogIn14
whismanoid 25:9d4012b0887f 1333 AnalogIn analogIn14(____);
whismanoid 25:9d4012b0887f 1334 #endif
whismanoid 25:9d4012b0887f 1335 #if HAS_analogIn15
whismanoid 25:9d4012b0887f 1336 AnalogIn analogIn15(____);
whismanoid 25:9d4012b0887f 1337 #endif
whismanoid 25:9d4012b0887f 1338 #else
whismanoid 25:9d4012b0887f 1339 // unknown target
whismanoid 25:9d4012b0887f 1340 #endif
whismanoid 25:9d4012b0887f 1341 // uncrustify-0.66.1 *INDENT-ON*
whismanoid 25:9d4012b0887f 1342 #if HAS_analogIn0 || HAS_analogIn1 \
whismanoid 25:9d4012b0887f 1343 || HAS_analogIn2 || HAS_analogIn3 \
whismanoid 25:9d4012b0887f 1344 || HAS_analogIn4 || HAS_analogIn5 \
whismanoid 25:9d4012b0887f 1345 || HAS_analogIn6 || HAS_analogIn7 \
whismanoid 25:9d4012b0887f 1346 || HAS_analogIn8 || HAS_analogIn9 \
whismanoid 25:9d4012b0887f 1347 || HAS_analogIn10 || HAS_analogIn11 \
whismanoid 25:9d4012b0887f 1348 || HAS_analogIn12 || HAS_analogIn13 \
whismanoid 25:9d4012b0887f 1349 || HAS_analogIn14 || HAS_analogIn15
whismanoid 25:9d4012b0887f 1350 #define HAS_analogIns 1
whismanoid 25:9d4012b0887f 1351 #else
whismanoid 25:9d4012b0887f 1352 #warning "Note: There are no analogIn resources defined"
whismanoid 25:9d4012b0887f 1353 #endif
whismanoid 25:9d4012b0887f 1354
whismanoid 25:9d4012b0887f 1355 // DigitalInOut pin resource: print the pin index names to serial
whismanoid 25:9d4012b0887f 1356 #if HAS_digitalInOuts
whismanoid 25:9d4012b0887f 1357 void list_digitalInOutPins(Stream& serialStream)
whismanoid 25:9d4012b0887f 1358 {
whismanoid 25:9d4012b0887f 1359 #if HAS_digitalInOut0
whismanoid 25:9d4012b0887f 1360 serialStream.printf(" 0");
whismanoid 25:9d4012b0887f 1361 #endif
whismanoid 25:9d4012b0887f 1362 #if HAS_digitalInOut1
whismanoid 25:9d4012b0887f 1363 serialStream.printf(" 1");
whismanoid 25:9d4012b0887f 1364 #endif
whismanoid 25:9d4012b0887f 1365 #if HAS_digitalInOut2
whismanoid 25:9d4012b0887f 1366 serialStream.printf(" 2");
whismanoid 25:9d4012b0887f 1367 #endif
whismanoid 25:9d4012b0887f 1368 #if HAS_digitalInOut3
whismanoid 25:9d4012b0887f 1369 serialStream.printf(" 3");
whismanoid 25:9d4012b0887f 1370 #endif
whismanoid 25:9d4012b0887f 1371 #if HAS_digitalInOut4
whismanoid 25:9d4012b0887f 1372 serialStream.printf(" 4");
whismanoid 25:9d4012b0887f 1373 #endif
whismanoid 25:9d4012b0887f 1374 #if HAS_digitalInOut5
whismanoid 25:9d4012b0887f 1375 serialStream.printf(" 5");
whismanoid 25:9d4012b0887f 1376 #endif
whismanoid 25:9d4012b0887f 1377 #if HAS_digitalInOut6
whismanoid 25:9d4012b0887f 1378 serialStream.printf(" 6");
whismanoid 25:9d4012b0887f 1379 #endif
whismanoid 25:9d4012b0887f 1380 #if HAS_digitalInOut7
whismanoid 25:9d4012b0887f 1381 serialStream.printf(" 7");
whismanoid 25:9d4012b0887f 1382 #endif
whismanoid 25:9d4012b0887f 1383 #if HAS_digitalInOut8
whismanoid 25:9d4012b0887f 1384 serialStream.printf(" 8");
whismanoid 25:9d4012b0887f 1385 #endif
whismanoid 25:9d4012b0887f 1386 #if HAS_digitalInOut9
whismanoid 25:9d4012b0887f 1387 serialStream.printf(" 9");
whismanoid 25:9d4012b0887f 1388 #endif
whismanoid 25:9d4012b0887f 1389 #if HAS_digitalInOut10
whismanoid 25:9d4012b0887f 1390 serialStream.printf(" 10");
whismanoid 25:9d4012b0887f 1391 #endif
whismanoid 25:9d4012b0887f 1392 #if HAS_digitalInOut11
whismanoid 25:9d4012b0887f 1393 serialStream.printf(" 11");
whismanoid 25:9d4012b0887f 1394 #endif
whismanoid 25:9d4012b0887f 1395 #if HAS_digitalInOut12
whismanoid 25:9d4012b0887f 1396 serialStream.printf(" 12");
whismanoid 25:9d4012b0887f 1397 #endif
whismanoid 25:9d4012b0887f 1398 #if HAS_digitalInOut13
whismanoid 25:9d4012b0887f 1399 serialStream.printf(" 13");
whismanoid 25:9d4012b0887f 1400 #endif
whismanoid 25:9d4012b0887f 1401 #if HAS_digitalInOut14
whismanoid 25:9d4012b0887f 1402 serialStream.printf(" 14");
whismanoid 25:9d4012b0887f 1403 #endif
whismanoid 25:9d4012b0887f 1404 #if HAS_digitalInOut15
whismanoid 25:9d4012b0887f 1405 serialStream.printf(" 15");
whismanoid 25:9d4012b0887f 1406 #endif
whismanoid 25:9d4012b0887f 1407 #if HAS_digitalInOut16
whismanoid 25:9d4012b0887f 1408 serialStream.printf(" 16");
whismanoid 25:9d4012b0887f 1409 #endif
whismanoid 25:9d4012b0887f 1410 #if HAS_digitalInOut17
whismanoid 25:9d4012b0887f 1411 serialStream.printf(" 17");
whismanoid 25:9d4012b0887f 1412 #endif
whismanoid 25:9d4012b0887f 1413 }
whismanoid 25:9d4012b0887f 1414 #endif
whismanoid 25:9d4012b0887f 1415
whismanoid 25:9d4012b0887f 1416
whismanoid 25:9d4012b0887f 1417 // DigitalInOut pin resource: search index
whismanoid 25:9d4012b0887f 1418 #if HAS_digitalInOuts
whismanoid 25:9d4012b0887f 1419 DigitalInOut& find_digitalInOutPin(int cPinIndex)
whismanoid 25:9d4012b0887f 1420 {
whismanoid 25:9d4012b0887f 1421 switch (cPinIndex)
whismanoid 25:9d4012b0887f 1422 {
whismanoid 25:9d4012b0887f 1423 default: // default to the first defined digitalInOut pin
whismanoid 25:9d4012b0887f 1424 #if HAS_digitalInOut0
whismanoid 25:9d4012b0887f 1425 case '0': case 0x00: return digitalInOut0;
whismanoid 25:9d4012b0887f 1426 #endif
whismanoid 25:9d4012b0887f 1427 #if HAS_digitalInOut1
whismanoid 25:9d4012b0887f 1428 case '1': case 0x01: return digitalInOut1;
whismanoid 25:9d4012b0887f 1429 #endif
whismanoid 25:9d4012b0887f 1430 #if HAS_digitalInOut2
whismanoid 25:9d4012b0887f 1431 case '2': case 0x02: return digitalInOut2;
whismanoid 25:9d4012b0887f 1432 #endif
whismanoid 25:9d4012b0887f 1433 #if HAS_digitalInOut3
whismanoid 25:9d4012b0887f 1434 case '3': case 0x03: return digitalInOut3;
whismanoid 25:9d4012b0887f 1435 #endif
whismanoid 25:9d4012b0887f 1436 #if HAS_digitalInOut4
whismanoid 25:9d4012b0887f 1437 case '4': case 0x04: return digitalInOut4;
whismanoid 25:9d4012b0887f 1438 #endif
whismanoid 25:9d4012b0887f 1439 #if HAS_digitalInOut5
whismanoid 25:9d4012b0887f 1440 case '5': case 0x05: return digitalInOut5;
whismanoid 25:9d4012b0887f 1441 #endif
whismanoid 25:9d4012b0887f 1442 #if HAS_digitalInOut6
whismanoid 25:9d4012b0887f 1443 case '6': case 0x06: return digitalInOut6;
whismanoid 25:9d4012b0887f 1444 #endif
whismanoid 25:9d4012b0887f 1445 #if HAS_digitalInOut7
whismanoid 25:9d4012b0887f 1446 case '7': case 0x07: return digitalInOut7;
whismanoid 25:9d4012b0887f 1447 #endif
whismanoid 25:9d4012b0887f 1448 #if HAS_digitalInOut8
whismanoid 25:9d4012b0887f 1449 case '8': case 0x08: return digitalInOut8;
whismanoid 25:9d4012b0887f 1450 #endif
whismanoid 25:9d4012b0887f 1451 #if HAS_digitalInOut9
whismanoid 25:9d4012b0887f 1452 case '9': case 0x09: return digitalInOut9;
whismanoid 25:9d4012b0887f 1453 #endif
whismanoid 25:9d4012b0887f 1454 #if HAS_digitalInOut10
whismanoid 25:9d4012b0887f 1455 case 'a': case 0x0a: return digitalInOut10;
whismanoid 25:9d4012b0887f 1456 #endif
whismanoid 25:9d4012b0887f 1457 #if HAS_digitalInOut11
whismanoid 25:9d4012b0887f 1458 case 'b': case 0x0b: return digitalInOut11;
whismanoid 25:9d4012b0887f 1459 #endif
whismanoid 25:9d4012b0887f 1460 #if HAS_digitalInOut12
whismanoid 25:9d4012b0887f 1461 case 'c': case 0x0c: return digitalInOut12;
whismanoid 25:9d4012b0887f 1462 #endif
whismanoid 25:9d4012b0887f 1463 #if HAS_digitalInOut13
whismanoid 25:9d4012b0887f 1464 case 'd': case 0x0d: return digitalInOut13;
whismanoid 25:9d4012b0887f 1465 #endif
whismanoid 25:9d4012b0887f 1466 #if HAS_digitalInOut14
whismanoid 25:9d4012b0887f 1467 case 'e': case 0x0e: return digitalInOut14;
whismanoid 25:9d4012b0887f 1468 #endif
whismanoid 25:9d4012b0887f 1469 #if HAS_digitalInOut15
whismanoid 25:9d4012b0887f 1470 case 'f': case 0x0f: return digitalInOut15;
whismanoid 25:9d4012b0887f 1471 #endif
whismanoid 25:9d4012b0887f 1472 #if HAS_digitalInOut16
whismanoid 25:9d4012b0887f 1473 case 'g': case 0x10: return digitalInOut16;
whismanoid 25:9d4012b0887f 1474 #endif
whismanoid 25:9d4012b0887f 1475 #if HAS_digitalInOut17
whismanoid 25:9d4012b0887f 1476 case 'h': case 0x11: return digitalInOut17;
whismanoid 25:9d4012b0887f 1477 #endif
whismanoid 25:9d4012b0887f 1478 }
whismanoid 25:9d4012b0887f 1479 }
whismanoid 25:9d4012b0887f 1480 #endif
whismanoid 25:9d4012b0887f 1481
whismanoid 25:9d4012b0887f 1482
whismanoid 25:9d4012b0887f 1483 // AnalogIn pin resource: search index
whismanoid 25:9d4012b0887f 1484 #if HAS_analogIns
whismanoid 25:9d4012b0887f 1485 AnalogIn& find_analogInPin(int cPinIndex)
whismanoid 25:9d4012b0887f 1486 {
whismanoid 25:9d4012b0887f 1487 switch (cPinIndex)
whismanoid 25:9d4012b0887f 1488 {
whismanoid 25:9d4012b0887f 1489 default: // default to the first defined analogIn pin
whismanoid 25:9d4012b0887f 1490 #if HAS_analogIn0
whismanoid 25:9d4012b0887f 1491 case '0': case 0x00: return analogIn0;
whismanoid 25:9d4012b0887f 1492 #endif
whismanoid 25:9d4012b0887f 1493 #if HAS_analogIn1
whismanoid 25:9d4012b0887f 1494 case '1': case 0x01: return analogIn1;
whismanoid 25:9d4012b0887f 1495 #endif
whismanoid 25:9d4012b0887f 1496 #if HAS_analogIn2
whismanoid 25:9d4012b0887f 1497 case '2': case 0x02: return analogIn2;
whismanoid 25:9d4012b0887f 1498 #endif
whismanoid 25:9d4012b0887f 1499 #if HAS_analogIn3
whismanoid 25:9d4012b0887f 1500 case '3': case 0x03: return analogIn3;
whismanoid 25:9d4012b0887f 1501 #endif
whismanoid 25:9d4012b0887f 1502 #if HAS_analogIn4
whismanoid 25:9d4012b0887f 1503 case '4': case 0x04: return analogIn4;
whismanoid 25:9d4012b0887f 1504 #endif
whismanoid 25:9d4012b0887f 1505 #if HAS_analogIn5
whismanoid 25:9d4012b0887f 1506 case '5': case 0x05: return analogIn5;
whismanoid 25:9d4012b0887f 1507 #endif
whismanoid 25:9d4012b0887f 1508 #if HAS_analogIn6
whismanoid 25:9d4012b0887f 1509 case '6': case 0x06: return analogIn6;
whismanoid 25:9d4012b0887f 1510 #endif
whismanoid 25:9d4012b0887f 1511 #if HAS_analogIn7
whismanoid 25:9d4012b0887f 1512 case '7': case 0x07: return analogIn7;
whismanoid 25:9d4012b0887f 1513 #endif
whismanoid 25:9d4012b0887f 1514 #if HAS_analogIn8
whismanoid 25:9d4012b0887f 1515 case '8': case 0x08: return analogIn8;
whismanoid 25:9d4012b0887f 1516 #endif
whismanoid 25:9d4012b0887f 1517 #if HAS_analogIn9
whismanoid 25:9d4012b0887f 1518 case '9': case 0x09: return analogIn9;
whismanoid 25:9d4012b0887f 1519 #endif
whismanoid 25:9d4012b0887f 1520 #if HAS_analogIn10
whismanoid 25:9d4012b0887f 1521 case 'a': case 0x0a: return analogIn10;
whismanoid 25:9d4012b0887f 1522 #endif
whismanoid 25:9d4012b0887f 1523 #if HAS_analogIn11
whismanoid 25:9d4012b0887f 1524 case 'b': case 0x0b: return analogIn11;
whismanoid 25:9d4012b0887f 1525 #endif
whismanoid 25:9d4012b0887f 1526 #if HAS_analogIn12
whismanoid 25:9d4012b0887f 1527 case 'c': case 0x0c: return analogIn12;
whismanoid 25:9d4012b0887f 1528 #endif
whismanoid 25:9d4012b0887f 1529 #if HAS_analogIn13
whismanoid 25:9d4012b0887f 1530 case 'd': case 0x0d: return analogIn13;
whismanoid 25:9d4012b0887f 1531 #endif
whismanoid 25:9d4012b0887f 1532 #if HAS_analogIn14
whismanoid 25:9d4012b0887f 1533 case 'e': case 0x0e: return analogIn14;
whismanoid 25:9d4012b0887f 1534 #endif
whismanoid 25:9d4012b0887f 1535 #if HAS_analogIn15
whismanoid 25:9d4012b0887f 1536 case 'f': case 0x0f: return analogIn15;
whismanoid 25:9d4012b0887f 1537 #endif
whismanoid 25:9d4012b0887f 1538 }
whismanoid 25:9d4012b0887f 1539 }
whismanoid 25:9d4012b0887f 1540 #endif
whismanoid 25:9d4012b0887f 1541
whismanoid 25:9d4012b0887f 1542 #if HAS_analogIns
whismanoid 25:9d4012b0887f 1543 const float analogInPin_fullScaleVoltage[] = {
whismanoid 25:9d4012b0887f 1544 # if defined(TARGET_MAX32630)
whismanoid 25:9d4012b0887f 1545 ADC_FULL_SCALE_VOLTAGE, // analogIn0
whismanoid 25:9d4012b0887f 1546 ADC_FULL_SCALE_VOLTAGE, // analogIn1
whismanoid 25:9d4012b0887f 1547 ADC_FULL_SCALE_VOLTAGE, // analogIn2
whismanoid 25:9d4012b0887f 1548 ADC_FULL_SCALE_VOLTAGE, // analogIn3
whismanoid 25:9d4012b0887f 1549 ADC_FULL_SCALE_VOLTAGE * 5.0f, // analogIn4 // AIN_4 = AIN0 / 5.0 fullscale is 6.0V
whismanoid 25:9d4012b0887f 1550 ADC_FULL_SCALE_VOLTAGE * 5.0f, // analogIn4 // AIN_5 = AIN1 / 5.0 fullscale is 6.0V
whismanoid 25:9d4012b0887f 1551 ADC_FULL_SCALE_VOLTAGE * 4.0f, // analogIn6 // AIN_6 = VDDB / 4.0 fullscale is 4.8V
whismanoid 25:9d4012b0887f 1552 ADC_FULL_SCALE_VOLTAGE, // analogIn7 // AIN_7 = VDD18 fullscale is 1.2V
whismanoid 25:9d4012b0887f 1553 ADC_FULL_SCALE_VOLTAGE, // analogIn8 // AIN_8 = VDD12 fullscale is 1.2V
whismanoid 25:9d4012b0887f 1554 ADC_FULL_SCALE_VOLTAGE * 2.0f, // analogIn9 // AIN_9 = VRTC / 2.0 fullscale is 2.4V
whismanoid 25:9d4012b0887f 1555 ADC_FULL_SCALE_VOLTAGE, // analogIn10 // AIN_10 = x undefined?
whismanoid 25:9d4012b0887f 1556 ADC_FULL_SCALE_VOLTAGE * 4.0f, // analogIn11 // AIN_11 = VDDIO / 4.0 fullscale is 4.8V
whismanoid 25:9d4012b0887f 1557 ADC_FULL_SCALE_VOLTAGE * 4.0f, // analogIn12 // AIN_12 = VDDIOH / 4.0 fullscale is 4.8V
whismanoid 25:9d4012b0887f 1558 ADC_FULL_SCALE_VOLTAGE, // analogIn13
whismanoid 25:9d4012b0887f 1559 ADC_FULL_SCALE_VOLTAGE, // analogIn14
whismanoid 25:9d4012b0887f 1560 ADC_FULL_SCALE_VOLTAGE // analogIn15
whismanoid 25:9d4012b0887f 1561 # elif defined(TARGET_MAX32620FTHR)
whismanoid 25:9d4012b0887f 1562 #warning "TARGET_MAX32620FTHR not previously tested; need to verify analogIn0..."
whismanoid 25:9d4012b0887f 1563 ADC_FULL_SCALE_VOLTAGE, // analogIn0
whismanoid 25:9d4012b0887f 1564 ADC_FULL_SCALE_VOLTAGE, // analogIn1
whismanoid 25:9d4012b0887f 1565 ADC_FULL_SCALE_VOLTAGE, // analogIn2
whismanoid 25:9d4012b0887f 1566 ADC_FULL_SCALE_VOLTAGE, // analogIn3
whismanoid 25:9d4012b0887f 1567 ADC_FULL_SCALE_VOLTAGE * 5.0f, // analogIn4 // AIN_4 = AIN0 / 5.0 fullscale is 6.0V
whismanoid 25:9d4012b0887f 1568 ADC_FULL_SCALE_VOLTAGE * 5.0f, // analogIn4 // AIN_5 = AIN1 / 5.0 fullscale is 6.0V
whismanoid 25:9d4012b0887f 1569 ADC_FULL_SCALE_VOLTAGE * 4.0f, // analogIn6 // AIN_6 = VDDB / 4.0 fullscale is 4.8V
whismanoid 25:9d4012b0887f 1570 ADC_FULL_SCALE_VOLTAGE, // analogIn7 // AIN_7 = VDD18 fullscale is 1.2V
whismanoid 25:9d4012b0887f 1571 ADC_FULL_SCALE_VOLTAGE, // analogIn8 // AIN_8 = VDD12 fullscale is 1.2V
whismanoid 25:9d4012b0887f 1572 ADC_FULL_SCALE_VOLTAGE * 2.0f, // analogIn9 // AIN_9 = VRTC / 2.0 fullscale is 2.4V
whismanoid 25:9d4012b0887f 1573 ADC_FULL_SCALE_VOLTAGE, // analogIn10 // AIN_10 = x undefined?
whismanoid 25:9d4012b0887f 1574 ADC_FULL_SCALE_VOLTAGE * 4.0f, // analogIn11 // AIN_11 = VDDIO / 4.0 fullscale is 4.8V
whismanoid 25:9d4012b0887f 1575 ADC_FULL_SCALE_VOLTAGE * 4.0f, // analogIn12 // AIN_12 = VDDIOH / 4.0 fullscale is 4.8V
whismanoid 25:9d4012b0887f 1576 ADC_FULL_SCALE_VOLTAGE, // analogIn13
whismanoid 25:9d4012b0887f 1577 ADC_FULL_SCALE_VOLTAGE, // analogIn14
whismanoid 25:9d4012b0887f 1578 ADC_FULL_SCALE_VOLTAGE // analogIn15
whismanoid 25:9d4012b0887f 1579 #elif defined(TARGET_MAX32625MBED) || defined(TARGET_MAX32625PICO)
whismanoid 25:9d4012b0887f 1580 ADC_FULL_SCALE_VOLTAGE * 1.0f, // analogIn0 // fullscale is 1.2V
whismanoid 25:9d4012b0887f 1581 ADC_FULL_SCALE_VOLTAGE * 1.0f, // analogIn1 // fullscale is 1.2V
whismanoid 25:9d4012b0887f 1582 ADC_FULL_SCALE_VOLTAGE * 1.0f, // analogIn2 // fullscale is 1.2V
whismanoid 25:9d4012b0887f 1583 ADC_FULL_SCALE_VOLTAGE * 1.0f, // analogIn3 // fullscale is 1.2V
whismanoid 25:9d4012b0887f 1584 ADC_FULL_SCALE_VOLTAGE * 5.0f, // analogIn4 // AIN_4 = AIN0 / 5.0 fullscale is 6.0V
whismanoid 25:9d4012b0887f 1585 ADC_FULL_SCALE_VOLTAGE * 5.0f, // analogIn4 // AIN_5 = AIN1 / 5.0 fullscale is 6.0V
whismanoid 25:9d4012b0887f 1586 ADC_FULL_SCALE_VOLTAGE * 4.0f, // analogIn6 // AIN_6 = VDDB / 4.0 fullscale is 4.8V
whismanoid 25:9d4012b0887f 1587 ADC_FULL_SCALE_VOLTAGE, // analogIn7 // AIN_7 = VDD18 fullscale is 1.2V
whismanoid 25:9d4012b0887f 1588 ADC_FULL_SCALE_VOLTAGE, // analogIn8 // AIN_8 = VDD12 fullscale is 1.2V
whismanoid 25:9d4012b0887f 1589 ADC_FULL_SCALE_VOLTAGE * 2.0f, // analogIn9 // AIN_9 = VRTC / 2.0 fullscale is 2.4V
whismanoid 25:9d4012b0887f 1590 ADC_FULL_SCALE_VOLTAGE, // analogIn10 // AIN_10 = x undefined?
whismanoid 25:9d4012b0887f 1591 ADC_FULL_SCALE_VOLTAGE * 4.0f, // analogIn11 // AIN_11 = VDDIO / 4.0 fullscale is 4.8V
whismanoid 25:9d4012b0887f 1592 ADC_FULL_SCALE_VOLTAGE * 4.0f, // analogIn12 // AIN_12 = VDDIOH / 4.0 fullscale is 4.8V
whismanoid 25:9d4012b0887f 1593 ADC_FULL_SCALE_VOLTAGE, // analogIn13
whismanoid 25:9d4012b0887f 1594 ADC_FULL_SCALE_VOLTAGE, // analogIn14
whismanoid 25:9d4012b0887f 1595 ADC_FULL_SCALE_VOLTAGE // analogIn15
whismanoid 25:9d4012b0887f 1596 #elif defined(TARGET_NUCLEO_F446RE)
whismanoid 25:9d4012b0887f 1597 ADC_FULL_SCALE_VOLTAGE, // analogIn0
whismanoid 25:9d4012b0887f 1598 ADC_FULL_SCALE_VOLTAGE, // analogIn1
whismanoid 25:9d4012b0887f 1599 ADC_FULL_SCALE_VOLTAGE, // analogIn2
whismanoid 25:9d4012b0887f 1600 ADC_FULL_SCALE_VOLTAGE, // analogIn3
whismanoid 25:9d4012b0887f 1601 ADC_FULL_SCALE_VOLTAGE, // analogIn4
whismanoid 25:9d4012b0887f 1602 ADC_FULL_SCALE_VOLTAGE, // analogIn5
whismanoid 25:9d4012b0887f 1603 ADC_FULL_SCALE_VOLTAGE, // analogIn6
whismanoid 25:9d4012b0887f 1604 ADC_FULL_SCALE_VOLTAGE, // analogIn7
whismanoid 25:9d4012b0887f 1605 ADC_FULL_SCALE_VOLTAGE, // analogIn8
whismanoid 25:9d4012b0887f 1606 ADC_FULL_SCALE_VOLTAGE, // analogIn9
whismanoid 25:9d4012b0887f 1607 ADC_FULL_SCALE_VOLTAGE, // analogIn10
whismanoid 25:9d4012b0887f 1608 ADC_FULL_SCALE_VOLTAGE, // analogIn11
whismanoid 25:9d4012b0887f 1609 ADC_FULL_SCALE_VOLTAGE, // analogIn12
whismanoid 25:9d4012b0887f 1610 ADC_FULL_SCALE_VOLTAGE, // analogIn13
whismanoid 25:9d4012b0887f 1611 ADC_FULL_SCALE_VOLTAGE, // analogIn14
whismanoid 25:9d4012b0887f 1612 ADC_FULL_SCALE_VOLTAGE // analogIn15
whismanoid 25:9d4012b0887f 1613 #elif defined(TARGET_NUCLEO_F401RE)
whismanoid 25:9d4012b0887f 1614 ADC_FULL_SCALE_VOLTAGE, // analogIn0
whismanoid 25:9d4012b0887f 1615 ADC_FULL_SCALE_VOLTAGE, // analogIn1
whismanoid 25:9d4012b0887f 1616 ADC_FULL_SCALE_VOLTAGE, // analogIn2
whismanoid 25:9d4012b0887f 1617 ADC_FULL_SCALE_VOLTAGE, // analogIn3
whismanoid 25:9d4012b0887f 1618 ADC_FULL_SCALE_VOLTAGE, // analogIn4
whismanoid 25:9d4012b0887f 1619 ADC_FULL_SCALE_VOLTAGE, // analogIn5
whismanoid 25:9d4012b0887f 1620 ADC_FULL_SCALE_VOLTAGE, // analogIn6
whismanoid 25:9d4012b0887f 1621 ADC_FULL_SCALE_VOLTAGE, // analogIn7
whismanoid 25:9d4012b0887f 1622 ADC_FULL_SCALE_VOLTAGE, // analogIn8
whismanoid 25:9d4012b0887f 1623 ADC_FULL_SCALE_VOLTAGE, // analogIn9
whismanoid 25:9d4012b0887f 1624 ADC_FULL_SCALE_VOLTAGE, // analogIn10
whismanoid 25:9d4012b0887f 1625 ADC_FULL_SCALE_VOLTAGE, // analogIn11
whismanoid 25:9d4012b0887f 1626 ADC_FULL_SCALE_VOLTAGE, // analogIn12
whismanoid 25:9d4012b0887f 1627 ADC_FULL_SCALE_VOLTAGE, // analogIn13
whismanoid 25:9d4012b0887f 1628 ADC_FULL_SCALE_VOLTAGE, // analogIn14
whismanoid 25:9d4012b0887f 1629 ADC_FULL_SCALE_VOLTAGE // analogIn15
whismanoid 25:9d4012b0887f 1630 //#elif defined(TARGET_LPC1768)
whismanoid 25:9d4012b0887f 1631 #else
whismanoid 25:9d4012b0887f 1632 // unknown target
whismanoid 25:9d4012b0887f 1633 ADC_FULL_SCALE_VOLTAGE, // analogIn0
whismanoid 25:9d4012b0887f 1634 ADC_FULL_SCALE_VOLTAGE, // analogIn1
whismanoid 25:9d4012b0887f 1635 ADC_FULL_SCALE_VOLTAGE, // analogIn2
whismanoid 25:9d4012b0887f 1636 ADC_FULL_SCALE_VOLTAGE, // analogIn3
whismanoid 25:9d4012b0887f 1637 ADC_FULL_SCALE_VOLTAGE, // analogIn4
whismanoid 25:9d4012b0887f 1638 ADC_FULL_SCALE_VOLTAGE, // analogIn5
whismanoid 25:9d4012b0887f 1639 ADC_FULL_SCALE_VOLTAGE, // analogIn6
whismanoid 25:9d4012b0887f 1640 ADC_FULL_SCALE_VOLTAGE, // analogIn7
whismanoid 25:9d4012b0887f 1641 ADC_FULL_SCALE_VOLTAGE, // analogIn8
whismanoid 25:9d4012b0887f 1642 ADC_FULL_SCALE_VOLTAGE, // analogIn9
whismanoid 25:9d4012b0887f 1643 ADC_FULL_SCALE_VOLTAGE, // analogIn10
whismanoid 25:9d4012b0887f 1644 ADC_FULL_SCALE_VOLTAGE, // analogIn11
whismanoid 25:9d4012b0887f 1645 ADC_FULL_SCALE_VOLTAGE, // analogIn12
whismanoid 25:9d4012b0887f 1646 ADC_FULL_SCALE_VOLTAGE, // analogIn13
whismanoid 25:9d4012b0887f 1647 ADC_FULL_SCALE_VOLTAGE, // analogIn14
whismanoid 25:9d4012b0887f 1648 ADC_FULL_SCALE_VOLTAGE // analogIn15
whismanoid 25:9d4012b0887f 1649 # endif
whismanoid 25:9d4012b0887f 1650 };
whismanoid 25:9d4012b0887f 1651 #endif
whismanoid 25:9d4012b0887f 1652
whismanoid 25:9d4012b0887f 1653
whismanoid 25:9d4012b0887f 1654
whismanoid 25:9d4012b0887f 1655
whismanoid 25:9d4012b0887f 1656 //--------------------------------------------------
whismanoid 25:9d4012b0887f 1657 // Option to use LEDs to show status
whismanoid 25:9d4012b0887f 1658 #ifndef USE_LEDS
whismanoid 25:9d4012b0887f 1659 #define USE_LEDS 1
whismanoid 25:9d4012b0887f 1660 #endif
whismanoid 25:9d4012b0887f 1661 #if USE_LEDS
whismanoid 25:9d4012b0887f 1662 #if defined(TARGET_MAX32630)
whismanoid 25:9d4012b0887f 1663 # define LED_ON 0
whismanoid 25:9d4012b0887f 1664 # define LED_OFF 1
whismanoid 25:9d4012b0887f 1665 //--------------------------------------------------
whismanoid 25:9d4012b0887f 1666 #elif defined(TARGET_MAX32625MBED)
whismanoid 25:9d4012b0887f 1667 # define LED_ON 0
whismanoid 25:9d4012b0887f 1668 # define LED_OFF 1
whismanoid 25:9d4012b0887f 1669 #elif defined(TARGET_MAX32625PICO)
whismanoid 25:9d4012b0887f 1670 # define LED_ON 0
whismanoid 25:9d4012b0887f 1671 # define LED_OFF 1
whismanoid 25:9d4012b0887f 1672 //--------------------------------------------------
whismanoid 25:9d4012b0887f 1673 // TODO1: TARGET=MAX32625MBED ARM Cortex-M4F 96MHz 512kB Flash 160kB SRAM
whismanoid 25:9d4012b0887f 1674 #elif defined(TARGET_LPC1768)
whismanoid 25:9d4012b0887f 1675 # define LED_ON 1
whismanoid 25:9d4012b0887f 1676 # define LED_OFF 0
whismanoid 25:9d4012b0887f 1677 #else // not defined(TARGET_LPC1768 etc.)
whismanoid 25:9d4012b0887f 1678 // USE_LEDS with some platform other than MAX32630, MAX32625MBED, LPC1768
whismanoid 25:9d4012b0887f 1679 // bugfix for MAX32600MBED LED blink pattern: check if LED_ON/LED_OFF already defined
whismanoid 25:9d4012b0887f 1680 # ifndef LED_ON
whismanoid 25:9d4012b0887f 1681 # define LED_ON 0
whismanoid 25:9d4012b0887f 1682 # endif
whismanoid 25:9d4012b0887f 1683 # ifndef LED_OFF
whismanoid 25:9d4012b0887f 1684 # define LED_OFF 1
whismanoid 25:9d4012b0887f 1685 # endif
whismanoid 25:9d4012b0887f 1686 //# define LED_ON 1
whismanoid 25:9d4012b0887f 1687 //# define LED_OFF 0
whismanoid 25:9d4012b0887f 1688 #endif // target definition
whismanoid 25:9d4012b0887f 1689 DigitalOut led1(LED1, LED_OFF); // MAX32630FTHR: LED1 = LED_RED
whismanoid 25:9d4012b0887f 1690 DigitalOut led2(LED2, LED_OFF); // MAX32630FTHR: LED2 = LED_GREEN
whismanoid 25:9d4012b0887f 1691 DigitalOut led3(LED3, LED_OFF); // MAX32630FTHR: LED3 = LED_BLUE
whismanoid 25:9d4012b0887f 1692 DigitalOut led4(LED4, LED_OFF);
whismanoid 25:9d4012b0887f 1693 #else // USE_LEDS=0
whismanoid 25:9d4012b0887f 1694 // issue #41 support Nucleo_F446RE
whismanoid 25:9d4012b0887f 1695 // there are no LED indicators on the board, LED1 interferes with SPI;
whismanoid 25:9d4012b0887f 1696 // but we still need placeholders led1 led2 led3 led4.
whismanoid 25:9d4012b0887f 1697 // Declare DigitalOut led1 led2 led3 led4 targeting safe pins.
whismanoid 25:9d4012b0887f 1698 // PinName NC means NOT_CONNECTED; DigitalOut::is_connected() returns false
whismanoid 25:9d4012b0887f 1699 # define LED_ON 0
whismanoid 25:9d4012b0887f 1700 # define LED_OFF 1
whismanoid 25:9d4012b0887f 1701 DigitalOut led1(NC, LED_OFF);
whismanoid 25:9d4012b0887f 1702 DigitalOut led2(NC, LED_OFF);
whismanoid 25:9d4012b0887f 1703 DigitalOut led3(NC, LED_OFF);
whismanoid 25:9d4012b0887f 1704 DigitalOut led4(NC, LED_OFF);
whismanoid 25:9d4012b0887f 1705 #endif // USE_LEDS
whismanoid 25:9d4012b0887f 1706 #define led1_RFailLED led1
whismanoid 25:9d4012b0887f 1707 #define led2_GPassLED led2
whismanoid 25:9d4012b0887f 1708 #define led3_BBusyLED led3
whismanoid 25:9d4012b0887f 1709
whismanoid 25:9d4012b0887f 1710 //--------------------------------------------------
whismanoid 25:9d4012b0887f 1711
whismanoid 25:9d4012b0887f 1712
whismanoid 25:9d4012b0887f 1713 // example code board support
whismanoid 25:9d4012b0887f 1714 //MAX32630FTHR pegasus(MAX32630FTHR::VIO_3V3);
whismanoid 25:9d4012b0887f 1715 //DigitalOut rLED(LED1);
whismanoid 25:9d4012b0887f 1716 //DigitalOut gLED(LED2);
whismanoid 25:9d4012b0887f 1717 //DigitalOut bLED(LED3);
whismanoid 25:9d4012b0887f 1718 //
whismanoid 25:9d4012b0887f 1719 // Arduino "shield" connector port definitions (MAX32625MBED shown)
whismanoid 25:9d4012b0887f 1720 #if defined(TARGET_MAX32625MBED)
whismanoid 25:9d4012b0887f 1721 #define A0 AIN_0
whismanoid 25:9d4012b0887f 1722 #define A1 AIN_1
whismanoid 25:9d4012b0887f 1723 #define A2 AIN_2
whismanoid 25:9d4012b0887f 1724 #define A3 AIN_3
whismanoid 25:9d4012b0887f 1725 #define D0 P0_0
whismanoid 25:9d4012b0887f 1726 #define D1 P0_1
whismanoid 25:9d4012b0887f 1727 #define D2 P0_2
whismanoid 25:9d4012b0887f 1728 #define D3 P0_3
whismanoid 25:9d4012b0887f 1729 #define D4 P0_4
whismanoid 25:9d4012b0887f 1730 #define D5 P0_5
whismanoid 25:9d4012b0887f 1731 #define D6 P0_6
whismanoid 25:9d4012b0887f 1732 #define D7 P0_7
whismanoid 25:9d4012b0887f 1733 #define D8 P1_4
whismanoid 25:9d4012b0887f 1734 #define D9 P1_5
whismanoid 25:9d4012b0887f 1735 #define D10 P1_3
whismanoid 25:9d4012b0887f 1736 #define D11 P1_1
whismanoid 25:9d4012b0887f 1737 #define D12 P1_2
whismanoid 25:9d4012b0887f 1738 #define D13 P1_0
whismanoid 25:9d4012b0887f 1739 #elif defined(TARGET_MAX32625PICO)
whismanoid 25:9d4012b0887f 1740 #warning "TARGET_MAX32625PICO not previously tested; need to define pins..."
whismanoid 25:9d4012b0887f 1741 #define A0 AIN_1
whismanoid 25:9d4012b0887f 1742 #define A1 AIN_2
whismanoid 25:9d4012b0887f 1743 // #define A2 AIN_3
whismanoid 25:9d4012b0887f 1744 // #define A3 AIN_0
whismanoid 25:9d4012b0887f 1745 #define D0 P0_0
whismanoid 25:9d4012b0887f 1746 #define D1 P0_1
whismanoid 25:9d4012b0887f 1747 #define D2 P0_2
whismanoid 25:9d4012b0887f 1748 #define D3 P0_3
whismanoid 25:9d4012b0887f 1749 #define D4 P1_7
whismanoid 25:9d4012b0887f 1750 #define D5 P1_6
whismanoid 25:9d4012b0887f 1751 #define D6 P4_4
whismanoid 25:9d4012b0887f 1752 #define D7 P4_5
whismanoid 25:9d4012b0887f 1753 #define D8 P4_6
whismanoid 25:9d4012b0887f 1754 #define D9 P4_7
whismanoid 25:9d4012b0887f 1755 #define D10 P0_7
whismanoid 25:9d4012b0887f 1756 #define D11 P0_6
whismanoid 25:9d4012b0887f 1757 #define D12 P0_5
whismanoid 25:9d4012b0887f 1758 #define D13 P0_4
whismanoid 25:9d4012b0887f 1759 #endif
whismanoid 25:9d4012b0887f 1760
whismanoid 25:9d4012b0887f 1761 // example code declare SPI interface (GPIO controlled CS)
whismanoid 25:9d4012b0887f 1762 #if defined(TARGET_MAX32625MBED)
whismanoid 25:9d4012b0887f 1763 SPI spi(SPI1_MOSI, SPI1_MISO, SPI1_SCK); // mosi, miso, sclk spi1 TARGET_MAX32625MBED: P1_1 P1_2 P1_0 Arduino 10-pin header D11 D12 D13
whismanoid 25:9d4012b0887f 1764 DigitalOut spi_cs(SPI1_SS); // TARGET_MAX32625MBED: P1_3 Arduino 10-pin header D10
whismanoid 25:9d4012b0887f 1765 #elif defined(TARGET_MAX32625PICO)
whismanoid 25:9d4012b0887f 1766 #warning "TARGET_MAX32625PICO not previously tested; need to define pins..."
whismanoid 25:9d4012b0887f 1767 SPI spi(SPI0_MOSI, SPI0_MISO, SPI0_SCK); // mosi, miso, sclk spi1 TARGET_MAX32625PICO: pin P0_5 P0_6 P0_4
whismanoid 25:9d4012b0887f 1768 DigitalOut spi_cs(SPI0_SS); // TARGET_MAX32625PICO: pin P0_7
whismanoid 25:9d4012b0887f 1769 #elif defined(TARGET_MAX32600MBED)
whismanoid 25:9d4012b0887f 1770 SPI spi(SPI2_MOSI, SPI2_MISO, SPI2_SCK); // mosi, miso, sclk spi1 TARGET_MAX32600MBED: Arduino 10-pin header D11 D12 D13
whismanoid 25:9d4012b0887f 1771 DigitalOut spi_cs(SPI2_SS); // Generic: Arduino 10-pin header D10
whismanoid 25:9d4012b0887f 1772 #elif defined(TARGET_NUCLEO_F446RE) || defined(TARGET_NUCLEO_F401RE)
whismanoid 25:9d4012b0887f 1773 // TODO1: avoid resource conflict between P5_0, P5_1, P5_2 SPI and DigitalInOut
whismanoid 25:9d4012b0887f 1774 // void spi_init(spi_t *obj, PinName mosi, PinName miso, PinName sclk, PinName ssel)
whismanoid 25:9d4012b0887f 1775 //
whismanoid 25:9d4012b0887f 1776 // TODO1: NUCLEO_F446RE SPI not working; CS and MOSI data looks OK but no SCLK clock pulses.
whismanoid 25:9d4012b0887f 1777 SPI spi(SPI_MOSI, SPI_MISO, SPI_SCK); // mosi, miso, sclk spi1 TARGET_NUCLEO_F446RE: Arduino 10-pin header D11 D12 D13
whismanoid 25:9d4012b0887f 1778 DigitalOut spi_cs(SPI_CS); // TARGET_NUCLEO_F446RE: PB_6 Arduino 10-pin header D10
whismanoid 25:9d4012b0887f 1779 //
whismanoid 25:9d4012b0887f 1780 #else
whismanoid 25:9d4012b0887f 1781 SPI spi(D11, D12, D13); // mosi, miso, sclk spi1 TARGET_MAX32600MBED: Arduino 10-pin header D11 D12 D13
whismanoid 25:9d4012b0887f 1782 DigitalOut spi_cs(D10); // Generic: Arduino 10-pin header D10
whismanoid 25:9d4012b0887f 1783 #endif
whismanoid 25:9d4012b0887f 1784
whismanoid 25:9d4012b0887f 1785 // example code declare GPIO interface pins
whismanoid 25:9d4012b0887f 1786 // AnalogOut RFB_pin(Px_x_PortName_To_Be_Determined); // Analog Input to MAX5719 device
whismanoid 25:9d4012b0887f 1787 // AnalogOut INV_pin(Px_x_PortName_To_Be_Determined); // Analog Input to MAX5719 device
whismanoid 25:9d4012b0887f 1788 DigitalOut LDACb_pin(D9); // Digital Trigger Input to MAX5719 device
whismanoid 25:9d4012b0887f 1789 // AnalogIn OUT_pin(A0); // Analog Output from MAX5719 device
whismanoid 25:9d4012b0887f 1790 // example code declare device instance
whismanoid 25:9d4012b0887f 1791 MAX5719 g_MAX5719_device(spi, spi_cs, LDACb_pin, MAX5719::MAX5719_IC);
whismanoid 25:9d4012b0887f 1792
whismanoid 25:9d4012b0887f 1793
whismanoid 25:9d4012b0887f 1794 //----------------------------------------
whismanoid 25:9d4012b0887f 1795 // Global SPI options
whismanoid 25:9d4012b0887f 1796 //
whismanoid 25:9d4012b0887f 1797
whismanoid 25:9d4012b0887f 1798 //--------------------------------------------------
whismanoid 25:9d4012b0887f 1799 // Optional Diagnostic function to print SPI transactions
whismanoid 25:9d4012b0887f 1800 #ifndef MAX5719_ONSPIPRINT
whismanoid 25:9d4012b0887f 1801 #define MAX5719_ONSPIPRINT 1
whismanoid 25:9d4012b0887f 1802 #endif // MAX5719_ONSPIPRINT
whismanoid 25:9d4012b0887f 1803 // Enable the onSPIprint diagnostic at startup (toggle with %SD menu item)
whismanoid 25:9d4012b0887f 1804 #ifndef MAX5719_ONSPIPRINT_ENABLED
whismanoid 25:9d4012b0887f 1805 #define MAX5719_ONSPIPRINT_ENABLED 1
whismanoid 25:9d4012b0887f 1806 #endif // MAX5719_ONSPIPRINT_ENABLED
whismanoid 25:9d4012b0887f 1807
whismanoid 25:9d4012b0887f 1808 #define APPLICATION_ArduinoPinsMonitor 1
whismanoid 25:9d4012b0887f 1809
whismanoid 25:9d4012b0887f 1810 //--------------------------------------------------
whismanoid 25:9d4012b0887f 1811 // use BUTTON1 trigger some action
whismanoid 25:9d4012b0887f 1812 #if defined(TARGET_MAX32630)
whismanoid 25:9d4012b0887f 1813 #define HAS_BUTTON1_DEMO_INTERRUPT 1
whismanoid 25:9d4012b0887f 1814 #define HAS_BUTTON2_DEMO 0
whismanoid 25:9d4012b0887f 1815 #define HAS_BUTTON2_DEMO_INTERRUPT 0
whismanoid 25:9d4012b0887f 1816 #elif defined(TARGET_MAX32625PICO)
whismanoid 25:9d4012b0887f 1817 #warning "TARGET_MAX32625PICO not previously tested; need to define buttons..."
whismanoid 25:9d4012b0887f 1818 #define HAS_BUTTON1_DEMO_INTERRUPT 1
whismanoid 25:9d4012b0887f 1819 #define HAS_BUTTON2_DEMO 0
whismanoid 25:9d4012b0887f 1820 #define HAS_BUTTON2_DEMO_INTERRUPT 0
whismanoid 25:9d4012b0887f 1821 #elif defined(TARGET_MAX32625)
whismanoid 25:9d4012b0887f 1822 #define HAS_BUTTON1_DEMO_INTERRUPT 1
whismanoid 25:9d4012b0887f 1823 #define HAS_BUTTON2_DEMO_INTERRUPT 1
whismanoid 25:9d4012b0887f 1824 #elif defined(TARGET_MAX32620FTHR)
whismanoid 25:9d4012b0887f 1825 #warning "TARGET_MAX32620FTHR not previously tested; need to define buttons..."
whismanoid 25:9d4012b0887f 1826 #define BUTTON1 SW1
whismanoid 25:9d4012b0887f 1827 #define HAS_BUTTON1_DEMO_INTERRUPT 1
whismanoid 25:9d4012b0887f 1828 #define HAS_BUTTON2_DEMO 0
whismanoid 25:9d4012b0887f 1829 #define HAS_BUTTON2_DEMO_INTERRUPT 0
whismanoid 25:9d4012b0887f 1830 #elif defined(TARGET_NUCLEO_F446RE)
whismanoid 25:9d4012b0887f 1831 #define HAS_BUTTON1_DEMO_INTERRUPT 0
whismanoid 25:9d4012b0887f 1832 #define HAS_BUTTON2_DEMO_INTERRUPT 0
whismanoid 25:9d4012b0887f 1833 #elif defined(TARGET_NUCLEO_F401RE)
whismanoid 25:9d4012b0887f 1834 #define HAS_BUTTON1_DEMO_INTERRUPT 0
whismanoid 25:9d4012b0887f 1835 #define HAS_BUTTON2_DEMO_INTERRUPT 0
whismanoid 25:9d4012b0887f 1836 #else
whismanoid 25:9d4012b0887f 1837 #warning "target not previously tested; need to define buttons..."
whismanoid 25:9d4012b0887f 1838 #endif
whismanoid 25:9d4012b0887f 1839 //
whismanoid 25:9d4012b0887f 1840 #ifndef HAS_BUTTON1_DEMO
whismanoid 25:9d4012b0887f 1841 #define HAS_BUTTON1_DEMO 0
whismanoid 25:9d4012b0887f 1842 #endif
whismanoid 25:9d4012b0887f 1843 #ifndef HAS_BUTTON2_DEMO
whismanoid 25:9d4012b0887f 1844 #define HAS_BUTTON2_DEMO 0
whismanoid 25:9d4012b0887f 1845 #endif
whismanoid 25:9d4012b0887f 1846 //
whismanoid 25:9d4012b0887f 1847 // avoid runtime error on button1 press [mbed-os-5.11]
whismanoid 25:9d4012b0887f 1848 // instead of using InterruptIn, use DigitalIn and poll in main while(1)
whismanoid 25:9d4012b0887f 1849 #ifndef HAS_BUTTON1_DEMO_INTERRUPT_POLLING
whismanoid 25:9d4012b0887f 1850 #define HAS_BUTTON1_DEMO_INTERRUPT_POLLING 1
whismanoid 25:9d4012b0887f 1851 #endif
whismanoid 25:9d4012b0887f 1852 //
whismanoid 25:9d4012b0887f 1853 #ifndef HAS_BUTTON1_DEMO_INTERRUPT
whismanoid 25:9d4012b0887f 1854 #define HAS_BUTTON1_DEMO_INTERRUPT 1
whismanoid 25:9d4012b0887f 1855 #endif
whismanoid 25:9d4012b0887f 1856 #ifndef HAS_BUTTON2_DEMO_INTERRUPT
whismanoid 25:9d4012b0887f 1857 #define HAS_BUTTON2_DEMO_INTERRUPT 1
whismanoid 25:9d4012b0887f 1858 #endif
whismanoid 25:9d4012b0887f 1859 //
whismanoid 25:9d4012b0887f 1860 #if HAS_BUTTON1_DEMO_INTERRUPT
whismanoid 25:9d4012b0887f 1861 # if HAS_BUTTON1_DEMO_INTERRUPT_POLLING
whismanoid 25:9d4012b0887f 1862 // avoid runtime error on button1 press [mbed-os-5.11]
whismanoid 25:9d4012b0887f 1863 // instead of using InterruptIn, use DigitalIn and poll in main while(1)
whismanoid 25:9d4012b0887f 1864 DigitalIn button1(BUTTON1);
whismanoid 25:9d4012b0887f 1865 # else
whismanoid 25:9d4012b0887f 1866 InterruptIn button1(BUTTON1);
whismanoid 25:9d4012b0887f 1867 # endif
whismanoid 25:9d4012b0887f 1868 #elif HAS_BUTTON1_DEMO
whismanoid 25:9d4012b0887f 1869 DigitalIn button1(BUTTON1);
whismanoid 25:9d4012b0887f 1870 #endif
whismanoid 25:9d4012b0887f 1871 #if HAS_BUTTON2_DEMO_INTERRUPT
whismanoid 25:9d4012b0887f 1872 # if HAS_BUTTON1_DEMO_INTERRUPT_POLLING
whismanoid 25:9d4012b0887f 1873 // avoid runtime error on button1 press [mbed-os-5.11]
whismanoid 25:9d4012b0887f 1874 // instead of using InterruptIn, use DigitalIn and poll in main while(1)
whismanoid 25:9d4012b0887f 1875 DigitalIn button2(BUTTON2);
whismanoid 25:9d4012b0887f 1876 # else
whismanoid 25:9d4012b0887f 1877 InterruptIn button2(BUTTON2);
whismanoid 25:9d4012b0887f 1878 # endif
whismanoid 25:9d4012b0887f 1879 #elif HAS_BUTTON2_DEMO
whismanoid 25:9d4012b0887f 1880 DigitalIn button2(BUTTON2);
whismanoid 25:9d4012b0887f 1881 #endif
whismanoid 25:9d4012b0887f 1882
whismanoid 25:9d4012b0887f 1883 //--------------------------------------------------
whismanoid 25:9d4012b0887f 1884 // functions tested by SelfTest()
whismanoid 25:9d4012b0887f 1885 extern void fn_MAX5719_Init(void);
whismanoid 25:9d4012b0887f 1886 extern uint8_t fn_MAX5719_CODE_LOAD(uint32_t dacCodeLsbs);
whismanoid 25:9d4012b0887f 1887 extern uint32_t fn_MAX5719_DACCodeOfVoltage(double voltageV);
whismanoid 25:9d4012b0887f 1888
whismanoid 25:9d4012b0887f 1889 //--------------------------------------------------
whismanoid 30:13fc9d492ee0 1890 // SelfTestGroupEnable selects which of the included tests will run
whismanoid 30:13fc9d492ee0 1891 int SelfTestGroupEnable = 0
whismanoid 31:9cb570b0685d 1892 // | 0x0001 // -- halt-on-first-failure configuration flag
whismanoid 31:9cb570b0685d 1893 // | 0x0002 // -- repeat-until-failure configuration flag
whismanoid 30:13fc9d492ee0 1894 | 0x0004 // CODE_LOAD -- Verify function CODE_LOAD vs platform AIN0 analog input (enabled by default)
whismanoid 33:2c675744a01b 1895 | 0x0008 // CODE_LOAD_2V5 -- Verify function CODE_LOAD vs platform AIN0 analog input (enabled by default) (no run on button)
whismanoid 33:2c675744a01b 1896 | 0x0010 // CODE_LOAD_3V0 -- Verify function CODE_LOAD vs platform AIN0 analog input (enabled by default) (no run on button)
whismanoid 33:2c675744a01b 1897 | 0x0020 // CODE_LOAD_4V1 -- Verify function CODE_LOAD vs platform AIN0 analog input (enabled by default) (no run on button)
whismanoid 33:2c675744a01b 1898 | 0x0040 // DACCodeOfVoltage -- Verify function DACCodeOfVoltage (enabled by default) (no run on button)
whismanoid 30:13fc9d492ee0 1899 ;
whismanoid 30:13fc9d492ee0 1900
whismanoid 30:13fc9d492ee0 1901 //--------------------------------------------------
whismanoid 25:9d4012b0887f 1902 // optional self-test groups for self test function SelfTest()
whismanoid 25:9d4012b0887f 1903 // enable by changing the #define value from 0 to 1
whismanoid 25:9d4012b0887f 1904
whismanoid 25:9d4012b0887f 1905 // SelfTest group CODE_LOAD description:
whismanoid 25:9d4012b0887f 1906 // Verify function CODE_LOAD vs platform AIN0 analog input (enabled by default)
whismanoid 30:13fc9d492ee0 1907 // SelfTestGroupEnable bitmask 0x0004
whismanoid 30:13fc9d492ee0 1908 // self test command:
whismanoid 30:13fc9d492ee0 1909 // . run=0x0004
whismanoid 25:9d4012b0887f 1910 #ifndef MAX5719_SELFTEST_CODE_LOAD
whismanoid 25:9d4012b0887f 1911 #define MAX5719_SELFTEST_CODE_LOAD 1
whismanoid 25:9d4012b0887f 1912 #endif
whismanoid 25:9d4012b0887f 1913
whismanoid 33:2c675744a01b 1914 // SelfTest group CODE_LOAD_2V5 description:
whismanoid 33:2c675744a01b 1915 // Verify function CODE_LOAD vs platform AIN0 analog input (enabled by default) (no run on button)
whismanoid 30:13fc9d492ee0 1916 // SelfTestGroupEnable bitmask 0x0008
whismanoid 30:13fc9d492ee0 1917 // self test command:
whismanoid 30:13fc9d492ee0 1918 // . run=0x0008
whismanoid 33:2c675744a01b 1919 #ifndef MAX5719_SELFTEST_CODE_LOAD_2V5
whismanoid 33:2c675744a01b 1920 #define MAX5719_SELFTEST_CODE_LOAD_2V5 1
whismanoid 33:2c675744a01b 1921 #endif
whismanoid 33:2c675744a01b 1922
whismanoid 33:2c675744a01b 1923 // SelfTest group CODE_LOAD_3V0 description:
whismanoid 33:2c675744a01b 1924 // Verify function CODE_LOAD vs platform AIN0 analog input (enabled by default) (no run on button)
whismanoid 33:2c675744a01b 1925 // SelfTestGroupEnable bitmask 0x0010
whismanoid 33:2c675744a01b 1926 // self test command:
whismanoid 33:2c675744a01b 1927 // . run=0x0010
whismanoid 33:2c675744a01b 1928 #ifndef MAX5719_SELFTEST_CODE_LOAD_3V0
whismanoid 33:2c675744a01b 1929 #define MAX5719_SELFTEST_CODE_LOAD_3V0 1
whismanoid 33:2c675744a01b 1930 #endif
whismanoid 33:2c675744a01b 1931
whismanoid 33:2c675744a01b 1932 // SelfTest group CODE_LOAD_4V1 description:
whismanoid 33:2c675744a01b 1933 // Verify function CODE_LOAD vs platform AIN0 analog input (enabled by default) (no run on button)
whismanoid 33:2c675744a01b 1934 // SelfTestGroupEnable bitmask 0x0020
whismanoid 33:2c675744a01b 1935 // self test command:
whismanoid 33:2c675744a01b 1936 // . run=0x0020
whismanoid 33:2c675744a01b 1937 #ifndef MAX5719_SELFTEST_CODE_LOAD_4V1
whismanoid 33:2c675744a01b 1938 #define MAX5719_SELFTEST_CODE_LOAD_4V1 1
whismanoid 33:2c675744a01b 1939 #endif
whismanoid 33:2c675744a01b 1940
whismanoid 33:2c675744a01b 1941 // SelfTest group DACCodeOfVoltage description:
whismanoid 33:2c675744a01b 1942 // Verify function DACCodeOfVoltage (enabled by default) (no run on button)
whismanoid 33:2c675744a01b 1943 // SelfTestGroupEnable bitmask 0x0040
whismanoid 33:2c675744a01b 1944 // self test command:
whismanoid 33:2c675744a01b 1945 // . run=0x0040
whismanoid 25:9d4012b0887f 1946 #ifndef MAX5719_SELFTEST_DACCodeOfVoltage
whismanoid 25:9d4012b0887f 1947 #define MAX5719_SELFTEST_DACCodeOfVoltage 1
whismanoid 25:9d4012b0887f 1948 #endif
whismanoid 25:9d4012b0887f 1949
whismanoid 25:9d4012b0887f 1950 //--------------------------------------------------
whismanoid 25:9d4012b0887f 1951 // When user presses button BUTTON1, perform self test
whismanoid 25:9d4012b0887f 1952 #if HAS_BUTTON1_DEMO_INTERRUPT
whismanoid 25:9d4012b0887f 1953 void onButton1FallingEdge(void)
whismanoid 25:9d4012b0887f 1954 {
whismanoid 25:9d4012b0887f 1955 void SelfTest(CmdLine & cmdLine);
whismanoid 30:13fc9d492ee0 1956 // SelfTestGroupEnable selects which of the included tests will run
whismanoid 30:13fc9d492ee0 1957 SelfTestGroupEnable = 0
whismanoid 31:9cb570b0685d 1958 // | 0x0001 // -- halt-on-first-failure configuration flag
whismanoid 31:9cb570b0685d 1959 // | 0x0002 // -- repeat-until-failure configuration flag
whismanoid 30:13fc9d492ee0 1960 | 0x0004 // CODE_LOAD -- Verify function CODE_LOAD vs platform AIN0 analog input (enabled by default)
whismanoid 33:2c675744a01b 1961 // | 0x0008 // CODE_LOAD_2V5 -- Verify function CODE_LOAD vs platform AIN0 analog input (enabled by default) (no run on button)
whismanoid 33:2c675744a01b 1962 // | 0x0010 // CODE_LOAD_3V0 -- Verify function CODE_LOAD vs platform AIN0 analog input (enabled by default) (no run on button)
whismanoid 33:2c675744a01b 1963 // | 0x0020 // CODE_LOAD_4V1 -- Verify function CODE_LOAD vs platform AIN0 analog input (enabled by default) (no run on button)
whismanoid 33:2c675744a01b 1964 // | 0x0040 // DACCodeOfVoltage -- Verify function DACCodeOfVoltage (enabled by default) (no run on button)
whismanoid 30:13fc9d492ee0 1965 ;
whismanoid 25:9d4012b0887f 1966 SelfTest(cmdLine_serial);
whismanoid 25:9d4012b0887f 1967 }
whismanoid 25:9d4012b0887f 1968 #endif // HAS_BUTTON1_DEMO_INTERRUPT
whismanoid 25:9d4012b0887f 1969
whismanoid 25:9d4012b0887f 1970 //--------------------------------------------------
whismanoid 25:9d4012b0887f 1971 // When user presses button BUTTON2, perform demo configuration
whismanoid 25:9d4012b0887f 1972 #if HAS_BUTTON2_DEMO_INTERRUPT
whismanoid 25:9d4012b0887f 1973 void onButton2FallingEdge(void)
whismanoid 25:9d4012b0887f 1974 {
whismanoid 25:9d4012b0887f 1975 // TBD demo configuration
whismanoid 31:9cb570b0685d 1976 // When user presses button BUTTON2, perform self test until failure
whismanoid 31:9cb570b0685d 1977 void SelfTest(CmdLine & cmdLine);
whismanoid 31:9cb570b0685d 1978 // SelfTestGroupEnable selects which of the included tests will run
whismanoid 31:9cb570b0685d 1979 SelfTestGroupEnable = 0
whismanoid 31:9cb570b0685d 1980 | 0x0001 // -- halt-on-first-failure configuration flag
whismanoid 31:9cb570b0685d 1981 | 0x0002 // -- repeat-until-failure configuration flag
whismanoid 31:9cb570b0685d 1982 | 0x0004 // CODE_LOAD -- Verify function CODE_LOAD vs platform AIN0 analog input (enabled by default)
whismanoid 33:2c675744a01b 1983 // | 0x0008 // CODE_LOAD_2V5 -- Verify function CODE_LOAD vs platform AIN0 analog input (enabled by default) (no run on button)
whismanoid 33:2c675744a01b 1984 // | 0x0010 // CODE_LOAD_3V0 -- Verify function CODE_LOAD vs platform AIN0 analog input (enabled by default) (no run on button)
whismanoid 33:2c675744a01b 1985 // | 0x0020 // CODE_LOAD_4V1 -- Verify function CODE_LOAD vs platform AIN0 analog input (enabled by default) (no run on button)
whismanoid 33:2c675744a01b 1986 // | 0x0040 // DACCodeOfVoltage -- Verify function DACCodeOfVoltage (enabled by default) (no run on button)
whismanoid 31:9cb570b0685d 1987 ;
whismanoid 31:9cb570b0685d 1988 SelfTest(cmdLine_serial);
whismanoid 25:9d4012b0887f 1989 }
whismanoid 25:9d4012b0887f 1990 #endif // HAS_BUTTON2_DEMO_INTERRUPT
whismanoid 25:9d4012b0887f 1991
whismanoid 25:9d4012b0887f 1992 //--------------------------------------------------
whismanoid 25:9d4012b0887f 1993 void SelfTest(CmdLine & cmdLine)
whismanoid 25:9d4012b0887f 1994 {
whismanoid 25:9d4012b0887f 1995 //--------------------------------------------------
whismanoid 25:9d4012b0887f 1996 #if analogIn4_IS_HIGH_RANGE_OF_analogIn0
whismanoid 25:9d4012b0887f 1997 // Platform board uses AIN4,AIN5,.. as high range of AIN0,AIN1,..
whismanoid 25:9d4012b0887f 1998 MaximTinyTester tinyTester(cmdLine, analogIn4, analogIn5, analogIn2, analogIn3, analogIn0, analogIn4, led1_RFailLED, led2_GPassLED, led3_BBusyLED);
whismanoid 25:9d4012b0887f 1999 tinyTester.analogInPin_fullScaleVoltage[0] = analogInPin_fullScaleVoltage[4]; // board support
whismanoid 25:9d4012b0887f 2000 tinyTester.analogInPin_fullScaleVoltage[1] = analogInPin_fullScaleVoltage[5]; // board support
whismanoid 25:9d4012b0887f 2001 tinyTester.analogInPin_fullScaleVoltage[2] = analogInPin_fullScaleVoltage[2]; // board support
whismanoid 25:9d4012b0887f 2002 tinyTester.analogInPin_fullScaleVoltage[3] = analogInPin_fullScaleVoltage[3]; // board support
whismanoid 25:9d4012b0887f 2003 tinyTester.analogInPin_fullScaleVoltage[4] = analogInPin_fullScaleVoltage[0]; // board support
whismanoid 25:9d4012b0887f 2004 tinyTester.analogInPin_fullScaleVoltage[5] = analogInPin_fullScaleVoltage[1]; // board support
whismanoid 25:9d4012b0887f 2005 // low range channels AIN0, AIN1, AIN2, AIN3
whismanoid 25:9d4012b0887f 2006 #else // analogIn4_IS_HIGH_RANGE_OF_analogIn0
whismanoid 25:9d4012b0887f 2007 // Platform board uses simple analog inputs
whismanoid 25:9d4012b0887f 2008 MaximTinyTester tinyTester(cmdLine, analogIn0, analogIn1, analogIn2, analogIn3, analogIn4, analogIn5, led1_RFailLED, led2_GPassLED, led3_BBusyLED);
whismanoid 25:9d4012b0887f 2009 tinyTester.analogInPin_fullScaleVoltage[0] = analogInPin_fullScaleVoltage[0]; // board support
whismanoid 25:9d4012b0887f 2010 tinyTester.analogInPin_fullScaleVoltage[1] = analogInPin_fullScaleVoltage[1]; // board support
whismanoid 25:9d4012b0887f 2011 tinyTester.analogInPin_fullScaleVoltage[2] = analogInPin_fullScaleVoltage[2]; // board support
whismanoid 25:9d4012b0887f 2012 tinyTester.analogInPin_fullScaleVoltage[3] = analogInPin_fullScaleVoltage[3]; // board support
whismanoid 25:9d4012b0887f 2013 tinyTester.analogInPin_fullScaleVoltage[4] = analogInPin_fullScaleVoltage[4]; // board support
whismanoid 25:9d4012b0887f 2014 tinyTester.analogInPin_fullScaleVoltage[5] = analogInPin_fullScaleVoltage[5]; // board support
whismanoid 25:9d4012b0887f 2015 #endif
whismanoid 25:9d4012b0887f 2016 tinyTester.clear();
whismanoid 25:9d4012b0887f 2017
whismanoid 30:13fc9d492ee0 2018 // repeat-until-failure logic
whismanoid 30:13fc9d492ee0 2019 repeatUntilFailure:
whismanoid 32:016a142143a5 2020 cmdLine.serial().printf("\r\n. run=0x%4.4x", SelfTestGroupEnable);
whismanoid 32:016a142143a5 2021 if ((SelfTestGroupEnable & 0x0003) == 0x0000) { cmdLine.serial().printf("\r\n. runall=0x%4.4x", SelfTestGroupEnable &~ 0x0003); }
whismanoid 32:016a142143a5 2022 if ((SelfTestGroupEnable & 0x0003) == 0x0001) { cmdLine.serial().printf("\r\n. runfail=0x%4.4x", SelfTestGroupEnable &~ 0x0003); }
whismanoid 33:2c675744a01b 2023 if ((SelfTestGroupEnable & 0x0003) == 0x0002) { cmdLine.serial().printf("\r\n. loopall=0x%4.4x", SelfTestGroupEnable &~ 0x0003); }
whismanoid 32:016a142143a5 2024 if ((SelfTestGroupEnable & 0x0003) == 0x0003) { cmdLine.serial().printf("\r\n. loopfail=0x%4.4x", SelfTestGroupEnable &~ 0x0003); }
whismanoid 35:eb705b9c219f 2025 cmdLine.serial().printf("\r\n 0x0004 %s CODE_LOAD", (SelfTestGroupEnable & 0x0004) ? "run " : " skip");
whismanoid 35:eb705b9c219f 2026 cmdLine.serial().printf("\r\n 0x0008 %s CODE_LOAD_2V5", (SelfTestGroupEnable & 0x0008) ? "run " : " skip");
whismanoid 35:eb705b9c219f 2027 cmdLine.serial().printf("\r\n 0x0010 %s CODE_LOAD_3V0", (SelfTestGroupEnable & 0x0010) ? "run " : " skip");
whismanoid 35:eb705b9c219f 2028 cmdLine.serial().printf("\r\n 0x0020 %s CODE_LOAD_4V1", (SelfTestGroupEnable & 0x0020) ? "run " : " skip");
whismanoid 35:eb705b9c219f 2029 cmdLine.serial().printf("\r\n 0x0040 %s DACCodeOfVoltage", (SelfTestGroupEnable & 0x0040) ? "run " : " skip");
whismanoid 30:13fc9d492ee0 2030 // Report number of pass and number of fail test results
whismanoid 30:13fc9d492ee0 2031 tinyTester.Report_Summary();
whismanoid 30:13fc9d492ee0 2032 //
whismanoid 25:9d4012b0887f 2033 // @test group CODE_LOAD // Verify function CODE_LOAD vs platform AIN0 analog input (enabled by default)
whismanoid 25:9d4012b0887f 2034 // @test group CODE_LOAD tinyTester.print("VRef = 4.096 MAX5719 20-bit LSB = 0.000004V = 3.90625uV")
whismanoid 25:9d4012b0887f 2035 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 2036 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2037 // docTest_item['action'] = 'tinyTester.print("VRef = 4.096 MAX5719 20-bit LSB = 0.000004V = 3.90625uV")'
whismanoid 25:9d4012b0887f 2038 // docTest_item['arglist'] = 'VRef = 4.096 MAX5719 20-bit LSB = 0.000004V = 3.90625uV'
whismanoid 25:9d4012b0887f 2039 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2040 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2041 // print-string
whismanoid 25:9d4012b0887f 2042 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 2043 // tinyTesterPrintStringLiteral = "VRef = 4.096 MAX5719 20-bit LSB = 0.000004V = 3.90625uV"
whismanoid 25:9d4012b0887f 2044 tinyTester.print("VRef = 4.096 MAX5719 20-bit LSB = 0.000004V = 3.90625uV");
whismanoid 30:13fc9d492ee0 2045 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2046 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2047 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2048 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2049
whismanoid 25:9d4012b0887f 2050 // @test group CODE_LOAD tinyTester.print("Wire MAX5719 OUT to platform AIN0 for analog loopback tests...")
whismanoid 25:9d4012b0887f 2051 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 2052 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2053 // docTest_item['action'] = 'tinyTester.print("Wire MAX5719 OUT to platform AIN0 for analog loopback tests...")'
whismanoid 25:9d4012b0887f 2054 // docTest_item['arglist'] = 'Wire MAX5719 OUT to platform AIN0 for analog loopback tests...'
whismanoid 25:9d4012b0887f 2055 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2056 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2057 // print-string
whismanoid 25:9d4012b0887f 2058 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 2059 // tinyTesterPrintStringLiteral = "Wire MAX5719 OUT to platform AIN0 for analog loopback tests..."
whismanoid 25:9d4012b0887f 2060 tinyTester.print("Wire MAX5719 OUT to platform AIN0 for analog loopback tests...");
whismanoid 30:13fc9d492ee0 2061 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2062 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2063 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2064 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2065
whismanoid 25:9d4012b0887f 2066 // @test group CODE_LOAD VRef = 4.096
whismanoid 25:9d4012b0887f 2067 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 25:9d4012b0887f 2068 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2069 // docTest_item['action'] = 'VRef = 4.096'
whismanoid 25:9d4012b0887f 2070 // docTest_item['propName'] = 'VRef'
whismanoid 25:9d4012b0887f 2071 // docTest_item['propValue'] = '4.096'
whismanoid 25:9d4012b0887f 2072 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2073 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2074 // assign-propname-value
whismanoid 25:9d4012b0887f 2075 // tinyTesterPropName = "VRef"
whismanoid 25:9d4012b0887f 2076 // tinyTesterPropValue = "4.096"
whismanoid 25:9d4012b0887f 2077 g_MAX5719_device.VRef = 4.096;
whismanoid 30:13fc9d492ee0 2078 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2079 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2080 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2081 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2082
whismanoid 25:9d4012b0887f 2083 // @test group CODE_LOAD tinyTester.blink_time_msec = 75 // default 75 resume hardware self test
whismanoid 25:9d4012b0887f 2084 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 25:9d4012b0887f 2085 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2086 // docTest_item['action'] = 'tinyTester.blink_time_msec = 75'
whismanoid 25:9d4012b0887f 2087 // docTest_item['remarks'] = 'default 75 resume hardware self test'
whismanoid 25:9d4012b0887f 2088 // docTest_item['propName'] = 'tinyTester.blink_time_msec'
whismanoid 25:9d4012b0887f 2089 // docTest_item['propValue'] = '75'
whismanoid 25:9d4012b0887f 2090 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None default 75 resume hardware self test
whismanoid 30:13fc9d492ee0 2091 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2092 // assign-propname-value
whismanoid 25:9d4012b0887f 2093 // tinyTesterPropName = "tinyTester.blink_time_msec"
whismanoid 25:9d4012b0887f 2094 // tinyTesterPropValue = "75"
whismanoid 25:9d4012b0887f 2095 tinyTester.blink_time_msec = 75;
whismanoid 30:13fc9d492ee0 2096 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2097 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2098 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2099 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2100
whismanoid 25:9d4012b0887f 2101 // @test group CODE_LOAD tinyTester.settle_time_msec = 500
whismanoid 25:9d4012b0887f 2102 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 25:9d4012b0887f 2103 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2104 // docTest_item['action'] = 'tinyTester.settle_time_msec = 500'
whismanoid 25:9d4012b0887f 2105 // docTest_item['propName'] = 'tinyTester.settle_time_msec'
whismanoid 25:9d4012b0887f 2106 // docTest_item['propValue'] = '500'
whismanoid 25:9d4012b0887f 2107 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2108 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2109 // assign-propname-value
whismanoid 25:9d4012b0887f 2110 // tinyTesterPropName = "tinyTester.settle_time_msec"
whismanoid 25:9d4012b0887f 2111 // tinyTesterPropValue = "500"
whismanoid 25:9d4012b0887f 2112 tinyTester.settle_time_msec = 500;
whismanoid 30:13fc9d492ee0 2113 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2114 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2115 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2116 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2117
whismanoid 25:9d4012b0887f 2118 // @test Init()
whismanoid 25:9d4012b0887f 2119 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 2120 // docTest_item['action'] = 'Init()'
whismanoid 25:9d4012b0887f 2121 // docTest_item['funcName'] = 'Init'
whismanoid 25:9d4012b0887f 2122 // call-function
whismanoid 27:485b1b2f334c 2123 // selfTestFunctionClosures['Init']['returnType'] = 'void'
whismanoid 25:9d4012b0887f 2124 // ASSERT_EQ(g_MAX5719_device.Init(()), (void)None); //
whismanoid 25:9d4012b0887f 2125 // tinyTester.FunctionCall_Expect("MAX5719.Init", fn_MAX5719_Init, /* empty docTest_argList */ /* empty expect: */ (void)None); //
whismanoid 25:9d4012b0887f 2126 g_MAX5719_device.Init(); //
whismanoid 25:9d4012b0887f 2127
whismanoid 25:9d4012b0887f 2128 // @test VRef expect 4.096 // Nominal Full-Scale Voltage Reference
whismanoid 25:9d4012b0887f 2129 // docTest_item['actionType'] = 'test-propname-expect-value'
whismanoid 25:9d4012b0887f 2130 // docTest_item['action'] = 'VRef expect 4.096'
whismanoid 25:9d4012b0887f 2131 // docTest_item['remarks'] = 'Nominal Full-Scale Voltage Reference'
whismanoid 25:9d4012b0887f 2132 // docTest_item['expect-value'] = '4.096'
whismanoid 25:9d4012b0887f 2133 // docTest_item['propName'] = 'VRef'
whismanoid 25:9d4012b0887f 2134 // test-propname-expect-value
whismanoid 25:9d4012b0887f 2135 tinyTester.Expect("MAX5719.VRef", g_MAX5719_device.VRef, /* expect: */ 4.096); // Nominal Full-Scale Voltage Reference
whismanoid 25:9d4012b0887f 2136
whismanoid 25:9d4012b0887f 2137 // @test group CODE_LOAD tinyTester.err_threshold = 0.050
whismanoid 25:9d4012b0887f 2138 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 25:9d4012b0887f 2139 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2140 // docTest_item['action'] = 'tinyTester.err_threshold = 0.050'
whismanoid 25:9d4012b0887f 2141 // docTest_item['propName'] = 'tinyTester.err_threshold'
whismanoid 25:9d4012b0887f 2142 // docTest_item['propValue'] = '0.050'
whismanoid 25:9d4012b0887f 2143 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2144 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2145 // assign-propname-value
whismanoid 25:9d4012b0887f 2146 // tinyTesterPropName = "tinyTester.err_threshold"
whismanoid 25:9d4012b0887f 2147 // tinyTesterPropValue = "0.050"
whismanoid 25:9d4012b0887f 2148 tinyTester.err_threshold = 0.050;
whismanoid 30:13fc9d492ee0 2149 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2150 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2151 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2152 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2153
whismanoid 25:9d4012b0887f 2154 // @test group CODE_LOAD tinyTester.print("0x000000 = 0.000V")
whismanoid 25:9d4012b0887f 2155 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 2156 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2157 // docTest_item['action'] = 'tinyTester.print("0x000000 = 0.000V")'
whismanoid 25:9d4012b0887f 2158 // docTest_item['arglist'] = '0x000000 = 0.000V'
whismanoid 25:9d4012b0887f 2159 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2160 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2161 // print-string
whismanoid 25:9d4012b0887f 2162 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 2163 // tinyTesterPrintStringLiteral = "0x000000 = 0.000V"
whismanoid 25:9d4012b0887f 2164 tinyTester.print("0x000000 = 0.000V");
whismanoid 30:13fc9d492ee0 2165 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2166 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2167 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2168 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2169
whismanoid 25:9d4012b0887f 2170 // @test group CODE_LOAD CODE_LOAD(0x000000) // 0.000V
whismanoid 25:9d4012b0887f 2171 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 2172 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2173 // docTest_item['action'] = 'CODE_LOAD(0x000000)'
whismanoid 25:9d4012b0887f 2174 // docTest_item['remarks'] = '0.000V'
whismanoid 25:9d4012b0887f 2175 // docTest_item['funcName'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2176 // docTest_item['arglist'] = '0x000000'
whismanoid 25:9d4012b0887f 2177 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD CODE_LOAD 0.000V
whismanoid 30:13fc9d492ee0 2178 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2179 // call-function
whismanoid 27:485b1b2f334c 2180 // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t'
whismanoid 25:9d4012b0887f 2181 // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x000000), (uint8_t)None); // 0.000V
whismanoid 25:9d4012b0887f 2182 // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x000000, /* empty expect: */ (uint8_t)None); // 0.000V
whismanoid 25:9d4012b0887f 2183 g_MAX5719_device.CODE_LOAD((uint32_t)0x000000); // 0.000V
whismanoid 30:13fc9d492ee0 2184 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2185 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2186 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2187 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2188
whismanoid 25:9d4012b0887f 2189 // @test group CODE_LOAD tinyTester.Wait_Output_Settling()
whismanoid 25:9d4012b0887f 2190 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2191 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2192 // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()'
whismanoid 25:9d4012b0887f 2193 // docTest_item['propName'] = 'Wait_Output_Settling'
whismanoid 25:9d4012b0887f 2194 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2195 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2196 // call-tinytester-function
whismanoid 25:9d4012b0887f 2197 // tinyTesterFuncName = "tinyTester.Wait_Output_Settling"
whismanoid 25:9d4012b0887f 2198 // docTest_argList = ""
whismanoid 25:9d4012b0887f 2199 tinyTester.Wait_Output_Settling(); //
whismanoid 30:13fc9d492ee0 2200 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2201 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2202 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2203 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2204
whismanoid 25:9d4012b0887f 2205 // @test group CODE_LOAD tinyTester.AnalogIn0_Read_Expect_voltageV(0.000000)
whismanoid 25:9d4012b0887f 2206 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2207 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2208 // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(0.000000)'
whismanoid 25:9d4012b0887f 2209 // docTest_item['arglist'] = '0.000000'
whismanoid 25:9d4012b0887f 2210 // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV'
whismanoid 25:9d4012b0887f 2211 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2212 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2213 // call-tinytester-function
whismanoid 25:9d4012b0887f 2214 // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV"
whismanoid 25:9d4012b0887f 2215 // docTest_argList = "0.000000"
whismanoid 25:9d4012b0887f 2216 tinyTester.AnalogIn0_Read_Expect_voltageV(0.000000); //
whismanoid 30:13fc9d492ee0 2217 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2218 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2219 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2220 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2221
whismanoid 27:485b1b2f334c 2222 // @test group CODE_LOAD tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0
whismanoid 27:485b1b2f334c 2223 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 27:485b1b2f334c 2224 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 27:485b1b2f334c 2225 // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()'
whismanoid 27:485b1b2f334c 2226 // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV'
whismanoid 27:485b1b2f334c 2227 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2228 if (SelfTestGroupEnable & 0x0004) {
whismanoid 27:485b1b2f334c 2229 // call-tinytester-function
whismanoid 27:485b1b2f334c 2230 // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV"
whismanoid 27:485b1b2f334c 2231 // docTest_argList = ""
whismanoid 27:485b1b2f334c 2232 tinyTester.AnalogIn1_Read_Report_voltageV(); //
whismanoid 30:13fc9d492ee0 2233 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2234 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2235 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 27:485b1b2f334c 2236 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 27:485b1b2f334c 2237
whismanoid 25:9d4012b0887f 2238 // @test group CODE_LOAD tinyTester.print("0x01f400 = 0.500V")
whismanoid 25:9d4012b0887f 2239 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 2240 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2241 // docTest_item['action'] = 'tinyTester.print("0x01f400 = 0.500V")'
whismanoid 25:9d4012b0887f 2242 // docTest_item['arglist'] = '0x01f400 = 0.500V'
whismanoid 25:9d4012b0887f 2243 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2244 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2245 // print-string
whismanoid 25:9d4012b0887f 2246 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 2247 // tinyTesterPrintStringLiteral = "0x01f400 = 0.500V"
whismanoid 25:9d4012b0887f 2248 tinyTester.print("0x01f400 = 0.500V");
whismanoid 30:13fc9d492ee0 2249 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2250 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2251 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2252 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2253
whismanoid 25:9d4012b0887f 2254 // @test group CODE_LOAD CODE_LOAD(0x01f400) // 0.500V
whismanoid 25:9d4012b0887f 2255 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 2256 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2257 // docTest_item['action'] = 'CODE_LOAD(0x01f400)'
whismanoid 25:9d4012b0887f 2258 // docTest_item['remarks'] = '0.500V'
whismanoid 25:9d4012b0887f 2259 // docTest_item['funcName'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2260 // docTest_item['arglist'] = '0x01f400'
whismanoid 25:9d4012b0887f 2261 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD CODE_LOAD 0.500V
whismanoid 30:13fc9d492ee0 2262 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2263 // call-function
whismanoid 27:485b1b2f334c 2264 // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t'
whismanoid 25:9d4012b0887f 2265 // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x01f400), (uint8_t)None); // 0.500V
whismanoid 25:9d4012b0887f 2266 // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x01f400, /* empty expect: */ (uint8_t)None); // 0.500V
whismanoid 25:9d4012b0887f 2267 g_MAX5719_device.CODE_LOAD((uint32_t)0x01f400); // 0.500V
whismanoid 30:13fc9d492ee0 2268 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2269 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2270 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2271 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2272
whismanoid 25:9d4012b0887f 2273 // @test group CODE_LOAD tinyTester.Wait_Output_Settling()
whismanoid 25:9d4012b0887f 2274 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2275 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2276 // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()'
whismanoid 25:9d4012b0887f 2277 // docTest_item['propName'] = 'Wait_Output_Settling'
whismanoid 25:9d4012b0887f 2278 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2279 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2280 // call-tinytester-function
whismanoid 25:9d4012b0887f 2281 // tinyTesterFuncName = "tinyTester.Wait_Output_Settling"
whismanoid 25:9d4012b0887f 2282 // docTest_argList = ""
whismanoid 25:9d4012b0887f 2283 tinyTester.Wait_Output_Settling(); //
whismanoid 30:13fc9d492ee0 2284 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2285 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2286 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2287 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2288
whismanoid 25:9d4012b0887f 2289 // @test group CODE_LOAD tinyTester.AnalogIn0_Read_Expect_voltageV(0.500000)
whismanoid 25:9d4012b0887f 2290 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2291 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2292 // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(0.500000)'
whismanoid 25:9d4012b0887f 2293 // docTest_item['arglist'] = '0.500000'
whismanoid 25:9d4012b0887f 2294 // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV'
whismanoid 25:9d4012b0887f 2295 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2296 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2297 // call-tinytester-function
whismanoid 25:9d4012b0887f 2298 // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV"
whismanoid 25:9d4012b0887f 2299 // docTest_argList = "0.500000"
whismanoid 25:9d4012b0887f 2300 tinyTester.AnalogIn0_Read_Expect_voltageV(0.500000); //
whismanoid 30:13fc9d492ee0 2301 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2302 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2303 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2304 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2305
whismanoid 27:485b1b2f334c 2306 // @test group CODE_LOAD tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0
whismanoid 27:485b1b2f334c 2307 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 27:485b1b2f334c 2308 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 27:485b1b2f334c 2309 // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()'
whismanoid 27:485b1b2f334c 2310 // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV'
whismanoid 27:485b1b2f334c 2311 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2312 if (SelfTestGroupEnable & 0x0004) {
whismanoid 27:485b1b2f334c 2313 // call-tinytester-function
whismanoid 27:485b1b2f334c 2314 // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV"
whismanoid 27:485b1b2f334c 2315 // docTest_argList = ""
whismanoid 27:485b1b2f334c 2316 tinyTester.AnalogIn1_Read_Report_voltageV(); //
whismanoid 30:13fc9d492ee0 2317 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2318 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2319 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 27:485b1b2f334c 2320 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 27:485b1b2f334c 2321
whismanoid 25:9d4012b0887f 2322 // @test group CODE_LOAD tinyTester.print("0x03e800 = 1.000V")
whismanoid 25:9d4012b0887f 2323 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 2324 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2325 // docTest_item['action'] = 'tinyTester.print("0x03e800 = 1.000V")'
whismanoid 25:9d4012b0887f 2326 // docTest_item['arglist'] = '0x03e800 = 1.000V'
whismanoid 25:9d4012b0887f 2327 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2328 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2329 // print-string
whismanoid 25:9d4012b0887f 2330 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 2331 // tinyTesterPrintStringLiteral = "0x03e800 = 1.000V"
whismanoid 25:9d4012b0887f 2332 tinyTester.print("0x03e800 = 1.000V");
whismanoid 30:13fc9d492ee0 2333 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2334 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2335 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2336 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2337
whismanoid 25:9d4012b0887f 2338 // @test group CODE_LOAD CODE_LOAD(0x03e800) // 1.000V
whismanoid 25:9d4012b0887f 2339 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 2340 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2341 // docTest_item['action'] = 'CODE_LOAD(0x03e800)'
whismanoid 25:9d4012b0887f 2342 // docTest_item['remarks'] = '1.000V'
whismanoid 25:9d4012b0887f 2343 // docTest_item['funcName'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2344 // docTest_item['arglist'] = '0x03e800'
whismanoid 25:9d4012b0887f 2345 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD CODE_LOAD 1.000V
whismanoid 30:13fc9d492ee0 2346 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2347 // call-function
whismanoid 27:485b1b2f334c 2348 // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t'
whismanoid 25:9d4012b0887f 2349 // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x03e800), (uint8_t)None); // 1.000V
whismanoid 25:9d4012b0887f 2350 // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x03e800, /* empty expect: */ (uint8_t)None); // 1.000V
whismanoid 25:9d4012b0887f 2351 g_MAX5719_device.CODE_LOAD((uint32_t)0x03e800); // 1.000V
whismanoid 30:13fc9d492ee0 2352 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2353 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2354 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2355 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2356
whismanoid 25:9d4012b0887f 2357 // @test group CODE_LOAD tinyTester.Wait_Output_Settling()
whismanoid 25:9d4012b0887f 2358 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2359 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2360 // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()'
whismanoid 25:9d4012b0887f 2361 // docTest_item['propName'] = 'Wait_Output_Settling'
whismanoid 25:9d4012b0887f 2362 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2363 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2364 // call-tinytester-function
whismanoid 25:9d4012b0887f 2365 // tinyTesterFuncName = "tinyTester.Wait_Output_Settling"
whismanoid 25:9d4012b0887f 2366 // docTest_argList = ""
whismanoid 25:9d4012b0887f 2367 tinyTester.Wait_Output_Settling(); //
whismanoid 30:13fc9d492ee0 2368 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2369 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2370 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2371 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2372
whismanoid 25:9d4012b0887f 2373 // @test group CODE_LOAD tinyTester.AnalogIn0_Read_Expect_voltageV(1.000000)
whismanoid 25:9d4012b0887f 2374 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2375 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2376 // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(1.000000)'
whismanoid 25:9d4012b0887f 2377 // docTest_item['arglist'] = '1.000000'
whismanoid 25:9d4012b0887f 2378 // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV'
whismanoid 25:9d4012b0887f 2379 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2380 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2381 // call-tinytester-function
whismanoid 25:9d4012b0887f 2382 // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV"
whismanoid 25:9d4012b0887f 2383 // docTest_argList = "1.000000"
whismanoid 25:9d4012b0887f 2384 tinyTester.AnalogIn0_Read_Expect_voltageV(1.000000); //
whismanoid 30:13fc9d492ee0 2385 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2386 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2387 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2388 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2389
whismanoid 27:485b1b2f334c 2390 // @test group CODE_LOAD tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0
whismanoid 27:485b1b2f334c 2391 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 27:485b1b2f334c 2392 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 27:485b1b2f334c 2393 // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()'
whismanoid 27:485b1b2f334c 2394 // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV'
whismanoid 27:485b1b2f334c 2395 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2396 if (SelfTestGroupEnable & 0x0004) {
whismanoid 27:485b1b2f334c 2397 // call-tinytester-function
whismanoid 27:485b1b2f334c 2398 // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV"
whismanoid 27:485b1b2f334c 2399 // docTest_argList = ""
whismanoid 27:485b1b2f334c 2400 tinyTester.AnalogIn1_Read_Report_voltageV(); //
whismanoid 30:13fc9d492ee0 2401 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2402 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2403 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 27:485b1b2f334c 2404 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 27:485b1b2f334c 2405
whismanoid 26:ec719cd9a579 2406 // @test group CODE_LOAD tinyTester.err_threshold = 0.075
whismanoid 26:ec719cd9a579 2407 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 26:ec719cd9a579 2408 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 26:ec719cd9a579 2409 // docTest_item['action'] = 'tinyTester.err_threshold = 0.075'
whismanoid 26:ec719cd9a579 2410 // docTest_item['propName'] = 'tinyTester.err_threshold'
whismanoid 26:ec719cd9a579 2411 // docTest_item['propValue'] = '0.075'
whismanoid 26:ec719cd9a579 2412 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2413 if (SelfTestGroupEnable & 0x0004) {
whismanoid 26:ec719cd9a579 2414 // assign-propname-value
whismanoid 26:ec719cd9a579 2415 // tinyTesterPropName = "tinyTester.err_threshold"
whismanoid 26:ec719cd9a579 2416 // tinyTesterPropValue = "0.075"
whismanoid 26:ec719cd9a579 2417 tinyTester.err_threshold = 0.075;
whismanoid 30:13fc9d492ee0 2418 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2419 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2420 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 26:ec719cd9a579 2421 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 26:ec719cd9a579 2422
whismanoid 25:9d4012b0887f 2423 // @test group CODE_LOAD tinyTester.print("0x05dc00 = 1.500V")
whismanoid 25:9d4012b0887f 2424 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 2425 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2426 // docTest_item['action'] = 'tinyTester.print("0x05dc00 = 1.500V")'
whismanoid 25:9d4012b0887f 2427 // docTest_item['arglist'] = '0x05dc00 = 1.500V'
whismanoid 25:9d4012b0887f 2428 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2429 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2430 // print-string
whismanoid 25:9d4012b0887f 2431 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 2432 // tinyTesterPrintStringLiteral = "0x05dc00 = 1.500V"
whismanoid 25:9d4012b0887f 2433 tinyTester.print("0x05dc00 = 1.500V");
whismanoid 30:13fc9d492ee0 2434 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2435 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2436 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2437 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2438
whismanoid 25:9d4012b0887f 2439 // @test group CODE_LOAD CODE_LOAD(0x05dc00) // 1.500V
whismanoid 25:9d4012b0887f 2440 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 2441 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2442 // docTest_item['action'] = 'CODE_LOAD(0x05dc00)'
whismanoid 25:9d4012b0887f 2443 // docTest_item['remarks'] = '1.500V'
whismanoid 25:9d4012b0887f 2444 // docTest_item['funcName'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2445 // docTest_item['arglist'] = '0x05dc00'
whismanoid 25:9d4012b0887f 2446 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD CODE_LOAD 1.500V
whismanoid 30:13fc9d492ee0 2447 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2448 // call-function
whismanoid 27:485b1b2f334c 2449 // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t'
whismanoid 25:9d4012b0887f 2450 // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x05dc00), (uint8_t)None); // 1.500V
whismanoid 25:9d4012b0887f 2451 // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x05dc00, /* empty expect: */ (uint8_t)None); // 1.500V
whismanoid 25:9d4012b0887f 2452 g_MAX5719_device.CODE_LOAD((uint32_t)0x05dc00); // 1.500V
whismanoid 30:13fc9d492ee0 2453 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2454 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2455 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2456 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2457
whismanoid 25:9d4012b0887f 2458 // @test group CODE_LOAD tinyTester.Wait_Output_Settling()
whismanoid 25:9d4012b0887f 2459 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2460 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2461 // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()'
whismanoid 25:9d4012b0887f 2462 // docTest_item['propName'] = 'Wait_Output_Settling'
whismanoid 25:9d4012b0887f 2463 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2464 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2465 // call-tinytester-function
whismanoid 25:9d4012b0887f 2466 // tinyTesterFuncName = "tinyTester.Wait_Output_Settling"
whismanoid 25:9d4012b0887f 2467 // docTest_argList = ""
whismanoid 25:9d4012b0887f 2468 tinyTester.Wait_Output_Settling(); //
whismanoid 30:13fc9d492ee0 2469 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2470 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2471 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2472 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2473
whismanoid 25:9d4012b0887f 2474 // @test group CODE_LOAD tinyTester.AnalogIn0_Read_Expect_voltageV(1.500000)
whismanoid 25:9d4012b0887f 2475 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2476 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2477 // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(1.500000)'
whismanoid 25:9d4012b0887f 2478 // docTest_item['arglist'] = '1.500000'
whismanoid 25:9d4012b0887f 2479 // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV'
whismanoid 25:9d4012b0887f 2480 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2481 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2482 // call-tinytester-function
whismanoid 25:9d4012b0887f 2483 // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV"
whismanoid 25:9d4012b0887f 2484 // docTest_argList = "1.500000"
whismanoid 25:9d4012b0887f 2485 tinyTester.AnalogIn0_Read_Expect_voltageV(1.500000); //
whismanoid 30:13fc9d492ee0 2486 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2487 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2488 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2489 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2490
whismanoid 27:485b1b2f334c 2491 // @test group CODE_LOAD tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0
whismanoid 27:485b1b2f334c 2492 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 27:485b1b2f334c 2493 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 27:485b1b2f334c 2494 // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()'
whismanoid 27:485b1b2f334c 2495 // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV'
whismanoid 27:485b1b2f334c 2496 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2497 if (SelfTestGroupEnable & 0x0004) {
whismanoid 27:485b1b2f334c 2498 // call-tinytester-function
whismanoid 27:485b1b2f334c 2499 // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV"
whismanoid 27:485b1b2f334c 2500 // docTest_argList = ""
whismanoid 27:485b1b2f334c 2501 tinyTester.AnalogIn1_Read_Report_voltageV(); //
whismanoid 30:13fc9d492ee0 2502 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2503 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2504 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 27:485b1b2f334c 2505 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 27:485b1b2f334c 2506
whismanoid 26:ec719cd9a579 2507 // @test group CODE_LOAD tinyTester.err_threshold = 0.100
whismanoid 26:ec719cd9a579 2508 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 26:ec719cd9a579 2509 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 26:ec719cd9a579 2510 // docTest_item['action'] = 'tinyTester.err_threshold = 0.100'
whismanoid 26:ec719cd9a579 2511 // docTest_item['propName'] = 'tinyTester.err_threshold'
whismanoid 26:ec719cd9a579 2512 // docTest_item['propValue'] = '0.100'
whismanoid 26:ec719cd9a579 2513 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2514 if (SelfTestGroupEnable & 0x0004) {
whismanoid 26:ec719cd9a579 2515 // assign-propname-value
whismanoid 26:ec719cd9a579 2516 // tinyTesterPropName = "tinyTester.err_threshold"
whismanoid 26:ec719cd9a579 2517 // tinyTesterPropValue = "0.100"
whismanoid 26:ec719cd9a579 2518 tinyTester.err_threshold = 0.100;
whismanoid 30:13fc9d492ee0 2519 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2520 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2521 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 26:ec719cd9a579 2522 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 26:ec719cd9a579 2523
whismanoid 25:9d4012b0887f 2524 // @test group CODE_LOAD tinyTester.print("0x07d000 = 2.000V")
whismanoid 25:9d4012b0887f 2525 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 2526 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2527 // docTest_item['action'] = 'tinyTester.print("0x07d000 = 2.000V")'
whismanoid 25:9d4012b0887f 2528 // docTest_item['arglist'] = '0x07d000 = 2.000V'
whismanoid 25:9d4012b0887f 2529 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2530 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2531 // print-string
whismanoid 25:9d4012b0887f 2532 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 2533 // tinyTesterPrintStringLiteral = "0x07d000 = 2.000V"
whismanoid 25:9d4012b0887f 2534 tinyTester.print("0x07d000 = 2.000V");
whismanoid 30:13fc9d492ee0 2535 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2536 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2537 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2538 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2539
whismanoid 25:9d4012b0887f 2540 // @test group CODE_LOAD CODE_LOAD(0x07d000) // 2.000V
whismanoid 25:9d4012b0887f 2541 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 2542 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2543 // docTest_item['action'] = 'CODE_LOAD(0x07d000)'
whismanoid 25:9d4012b0887f 2544 // docTest_item['remarks'] = '2.000V'
whismanoid 25:9d4012b0887f 2545 // docTest_item['funcName'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2546 // docTest_item['arglist'] = '0x07d000'
whismanoid 25:9d4012b0887f 2547 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD CODE_LOAD 2.000V
whismanoid 30:13fc9d492ee0 2548 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2549 // call-function
whismanoid 27:485b1b2f334c 2550 // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t'
whismanoid 25:9d4012b0887f 2551 // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x07d000), (uint8_t)None); // 2.000V
whismanoid 25:9d4012b0887f 2552 // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x07d000, /* empty expect: */ (uint8_t)None); // 2.000V
whismanoid 25:9d4012b0887f 2553 g_MAX5719_device.CODE_LOAD((uint32_t)0x07d000); // 2.000V
whismanoid 30:13fc9d492ee0 2554 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2555 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2556 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2557 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2558
whismanoid 25:9d4012b0887f 2559 // @test group CODE_LOAD tinyTester.Wait_Output_Settling()
whismanoid 25:9d4012b0887f 2560 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2561 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2562 // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()'
whismanoid 25:9d4012b0887f 2563 // docTest_item['propName'] = 'Wait_Output_Settling'
whismanoid 25:9d4012b0887f 2564 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2565 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2566 // call-tinytester-function
whismanoid 25:9d4012b0887f 2567 // tinyTesterFuncName = "tinyTester.Wait_Output_Settling"
whismanoid 25:9d4012b0887f 2568 // docTest_argList = ""
whismanoid 25:9d4012b0887f 2569 tinyTester.Wait_Output_Settling(); //
whismanoid 30:13fc9d492ee0 2570 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2571 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2572 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2573 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2574
whismanoid 25:9d4012b0887f 2575 // @test group CODE_LOAD tinyTester.AnalogIn0_Read_Expect_voltageV(2.000000)
whismanoid 25:9d4012b0887f 2576 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2577 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2578 // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(2.000000)'
whismanoid 25:9d4012b0887f 2579 // docTest_item['arglist'] = '2.000000'
whismanoid 25:9d4012b0887f 2580 // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV'
whismanoid 25:9d4012b0887f 2581 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2582 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2583 // call-tinytester-function
whismanoid 25:9d4012b0887f 2584 // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV"
whismanoid 25:9d4012b0887f 2585 // docTest_argList = "2.000000"
whismanoid 25:9d4012b0887f 2586 tinyTester.AnalogIn0_Read_Expect_voltageV(2.000000); //
whismanoid 30:13fc9d492ee0 2587 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2588 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2589 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2590 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2591
whismanoid 27:485b1b2f334c 2592 // @test group CODE_LOAD tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0
whismanoid 27:485b1b2f334c 2593 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 27:485b1b2f334c 2594 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 27:485b1b2f334c 2595 // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()'
whismanoid 27:485b1b2f334c 2596 // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV'
whismanoid 27:485b1b2f334c 2597 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2598 if (SelfTestGroupEnable & 0x0004) {
whismanoid 27:485b1b2f334c 2599 // call-tinytester-function
whismanoid 27:485b1b2f334c 2600 // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV"
whismanoid 27:485b1b2f334c 2601 // docTest_argList = ""
whismanoid 27:485b1b2f334c 2602 tinyTester.AnalogIn1_Read_Report_voltageV(); //
whismanoid 30:13fc9d492ee0 2603 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2604 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2605 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 27:485b1b2f334c 2606 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 27:485b1b2f334c 2607
whismanoid 26:ec719cd9a579 2608 // @test group CODE_LOAD tinyTester.err_threshold = 0.150
whismanoid 26:ec719cd9a579 2609 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 26:ec719cd9a579 2610 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 26:ec719cd9a579 2611 // docTest_item['action'] = 'tinyTester.err_threshold = 0.150'
whismanoid 26:ec719cd9a579 2612 // docTest_item['propName'] = 'tinyTester.err_threshold'
whismanoid 26:ec719cd9a579 2613 // docTest_item['propValue'] = '0.150'
whismanoid 26:ec719cd9a579 2614 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2615 if (SelfTestGroupEnable & 0x0004) {
whismanoid 26:ec719cd9a579 2616 // assign-propname-value
whismanoid 26:ec719cd9a579 2617 // tinyTesterPropName = "tinyTester.err_threshold"
whismanoid 26:ec719cd9a579 2618 // tinyTesterPropValue = "0.150"
whismanoid 26:ec719cd9a579 2619 tinyTester.err_threshold = 0.150;
whismanoid 30:13fc9d492ee0 2620 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2621 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2622 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 26:ec719cd9a579 2623 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 26:ec719cd9a579 2624
whismanoid 25:9d4012b0887f 2625 // @test group CODE_LOAD tinyTester.print("0x09c400 = 2.500V")
whismanoid 25:9d4012b0887f 2626 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 2627 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2628 // docTest_item['action'] = 'tinyTester.print("0x09c400 = 2.500V")'
whismanoid 25:9d4012b0887f 2629 // docTest_item['arglist'] = '0x09c400 = 2.500V'
whismanoid 25:9d4012b0887f 2630 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2631 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2632 // print-string
whismanoid 25:9d4012b0887f 2633 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 2634 // tinyTesterPrintStringLiteral = "0x09c400 = 2.500V"
whismanoid 25:9d4012b0887f 2635 tinyTester.print("0x09c400 = 2.500V");
whismanoid 30:13fc9d492ee0 2636 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2637 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2638 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2639 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2640
whismanoid 25:9d4012b0887f 2641 // @test group CODE_LOAD CODE_LOAD(0x09c400) // 2.500V
whismanoid 25:9d4012b0887f 2642 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 2643 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2644 // docTest_item['action'] = 'CODE_LOAD(0x09c400)'
whismanoid 25:9d4012b0887f 2645 // docTest_item['remarks'] = '2.500V'
whismanoid 25:9d4012b0887f 2646 // docTest_item['funcName'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2647 // docTest_item['arglist'] = '0x09c400'
whismanoid 25:9d4012b0887f 2648 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD CODE_LOAD 2.500V
whismanoid 30:13fc9d492ee0 2649 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2650 // call-function
whismanoid 27:485b1b2f334c 2651 // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t'
whismanoid 25:9d4012b0887f 2652 // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x09c400), (uint8_t)None); // 2.500V
whismanoid 25:9d4012b0887f 2653 // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x09c400, /* empty expect: */ (uint8_t)None); // 2.500V
whismanoid 25:9d4012b0887f 2654 g_MAX5719_device.CODE_LOAD((uint32_t)0x09c400); // 2.500V
whismanoid 30:13fc9d492ee0 2655 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2656 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2657 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2658 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2659
whismanoid 25:9d4012b0887f 2660 // @test group CODE_LOAD tinyTester.Wait_Output_Settling()
whismanoid 25:9d4012b0887f 2661 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2662 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2663 // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()'
whismanoid 25:9d4012b0887f 2664 // docTest_item['propName'] = 'Wait_Output_Settling'
whismanoid 25:9d4012b0887f 2665 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2666 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2667 // call-tinytester-function
whismanoid 25:9d4012b0887f 2668 // tinyTesterFuncName = "tinyTester.Wait_Output_Settling"
whismanoid 25:9d4012b0887f 2669 // docTest_argList = ""
whismanoid 25:9d4012b0887f 2670 tinyTester.Wait_Output_Settling(); //
whismanoid 30:13fc9d492ee0 2671 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2672 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2673 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2674 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2675
whismanoid 25:9d4012b0887f 2676 // @test group CODE_LOAD tinyTester.AnalogIn0_Read_Expect_voltageV(2.500000)
whismanoid 25:9d4012b0887f 2677 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2678 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2679 // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(2.500000)'
whismanoid 25:9d4012b0887f 2680 // docTest_item['arglist'] = '2.500000'
whismanoid 25:9d4012b0887f 2681 // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV'
whismanoid 25:9d4012b0887f 2682 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2683 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2684 // call-tinytester-function
whismanoid 25:9d4012b0887f 2685 // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV"
whismanoid 25:9d4012b0887f 2686 // docTest_argList = "2.500000"
whismanoid 25:9d4012b0887f 2687 tinyTester.AnalogIn0_Read_Expect_voltageV(2.500000); //
whismanoid 30:13fc9d492ee0 2688 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2689 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2690 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2691 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2692
whismanoid 27:485b1b2f334c 2693 // @test group CODE_LOAD tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0
whismanoid 27:485b1b2f334c 2694 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 27:485b1b2f334c 2695 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 27:485b1b2f334c 2696 // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()'
whismanoid 27:485b1b2f334c 2697 // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV'
whismanoid 27:485b1b2f334c 2698 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2699 if (SelfTestGroupEnable & 0x0004) {
whismanoid 27:485b1b2f334c 2700 // call-tinytester-function
whismanoid 27:485b1b2f334c 2701 // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV"
whismanoid 27:485b1b2f334c 2702 // docTest_argList = ""
whismanoid 27:485b1b2f334c 2703 tinyTester.AnalogIn1_Read_Report_voltageV(); //
whismanoid 30:13fc9d492ee0 2704 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2705 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2706 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 27:485b1b2f334c 2707 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 27:485b1b2f334c 2708
whismanoid 26:ec719cd9a579 2709 // @test group CODE_LOAD tinyTester.err_threshold = 0.200
whismanoid 26:ec719cd9a579 2710 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 26:ec719cd9a579 2711 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 26:ec719cd9a579 2712 // docTest_item['action'] = 'tinyTester.err_threshold = 0.200'
whismanoid 26:ec719cd9a579 2713 // docTest_item['propName'] = 'tinyTester.err_threshold'
whismanoid 26:ec719cd9a579 2714 // docTest_item['propValue'] = '0.200'
whismanoid 26:ec719cd9a579 2715 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2716 if (SelfTestGroupEnable & 0x0004) {
whismanoid 26:ec719cd9a579 2717 // assign-propname-value
whismanoid 26:ec719cd9a579 2718 // tinyTesterPropName = "tinyTester.err_threshold"
whismanoid 26:ec719cd9a579 2719 // tinyTesterPropValue = "0.200"
whismanoid 26:ec719cd9a579 2720 tinyTester.err_threshold = 0.200;
whismanoid 30:13fc9d492ee0 2721 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2722 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2723 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 26:ec719cd9a579 2724 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 26:ec719cd9a579 2725
whismanoid 25:9d4012b0887f 2726 // @test group CODE_LOAD tinyTester.print("0x0bb800 = 3.000V")
whismanoid 25:9d4012b0887f 2727 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 2728 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2729 // docTest_item['action'] = 'tinyTester.print("0x0bb800 = 3.000V")'
whismanoid 25:9d4012b0887f 2730 // docTest_item['arglist'] = '0x0bb800 = 3.000V'
whismanoid 25:9d4012b0887f 2731 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2732 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2733 // print-string
whismanoid 25:9d4012b0887f 2734 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 2735 // tinyTesterPrintStringLiteral = "0x0bb800 = 3.000V"
whismanoid 25:9d4012b0887f 2736 tinyTester.print("0x0bb800 = 3.000V");
whismanoid 30:13fc9d492ee0 2737 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2738 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2739 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2740 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2741
whismanoid 25:9d4012b0887f 2742 // @test group CODE_LOAD CODE_LOAD(0x0bb800) // 3.000V
whismanoid 25:9d4012b0887f 2743 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 2744 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2745 // docTest_item['action'] = 'CODE_LOAD(0x0bb800)'
whismanoid 25:9d4012b0887f 2746 // docTest_item['remarks'] = '3.000V'
whismanoid 25:9d4012b0887f 2747 // docTest_item['funcName'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2748 // docTest_item['arglist'] = '0x0bb800'
whismanoid 25:9d4012b0887f 2749 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD CODE_LOAD 3.000V
whismanoid 30:13fc9d492ee0 2750 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2751 // call-function
whismanoid 27:485b1b2f334c 2752 // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t'
whismanoid 25:9d4012b0887f 2753 // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x0bb800), (uint8_t)None); // 3.000V
whismanoid 25:9d4012b0887f 2754 // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x0bb800, /* empty expect: */ (uint8_t)None); // 3.000V
whismanoid 25:9d4012b0887f 2755 g_MAX5719_device.CODE_LOAD((uint32_t)0x0bb800); // 3.000V
whismanoid 30:13fc9d492ee0 2756 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2757 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2758 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2759 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2760
whismanoid 25:9d4012b0887f 2761 // @test group CODE_LOAD tinyTester.Wait_Output_Settling()
whismanoid 25:9d4012b0887f 2762 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2763 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2764 // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()'
whismanoid 25:9d4012b0887f 2765 // docTest_item['propName'] = 'Wait_Output_Settling'
whismanoid 25:9d4012b0887f 2766 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2767 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2768 // call-tinytester-function
whismanoid 25:9d4012b0887f 2769 // tinyTesterFuncName = "tinyTester.Wait_Output_Settling"
whismanoid 25:9d4012b0887f 2770 // docTest_argList = ""
whismanoid 25:9d4012b0887f 2771 tinyTester.Wait_Output_Settling(); //
whismanoid 30:13fc9d492ee0 2772 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2773 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2774 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2775 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2776
whismanoid 25:9d4012b0887f 2777 // @test group CODE_LOAD tinyTester.AnalogIn0_Read_Expect_voltageV(3.000000)
whismanoid 25:9d4012b0887f 2778 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2779 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2780 // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(3.000000)'
whismanoid 25:9d4012b0887f 2781 // docTest_item['arglist'] = '3.000000'
whismanoid 25:9d4012b0887f 2782 // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV'
whismanoid 25:9d4012b0887f 2783 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2784 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2785 // call-tinytester-function
whismanoid 25:9d4012b0887f 2786 // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV"
whismanoid 25:9d4012b0887f 2787 // docTest_argList = "3.000000"
whismanoid 25:9d4012b0887f 2788 tinyTester.AnalogIn0_Read_Expect_voltageV(3.000000); //
whismanoid 30:13fc9d492ee0 2789 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2790 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2791 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2792 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2793
whismanoid 27:485b1b2f334c 2794 // @test group CODE_LOAD tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0
whismanoid 27:485b1b2f334c 2795 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 27:485b1b2f334c 2796 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 27:485b1b2f334c 2797 // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()'
whismanoid 27:485b1b2f334c 2798 // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV'
whismanoid 27:485b1b2f334c 2799 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2800 if (SelfTestGroupEnable & 0x0004) {
whismanoid 27:485b1b2f334c 2801 // call-tinytester-function
whismanoid 27:485b1b2f334c 2802 // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV"
whismanoid 27:485b1b2f334c 2803 // docTest_argList = ""
whismanoid 27:485b1b2f334c 2804 tinyTester.AnalogIn1_Read_Report_voltageV(); //
whismanoid 30:13fc9d492ee0 2805 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2806 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2807 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 27:485b1b2f334c 2808 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 27:485b1b2f334c 2809
whismanoid 26:ec719cd9a579 2810 // @test group CODE_LOAD tinyTester.err_threshold = 0.250
whismanoid 26:ec719cd9a579 2811 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 26:ec719cd9a579 2812 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 26:ec719cd9a579 2813 // docTest_item['action'] = 'tinyTester.err_threshold = 0.250'
whismanoid 26:ec719cd9a579 2814 // docTest_item['propName'] = 'tinyTester.err_threshold'
whismanoid 26:ec719cd9a579 2815 // docTest_item['propValue'] = '0.250'
whismanoid 26:ec719cd9a579 2816 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2817 if (SelfTestGroupEnable & 0x0004) {
whismanoid 26:ec719cd9a579 2818 // assign-propname-value
whismanoid 26:ec719cd9a579 2819 // tinyTesterPropName = "tinyTester.err_threshold"
whismanoid 26:ec719cd9a579 2820 // tinyTesterPropValue = "0.250"
whismanoid 26:ec719cd9a579 2821 tinyTester.err_threshold = 0.250;
whismanoid 30:13fc9d492ee0 2822 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2823 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2824 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 26:ec719cd9a579 2825 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 26:ec719cd9a579 2826
whismanoid 25:9d4012b0887f 2827 // @test group CODE_LOAD tinyTester.print("0x0dac00 = 3.500V")
whismanoid 25:9d4012b0887f 2828 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 2829 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2830 // docTest_item['action'] = 'tinyTester.print("0x0dac00 = 3.500V")'
whismanoid 25:9d4012b0887f 2831 // docTest_item['arglist'] = '0x0dac00 = 3.500V'
whismanoid 25:9d4012b0887f 2832 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2833 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2834 // print-string
whismanoid 25:9d4012b0887f 2835 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 2836 // tinyTesterPrintStringLiteral = "0x0dac00 = 3.500V"
whismanoid 25:9d4012b0887f 2837 tinyTester.print("0x0dac00 = 3.500V");
whismanoid 30:13fc9d492ee0 2838 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2839 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2840 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2841 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2842
whismanoid 25:9d4012b0887f 2843 // @test group CODE_LOAD CODE_LOAD(0x0dac00) // 3.500V
whismanoid 25:9d4012b0887f 2844 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 2845 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2846 // docTest_item['action'] = 'CODE_LOAD(0x0dac00)'
whismanoid 25:9d4012b0887f 2847 // docTest_item['remarks'] = '3.500V'
whismanoid 25:9d4012b0887f 2848 // docTest_item['funcName'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2849 // docTest_item['arglist'] = '0x0dac00'
whismanoid 25:9d4012b0887f 2850 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD CODE_LOAD 3.500V
whismanoid 30:13fc9d492ee0 2851 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2852 // call-function
whismanoid 27:485b1b2f334c 2853 // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t'
whismanoid 25:9d4012b0887f 2854 // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x0dac00), (uint8_t)None); // 3.500V
whismanoid 25:9d4012b0887f 2855 // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x0dac00, /* empty expect: */ (uint8_t)None); // 3.500V
whismanoid 25:9d4012b0887f 2856 g_MAX5719_device.CODE_LOAD((uint32_t)0x0dac00); // 3.500V
whismanoid 30:13fc9d492ee0 2857 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2858 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2859 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2860 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2861
whismanoid 25:9d4012b0887f 2862 // @test group CODE_LOAD tinyTester.Wait_Output_Settling()
whismanoid 25:9d4012b0887f 2863 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2864 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2865 // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()'
whismanoid 25:9d4012b0887f 2866 // docTest_item['propName'] = 'Wait_Output_Settling'
whismanoid 25:9d4012b0887f 2867 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2868 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2869 // call-tinytester-function
whismanoid 25:9d4012b0887f 2870 // tinyTesterFuncName = "tinyTester.Wait_Output_Settling"
whismanoid 25:9d4012b0887f 2871 // docTest_argList = ""
whismanoid 25:9d4012b0887f 2872 tinyTester.Wait_Output_Settling(); //
whismanoid 30:13fc9d492ee0 2873 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2874 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2875 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2876 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2877
whismanoid 25:9d4012b0887f 2878 // @test group CODE_LOAD tinyTester.AnalogIn0_Read_Expect_voltageV(3.500000)
whismanoid 25:9d4012b0887f 2879 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2880 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2881 // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(3.500000)'
whismanoid 25:9d4012b0887f 2882 // docTest_item['arglist'] = '3.500000'
whismanoid 25:9d4012b0887f 2883 // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV'
whismanoid 25:9d4012b0887f 2884 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2885 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2886 // call-tinytester-function
whismanoid 25:9d4012b0887f 2887 // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV"
whismanoid 25:9d4012b0887f 2888 // docTest_argList = "3.500000"
whismanoid 25:9d4012b0887f 2889 tinyTester.AnalogIn0_Read_Expect_voltageV(3.500000); //
whismanoid 30:13fc9d492ee0 2890 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2891 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2892 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2893 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2894
whismanoid 27:485b1b2f334c 2895 // @test group CODE_LOAD tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0
whismanoid 27:485b1b2f334c 2896 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 27:485b1b2f334c 2897 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 27:485b1b2f334c 2898 // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()'
whismanoid 27:485b1b2f334c 2899 // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV'
whismanoid 27:485b1b2f334c 2900 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2901 if (SelfTestGroupEnable & 0x0004) {
whismanoid 27:485b1b2f334c 2902 // call-tinytester-function
whismanoid 27:485b1b2f334c 2903 // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV"
whismanoid 27:485b1b2f334c 2904 // docTest_argList = ""
whismanoid 27:485b1b2f334c 2905 tinyTester.AnalogIn1_Read_Report_voltageV(); //
whismanoid 30:13fc9d492ee0 2906 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2907 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2908 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 27:485b1b2f334c 2909 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 27:485b1b2f334c 2910
whismanoid 26:ec719cd9a579 2911 // @test group CODE_LOAD tinyTester.err_threshold = 0.500
whismanoid 26:ec719cd9a579 2912 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 26:ec719cd9a579 2913 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 26:ec719cd9a579 2914 // docTest_item['action'] = 'tinyTester.err_threshold = 0.500'
whismanoid 26:ec719cd9a579 2915 // docTest_item['propName'] = 'tinyTester.err_threshold'
whismanoid 26:ec719cd9a579 2916 // docTest_item['propValue'] = '0.500'
whismanoid 26:ec719cd9a579 2917 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2918 if (SelfTestGroupEnable & 0x0004) {
whismanoid 26:ec719cd9a579 2919 // assign-propname-value
whismanoid 26:ec719cd9a579 2920 // tinyTesterPropName = "tinyTester.err_threshold"
whismanoid 26:ec719cd9a579 2921 // tinyTesterPropValue = "0.500"
whismanoid 26:ec719cd9a579 2922 tinyTester.err_threshold = 0.500;
whismanoid 30:13fc9d492ee0 2923 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2924 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2925 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 26:ec719cd9a579 2926 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 26:ec719cd9a579 2927
whismanoid 25:9d4012b0887f 2928 // @test group CODE_LOAD tinyTester.print("0x0fa000 = 4.000V")
whismanoid 25:9d4012b0887f 2929 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 2930 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2931 // docTest_item['action'] = 'tinyTester.print("0x0fa000 = 4.000V")'
whismanoid 25:9d4012b0887f 2932 // docTest_item['arglist'] = '0x0fa000 = 4.000V'
whismanoid 25:9d4012b0887f 2933 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2934 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2935 // print-string
whismanoid 25:9d4012b0887f 2936 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 2937 // tinyTesterPrintStringLiteral = "0x0fa000 = 4.000V"
whismanoid 25:9d4012b0887f 2938 tinyTester.print("0x0fa000 = 4.000V");
whismanoid 30:13fc9d492ee0 2939 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2940 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2941 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2942 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2943
whismanoid 25:9d4012b0887f 2944 // @test group CODE_LOAD CODE_LOAD(0x0fa000) // 4.000V
whismanoid 25:9d4012b0887f 2945 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 2946 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2947 // docTest_item['action'] = 'CODE_LOAD(0x0fa000)'
whismanoid 25:9d4012b0887f 2948 // docTest_item['remarks'] = '4.000V'
whismanoid 25:9d4012b0887f 2949 // docTest_item['funcName'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2950 // docTest_item['arglist'] = '0x0fa000'
whismanoid 25:9d4012b0887f 2951 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD CODE_LOAD 4.000V
whismanoid 30:13fc9d492ee0 2952 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2953 // call-function
whismanoid 27:485b1b2f334c 2954 // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t'
whismanoid 25:9d4012b0887f 2955 // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x0fa000), (uint8_t)None); // 4.000V
whismanoid 25:9d4012b0887f 2956 // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x0fa000, /* empty expect: */ (uint8_t)None); // 4.000V
whismanoid 25:9d4012b0887f 2957 g_MAX5719_device.CODE_LOAD((uint32_t)0x0fa000); // 4.000V
whismanoid 30:13fc9d492ee0 2958 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2959 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2960 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2961 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2962
whismanoid 25:9d4012b0887f 2963 // @test group CODE_LOAD tinyTester.Wait_Output_Settling()
whismanoid 25:9d4012b0887f 2964 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2965 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2966 // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()'
whismanoid 25:9d4012b0887f 2967 // docTest_item['propName'] = 'Wait_Output_Settling'
whismanoid 25:9d4012b0887f 2968 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2969 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2970 // call-tinytester-function
whismanoid 25:9d4012b0887f 2971 // tinyTesterFuncName = "tinyTester.Wait_Output_Settling"
whismanoid 25:9d4012b0887f 2972 // docTest_argList = ""
whismanoid 25:9d4012b0887f 2973 tinyTester.Wait_Output_Settling(); //
whismanoid 30:13fc9d492ee0 2974 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2975 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2976 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2977 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2978
whismanoid 25:9d4012b0887f 2979 // @test group CODE_LOAD tinyTester.AnalogIn0_Read_Expect_voltageV(4.000000)
whismanoid 25:9d4012b0887f 2980 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2981 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2982 // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(4.000000)'
whismanoid 25:9d4012b0887f 2983 // docTest_item['arglist'] = '4.000000'
whismanoid 25:9d4012b0887f 2984 // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV'
whismanoid 25:9d4012b0887f 2985 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2986 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2987 // call-tinytester-function
whismanoid 25:9d4012b0887f 2988 // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV"
whismanoid 25:9d4012b0887f 2989 // docTest_argList = "4.000000"
whismanoid 25:9d4012b0887f 2990 tinyTester.AnalogIn0_Read_Expect_voltageV(4.000000); //
whismanoid 30:13fc9d492ee0 2991 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2992 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2993 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2994 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2995
whismanoid 27:485b1b2f334c 2996 // @test group CODE_LOAD tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0
whismanoid 27:485b1b2f334c 2997 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 27:485b1b2f334c 2998 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 27:485b1b2f334c 2999 // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()'
whismanoid 27:485b1b2f334c 3000 // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV'
whismanoid 27:485b1b2f334c 3001 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 3002 if (SelfTestGroupEnable & 0x0004) {
whismanoid 27:485b1b2f334c 3003 // call-tinytester-function
whismanoid 27:485b1b2f334c 3004 // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV"
whismanoid 27:485b1b2f334c 3005 // docTest_argList = ""
whismanoid 27:485b1b2f334c 3006 tinyTester.AnalogIn1_Read_Report_voltageV(); //
whismanoid 30:13fc9d492ee0 3007 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3008 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 3009 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 27:485b1b2f334c 3010 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 27:485b1b2f334c 3011
whismanoid 26:ec719cd9a579 3012 // @test group CODE_LOAD tinyTester.err_threshold = 0.750
whismanoid 26:ec719cd9a579 3013 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 26:ec719cd9a579 3014 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 26:ec719cd9a579 3015 // docTest_item['action'] = 'tinyTester.err_threshold = 0.750'
whismanoid 26:ec719cd9a579 3016 // docTest_item['propName'] = 'tinyTester.err_threshold'
whismanoid 26:ec719cd9a579 3017 // docTest_item['propValue'] = '0.750'
whismanoid 26:ec719cd9a579 3018 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 3019 if (SelfTestGroupEnable & 0x0004) {
whismanoid 26:ec719cd9a579 3020 // assign-propname-value
whismanoid 26:ec719cd9a579 3021 // tinyTesterPropName = "tinyTester.err_threshold"
whismanoid 26:ec719cd9a579 3022 // tinyTesterPropValue = "0.750"
whismanoid 26:ec719cd9a579 3023 tinyTester.err_threshold = 0.750;
whismanoid 30:13fc9d492ee0 3024 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3025 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 3026 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 26:ec719cd9a579 3027 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 26:ec719cd9a579 3028
whismanoid 25:9d4012b0887f 3029 // @test group CODE_LOAD tinyTester.print("0x0fffff = 4.095V")
whismanoid 25:9d4012b0887f 3030 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 3031 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 3032 // docTest_item['action'] = 'tinyTester.print("0x0fffff = 4.095V")'
whismanoid 25:9d4012b0887f 3033 // docTest_item['arglist'] = '0x0fffff = 4.095V'
whismanoid 25:9d4012b0887f 3034 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 3035 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 3036 // print-string
whismanoid 25:9d4012b0887f 3037 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 3038 // tinyTesterPrintStringLiteral = "0x0fffff = 4.095V"
whismanoid 25:9d4012b0887f 3039 tinyTester.print("0x0fffff = 4.095V");
whismanoid 30:13fc9d492ee0 3040 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3041 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 3042 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 3043 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 3044
whismanoid 25:9d4012b0887f 3045 // @test group CODE_LOAD CODE_LOAD(0x0fffff) // 4.095V
whismanoid 25:9d4012b0887f 3046 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 3047 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 3048 // docTest_item['action'] = 'CODE_LOAD(0x0fffff)'
whismanoid 25:9d4012b0887f 3049 // docTest_item['remarks'] = '4.095V'
whismanoid 25:9d4012b0887f 3050 // docTest_item['funcName'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 3051 // docTest_item['arglist'] = '0x0fffff'
whismanoid 25:9d4012b0887f 3052 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD CODE_LOAD 4.095V
whismanoid 30:13fc9d492ee0 3053 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 3054 // call-function
whismanoid 27:485b1b2f334c 3055 // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t'
whismanoid 25:9d4012b0887f 3056 // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x0fffff), (uint8_t)None); // 4.095V
whismanoid 25:9d4012b0887f 3057 // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x0fffff, /* empty expect: */ (uint8_t)None); // 4.095V
whismanoid 25:9d4012b0887f 3058 g_MAX5719_device.CODE_LOAD((uint32_t)0x0fffff); // 4.095V
whismanoid 30:13fc9d492ee0 3059 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3060 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 3061 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 3062 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 3063
whismanoid 25:9d4012b0887f 3064 // @test group CODE_LOAD tinyTester.Wait_Output_Settling()
whismanoid 25:9d4012b0887f 3065 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 3066 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 3067 // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()'
whismanoid 25:9d4012b0887f 3068 // docTest_item['propName'] = 'Wait_Output_Settling'
whismanoid 25:9d4012b0887f 3069 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 3070 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 3071 // call-tinytester-function
whismanoid 25:9d4012b0887f 3072 // tinyTesterFuncName = "tinyTester.Wait_Output_Settling"
whismanoid 25:9d4012b0887f 3073 // docTest_argList = ""
whismanoid 25:9d4012b0887f 3074 tinyTester.Wait_Output_Settling(); //
whismanoid 30:13fc9d492ee0 3075 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3076 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 3077 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 3078 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 3079
whismanoid 25:9d4012b0887f 3080 // @test group CODE_LOAD tinyTester.AnalogIn0_Read_Expect_voltageV(4.095000)
whismanoid 25:9d4012b0887f 3081 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 3082 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 3083 // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(4.095000)'
whismanoid 25:9d4012b0887f 3084 // docTest_item['arglist'] = '4.095000'
whismanoid 25:9d4012b0887f 3085 // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV'
whismanoid 25:9d4012b0887f 3086 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 3087 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 3088 // call-tinytester-function
whismanoid 25:9d4012b0887f 3089 // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV"
whismanoid 25:9d4012b0887f 3090 // docTest_argList = "4.095000"
whismanoid 25:9d4012b0887f 3091 tinyTester.AnalogIn0_Read_Expect_voltageV(4.095000); //
whismanoid 30:13fc9d492ee0 3092 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3093 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 3094 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 3095 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 3096
whismanoid 27:485b1b2f334c 3097 // @test group CODE_LOAD tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0
whismanoid 27:485b1b2f334c 3098 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 27:485b1b2f334c 3099 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 27:485b1b2f334c 3100 // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()'
whismanoid 27:485b1b2f334c 3101 // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV'
whismanoid 27:485b1b2f334c 3102 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 3103 if (SelfTestGroupEnable & 0x0004) {
whismanoid 27:485b1b2f334c 3104 // call-tinytester-function
whismanoid 27:485b1b2f334c 3105 // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV"
whismanoid 27:485b1b2f334c 3106 // docTest_argList = ""
whismanoid 27:485b1b2f334c 3107 tinyTester.AnalogIn1_Read_Report_voltageV(); //
whismanoid 30:13fc9d492ee0 3108 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3109 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 3110 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 27:485b1b2f334c 3111 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 27:485b1b2f334c 3112
whismanoid 26:ec719cd9a579 3113 // @test group CODE_LOAD tinyTester.err_threshold = 0.200
whismanoid 26:ec719cd9a579 3114 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 26:ec719cd9a579 3115 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 26:ec719cd9a579 3116 // docTest_item['action'] = 'tinyTester.err_threshold = 0.200'
whismanoid 26:ec719cd9a579 3117 // docTest_item['propName'] = 'tinyTester.err_threshold'
whismanoid 26:ec719cd9a579 3118 // docTest_item['propValue'] = '0.200'
whismanoid 26:ec719cd9a579 3119 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 3120 if (SelfTestGroupEnable & 0x0004) {
whismanoid 26:ec719cd9a579 3121 // assign-propname-value
whismanoid 26:ec719cd9a579 3122 // tinyTesterPropName = "tinyTester.err_threshold"
whismanoid 26:ec719cd9a579 3123 // tinyTesterPropValue = "0.200"
whismanoid 26:ec719cd9a579 3124 tinyTester.err_threshold = 0.200;
whismanoid 30:13fc9d492ee0 3125 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3126 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 3127 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 26:ec719cd9a579 3128 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 26:ec719cd9a579 3129
whismanoid 25:9d4012b0887f 3130 // @test group CODE_LOAD tinyTester.print("0x080000 // 2.048V")
whismanoid 25:9d4012b0887f 3131 // @test group CODE_LOAD CODE_LOAD(0x080000) // 2.048V
whismanoid 25:9d4012b0887f 3132 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 3133 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 3134 // docTest_item['action'] = 'CODE_LOAD(0x080000)'
whismanoid 25:9d4012b0887f 3135 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 3136 // docTest_item['funcName'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 3137 // docTest_item['arglist'] = '0x080000'
whismanoid 25:9d4012b0887f 3138 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD CODE_LOAD 2.048V
whismanoid 30:13fc9d492ee0 3139 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 3140 // call-function
whismanoid 27:485b1b2f334c 3141 // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t'
whismanoid 25:9d4012b0887f 3142 // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x080000), (uint8_t)None); // 2.048V
whismanoid 25:9d4012b0887f 3143 // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x080000, /* empty expect: */ (uint8_t)None); // 2.048V
whismanoid 25:9d4012b0887f 3144 g_MAX5719_device.CODE_LOAD((uint32_t)0x080000); // 2.048V
whismanoid 30:13fc9d492ee0 3145 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3146 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 3147 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 3148 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 3149
whismanoid 25:9d4012b0887f 3150 // @test group CODE_LOAD tinyTester.Wait_Output_Settling()
whismanoid 25:9d4012b0887f 3151 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 3152 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 3153 // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()'
whismanoid 25:9d4012b0887f 3154 // docTest_item['propName'] = 'Wait_Output_Settling'
whismanoid 25:9d4012b0887f 3155 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 3156 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 3157 // call-tinytester-function
whismanoid 25:9d4012b0887f 3158 // tinyTesterFuncName = "tinyTester.Wait_Output_Settling"
whismanoid 25:9d4012b0887f 3159 // docTest_argList = ""
whismanoid 25:9d4012b0887f 3160 tinyTester.Wait_Output_Settling(); //
whismanoid 30:13fc9d492ee0 3161 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3162 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 3163 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 3164 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 3165
whismanoid 25:9d4012b0887f 3166 // @test group CODE_LOAD tinyTester.AnalogIn0_Read_Expect_voltageV(2.048000)
whismanoid 25:9d4012b0887f 3167 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 3168 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 3169 // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(2.048000)'
whismanoid 25:9d4012b0887f 3170 // docTest_item['arglist'] = '2.048000'
whismanoid 25:9d4012b0887f 3171 // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV'
whismanoid 25:9d4012b0887f 3172 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 3173 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 3174 // call-tinytester-function
whismanoid 25:9d4012b0887f 3175 // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV"
whismanoid 25:9d4012b0887f 3176 // docTest_argList = "2.048000"
whismanoid 25:9d4012b0887f 3177 tinyTester.AnalogIn0_Read_Expect_voltageV(2.048000); //
whismanoid 30:13fc9d492ee0 3178 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3179 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 3180 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 3181 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 3182
whismanoid 27:485b1b2f334c 3183 // @test group CODE_LOAD tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0
whismanoid 27:485b1b2f334c 3184 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 27:485b1b2f334c 3185 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 27:485b1b2f334c 3186 // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()'
whismanoid 27:485b1b2f334c 3187 // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV'
whismanoid 27:485b1b2f334c 3188 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 3189 if (SelfTestGroupEnable & 0x0004) {
whismanoid 27:485b1b2f334c 3190 // call-tinytester-function
whismanoid 27:485b1b2f334c 3191 // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV"
whismanoid 27:485b1b2f334c 3192 // docTest_argList = ""
whismanoid 27:485b1b2f334c 3193 tinyTester.AnalogIn1_Read_Report_voltageV(); //
whismanoid 30:13fc9d492ee0 3194 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3195 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 3196 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 27:485b1b2f334c 3197 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 27:485b1b2f334c 3198
whismanoid 33:2c675744a01b 3199 // @test group CODE_LOAD_2V5 // Verify function CODE_LOAD vs platform AIN0 analog input (enabled by default) (no run on button)
whismanoid 33:2c675744a01b 3200 // @test group CODE_LOAD_2V5 tinyTester.err_threshold = 0.150
whismanoid 33:2c675744a01b 3201 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 33:2c675744a01b 3202 // docTest_item['group-id-value'] = 'CODE_LOAD_2V5'
whismanoid 33:2c675744a01b 3203 // docTest_item['action'] = 'tinyTester.err_threshold = 0.150'
whismanoid 33:2c675744a01b 3204 // docTest_item['propName'] = 'tinyTester.err_threshold'
whismanoid 33:2c675744a01b 3205 // docTest_item['propValue'] = '0.150'
whismanoid 33:2c675744a01b 3206 #if MAX5719_SELFTEST_CODE_LOAD_2V5 // group CODE_LOAD_2V5 None
whismanoid 33:2c675744a01b 3207 if (SelfTestGroupEnable & 0x0008) {
whismanoid 33:2c675744a01b 3208 // assign-propname-value
whismanoid 33:2c675744a01b 3209 // tinyTesterPropName = "tinyTester.err_threshold"
whismanoid 33:2c675744a01b 3210 // tinyTesterPropValue = "0.150"
whismanoid 33:2c675744a01b 3211 tinyTester.err_threshold = 0.150;
whismanoid 33:2c675744a01b 3212 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3213 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3214 } // if (SelfTestGroupEnable & 0x0008)
whismanoid 33:2c675744a01b 3215 #endif // MAX5719_SELFTEST_CODE_LOAD_2V5 // group CODE_LOAD_2V5
whismanoid 33:2c675744a01b 3216
whismanoid 33:2c675744a01b 3217 // @test group CODE_LOAD_2V5 tinyTester.print("0x09c400 = 2.500V")
whismanoid 33:2c675744a01b 3218 // docTest_item['actionType'] = 'print-string'
whismanoid 33:2c675744a01b 3219 // docTest_item['group-id-value'] = 'CODE_LOAD_2V5'
whismanoid 33:2c675744a01b 3220 // docTest_item['action'] = 'tinyTester.print("0x09c400 = 2.500V")'
whismanoid 33:2c675744a01b 3221 // docTest_item['arglist'] = '0x09c400 = 2.500V'
whismanoid 33:2c675744a01b 3222 #if MAX5719_SELFTEST_CODE_LOAD_2V5 // group CODE_LOAD_2V5 None
whismanoid 33:2c675744a01b 3223 if (SelfTestGroupEnable & 0x0008) {
whismanoid 33:2c675744a01b 3224 // print-string
whismanoid 33:2c675744a01b 3225 // tinyTesterFuncName = "tinyTester.print"
whismanoid 33:2c675744a01b 3226 // tinyTesterPrintStringLiteral = "0x09c400 = 2.500V"
whismanoid 33:2c675744a01b 3227 tinyTester.print("0x09c400 = 2.500V");
whismanoid 33:2c675744a01b 3228 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3229 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3230 } // if (SelfTestGroupEnable & 0x0008)
whismanoid 33:2c675744a01b 3231 #endif // MAX5719_SELFTEST_CODE_LOAD_2V5 // group CODE_LOAD_2V5
whismanoid 33:2c675744a01b 3232
whismanoid 33:2c675744a01b 3233 // @test group CODE_LOAD_2V5 CODE_LOAD(0x09c400) // 2.500V
whismanoid 33:2c675744a01b 3234 // docTest_item['actionType'] = 'call-function'
whismanoid 33:2c675744a01b 3235 // docTest_item['group-id-value'] = 'CODE_LOAD_2V5'
whismanoid 33:2c675744a01b 3236 // docTest_item['action'] = 'CODE_LOAD(0x09c400)'
whismanoid 33:2c675744a01b 3237 // docTest_item['remarks'] = '2.500V'
whismanoid 33:2c675744a01b 3238 // docTest_item['funcName'] = 'CODE_LOAD'
whismanoid 33:2c675744a01b 3239 // docTest_item['arglist'] = '0x09c400'
whismanoid 33:2c675744a01b 3240 #if MAX5719_SELFTEST_CODE_LOAD_2V5 // group CODE_LOAD_2V5 CODE_LOAD 2.500V
whismanoid 33:2c675744a01b 3241 if (SelfTestGroupEnable & 0x0008) {
whismanoid 33:2c675744a01b 3242 // call-function
whismanoid 33:2c675744a01b 3243 // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t'
whismanoid 33:2c675744a01b 3244 // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x09c400), (uint8_t)None); // 2.500V
whismanoid 33:2c675744a01b 3245 // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x09c400, /* empty expect: */ (uint8_t)None); // 2.500V
whismanoid 33:2c675744a01b 3246 g_MAX5719_device.CODE_LOAD((uint32_t)0x09c400); // 2.500V
whismanoid 33:2c675744a01b 3247 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3248 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3249 } // if (SelfTestGroupEnable & 0x0008)
whismanoid 33:2c675744a01b 3250 #endif // MAX5719_SELFTEST_CODE_LOAD_2V5 // group CODE_LOAD_2V5
whismanoid 33:2c675744a01b 3251
whismanoid 33:2c675744a01b 3252 // @test group CODE_LOAD_2V5 tinyTester.Wait_Output_Settling()
whismanoid 33:2c675744a01b 3253 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 33:2c675744a01b 3254 // docTest_item['group-id-value'] = 'CODE_LOAD_2V5'
whismanoid 33:2c675744a01b 3255 // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()'
whismanoid 33:2c675744a01b 3256 // docTest_item['propName'] = 'Wait_Output_Settling'
whismanoid 33:2c675744a01b 3257 #if MAX5719_SELFTEST_CODE_LOAD_2V5 // group CODE_LOAD_2V5 None
whismanoid 33:2c675744a01b 3258 if (SelfTestGroupEnable & 0x0008) {
whismanoid 33:2c675744a01b 3259 // call-tinytester-function
whismanoid 33:2c675744a01b 3260 // tinyTesterFuncName = "tinyTester.Wait_Output_Settling"
whismanoid 33:2c675744a01b 3261 // docTest_argList = ""
whismanoid 33:2c675744a01b 3262 tinyTester.Wait_Output_Settling(); //
whismanoid 33:2c675744a01b 3263 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3264 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3265 } // if (SelfTestGroupEnable & 0x0008)
whismanoid 33:2c675744a01b 3266 #endif // MAX5719_SELFTEST_CODE_LOAD_2V5 // group CODE_LOAD_2V5
whismanoid 33:2c675744a01b 3267
whismanoid 33:2c675744a01b 3268 // @test group CODE_LOAD_2V5 tinyTester.AnalogIn0_Read_Expect_voltageV(2.500000)
whismanoid 33:2c675744a01b 3269 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 33:2c675744a01b 3270 // docTest_item['group-id-value'] = 'CODE_LOAD_2V5'
whismanoid 33:2c675744a01b 3271 // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(2.500000)'
whismanoid 33:2c675744a01b 3272 // docTest_item['arglist'] = '2.500000'
whismanoid 33:2c675744a01b 3273 // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV'
whismanoid 33:2c675744a01b 3274 #if MAX5719_SELFTEST_CODE_LOAD_2V5 // group CODE_LOAD_2V5 None
whismanoid 33:2c675744a01b 3275 if (SelfTestGroupEnable & 0x0008) {
whismanoid 33:2c675744a01b 3276 // call-tinytester-function
whismanoid 33:2c675744a01b 3277 // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV"
whismanoid 33:2c675744a01b 3278 // docTest_argList = "2.500000"
whismanoid 33:2c675744a01b 3279 tinyTester.AnalogIn0_Read_Expect_voltageV(2.500000); //
whismanoid 33:2c675744a01b 3280 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3281 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3282 } // if (SelfTestGroupEnable & 0x0008)
whismanoid 33:2c675744a01b 3283 #endif // MAX5719_SELFTEST_CODE_LOAD_2V5 // group CODE_LOAD_2V5
whismanoid 33:2c675744a01b 3284
whismanoid 33:2c675744a01b 3285 // @test group CODE_LOAD_2V5 tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0
whismanoid 33:2c675744a01b 3286 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 33:2c675744a01b 3287 // docTest_item['group-id-value'] = 'CODE_LOAD_2V5'
whismanoid 33:2c675744a01b 3288 // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()'
whismanoid 33:2c675744a01b 3289 // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV'
whismanoid 33:2c675744a01b 3290 #if MAX5719_SELFTEST_CODE_LOAD_2V5 // group CODE_LOAD_2V5 None
whismanoid 33:2c675744a01b 3291 if (SelfTestGroupEnable & 0x0008) {
whismanoid 33:2c675744a01b 3292 // call-tinytester-function
whismanoid 33:2c675744a01b 3293 // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV"
whismanoid 33:2c675744a01b 3294 // docTest_argList = ""
whismanoid 33:2c675744a01b 3295 tinyTester.AnalogIn1_Read_Report_voltageV(); //
whismanoid 33:2c675744a01b 3296 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3297 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3298 } // if (SelfTestGroupEnable & 0x0008)
whismanoid 33:2c675744a01b 3299 #endif // MAX5719_SELFTEST_CODE_LOAD_2V5 // group CODE_LOAD_2V5
whismanoid 33:2c675744a01b 3300
whismanoid 33:2c675744a01b 3301 // @test group CODE_LOAD_3V0 // Verify function CODE_LOAD vs platform AIN0 analog input (enabled by default) (no run on button)
whismanoid 33:2c675744a01b 3302 // @test group CODE_LOAD_3V0 tinyTester.err_threshold = 0.200
whismanoid 33:2c675744a01b 3303 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 33:2c675744a01b 3304 // docTest_item['group-id-value'] = 'CODE_LOAD_3V0'
whismanoid 33:2c675744a01b 3305 // docTest_item['action'] = 'tinyTester.err_threshold = 0.200'
whismanoid 33:2c675744a01b 3306 // docTest_item['propName'] = 'tinyTester.err_threshold'
whismanoid 33:2c675744a01b 3307 // docTest_item['propValue'] = '0.200'
whismanoid 33:2c675744a01b 3308 #if MAX5719_SELFTEST_CODE_LOAD_3V0 // group CODE_LOAD_3V0 None
whismanoid 33:2c675744a01b 3309 if (SelfTestGroupEnable & 0x0010) {
whismanoid 33:2c675744a01b 3310 // assign-propname-value
whismanoid 33:2c675744a01b 3311 // tinyTesterPropName = "tinyTester.err_threshold"
whismanoid 33:2c675744a01b 3312 // tinyTesterPropValue = "0.200"
whismanoid 33:2c675744a01b 3313 tinyTester.err_threshold = 0.200;
whismanoid 33:2c675744a01b 3314 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3315 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3316 } // if (SelfTestGroupEnable & 0x0010)
whismanoid 33:2c675744a01b 3317 #endif // MAX5719_SELFTEST_CODE_LOAD_3V0 // group CODE_LOAD_3V0
whismanoid 33:2c675744a01b 3318
whismanoid 33:2c675744a01b 3319 // @test group CODE_LOAD_3V0 tinyTester.print("0x0bb800 = 3.000V")
whismanoid 33:2c675744a01b 3320 // docTest_item['actionType'] = 'print-string'
whismanoid 33:2c675744a01b 3321 // docTest_item['group-id-value'] = 'CODE_LOAD_3V0'
whismanoid 33:2c675744a01b 3322 // docTest_item['action'] = 'tinyTester.print("0x0bb800 = 3.000V")'
whismanoid 33:2c675744a01b 3323 // docTest_item['arglist'] = '0x0bb800 = 3.000V'
whismanoid 33:2c675744a01b 3324 #if MAX5719_SELFTEST_CODE_LOAD_3V0 // group CODE_LOAD_3V0 None
whismanoid 33:2c675744a01b 3325 if (SelfTestGroupEnable & 0x0010) {
whismanoid 33:2c675744a01b 3326 // print-string
whismanoid 33:2c675744a01b 3327 // tinyTesterFuncName = "tinyTester.print"
whismanoid 33:2c675744a01b 3328 // tinyTesterPrintStringLiteral = "0x0bb800 = 3.000V"
whismanoid 33:2c675744a01b 3329 tinyTester.print("0x0bb800 = 3.000V");
whismanoid 33:2c675744a01b 3330 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3331 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3332 } // if (SelfTestGroupEnable & 0x0010)
whismanoid 33:2c675744a01b 3333 #endif // MAX5719_SELFTEST_CODE_LOAD_3V0 // group CODE_LOAD_3V0
whismanoid 33:2c675744a01b 3334
whismanoid 33:2c675744a01b 3335 // @test group CODE_LOAD_3V0 CODE_LOAD(0x0bb800) // 3.000V
whismanoid 33:2c675744a01b 3336 // docTest_item['actionType'] = 'call-function'
whismanoid 33:2c675744a01b 3337 // docTest_item['group-id-value'] = 'CODE_LOAD_3V0'
whismanoid 33:2c675744a01b 3338 // docTest_item['action'] = 'CODE_LOAD(0x0bb800)'
whismanoid 33:2c675744a01b 3339 // docTest_item['remarks'] = '3.000V'
whismanoid 33:2c675744a01b 3340 // docTest_item['funcName'] = 'CODE_LOAD'
whismanoid 33:2c675744a01b 3341 // docTest_item['arglist'] = '0x0bb800'
whismanoid 33:2c675744a01b 3342 #if MAX5719_SELFTEST_CODE_LOAD_3V0 // group CODE_LOAD_3V0 CODE_LOAD 3.000V
whismanoid 33:2c675744a01b 3343 if (SelfTestGroupEnable & 0x0010) {
whismanoid 33:2c675744a01b 3344 // call-function
whismanoid 33:2c675744a01b 3345 // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t'
whismanoid 33:2c675744a01b 3346 // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x0bb800), (uint8_t)None); // 3.000V
whismanoid 33:2c675744a01b 3347 // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x0bb800, /* empty expect: */ (uint8_t)None); // 3.000V
whismanoid 33:2c675744a01b 3348 g_MAX5719_device.CODE_LOAD((uint32_t)0x0bb800); // 3.000V
whismanoid 33:2c675744a01b 3349 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3350 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3351 } // if (SelfTestGroupEnable & 0x0010)
whismanoid 33:2c675744a01b 3352 #endif // MAX5719_SELFTEST_CODE_LOAD_3V0 // group CODE_LOAD_3V0
whismanoid 33:2c675744a01b 3353
whismanoid 33:2c675744a01b 3354 // @test group CODE_LOAD_3V0 tinyTester.Wait_Output_Settling()
whismanoid 33:2c675744a01b 3355 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 33:2c675744a01b 3356 // docTest_item['group-id-value'] = 'CODE_LOAD_3V0'
whismanoid 33:2c675744a01b 3357 // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()'
whismanoid 33:2c675744a01b 3358 // docTest_item['propName'] = 'Wait_Output_Settling'
whismanoid 33:2c675744a01b 3359 #if MAX5719_SELFTEST_CODE_LOAD_3V0 // group CODE_LOAD_3V0 None
whismanoid 33:2c675744a01b 3360 if (SelfTestGroupEnable & 0x0010) {
whismanoid 33:2c675744a01b 3361 // call-tinytester-function
whismanoid 33:2c675744a01b 3362 // tinyTesterFuncName = "tinyTester.Wait_Output_Settling"
whismanoid 33:2c675744a01b 3363 // docTest_argList = ""
whismanoid 33:2c675744a01b 3364 tinyTester.Wait_Output_Settling(); //
whismanoid 33:2c675744a01b 3365 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3366 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3367 } // if (SelfTestGroupEnable & 0x0010)
whismanoid 33:2c675744a01b 3368 #endif // MAX5719_SELFTEST_CODE_LOAD_3V0 // group CODE_LOAD_3V0
whismanoid 33:2c675744a01b 3369
whismanoid 33:2c675744a01b 3370 // @test group CODE_LOAD_3V0 tinyTester.AnalogIn0_Read_Expect_voltageV(3.000000)
whismanoid 33:2c675744a01b 3371 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 33:2c675744a01b 3372 // docTest_item['group-id-value'] = 'CODE_LOAD_3V0'
whismanoid 33:2c675744a01b 3373 // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(3.000000)'
whismanoid 33:2c675744a01b 3374 // docTest_item['arglist'] = '3.000000'
whismanoid 33:2c675744a01b 3375 // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV'
whismanoid 33:2c675744a01b 3376 #if MAX5719_SELFTEST_CODE_LOAD_3V0 // group CODE_LOAD_3V0 None
whismanoid 33:2c675744a01b 3377 if (SelfTestGroupEnable & 0x0010) {
whismanoid 33:2c675744a01b 3378 // call-tinytester-function
whismanoid 33:2c675744a01b 3379 // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV"
whismanoid 33:2c675744a01b 3380 // docTest_argList = "3.000000"
whismanoid 33:2c675744a01b 3381 tinyTester.AnalogIn0_Read_Expect_voltageV(3.000000); //
whismanoid 33:2c675744a01b 3382 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3383 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3384 } // if (SelfTestGroupEnable & 0x0010)
whismanoid 33:2c675744a01b 3385 #endif // MAX5719_SELFTEST_CODE_LOAD_3V0 // group CODE_LOAD_3V0
whismanoid 33:2c675744a01b 3386
whismanoid 33:2c675744a01b 3387 // @test group CODE_LOAD_3V0 tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0
whismanoid 33:2c675744a01b 3388 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 33:2c675744a01b 3389 // docTest_item['group-id-value'] = 'CODE_LOAD_3V0'
whismanoid 33:2c675744a01b 3390 // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()'
whismanoid 33:2c675744a01b 3391 // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV'
whismanoid 33:2c675744a01b 3392 #if MAX5719_SELFTEST_CODE_LOAD_3V0 // group CODE_LOAD_3V0 None
whismanoid 33:2c675744a01b 3393 if (SelfTestGroupEnable & 0x0010) {
whismanoid 33:2c675744a01b 3394 // call-tinytester-function
whismanoid 33:2c675744a01b 3395 // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV"
whismanoid 33:2c675744a01b 3396 // docTest_argList = ""
whismanoid 33:2c675744a01b 3397 tinyTester.AnalogIn1_Read_Report_voltageV(); //
whismanoid 33:2c675744a01b 3398 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3399 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3400 } // if (SelfTestGroupEnable & 0x0010)
whismanoid 33:2c675744a01b 3401 #endif // MAX5719_SELFTEST_CODE_LOAD_3V0 // group CODE_LOAD_3V0
whismanoid 33:2c675744a01b 3402
whismanoid 33:2c675744a01b 3403 // @test group CODE_LOAD_4V1 // Verify function CODE_LOAD vs platform AIN0 analog input (enabled by default) (no run on button)
whismanoid 33:2c675744a01b 3404 // @test group CODE_LOAD_4V1 tinyTester.err_threshold = 0.750
whismanoid 33:2c675744a01b 3405 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 33:2c675744a01b 3406 // docTest_item['group-id-value'] = 'CODE_LOAD_4V1'
whismanoid 33:2c675744a01b 3407 // docTest_item['action'] = 'tinyTester.err_threshold = 0.750'
whismanoid 33:2c675744a01b 3408 // docTest_item['propName'] = 'tinyTester.err_threshold'
whismanoid 33:2c675744a01b 3409 // docTest_item['propValue'] = '0.750'
whismanoid 33:2c675744a01b 3410 #if MAX5719_SELFTEST_CODE_LOAD_4V1 // group CODE_LOAD_4V1 None
whismanoid 33:2c675744a01b 3411 if (SelfTestGroupEnable & 0x0020) {
whismanoid 33:2c675744a01b 3412 // assign-propname-value
whismanoid 33:2c675744a01b 3413 // tinyTesterPropName = "tinyTester.err_threshold"
whismanoid 33:2c675744a01b 3414 // tinyTesterPropValue = "0.750"
whismanoid 33:2c675744a01b 3415 tinyTester.err_threshold = 0.750;
whismanoid 33:2c675744a01b 3416 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3417 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3418 } // if (SelfTestGroupEnable & 0x0020)
whismanoid 33:2c675744a01b 3419 #endif // MAX5719_SELFTEST_CODE_LOAD_4V1 // group CODE_LOAD_4V1
whismanoid 33:2c675744a01b 3420
whismanoid 33:2c675744a01b 3421 // @test group CODE_LOAD_4V1 tinyTester.print("0x0fffff = 4.095V")
whismanoid 33:2c675744a01b 3422 // docTest_item['actionType'] = 'print-string'
whismanoid 33:2c675744a01b 3423 // docTest_item['group-id-value'] = 'CODE_LOAD_4V1'
whismanoid 33:2c675744a01b 3424 // docTest_item['action'] = 'tinyTester.print("0x0fffff = 4.095V")'
whismanoid 33:2c675744a01b 3425 // docTest_item['arglist'] = '0x0fffff = 4.095V'
whismanoid 33:2c675744a01b 3426 #if MAX5719_SELFTEST_CODE_LOAD_4V1 // group CODE_LOAD_4V1 None
whismanoid 33:2c675744a01b 3427 if (SelfTestGroupEnable & 0x0020) {
whismanoid 33:2c675744a01b 3428 // print-string
whismanoid 33:2c675744a01b 3429 // tinyTesterFuncName = "tinyTester.print"
whismanoid 33:2c675744a01b 3430 // tinyTesterPrintStringLiteral = "0x0fffff = 4.095V"
whismanoid 33:2c675744a01b 3431 tinyTester.print("0x0fffff = 4.095V");
whismanoid 33:2c675744a01b 3432 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3433 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3434 } // if (SelfTestGroupEnable & 0x0020)
whismanoid 33:2c675744a01b 3435 #endif // MAX5719_SELFTEST_CODE_LOAD_4V1 // group CODE_LOAD_4V1
whismanoid 33:2c675744a01b 3436
whismanoid 33:2c675744a01b 3437 // @test group CODE_LOAD_4V1 CODE_LOAD(0x0fffff) // 4.095V
whismanoid 33:2c675744a01b 3438 // docTest_item['actionType'] = 'call-function'
whismanoid 33:2c675744a01b 3439 // docTest_item['group-id-value'] = 'CODE_LOAD_4V1'
whismanoid 33:2c675744a01b 3440 // docTest_item['action'] = 'CODE_LOAD(0x0fffff)'
whismanoid 33:2c675744a01b 3441 // docTest_item['remarks'] = '4.095V'
whismanoid 33:2c675744a01b 3442 // docTest_item['funcName'] = 'CODE_LOAD'
whismanoid 33:2c675744a01b 3443 // docTest_item['arglist'] = '0x0fffff'
whismanoid 33:2c675744a01b 3444 #if MAX5719_SELFTEST_CODE_LOAD_4V1 // group CODE_LOAD_4V1 CODE_LOAD 4.095V
whismanoid 33:2c675744a01b 3445 if (SelfTestGroupEnable & 0x0020) {
whismanoid 33:2c675744a01b 3446 // call-function
whismanoid 33:2c675744a01b 3447 // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t'
whismanoid 33:2c675744a01b 3448 // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x0fffff), (uint8_t)None); // 4.095V
whismanoid 33:2c675744a01b 3449 // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x0fffff, /* empty expect: */ (uint8_t)None); // 4.095V
whismanoid 33:2c675744a01b 3450 g_MAX5719_device.CODE_LOAD((uint32_t)0x0fffff); // 4.095V
whismanoid 33:2c675744a01b 3451 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3452 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3453 } // if (SelfTestGroupEnable & 0x0020)
whismanoid 33:2c675744a01b 3454 #endif // MAX5719_SELFTEST_CODE_LOAD_4V1 // group CODE_LOAD_4V1
whismanoid 33:2c675744a01b 3455
whismanoid 33:2c675744a01b 3456 // @test group CODE_LOAD_4V1 tinyTester.Wait_Output_Settling()
whismanoid 33:2c675744a01b 3457 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 33:2c675744a01b 3458 // docTest_item['group-id-value'] = 'CODE_LOAD_4V1'
whismanoid 33:2c675744a01b 3459 // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()'
whismanoid 33:2c675744a01b 3460 // docTest_item['propName'] = 'Wait_Output_Settling'
whismanoid 33:2c675744a01b 3461 #if MAX5719_SELFTEST_CODE_LOAD_4V1 // group CODE_LOAD_4V1 None
whismanoid 33:2c675744a01b 3462 if (SelfTestGroupEnable & 0x0020) {
whismanoid 33:2c675744a01b 3463 // call-tinytester-function
whismanoid 33:2c675744a01b 3464 // tinyTesterFuncName = "tinyTester.Wait_Output_Settling"
whismanoid 33:2c675744a01b 3465 // docTest_argList = ""
whismanoid 33:2c675744a01b 3466 tinyTester.Wait_Output_Settling(); //
whismanoid 33:2c675744a01b 3467 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3468 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3469 } // if (SelfTestGroupEnable & 0x0020)
whismanoid 33:2c675744a01b 3470 #endif // MAX5719_SELFTEST_CODE_LOAD_4V1 // group CODE_LOAD_4V1
whismanoid 33:2c675744a01b 3471
whismanoid 33:2c675744a01b 3472 // @test group CODE_LOAD_4V1 tinyTester.AnalogIn0_Read_Expect_voltageV(4.095000)
whismanoid 33:2c675744a01b 3473 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 33:2c675744a01b 3474 // docTest_item['group-id-value'] = 'CODE_LOAD_4V1'
whismanoid 33:2c675744a01b 3475 // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(4.095000)'
whismanoid 33:2c675744a01b 3476 // docTest_item['arglist'] = '4.095000'
whismanoid 33:2c675744a01b 3477 // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV'
whismanoid 33:2c675744a01b 3478 #if MAX5719_SELFTEST_CODE_LOAD_4V1 // group CODE_LOAD_4V1 None
whismanoid 33:2c675744a01b 3479 if (SelfTestGroupEnable & 0x0020) {
whismanoid 33:2c675744a01b 3480 // call-tinytester-function
whismanoid 33:2c675744a01b 3481 // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV"
whismanoid 33:2c675744a01b 3482 // docTest_argList = "4.095000"
whismanoid 33:2c675744a01b 3483 tinyTester.AnalogIn0_Read_Expect_voltageV(4.095000); //
whismanoid 33:2c675744a01b 3484 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3485 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3486 } // if (SelfTestGroupEnable & 0x0020)
whismanoid 33:2c675744a01b 3487 #endif // MAX5719_SELFTEST_CODE_LOAD_4V1 // group CODE_LOAD_4V1
whismanoid 33:2c675744a01b 3488
whismanoid 33:2c675744a01b 3489 // @test group CODE_LOAD_4V1 tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0
whismanoid 33:2c675744a01b 3490 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 33:2c675744a01b 3491 // docTest_item['group-id-value'] = 'CODE_LOAD_4V1'
whismanoid 33:2c675744a01b 3492 // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()'
whismanoid 33:2c675744a01b 3493 // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV'
whismanoid 33:2c675744a01b 3494 #if MAX5719_SELFTEST_CODE_LOAD_4V1 // group CODE_LOAD_4V1 None
whismanoid 33:2c675744a01b 3495 if (SelfTestGroupEnable & 0x0020) {
whismanoid 33:2c675744a01b 3496 // call-tinytester-function
whismanoid 33:2c675744a01b 3497 // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV"
whismanoid 33:2c675744a01b 3498 // docTest_argList = ""
whismanoid 33:2c675744a01b 3499 tinyTester.AnalogIn1_Read_Report_voltageV(); //
whismanoid 33:2c675744a01b 3500 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3501 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3502 } // if (SelfTestGroupEnable & 0x0020)
whismanoid 33:2c675744a01b 3503 #endif // MAX5719_SELFTEST_CODE_LOAD_4V1 // group CODE_LOAD_4V1
whismanoid 33:2c675744a01b 3504
whismanoid 32:016a142143a5 3505 // @test group DACCodeOfVoltage // Verify function DACCodeOfVoltage (enabled by default) (no run on button)
whismanoid 25:9d4012b0887f 3506 // @test group DACCodeOfVoltage tinyTester.blink_time_msec = 20 // quickly speed through the software verification
whismanoid 25:9d4012b0887f 3507 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 25:9d4012b0887f 3508 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3509 // docTest_item['action'] = 'tinyTester.blink_time_msec = 20'
whismanoid 25:9d4012b0887f 3510 // docTest_item['remarks'] = 'quickly speed through the software verification'
whismanoid 25:9d4012b0887f 3511 // docTest_item['propName'] = 'tinyTester.blink_time_msec'
whismanoid 25:9d4012b0887f 3512 // docTest_item['propValue'] = '20'
whismanoid 25:9d4012b0887f 3513 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None quickly speed through the software verification
whismanoid 33:2c675744a01b 3514 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 3515 // assign-propname-value
whismanoid 25:9d4012b0887f 3516 // tinyTesterPropName = "tinyTester.blink_time_msec"
whismanoid 25:9d4012b0887f 3517 // tinyTesterPropValue = "20"
whismanoid 25:9d4012b0887f 3518 tinyTester.blink_time_msec = 20;
whismanoid 30:13fc9d492ee0 3519 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3520 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3521 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 3522 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 3523
whismanoid 25:9d4012b0887f 3524 // @test group DACCodeOfVoltage tinyTester.print("VRef = 4.096 MAX5719 20-bit LSB = 0.000004V = 3.90625uV")
whismanoid 25:9d4012b0887f 3525 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 3526 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3527 // docTest_item['action'] = 'tinyTester.print("VRef = 4.096 MAX5719 20-bit LSB = 0.000004V = 3.90625uV")'
whismanoid 25:9d4012b0887f 3528 // docTest_item['arglist'] = 'VRef = 4.096 MAX5719 20-bit LSB = 0.000004V = 3.90625uV'
whismanoid 25:9d4012b0887f 3529 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None
whismanoid 33:2c675744a01b 3530 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 3531 // print-string
whismanoid 25:9d4012b0887f 3532 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 3533 // tinyTesterPrintStringLiteral = "VRef = 4.096 MAX5719 20-bit LSB = 0.000004V = 3.90625uV"
whismanoid 25:9d4012b0887f 3534 tinyTester.print("VRef = 4.096 MAX5719 20-bit LSB = 0.000004V = 3.90625uV");
whismanoid 30:13fc9d492ee0 3535 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3536 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3537 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 3538 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 3539
whismanoid 25:9d4012b0887f 3540 // @test group DACCodeOfVoltage VRef = 4.096
whismanoid 25:9d4012b0887f 3541 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 25:9d4012b0887f 3542 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3543 // docTest_item['action'] = 'VRef = 4.096'
whismanoid 25:9d4012b0887f 3544 // docTest_item['propName'] = 'VRef'
whismanoid 25:9d4012b0887f 3545 // docTest_item['propValue'] = '4.096'
whismanoid 25:9d4012b0887f 3546 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None
whismanoid 33:2c675744a01b 3547 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 3548 // assign-propname-value
whismanoid 25:9d4012b0887f 3549 // tinyTesterPropName = "VRef"
whismanoid 25:9d4012b0887f 3550 // tinyTesterPropValue = "4.096"
whismanoid 25:9d4012b0887f 3551 g_MAX5719_device.VRef = 4.096;
whismanoid 30:13fc9d492ee0 3552 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3553 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3554 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 3555 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 3556
whismanoid 25:9d4012b0887f 3557 // @test group DACCodeOfVoltage tinyTester.print("test_voltage_sweep V = 0.000000V to 4.096000V precision 0.100000V step 0.500000V")
whismanoid 25:9d4012b0887f 3558 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 3559 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3560 // docTest_item['action'] = 'tinyTester.print("test_voltage_sweep V = 0.000000V to 4.096000V precision 0.100000V step 0.500000V")'
whismanoid 25:9d4012b0887f 3561 // docTest_item['arglist'] = 'test_voltage_sweep V = 0.000000V to 4.096000V precision 0.100000V step 0.500000V'
whismanoid 25:9d4012b0887f 3562 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None
whismanoid 33:2c675744a01b 3563 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 3564 // print-string
whismanoid 25:9d4012b0887f 3565 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 3566 // tinyTesterPrintStringLiteral = "test_voltage_sweep V = 0.000000V to 4.096000V precision 0.100000V step 0.500000V"
whismanoid 25:9d4012b0887f 3567 tinyTester.print("test_voltage_sweep V = 0.000000V to 4.096000V precision 0.100000V step 0.500000V");
whismanoid 30:13fc9d492ee0 3568 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3569 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3570 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 3571 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 3572
whismanoid 25:9d4012b0887f 3573 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.000000) expect 0x000000 // 0.000V
whismanoid 25:9d4012b0887f 3574 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 3575 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3576 // docTest_item['action'] = 'DACCodeOfVoltage(0.000000) expect 0x000000'
whismanoid 25:9d4012b0887f 3577 // docTest_item['remarks'] = '0.000V'
whismanoid 25:9d4012b0887f 3578 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3579 // docTest_item['arglist'] = '0.000000'
whismanoid 25:9d4012b0887f 3580 // docTest_item['expect-value'] = '0x000000'
whismanoid 25:9d4012b0887f 3581 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V
whismanoid 33:2c675744a01b 3582 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 3583 // call-function
whismanoid 27:485b1b2f334c 3584 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 3585 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.000000), (uint32_t)0x000000); // 0.000V
whismanoid 25:9d4012b0887f 3586 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.000000, /* expect: */ (uint32_t)0x000000); // 0.000V
whismanoid 30:13fc9d492ee0 3587 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3588 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3589 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 33:2c675744a01b 3590 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 33:2c675744a01b 3591
whismanoid 33:2c675744a01b 3592 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.500000) expect 0x01f400 // 0.500V
whismanoid 33:2c675744a01b 3593 // docTest_item['actionType'] = 'call-function'
whismanoid 33:2c675744a01b 3594 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3595 // docTest_item['action'] = 'DACCodeOfVoltage(0.500000) expect 0x01f400'
whismanoid 33:2c675744a01b 3596 // docTest_item['remarks'] = '0.500V'
whismanoid 33:2c675744a01b 3597 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3598 // docTest_item['arglist'] = '0.500000'
whismanoid 33:2c675744a01b 3599 // docTest_item['expect-value'] = '0x01f400'
whismanoid 33:2c675744a01b 3600 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.500V
whismanoid 33:2c675744a01b 3601 if (SelfTestGroupEnable & 0x0040) {
whismanoid 33:2c675744a01b 3602 // call-function
whismanoid 33:2c675744a01b 3603 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 33:2c675744a01b 3604 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.500000), (uint32_t)0x01f400); // 0.500V
whismanoid 33:2c675744a01b 3605 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.500000, /* expect: */ (uint32_t)0x01f400); // 0.500V
whismanoid 33:2c675744a01b 3606 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3607 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3608 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 33:2c675744a01b 3609 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 33:2c675744a01b 3610
whismanoid 33:2c675744a01b 3611 // @test group DACCodeOfVoltage DACCodeOfVoltage(1.000000) expect 0x03e800 // 1.000V
whismanoid 33:2c675744a01b 3612 // docTest_item['actionType'] = 'call-function'
whismanoid 33:2c675744a01b 3613 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3614 // docTest_item['action'] = 'DACCodeOfVoltage(1.000000) expect 0x03e800'
whismanoid 33:2c675744a01b 3615 // docTest_item['remarks'] = '1.000V'
whismanoid 33:2c675744a01b 3616 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3617 // docTest_item['arglist'] = '1.000000'
whismanoid 33:2c675744a01b 3618 // docTest_item['expect-value'] = '0x03e800'
whismanoid 33:2c675744a01b 3619 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.000V
whismanoid 33:2c675744a01b 3620 if (SelfTestGroupEnable & 0x0040) {
whismanoid 33:2c675744a01b 3621 // call-function
whismanoid 33:2c675744a01b 3622 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 33:2c675744a01b 3623 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.000000), (uint32_t)0x03e800); // 1.000V
whismanoid 33:2c675744a01b 3624 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.000000, /* expect: */ (uint32_t)0x03e800); // 1.000V
whismanoid 33:2c675744a01b 3625 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3626 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3627 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 33:2c675744a01b 3628 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 33:2c675744a01b 3629
whismanoid 33:2c675744a01b 3630 // @test group DACCodeOfVoltage DACCodeOfVoltage(1.500000) expect 0x05dc00 // 1.500V
whismanoid 33:2c675744a01b 3631 // docTest_item['actionType'] = 'call-function'
whismanoid 33:2c675744a01b 3632 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3633 // docTest_item['action'] = 'DACCodeOfVoltage(1.500000) expect 0x05dc00'
whismanoid 33:2c675744a01b 3634 // docTest_item['remarks'] = '1.500V'
whismanoid 33:2c675744a01b 3635 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3636 // docTest_item['arglist'] = '1.500000'
whismanoid 33:2c675744a01b 3637 // docTest_item['expect-value'] = '0x05dc00'
whismanoid 33:2c675744a01b 3638 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.500V
whismanoid 33:2c675744a01b 3639 if (SelfTestGroupEnable & 0x0040) {
whismanoid 33:2c675744a01b 3640 // call-function
whismanoid 33:2c675744a01b 3641 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 33:2c675744a01b 3642 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.500000), (uint32_t)0x05dc00); // 1.500V
whismanoid 33:2c675744a01b 3643 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.500000, /* expect: */ (uint32_t)0x05dc00); // 1.500V
whismanoid 33:2c675744a01b 3644 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3645 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3646 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 33:2c675744a01b 3647 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 33:2c675744a01b 3648
whismanoid 33:2c675744a01b 3649 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.000000) expect 0x07d000 // 2.000V
whismanoid 33:2c675744a01b 3650 // docTest_item['actionType'] = 'call-function'
whismanoid 33:2c675744a01b 3651 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3652 // docTest_item['action'] = 'DACCodeOfVoltage(2.000000) expect 0x07d000'
whismanoid 33:2c675744a01b 3653 // docTest_item['remarks'] = '2.000V'
whismanoid 33:2c675744a01b 3654 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3655 // docTest_item['arglist'] = '2.000000'
whismanoid 33:2c675744a01b 3656 // docTest_item['expect-value'] = '0x07d000'
whismanoid 33:2c675744a01b 3657 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.000V
whismanoid 33:2c675744a01b 3658 if (SelfTestGroupEnable & 0x0040) {
whismanoid 33:2c675744a01b 3659 // call-function
whismanoid 33:2c675744a01b 3660 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 33:2c675744a01b 3661 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.000000), (uint32_t)0x07d000); // 2.000V
whismanoid 33:2c675744a01b 3662 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.000000, /* expect: */ (uint32_t)0x07d000); // 2.000V
whismanoid 33:2c675744a01b 3663 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3664 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3665 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 33:2c675744a01b 3666 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 33:2c675744a01b 3667
whismanoid 33:2c675744a01b 3668 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.500000) expect 0x09c400 // 2.500V
whismanoid 33:2c675744a01b 3669 // docTest_item['actionType'] = 'call-function'
whismanoid 33:2c675744a01b 3670 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3671 // docTest_item['action'] = 'DACCodeOfVoltage(2.500000) expect 0x09c400'
whismanoid 33:2c675744a01b 3672 // docTest_item['remarks'] = '2.500V'
whismanoid 33:2c675744a01b 3673 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3674 // docTest_item['arglist'] = '2.500000'
whismanoid 33:2c675744a01b 3675 // docTest_item['expect-value'] = '0x09c400'
whismanoid 33:2c675744a01b 3676 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.500V
whismanoid 33:2c675744a01b 3677 if (SelfTestGroupEnable & 0x0040) {
whismanoid 33:2c675744a01b 3678 // call-function
whismanoid 33:2c675744a01b 3679 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 33:2c675744a01b 3680 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.500000), (uint32_t)0x09c400); // 2.500V
whismanoid 33:2c675744a01b 3681 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.500000, /* expect: */ (uint32_t)0x09c400); // 2.500V
whismanoid 33:2c675744a01b 3682 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3683 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3684 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 33:2c675744a01b 3685 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 33:2c675744a01b 3686
whismanoid 33:2c675744a01b 3687 // @test group DACCodeOfVoltage DACCodeOfVoltage(3.000000) expect 0x0bb800 // 3.000V
whismanoid 33:2c675744a01b 3688 // docTest_item['actionType'] = 'call-function'
whismanoid 33:2c675744a01b 3689 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3690 // docTest_item['action'] = 'DACCodeOfVoltage(3.000000) expect 0x0bb800'
whismanoid 33:2c675744a01b 3691 // docTest_item['remarks'] = '3.000V'
whismanoid 33:2c675744a01b 3692 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3693 // docTest_item['arglist'] = '3.000000'
whismanoid 33:2c675744a01b 3694 // docTest_item['expect-value'] = '0x0bb800'
whismanoid 33:2c675744a01b 3695 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.000V
whismanoid 33:2c675744a01b 3696 if (SelfTestGroupEnable & 0x0040) {
whismanoid 33:2c675744a01b 3697 // call-function
whismanoid 33:2c675744a01b 3698 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 33:2c675744a01b 3699 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.000000), (uint32_t)0x0bb800); // 3.000V
whismanoid 33:2c675744a01b 3700 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.000000, /* expect: */ (uint32_t)0x0bb800); // 3.000V
whismanoid 33:2c675744a01b 3701 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3702 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3703 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 33:2c675744a01b 3704 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 33:2c675744a01b 3705
whismanoid 33:2c675744a01b 3706 // @test group DACCodeOfVoltage DACCodeOfVoltage(3.500000) expect 0x0dac00 // 3.500V
whismanoid 33:2c675744a01b 3707 // docTest_item['actionType'] = 'call-function'
whismanoid 33:2c675744a01b 3708 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3709 // docTest_item['action'] = 'DACCodeOfVoltage(3.500000) expect 0x0dac00'
whismanoid 33:2c675744a01b 3710 // docTest_item['remarks'] = '3.500V'
whismanoid 33:2c675744a01b 3711 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3712 // docTest_item['arglist'] = '3.500000'
whismanoid 33:2c675744a01b 3713 // docTest_item['expect-value'] = '0x0dac00'
whismanoid 33:2c675744a01b 3714 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.500V
whismanoid 33:2c675744a01b 3715 if (SelfTestGroupEnable & 0x0040) {
whismanoid 33:2c675744a01b 3716 // call-function
whismanoid 33:2c675744a01b 3717 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 33:2c675744a01b 3718 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.500000), (uint32_t)0x0dac00); // 3.500V
whismanoid 33:2c675744a01b 3719 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.500000, /* expect: */ (uint32_t)0x0dac00); // 3.500V
whismanoid 33:2c675744a01b 3720 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3721 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3722 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 33:2c675744a01b 3723 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 33:2c675744a01b 3724
whismanoid 33:2c675744a01b 3725 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.000000) expect 0x0fa000 // 4.000V
whismanoid 33:2c675744a01b 3726 // docTest_item['actionType'] = 'call-function'
whismanoid 33:2c675744a01b 3727 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3728 // docTest_item['action'] = 'DACCodeOfVoltage(4.000000) expect 0x0fa000'
whismanoid 33:2c675744a01b 3729 // docTest_item['remarks'] = '4.000V'
whismanoid 33:2c675744a01b 3730 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3731 // docTest_item['arglist'] = '4.000000'
whismanoid 33:2c675744a01b 3732 // docTest_item['expect-value'] = '0x0fa000'
whismanoid 33:2c675744a01b 3733 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.000V
whismanoid 33:2c675744a01b 3734 if (SelfTestGroupEnable & 0x0040) {
whismanoid 33:2c675744a01b 3735 // call-function
whismanoid 33:2c675744a01b 3736 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 33:2c675744a01b 3737 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.000000), (uint32_t)0x0fa000); // 4.000V
whismanoid 33:2c675744a01b 3738 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.000000, /* expect: */ (uint32_t)0x0fa000); // 4.000V
whismanoid 33:2c675744a01b 3739 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3740 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3741 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 33:2c675744a01b 3742 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 33:2c675744a01b 3743
whismanoid 33:2c675744a01b 3744 // @test group DACCodeOfVoltage tinyTester.print("test_voltage_sweep V = -0.010000V to 0.100000V precision 0.010000V step 0.010000V")
whismanoid 33:2c675744a01b 3745 // docTest_item['actionType'] = 'print-string'
whismanoid 33:2c675744a01b 3746 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3747 // docTest_item['action'] = 'tinyTester.print("test_voltage_sweep V = -0.010000V to 0.100000V precision 0.010000V step 0.010000V")'
whismanoid 33:2c675744a01b 3748 // docTest_item['arglist'] = 'test_voltage_sweep V = -0.010000V to 0.100000V precision 0.010000V step 0.010000V'
whismanoid 33:2c675744a01b 3749 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None
whismanoid 33:2c675744a01b 3750 if (SelfTestGroupEnable & 0x0040) {
whismanoid 33:2c675744a01b 3751 // print-string
whismanoid 33:2c675744a01b 3752 // tinyTesterFuncName = "tinyTester.print"
whismanoid 33:2c675744a01b 3753 // tinyTesterPrintStringLiteral = "test_voltage_sweep V = -0.010000V to 0.100000V precision 0.010000V step 0.010000V"
whismanoid 33:2c675744a01b 3754 tinyTester.print("test_voltage_sweep V = -0.010000V to 0.100000V precision 0.010000V step 0.010000V");
whismanoid 33:2c675744a01b 3755 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3756 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3757 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 33:2c675744a01b 3758 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 33:2c675744a01b 3759
whismanoid 33:2c675744a01b 3760 // @test group DACCodeOfVoltage DACCodeOfVoltage(-0.010000) expect 0x000000 // -0.010V
whismanoid 33:2c675744a01b 3761 // docTest_item['actionType'] = 'call-function'
whismanoid 33:2c675744a01b 3762 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3763 // docTest_item['action'] = 'DACCodeOfVoltage(-0.010000) expect 0x000000'
whismanoid 33:2c675744a01b 3764 // docTest_item['remarks'] = '-0.010V'
whismanoid 33:2c675744a01b 3765 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3766 // docTest_item['arglist'] = '-0.010000'
whismanoid 33:2c675744a01b 3767 // docTest_item['expect-value'] = '0x000000'
whismanoid 33:2c675744a01b 3768 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage -0.010V
whismanoid 33:2c675744a01b 3769 if (SelfTestGroupEnable & 0x0040) {
whismanoid 33:2c675744a01b 3770 // call-function
whismanoid 33:2c675744a01b 3771 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 33:2c675744a01b 3772 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)-0.010000), (uint32_t)0x000000); // -0.010V
whismanoid 33:2c675744a01b 3773 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)-0.010000, /* expect: */ (uint32_t)0x000000); // -0.010V
whismanoid 33:2c675744a01b 3774 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3775 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3776 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 33:2c675744a01b 3777 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 33:2c675744a01b 3778
whismanoid 33:2c675744a01b 3779 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.000000) expect 0x000000 // 0.000V
whismanoid 33:2c675744a01b 3780 // docTest_item['actionType'] = 'call-function'
whismanoid 33:2c675744a01b 3781 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3782 // docTest_item['action'] = 'DACCodeOfVoltage(0.000000) expect 0x000000'
whismanoid 33:2c675744a01b 3783 // docTest_item['remarks'] = '0.000V'
whismanoid 33:2c675744a01b 3784 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3785 // docTest_item['arglist'] = '0.000000'
whismanoid 33:2c675744a01b 3786 // docTest_item['expect-value'] = '0x000000'
whismanoid 33:2c675744a01b 3787 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V
whismanoid 33:2c675744a01b 3788 if (SelfTestGroupEnable & 0x0040) {
whismanoid 33:2c675744a01b 3789 // call-function
whismanoid 33:2c675744a01b 3790 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 33:2c675744a01b 3791 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.000000), (uint32_t)0x000000); // 0.000V
whismanoid 33:2c675744a01b 3792 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.000000, /* expect: */ (uint32_t)0x000000); // 0.000V
whismanoid 33:2c675744a01b 3793 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3794 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3795 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 3796 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 3797
whismanoid 25:9d4012b0887f 3798 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.010000) expect 0x000a00 // 0.010V
whismanoid 25:9d4012b0887f 3799 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 3800 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3801 // docTest_item['action'] = 'DACCodeOfVoltage(0.010000) expect 0x000a00'
whismanoid 25:9d4012b0887f 3802 // docTest_item['remarks'] = '0.010V'
whismanoid 25:9d4012b0887f 3803 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3804 // docTest_item['arglist'] = '0.010000'
whismanoid 25:9d4012b0887f 3805 // docTest_item['expect-value'] = '0x000a00'
whismanoid 25:9d4012b0887f 3806 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.010V
whismanoid 33:2c675744a01b 3807 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 3808 // call-function
whismanoid 27:485b1b2f334c 3809 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 3810 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.010000), (uint32_t)0x000a00); // 0.010V
whismanoid 25:9d4012b0887f 3811 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.010000, /* expect: */ (uint32_t)0x000a00); // 0.010V
whismanoid 30:13fc9d492ee0 3812 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3813 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3814 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 3815 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 3816
whismanoid 25:9d4012b0887f 3817 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.020000) expect 0x001400 // 0.020V
whismanoid 25:9d4012b0887f 3818 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 3819 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3820 // docTest_item['action'] = 'DACCodeOfVoltage(0.020000) expect 0x001400'
whismanoid 25:9d4012b0887f 3821 // docTest_item['remarks'] = '0.020V'
whismanoid 25:9d4012b0887f 3822 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3823 // docTest_item['arglist'] = '0.020000'
whismanoid 25:9d4012b0887f 3824 // docTest_item['expect-value'] = '0x001400'
whismanoid 25:9d4012b0887f 3825 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.020V
whismanoid 33:2c675744a01b 3826 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 3827 // call-function
whismanoid 27:485b1b2f334c 3828 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 3829 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.020000), (uint32_t)0x001400); // 0.020V
whismanoid 25:9d4012b0887f 3830 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.020000, /* expect: */ (uint32_t)0x001400); // 0.020V
whismanoid 30:13fc9d492ee0 3831 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3832 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3833 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 3834 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 3835
whismanoid 25:9d4012b0887f 3836 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.030000) expect 0x001e00 // 0.030V
whismanoid 25:9d4012b0887f 3837 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 3838 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3839 // docTest_item['action'] = 'DACCodeOfVoltage(0.030000) expect 0x001e00'
whismanoid 25:9d4012b0887f 3840 // docTest_item['remarks'] = '0.030V'
whismanoid 25:9d4012b0887f 3841 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3842 // docTest_item['arglist'] = '0.030000'
whismanoid 25:9d4012b0887f 3843 // docTest_item['expect-value'] = '0x001e00'
whismanoid 25:9d4012b0887f 3844 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.030V
whismanoid 33:2c675744a01b 3845 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 3846 // call-function
whismanoid 27:485b1b2f334c 3847 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 3848 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.030000), (uint32_t)0x001e00); // 0.030V
whismanoid 25:9d4012b0887f 3849 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.030000, /* expect: */ (uint32_t)0x001e00); // 0.030V
whismanoid 30:13fc9d492ee0 3850 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3851 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3852 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 3853 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 3854
whismanoid 25:9d4012b0887f 3855 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.040000) expect 0x002800 // 0.040V
whismanoid 25:9d4012b0887f 3856 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 3857 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3858 // docTest_item['action'] = 'DACCodeOfVoltage(0.040000) expect 0x002800'
whismanoid 25:9d4012b0887f 3859 // docTest_item['remarks'] = '0.040V'
whismanoid 25:9d4012b0887f 3860 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3861 // docTest_item['arglist'] = '0.040000'
whismanoid 25:9d4012b0887f 3862 // docTest_item['expect-value'] = '0x002800'
whismanoid 25:9d4012b0887f 3863 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.040V
whismanoid 33:2c675744a01b 3864 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 3865 // call-function
whismanoid 27:485b1b2f334c 3866 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 3867 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.040000), (uint32_t)0x002800); // 0.040V
whismanoid 25:9d4012b0887f 3868 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.040000, /* expect: */ (uint32_t)0x002800); // 0.040V
whismanoid 30:13fc9d492ee0 3869 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3870 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3871 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 3872 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 3873
whismanoid 25:9d4012b0887f 3874 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.050000) expect 0x003200 // 0.050V
whismanoid 25:9d4012b0887f 3875 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 3876 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3877 // docTest_item['action'] = 'DACCodeOfVoltage(0.050000) expect 0x003200'
whismanoid 25:9d4012b0887f 3878 // docTest_item['remarks'] = '0.050V'
whismanoid 25:9d4012b0887f 3879 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3880 // docTest_item['arglist'] = '0.050000'
whismanoid 25:9d4012b0887f 3881 // docTest_item['expect-value'] = '0x003200'
whismanoid 25:9d4012b0887f 3882 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.050V
whismanoid 33:2c675744a01b 3883 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 3884 // call-function
whismanoid 27:485b1b2f334c 3885 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 3886 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.050000), (uint32_t)0x003200); // 0.050V
whismanoid 25:9d4012b0887f 3887 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.050000, /* expect: */ (uint32_t)0x003200); // 0.050V
whismanoid 30:13fc9d492ee0 3888 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3889 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3890 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 3891 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 3892
whismanoid 25:9d4012b0887f 3893 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.060000) expect 0x003c00 // 0.060V
whismanoid 25:9d4012b0887f 3894 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 3895 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3896 // docTest_item['action'] = 'DACCodeOfVoltage(0.060000) expect 0x003c00'
whismanoid 25:9d4012b0887f 3897 // docTest_item['remarks'] = '0.060V'
whismanoid 25:9d4012b0887f 3898 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3899 // docTest_item['arglist'] = '0.060000'
whismanoid 25:9d4012b0887f 3900 // docTest_item['expect-value'] = '0x003c00'
whismanoid 25:9d4012b0887f 3901 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.060V
whismanoid 33:2c675744a01b 3902 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 3903 // call-function
whismanoid 27:485b1b2f334c 3904 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 3905 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.060000), (uint32_t)0x003c00); // 0.060V
whismanoid 25:9d4012b0887f 3906 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.060000, /* expect: */ (uint32_t)0x003c00); // 0.060V
whismanoid 30:13fc9d492ee0 3907 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3908 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3909 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 3910 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 3911
whismanoid 25:9d4012b0887f 3912 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.070000) expect 0x004600 // 0.070V
whismanoid 25:9d4012b0887f 3913 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 3914 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3915 // docTest_item['action'] = 'DACCodeOfVoltage(0.070000) expect 0x004600'
whismanoid 25:9d4012b0887f 3916 // docTest_item['remarks'] = '0.070V'
whismanoid 25:9d4012b0887f 3917 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3918 // docTest_item['arglist'] = '0.070000'
whismanoid 25:9d4012b0887f 3919 // docTest_item['expect-value'] = '0x004600'
whismanoid 25:9d4012b0887f 3920 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.070V
whismanoid 33:2c675744a01b 3921 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 3922 // call-function
whismanoid 27:485b1b2f334c 3923 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 3924 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.070000), (uint32_t)0x004600); // 0.070V
whismanoid 25:9d4012b0887f 3925 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.070000, /* expect: */ (uint32_t)0x004600); // 0.070V
whismanoid 30:13fc9d492ee0 3926 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3927 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3928 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 3929 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 3930
whismanoid 25:9d4012b0887f 3931 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.080000) expect 0x005000 // 0.080V
whismanoid 25:9d4012b0887f 3932 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 3933 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3934 // docTest_item['action'] = 'DACCodeOfVoltage(0.080000) expect 0x005000'
whismanoid 25:9d4012b0887f 3935 // docTest_item['remarks'] = '0.080V'
whismanoid 25:9d4012b0887f 3936 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3937 // docTest_item['arglist'] = '0.080000'
whismanoid 25:9d4012b0887f 3938 // docTest_item['expect-value'] = '0x005000'
whismanoid 25:9d4012b0887f 3939 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.080V
whismanoid 33:2c675744a01b 3940 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 3941 // call-function
whismanoid 27:485b1b2f334c 3942 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 3943 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.080000), (uint32_t)0x005000); // 0.080V
whismanoid 25:9d4012b0887f 3944 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.080000, /* expect: */ (uint32_t)0x005000); // 0.080V
whismanoid 30:13fc9d492ee0 3945 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3946 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3947 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 3948 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 3949
whismanoid 25:9d4012b0887f 3950 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.090000) expect 0x005a00 // 0.090V
whismanoid 25:9d4012b0887f 3951 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 3952 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3953 // docTest_item['action'] = 'DACCodeOfVoltage(0.090000) expect 0x005a00'
whismanoid 25:9d4012b0887f 3954 // docTest_item['remarks'] = '0.090V'
whismanoid 25:9d4012b0887f 3955 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3956 // docTest_item['arglist'] = '0.090000'
whismanoid 25:9d4012b0887f 3957 // docTest_item['expect-value'] = '0x005a00'
whismanoid 25:9d4012b0887f 3958 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.090V
whismanoid 33:2c675744a01b 3959 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 3960 // call-function
whismanoid 27:485b1b2f334c 3961 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 3962 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.090000), (uint32_t)0x005a00); // 0.090V
whismanoid 25:9d4012b0887f 3963 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.090000, /* expect: */ (uint32_t)0x005a00); // 0.090V
whismanoid 30:13fc9d492ee0 3964 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3965 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3966 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 3967 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 3968
whismanoid 25:9d4012b0887f 3969 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.100000) expect 0x006400 // 0.100V
whismanoid 25:9d4012b0887f 3970 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 3971 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3972 // docTest_item['action'] = 'DACCodeOfVoltage(0.100000) expect 0x006400'
whismanoid 25:9d4012b0887f 3973 // docTest_item['remarks'] = '0.100V'
whismanoid 25:9d4012b0887f 3974 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3975 // docTest_item['arglist'] = '0.100000'
whismanoid 25:9d4012b0887f 3976 // docTest_item['expect-value'] = '0x006400'
whismanoid 25:9d4012b0887f 3977 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.100V
whismanoid 33:2c675744a01b 3978 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 3979 // call-function
whismanoid 27:485b1b2f334c 3980 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 3981 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.100000), (uint32_t)0x006400); // 0.100V
whismanoid 25:9d4012b0887f 3982 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.100000, /* expect: */ (uint32_t)0x006400); // 0.100V
whismanoid 30:13fc9d492ee0 3983 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3984 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3985 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 3986 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 3987
whismanoid 25:9d4012b0887f 3988 // @test group DACCodeOfVoltage tinyTester.print("test_voltage_sweep V = 2.047900V to 2.048100V precision 0.000010V step 0.000010V")
whismanoid 25:9d4012b0887f 3989 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 3990 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3991 // docTest_item['action'] = 'tinyTester.print("test_voltage_sweep V = 2.047900V to 2.048100V precision 0.000010V step 0.000010V")'
whismanoid 25:9d4012b0887f 3992 // docTest_item['arglist'] = 'test_voltage_sweep V = 2.047900V to 2.048100V precision 0.000010V step 0.000010V'
whismanoid 25:9d4012b0887f 3993 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None
whismanoid 33:2c675744a01b 3994 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 3995 // print-string
whismanoid 25:9d4012b0887f 3996 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 3997 // tinyTesterPrintStringLiteral = "test_voltage_sweep V = 2.047900V to 2.048100V precision 0.000010V step 0.000010V"
whismanoid 25:9d4012b0887f 3998 tinyTester.print("test_voltage_sweep V = 2.047900V to 2.048100V precision 0.000010V step 0.000010V");
whismanoid 30:13fc9d492ee0 3999 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4000 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4001 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4002 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4003
whismanoid 25:9d4012b0887f 4004 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047890) expect 0x07ffe4 // 2.048V
whismanoid 25:9d4012b0887f 4005 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4006 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4007 // docTest_item['action'] = 'DACCodeOfVoltage(2.047890) expect 0x07ffe4'
whismanoid 25:9d4012b0887f 4008 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4009 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4010 // docTest_item['arglist'] = '2.047890'
whismanoid 25:9d4012b0887f 4011 // docTest_item['expect-value'] = '0x07ffe4'
whismanoid 25:9d4012b0887f 4012 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4013 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4014 // call-function
whismanoid 27:485b1b2f334c 4015 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4016 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047890), (uint32_t)0x07ffe4); // 2.048V
whismanoid 25:9d4012b0887f 4017 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047890, /* expect: */ (uint32_t)0x07ffe4); // 2.048V
whismanoid 30:13fc9d492ee0 4018 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4019 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4020 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4021 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4022
whismanoid 25:9d4012b0887f 4023 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047900) expect 0x07ffe6 // 2.048V
whismanoid 25:9d4012b0887f 4024 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4025 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4026 // docTest_item['action'] = 'DACCodeOfVoltage(2.047900) expect 0x07ffe6'
whismanoid 25:9d4012b0887f 4027 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4028 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4029 // docTest_item['arglist'] = '2.047900'
whismanoid 25:9d4012b0887f 4030 // docTest_item['expect-value'] = '0x07ffe6'
whismanoid 25:9d4012b0887f 4031 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4032 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4033 // call-function
whismanoid 27:485b1b2f334c 4034 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4035 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047900), (uint32_t)0x07ffe6); // 2.048V
whismanoid 25:9d4012b0887f 4036 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047900, /* expect: */ (uint32_t)0x07ffe6); // 2.048V
whismanoid 30:13fc9d492ee0 4037 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4038 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4039 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4040 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4041
whismanoid 25:9d4012b0887f 4042 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047910) expect 0x07ffe9 // 2.048V
whismanoid 25:9d4012b0887f 4043 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4044 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4045 // docTest_item['action'] = 'DACCodeOfVoltage(2.047910) expect 0x07ffe9'
whismanoid 25:9d4012b0887f 4046 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4047 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4048 // docTest_item['arglist'] = '2.047910'
whismanoid 25:9d4012b0887f 4049 // docTest_item['expect-value'] = '0x07ffe9'
whismanoid 25:9d4012b0887f 4050 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4051 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4052 // call-function
whismanoid 27:485b1b2f334c 4053 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4054 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047910), (uint32_t)0x07ffe9); // 2.048V
whismanoid 25:9d4012b0887f 4055 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047910, /* expect: */ (uint32_t)0x07ffe9); // 2.048V
whismanoid 30:13fc9d492ee0 4056 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4057 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4058 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4059 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4060
whismanoid 25:9d4012b0887f 4061 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047920) expect 0x07ffec // 2.048V
whismanoid 25:9d4012b0887f 4062 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4063 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4064 // docTest_item['action'] = 'DACCodeOfVoltage(2.047920) expect 0x07ffec'
whismanoid 25:9d4012b0887f 4065 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4066 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4067 // docTest_item['arglist'] = '2.047920'
whismanoid 25:9d4012b0887f 4068 // docTest_item['expect-value'] = '0x07ffec'
whismanoid 25:9d4012b0887f 4069 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4070 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4071 // call-function
whismanoid 27:485b1b2f334c 4072 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4073 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047920), (uint32_t)0x07ffec); // 2.048V
whismanoid 25:9d4012b0887f 4074 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047920, /* expect: */ (uint32_t)0x07ffec); // 2.048V
whismanoid 30:13fc9d492ee0 4075 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4076 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4077 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4078 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4079
whismanoid 25:9d4012b0887f 4080 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047930) expect 0x07ffee // 2.048V
whismanoid 25:9d4012b0887f 4081 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4082 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4083 // docTest_item['action'] = 'DACCodeOfVoltage(2.047930) expect 0x07ffee'
whismanoid 25:9d4012b0887f 4084 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4085 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4086 // docTest_item['arglist'] = '2.047930'
whismanoid 25:9d4012b0887f 4087 // docTest_item['expect-value'] = '0x07ffee'
whismanoid 25:9d4012b0887f 4088 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4089 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4090 // call-function
whismanoid 27:485b1b2f334c 4091 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4092 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047930), (uint32_t)0x07ffee); // 2.048V
whismanoid 25:9d4012b0887f 4093 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047930, /* expect: */ (uint32_t)0x07ffee); // 2.048V
whismanoid 30:13fc9d492ee0 4094 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4095 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4096 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4097 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4098
whismanoid 25:9d4012b0887f 4099 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047940) expect 0x07fff1 // 2.048V
whismanoid 25:9d4012b0887f 4100 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4101 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4102 // docTest_item['action'] = 'DACCodeOfVoltage(2.047940) expect 0x07fff1'
whismanoid 25:9d4012b0887f 4103 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4104 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4105 // docTest_item['arglist'] = '2.047940'
whismanoid 25:9d4012b0887f 4106 // docTest_item['expect-value'] = '0x07fff1'
whismanoid 25:9d4012b0887f 4107 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4108 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4109 // call-function
whismanoid 27:485b1b2f334c 4110 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4111 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047940), (uint32_t)0x07fff1); // 2.048V
whismanoid 25:9d4012b0887f 4112 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047940, /* expect: */ (uint32_t)0x07fff1); // 2.048V
whismanoid 30:13fc9d492ee0 4113 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4114 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4115 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4116 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4117
whismanoid 25:9d4012b0887f 4118 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047950) expect 0x07fff3 // 2.048V
whismanoid 25:9d4012b0887f 4119 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4120 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4121 // docTest_item['action'] = 'DACCodeOfVoltage(2.047950) expect 0x07fff3'
whismanoid 25:9d4012b0887f 4122 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4123 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4124 // docTest_item['arglist'] = '2.047950'
whismanoid 25:9d4012b0887f 4125 // docTest_item['expect-value'] = '0x07fff3'
whismanoid 25:9d4012b0887f 4126 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4127 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4128 // call-function
whismanoid 27:485b1b2f334c 4129 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4130 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047950), (uint32_t)0x07fff3); // 2.048V
whismanoid 25:9d4012b0887f 4131 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047950, /* expect: */ (uint32_t)0x07fff3); // 2.048V
whismanoid 30:13fc9d492ee0 4132 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4133 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4134 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4135 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4136
whismanoid 25:9d4012b0887f 4137 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047960) expect 0x07fff6 // 2.048V
whismanoid 25:9d4012b0887f 4138 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4139 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4140 // docTest_item['action'] = 'DACCodeOfVoltage(2.047960) expect 0x07fff6'
whismanoid 25:9d4012b0887f 4141 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4142 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4143 // docTest_item['arglist'] = '2.047960'
whismanoid 25:9d4012b0887f 4144 // docTest_item['expect-value'] = '0x07fff6'
whismanoid 25:9d4012b0887f 4145 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4146 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4147 // call-function
whismanoid 27:485b1b2f334c 4148 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4149 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047960), (uint32_t)0x07fff6); // 2.048V
whismanoid 25:9d4012b0887f 4150 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047960, /* expect: */ (uint32_t)0x07fff6); // 2.048V
whismanoid 30:13fc9d492ee0 4151 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4152 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4153 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4154 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4155
whismanoid 25:9d4012b0887f 4156 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047970) expect 0x07fff8 // 2.048V
whismanoid 25:9d4012b0887f 4157 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4158 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4159 // docTest_item['action'] = 'DACCodeOfVoltage(2.047970) expect 0x07fff8'
whismanoid 25:9d4012b0887f 4160 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4161 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4162 // docTest_item['arglist'] = '2.047970'
whismanoid 25:9d4012b0887f 4163 // docTest_item['expect-value'] = '0x07fff8'
whismanoid 25:9d4012b0887f 4164 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4165 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4166 // call-function
whismanoid 27:485b1b2f334c 4167 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4168 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047970), (uint32_t)0x07fff8); // 2.048V
whismanoid 25:9d4012b0887f 4169 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047970, /* expect: */ (uint32_t)0x07fff8); // 2.048V
whismanoid 30:13fc9d492ee0 4170 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4171 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4172 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4173 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4174
whismanoid 25:9d4012b0887f 4175 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047980) expect 0x07fffb // 2.048V
whismanoid 25:9d4012b0887f 4176 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4177 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4178 // docTest_item['action'] = 'DACCodeOfVoltage(2.047980) expect 0x07fffb'
whismanoid 25:9d4012b0887f 4179 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4180 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4181 // docTest_item['arglist'] = '2.047980'
whismanoid 25:9d4012b0887f 4182 // docTest_item['expect-value'] = '0x07fffb'
whismanoid 25:9d4012b0887f 4183 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4184 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4185 // call-function
whismanoid 27:485b1b2f334c 4186 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4187 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047980), (uint32_t)0x07fffb); // 2.048V
whismanoid 25:9d4012b0887f 4188 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047980, /* expect: */ (uint32_t)0x07fffb); // 2.048V
whismanoid 30:13fc9d492ee0 4189 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4190 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4191 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4192 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4193
whismanoid 25:9d4012b0887f 4194 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047990) expect 0x07fffd // 2.048V
whismanoid 25:9d4012b0887f 4195 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4196 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4197 // docTest_item['action'] = 'DACCodeOfVoltage(2.047990) expect 0x07fffd'
whismanoid 25:9d4012b0887f 4198 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4199 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4200 // docTest_item['arglist'] = '2.047990'
whismanoid 25:9d4012b0887f 4201 // docTest_item['expect-value'] = '0x07fffd'
whismanoid 25:9d4012b0887f 4202 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4203 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4204 // call-function
whismanoid 27:485b1b2f334c 4205 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4206 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047990), (uint32_t)0x07fffd); // 2.048V
whismanoid 25:9d4012b0887f 4207 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047990, /* expect: */ (uint32_t)0x07fffd); // 2.048V
whismanoid 30:13fc9d492ee0 4208 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4209 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4210 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4211 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4212
whismanoid 25:9d4012b0887f 4213 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048000) expect 0x080000 // 2.048V
whismanoid 25:9d4012b0887f 4214 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4215 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4216 // docTest_item['action'] = 'DACCodeOfVoltage(2.048000) expect 0x080000'
whismanoid 25:9d4012b0887f 4217 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4218 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4219 // docTest_item['arglist'] = '2.048000'
whismanoid 25:9d4012b0887f 4220 // docTest_item['expect-value'] = '0x080000'
whismanoid 25:9d4012b0887f 4221 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4222 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4223 // call-function
whismanoid 27:485b1b2f334c 4224 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4225 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048000), (uint32_t)0x080000); // 2.048V
whismanoid 25:9d4012b0887f 4226 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048000, /* expect: */ (uint32_t)0x080000); // 2.048V
whismanoid 30:13fc9d492ee0 4227 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4228 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4229 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4230 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4231
whismanoid 25:9d4012b0887f 4232 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048010) expect 0x080003 // 2.048V
whismanoid 25:9d4012b0887f 4233 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4234 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4235 // docTest_item['action'] = 'DACCodeOfVoltage(2.048010) expect 0x080003'
whismanoid 25:9d4012b0887f 4236 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4237 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4238 // docTest_item['arglist'] = '2.048010'
whismanoid 25:9d4012b0887f 4239 // docTest_item['expect-value'] = '0x080003'
whismanoid 25:9d4012b0887f 4240 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4241 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4242 // call-function
whismanoid 27:485b1b2f334c 4243 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4244 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048010), (uint32_t)0x080003); // 2.048V
whismanoid 25:9d4012b0887f 4245 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048010, /* expect: */ (uint32_t)0x080003); // 2.048V
whismanoid 30:13fc9d492ee0 4246 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4247 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4248 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4249 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4250
whismanoid 25:9d4012b0887f 4251 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048020) expect 0x080005 // 2.048V
whismanoid 25:9d4012b0887f 4252 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4253 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4254 // docTest_item['action'] = 'DACCodeOfVoltage(2.048020) expect 0x080005'
whismanoid 25:9d4012b0887f 4255 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4256 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4257 // docTest_item['arglist'] = '2.048020'
whismanoid 25:9d4012b0887f 4258 // docTest_item['expect-value'] = '0x080005'
whismanoid 25:9d4012b0887f 4259 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4260 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4261 // call-function
whismanoid 27:485b1b2f334c 4262 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4263 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048020), (uint32_t)0x080005); // 2.048V
whismanoid 25:9d4012b0887f 4264 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048020, /* expect: */ (uint32_t)0x080005); // 2.048V
whismanoid 30:13fc9d492ee0 4265 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4266 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4267 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4268 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4269
whismanoid 25:9d4012b0887f 4270 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048030) expect 0x080008 // 2.048V
whismanoid 25:9d4012b0887f 4271 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4272 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4273 // docTest_item['action'] = 'DACCodeOfVoltage(2.048030) expect 0x080008'
whismanoid 25:9d4012b0887f 4274 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4275 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4276 // docTest_item['arglist'] = '2.048030'
whismanoid 25:9d4012b0887f 4277 // docTest_item['expect-value'] = '0x080008'
whismanoid 25:9d4012b0887f 4278 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4279 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4280 // call-function
whismanoid 27:485b1b2f334c 4281 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4282 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048030), (uint32_t)0x080008); // 2.048V
whismanoid 25:9d4012b0887f 4283 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048030, /* expect: */ (uint32_t)0x080008); // 2.048V
whismanoid 30:13fc9d492ee0 4284 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4285 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4286 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4287 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4288
whismanoid 25:9d4012b0887f 4289 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048040) expect 0x08000a // 2.048V
whismanoid 25:9d4012b0887f 4290 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4291 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4292 // docTest_item['action'] = 'DACCodeOfVoltage(2.048040) expect 0x08000a'
whismanoid 25:9d4012b0887f 4293 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4294 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4295 // docTest_item['arglist'] = '2.048040'
whismanoid 25:9d4012b0887f 4296 // docTest_item['expect-value'] = '0x08000a'
whismanoid 25:9d4012b0887f 4297 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4298 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4299 // call-function
whismanoid 27:485b1b2f334c 4300 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4301 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048040), (uint32_t)0x08000a); // 2.048V
whismanoid 25:9d4012b0887f 4302 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048040, /* expect: */ (uint32_t)0x08000a); // 2.048V
whismanoid 30:13fc9d492ee0 4303 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4304 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4305 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4306 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4307
whismanoid 25:9d4012b0887f 4308 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048050) expect 0x08000d // 2.048V
whismanoid 25:9d4012b0887f 4309 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4310 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4311 // docTest_item['action'] = 'DACCodeOfVoltage(2.048050) expect 0x08000d'
whismanoid 25:9d4012b0887f 4312 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4313 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4314 // docTest_item['arglist'] = '2.048050'
whismanoid 25:9d4012b0887f 4315 // docTest_item['expect-value'] = '0x08000d'
whismanoid 25:9d4012b0887f 4316 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4317 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4318 // call-function
whismanoid 27:485b1b2f334c 4319 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4320 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048050), (uint32_t)0x08000d); // 2.048V
whismanoid 25:9d4012b0887f 4321 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048050, /* expect: */ (uint32_t)0x08000d); // 2.048V
whismanoid 30:13fc9d492ee0 4322 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4323 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4324 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4325 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4326
whismanoid 25:9d4012b0887f 4327 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048060) expect 0x08000f // 2.048V
whismanoid 25:9d4012b0887f 4328 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4329 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4330 // docTest_item['action'] = 'DACCodeOfVoltage(2.048060) expect 0x08000f'
whismanoid 25:9d4012b0887f 4331 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4332 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4333 // docTest_item['arglist'] = '2.048060'
whismanoid 25:9d4012b0887f 4334 // docTest_item['expect-value'] = '0x08000f'
whismanoid 25:9d4012b0887f 4335 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4336 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4337 // call-function
whismanoid 27:485b1b2f334c 4338 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4339 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048060), (uint32_t)0x08000f); // 2.048V
whismanoid 25:9d4012b0887f 4340 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048060, /* expect: */ (uint32_t)0x08000f); // 2.048V
whismanoid 30:13fc9d492ee0 4341 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4342 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4343 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4344 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4345
whismanoid 25:9d4012b0887f 4346 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048070) expect 0x080012 // 2.048V
whismanoid 25:9d4012b0887f 4347 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4348 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4349 // docTest_item['action'] = 'DACCodeOfVoltage(2.048070) expect 0x080012'
whismanoid 25:9d4012b0887f 4350 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4351 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4352 // docTest_item['arglist'] = '2.048070'
whismanoid 25:9d4012b0887f 4353 // docTest_item['expect-value'] = '0x080012'
whismanoid 25:9d4012b0887f 4354 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4355 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4356 // call-function
whismanoid 27:485b1b2f334c 4357 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4358 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048070), (uint32_t)0x080012); // 2.048V
whismanoid 25:9d4012b0887f 4359 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048070, /* expect: */ (uint32_t)0x080012); // 2.048V
whismanoid 30:13fc9d492ee0 4360 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4361 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4362 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4363 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4364
whismanoid 25:9d4012b0887f 4365 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048080) expect 0x080014 // 2.048V
whismanoid 25:9d4012b0887f 4366 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4367 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4368 // docTest_item['action'] = 'DACCodeOfVoltage(2.048080) expect 0x080014'
whismanoid 25:9d4012b0887f 4369 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4370 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4371 // docTest_item['arglist'] = '2.048080'
whismanoid 25:9d4012b0887f 4372 // docTest_item['expect-value'] = '0x080014'
whismanoid 25:9d4012b0887f 4373 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4374 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4375 // call-function
whismanoid 27:485b1b2f334c 4376 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4377 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048080), (uint32_t)0x080014); // 2.048V
whismanoid 25:9d4012b0887f 4378 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048080, /* expect: */ (uint32_t)0x080014); // 2.048V
whismanoid 30:13fc9d492ee0 4379 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4380 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4381 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4382 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4383
whismanoid 25:9d4012b0887f 4384 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048090) expect 0x080017 // 2.048V
whismanoid 25:9d4012b0887f 4385 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4386 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4387 // docTest_item['action'] = 'DACCodeOfVoltage(2.048090) expect 0x080017'
whismanoid 25:9d4012b0887f 4388 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4389 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4390 // docTest_item['arglist'] = '2.048090'
whismanoid 25:9d4012b0887f 4391 // docTest_item['expect-value'] = '0x080017'
whismanoid 25:9d4012b0887f 4392 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4393 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4394 // call-function
whismanoid 27:485b1b2f334c 4395 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4396 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048090), (uint32_t)0x080017); // 2.048V
whismanoid 25:9d4012b0887f 4397 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048090, /* expect: */ (uint32_t)0x080017); // 2.048V
whismanoid 30:13fc9d492ee0 4398 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4399 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4400 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4401 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4402
whismanoid 25:9d4012b0887f 4403 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048100) expect 0x08001a // 2.048V
whismanoid 25:9d4012b0887f 4404 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4405 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4406 // docTest_item['action'] = 'DACCodeOfVoltage(2.048100) expect 0x08001a'
whismanoid 25:9d4012b0887f 4407 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4408 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4409 // docTest_item['arglist'] = '2.048100'
whismanoid 25:9d4012b0887f 4410 // docTest_item['expect-value'] = '0x08001a'
whismanoid 25:9d4012b0887f 4411 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4412 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4413 // call-function
whismanoid 27:485b1b2f334c 4414 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4415 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048100), (uint32_t)0x08001a); // 2.048V
whismanoid 25:9d4012b0887f 4416 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048100, /* expect: */ (uint32_t)0x08001a); // 2.048V
whismanoid 30:13fc9d492ee0 4417 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4418 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4419 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4420 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4421
whismanoid 25:9d4012b0887f 4422 // @test group DACCodeOfVoltage tinyTester.print("test_voltage_sweep V = 3.996000V to 4.106000V precision 0.010000V step 0.010000V")
whismanoid 25:9d4012b0887f 4423 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 4424 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4425 // docTest_item['action'] = 'tinyTester.print("test_voltage_sweep V = 3.996000V to 4.106000V precision 0.010000V step 0.010000V")'
whismanoid 25:9d4012b0887f 4426 // docTest_item['arglist'] = 'test_voltage_sweep V = 3.996000V to 4.106000V precision 0.010000V step 0.010000V'
whismanoid 25:9d4012b0887f 4427 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None
whismanoid 33:2c675744a01b 4428 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4429 // print-string
whismanoid 25:9d4012b0887f 4430 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 4431 // tinyTesterPrintStringLiteral = "test_voltage_sweep V = 3.996000V to 4.106000V precision 0.010000V step 0.010000V"
whismanoid 25:9d4012b0887f 4432 tinyTester.print("test_voltage_sweep V = 3.996000V to 4.106000V precision 0.010000V step 0.010000V");
whismanoid 30:13fc9d492ee0 4433 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4434 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4435 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4436 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4437
whismanoid 25:9d4012b0887f 4438 // @test group DACCodeOfVoltage DACCodeOfVoltage(3.990000) expect 0x0f9600 // 3.990V
whismanoid 25:9d4012b0887f 4439 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4440 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4441 // docTest_item['action'] = 'DACCodeOfVoltage(3.990000) expect 0x0f9600'
whismanoid 25:9d4012b0887f 4442 // docTest_item['remarks'] = '3.990V'
whismanoid 25:9d4012b0887f 4443 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4444 // docTest_item['arglist'] = '3.990000'
whismanoid 25:9d4012b0887f 4445 // docTest_item['expect-value'] = '0x0f9600'
whismanoid 25:9d4012b0887f 4446 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.990V
whismanoid 33:2c675744a01b 4447 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4448 // call-function
whismanoid 27:485b1b2f334c 4449 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4450 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.990000), (uint32_t)0x0f9600); // 3.990V
whismanoid 25:9d4012b0887f 4451 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.990000, /* expect: */ (uint32_t)0x0f9600); // 3.990V
whismanoid 30:13fc9d492ee0 4452 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4453 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4454 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4455 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4456
whismanoid 25:9d4012b0887f 4457 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.000000) expect 0x0fa000 // 4.000V
whismanoid 25:9d4012b0887f 4458 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4459 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4460 // docTest_item['action'] = 'DACCodeOfVoltage(4.000000) expect 0x0fa000'
whismanoid 25:9d4012b0887f 4461 // docTest_item['remarks'] = '4.000V'
whismanoid 25:9d4012b0887f 4462 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4463 // docTest_item['arglist'] = '4.000000'
whismanoid 25:9d4012b0887f 4464 // docTest_item['expect-value'] = '0x0fa000'
whismanoid 25:9d4012b0887f 4465 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.000V
whismanoid 33:2c675744a01b 4466 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4467 // call-function
whismanoid 27:485b1b2f334c 4468 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4469 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.000000), (uint32_t)0x0fa000); // 4.000V
whismanoid 25:9d4012b0887f 4470 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.000000, /* expect: */ (uint32_t)0x0fa000); // 4.000V
whismanoid 30:13fc9d492ee0 4471 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4472 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4473 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4474 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4475
whismanoid 25:9d4012b0887f 4476 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.010000) expect 0x0faa00 // 4.010V
whismanoid 25:9d4012b0887f 4477 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4478 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4479 // docTest_item['action'] = 'DACCodeOfVoltage(4.010000) expect 0x0faa00'
whismanoid 25:9d4012b0887f 4480 // docTest_item['remarks'] = '4.010V'
whismanoid 25:9d4012b0887f 4481 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4482 // docTest_item['arglist'] = '4.010000'
whismanoid 25:9d4012b0887f 4483 // docTest_item['expect-value'] = '0x0faa00'
whismanoid 25:9d4012b0887f 4484 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.010V
whismanoid 33:2c675744a01b 4485 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4486 // call-function
whismanoid 27:485b1b2f334c 4487 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4488 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.010000), (uint32_t)0x0faa00); // 4.010V
whismanoid 25:9d4012b0887f 4489 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.010000, /* expect: */ (uint32_t)0x0faa00); // 4.010V
whismanoid 30:13fc9d492ee0 4490 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4491 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4492 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4493 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4494
whismanoid 25:9d4012b0887f 4495 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.020000) expect 0x0fb400 // 4.020V
whismanoid 25:9d4012b0887f 4496 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4497 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4498 // docTest_item['action'] = 'DACCodeOfVoltage(4.020000) expect 0x0fb400'
whismanoid 25:9d4012b0887f 4499 // docTest_item['remarks'] = '4.020V'
whismanoid 25:9d4012b0887f 4500 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4501 // docTest_item['arglist'] = '4.020000'
whismanoid 25:9d4012b0887f 4502 // docTest_item['expect-value'] = '0x0fb400'
whismanoid 25:9d4012b0887f 4503 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.020V
whismanoid 33:2c675744a01b 4504 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4505 // call-function
whismanoid 27:485b1b2f334c 4506 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4507 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.020000), (uint32_t)0x0fb400); // 4.020V
whismanoid 25:9d4012b0887f 4508 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.020000, /* expect: */ (uint32_t)0x0fb400); // 4.020V
whismanoid 30:13fc9d492ee0 4509 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4510 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4511 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4512 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4513
whismanoid 25:9d4012b0887f 4514 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.030000) expect 0x0fbe00 // 4.030V
whismanoid 25:9d4012b0887f 4515 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4516 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4517 // docTest_item['action'] = 'DACCodeOfVoltage(4.030000) expect 0x0fbe00'
whismanoid 25:9d4012b0887f 4518 // docTest_item['remarks'] = '4.030V'
whismanoid 25:9d4012b0887f 4519 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4520 // docTest_item['arglist'] = '4.030000'
whismanoid 25:9d4012b0887f 4521 // docTest_item['expect-value'] = '0x0fbe00'
whismanoid 25:9d4012b0887f 4522 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.030V
whismanoid 33:2c675744a01b 4523 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4524 // call-function
whismanoid 27:485b1b2f334c 4525 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4526 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.030000), (uint32_t)0x0fbe00); // 4.030V
whismanoid 25:9d4012b0887f 4527 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.030000, /* expect: */ (uint32_t)0x0fbe00); // 4.030V
whismanoid 30:13fc9d492ee0 4528 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4529 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4530 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4531 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4532
whismanoid 25:9d4012b0887f 4533 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.040000) expect 0x0fc800 // 4.040V
whismanoid 25:9d4012b0887f 4534 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4535 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4536 // docTest_item['action'] = 'DACCodeOfVoltage(4.040000) expect 0x0fc800'
whismanoid 25:9d4012b0887f 4537 // docTest_item['remarks'] = '4.040V'
whismanoid 25:9d4012b0887f 4538 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4539 // docTest_item['arglist'] = '4.040000'
whismanoid 25:9d4012b0887f 4540 // docTest_item['expect-value'] = '0x0fc800'
whismanoid 25:9d4012b0887f 4541 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.040V
whismanoid 33:2c675744a01b 4542 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4543 // call-function
whismanoid 27:485b1b2f334c 4544 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4545 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.040000), (uint32_t)0x0fc800); // 4.040V
whismanoid 25:9d4012b0887f 4546 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.040000, /* expect: */ (uint32_t)0x0fc800); // 4.040V
whismanoid 30:13fc9d492ee0 4547 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4548 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4549 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4550 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4551
whismanoid 25:9d4012b0887f 4552 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.050000) expect 0x0fd200 // 4.050V
whismanoid 25:9d4012b0887f 4553 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4554 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4555 // docTest_item['action'] = 'DACCodeOfVoltage(4.050000) expect 0x0fd200'
whismanoid 25:9d4012b0887f 4556 // docTest_item['remarks'] = '4.050V'
whismanoid 25:9d4012b0887f 4557 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4558 // docTest_item['arglist'] = '4.050000'
whismanoid 25:9d4012b0887f 4559 // docTest_item['expect-value'] = '0x0fd200'
whismanoid 25:9d4012b0887f 4560 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.050V
whismanoid 33:2c675744a01b 4561 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4562 // call-function
whismanoid 27:485b1b2f334c 4563 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4564 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.050000), (uint32_t)0x0fd200); // 4.050V
whismanoid 25:9d4012b0887f 4565 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.050000, /* expect: */ (uint32_t)0x0fd200); // 4.050V
whismanoid 30:13fc9d492ee0 4566 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4567 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4568 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4569 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4570
whismanoid 25:9d4012b0887f 4571 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.060000) expect 0x0fdc00 // 4.060V
whismanoid 25:9d4012b0887f 4572 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4573 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4574 // docTest_item['action'] = 'DACCodeOfVoltage(4.060000) expect 0x0fdc00'
whismanoid 25:9d4012b0887f 4575 // docTest_item['remarks'] = '4.060V'
whismanoid 25:9d4012b0887f 4576 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4577 // docTest_item['arglist'] = '4.060000'
whismanoid 25:9d4012b0887f 4578 // docTest_item['expect-value'] = '0x0fdc00'
whismanoid 25:9d4012b0887f 4579 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.060V
whismanoid 33:2c675744a01b 4580 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4581 // call-function
whismanoid 27:485b1b2f334c 4582 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4583 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.060000), (uint32_t)0x0fdc00); // 4.060V
whismanoid 25:9d4012b0887f 4584 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.060000, /* expect: */ (uint32_t)0x0fdc00); // 4.060V
whismanoid 30:13fc9d492ee0 4585 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4586 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4587 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4588 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4589
whismanoid 25:9d4012b0887f 4590 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.070000) expect 0x0fe600 // 4.070V
whismanoid 25:9d4012b0887f 4591 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4592 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4593 // docTest_item['action'] = 'DACCodeOfVoltage(4.070000) expect 0x0fe600'
whismanoid 25:9d4012b0887f 4594 // docTest_item['remarks'] = '4.070V'
whismanoid 25:9d4012b0887f 4595 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4596 // docTest_item['arglist'] = '4.070000'
whismanoid 25:9d4012b0887f 4597 // docTest_item['expect-value'] = '0x0fe600'
whismanoid 25:9d4012b0887f 4598 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.070V
whismanoid 33:2c675744a01b 4599 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4600 // call-function
whismanoid 27:485b1b2f334c 4601 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4602 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.070000), (uint32_t)0x0fe600); // 4.070V
whismanoid 25:9d4012b0887f 4603 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.070000, /* expect: */ (uint32_t)0x0fe600); // 4.070V
whismanoid 30:13fc9d492ee0 4604 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4605 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4606 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4607 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4608
whismanoid 25:9d4012b0887f 4609 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.080000) expect 0x0ff000 // 4.080V
whismanoid 25:9d4012b0887f 4610 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4611 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4612 // docTest_item['action'] = 'DACCodeOfVoltage(4.080000) expect 0x0ff000'
whismanoid 25:9d4012b0887f 4613 // docTest_item['remarks'] = '4.080V'
whismanoid 25:9d4012b0887f 4614 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4615 // docTest_item['arglist'] = '4.080000'
whismanoid 25:9d4012b0887f 4616 // docTest_item['expect-value'] = '0x0ff000'
whismanoid 25:9d4012b0887f 4617 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.080V
whismanoid 33:2c675744a01b 4618 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4619 // call-function
whismanoid 27:485b1b2f334c 4620 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4621 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.080000), (uint32_t)0x0ff000); // 4.080V
whismanoid 25:9d4012b0887f 4622 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.080000, /* expect: */ (uint32_t)0x0ff000); // 4.080V
whismanoid 30:13fc9d492ee0 4623 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4624 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4625 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4626 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4627
whismanoid 25:9d4012b0887f 4628 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.090000) expect 0x0ffa00 // 4.090V
whismanoid 25:9d4012b0887f 4629 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4630 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4631 // docTest_item['action'] = 'DACCodeOfVoltage(4.090000) expect 0x0ffa00'
whismanoid 25:9d4012b0887f 4632 // docTest_item['remarks'] = '4.090V'
whismanoid 25:9d4012b0887f 4633 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4634 // docTest_item['arglist'] = '4.090000'
whismanoid 25:9d4012b0887f 4635 // docTest_item['expect-value'] = '0x0ffa00'
whismanoid 25:9d4012b0887f 4636 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.090V
whismanoid 33:2c675744a01b 4637 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4638 // call-function
whismanoid 27:485b1b2f334c 4639 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4640 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.090000), (uint32_t)0x0ffa00); // 4.090V
whismanoid 25:9d4012b0887f 4641 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.090000, /* expect: */ (uint32_t)0x0ffa00); // 4.090V
whismanoid 30:13fc9d492ee0 4642 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4643 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4644 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4645 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4646
whismanoid 25:9d4012b0887f 4647 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.100000) expect 0x0fffff // 4.100V
whismanoid 25:9d4012b0887f 4648 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4649 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4650 // docTest_item['action'] = 'DACCodeOfVoltage(4.100000) expect 0x0fffff'
whismanoid 25:9d4012b0887f 4651 // docTest_item['remarks'] = '4.100V'
whismanoid 25:9d4012b0887f 4652 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4653 // docTest_item['arglist'] = '4.100000'
whismanoid 25:9d4012b0887f 4654 // docTest_item['expect-value'] = '0x0fffff'
whismanoid 25:9d4012b0887f 4655 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.100V
whismanoid 33:2c675744a01b 4656 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4657 // call-function
whismanoid 27:485b1b2f334c 4658 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4659 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.100000), (uint32_t)0x0fffff); // 4.100V
whismanoid 25:9d4012b0887f 4660 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.100000, /* expect: */ (uint32_t)0x0fffff); // 4.100V
whismanoid 30:13fc9d492ee0 4661 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4662 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4663 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4664 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4665
whismanoid 25:9d4012b0887f 4666 // @test group DACCodeOfVoltage tinyTester.print("test_lsb_sweep V = 4.096000V LSBradius = 3LSB")
whismanoid 25:9d4012b0887f 4667 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 4668 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4669 // docTest_item['action'] = 'tinyTester.print("test_lsb_sweep V = 4.096000V LSBradius = 3LSB")'
whismanoid 25:9d4012b0887f 4670 // docTest_item['arglist'] = 'test_lsb_sweep V = 4.096000V LSBradius = 3LSB'
whismanoid 25:9d4012b0887f 4671 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None
whismanoid 33:2c675744a01b 4672 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4673 // print-string
whismanoid 25:9d4012b0887f 4674 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 4675 // tinyTesterPrintStringLiteral = "test_lsb_sweep V = 4.096000V LSBradius = 3LSB"
whismanoid 25:9d4012b0887f 4676 tinyTester.print("test_lsb_sweep V = 4.096000V LSBradius = 3LSB");
whismanoid 30:13fc9d492ee0 4677 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4678 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4679 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4680 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4681
whismanoid 25:9d4012b0887f 4682 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.095988) expect 0x0ffffd // 4.096V + -3.0LSB
whismanoid 25:9d4012b0887f 4683 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4684 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4685 // docTest_item['action'] = 'DACCodeOfVoltage(4.095988) expect 0x0ffffd'
whismanoid 25:9d4012b0887f 4686 // docTest_item['remarks'] = '4.096V + -3.0LSB'
whismanoid 25:9d4012b0887f 4687 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4688 // docTest_item['arglist'] = '4.095988'
whismanoid 25:9d4012b0887f 4689 // docTest_item['expect-value'] = '0x0ffffd'
whismanoid 25:9d4012b0887f 4690 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + -3.0LSB
whismanoid 33:2c675744a01b 4691 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4692 // call-function
whismanoid 27:485b1b2f334c 4693 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4694 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.095988), (uint32_t)0x0ffffd); // 4.096V + -3.0LSB
whismanoid 25:9d4012b0887f 4695 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.095988, /* expect: */ (uint32_t)0x0ffffd); // 4.096V + -3.0LSB
whismanoid 30:13fc9d492ee0 4696 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4697 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4698 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4699 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4700
whismanoid 25:9d4012b0887f 4701 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.095990) expect 0x0ffffd // 4.096V + -2.5LSB 0x0ffffd not 0x0ffffe
whismanoid 25:9d4012b0887f 4702 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4703 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4704 // docTest_item['action'] = 'DACCodeOfVoltage(4.095990) expect 0x0ffffd'
whismanoid 25:9d4012b0887f 4705 // docTest_item['remarks'] = '4.096V + -2.5LSB 0x0ffffd not 0x0ffffe'
whismanoid 25:9d4012b0887f 4706 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4707 // docTest_item['arglist'] = '4.095990'
whismanoid 25:9d4012b0887f 4708 // docTest_item['expect-value'] = '0x0ffffd'
whismanoid 25:9d4012b0887f 4709 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + -2.5LSB 0x0ffffd not 0x0ffffe
whismanoid 33:2c675744a01b 4710 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4711 // call-function
whismanoid 27:485b1b2f334c 4712 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4713 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.095990), (uint32_t)0x0ffffd); // 4.096V + -2.5LSB 0x0ffffd not 0x0ffffe
whismanoid 25:9d4012b0887f 4714 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.095990, /* expect: */ (uint32_t)0x0ffffd); // 4.096V + -2.5LSB 0x0ffffd not 0x0ffffe
whismanoid 30:13fc9d492ee0 4715 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4716 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4717 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4718 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4719
whismanoid 25:9d4012b0887f 4720 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.095992) expect 0x0ffffe // 4.096V + -2.0LSB
whismanoid 25:9d4012b0887f 4721 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4722 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4723 // docTest_item['action'] = 'DACCodeOfVoltage(4.095992) expect 0x0ffffe'
whismanoid 25:9d4012b0887f 4724 // docTest_item['remarks'] = '4.096V + -2.0LSB'
whismanoid 25:9d4012b0887f 4725 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4726 // docTest_item['arglist'] = '4.095992'
whismanoid 25:9d4012b0887f 4727 // docTest_item['expect-value'] = '0x0ffffe'
whismanoid 25:9d4012b0887f 4728 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + -2.0LSB
whismanoid 33:2c675744a01b 4729 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4730 // call-function
whismanoid 27:485b1b2f334c 4731 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4732 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.095992), (uint32_t)0x0ffffe); // 4.096V + -2.0LSB
whismanoid 25:9d4012b0887f 4733 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.095992, /* expect: */ (uint32_t)0x0ffffe); // 4.096V + -2.0LSB
whismanoid 30:13fc9d492ee0 4734 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4735 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4736 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4737 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4738
whismanoid 25:9d4012b0887f 4739 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.095994) expect 0x0ffffe // 4.096V + -1.5LSB
whismanoid 25:9d4012b0887f 4740 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4741 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4742 // docTest_item['action'] = 'DACCodeOfVoltage(4.095994) expect 0x0ffffe'
whismanoid 25:9d4012b0887f 4743 // docTest_item['remarks'] = '4.096V + -1.5LSB'
whismanoid 25:9d4012b0887f 4744 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4745 // docTest_item['arglist'] = '4.095994'
whismanoid 25:9d4012b0887f 4746 // docTest_item['expect-value'] = '0x0ffffe'
whismanoid 25:9d4012b0887f 4747 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + -1.5LSB
whismanoid 33:2c675744a01b 4748 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4749 // call-function
whismanoid 27:485b1b2f334c 4750 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4751 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.095994), (uint32_t)0x0ffffe); // 4.096V + -1.5LSB
whismanoid 25:9d4012b0887f 4752 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.095994, /* expect: */ (uint32_t)0x0ffffe); // 4.096V + -1.5LSB
whismanoid 30:13fc9d492ee0 4753 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4754 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4755 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4756 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4757
whismanoid 25:9d4012b0887f 4758 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.095996) expect 0x0fffff // 4.096V + -1.0LSB
whismanoid 25:9d4012b0887f 4759 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4760 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4761 // docTest_item['action'] = 'DACCodeOfVoltage(4.095996) expect 0x0fffff'
whismanoid 25:9d4012b0887f 4762 // docTest_item['remarks'] = '4.096V + -1.0LSB'
whismanoid 25:9d4012b0887f 4763 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4764 // docTest_item['arglist'] = '4.095996'
whismanoid 25:9d4012b0887f 4765 // docTest_item['expect-value'] = '0x0fffff'
whismanoid 25:9d4012b0887f 4766 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + -1.0LSB
whismanoid 33:2c675744a01b 4767 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4768 // call-function
whismanoid 27:485b1b2f334c 4769 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4770 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.095996), (uint32_t)0x0fffff); // 4.096V + -1.0LSB
whismanoid 25:9d4012b0887f 4771 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.095996, /* expect: */ (uint32_t)0x0fffff); // 4.096V + -1.0LSB
whismanoid 30:13fc9d492ee0 4772 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4773 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4774 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4775 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4776
whismanoid 25:9d4012b0887f 4777 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.095998) expect 0x0fffff // 4.096V + -0.5LSB
whismanoid 25:9d4012b0887f 4778 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4779 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4780 // docTest_item['action'] = 'DACCodeOfVoltage(4.095998) expect 0x0fffff'
whismanoid 25:9d4012b0887f 4781 // docTest_item['remarks'] = '4.096V + -0.5LSB'
whismanoid 25:9d4012b0887f 4782 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4783 // docTest_item['arglist'] = '4.095998'
whismanoid 25:9d4012b0887f 4784 // docTest_item['expect-value'] = '0x0fffff'
whismanoid 25:9d4012b0887f 4785 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + -0.5LSB
whismanoid 33:2c675744a01b 4786 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4787 // call-function
whismanoid 27:485b1b2f334c 4788 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4789 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.095998), (uint32_t)0x0fffff); // 4.096V + -0.5LSB
whismanoid 25:9d4012b0887f 4790 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.095998, /* expect: */ (uint32_t)0x0fffff); // 4.096V + -0.5LSB
whismanoid 30:13fc9d492ee0 4791 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4792 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4793 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4794 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4795
whismanoid 25:9d4012b0887f 4796 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.096000) expect 0x0fffff // 4.096V + 0.0LSB
whismanoid 25:9d4012b0887f 4797 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4798 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4799 // docTest_item['action'] = 'DACCodeOfVoltage(4.096000) expect 0x0fffff'
whismanoid 25:9d4012b0887f 4800 // docTest_item['remarks'] = '4.096V + 0.0LSB'
whismanoid 25:9d4012b0887f 4801 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4802 // docTest_item['arglist'] = '4.096000'
whismanoid 25:9d4012b0887f 4803 // docTest_item['expect-value'] = '0x0fffff'
whismanoid 25:9d4012b0887f 4804 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + 0.0LSB
whismanoid 33:2c675744a01b 4805 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4806 // call-function
whismanoid 27:485b1b2f334c 4807 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4808 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.096000), (uint32_t)0x0fffff); // 4.096V + 0.0LSB
whismanoid 25:9d4012b0887f 4809 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.096000, /* expect: */ (uint32_t)0x0fffff); // 4.096V + 0.0LSB
whismanoid 30:13fc9d492ee0 4810 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4811 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4812 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4813 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4814
whismanoid 25:9d4012b0887f 4815 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.096002) expect 0x0fffff // 4.096V + 0.5LSB
whismanoid 25:9d4012b0887f 4816 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4817 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4818 // docTest_item['action'] = 'DACCodeOfVoltage(4.096002) expect 0x0fffff'
whismanoid 25:9d4012b0887f 4819 // docTest_item['remarks'] = '4.096V + 0.5LSB'
whismanoid 25:9d4012b0887f 4820 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4821 // docTest_item['arglist'] = '4.096002'
whismanoid 25:9d4012b0887f 4822 // docTest_item['expect-value'] = '0x0fffff'
whismanoid 25:9d4012b0887f 4823 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + 0.5LSB
whismanoid 33:2c675744a01b 4824 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4825 // call-function
whismanoid 27:485b1b2f334c 4826 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4827 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.096002), (uint32_t)0x0fffff); // 4.096V + 0.5LSB
whismanoid 25:9d4012b0887f 4828 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.096002, /* expect: */ (uint32_t)0x0fffff); // 4.096V + 0.5LSB
whismanoid 30:13fc9d492ee0 4829 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4830 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4831 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4832 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4833
whismanoid 25:9d4012b0887f 4834 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.096004) expect 0x0fffff // 4.096V + 1.0LSB
whismanoid 25:9d4012b0887f 4835 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4836 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4837 // docTest_item['action'] = 'DACCodeOfVoltage(4.096004) expect 0x0fffff'
whismanoid 25:9d4012b0887f 4838 // docTest_item['remarks'] = '4.096V + 1.0LSB'
whismanoid 25:9d4012b0887f 4839 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4840 // docTest_item['arglist'] = '4.096004'
whismanoid 25:9d4012b0887f 4841 // docTest_item['expect-value'] = '0x0fffff'
whismanoid 25:9d4012b0887f 4842 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + 1.0LSB
whismanoid 33:2c675744a01b 4843 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4844 // call-function
whismanoid 27:485b1b2f334c 4845 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4846 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.096004), (uint32_t)0x0fffff); // 4.096V + 1.0LSB
whismanoid 25:9d4012b0887f 4847 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.096004, /* expect: */ (uint32_t)0x0fffff); // 4.096V + 1.0LSB
whismanoid 30:13fc9d492ee0 4848 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4849 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4850 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4851 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4852
whismanoid 25:9d4012b0887f 4853 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.096006) expect 0x0fffff // 4.096V + 1.5LSB
whismanoid 25:9d4012b0887f 4854 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4855 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4856 // docTest_item['action'] = 'DACCodeOfVoltage(4.096006) expect 0x0fffff'
whismanoid 25:9d4012b0887f 4857 // docTest_item['remarks'] = '4.096V + 1.5LSB'
whismanoid 25:9d4012b0887f 4858 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4859 // docTest_item['arglist'] = '4.096006'
whismanoid 25:9d4012b0887f 4860 // docTest_item['expect-value'] = '0x0fffff'
whismanoid 25:9d4012b0887f 4861 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + 1.5LSB
whismanoid 33:2c675744a01b 4862 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4863 // call-function
whismanoid 27:485b1b2f334c 4864 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4865 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.096006), (uint32_t)0x0fffff); // 4.096V + 1.5LSB
whismanoid 25:9d4012b0887f 4866 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.096006, /* expect: */ (uint32_t)0x0fffff); // 4.096V + 1.5LSB
whismanoid 30:13fc9d492ee0 4867 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4868 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4869 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4870 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4871
whismanoid 25:9d4012b0887f 4872 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.096008) expect 0x0fffff // 4.096V + 2.0LSB
whismanoid 25:9d4012b0887f 4873 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4874 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4875 // docTest_item['action'] = 'DACCodeOfVoltage(4.096008) expect 0x0fffff'
whismanoid 25:9d4012b0887f 4876 // docTest_item['remarks'] = '4.096V + 2.0LSB'
whismanoid 25:9d4012b0887f 4877 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4878 // docTest_item['arglist'] = '4.096008'
whismanoid 25:9d4012b0887f 4879 // docTest_item['expect-value'] = '0x0fffff'
whismanoid 25:9d4012b0887f 4880 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + 2.0LSB
whismanoid 33:2c675744a01b 4881 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4882 // call-function
whismanoid 27:485b1b2f334c 4883 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4884 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.096008), (uint32_t)0x0fffff); // 4.096V + 2.0LSB
whismanoid 25:9d4012b0887f 4885 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.096008, /* expect: */ (uint32_t)0x0fffff); // 4.096V + 2.0LSB
whismanoid 30:13fc9d492ee0 4886 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4887 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4888 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4889 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4890
whismanoid 25:9d4012b0887f 4891 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.096010) expect 0x0fffff // 4.096V + 2.5LSB
whismanoid 25:9d4012b0887f 4892 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4893 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4894 // docTest_item['action'] = 'DACCodeOfVoltage(4.096010) expect 0x0fffff'
whismanoid 25:9d4012b0887f 4895 // docTest_item['remarks'] = '4.096V + 2.5LSB'
whismanoid 25:9d4012b0887f 4896 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4897 // docTest_item['arglist'] = '4.096010'
whismanoid 25:9d4012b0887f 4898 // docTest_item['expect-value'] = '0x0fffff'
whismanoid 25:9d4012b0887f 4899 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + 2.5LSB
whismanoid 33:2c675744a01b 4900 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4901 // call-function
whismanoid 27:485b1b2f334c 4902 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4903 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.096010), (uint32_t)0x0fffff); // 4.096V + 2.5LSB
whismanoid 25:9d4012b0887f 4904 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.096010, /* expect: */ (uint32_t)0x0fffff); // 4.096V + 2.5LSB
whismanoid 30:13fc9d492ee0 4905 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4906 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4907 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4908 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4909
whismanoid 25:9d4012b0887f 4910 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.096012) expect 0x0fffff // 4.096V + 3.0LSB
whismanoid 25:9d4012b0887f 4911 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4912 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4913 // docTest_item['action'] = 'DACCodeOfVoltage(4.096012) expect 0x0fffff'
whismanoid 25:9d4012b0887f 4914 // docTest_item['remarks'] = '4.096V + 3.0LSB'
whismanoid 25:9d4012b0887f 4915 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4916 // docTest_item['arglist'] = '4.096012'
whismanoid 25:9d4012b0887f 4917 // docTest_item['expect-value'] = '0x0fffff'
whismanoid 25:9d4012b0887f 4918 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + 3.0LSB
whismanoid 33:2c675744a01b 4919 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4920 // call-function
whismanoid 27:485b1b2f334c 4921 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4922 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.096012), (uint32_t)0x0fffff); // 4.096V + 3.0LSB
whismanoid 25:9d4012b0887f 4923 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.096012, /* expect: */ (uint32_t)0x0fffff); // 4.096V + 3.0LSB
whismanoid 30:13fc9d492ee0 4924 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4925 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4926 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4927 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4928
whismanoid 25:9d4012b0887f 4929 // @test group DACCodeOfVoltage tinyTester.print("test_lsb_sweep V = 3.072000V LSBradius = 3LSB")
whismanoid 25:9d4012b0887f 4930 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 4931 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4932 // docTest_item['action'] = 'tinyTester.print("test_lsb_sweep V = 3.072000V LSBradius = 3LSB")'
whismanoid 25:9d4012b0887f 4933 // docTest_item['arglist'] = 'test_lsb_sweep V = 3.072000V LSBradius = 3LSB'
whismanoid 25:9d4012b0887f 4934 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None
whismanoid 33:2c675744a01b 4935 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4936 // print-string
whismanoid 25:9d4012b0887f 4937 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 4938 // tinyTesterPrintStringLiteral = "test_lsb_sweep V = 3.072000V LSBradius = 3LSB"
whismanoid 25:9d4012b0887f 4939 tinyTester.print("test_lsb_sweep V = 3.072000V LSBradius = 3LSB");
whismanoid 30:13fc9d492ee0 4940 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4941 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4942 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4943 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4944
whismanoid 25:9d4012b0887f 4945 // @test group DACCodeOfVoltage DACCodeOfVoltage(3.071988) expect 0x0bfffd // 3.072V + -3.0LSB
whismanoid 25:9d4012b0887f 4946 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4947 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4948 // docTest_item['action'] = 'DACCodeOfVoltage(3.071988) expect 0x0bfffd'
whismanoid 25:9d4012b0887f 4949 // docTest_item['remarks'] = '3.072V + -3.0LSB'
whismanoid 25:9d4012b0887f 4950 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4951 // docTest_item['arglist'] = '3.071988'
whismanoid 25:9d4012b0887f 4952 // docTest_item['expect-value'] = '0x0bfffd'
whismanoid 25:9d4012b0887f 4953 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + -3.0LSB
whismanoid 33:2c675744a01b 4954 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4955 // call-function
whismanoid 27:485b1b2f334c 4956 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4957 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.071988), (uint32_t)0x0bfffd); // 3.072V + -3.0LSB
whismanoid 25:9d4012b0887f 4958 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.071988, /* expect: */ (uint32_t)0x0bfffd); // 3.072V + -3.0LSB
whismanoid 30:13fc9d492ee0 4959 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4960 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4961 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4962 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4963
whismanoid 25:9d4012b0887f 4964 // @test group DACCodeOfVoltage DACCodeOfVoltage(3.071990) expect 0x0bfffd // 3.072V + -2.5LSB 0x0bfffd not 0x0bfffe
whismanoid 25:9d4012b0887f 4965 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4966 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4967 // docTest_item['action'] = 'DACCodeOfVoltage(3.071990) expect 0x0bfffd'
whismanoid 25:9d4012b0887f 4968 // docTest_item['remarks'] = '3.072V + -2.5LSB 0x0bfffd not 0x0bfffe'
whismanoid 25:9d4012b0887f 4969 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4970 // docTest_item['arglist'] = '3.071990'
whismanoid 25:9d4012b0887f 4971 // docTest_item['expect-value'] = '0x0bfffd'
whismanoid 25:9d4012b0887f 4972 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + -2.5LSB 0x0bfffd not 0x0bfffe
whismanoid 33:2c675744a01b 4973 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4974 // call-function
whismanoid 27:485b1b2f334c 4975 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4976 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.071990), (uint32_t)0x0bfffd); // 3.072V + -2.5LSB 0x0bfffd not 0x0bfffe
whismanoid 25:9d4012b0887f 4977 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.071990, /* expect: */ (uint32_t)0x0bfffd); // 3.072V + -2.5LSB 0x0bfffd not 0x0bfffe
whismanoid 30:13fc9d492ee0 4978 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4979 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4980 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4981 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4982
whismanoid 25:9d4012b0887f 4983 // @test group DACCodeOfVoltage DACCodeOfVoltage(3.071992) expect 0x0bfffe // 3.072V + -2.0LSB
whismanoid 25:9d4012b0887f 4984 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4985 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4986 // docTest_item['action'] = 'DACCodeOfVoltage(3.071992) expect 0x0bfffe'
whismanoid 25:9d4012b0887f 4987 // docTest_item['remarks'] = '3.072V + -2.0LSB'
whismanoid 25:9d4012b0887f 4988 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4989 // docTest_item['arglist'] = '3.071992'
whismanoid 25:9d4012b0887f 4990 // docTest_item['expect-value'] = '0x0bfffe'
whismanoid 25:9d4012b0887f 4991 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + -2.0LSB
whismanoid 33:2c675744a01b 4992 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4993 // call-function
whismanoid 27:485b1b2f334c 4994 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4995 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.071992), (uint32_t)0x0bfffe); // 3.072V + -2.0LSB
whismanoid 25:9d4012b0887f 4996 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.071992, /* expect: */ (uint32_t)0x0bfffe); // 3.072V + -2.0LSB
whismanoid 30:13fc9d492ee0 4997 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4998 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4999 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5000 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5001
whismanoid 25:9d4012b0887f 5002 // @test group DACCodeOfVoltage DACCodeOfVoltage(3.071994) expect 0x0bfffe // 3.072V + -1.5LSB 0x0bfffe not 0x0bffff
whismanoid 25:9d4012b0887f 5003 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5004 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5005 // docTest_item['action'] = 'DACCodeOfVoltage(3.071994) expect 0x0bfffe'
whismanoid 25:9d4012b0887f 5006 // docTest_item['remarks'] = '3.072V + -1.5LSB 0x0bfffe not 0x0bffff'
whismanoid 25:9d4012b0887f 5007 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5008 // docTest_item['arglist'] = '3.071994'
whismanoid 25:9d4012b0887f 5009 // docTest_item['expect-value'] = '0x0bfffe'
whismanoid 25:9d4012b0887f 5010 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + -1.5LSB 0x0bfffe not 0x0bffff
whismanoid 33:2c675744a01b 5011 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5012 // call-function
whismanoid 27:485b1b2f334c 5013 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5014 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.071994), (uint32_t)0x0bfffe); // 3.072V + -1.5LSB 0x0bfffe not 0x0bffff
whismanoid 25:9d4012b0887f 5015 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.071994, /* expect: */ (uint32_t)0x0bfffe); // 3.072V + -1.5LSB 0x0bfffe not 0x0bffff
whismanoid 30:13fc9d492ee0 5016 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5017 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5018 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5019 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5020
whismanoid 25:9d4012b0887f 5021 // @test group DACCodeOfVoltage DACCodeOfVoltage(3.071996) expect 0x0bffff // 3.072V + -1.0LSB
whismanoid 25:9d4012b0887f 5022 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5023 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5024 // docTest_item['action'] = 'DACCodeOfVoltage(3.071996) expect 0x0bffff'
whismanoid 25:9d4012b0887f 5025 // docTest_item['remarks'] = '3.072V + -1.0LSB'
whismanoid 25:9d4012b0887f 5026 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5027 // docTest_item['arglist'] = '3.071996'
whismanoid 25:9d4012b0887f 5028 // docTest_item['expect-value'] = '0x0bffff'
whismanoid 25:9d4012b0887f 5029 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + -1.0LSB
whismanoid 33:2c675744a01b 5030 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5031 // call-function
whismanoid 27:485b1b2f334c 5032 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5033 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.071996), (uint32_t)0x0bffff); // 3.072V + -1.0LSB
whismanoid 25:9d4012b0887f 5034 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.071996, /* expect: */ (uint32_t)0x0bffff); // 3.072V + -1.0LSB
whismanoid 30:13fc9d492ee0 5035 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5036 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5037 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5038 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5039
whismanoid 25:9d4012b0887f 5040 // @test group DACCodeOfVoltage DACCodeOfVoltage(3.071998) expect 0x0bffff // 3.072V + -0.5LSB 0x0bffff not 0x0c0000
whismanoid 25:9d4012b0887f 5041 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5042 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5043 // docTest_item['action'] = 'DACCodeOfVoltage(3.071998) expect 0x0bffff'
whismanoid 25:9d4012b0887f 5044 // docTest_item['remarks'] = '3.072V + -0.5LSB 0x0bffff not 0x0c0000'
whismanoid 25:9d4012b0887f 5045 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5046 // docTest_item['arglist'] = '3.071998'
whismanoid 25:9d4012b0887f 5047 // docTest_item['expect-value'] = '0x0bffff'
whismanoid 25:9d4012b0887f 5048 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + -0.5LSB 0x0bffff not 0x0c0000
whismanoid 33:2c675744a01b 5049 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5050 // call-function
whismanoid 27:485b1b2f334c 5051 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5052 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.071998), (uint32_t)0x0bffff); // 3.072V + -0.5LSB 0x0bffff not 0x0c0000
whismanoid 25:9d4012b0887f 5053 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.071998, /* expect: */ (uint32_t)0x0bffff); // 3.072V + -0.5LSB 0x0bffff not 0x0c0000
whismanoid 30:13fc9d492ee0 5054 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5055 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5056 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5057 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5058
whismanoid 25:9d4012b0887f 5059 // @test group DACCodeOfVoltage DACCodeOfVoltage(3.072000) expect 0x0c0000 // 3.072V + 0.0LSB
whismanoid 25:9d4012b0887f 5060 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5061 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5062 // docTest_item['action'] = 'DACCodeOfVoltage(3.072000) expect 0x0c0000'
whismanoid 25:9d4012b0887f 5063 // docTest_item['remarks'] = '3.072V + 0.0LSB'
whismanoid 25:9d4012b0887f 5064 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5065 // docTest_item['arglist'] = '3.072000'
whismanoid 25:9d4012b0887f 5066 // docTest_item['expect-value'] = '0x0c0000'
whismanoid 25:9d4012b0887f 5067 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + 0.0LSB
whismanoid 33:2c675744a01b 5068 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5069 // call-function
whismanoid 27:485b1b2f334c 5070 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5071 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.072000), (uint32_t)0x0c0000); // 3.072V + 0.0LSB
whismanoid 25:9d4012b0887f 5072 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.072000, /* expect: */ (uint32_t)0x0c0000); // 3.072V + 0.0LSB
whismanoid 30:13fc9d492ee0 5073 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5074 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5075 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5076 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5077
whismanoid 25:9d4012b0887f 5078 // @test group DACCodeOfVoltage DACCodeOfVoltage(3.072002) expect 0x0c0001 // 3.072V + 0.5LSB
whismanoid 25:9d4012b0887f 5079 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5080 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5081 // docTest_item['action'] = 'DACCodeOfVoltage(3.072002) expect 0x0c0001'
whismanoid 25:9d4012b0887f 5082 // docTest_item['remarks'] = '3.072V + 0.5LSB'
whismanoid 25:9d4012b0887f 5083 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5084 // docTest_item['arglist'] = '3.072002'
whismanoid 25:9d4012b0887f 5085 // docTest_item['expect-value'] = '0x0c0001'
whismanoid 25:9d4012b0887f 5086 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + 0.5LSB
whismanoid 33:2c675744a01b 5087 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5088 // call-function
whismanoid 27:485b1b2f334c 5089 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5090 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.072002), (uint32_t)0x0c0001); // 3.072V + 0.5LSB
whismanoid 25:9d4012b0887f 5091 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.072002, /* expect: */ (uint32_t)0x0c0001); // 3.072V + 0.5LSB
whismanoid 30:13fc9d492ee0 5092 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5093 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5094 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5095 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5096
whismanoid 25:9d4012b0887f 5097 // @test group DACCodeOfVoltage DACCodeOfVoltage(3.072004) expect 0x0c0001 // 3.072V + 1.0LSB
whismanoid 25:9d4012b0887f 5098 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5099 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5100 // docTest_item['action'] = 'DACCodeOfVoltage(3.072004) expect 0x0c0001'
whismanoid 25:9d4012b0887f 5101 // docTest_item['remarks'] = '3.072V + 1.0LSB'
whismanoid 25:9d4012b0887f 5102 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5103 // docTest_item['arglist'] = '3.072004'
whismanoid 25:9d4012b0887f 5104 // docTest_item['expect-value'] = '0x0c0001'
whismanoid 25:9d4012b0887f 5105 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + 1.0LSB
whismanoid 33:2c675744a01b 5106 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5107 // call-function
whismanoid 27:485b1b2f334c 5108 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5109 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.072004), (uint32_t)0x0c0001); // 3.072V + 1.0LSB
whismanoid 25:9d4012b0887f 5110 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.072004, /* expect: */ (uint32_t)0x0c0001); // 3.072V + 1.0LSB
whismanoid 30:13fc9d492ee0 5111 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5112 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5113 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5114 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5115
whismanoid 25:9d4012b0887f 5116 // @test group DACCodeOfVoltage DACCodeOfVoltage(3.072006) expect 0x0c0002 // 3.072V + 1.5LSB
whismanoid 25:9d4012b0887f 5117 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5118 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5119 // docTest_item['action'] = 'DACCodeOfVoltage(3.072006) expect 0x0c0002'
whismanoid 25:9d4012b0887f 5120 // docTest_item['remarks'] = '3.072V + 1.5LSB'
whismanoid 25:9d4012b0887f 5121 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5122 // docTest_item['arglist'] = '3.072006'
whismanoid 25:9d4012b0887f 5123 // docTest_item['expect-value'] = '0x0c0002'
whismanoid 25:9d4012b0887f 5124 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + 1.5LSB
whismanoid 33:2c675744a01b 5125 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5126 // call-function
whismanoid 27:485b1b2f334c 5127 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5128 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.072006), (uint32_t)0x0c0002); // 3.072V + 1.5LSB
whismanoid 25:9d4012b0887f 5129 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.072006, /* expect: */ (uint32_t)0x0c0002); // 3.072V + 1.5LSB
whismanoid 30:13fc9d492ee0 5130 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5131 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5132 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5133 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5134
whismanoid 25:9d4012b0887f 5135 // @test group DACCodeOfVoltage DACCodeOfVoltage(3.072008) expect 0x0c0002 // 3.072V + 2.0LSB
whismanoid 25:9d4012b0887f 5136 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5137 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5138 // docTest_item['action'] = 'DACCodeOfVoltage(3.072008) expect 0x0c0002'
whismanoid 25:9d4012b0887f 5139 // docTest_item['remarks'] = '3.072V + 2.0LSB'
whismanoid 25:9d4012b0887f 5140 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5141 // docTest_item['arglist'] = '3.072008'
whismanoid 25:9d4012b0887f 5142 // docTest_item['expect-value'] = '0x0c0002'
whismanoid 25:9d4012b0887f 5143 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + 2.0LSB
whismanoid 33:2c675744a01b 5144 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5145 // call-function
whismanoid 27:485b1b2f334c 5146 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5147 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.072008), (uint32_t)0x0c0002); // 3.072V + 2.0LSB
whismanoid 25:9d4012b0887f 5148 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.072008, /* expect: */ (uint32_t)0x0c0002); // 3.072V + 2.0LSB
whismanoid 30:13fc9d492ee0 5149 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5150 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5151 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5152 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5153
whismanoid 25:9d4012b0887f 5154 // @test group DACCodeOfVoltage DACCodeOfVoltage(3.072010) expect 0x0c0003 // 3.072V + 2.5LSB
whismanoid 25:9d4012b0887f 5155 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5156 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5157 // docTest_item['action'] = 'DACCodeOfVoltage(3.072010) expect 0x0c0003'
whismanoid 25:9d4012b0887f 5158 // docTest_item['remarks'] = '3.072V + 2.5LSB'
whismanoid 25:9d4012b0887f 5159 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5160 // docTest_item['arglist'] = '3.072010'
whismanoid 25:9d4012b0887f 5161 // docTest_item['expect-value'] = '0x0c0003'
whismanoid 25:9d4012b0887f 5162 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + 2.5LSB
whismanoid 33:2c675744a01b 5163 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5164 // call-function
whismanoid 27:485b1b2f334c 5165 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5166 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.072010), (uint32_t)0x0c0003); // 3.072V + 2.5LSB
whismanoid 25:9d4012b0887f 5167 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.072010, /* expect: */ (uint32_t)0x0c0003); // 3.072V + 2.5LSB
whismanoid 30:13fc9d492ee0 5168 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5169 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5170 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5171 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5172
whismanoid 25:9d4012b0887f 5173 // @test group DACCodeOfVoltage DACCodeOfVoltage(3.072012) expect 0x0c0003 // 3.072V + 3.0LSB
whismanoid 25:9d4012b0887f 5174 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5175 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5176 // docTest_item['action'] = 'DACCodeOfVoltage(3.072012) expect 0x0c0003'
whismanoid 25:9d4012b0887f 5177 // docTest_item['remarks'] = '3.072V + 3.0LSB'
whismanoid 25:9d4012b0887f 5178 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5179 // docTest_item['arglist'] = '3.072012'
whismanoid 25:9d4012b0887f 5180 // docTest_item['expect-value'] = '0x0c0003'
whismanoid 25:9d4012b0887f 5181 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + 3.0LSB
whismanoid 33:2c675744a01b 5182 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5183 // call-function
whismanoid 27:485b1b2f334c 5184 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5185 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.072012), (uint32_t)0x0c0003); // 3.072V + 3.0LSB
whismanoid 25:9d4012b0887f 5186 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.072012, /* expect: */ (uint32_t)0x0c0003); // 3.072V + 3.0LSB
whismanoid 30:13fc9d492ee0 5187 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5188 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5189 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5190 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5191
whismanoid 25:9d4012b0887f 5192 // @test group DACCodeOfVoltage tinyTester.print("test_lsb_sweep V = 2.048000V LSBradius = 3LSB")
whismanoid 25:9d4012b0887f 5193 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 5194 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5195 // docTest_item['action'] = 'tinyTester.print("test_lsb_sweep V = 2.048000V LSBradius = 3LSB")'
whismanoid 25:9d4012b0887f 5196 // docTest_item['arglist'] = 'test_lsb_sweep V = 2.048000V LSBradius = 3LSB'
whismanoid 25:9d4012b0887f 5197 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None
whismanoid 33:2c675744a01b 5198 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5199 // print-string
whismanoid 25:9d4012b0887f 5200 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 5201 // tinyTesterPrintStringLiteral = "test_lsb_sweep V = 2.048000V LSBradius = 3LSB"
whismanoid 25:9d4012b0887f 5202 tinyTester.print("test_lsb_sweep V = 2.048000V LSBradius = 3LSB");
whismanoid 30:13fc9d492ee0 5203 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5204 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5205 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5206 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5207
whismanoid 25:9d4012b0887f 5208 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047988) expect 0x07fffd // 2.048V + -3.0LSB
whismanoid 25:9d4012b0887f 5209 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5210 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5211 // docTest_item['action'] = 'DACCodeOfVoltage(2.047988) expect 0x07fffd'
whismanoid 25:9d4012b0887f 5212 // docTest_item['remarks'] = '2.048V + -3.0LSB'
whismanoid 25:9d4012b0887f 5213 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5214 // docTest_item['arglist'] = '2.047988'
whismanoid 25:9d4012b0887f 5215 // docTest_item['expect-value'] = '0x07fffd'
whismanoid 25:9d4012b0887f 5216 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + -3.0LSB
whismanoid 33:2c675744a01b 5217 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5218 // call-function
whismanoid 27:485b1b2f334c 5219 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5220 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047988), (uint32_t)0x07fffd); // 2.048V + -3.0LSB
whismanoid 25:9d4012b0887f 5221 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047988, /* expect: */ (uint32_t)0x07fffd); // 2.048V + -3.0LSB
whismanoid 30:13fc9d492ee0 5222 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5223 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5224 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5225 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5226
whismanoid 25:9d4012b0887f 5227 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047990) expect 0x07fffd // 2.048V + -2.5LSB
whismanoid 25:9d4012b0887f 5228 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5229 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5230 // docTest_item['action'] = 'DACCodeOfVoltage(2.047990) expect 0x07fffd'
whismanoid 25:9d4012b0887f 5231 // docTest_item['remarks'] = '2.048V + -2.5LSB'
whismanoid 25:9d4012b0887f 5232 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5233 // docTest_item['arglist'] = '2.047990'
whismanoid 25:9d4012b0887f 5234 // docTest_item['expect-value'] = '0x07fffd'
whismanoid 25:9d4012b0887f 5235 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + -2.5LSB
whismanoid 33:2c675744a01b 5236 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5237 // call-function
whismanoid 27:485b1b2f334c 5238 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5239 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047990), (uint32_t)0x07fffd); // 2.048V + -2.5LSB
whismanoid 25:9d4012b0887f 5240 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047990, /* expect: */ (uint32_t)0x07fffd); // 2.048V + -2.5LSB
whismanoid 30:13fc9d492ee0 5241 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5242 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5243 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5244 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5245
whismanoid 25:9d4012b0887f 5246 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047992) expect 0x07fffe // 2.048V + -2.0LSB
whismanoid 25:9d4012b0887f 5247 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5248 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5249 // docTest_item['action'] = 'DACCodeOfVoltage(2.047992) expect 0x07fffe'
whismanoid 25:9d4012b0887f 5250 // docTest_item['remarks'] = '2.048V + -2.0LSB'
whismanoid 25:9d4012b0887f 5251 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5252 // docTest_item['arglist'] = '2.047992'
whismanoid 25:9d4012b0887f 5253 // docTest_item['expect-value'] = '0x07fffe'
whismanoid 25:9d4012b0887f 5254 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + -2.0LSB
whismanoid 33:2c675744a01b 5255 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5256 // call-function
whismanoid 27:485b1b2f334c 5257 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5258 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047992), (uint32_t)0x07fffe); // 2.048V + -2.0LSB
whismanoid 25:9d4012b0887f 5259 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047992, /* expect: */ (uint32_t)0x07fffe); // 2.048V + -2.0LSB
whismanoid 30:13fc9d492ee0 5260 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5261 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5262 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5263 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5264
whismanoid 25:9d4012b0887f 5265 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047994) expect 0x07fffe // 2.048V + -1.5LSB 0x07fffe not 0x07ffff
whismanoid 25:9d4012b0887f 5266 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5267 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5268 // docTest_item['action'] = 'DACCodeOfVoltage(2.047994) expect 0x07fffe'
whismanoid 25:9d4012b0887f 5269 // docTest_item['remarks'] = '2.048V + -1.5LSB 0x07fffe not 0x07ffff'
whismanoid 25:9d4012b0887f 5270 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5271 // docTest_item['arglist'] = '2.047994'
whismanoid 25:9d4012b0887f 5272 // docTest_item['expect-value'] = '0x07fffe'
whismanoid 25:9d4012b0887f 5273 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + -1.5LSB 0x07fffe not 0x07ffff
whismanoid 33:2c675744a01b 5274 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5275 // call-function
whismanoid 27:485b1b2f334c 5276 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5277 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047994), (uint32_t)0x07fffe); // 2.048V + -1.5LSB 0x07fffe not 0x07ffff
whismanoid 25:9d4012b0887f 5278 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047994, /* expect: */ (uint32_t)0x07fffe); // 2.048V + -1.5LSB 0x07fffe not 0x07ffff
whismanoid 30:13fc9d492ee0 5279 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5280 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5281 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5282 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5283
whismanoid 25:9d4012b0887f 5284 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047996) expect 0x07ffff // 2.048V + -1.0LSB
whismanoid 25:9d4012b0887f 5285 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5286 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5287 // docTest_item['action'] = 'DACCodeOfVoltage(2.047996) expect 0x07ffff'
whismanoid 25:9d4012b0887f 5288 // docTest_item['remarks'] = '2.048V + -1.0LSB'
whismanoid 25:9d4012b0887f 5289 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5290 // docTest_item['arglist'] = '2.047996'
whismanoid 25:9d4012b0887f 5291 // docTest_item['expect-value'] = '0x07ffff'
whismanoid 25:9d4012b0887f 5292 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + -1.0LSB
whismanoid 33:2c675744a01b 5293 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5294 // call-function
whismanoid 27:485b1b2f334c 5295 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5296 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047996), (uint32_t)0x07ffff); // 2.048V + -1.0LSB
whismanoid 25:9d4012b0887f 5297 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047996, /* expect: */ (uint32_t)0x07ffff); // 2.048V + -1.0LSB
whismanoid 30:13fc9d492ee0 5298 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5299 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5300 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5301 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5302
whismanoid 25:9d4012b0887f 5303 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047998) expect 0x07ffff // 2.048V + -0.5LSB 0x07ffff not 0x080000
whismanoid 25:9d4012b0887f 5304 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5305 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5306 // docTest_item['action'] = 'DACCodeOfVoltage(2.047998) expect 0x07ffff'
whismanoid 25:9d4012b0887f 5307 // docTest_item['remarks'] = '2.048V + -0.5LSB 0x07ffff not 0x080000'
whismanoid 25:9d4012b0887f 5308 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5309 // docTest_item['arglist'] = '2.047998'
whismanoid 25:9d4012b0887f 5310 // docTest_item['expect-value'] = '0x07ffff'
whismanoid 25:9d4012b0887f 5311 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + -0.5LSB 0x07ffff not 0x080000
whismanoid 33:2c675744a01b 5312 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5313 // call-function
whismanoid 27:485b1b2f334c 5314 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5315 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047998), (uint32_t)0x07ffff); // 2.048V + -0.5LSB 0x07ffff not 0x080000
whismanoid 25:9d4012b0887f 5316 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047998, /* expect: */ (uint32_t)0x07ffff); // 2.048V + -0.5LSB 0x07ffff not 0x080000
whismanoid 30:13fc9d492ee0 5317 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5318 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5319 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5320 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5321
whismanoid 25:9d4012b0887f 5322 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048000) expect 0x080000 // 2.048V + 0.0LSB
whismanoid 25:9d4012b0887f 5323 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5324 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5325 // docTest_item['action'] = 'DACCodeOfVoltage(2.048000) expect 0x080000'
whismanoid 25:9d4012b0887f 5326 // docTest_item['remarks'] = '2.048V + 0.0LSB'
whismanoid 25:9d4012b0887f 5327 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5328 // docTest_item['arglist'] = '2.048000'
whismanoid 25:9d4012b0887f 5329 // docTest_item['expect-value'] = '0x080000'
whismanoid 25:9d4012b0887f 5330 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + 0.0LSB
whismanoid 33:2c675744a01b 5331 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5332 // call-function
whismanoid 27:485b1b2f334c 5333 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5334 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048000), (uint32_t)0x080000); // 2.048V + 0.0LSB
whismanoid 25:9d4012b0887f 5335 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048000, /* expect: */ (uint32_t)0x080000); // 2.048V + 0.0LSB
whismanoid 30:13fc9d492ee0 5336 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5337 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5338 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5339 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5340
whismanoid 25:9d4012b0887f 5341 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048002) expect 0x080001 // 2.048V + 0.5LSB
whismanoid 25:9d4012b0887f 5342 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5343 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5344 // docTest_item['action'] = 'DACCodeOfVoltage(2.048002) expect 0x080001'
whismanoid 25:9d4012b0887f 5345 // docTest_item['remarks'] = '2.048V + 0.5LSB'
whismanoid 25:9d4012b0887f 5346 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5347 // docTest_item['arglist'] = '2.048002'
whismanoid 25:9d4012b0887f 5348 // docTest_item['expect-value'] = '0x080001'
whismanoid 25:9d4012b0887f 5349 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + 0.5LSB
whismanoid 33:2c675744a01b 5350 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5351 // call-function
whismanoid 27:485b1b2f334c 5352 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5353 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048002), (uint32_t)0x080001); // 2.048V + 0.5LSB
whismanoid 25:9d4012b0887f 5354 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048002, /* expect: */ (uint32_t)0x080001); // 2.048V + 0.5LSB
whismanoid 30:13fc9d492ee0 5355 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5356 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5357 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5358 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5359
whismanoid 25:9d4012b0887f 5360 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048004) expect 0x080001 // 2.048V + 1.0LSB
whismanoid 25:9d4012b0887f 5361 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5362 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5363 // docTest_item['action'] = 'DACCodeOfVoltage(2.048004) expect 0x080001'
whismanoid 25:9d4012b0887f 5364 // docTest_item['remarks'] = '2.048V + 1.0LSB'
whismanoid 25:9d4012b0887f 5365 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5366 // docTest_item['arglist'] = '2.048004'
whismanoid 25:9d4012b0887f 5367 // docTest_item['expect-value'] = '0x080001'
whismanoid 25:9d4012b0887f 5368 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + 1.0LSB
whismanoid 33:2c675744a01b 5369 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5370 // call-function
whismanoid 27:485b1b2f334c 5371 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5372 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048004), (uint32_t)0x080001); // 2.048V + 1.0LSB
whismanoid 25:9d4012b0887f 5373 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048004, /* expect: */ (uint32_t)0x080001); // 2.048V + 1.0LSB
whismanoid 30:13fc9d492ee0 5374 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5375 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5376 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5377 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5378
whismanoid 25:9d4012b0887f 5379 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048006) expect 0x080002 // 2.048V + 1.5LSB
whismanoid 25:9d4012b0887f 5380 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5381 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5382 // docTest_item['action'] = 'DACCodeOfVoltage(2.048006) expect 0x080002'
whismanoid 25:9d4012b0887f 5383 // docTest_item['remarks'] = '2.048V + 1.5LSB'
whismanoid 25:9d4012b0887f 5384 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5385 // docTest_item['arglist'] = '2.048006'
whismanoid 25:9d4012b0887f 5386 // docTest_item['expect-value'] = '0x080002'
whismanoid 25:9d4012b0887f 5387 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + 1.5LSB
whismanoid 33:2c675744a01b 5388 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5389 // call-function
whismanoid 27:485b1b2f334c 5390 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5391 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048006), (uint32_t)0x080002); // 2.048V + 1.5LSB
whismanoid 25:9d4012b0887f 5392 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048006, /* expect: */ (uint32_t)0x080002); // 2.048V + 1.5LSB
whismanoid 30:13fc9d492ee0 5393 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5394 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5395 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5396 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5397
whismanoid 25:9d4012b0887f 5398 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048008) expect 0x080002 // 2.048V + 2.0LSB
whismanoid 25:9d4012b0887f 5399 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5400 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5401 // docTest_item['action'] = 'DACCodeOfVoltage(2.048008) expect 0x080002'
whismanoid 25:9d4012b0887f 5402 // docTest_item['remarks'] = '2.048V + 2.0LSB'
whismanoid 25:9d4012b0887f 5403 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5404 // docTest_item['arglist'] = '2.048008'
whismanoid 25:9d4012b0887f 5405 // docTest_item['expect-value'] = '0x080002'
whismanoid 25:9d4012b0887f 5406 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + 2.0LSB
whismanoid 33:2c675744a01b 5407 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5408 // call-function
whismanoid 27:485b1b2f334c 5409 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5410 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048008), (uint32_t)0x080002); // 2.048V + 2.0LSB
whismanoid 25:9d4012b0887f 5411 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048008, /* expect: */ (uint32_t)0x080002); // 2.048V + 2.0LSB
whismanoid 30:13fc9d492ee0 5412 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5413 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5414 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5415 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5416
whismanoid 25:9d4012b0887f 5417 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048010) expect 0x080003 // 2.048V + 2.5LSB
whismanoid 25:9d4012b0887f 5418 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5419 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5420 // docTest_item['action'] = 'DACCodeOfVoltage(2.048010) expect 0x080003'
whismanoid 25:9d4012b0887f 5421 // docTest_item['remarks'] = '2.048V + 2.5LSB'
whismanoid 25:9d4012b0887f 5422 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5423 // docTest_item['arglist'] = '2.048010'
whismanoid 25:9d4012b0887f 5424 // docTest_item['expect-value'] = '0x080003'
whismanoid 25:9d4012b0887f 5425 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + 2.5LSB
whismanoid 33:2c675744a01b 5426 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5427 // call-function
whismanoid 27:485b1b2f334c 5428 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5429 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048010), (uint32_t)0x080003); // 2.048V + 2.5LSB
whismanoid 25:9d4012b0887f 5430 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048010, /* expect: */ (uint32_t)0x080003); // 2.048V + 2.5LSB
whismanoid 30:13fc9d492ee0 5431 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5432 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5433 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5434 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5435
whismanoid 25:9d4012b0887f 5436 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048012) expect 0x080003 // 2.048V + 3.0LSB
whismanoid 25:9d4012b0887f 5437 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5438 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5439 // docTest_item['action'] = 'DACCodeOfVoltage(2.048012) expect 0x080003'
whismanoid 25:9d4012b0887f 5440 // docTest_item['remarks'] = '2.048V + 3.0LSB'
whismanoid 25:9d4012b0887f 5441 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5442 // docTest_item['arglist'] = '2.048012'
whismanoid 25:9d4012b0887f 5443 // docTest_item['expect-value'] = '0x080003'
whismanoid 25:9d4012b0887f 5444 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + 3.0LSB
whismanoid 33:2c675744a01b 5445 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5446 // call-function
whismanoid 27:485b1b2f334c 5447 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5448 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048012), (uint32_t)0x080003); // 2.048V + 3.0LSB
whismanoid 25:9d4012b0887f 5449 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048012, /* expect: */ (uint32_t)0x080003); // 2.048V + 3.0LSB
whismanoid 30:13fc9d492ee0 5450 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5451 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5452 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5453 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5454
whismanoid 25:9d4012b0887f 5455 // @test group DACCodeOfVoltage tinyTester.print("test_lsb_sweep V = 1.024000V LSBradius = 3LSB")
whismanoid 25:9d4012b0887f 5456 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 5457 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5458 // docTest_item['action'] = 'tinyTester.print("test_lsb_sweep V = 1.024000V LSBradius = 3LSB")'
whismanoid 25:9d4012b0887f 5459 // docTest_item['arglist'] = 'test_lsb_sweep V = 1.024000V LSBradius = 3LSB'
whismanoid 25:9d4012b0887f 5460 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None
whismanoid 33:2c675744a01b 5461 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5462 // print-string
whismanoid 25:9d4012b0887f 5463 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 5464 // tinyTesterPrintStringLiteral = "test_lsb_sweep V = 1.024000V LSBradius = 3LSB"
whismanoid 25:9d4012b0887f 5465 tinyTester.print("test_lsb_sweep V = 1.024000V LSBradius = 3LSB");
whismanoid 30:13fc9d492ee0 5466 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5467 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5468 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5469 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5470
whismanoid 25:9d4012b0887f 5471 // @test group DACCodeOfVoltage DACCodeOfVoltage(1.023988) expect 0x03fffd // 1.024V + -3.0LSB
whismanoid 25:9d4012b0887f 5472 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5473 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5474 // docTest_item['action'] = 'DACCodeOfVoltage(1.023988) expect 0x03fffd'
whismanoid 25:9d4012b0887f 5475 // docTest_item['remarks'] = '1.024V + -3.0LSB'
whismanoid 25:9d4012b0887f 5476 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5477 // docTest_item['arglist'] = '1.023988'
whismanoid 25:9d4012b0887f 5478 // docTest_item['expect-value'] = '0x03fffd'
whismanoid 25:9d4012b0887f 5479 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + -3.0LSB
whismanoid 33:2c675744a01b 5480 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5481 // call-function
whismanoid 27:485b1b2f334c 5482 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5483 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.023988), (uint32_t)0x03fffd); // 1.024V + -3.0LSB
whismanoid 25:9d4012b0887f 5484 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.023988, /* expect: */ (uint32_t)0x03fffd); // 1.024V + -3.0LSB
whismanoid 30:13fc9d492ee0 5485 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5486 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5487 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5488 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5489
whismanoid 25:9d4012b0887f 5490 // @test group DACCodeOfVoltage DACCodeOfVoltage(1.023990) expect 0x03fffd // 1.024V + -2.5LSB 0x03fffd not 0x03fffe
whismanoid 25:9d4012b0887f 5491 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5492 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5493 // docTest_item['action'] = 'DACCodeOfVoltage(1.023990) expect 0x03fffd'
whismanoid 25:9d4012b0887f 5494 // docTest_item['remarks'] = '1.024V + -2.5LSB 0x03fffd not 0x03fffe'
whismanoid 25:9d4012b0887f 5495 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5496 // docTest_item['arglist'] = '1.023990'
whismanoid 25:9d4012b0887f 5497 // docTest_item['expect-value'] = '0x03fffd'
whismanoid 25:9d4012b0887f 5498 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + -2.5LSB 0x03fffd not 0x03fffe
whismanoid 33:2c675744a01b 5499 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5500 // call-function
whismanoid 27:485b1b2f334c 5501 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5502 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.023990), (uint32_t)0x03fffd); // 1.024V + -2.5LSB 0x03fffd not 0x03fffe
whismanoid 25:9d4012b0887f 5503 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.023990, /* expect: */ (uint32_t)0x03fffd); // 1.024V + -2.5LSB 0x03fffd not 0x03fffe
whismanoid 30:13fc9d492ee0 5504 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5505 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5506 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5507 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5508
whismanoid 25:9d4012b0887f 5509 // @test group DACCodeOfVoltage DACCodeOfVoltage(1.023992) expect 0x03fffe // 1.024V + -2.0LSB
whismanoid 25:9d4012b0887f 5510 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5511 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5512 // docTest_item['action'] = 'DACCodeOfVoltage(1.023992) expect 0x03fffe'
whismanoid 25:9d4012b0887f 5513 // docTest_item['remarks'] = '1.024V + -2.0LSB'
whismanoid 25:9d4012b0887f 5514 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5515 // docTest_item['arglist'] = '1.023992'
whismanoid 25:9d4012b0887f 5516 // docTest_item['expect-value'] = '0x03fffe'
whismanoid 25:9d4012b0887f 5517 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + -2.0LSB
whismanoid 33:2c675744a01b 5518 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5519 // call-function
whismanoid 27:485b1b2f334c 5520 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5521 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.023992), (uint32_t)0x03fffe); // 1.024V + -2.0LSB
whismanoid 25:9d4012b0887f 5522 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.023992, /* expect: */ (uint32_t)0x03fffe); // 1.024V + -2.0LSB
whismanoid 30:13fc9d492ee0 5523 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5524 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5525 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5526 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5527
whismanoid 25:9d4012b0887f 5528 // @test group DACCodeOfVoltage DACCodeOfVoltage(1.023994) expect 0x03fffe // 1.024V + -1.5LSB
whismanoid 25:9d4012b0887f 5529 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5530 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5531 // docTest_item['action'] = 'DACCodeOfVoltage(1.023994) expect 0x03fffe'
whismanoid 25:9d4012b0887f 5532 // docTest_item['remarks'] = '1.024V + -1.5LSB'
whismanoid 25:9d4012b0887f 5533 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5534 // docTest_item['arglist'] = '1.023994'
whismanoid 25:9d4012b0887f 5535 // docTest_item['expect-value'] = '0x03fffe'
whismanoid 25:9d4012b0887f 5536 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + -1.5LSB
whismanoid 33:2c675744a01b 5537 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5538 // call-function
whismanoid 27:485b1b2f334c 5539 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5540 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.023994), (uint32_t)0x03fffe); // 1.024V + -1.5LSB
whismanoid 25:9d4012b0887f 5541 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.023994, /* expect: */ (uint32_t)0x03fffe); // 1.024V + -1.5LSB
whismanoid 30:13fc9d492ee0 5542 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5543 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5544 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5545 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5546
whismanoid 25:9d4012b0887f 5547 // @test group DACCodeOfVoltage DACCodeOfVoltage(1.023996) expect 0x03ffff // 1.024V + -1.0LSB
whismanoid 25:9d4012b0887f 5548 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5549 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5550 // docTest_item['action'] = 'DACCodeOfVoltage(1.023996) expect 0x03ffff'
whismanoid 25:9d4012b0887f 5551 // docTest_item['remarks'] = '1.024V + -1.0LSB'
whismanoid 25:9d4012b0887f 5552 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5553 // docTest_item['arglist'] = '1.023996'
whismanoid 25:9d4012b0887f 5554 // docTest_item['expect-value'] = '0x03ffff'
whismanoid 25:9d4012b0887f 5555 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + -1.0LSB
whismanoid 33:2c675744a01b 5556 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5557 // call-function
whismanoid 27:485b1b2f334c 5558 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5559 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.023996), (uint32_t)0x03ffff); // 1.024V + -1.0LSB
whismanoid 25:9d4012b0887f 5560 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.023996, /* expect: */ (uint32_t)0x03ffff); // 1.024V + -1.0LSB
whismanoid 30:13fc9d492ee0 5561 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5562 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5563 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5564 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5565
whismanoid 25:9d4012b0887f 5566 // @test group DACCodeOfVoltage DACCodeOfVoltage(1.023998) expect 0x03ffff // 1.024V + -0.5LSB 0x03ffff not 0x040000
whismanoid 25:9d4012b0887f 5567 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5568 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5569 // docTest_item['action'] = 'DACCodeOfVoltage(1.023998) expect 0x03ffff'
whismanoid 25:9d4012b0887f 5570 // docTest_item['remarks'] = '1.024V + -0.5LSB 0x03ffff not 0x040000'
whismanoid 25:9d4012b0887f 5571 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5572 // docTest_item['arglist'] = '1.023998'
whismanoid 25:9d4012b0887f 5573 // docTest_item['expect-value'] = '0x03ffff'
whismanoid 25:9d4012b0887f 5574 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + -0.5LSB 0x03ffff not 0x040000
whismanoid 33:2c675744a01b 5575 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5576 // call-function
whismanoid 27:485b1b2f334c 5577 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5578 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.023998), (uint32_t)0x03ffff); // 1.024V + -0.5LSB 0x03ffff not 0x040000
whismanoid 25:9d4012b0887f 5579 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.023998, /* expect: */ (uint32_t)0x03ffff); // 1.024V + -0.5LSB 0x03ffff not 0x040000
whismanoid 30:13fc9d492ee0 5580 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5581 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5582 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5583 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5584
whismanoid 25:9d4012b0887f 5585 // @test group DACCodeOfVoltage DACCodeOfVoltage(1.024000) expect 0x040000 // 1.024V + 0.0LSB
whismanoid 25:9d4012b0887f 5586 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5587 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5588 // docTest_item['action'] = 'DACCodeOfVoltage(1.024000) expect 0x040000'
whismanoid 25:9d4012b0887f 5589 // docTest_item['remarks'] = '1.024V + 0.0LSB'
whismanoid 25:9d4012b0887f 5590 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5591 // docTest_item['arglist'] = '1.024000'
whismanoid 25:9d4012b0887f 5592 // docTest_item['expect-value'] = '0x040000'
whismanoid 25:9d4012b0887f 5593 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + 0.0LSB
whismanoid 33:2c675744a01b 5594 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5595 // call-function
whismanoid 27:485b1b2f334c 5596 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5597 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.024000), (uint32_t)0x040000); // 1.024V + 0.0LSB
whismanoid 25:9d4012b0887f 5598 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.024000, /* expect: */ (uint32_t)0x040000); // 1.024V + 0.0LSB
whismanoid 30:13fc9d492ee0 5599 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5600 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5601 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5602 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5603
whismanoid 25:9d4012b0887f 5604 // @test group DACCodeOfVoltage DACCodeOfVoltage(1.024002) expect 0x040001 // 1.024V + 0.5LSB
whismanoid 25:9d4012b0887f 5605 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5606 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5607 // docTest_item['action'] = 'DACCodeOfVoltage(1.024002) expect 0x040001'
whismanoid 25:9d4012b0887f 5608 // docTest_item['remarks'] = '1.024V + 0.5LSB'
whismanoid 25:9d4012b0887f 5609 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5610 // docTest_item['arglist'] = '1.024002'
whismanoid 25:9d4012b0887f 5611 // docTest_item['expect-value'] = '0x040001'
whismanoid 25:9d4012b0887f 5612 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + 0.5LSB
whismanoid 33:2c675744a01b 5613 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5614 // call-function
whismanoid 27:485b1b2f334c 5615 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5616 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.024002), (uint32_t)0x040001); // 1.024V + 0.5LSB
whismanoid 25:9d4012b0887f 5617 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.024002, /* expect: */ (uint32_t)0x040001); // 1.024V + 0.5LSB
whismanoid 30:13fc9d492ee0 5618 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5619 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5620 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5621 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5622
whismanoid 25:9d4012b0887f 5623 // @test group DACCodeOfVoltage DACCodeOfVoltage(1.024004) expect 0x040001 // 1.024V + 1.0LSB
whismanoid 25:9d4012b0887f 5624 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5625 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5626 // docTest_item['action'] = 'DACCodeOfVoltage(1.024004) expect 0x040001'
whismanoid 25:9d4012b0887f 5627 // docTest_item['remarks'] = '1.024V + 1.0LSB'
whismanoid 25:9d4012b0887f 5628 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5629 // docTest_item['arglist'] = '1.024004'
whismanoid 25:9d4012b0887f 5630 // docTest_item['expect-value'] = '0x040001'
whismanoid 25:9d4012b0887f 5631 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + 1.0LSB
whismanoid 33:2c675744a01b 5632 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5633 // call-function
whismanoid 27:485b1b2f334c 5634 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5635 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.024004), (uint32_t)0x040001); // 1.024V + 1.0LSB
whismanoid 25:9d4012b0887f 5636 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.024004, /* expect: */ (uint32_t)0x040001); // 1.024V + 1.0LSB
whismanoid 30:13fc9d492ee0 5637 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5638 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5639 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5640 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5641
whismanoid 25:9d4012b0887f 5642 // @test group DACCodeOfVoltage DACCodeOfVoltage(1.024006) expect 0x040002 // 1.024V + 1.5LSB
whismanoid 25:9d4012b0887f 5643 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5644 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5645 // docTest_item['action'] = 'DACCodeOfVoltage(1.024006) expect 0x040002'
whismanoid 25:9d4012b0887f 5646 // docTest_item['remarks'] = '1.024V + 1.5LSB'
whismanoid 25:9d4012b0887f 5647 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5648 // docTest_item['arglist'] = '1.024006'
whismanoid 25:9d4012b0887f 5649 // docTest_item['expect-value'] = '0x040002'
whismanoid 25:9d4012b0887f 5650 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + 1.5LSB
whismanoid 33:2c675744a01b 5651 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5652 // call-function
whismanoid 27:485b1b2f334c 5653 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5654 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.024006), (uint32_t)0x040002); // 1.024V + 1.5LSB
whismanoid 25:9d4012b0887f 5655 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.024006, /* expect: */ (uint32_t)0x040002); // 1.024V + 1.5LSB
whismanoid 30:13fc9d492ee0 5656 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5657 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5658 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5659 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5660
whismanoid 25:9d4012b0887f 5661 // @test group DACCodeOfVoltage DACCodeOfVoltage(1.024008) expect 0x040002 // 1.024V + 2.0LSB
whismanoid 25:9d4012b0887f 5662 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5663 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5664 // docTest_item['action'] = 'DACCodeOfVoltage(1.024008) expect 0x040002'
whismanoid 25:9d4012b0887f 5665 // docTest_item['remarks'] = '1.024V + 2.0LSB'
whismanoid 25:9d4012b0887f 5666 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5667 // docTest_item['arglist'] = '1.024008'
whismanoid 25:9d4012b0887f 5668 // docTest_item['expect-value'] = '0x040002'
whismanoid 25:9d4012b0887f 5669 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + 2.0LSB
whismanoid 33:2c675744a01b 5670 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5671 // call-function
whismanoid 27:485b1b2f334c 5672 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5673 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.024008), (uint32_t)0x040002); // 1.024V + 2.0LSB
whismanoid 25:9d4012b0887f 5674 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.024008, /* expect: */ (uint32_t)0x040002); // 1.024V + 2.0LSB
whismanoid 30:13fc9d492ee0 5675 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5676 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5677 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5678 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5679
whismanoid 25:9d4012b0887f 5680 // @test group DACCodeOfVoltage DACCodeOfVoltage(1.024010) expect 0x040003 // 1.024V + 2.5LSB
whismanoid 25:9d4012b0887f 5681 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5682 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5683 // docTest_item['action'] = 'DACCodeOfVoltage(1.024010) expect 0x040003'
whismanoid 25:9d4012b0887f 5684 // docTest_item['remarks'] = '1.024V + 2.5LSB'
whismanoid 25:9d4012b0887f 5685 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5686 // docTest_item['arglist'] = '1.024010'
whismanoid 25:9d4012b0887f 5687 // docTest_item['expect-value'] = '0x040003'
whismanoid 25:9d4012b0887f 5688 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + 2.5LSB
whismanoid 33:2c675744a01b 5689 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5690 // call-function
whismanoid 27:485b1b2f334c 5691 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5692 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.024010), (uint32_t)0x040003); // 1.024V + 2.5LSB
whismanoid 25:9d4012b0887f 5693 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.024010, /* expect: */ (uint32_t)0x040003); // 1.024V + 2.5LSB
whismanoid 30:13fc9d492ee0 5694 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5695 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5696 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5697 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5698
whismanoid 25:9d4012b0887f 5699 // @test group DACCodeOfVoltage DACCodeOfVoltage(1.024012) expect 0x040003 // 1.024V + 3.0LSB
whismanoid 25:9d4012b0887f 5700 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5701 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5702 // docTest_item['action'] = 'DACCodeOfVoltage(1.024012) expect 0x040003'
whismanoid 25:9d4012b0887f 5703 // docTest_item['remarks'] = '1.024V + 3.0LSB'
whismanoid 25:9d4012b0887f 5704 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5705 // docTest_item['arglist'] = '1.024012'
whismanoid 25:9d4012b0887f 5706 // docTest_item['expect-value'] = '0x040003'
whismanoid 25:9d4012b0887f 5707 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + 3.0LSB
whismanoid 33:2c675744a01b 5708 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5709 // call-function
whismanoid 27:485b1b2f334c 5710 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5711 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.024012), (uint32_t)0x040003); // 1.024V + 3.0LSB
whismanoid 25:9d4012b0887f 5712 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.024012, /* expect: */ (uint32_t)0x040003); // 1.024V + 3.0LSB
whismanoid 30:13fc9d492ee0 5713 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5714 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5715 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5716 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5717
whismanoid 25:9d4012b0887f 5718 // @test group DACCodeOfVoltage tinyTester.print("test_lsb_sweep V = 0.000000V LSBradius = 3LSB")
whismanoid 25:9d4012b0887f 5719 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 5720 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5721 // docTest_item['action'] = 'tinyTester.print("test_lsb_sweep V = 0.000000V LSBradius = 3LSB")'
whismanoid 25:9d4012b0887f 5722 // docTest_item['arglist'] = 'test_lsb_sweep V = 0.000000V LSBradius = 3LSB'
whismanoid 25:9d4012b0887f 5723 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None
whismanoid 33:2c675744a01b 5724 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5725 // print-string
whismanoid 25:9d4012b0887f 5726 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 5727 // tinyTesterPrintStringLiteral = "test_lsb_sweep V = 0.000000V LSBradius = 3LSB"
whismanoid 25:9d4012b0887f 5728 tinyTester.print("test_lsb_sweep V = 0.000000V LSBradius = 3LSB");
whismanoid 30:13fc9d492ee0 5729 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5730 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5731 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5732 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5733
whismanoid 25:9d4012b0887f 5734 // @test group DACCodeOfVoltage DACCodeOfVoltage(-0.000012) expect 0x000000 // 0.000V + -3.0LSB
whismanoid 25:9d4012b0887f 5735 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5736 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5737 // docTest_item['action'] = 'DACCodeOfVoltage(-0.000012) expect 0x000000'
whismanoid 25:9d4012b0887f 5738 // docTest_item['remarks'] = '0.000V + -3.0LSB'
whismanoid 25:9d4012b0887f 5739 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5740 // docTest_item['arglist'] = '-0.000012'
whismanoid 25:9d4012b0887f 5741 // docTest_item['expect-value'] = '0x000000'
whismanoid 25:9d4012b0887f 5742 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + -3.0LSB
whismanoid 33:2c675744a01b 5743 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5744 // call-function
whismanoid 27:485b1b2f334c 5745 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5746 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)-0.000012), (uint32_t)0x000000); // 0.000V + -3.0LSB
whismanoid 25:9d4012b0887f 5747 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)-0.000012, /* expect: */ (uint32_t)0x000000); // 0.000V + -3.0LSB
whismanoid 30:13fc9d492ee0 5748 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5749 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5750 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5751 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5752
whismanoid 25:9d4012b0887f 5753 // @test group DACCodeOfVoltage DACCodeOfVoltage(-0.000010) expect 0x000000 // 0.000V + -2.5LSB
whismanoid 25:9d4012b0887f 5754 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5755 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5756 // docTest_item['action'] = 'DACCodeOfVoltage(-0.000010) expect 0x000000'
whismanoid 25:9d4012b0887f 5757 // docTest_item['remarks'] = '0.000V + -2.5LSB'
whismanoid 25:9d4012b0887f 5758 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5759 // docTest_item['arglist'] = '-0.000010'
whismanoid 25:9d4012b0887f 5760 // docTest_item['expect-value'] = '0x000000'
whismanoid 25:9d4012b0887f 5761 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + -2.5LSB
whismanoid 33:2c675744a01b 5762 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5763 // call-function
whismanoid 27:485b1b2f334c 5764 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5765 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)-0.000010), (uint32_t)0x000000); // 0.000V + -2.5LSB
whismanoid 25:9d4012b0887f 5766 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)-0.000010, /* expect: */ (uint32_t)0x000000); // 0.000V + -2.5LSB
whismanoid 30:13fc9d492ee0 5767 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5768 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5769 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5770 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5771
whismanoid 25:9d4012b0887f 5772 // @test group DACCodeOfVoltage DACCodeOfVoltage(-0.000008) expect 0x000000 // 0.000V + -2.0LSB
whismanoid 25:9d4012b0887f 5773 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5774 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5775 // docTest_item['action'] = 'DACCodeOfVoltage(-0.000008) expect 0x000000'
whismanoid 25:9d4012b0887f 5776 // docTest_item['remarks'] = '0.000V + -2.0LSB'
whismanoid 25:9d4012b0887f 5777 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5778 // docTest_item['arglist'] = '-0.000008'
whismanoid 25:9d4012b0887f 5779 // docTest_item['expect-value'] = '0x000000'
whismanoid 25:9d4012b0887f 5780 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + -2.0LSB
whismanoid 33:2c675744a01b 5781 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5782 // call-function
whismanoid 27:485b1b2f334c 5783 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5784 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)-0.000008), (uint32_t)0x000000); // 0.000V + -2.0LSB
whismanoid 25:9d4012b0887f 5785 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)-0.000008, /* expect: */ (uint32_t)0x000000); // 0.000V + -2.0LSB
whismanoid 30:13fc9d492ee0 5786 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5787 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5788 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5789 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5790
whismanoid 25:9d4012b0887f 5791 // @test group DACCodeOfVoltage DACCodeOfVoltage(-0.000006) expect 0x000000 // 0.000V + -1.5LSB
whismanoid 25:9d4012b0887f 5792 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5793 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5794 // docTest_item['action'] = 'DACCodeOfVoltage(-0.000006) expect 0x000000'
whismanoid 25:9d4012b0887f 5795 // docTest_item['remarks'] = '0.000V + -1.5LSB'
whismanoid 25:9d4012b0887f 5796 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5797 // docTest_item['arglist'] = '-0.000006'
whismanoid 25:9d4012b0887f 5798 // docTest_item['expect-value'] = '0x000000'
whismanoid 25:9d4012b0887f 5799 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + -1.5LSB
whismanoid 33:2c675744a01b 5800 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5801 // call-function
whismanoid 27:485b1b2f334c 5802 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5803 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)-0.000006), (uint32_t)0x000000); // 0.000V + -1.5LSB
whismanoid 25:9d4012b0887f 5804 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)-0.000006, /* expect: */ (uint32_t)0x000000); // 0.000V + -1.5LSB
whismanoid 30:13fc9d492ee0 5805 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5806 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5807 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5808 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5809
whismanoid 25:9d4012b0887f 5810 // @test group DACCodeOfVoltage DACCodeOfVoltage(-0.000004) expect 0x000000 // 0.000V + -1.0LSB
whismanoid 25:9d4012b0887f 5811 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5812 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5813 // docTest_item['action'] = 'DACCodeOfVoltage(-0.000004) expect 0x000000'
whismanoid 25:9d4012b0887f 5814 // docTest_item['remarks'] = '0.000V + -1.0LSB'
whismanoid 25:9d4012b0887f 5815 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5816 // docTest_item['arglist'] = '-0.000004'
whismanoid 25:9d4012b0887f 5817 // docTest_item['expect-value'] = '0x000000'
whismanoid 25:9d4012b0887f 5818 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + -1.0LSB
whismanoid 33:2c675744a01b 5819 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5820 // call-function
whismanoid 27:485b1b2f334c 5821 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5822 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)-0.000004), (uint32_t)0x000000); // 0.000V + -1.0LSB
whismanoid 25:9d4012b0887f 5823 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)-0.000004, /* expect: */ (uint32_t)0x000000); // 0.000V + -1.0LSB
whismanoid 30:13fc9d492ee0 5824 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5825 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5826 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5827 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5828
whismanoid 25:9d4012b0887f 5829 // @test group DACCodeOfVoltage DACCodeOfVoltage(-0.000002) expect 0x000000 // 0.000V + -0.5LSB
whismanoid 25:9d4012b0887f 5830 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5831 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5832 // docTest_item['action'] = 'DACCodeOfVoltage(-0.000002) expect 0x000000'
whismanoid 25:9d4012b0887f 5833 // docTest_item['remarks'] = '0.000V + -0.5LSB'
whismanoid 25:9d4012b0887f 5834 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5835 // docTest_item['arglist'] = '-0.000002'
whismanoid 25:9d4012b0887f 5836 // docTest_item['expect-value'] = '0x000000'
whismanoid 25:9d4012b0887f 5837 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + -0.5LSB
whismanoid 33:2c675744a01b 5838 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5839 // call-function
whismanoid 27:485b1b2f334c 5840 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5841 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)-0.000002), (uint32_t)0x000000); // 0.000V + -0.5LSB
whismanoid 25:9d4012b0887f 5842 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)-0.000002, /* expect: */ (uint32_t)0x000000); // 0.000V + -0.5LSB
whismanoid 30:13fc9d492ee0 5843 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5844 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5845 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5846 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5847
whismanoid 25:9d4012b0887f 5848 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.000000) expect 0x000000 // 0.000V + 0.0LSB
whismanoid 25:9d4012b0887f 5849 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5850 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5851 // docTest_item['action'] = 'DACCodeOfVoltage(0.000000) expect 0x000000'
whismanoid 25:9d4012b0887f 5852 // docTest_item['remarks'] = '0.000V + 0.0LSB'
whismanoid 25:9d4012b0887f 5853 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5854 // docTest_item['arglist'] = '0.000000'
whismanoid 25:9d4012b0887f 5855 // docTest_item['expect-value'] = '0x000000'
whismanoid 25:9d4012b0887f 5856 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + 0.0LSB
whismanoid 33:2c675744a01b 5857 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5858 // call-function
whismanoid 27:485b1b2f334c 5859 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5860 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.000000), (uint32_t)0x000000); // 0.000V + 0.0LSB
whismanoid 25:9d4012b0887f 5861 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.000000, /* expect: */ (uint32_t)0x000000); // 0.000V + 0.0LSB
whismanoid 30:13fc9d492ee0 5862 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5863 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5864 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5865 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5866
whismanoid 25:9d4012b0887f 5867 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.000002) expect 0x000001 // 0.000V + 0.5LSB
whismanoid 25:9d4012b0887f 5868 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5869 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5870 // docTest_item['action'] = 'DACCodeOfVoltage(0.000002) expect 0x000001'
whismanoid 25:9d4012b0887f 5871 // docTest_item['remarks'] = '0.000V + 0.5LSB'
whismanoid 25:9d4012b0887f 5872 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5873 // docTest_item['arglist'] = '0.000002'
whismanoid 25:9d4012b0887f 5874 // docTest_item['expect-value'] = '0x000001'
whismanoid 25:9d4012b0887f 5875 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + 0.5LSB
whismanoid 33:2c675744a01b 5876 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5877 // call-function
whismanoid 27:485b1b2f334c 5878 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5879 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.000002), (uint32_t)0x000001); // 0.000V + 0.5LSB
whismanoid 25:9d4012b0887f 5880 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.000002, /* expect: */ (uint32_t)0x000001); // 0.000V + 0.5LSB
whismanoid 30:13fc9d492ee0 5881 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5882 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5883 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5884 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5885
whismanoid 25:9d4012b0887f 5886 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.000004) expect 0x000001 // 0.000V + 1.0LSB
whismanoid 25:9d4012b0887f 5887 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5888 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5889 // docTest_item['action'] = 'DACCodeOfVoltage(0.000004) expect 0x000001'
whismanoid 25:9d4012b0887f 5890 // docTest_item['remarks'] = '0.000V + 1.0LSB'
whismanoid 25:9d4012b0887f 5891 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5892 // docTest_item['arglist'] = '0.000004'
whismanoid 25:9d4012b0887f 5893 // docTest_item['expect-value'] = '0x000001'
whismanoid 25:9d4012b0887f 5894 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + 1.0LSB
whismanoid 33:2c675744a01b 5895 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5896 // call-function
whismanoid 27:485b1b2f334c 5897 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5898 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.000004), (uint32_t)0x000001); // 0.000V + 1.0LSB
whismanoid 25:9d4012b0887f 5899 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.000004, /* expect: */ (uint32_t)0x000001); // 0.000V + 1.0LSB
whismanoid 30:13fc9d492ee0 5900 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5901 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5902 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5903 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5904
whismanoid 25:9d4012b0887f 5905 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.000006) expect 0x000002 // 0.000V + 1.5LSB
whismanoid 25:9d4012b0887f 5906 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5907 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5908 // docTest_item['action'] = 'DACCodeOfVoltage(0.000006) expect 0x000002'
whismanoid 25:9d4012b0887f 5909 // docTest_item['remarks'] = '0.000V + 1.5LSB'
whismanoid 25:9d4012b0887f 5910 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5911 // docTest_item['arglist'] = '0.000006'
whismanoid 25:9d4012b0887f 5912 // docTest_item['expect-value'] = '0x000002'
whismanoid 25:9d4012b0887f 5913 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + 1.5LSB
whismanoid 33:2c675744a01b 5914 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5915 // call-function
whismanoid 27:485b1b2f334c 5916 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5917 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.000006), (uint32_t)0x000002); // 0.000V + 1.5LSB
whismanoid 25:9d4012b0887f 5918 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.000006, /* expect: */ (uint32_t)0x000002); // 0.000V + 1.5LSB
whismanoid 30:13fc9d492ee0 5919 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5920 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5921 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5922 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5923
whismanoid 25:9d4012b0887f 5924 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.000008) expect 0x000002 // 0.000V + 2.0LSB
whismanoid 25:9d4012b0887f 5925 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5926 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5927 // docTest_item['action'] = 'DACCodeOfVoltage(0.000008) expect 0x000002'
whismanoid 25:9d4012b0887f 5928 // docTest_item['remarks'] = '0.000V + 2.0LSB'
whismanoid 25:9d4012b0887f 5929 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5930 // docTest_item['arglist'] = '0.000008'
whismanoid 25:9d4012b0887f 5931 // docTest_item['expect-value'] = '0x000002'
whismanoid 25:9d4012b0887f 5932 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + 2.0LSB
whismanoid 33:2c675744a01b 5933 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5934 // call-function
whismanoid 27:485b1b2f334c 5935 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5936 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.000008), (uint32_t)0x000002); // 0.000V + 2.0LSB
whismanoid 25:9d4012b0887f 5937 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.000008, /* expect: */ (uint32_t)0x000002); // 0.000V + 2.0LSB
whismanoid 30:13fc9d492ee0 5938 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5939 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5940 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5941 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5942
whismanoid 25:9d4012b0887f 5943 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.000010) expect 0x000003 // 0.000V + 2.5LSB
whismanoid 25:9d4012b0887f 5944 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5945 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5946 // docTest_item['action'] = 'DACCodeOfVoltage(0.000010) expect 0x000003'
whismanoid 25:9d4012b0887f 5947 // docTest_item['remarks'] = '0.000V + 2.5LSB'
whismanoid 25:9d4012b0887f 5948 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5949 // docTest_item['arglist'] = '0.000010'
whismanoid 25:9d4012b0887f 5950 // docTest_item['expect-value'] = '0x000003'
whismanoid 25:9d4012b0887f 5951 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + 2.5LSB
whismanoid 33:2c675744a01b 5952 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5953 // call-function
whismanoid 27:485b1b2f334c 5954 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5955 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.000010), (uint32_t)0x000003); // 0.000V + 2.5LSB
whismanoid 25:9d4012b0887f 5956 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.000010, /* expect: */ (uint32_t)0x000003); // 0.000V + 2.5LSB
whismanoid 30:13fc9d492ee0 5957 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5958 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5959 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5960 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5961
whismanoid 25:9d4012b0887f 5962 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.000012) expect 0x000003 // 0.000V + 3.0LSB
whismanoid 25:9d4012b0887f 5963 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5964 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5965 // docTest_item['action'] = 'DACCodeOfVoltage(0.000012) expect 0x000003'
whismanoid 25:9d4012b0887f 5966 // docTest_item['remarks'] = '0.000V + 3.0LSB'
whismanoid 25:9d4012b0887f 5967 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5968 // docTest_item['arglist'] = '0.000012'
whismanoid 25:9d4012b0887f 5969 // docTest_item['expect-value'] = '0x000003'
whismanoid 25:9d4012b0887f 5970 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + 3.0LSB
whismanoid 33:2c675744a01b 5971 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5972 // call-function
whismanoid 27:485b1b2f334c 5973 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5974 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.000012), (uint32_t)0x000003); // 0.000V + 3.0LSB
whismanoid 25:9d4012b0887f 5975 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.000012, /* expect: */ (uint32_t)0x000003); // 0.000V + 3.0LSB
whismanoid 30:13fc9d492ee0 5976 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5977 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5978 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5979 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5980
whismanoid 25:9d4012b0887f 5981 // @test group DACCodeOfVoltage tinyTester.blink_time_msec = 75 // default 75 resume hardware self test
whismanoid 25:9d4012b0887f 5982 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 25:9d4012b0887f 5983 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5984 // docTest_item['action'] = 'tinyTester.blink_time_msec = 75'
whismanoid 25:9d4012b0887f 5985 // docTest_item['remarks'] = 'default 75 resume hardware self test'
whismanoid 25:9d4012b0887f 5986 // docTest_item['propName'] = 'tinyTester.blink_time_msec'
whismanoid 25:9d4012b0887f 5987 // docTest_item['propValue'] = '75'
whismanoid 25:9d4012b0887f 5988 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None default 75 resume hardware self test
whismanoid 33:2c675744a01b 5989 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5990 // assign-propname-value
whismanoid 25:9d4012b0887f 5991 // tinyTesterPropName = "tinyTester.blink_time_msec"
whismanoid 25:9d4012b0887f 5992 // tinyTesterPropValue = "75"
whismanoid 25:9d4012b0887f 5993 tinyTester.blink_time_msec = 75;
whismanoid 30:13fc9d492ee0 5994 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5995 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5996 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5997 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5998
whismanoid 25:9d4012b0887f 5999 //
whismanoid 25:9d4012b0887f 6000 #if INJECT_SELFTEST_FAIL
whismanoid 25:9d4012b0887f 6001 // Test of the pass/fail report mechanism
whismanoid 25:9d4012b0887f 6002 tinyTester.FAIL();
whismanoid 25:9d4012b0887f 6003 cmdLine.serial().print(F("injecting one false failure for test reporting"));
whismanoid 25:9d4012b0887f 6004 #endif
whismanoid 25:9d4012b0887f 6005 //
whismanoid 30:13fc9d492ee0 6006 // repeat-until-failure logic
whismanoid 33:2c675744a01b 6007 // if (cmdLine.serial().readable()) { goto exitTesting; }
whismanoid 33:2c675744a01b 6008 if (serial.readable()) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 6009 if ((SelfTestGroupEnable & 0x0002) && (tinyTester.nFail == 0)) { goto repeatUntilFailure; }
whismanoid 30:13fc9d492ee0 6010 //
whismanoid 30:13fc9d492ee0 6011 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 6012 exitTesting:
whismanoid 30:13fc9d492ee0 6013 //
whismanoid 25:9d4012b0887f 6014 // Report number of pass and number of fail test results
whismanoid 25:9d4012b0887f 6015 tinyTester.Report_Summary();
whismanoid 25:9d4012b0887f 6016 }
whismanoid 25:9d4012b0887f 6017
whismanoid 25:9d4012b0887f 6018 //--------------------------------------------------
whismanoid 25:9d4012b0887f 6019 // selfTestFunctionClosures[functionName]['functionName'] = 'Init'
whismanoid 25:9d4012b0887f 6020 // selfTestFunctionClosures[functionName]['argListDeclaration'] = 'void'
whismanoid 25:9d4012b0887f 6021 // selfTestFunctionClosures[functionName]['returnType'] = 'void'
whismanoid 25:9d4012b0887f 6022 // selfTestFunctionClosures[functionName]['argNames'] = ''
whismanoid 25:9d4012b0887f 6023 // CommandParamIn_declaration = 'void'
whismanoid 25:9d4012b0887f 6024 // argNames_recast_implementation = ''
whismanoid 25:9d4012b0887f 6025 //--------------------------------------------------
whismanoid 25:9d4012b0887f 6026 // selftest: define function under test
whismanoid 25:9d4012b0887f 6027 // void MAX5719::Init(void)
whismanoid 25:9d4012b0887f 6028 void fn_MAX5719_Init(void)
whismanoid 25:9d4012b0887f 6029 {
whismanoid 25:9d4012b0887f 6030 return g_MAX5719_device.Init();
whismanoid 25:9d4012b0887f 6031 }
whismanoid 25:9d4012b0887f 6032
whismanoid 25:9d4012b0887f 6033 //--------------------------------------------------
whismanoid 25:9d4012b0887f 6034 // selfTestFunctionClosures[functionName]['functionName'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 6035 // selfTestFunctionClosures[functionName]['argListDeclaration'] = 'uint32_t dacCodeLsbs'
whismanoid 25:9d4012b0887f 6036 // selfTestFunctionClosures[functionName]['returnType'] = 'uint8_t'
whismanoid 25:9d4012b0887f 6037 // selfTestFunctionClosures[functionName]['argNames'] = 'dacCodeLsbs'
whismanoid 25:9d4012b0887f 6038 // CommandParamIn_declaration = 'uint32_t dacCodeLsbs'
whismanoid 25:9d4012b0887f 6039 // argNames_recast_implementation = '(uint32_t)dacCodeLsbs'
whismanoid 25:9d4012b0887f 6040 //--------------------------------------------------
whismanoid 25:9d4012b0887f 6041 // selftest: define function under test
whismanoid 25:9d4012b0887f 6042 // uint8_t MAX5719::CODE_LOAD(uint32_t dacCodeLsbs)
whismanoid 25:9d4012b0887f 6043 uint8_t fn_MAX5719_CODE_LOAD(uint32_t dacCodeLsbs)
whismanoid 25:9d4012b0887f 6044 {
whismanoid 25:9d4012b0887f 6045 return g_MAX5719_device.CODE_LOAD((uint32_t)dacCodeLsbs);
whismanoid 25:9d4012b0887f 6046 }
whismanoid 25:9d4012b0887f 6047
whismanoid 25:9d4012b0887f 6048 //--------------------------------------------------
whismanoid 25:9d4012b0887f 6049 // selfTestFunctionClosures[functionName]['functionName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 6050 // selfTestFunctionClosures[functionName]['argListDeclaration'] = 'double voltageV'
whismanoid 25:9d4012b0887f 6051 // selfTestFunctionClosures[functionName]['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 6052 // selfTestFunctionClosures[functionName]['argNames'] = 'voltageV'
whismanoid 25:9d4012b0887f 6053 // CommandParamIn_declaration = 'double voltageV'
whismanoid 25:9d4012b0887f 6054 // argNames_recast_implementation = '(double)voltageV'
whismanoid 25:9d4012b0887f 6055 //--------------------------------------------------
whismanoid 25:9d4012b0887f 6056 // selftest: define function under test
whismanoid 25:9d4012b0887f 6057 // uint32_t MAX5719::DACCodeOfVoltage(double voltageV)
whismanoid 25:9d4012b0887f 6058 uint32_t fn_MAX5719_DACCodeOfVoltage(double voltageV)
whismanoid 25:9d4012b0887f 6059 {
whismanoid 25:9d4012b0887f 6060 return g_MAX5719_device.DACCodeOfVoltage((double)voltageV);
whismanoid 25:9d4012b0887f 6061 }
whismanoid 25:9d4012b0887f 6062
whismanoid 25:9d4012b0887f 6063
whismanoid 25:9d4012b0887f 6064 //--------------------------------------------------
whismanoid 25:9d4012b0887f 6065 inline void print_command_prompt()
whismanoid 25:9d4012b0887f 6066 {
whismanoid 25:9d4012b0887f 6067 cmdLine_serial.serial().printf("\r\n> ");
whismanoid 25:9d4012b0887f 6068
whismanoid 25:9d4012b0887f 6069 }
whismanoid 25:9d4012b0887f 6070
whismanoid 25:9d4012b0887f 6071
whismanoid 25:9d4012b0887f 6072 //--------------------------------------------------
whismanoid 25:9d4012b0887f 6073 void pinsMonitor_submenu_onEOLcommandParser(CmdLine& cmdLine)
whismanoid 25:9d4012b0887f 6074 {
whismanoid 25:9d4012b0887f 6075 // % diagnostic commands submenu
whismanoid 25:9d4012b0887f 6076 // %Hpin -- digital output high
whismanoid 25:9d4012b0887f 6077 // %Lpin -- digital output low
whismanoid 25:9d4012b0887f 6078 // %?pin -- digital input
whismanoid 25:9d4012b0887f 6079 // %A %Apin -- analog input
whismanoid 25:9d4012b0887f 6080 // %Ppin df=xx -- pwm output
whismanoid 25:9d4012b0887f 6081 // %Wpin -- measure high pulsewidth input in usec
whismanoid 25:9d4012b0887f 6082 // %wpin -- measure low pulsewidth input in usec
whismanoid 25:9d4012b0887f 6083 // %I... -- I2C diagnostics
whismanoid 25:9d4012b0887f 6084 // %IP -- I2C probe
whismanoid 25:9d4012b0887f 6085 // %IC scl=100khz ADDR=? -- I2C configure
whismanoid 25:9d4012b0887f 6086 // %IW byte byte ... byte RD=? ADDR=0x -- write
whismanoid 25:9d4012b0887f 6087 // %IR ADDR=? RD=? -- read
whismanoid 25:9d4012b0887f 6088 // %I^ cmd=? -- i2c_smbus_read_word_data
whismanoid 25:9d4012b0887f 6089 // %S... -- SPI diagnostics
whismanoid 25:9d4012b0887f 6090 // %SC sclk=1Mhz -- SPI configure
whismanoid 25:9d4012b0887f 6091 // %SW -- write (write and read)
whismanoid 25:9d4012b0887f 6092 // %SR -- read (alias for %SW because SPI always write and read)
whismanoid 25:9d4012b0887f 6093 // A-Z,a-z,0-9 reserved for application use
whismanoid 25:9d4012b0887f 6094 //
whismanoid 25:9d4012b0887f 6095 char strPinIndex[3];
whismanoid 25:9d4012b0887f 6096 strPinIndex[0] = cmdLine[2];
whismanoid 25:9d4012b0887f 6097 strPinIndex[1] = cmdLine[3];
whismanoid 25:9d4012b0887f 6098 strPinIndex[2] = '\0';
whismanoid 25:9d4012b0887f 6099 int pinIndex = strtoul(strPinIndex, NULL, 10); // strtol(str, NULL, 10): get decimal value
whismanoid 25:9d4012b0887f 6100 //cmdLine.serial().printf(" pinIndex=%d ", pinIndex);
whismanoid 25:9d4012b0887f 6101 //
whismanoid 25:9d4012b0887f 6102 // get next character
whismanoid 25:9d4012b0887f 6103 switch (cmdLine[1])
whismanoid 25:9d4012b0887f 6104 {
whismanoid 25:9d4012b0887f 6105 #if HAS_digitalInOuts
whismanoid 25:9d4012b0887f 6106 case 'H': case 'h':
whismanoid 25:9d4012b0887f 6107 {
whismanoid 25:9d4012b0887f 6108 // %Hpin -- digital output high
whismanoid 25:9d4012b0887f 6109 #if ARDUINO_STYLE
whismanoid 25:9d4012b0887f 6110 pinMode(pinIndex, OUTPUT); // digital pins 0, 1, 2, .. 13, analog input pins A0, A1, .. A5
whismanoid 25:9d4012b0887f 6111 digitalWrite(pinIndex, HIGH); // digital pins 0, 1, 2, .. 13, analog input pins A0, A1, .. A5
whismanoid 25:9d4012b0887f 6112 #else
whismanoid 25:9d4012b0887f 6113 DigitalInOut& digitalInOutPin = find_digitalInOutPin(pinIndex);
whismanoid 25:9d4012b0887f 6114 digitalInOutPin.output();
whismanoid 25:9d4012b0887f 6115 digitalInOutPin.write(1);
whismanoid 25:9d4012b0887f 6116 #endif
whismanoid 25:9d4012b0887f 6117 cmdLine.serial().printf(" digitalInOutPin %d Output High ", pinIndex);
whismanoid 25:9d4012b0887f 6118 }
whismanoid 25:9d4012b0887f 6119 break;
whismanoid 25:9d4012b0887f 6120 case 'L': case 'l':
whismanoid 25:9d4012b0887f 6121 {
whismanoid 25:9d4012b0887f 6122 // %Lpin -- digital output low
whismanoid 25:9d4012b0887f 6123 #if ARDUINO_STYLE
whismanoid 25:9d4012b0887f 6124 pinMode(pinIndex, OUTPUT); // digital pins 0, 1, 2, .. 13, analog input pins A0, A1, .. A5
whismanoid 25:9d4012b0887f 6125 digitalWrite(pinIndex, LOW); // digital pins 0, 1, 2, .. 13, analog input pins A0, A1, .. A5
whismanoid 25:9d4012b0887f 6126 #else
whismanoid 25:9d4012b0887f 6127 DigitalInOut& digitalInOutPin = find_digitalInOutPin(pinIndex);
whismanoid 25:9d4012b0887f 6128 digitalInOutPin.output();
whismanoid 25:9d4012b0887f 6129 digitalInOutPin.write(0);
whismanoid 25:9d4012b0887f 6130 #endif
whismanoid 25:9d4012b0887f 6131 cmdLine.serial().printf(" digitalInOutPin %d Output Low ", pinIndex);
whismanoid 25:9d4012b0887f 6132 }
whismanoid 25:9d4012b0887f 6133 break;
whismanoid 25:9d4012b0887f 6134 case '?':
whismanoid 25:9d4012b0887f 6135 {
whismanoid 25:9d4012b0887f 6136 // %?pin -- digital input
whismanoid 25:9d4012b0887f 6137 #if ARDUINO_STYLE
whismanoid 25:9d4012b0887f 6138 pinMode(pinIndex, INPUT); // digital pins 0, 1, 2, .. 13, analog input pins A0, A1, .. A5
whismanoid 25:9d4012b0887f 6139 #else
whismanoid 25:9d4012b0887f 6140 DigitalInOut& digitalInOutPin = find_digitalInOutPin(pinIndex);
whismanoid 25:9d4012b0887f 6141 digitalInOutPin.input();
whismanoid 25:9d4012b0887f 6142 #endif
whismanoid 25:9d4012b0887f 6143 serial.printf(" digitalInOutPin %d Input ", pinIndex);
whismanoid 25:9d4012b0887f 6144 #if ARDUINO_STYLE
whismanoid 25:9d4012b0887f 6145 int value = digitalRead(pinIndex);
whismanoid 25:9d4012b0887f 6146 #else
whismanoid 25:9d4012b0887f 6147 int value = digitalInOutPin.read();
whismanoid 25:9d4012b0887f 6148 #endif
whismanoid 25:9d4012b0887f 6149 cmdLine.serial().printf("%d ", value);
whismanoid 25:9d4012b0887f 6150 }
whismanoid 25:9d4012b0887f 6151 break;
whismanoid 25:9d4012b0887f 6152 #endif
whismanoid 25:9d4012b0887f 6153 //
whismanoid 25:9d4012b0887f 6154 #if HAS_analogIns
whismanoid 25:9d4012b0887f 6155 case 'A': case 'a':
whismanoid 25:9d4012b0887f 6156 {
whismanoid 25:9d4012b0887f 6157 // %A %Apin -- analog input
whismanoid 25:9d4012b0887f 6158 #if analogIn4_IS_HIGH_RANGE_OF_analogIn0
whismanoid 25:9d4012b0887f 6159 // Platform board uses AIN4,AIN5,.. as high range of AIN0,AIN1,..
whismanoid 25:9d4012b0887f 6160 for (int pinIndex = 0; pinIndex < 2; pinIndex++)
whismanoid 25:9d4012b0887f 6161 {
whismanoid 25:9d4012b0887f 6162 int cPinIndex = '0' + pinIndex;
whismanoid 25:9d4012b0887f 6163 AnalogIn& analogInPin = find_analogInPin(cPinIndex);
whismanoid 25:9d4012b0887f 6164 float adc_full_scale_voltage = analogInPin_fullScaleVoltage[pinIndex];
whismanoid 25:9d4012b0887f 6165 float normValue_0_1 = analogInPin.read();
whismanoid 25:9d4012b0887f 6166 //
whismanoid 25:9d4012b0887f 6167 int pinIndexH = pinIndex + 4;
whismanoid 25:9d4012b0887f 6168 int cPinIndexH = '0' + pinIndexH;
whismanoid 25:9d4012b0887f 6169 AnalogIn& analogInPinH = find_analogInPin(cPinIndexH);
whismanoid 25:9d4012b0887f 6170 float adc_full_scale_voltageH = analogInPin_fullScaleVoltage[pinIndexH];
whismanoid 25:9d4012b0887f 6171 float normValueH_0_1 = analogInPinH.read();
whismanoid 25:9d4012b0887f 6172 //
whismanoid 25:9d4012b0887f 6173 cmdLine.serial().printf("AIN%c = %7.3f%% = %1.3fV AIN%c = %7.3f%% = %1.3fV \r\n",
whismanoid 25:9d4012b0887f 6174 cPinIndex,
whismanoid 25:9d4012b0887f 6175 normValue_0_1 * 100.0,
whismanoid 25:9d4012b0887f 6176 normValue_0_1 * adc_full_scale_voltage,
whismanoid 25:9d4012b0887f 6177 cPinIndexH,
whismanoid 25:9d4012b0887f 6178 normValueH_0_1 * 100.0,
whismanoid 25:9d4012b0887f 6179 normValueH_0_1 * adc_full_scale_voltageH
whismanoid 25:9d4012b0887f 6180 );
whismanoid 25:9d4012b0887f 6181 }
whismanoid 25:9d4012b0887f 6182 for (int pinIndex = 2; pinIndex < 4; pinIndex++)
whismanoid 25:9d4012b0887f 6183 {
whismanoid 25:9d4012b0887f 6184 int cPinIndex = '0' + pinIndex;
whismanoid 25:9d4012b0887f 6185 AnalogIn& analogInPin = find_analogInPin(cPinIndex);
whismanoid 25:9d4012b0887f 6186 float adc_full_scale_voltage = analogInPin_fullScaleVoltage[pinIndex];
whismanoid 25:9d4012b0887f 6187 float normValue_0_1 = analogInPin.read();
whismanoid 25:9d4012b0887f 6188 //
whismanoid 25:9d4012b0887f 6189 cmdLine.serial().printf("AIN%c = %7.3f%% = %1.3fV\r\n",
whismanoid 25:9d4012b0887f 6190 cPinIndex,
whismanoid 25:9d4012b0887f 6191 normValue_0_1 * 100.0,
whismanoid 25:9d4012b0887f 6192 normValue_0_1 * adc_full_scale_voltage
whismanoid 25:9d4012b0887f 6193 );
whismanoid 25:9d4012b0887f 6194 }
whismanoid 25:9d4012b0887f 6195 #else // analogIn4_IS_HIGH_RANGE_OF_analogIn0
whismanoid 25:9d4012b0887f 6196 // Platform board uses simple analog inputs
whismanoid 25:9d4012b0887f 6197 // assume standard Arduino analog inputs A0-A5
whismanoid 25:9d4012b0887f 6198 for (int pinIndex = 0; pinIndex < 6; pinIndex++)
whismanoid 25:9d4012b0887f 6199 {
whismanoid 25:9d4012b0887f 6200 int cPinIndex = '0' + pinIndex;
whismanoid 25:9d4012b0887f 6201 AnalogIn& analogInPin = find_analogInPin(cPinIndex);
whismanoid 25:9d4012b0887f 6202 float adc_full_scale_voltage = analogInPin_fullScaleVoltage[pinIndex];
whismanoid 25:9d4012b0887f 6203 float normValue_0_1 = analogInPin.read();
whismanoid 25:9d4012b0887f 6204 //
whismanoid 25:9d4012b0887f 6205 cmdLine.serial().printf("AIN%c = %7.3f%% = %1.3fV\r\n",
whismanoid 25:9d4012b0887f 6206 cPinIndex,
whismanoid 25:9d4012b0887f 6207 normValue_0_1 * 100.0,
whismanoid 25:9d4012b0887f 6208 normValue_0_1 * adc_full_scale_voltage
whismanoid 25:9d4012b0887f 6209 );
whismanoid 25:9d4012b0887f 6210 }
whismanoid 25:9d4012b0887f 6211 #endif // analogIn4_IS_HIGH_RANGE_OF_analogIn0
whismanoid 25:9d4012b0887f 6212 }
whismanoid 25:9d4012b0887f 6213 break;
whismanoid 25:9d4012b0887f 6214 #endif
whismanoid 25:9d4012b0887f 6215 //
whismanoid 25:9d4012b0887f 6216 #if HAS_SPI2_MAX541
whismanoid 25:9d4012b0887f 6217 case 'D': case 'd':
whismanoid 25:9d4012b0887f 6218 {
whismanoid 25:9d4012b0887f 6219 // %D -- DAC output MAX541 (SPI2) -- need cmdLine.parse_float(voltageV)
whismanoid 25:9d4012b0887f 6220 // MAX541 max541(spi2_max541, spi2_max541_cs);
whismanoid 25:9d4012b0887f 6221 float voltageV = max541.Get_Voltage();
whismanoid 25:9d4012b0887f 6222 // if (cmdLine[2] == '+') {
whismanoid 25:9d4012b0887f 6223 // // %D+
whismanoid 25:9d4012b0887f 6224 // voltageV = voltageV * 1.25f;
whismanoid 25:9d4012b0887f 6225 // if (voltageV >= max541.VRef) voltageV = max541.VRef;
whismanoid 25:9d4012b0887f 6226 // SelfTest_MAX541_Voltage(cmdLine, max541, voltageV);
whismanoid 25:9d4012b0887f 6227 // }
whismanoid 25:9d4012b0887f 6228 // else if (cmdLine[2] == '-') {
whismanoid 25:9d4012b0887f 6229 // // %D-
whismanoid 25:9d4012b0887f 6230 // voltageV = voltageV * 0.75f;
whismanoid 25:9d4012b0887f 6231 // if (voltageV < 0.1f) voltageV = 0.1f;
whismanoid 25:9d4012b0887f 6232 // SelfTest_MAX541_Voltage(cmdLine, max541, voltageV);
whismanoid 25:9d4012b0887f 6233 // }
whismanoid 25:9d4012b0887f 6234 if (cmdLine.parse_float("V", voltageV))
whismanoid 25:9d4012b0887f 6235 {
whismanoid 25:9d4012b0887f 6236 // %D V=1.234 -- set voltage
whismanoid 25:9d4012b0887f 6237 max541.Set_Voltage(voltageV);
whismanoid 25:9d4012b0887f 6238 }
whismanoid 25:9d4012b0887f 6239 else if (cmdLine.parse_float("TEST", voltageV))
whismanoid 25:9d4012b0887f 6240 {
whismanoid 25:9d4012b0887f 6241 // %D TEST=1.234 -- set voltage and compare with AIN0
whismanoid 25:9d4012b0887f 6242 SelfTest_MAX541_Voltage(cmdLine, max541, voltageV);
whismanoid 25:9d4012b0887f 6243 }
whismanoid 25:9d4012b0887f 6244 else if (cmdLine.parse_float("CAL", voltageV))
whismanoid 25:9d4012b0887f 6245 {
whismanoid 25:9d4012b0887f 6246 // %D CAL=1.234 -- calibrate VRef and compare with AIN0
whismanoid 25:9d4012b0887f 6247
whismanoid 25:9d4012b0887f 6248 max541.Set_Code(0x8000); // we don't know the fullscale voltage yet, so set code to midscale
whismanoid 25:9d4012b0887f 6249 double max541_midscale_V = analogInPin_fullScaleVoltage[4] * analogIn4.read(); // TARGET_MAX32630 J1.5 AIN_4 = AIN0 / 5.0 fullscale is 6.0V
whismanoid 25:9d4012b0887f 6250 const int average_count = 100;
whismanoid 25:9d4012b0887f 6251 const double average_K = 0.25;
whismanoid 25:9d4012b0887f 6252 for (int count = 0; count < average_count; count++) {
whismanoid 25:9d4012b0887f 6253 double measurement_V = analogInPin_fullScaleVoltage[4] * analogIn4.read(); // TARGET_MAX32630 J1.5 AIN_4 = AIN0 / 5.0 fullscale is 6.0V
whismanoid 25:9d4012b0887f 6254 max541_midscale_V = ((1 - average_K) * max541_midscale_V) + (average_K * measurement_V);
whismanoid 25:9d4012b0887f 6255 }
whismanoid 25:9d4012b0887f 6256 max541.VRef = 2.0 * max541_midscale_V;
whismanoid 25:9d4012b0887f 6257 cmdLine.serial().printf(
whismanoid 25:9d4012b0887f 6258 "\r\n MAX541 midscale = %1.3fV, so fullscale = %1.3fV",
whismanoid 25:9d4012b0887f 6259 max541_midscale_V, max541.VRef);
whismanoid 25:9d4012b0887f 6260 // Detect whether MAX541 is really connected to MAX32625MBED.AIN0/AIN4
whismanoid 25:9d4012b0887f 6261 voltageV = 1.0f;
whismanoid 25:9d4012b0887f 6262 SelfTest_MAX541_Voltage(cmdLine, max541, voltageV);
whismanoid 25:9d4012b0887f 6263 }
whismanoid 25:9d4012b0887f 6264 else {
whismanoid 25:9d4012b0887f 6265 // %D -- print MAX541 DAC status
whismanoid 25:9d4012b0887f 6266 cmdLine.serial().printf("MAX541 code=0x%4.4x = %1.3fV VRef=%1.3fV\r\n",
whismanoid 25:9d4012b0887f 6267 max541.Get_Code(), max541.Get_Voltage(), max541.VRef);
whismanoid 25:9d4012b0887f 6268 }
whismanoid 25:9d4012b0887f 6269 }
whismanoid 25:9d4012b0887f 6270 break;
whismanoid 25:9d4012b0887f 6271 #endif
whismanoid 25:9d4012b0887f 6272
whismanoid 25:9d4012b0887f 6273 //
whismanoid 25:9d4012b0887f 6274 #if HAS_I2C // SUPPORT_I2C
whismanoid 25:9d4012b0887f 6275 case 'I': case 'i':
whismanoid 25:9d4012b0887f 6276 // %I... -- I2C diagnostics
whismanoid 25:9d4012b0887f 6277 // %IP -- I2C probe
whismanoid 25:9d4012b0887f 6278 // %IC scl=100khz ADDR=? -- I2C configure
whismanoid 25:9d4012b0887f 6279 // %IW byte byte ... byte RD=? ADDR=0x -- write
whismanoid 25:9d4012b0887f 6280 // %IR ADDR=? RD=? -- read
whismanoid 25:9d4012b0887f 6281 // %I^ cmd=? -- i2c_smbus_read_word_data
whismanoid 25:9d4012b0887f 6282 // get next character
whismanoid 25:9d4012b0887f 6283 // TODO: parse cmdLine arg (ADDR=\d+)? --> g_I2C_deviceAddress7
whismanoid 25:9d4012b0887f 6284 cmdLine.parse_byte_hex("ADDR", g_I2C_deviceAddress7);
whismanoid 25:9d4012b0887f 6285 // TODO: parse cmdLine arg (RD=\d)? --> g_I2C_read_count
whismanoid 25:9d4012b0887f 6286 g_I2C_read_count = 0; // read count must be reset every command
whismanoid 25:9d4012b0887f 6287 cmdLine.parse_byte_dec("RD", g_I2C_read_count);
whismanoid 25:9d4012b0887f 6288 // TODO: parse cmdLine arg (CMD=\d)? --> g_I2C_command_regAddress
whismanoid 25:9d4012b0887f 6289 cmdLine.parse_byte_hex("CMD", g_I2C_command_regAddress);
whismanoid 25:9d4012b0887f 6290 switch (cmdLine[2])
whismanoid 25:9d4012b0887f 6291 {
whismanoid 25:9d4012b0887f 6292 case 'P': case 'p':
whismanoid 25:9d4012b0887f 6293 {
whismanoid 25:9d4012b0887f 6294 // %IP -- I2C probe
whismanoid 25:9d4012b0887f 6295 HuntAttachedI2CDevices(cmdLine, 0x03, 0x77);
whismanoid 25:9d4012b0887f 6296 }
whismanoid 25:9d4012b0887f 6297 break;
whismanoid 25:9d4012b0887f 6298 case 'C': case 'c':
whismanoid 25:9d4012b0887f 6299 {
whismanoid 25:9d4012b0887f 6300 bool isUpdatedI2CConfig = false;
whismanoid 25:9d4012b0887f 6301 // %IC scl=100khz ADDR=? -- I2C configure
whismanoid 25:9d4012b0887f 6302 // parse cmdLine arg (SCL=\d+(kHZ|MHZ)?)? --> g_I2C_SCL_Hz
whismanoid 25:9d4012b0887f 6303 if (cmdLine.parse_frequency_Hz("SCL", g_I2C_SCL_Hz))
whismanoid 25:9d4012b0887f 6304 {
whismanoid 25:9d4012b0887f 6305 isUpdatedI2CConfig = true;
whismanoid 25:9d4012b0887f 6306 // TODO1: validate g_I2C_SCL_Hz against system clock frequency F_CPU
whismanoid 25:9d4012b0887f 6307 if (g_I2C_SCL_Hz > limit_max_I2C_SCL_Hz)
whismanoid 25:9d4012b0887f 6308 {
whismanoid 25:9d4012b0887f 6309 g_I2C_SCL_Hz = limit_max_I2C_SCL_Hz;
whismanoid 25:9d4012b0887f 6310 }
whismanoid 25:9d4012b0887f 6311 if (g_I2C_SCL_Hz < limit_min_I2C_SCL_Hz)
whismanoid 25:9d4012b0887f 6312 {
whismanoid 25:9d4012b0887f 6313 g_I2C_SCL_Hz = limit_min_I2C_SCL_Hz;
whismanoid 25:9d4012b0887f 6314 }
whismanoid 25:9d4012b0887f 6315 }
whismanoid 25:9d4012b0887f 6316 if (isUpdatedI2CConfig)
whismanoid 25:9d4012b0887f 6317 {
whismanoid 25:9d4012b0887f 6318 // declare in narrower scope: MAX32625MBED I2C i2cMaster(...)
whismanoid 25:9d4012b0887f 6319 I2C i2cMaster(I2C0_SDA, I2C0_SCL); // sda scl TARGET_MAX32635MBED: P1_6, P1_7 Arduino 10-pin header
whismanoid 25:9d4012b0887f 6320 i2cMaster.frequency(g_I2C_SCL_Hz);
whismanoid 25:9d4012b0887f 6321 i2cMaster.start();
whismanoid 25:9d4012b0887f 6322 i2cMaster.stop();
whismanoid 25:9d4012b0887f 6323 i2cMaster.frequency(g_I2C_SCL_Hz);
whismanoid 25:9d4012b0887f 6324 cmdLine.serial().printf(
whismanoid 25:9d4012b0887f 6325 "\r\n %%IC ADDR=0x%2.2x=(0x%2.2x>>1) SCL=%d=%1.3fkHz -- I2C config",
whismanoid 25:9d4012b0887f 6326 g_I2C_deviceAddress7, (g_I2C_deviceAddress7 << 1), g_I2C_SCL_Hz,
whismanoid 25:9d4012b0887f 6327 (g_I2C_SCL_Hz / 1000.));
whismanoid 25:9d4012b0887f 6328 i2cMaster.start();
whismanoid 25:9d4012b0887f 6329 i2cMaster.stop();
whismanoid 25:9d4012b0887f 6330 }
whismanoid 25:9d4012b0887f 6331 }
whismanoid 25:9d4012b0887f 6332 break;
whismanoid 25:9d4012b0887f 6333 case 'W': case 'w':
whismanoid 25:9d4012b0887f 6334 {
whismanoid 25:9d4012b0887f 6335 // declare in narrower scope: MAX32625MBED I2C i2cMaster(...)
whismanoid 25:9d4012b0887f 6336 I2C i2cMaster(I2C0_SDA, I2C0_SCL); // sda scl TARGET_MAX32635MBED: P1_6, P1_7 Arduino 10-pin header
whismanoid 25:9d4012b0887f 6337 i2cMaster.frequency(g_I2C_SCL_Hz);
whismanoid 25:9d4012b0887f 6338 // %IW byte byte ... byte RD=? ADDR=0x -- write
whismanoid 25:9d4012b0887f 6339 // parse cmdLine byte list --> int byteCount; int mosiData[MAX_SPI_BYTE_COUNT];
whismanoid 25:9d4012b0887f 6340 #define MAX_I2C_BYTE_COUNT 32
whismanoid 25:9d4012b0887f 6341 size_t byteCount = byteCount;
whismanoid 25:9d4012b0887f 6342 static char mosiData[MAX_I2C_BYTE_COUNT];
whismanoid 25:9d4012b0887f 6343 static char misoData[MAX_I2C_BYTE_COUNT];
whismanoid 25:9d4012b0887f 6344 if (cmdLine.parse_byteCount_byteList_hex(byteCount, mosiData,
whismanoid 25:9d4012b0887f 6345 MAX_I2C_BYTE_COUNT))
whismanoid 25:9d4012b0887f 6346 {
whismanoid 25:9d4012b0887f 6347 // hex dump mosiData[0..byteCount-1]
whismanoid 25:9d4012b0887f 6348 cmdLine.serial().printf(
whismanoid 25:9d4012b0887f 6349 "\r\nADDR=0x%2.2x=(0x%2.2x>>1) byteCount:%d RD=%d\r\nI2C MOSI->",
whismanoid 25:9d4012b0887f 6350 g_I2C_deviceAddress7,
whismanoid 25:9d4012b0887f 6351 (g_I2C_deviceAddress7 << 1), byteCount, g_I2C_read_count);
whismanoid 25:9d4012b0887f 6352 for (unsigned int byteIndex = 0; byteIndex < byteCount; byteIndex++)
whismanoid 25:9d4012b0887f 6353 {
whismanoid 25:9d4012b0887f 6354 cmdLine.serial().printf(" 0x%2.2X", mosiData[byteIndex]);
whismanoid 25:9d4012b0887f 6355 }
whismanoid 25:9d4012b0887f 6356 //
whismanoid 25:9d4012b0887f 6357 // TODO: i2c transfer
whismanoid 25:9d4012b0887f 6358 //const int addr7bit = 0x48; // 7 bit I2C address
whismanoid 25:9d4012b0887f 6359 //const int addr8bit = 0x48 << 1; // 8bit I2C address, 0x90
whismanoid 25:9d4012b0887f 6360 // /* int */ i2cMaster.read (int addr8bit, char *data, int length, bool repeated=false) // Read from an I2C slave.
whismanoid 25:9d4012b0887f 6361 // /* int */ i2cMaster.read (int ack) // Read a single byte from the I2C bus.
whismanoid 25:9d4012b0887f 6362 // /* int */ i2cMaster.write (int addr8bit, const char *data, int length, bool repeated=false) // Write to an I2C slave.
whismanoid 25:9d4012b0887f 6363 // /* int */ i2cMaster.write (int data) // Write single byte out on the I2C bus.
whismanoid 25:9d4012b0887f 6364 // /* void */ i2cMaster.start (void) // Creates a start condition on the I2C bus.
whismanoid 25:9d4012b0887f 6365 // /* void */ i2cMaster.stop (void) // Creates a stop condition on the I2C bus.
whismanoid 25:9d4012b0887f 6366 // /* int */ i2cMaster.transfer (int addr8bit, const char *tx_buffer, int tx_length, char *rx_buffer, int rx_length, const event_callback_t &callback, int event=I2C_EVENT_TRANSFER_COMPLETE, bool repeated=false) // Start nonblocking I2C transfer. More...
whismanoid 25:9d4012b0887f 6367 // /* void */ i2cMaster.abort_transfer () // Abort the ongoing I2C transfer. More...
whismanoid 25:9d4012b0887f 6368 const int addr8bit = g_I2C_deviceAddress7 << 1; // 8bit I2C address, 0x90
whismanoid 25:9d4012b0887f 6369 unsigned int misoLength = 0;
whismanoid 25:9d4012b0887f 6370 bool repeated = (g_I2C_read_count > 0);
whismanoid 25:9d4012b0887f 6371 //
whismanoid 25:9d4012b0887f 6372 int writeStatus = i2cMaster.write (addr8bit, mosiData, byteCount, repeated);
whismanoid 25:9d4012b0887f 6373 switch (writeStatus)
whismanoid 25:9d4012b0887f 6374 {
whismanoid 25:9d4012b0887f 6375 case 0: cmdLine.serial().printf(" ack "); break;
whismanoid 25:9d4012b0887f 6376 case 1: cmdLine.serial().printf(" nack "); break;
whismanoid 25:9d4012b0887f 6377 default: cmdLine.serial().printf(" {writeStatus 0x%2.2X} ",
whismanoid 25:9d4012b0887f 6378 writeStatus);
whismanoid 25:9d4012b0887f 6379 }
whismanoid 25:9d4012b0887f 6380 if (repeated)
whismanoid 25:9d4012b0887f 6381 {
whismanoid 25:9d4012b0887f 6382 int readStatus =
whismanoid 25:9d4012b0887f 6383 i2cMaster.read (addr8bit, misoData, g_I2C_read_count, false);
whismanoid 25:9d4012b0887f 6384 switch (readStatus)
whismanoid 25:9d4012b0887f 6385 {
whismanoid 25:9d4012b0887f 6386 case 1: cmdLine.serial().printf(" nack "); break;
whismanoid 25:9d4012b0887f 6387 case 0: cmdLine.serial().printf(" ack "); break;
whismanoid 25:9d4012b0887f 6388 default: cmdLine.serial().printf(" {readStatus 0x%2.2X} ",
whismanoid 25:9d4012b0887f 6389 readStatus);
whismanoid 25:9d4012b0887f 6390 }
whismanoid 25:9d4012b0887f 6391 }
whismanoid 25:9d4012b0887f 6392 //
whismanoid 25:9d4012b0887f 6393 if (misoLength > 0)
whismanoid 25:9d4012b0887f 6394 {
whismanoid 25:9d4012b0887f 6395 // hex dump misoData[0..byteCount-1]
whismanoid 25:9d4012b0887f 6396 cmdLine.serial().printf(" MISO<-");
whismanoid 25:9d4012b0887f 6397 for (unsigned int byteIndex = 0; byteIndex < g_I2C_read_count;
whismanoid 25:9d4012b0887f 6398 byteIndex++)
whismanoid 25:9d4012b0887f 6399 {
whismanoid 25:9d4012b0887f 6400 cmdLine.serial().printf(" 0x%2.2X", misoData[byteIndex]);
whismanoid 25:9d4012b0887f 6401 }
whismanoid 25:9d4012b0887f 6402 }
whismanoid 25:9d4012b0887f 6403 cmdLine.serial().printf(" ");
whismanoid 25:9d4012b0887f 6404 }
whismanoid 25:9d4012b0887f 6405 }
whismanoid 25:9d4012b0887f 6406 break;
whismanoid 25:9d4012b0887f 6407 case 'R': case 'r':
whismanoid 25:9d4012b0887f 6408 {
whismanoid 25:9d4012b0887f 6409 // declare in narrower scope: MAX32625MBED I2C i2cMaster(...)
whismanoid 25:9d4012b0887f 6410 I2C i2cMaster(I2C0_SDA, I2C0_SCL); // sda scl TARGET_MAX32635MBED: P1_6, P1_7 Arduino 10-pin header
whismanoid 25:9d4012b0887f 6411 i2cMaster.frequency(g_I2C_SCL_Hz);
whismanoid 25:9d4012b0887f 6412 // %IR ADDR=? RD=? -- read
whismanoid 25:9d4012b0887f 6413 // TODO: i2c transfer
whismanoid 25:9d4012b0887f 6414 //const int addr7bit = 0x48; // 7 bit I2C address
whismanoid 25:9d4012b0887f 6415 //const int addr8bit = 0x48 << 1; // 8bit I2C address, 0x90
whismanoid 25:9d4012b0887f 6416 // /* int */ i2cMaster.read (int addr8bit, char *data, int length, bool repeated=false) // Read from an I2C slave.
whismanoid 25:9d4012b0887f 6417 // /* int */ i2cMaster.read (int ack) // Read a single byte from the I2C bus.
whismanoid 25:9d4012b0887f 6418 // /* int */ i2cMaster.write (int addr8bit, const char *data, int length, bool repeated=false) // Write to an I2C slave.
whismanoid 25:9d4012b0887f 6419 // /* int */ i2cMaster.write (int data) // Write single byte out on the I2C bus.
whismanoid 25:9d4012b0887f 6420 // /* void */ i2cMaster.start (void) // Creates a start condition on the I2C bus.
whismanoid 25:9d4012b0887f 6421 // /* void */ i2cMaster.stop (void) // Creates a stop condition on the I2C bus.
whismanoid 25:9d4012b0887f 6422 // /* int */ i2cMaster.transfer (int addr8bit, const char *tx_buffer, int tx_length, char *rx_buffer, int rx_length, const event_callback_t &callback, int event=I2C_EVENT_TRANSFER_COMPLETE, bool repeated=false) // Start nonblocking I2C transfer. More...
whismanoid 25:9d4012b0887f 6423 // /* void */ i2cMaster.abort_transfer () // Abort the ongoing I2C transfer. More...
whismanoid 25:9d4012b0887f 6424 }
whismanoid 25:9d4012b0887f 6425 break;
whismanoid 25:9d4012b0887f 6426 case '^':
whismanoid 25:9d4012b0887f 6427 {
whismanoid 25:9d4012b0887f 6428 // declare in narrower scope: MAX32625MBED I2C i2cMaster(...)
whismanoid 25:9d4012b0887f 6429 I2C i2cMaster(I2C0_SDA, I2C0_SCL); // sda scl TARGET_MAX32635MBED: P1_6, P1_7 Arduino 10-pin header
whismanoid 25:9d4012b0887f 6430 i2cMaster.frequency(g_I2C_SCL_Hz);
whismanoid 25:9d4012b0887f 6431 // %I^ cmd=? -- i2c_smbus_read_word_data
whismanoid 25:9d4012b0887f 6432 // TODO: i2c transfer
whismanoid 25:9d4012b0887f 6433 //const int addr7bit = 0x48; // 7 bit I2C address
whismanoid 25:9d4012b0887f 6434 //const int addr8bit = 0x48 << 1; // 8bit I2C address, 0x90
whismanoid 25:9d4012b0887f 6435 // /* int */ i2cMaster.read (int addr8bit, char *data, int length, bool repeated=false) // Read from an I2C slave.
whismanoid 25:9d4012b0887f 6436 // /* int */ i2cMaster.read (int ack) // Read a single byte from the I2C bus.
whismanoid 25:9d4012b0887f 6437 // /* int */ i2cMaster.write (int addr8bit, const char *data, int length, bool repeated=false) // Write to an I2C slave.
whismanoid 25:9d4012b0887f 6438 // /* int */ i2cMaster.write (int data) // Write single byte out on the I2C bus.
whismanoid 25:9d4012b0887f 6439 // /* void */ i2cMaster.start (void) // Creates a start condition on the I2C bus.
whismanoid 25:9d4012b0887f 6440 // /* void */ i2cMaster.stop (void) // Creates a stop condition on the I2C bus.
whismanoid 25:9d4012b0887f 6441 // /* int */ i2cMaster.transfer (int addr8bit, const char *tx_buffer, int tx_length, char *rx_buffer, int rx_length, const event_callback_t &callback, int event=I2C_EVENT_TRANSFER_COMPLETE, bool repeated=false) // Start nonblocking I2C transfer. More...
whismanoid 25:9d4012b0887f 6442 // /* void */ i2cMaster.abort_transfer () // Abort the ongoing I2C transfer. More...
whismanoid 25:9d4012b0887f 6443 }
whismanoid 25:9d4012b0887f 6444 break;
whismanoid 25:9d4012b0887f 6445 } // switch(cmdLine[2])
whismanoid 25:9d4012b0887f 6446 break;
whismanoid 25:9d4012b0887f 6447 #endif
whismanoid 25:9d4012b0887f 6448 //
whismanoid 25:9d4012b0887f 6449 #if HAS_SPI // SUPPORT_SPI
whismanoid 25:9d4012b0887f 6450 case 'S': case 's':
whismanoid 25:9d4012b0887f 6451 {
whismanoid 25:9d4012b0887f 6452 // %S... -- SPI diagnostics
whismanoid 25:9d4012b0887f 6453 // %SC sclk=1Mhz -- SPI configure
whismanoid 25:9d4012b0887f 6454 // %SW -- write (write and read)
whismanoid 25:9d4012b0887f 6455 // %SR -- read (alias for %SW because SPI always write and read)
whismanoid 25:9d4012b0887f 6456 //
whismanoid 25:9d4012b0887f 6457 // Process arguments SCLK=\d+(kHZ|MHZ) CPOL=\d CPHA=\d
whismanoid 25:9d4012b0887f 6458 bool isUpdatedSPIConfig = false;
whismanoid 25:9d4012b0887f 6459 // parse cmdLine arg (CPOL=\d)? --> g_SPI_dataMode | SPI_MODE2
whismanoid 25:9d4012b0887f 6460 // parse cmdLine arg (CPHA=\d)? --> g_SPI_dataMode | SPI_MODE1
whismanoid 25:9d4012b0887f 6461 if (cmdLine.parse_flag("CPOL", g_SPI_dataMode, SPI_MODE2))
whismanoid 25:9d4012b0887f 6462 {
whismanoid 25:9d4012b0887f 6463 isUpdatedSPIConfig = true;
whismanoid 25:9d4012b0887f 6464 }
whismanoid 25:9d4012b0887f 6465 if (cmdLine.parse_flag("CPHA", g_SPI_dataMode, SPI_MODE1))
whismanoid 25:9d4012b0887f 6466 {
whismanoid 25:9d4012b0887f 6467 isUpdatedSPIConfig = true;
whismanoid 25:9d4012b0887f 6468 }
whismanoid 25:9d4012b0887f 6469 if (cmdLine.parse_flag("CS", g_SPI_cs_state, 1))
whismanoid 25:9d4012b0887f 6470 {
whismanoid 25:9d4012b0887f 6471 isUpdatedSPIConfig = true;
whismanoid 25:9d4012b0887f 6472 }
whismanoid 25:9d4012b0887f 6473 // parse cmdLine arg (SCLK=\d+(kHZ|MHZ)?)? --> g_SPI_SCLK_Hz
whismanoid 25:9d4012b0887f 6474 if (cmdLine.parse_frequency_Hz("SCLK", g_SPI_SCLK_Hz))
whismanoid 25:9d4012b0887f 6475 {
whismanoid 25:9d4012b0887f 6476 isUpdatedSPIConfig = true;
whismanoid 25:9d4012b0887f 6477 // TODO1: validate g_SPI_SCLK_Hz against system clock frequency F_CPU
whismanoid 25:9d4012b0887f 6478 if (g_SPI_SCLK_Hz > limit_max_SPI_SCLK_Hz)
whismanoid 25:9d4012b0887f 6479 {
whismanoid 25:9d4012b0887f 6480 g_SPI_SCLK_Hz = limit_max_SPI_SCLK_Hz;
whismanoid 25:9d4012b0887f 6481 }
whismanoid 25:9d4012b0887f 6482 if (g_SPI_SCLK_Hz < limit_min_SPI_SCLK_Hz)
whismanoid 25:9d4012b0887f 6483 {
whismanoid 25:9d4012b0887f 6484 g_SPI_SCLK_Hz = limit_min_SPI_SCLK_Hz;
whismanoid 25:9d4012b0887f 6485 }
whismanoid 25:9d4012b0887f 6486 }
whismanoid 25:9d4012b0887f 6487 // Update SPI configuration
whismanoid 25:9d4012b0887f 6488 if (isUpdatedSPIConfig)
whismanoid 25:9d4012b0887f 6489 {
whismanoid 25:9d4012b0887f 6490 // %SC sclk=1Mhz -- SPI configure
whismanoid 25:9d4012b0887f 6491 spi_cs = g_SPI_cs_state;
whismanoid 25:9d4012b0887f 6492 spi.format(8,g_SPI_dataMode); // int bits_must_be_8, int mode=0_3 CPOL=0,CPHA=0
whismanoid 25:9d4012b0887f 6493 #if APPLICATION_MAX5715
whismanoid 25:9d4012b0887f 6494 g_MAX5715_device.spi_frequency(g_SPI_SCLK_Hz);
whismanoid 25:9d4012b0887f 6495 #elif APPLICATION_MAX11131
whismanoid 25:9d4012b0887f 6496 g_MAX11131_device.spi_frequency(g_SPI_SCLK_Hz);
whismanoid 25:9d4012b0887f 6497 #elif APPLICATION_MAX5171
whismanoid 25:9d4012b0887f 6498 g_MAX5171_device.spi_frequency(g_SPI_SCLK_Hz);
whismanoid 25:9d4012b0887f 6499 #elif APPLICATION_MAX11410
whismanoid 25:9d4012b0887f 6500 g_MAX11410_device.spi_frequency(g_SPI_SCLK_Hz);
whismanoid 25:9d4012b0887f 6501 #elif APPLICATION_MAX12345
whismanoid 25:9d4012b0887f 6502 g_MAX12345_device.spi_frequency(g_SPI_SCLK_Hz);
whismanoid 25:9d4012b0887f 6503 #else
whismanoid 25:9d4012b0887f 6504 spi.frequency(g_SPI_SCLK_Hz); // int SCLK_Hz=1000000 = 1MHz (initial default)
whismanoid 25:9d4012b0887f 6505 #endif
whismanoid 25:9d4012b0887f 6506 //
whismanoid 25:9d4012b0887f 6507 double ideal_divisor = ((double)SystemCoreClock) / g_SPI_SCLK_Hz;
whismanoid 25:9d4012b0887f 6508 int actual_divisor = (int)(ideal_divisor + 0.0); // frequency divisor truncate
whismanoid 25:9d4012b0887f 6509 double actual_SCLK_Hz = SystemCoreClock / actual_divisor;
whismanoid 25:9d4012b0887f 6510 //
whismanoid 25:9d4012b0887f 6511 // fixed: mbed-os-5.11: [Warning] format '%d' expects argument of type 'int', but argument 6 has type 'uint32_t {aka long unsigned int}' [-Wformat=]
whismanoid 25:9d4012b0887f 6512 cmdLine.serial().printf(
whismanoid 25:9d4012b0887f 6513 "\r\n %%SC CPOL=%d CPHA=%d CS=%d SCLK=%ld=%1.3fMHz (%1.1fMHz/%1.2f = actual %1.3fMHz) -- SPI config",
whismanoid 25:9d4012b0887f 6514 ((g_SPI_dataMode & SPI_MODE2) ? 1 : 0),
whismanoid 25:9d4012b0887f 6515 ((g_SPI_dataMode & SPI_MODE1) ? 1 : 0),
whismanoid 25:9d4012b0887f 6516 g_SPI_cs_state,
whismanoid 25:9d4012b0887f 6517 g_SPI_SCLK_Hz,
whismanoid 25:9d4012b0887f 6518 (g_SPI_SCLK_Hz / 1000000.),
whismanoid 25:9d4012b0887f 6519 ((double)(SystemCoreClock / 1000000.)),
whismanoid 25:9d4012b0887f 6520 ideal_divisor,
whismanoid 25:9d4012b0887f 6521 (actual_SCLK_Hz / 1000000.)
whismanoid 25:9d4012b0887f 6522 );
whismanoid 25:9d4012b0887f 6523 }
whismanoid 25:9d4012b0887f 6524 // get next character
whismanoid 25:9d4012b0887f 6525 switch (cmdLine[2])
whismanoid 25:9d4012b0887f 6526 {
whismanoid 25:9d4012b0887f 6527 case 'C': case 's':
whismanoid 25:9d4012b0887f 6528 // %SC sclk=1Mhz -- SPI configure
whismanoid 25:9d4012b0887f 6529 break;
whismanoid 25:9d4012b0887f 6530 case 'D': case 'd':
whismanoid 25:9d4012b0887f 6531 // %SD -- SPI diagnostic messages enable
whismanoid 25:9d4012b0887f 6532 if (g_MAX5719_device.onSPIprint) {
whismanoid 25:9d4012b0887f 6533 g_MAX5719_device.onSPIprint = NULL;
whismanoid 25:9d4012b0887f 6534 // no g_MAX5719_device.loop_limit property; device_has_property(Device, 'loop_limit') != None is false
whismanoid 25:9d4012b0887f 6535 }
whismanoid 25:9d4012b0887f 6536 else {
whismanoid 25:9d4012b0887f 6537 void onSPIprint_handler(size_t byteCount, uint8_t mosiData[], uint8_t misoData[]);
whismanoid 25:9d4012b0887f 6538 g_MAX5719_device.onSPIprint = onSPIprint_handler;
whismanoid 25:9d4012b0887f 6539 // no g_MAX5719_device.loop_limit property; device_has_property(Device, 'loop_limit') is false
whismanoid 25:9d4012b0887f 6540 }
whismanoid 25:9d4012b0887f 6541 break;
whismanoid 25:9d4012b0887f 6542 case 'W': case 'R': case 'w': case 'r':
whismanoid 25:9d4012b0887f 6543 {
whismanoid 25:9d4012b0887f 6544 // %SW -- write (write and read)
whismanoid 25:9d4012b0887f 6545 // %SR -- read (alias for %SW because SPI always write and read)
whismanoid 25:9d4012b0887f 6546 // parse cmdLine byte list --> int byteCount; int mosiData[MAX_SPI_BYTE_COUNT];
whismanoid 25:9d4012b0887f 6547 #define MAX_SPI_BYTE_COUNT 32
whismanoid 25:9d4012b0887f 6548 size_t byteCount = byteCount;
whismanoid 25:9d4012b0887f 6549 static char mosiData[MAX_SPI_BYTE_COUNT];
whismanoid 25:9d4012b0887f 6550 static char misoData[MAX_SPI_BYTE_COUNT];
whismanoid 25:9d4012b0887f 6551 if (cmdLine.parse_byteCount_byteList_hex(byteCount, mosiData,
whismanoid 25:9d4012b0887f 6552 MAX_SPI_BYTE_COUNT))
whismanoid 25:9d4012b0887f 6553 {
whismanoid 25:9d4012b0887f 6554 // hex dump mosiData[0..byteCount-1]
whismanoid 25:9d4012b0887f 6555 cmdLine.serial().printf("\r\nSPI");
whismanoid 25:9d4012b0887f 6556 if (byteCount > 7) {
whismanoid 25:9d4012b0887f 6557 cmdLine.serial().printf(" byteCount:%d", byteCount);
whismanoid 25:9d4012b0887f 6558 }
whismanoid 25:9d4012b0887f 6559 cmdLine.serial().printf(" MOSI->");
whismanoid 25:9d4012b0887f 6560 for (unsigned int byteIndex = 0; byteIndex < byteCount; byteIndex++)
whismanoid 25:9d4012b0887f 6561 {
whismanoid 25:9d4012b0887f 6562 cmdLine.serial().printf(" 0x%2.2X", mosiData[byteIndex]);
whismanoid 25:9d4012b0887f 6563 }
whismanoid 25:9d4012b0887f 6564 spi_cs = 0;
whismanoid 25:9d4012b0887f 6565 unsigned int numBytesTransferred =
whismanoid 25:9d4012b0887f 6566 spi.write(mosiData, byteCount, misoData, byteCount);
whismanoid 25:9d4012b0887f 6567 spi_cs = 1;
whismanoid 25:9d4012b0887f 6568 // hex dump misoData[0..byteCount-1]
whismanoid 25:9d4012b0887f 6569 cmdLine.serial().printf(" MISO<-");
whismanoid 25:9d4012b0887f 6570 for (unsigned int byteIndex = 0; byteIndex < numBytesTransferred;
whismanoid 25:9d4012b0887f 6571 byteIndex++)
whismanoid 25:9d4012b0887f 6572 {
whismanoid 25:9d4012b0887f 6573 cmdLine.serial().printf(" 0x%2.2X", misoData[byteIndex]);
whismanoid 25:9d4012b0887f 6574 }
whismanoid 25:9d4012b0887f 6575 cmdLine.serial().printf(" ");
whismanoid 25:9d4012b0887f 6576 }
whismanoid 25:9d4012b0887f 6577 }
whismanoid 25:9d4012b0887f 6578 break;
whismanoid 25:9d4012b0887f 6579 } // switch(cmdLine[2])
whismanoid 25:9d4012b0887f 6580 } // case 'S': // %S... -- SPI diagnostics
whismanoid 25:9d4012b0887f 6581 break;
whismanoid 25:9d4012b0887f 6582 #endif
whismanoid 25:9d4012b0887f 6583 //
whismanoid 25:9d4012b0887f 6584 // A-Z,a-z,0-9 reserved for application use
whismanoid 25:9d4012b0887f 6585 } // switch(cmdLine[1])
whismanoid 25:9d4012b0887f 6586 } // end void pinsMonitor_submenu_onEOLcommandParser(CmdLine & cmdLine)
whismanoid 25:9d4012b0887f 6587
whismanoid 25:9d4012b0887f 6588
whismanoid 25:9d4012b0887f 6589 //--------------------------------------------------
whismanoid 25:9d4012b0887f 6590 void main_menu_status(CmdLine & cmdLine)
whismanoid 25:9d4012b0887f 6591 {
whismanoid 25:9d4012b0887f 6592 cmdLine.serial().printf("\r\nMain menu");
whismanoid 25:9d4012b0887f 6593
whismanoid 27:485b1b2f334c 6594 cmdLine.serial().printf(" MAX5719 20-bit 0.05nV-sec DAC");
whismanoid 25:9d4012b0887f 6595
whismanoid 25:9d4012b0887f 6596 //cmdLine.serial().print(" %s", TARGET_NAME);
whismanoid 25:9d4012b0887f 6597 if (cmdLine.nameStr())
whismanoid 25:9d4012b0887f 6598 {
whismanoid 25:9d4012b0887f 6599 cmdLine.serial().printf(" [%s]", cmdLine.nameStr());
whismanoid 25:9d4012b0887f 6600
whismanoid 25:9d4012b0887f 6601 }
whismanoid 25:9d4012b0887f 6602 cmdLine.serial().printf("\r\n ? -- help");
whismanoid 25:9d4012b0887f 6603
whismanoid 25:9d4012b0887f 6604 }
whismanoid 25:9d4012b0887f 6605
whismanoid 25:9d4012b0887f 6606
whismanoid 25:9d4012b0887f 6607 //--------------------------------------------------
whismanoid 25:9d4012b0887f 6608 void main_menu_help(CmdLine & cmdLine)
whismanoid 25:9d4012b0887f 6609 {
whismanoid 25:9d4012b0887f 6610 // ? -- help
whismanoid 25:9d4012b0887f 6611 //~ cmdLine.serial().print(F("\r\nMenu:"));
whismanoid 25:9d4012b0887f 6612 cmdLine.serial().printf("\r\n # -- lines beginning with # are comments");
whismanoid 25:9d4012b0887f 6613
whismanoid 34:f9ed6213f781 6614 cmdLine.serial().printf("\r\n . runall=? runfail=? loopall=? loopfail=? -- SelfTest");
whismanoid 25:9d4012b0887f 6615
whismanoid 25:9d4012b0887f 6616 //cmdLine.serial().print(F("\r\n ! -- Initial Configuration"));
whismanoid 25:9d4012b0887f 6617 //
whismanoid 25:9d4012b0887f 6618 // % standardize diagnostic commands
whismanoid 25:9d4012b0887f 6619 // %Hpin -- digital output high
whismanoid 25:9d4012b0887f 6620 // %Lpin -- digital output low
whismanoid 25:9d4012b0887f 6621 // %?pin -- digital input
whismanoid 25:9d4012b0887f 6622 // %A %Apin -- analog input
whismanoid 25:9d4012b0887f 6623 // %Ppin df=xx -- pwm output
whismanoid 25:9d4012b0887f 6624 // %Wpin -- measure high pulsewidth input in usec
whismanoid 25:9d4012b0887f 6625 // %wpin -- measure low pulsewidth input in usec
whismanoid 25:9d4012b0887f 6626 // %I... -- I2C diagnostics
whismanoid 25:9d4012b0887f 6627 // %IP -- I2C probe
whismanoid 25:9d4012b0887f 6628 // %IC scl=100khz ADDR=? -- I2C configure
whismanoid 25:9d4012b0887f 6629 // %IW ADDR=? cmd=? data,data,data -- write
whismanoid 25:9d4012b0887f 6630 // %IR ADDR=? RD=? -- read
whismanoid 25:9d4012b0887f 6631 // %I^ cmd=? -- i2c_smbus_read_word_data
whismanoid 25:9d4012b0887f 6632 // %S... -- SPI diagnostics
whismanoid 25:9d4012b0887f 6633 // %SC sclk=1Mhz -- SPI configure
whismanoid 25:9d4012b0887f 6634 // %SW -- write (write and read)
whismanoid 25:9d4012b0887f 6635 // %SR -- read (alias for %SW because SPI always write and read)
whismanoid 25:9d4012b0887f 6636 // A-Z,a-z,0-9 reserved for application use
whismanoid 25:9d4012b0887f 6637 //
whismanoid 25:9d4012b0887f 6638 #if HAS_digitalInOuts
whismanoid 25:9d4012b0887f 6639 // %Hpin -- digital output high
whismanoid 25:9d4012b0887f 6640 // %Lpin -- digital output low
whismanoid 25:9d4012b0887f 6641 // %?pin -- digital input
whismanoid 25:9d4012b0887f 6642 cmdLine.serial().printf("\r\n %%Hn {pin:");
whismanoid 25:9d4012b0887f 6643 list_digitalInOutPins(cmdLine.serial());
whismanoid 25:9d4012b0887f 6644 cmdLine.serial().printf("} -- High Output");
whismanoid 25:9d4012b0887f 6645 cmdLine.serial().printf("\r\n %%Ln {pin:");
whismanoid 25:9d4012b0887f 6646 list_digitalInOutPins(cmdLine.serial());
whismanoid 25:9d4012b0887f 6647 cmdLine.serial().printf("} -- Low Output");
whismanoid 25:9d4012b0887f 6648 cmdLine.serial().printf("\r\n %%?n {pin:");
whismanoid 25:9d4012b0887f 6649 list_digitalInOutPins(cmdLine.serial());
whismanoid 25:9d4012b0887f 6650 cmdLine.serial().printf("} -- Input");
whismanoid 25:9d4012b0887f 6651 #endif
whismanoid 25:9d4012b0887f 6652
whismanoid 25:9d4012b0887f 6653 #if HAS_analogIns
whismanoid 25:9d4012b0887f 6654 // Menu A) analogRead A0..7
whismanoid 25:9d4012b0887f 6655 // %A %Apin -- analog input
whismanoid 25:9d4012b0887f 6656 // analogRead(pinIndex) // analog input pins A0, A1, A2, A3, A4, A5; float voltage = analogRead(A0) * (5.0 / 1023.0)
whismanoid 25:9d4012b0887f 6657 cmdLine.serial().printf("\r\n %%A -- analogRead");
whismanoid 25:9d4012b0887f 6658 #endif
whismanoid 25:9d4012b0887f 6659
whismanoid 25:9d4012b0887f 6660 #if HAS_SPI2_MAX541
whismanoid 25:9d4012b0887f 6661 // TODO1: MAX541 max541(spi2_max541, spi2_max541_cs);
whismanoid 25:9d4012b0887f 6662 cmdLine.serial().printf("\r\n %%D -- DAC output MAX541 (SPI2)");
whismanoid 25:9d4012b0887f 6663 #endif
whismanoid 25:9d4012b0887f 6664
whismanoid 25:9d4012b0887f 6665 #if HAS_I2C // SUPPORT_I2C
whismanoid 25:9d4012b0887f 6666 // TODO: support I2C HAS_I2C // SUPPORT_I2C
whismanoid 25:9d4012b0887f 6667 // VERIFY: I2C utility commands SUPPORT_I2C
whismanoid 25:9d4012b0887f 6668 // VERIFY: report g_I2C_SCL_Hz = (F_CPU / ((TWBR * 2) + 16)) from last Wire_Sr.setClock(I2C_SCL_Hz);
whismanoid 25:9d4012b0887f 6669 // %I... -- I2C diagnostics
whismanoid 25:9d4012b0887f 6670 // %IP -- I2C probe
whismanoid 25:9d4012b0887f 6671 // %IC scl=100khz ADDR=? -- I2C configure
whismanoid 25:9d4012b0887f 6672 // %IW byte byte ... byte RD=? ADDR=0x -- write
whismanoid 25:9d4012b0887f 6673 // %IR ADDR=? RD=? -- read
whismanoid 25:9d4012b0887f 6674 // %I^ cmd=? -- i2c_smbus_read_word_data
whismanoid 25:9d4012b0887f 6675 //g_I2C_SCL_Hz = (F_CPU / ((TWBR * 2) + 16)); // 'F_CPU' 'TWBR' not declared in this scope
whismanoid 25:9d4012b0887f 6676 cmdLine.serial().printf("\r\n %%IC ADDR=0x%2.2x=(0x%2.2x>>1) SCL=%d=%1.3fkHz -- I2C config",
whismanoid 25:9d4012b0887f 6677 g_I2C_deviceAddress7, (g_I2C_deviceAddress7 << 1), g_I2C_SCL_Hz,
whismanoid 25:9d4012b0887f 6678 (g_I2C_SCL_Hz / 1000.));
whismanoid 25:9d4012b0887f 6679 cmdLine.serial().printf("\r\n %%IW byte byte ... byte RD=? ADDR=0x%2.2x -- I2C write/read",
whismanoid 25:9d4012b0887f 6680 g_I2C_deviceAddress7);
whismanoid 25:9d4012b0887f 6681 //
whismanoid 25:9d4012b0887f 6682 #if SUPPORT_I2C
whismanoid 25:9d4012b0887f 6683 // Menu ^ cmd=?) i2c_smbus_read_word_data
whismanoid 25:9d4012b0887f 6684 cmdLine.serial().printf("\r\n %%I^ cmd=? -- i2c_smbus_read_word_data");
whismanoid 25:9d4012b0887f 6685 // test low-level I2C i2c_smbus_read_word_data
whismanoid 25:9d4012b0887f 6686 #endif // SUPPORT_I2C
whismanoid 25:9d4012b0887f 6687 //cmdLine.serial().printf(" H) Hunt for attached I2C devices");
whismanoid 25:9d4012b0887f 6688 cmdLine.serial().printf("\r\n %%IP -- I2C Probe for attached devices");
whismanoid 25:9d4012b0887f 6689 // cmdLine.serial().printf(" s) search i2c address");
whismanoid 25:9d4012b0887f 6690 #endif // SUPPORT_I2C
whismanoid 25:9d4012b0887f 6691
whismanoid 25:9d4012b0887f 6692 #if HAS_SPI // SUPPORT_SPI
whismanoid 25:9d4012b0887f 6693 // TODO: support SPI HAS_SPI // SUPPORT_SPI
whismanoid 25:9d4012b0887f 6694 // SPI test command S (mosiData)+
whismanoid 25:9d4012b0887f 6695 // %S... -- SPI diagnostics
whismanoid 25:9d4012b0887f 6696 // %SC sclk=1Mhz -- SPI configure
whismanoid 25:9d4012b0887f 6697 // %SW -- write (write and read)
whismanoid 25:9d4012b0887f 6698 // %SR -- read (alias for %SW because SPI always write and read)
whismanoid 25:9d4012b0887f 6699 // spi.format(8,0); // int bits_must_be_8, int mode=0_3 CPOL=0,CPHA=0 rising edge (initial default)
whismanoid 25:9d4012b0887f 6700 // spi.format(8,1); // int bits_must_be_8, int mode=0_3 CPOL=0,CPHA=1 falling edge (initial default)
whismanoid 25:9d4012b0887f 6701 // spi.format(8,2); // int bits_must_be_8, int mode=0_3 CPOL=1,CPHA=0 falling edge (initial default)
whismanoid 25:9d4012b0887f 6702 // spi.format(8,3); // int bits_must_be_8, int mode=0_3 CPOL=1,CPHA=1 rising edge (initial default)
whismanoid 25:9d4012b0887f 6703 // spi.frequency(1000000); // int SCLK_Hz=1000000 = 1MHz (initial default)
whismanoid 25:9d4012b0887f 6704 // mode | POL PHA
whismanoid 25:9d4012b0887f 6705 // -----+--------
whismanoid 25:9d4012b0887f 6706 // 0 | 0 0
whismanoid 25:9d4012b0887f 6707 // 1 | 0 1
whismanoid 25:9d4012b0887f 6708 // 2 | 1 0
whismanoid 25:9d4012b0887f 6709 // 3 | 1 1
whismanoid 25:9d4012b0887f 6710 //cmdLine.serial().printf(" S) SPI mosi,mosi,...mosi hex bytes SCLK=1000000 CPOL=0 CPHA=0");
whismanoid 25:9d4012b0887f 6711 // fixed: mbed-os-5.11: [Warning] format '%d' expects argument of type 'int', but argument 3 has type 'uint32_t {aka long unsigned int}' [-Wformat=]
whismanoid 25:9d4012b0887f 6712 cmdLine.serial().printf("\r\n %%SC SCLK=%ld=%1.3fMHz CPOL=%d CPHA=%d -- SPI config",
whismanoid 25:9d4012b0887f 6713 g_SPI_SCLK_Hz, (g_SPI_SCLK_Hz / 1000000.),
whismanoid 25:9d4012b0887f 6714 ((g_SPI_dataMode & SPI_MODE2) ? 1 : 0),
whismanoid 25:9d4012b0887f 6715 ((g_SPI_dataMode & SPI_MODE1) ? 1 : 0));
whismanoid 25:9d4012b0887f 6716 cmdLine.serial().printf("\r\n %%SD -- SPI diagnostic messages ");
whismanoid 25:9d4012b0887f 6717 if (g_MAX5719_device.onSPIprint) {
whismanoid 25:9d4012b0887f 6718 cmdLine.serial().printf("hide");
whismanoid 25:9d4012b0887f 6719 }
whismanoid 25:9d4012b0887f 6720 else {
whismanoid 25:9d4012b0887f 6721 cmdLine.serial().printf("show");
whismanoid 25:9d4012b0887f 6722 }
whismanoid 25:9d4012b0887f 6723 cmdLine.serial().printf("\r\n %%SW mosi,mosi,...mosi -- SPI write hex bytes");
whismanoid 25:9d4012b0887f 6724 // VERIFY: parse new SPI settings parse_strCommandArgs() SCLK=1000000 CPOL=0 CPHA=0
whismanoid 25:9d4012b0887f 6725 #endif // SUPPORT_SPI
whismanoid 25:9d4012b0887f 6726 //
whismanoid 25:9d4012b0887f 6727 // Application-specific commands (help text) here
whismanoid 25:9d4012b0887f 6728 //
whismanoid 25:9d4012b0887f 6729 #if APPLICATION_ArduinoPinsMonitor
whismanoid 25:9d4012b0887f 6730 cmdLine.serial().printf("\r\n A-Z,a-z,0-9 -- reserved for application use"); // ArduinoPinsMonitor
whismanoid 25:9d4012b0887f 6731 #endif // APPLICATION_ArduinoPinsMonitor
whismanoid 25:9d4012b0887f 6732 //
whismanoid 25:9d4012b0887f 6733
whismanoid 25:9d4012b0887f 6734 extern void MAX5719_menu_help(CmdLine & cmdLine); // defined in Test_Menu_MAX5719.cpp\n
whismanoid 25:9d4012b0887f 6735 MAX5719_menu_help(cmdLine);
whismanoid 25:9d4012b0887f 6736 }
whismanoid 25:9d4012b0887f 6737
whismanoid 25:9d4012b0887f 6738
whismanoid 25:9d4012b0887f 6739
whismanoid 25:9d4012b0887f 6740 //--------------------------------------------------
whismanoid 25:9d4012b0887f 6741 // main menu command-line parser
whismanoid 25:9d4012b0887f 6742 // invoked by CmdLine::append(char ch) or CmdLine::idleAppendIfReadable()
whismanoid 25:9d4012b0887f 6743 void main_menu_onEOLcommandParser(CmdLine & cmdLine)
whismanoid 25:9d4012b0887f 6744 {
whismanoid 25:9d4012b0887f 6745 // DIAGNOSTIC: print line buffer
whismanoid 25:9d4012b0887f 6746 //~ cmdLine.serial().printf("\r\nmain_menu_onEOLcommandParser: ~%s~\r\n", cmdLine.str());
whismanoid 25:9d4012b0887f 6747 //
whismanoid 25:9d4012b0887f 6748 switch (cmdLine[0])
whismanoid 25:9d4012b0887f 6749 {
whismanoid 25:9d4012b0887f 6750 case '?':
whismanoid 25:9d4012b0887f 6751 main_menu_status(cmdLine);
whismanoid 25:9d4012b0887f 6752 main_menu_help(cmdLine);
whismanoid 25:9d4012b0887f 6753 // print command prompt
whismanoid 25:9d4012b0887f 6754 //cmdLine.serial().printf("\r\n>");
whismanoid 25:9d4012b0887f 6755 break;
whismanoid 25:9d4012b0887f 6756 case '\r': case '\n': // ignore blank line
whismanoid 25:9d4012b0887f 6757 case '\0': // ignore empty line
whismanoid 25:9d4012b0887f 6758 case '#': // ignore comment line
whismanoid 25:9d4012b0887f 6759 // # -- lines beginning with # are comments
whismanoid 25:9d4012b0887f 6760 main_menu_status(cmdLine);
whismanoid 25:9d4012b0887f 6761 //~ main_menu_help(cmdLine);
whismanoid 25:9d4012b0887f 6762 // print command prompt
whismanoid 25:9d4012b0887f 6763 //cmdLine.serial().printf("\r\n>");
whismanoid 25:9d4012b0887f 6764 break;
whismanoid 25:9d4012b0887f 6765 #if ECHO_EOF_ON_EOL
whismanoid 25:9d4012b0887f 6766 case '\x04': // Unicode (U+0004) EOT END OF TRANSMISSION = CTRL+D as EOF end of file
whismanoid 25:9d4012b0887f 6767 cmdLine.serial().printf("\x04"); // immediately echo EOF for test scripting
whismanoid 25:9d4012b0887f 6768 diagnostic_led_EOF();
whismanoid 25:9d4012b0887f 6769 break;
whismanoid 25:9d4012b0887f 6770 case '\x1a': // Unicode (U+001A) SUB SUBSTITUTE = CTRL+Z as EOF end of file
whismanoid 25:9d4012b0887f 6771 cmdLine.serial().printf("\x1a"); // immediately echo EOF for test scripting
whismanoid 25:9d4012b0887f 6772 diagnostic_led_EOF();
whismanoid 25:9d4012b0887f 6773 break;
whismanoid 25:9d4012b0887f 6774 #endif
whismanoid 25:9d4012b0887f 6775 #if APPLICATION_ArduinoPinsMonitor
whismanoid 25:9d4012b0887f 6776 case '.':
whismanoid 25:9d4012b0887f 6777 {
whismanoid 25:9d4012b0887f 6778 // . -- SelfTest
whismanoid 25:9d4012b0887f 6779 cmdLine.serial().printf("SelfTest()");
whismanoid 33:2c675744a01b 6780 // parse "run=0x0004" -- run selected tests
whismanoid 30:13fc9d492ee0 6781 if (cmdLine.parse_int_dec("run", SelfTestGroupEnable))
whismanoid 30:13fc9d492ee0 6782 {
whismanoid 30:13fc9d492ee0 6783 }
whismanoid 33:2c675744a01b 6784 // parse "runall=0x0004" -- run selected tests, continue even if tests fail
whismanoid 33:2c675744a01b 6785 if (cmdLine.parse_int_dec("runall", SelfTestGroupEnable))
whismanoid 33:2c675744a01b 6786 {
whismanoid 33:2c675744a01b 6787 SelfTestGroupEnable &=~ 2; // xxxxxx0x: no repeat-until-failure
whismanoid 33:2c675744a01b 6788 SelfTestGroupEnable &=~ 1; // xxxxxxx0: no halt-on-first-failure
whismanoid 33:2c675744a01b 6789 }
whismanoid 33:2c675744a01b 6790 // parse "runfail=0x0004" -- run selected tests, halt on first failure
whismanoid 30:13fc9d492ee0 6791 if (cmdLine.parse_int_dec("runfail", SelfTestGroupEnable))
whismanoid 30:13fc9d492ee0 6792 {
whismanoid 33:2c675744a01b 6793 SelfTestGroupEnable &=~ 2; // xxxxxx0x: no repeat-until-failure
whismanoid 33:2c675744a01b 6794 SelfTestGroupEnable |= 1; // xxxxxxx1: halt-on-first-failure
whismanoid 30:13fc9d492ee0 6795 }
whismanoid 33:2c675744a01b 6796 // parse "loopall=0x0004" -- run selected tests, repeat until keypress
whismanoid 33:2c675744a01b 6797 if (cmdLine.parse_int_dec("loopall", SelfTestGroupEnable))
whismanoid 30:13fc9d492ee0 6798 {
whismanoid 33:2c675744a01b 6799 SelfTestGroupEnable |= 2; // xxxxxx1x: repeat-until-failure
whismanoid 33:2c675744a01b 6800 SelfTestGroupEnable &=~ 1; // xxxxxx10
whismanoid 30:13fc9d492ee0 6801 }
whismanoid 33:2c675744a01b 6802 // parse "loopfail=0x0004" -- run selected tests, repeat until first failure
whismanoid 30:13fc9d492ee0 6803 if (cmdLine.parse_int_dec("loopfail", SelfTestGroupEnable))
whismanoid 30:13fc9d492ee0 6804 {
whismanoid 33:2c675744a01b 6805 SelfTestGroupEnable |= 2; // xxxxxx1x: repeat-until-failure
whismanoid 33:2c675744a01b 6806 SelfTestGroupEnable |= 1; // xxxxxxx1: halt-on-first-failure
whismanoid 30:13fc9d492ee0 6807 }
whismanoid 25:9d4012b0887f 6808 SelfTest(cmdLine);
whismanoid 25:9d4012b0887f 6809 }
whismanoid 25:9d4012b0887f 6810 break;
whismanoid 25:9d4012b0887f 6811 case '%':
whismanoid 25:9d4012b0887f 6812 {
whismanoid 25:9d4012b0887f 6813 pinsMonitor_submenu_onEOLcommandParser(cmdLine);
whismanoid 25:9d4012b0887f 6814 }
whismanoid 25:9d4012b0887f 6815 break; // case '%'
whismanoid 25:9d4012b0887f 6816 #endif // APPLICATION_ArduinoPinsMonitor
whismanoid 25:9d4012b0887f 6817 //
whismanoid 25:9d4012b0887f 6818 // Application-specific commands here
whismanoid 25:9d4012b0887f 6819 // alphanumeric command codes A-Z,a-z,0-9 reserved for application use
whismanoid 25:9d4012b0887f 6820 //
whismanoid 25:9d4012b0887f 6821 #if APPLICATION_ArduinoPinsMonitor
whismanoid 25:9d4012b0887f 6822 #endif // APPLICATION_ArduinoPinsMonitor
whismanoid 25:9d4012b0887f 6823
whismanoid 25:9d4012b0887f 6824 //
whismanoid 25:9d4012b0887f 6825 // add new commands here
whismanoid 25:9d4012b0887f 6826 //
whismanoid 25:9d4012b0887f 6827 default:
whismanoid 25:9d4012b0887f 6828 extern bool MAX5719_menu_onEOLcommandParser(CmdLine & cmdLine); // defined in Test_Menu_MAX5719.cpp
whismanoid 25:9d4012b0887f 6829 if (!MAX5719_menu_onEOLcommandParser(cmdLine))
whismanoid 25:9d4012b0887f 6830 { // not_handled_by_device_submenu
whismanoid 25:9d4012b0887f 6831 cmdLine.serial().printf("\r\n unknown command 0x%2.2x \"%s\"\r\n", cmdLine.str()[0], cmdLine.str());
whismanoid 25:9d4012b0887f 6832
whismanoid 25:9d4012b0887f 6833 # if HAS_DAPLINK_SERIAL
whismanoid 25:9d4012b0887f 6834 cmdLine_DAPLINKserial.serial().printf("\r\n unknown command 0x%2.2x \"%s\"\r\n", cmdLine.str()[0], cmdLine.str());
whismanoid 25:9d4012b0887f 6835
whismanoid 25:9d4012b0887f 6836 # endif // HAS_DAPLINK_SERIAL
whismanoid 25:9d4012b0887f 6837 }
whismanoid 25:9d4012b0887f 6838 } // switch (cmdLine[0])
whismanoid 25:9d4012b0887f 6839 //
whismanoid 25:9d4012b0887f 6840 // print command prompt
whismanoid 25:9d4012b0887f 6841 cmdLine.serial().printf("\r\nMAX5719 > ");
whismanoid 25:9d4012b0887f 6842
whismanoid 25:9d4012b0887f 6843 } // end void main_menu_onEOLcommandParser(CmdLine & cmdLine)
whismanoid 25:9d4012b0887f 6844
whismanoid 25:9d4012b0887f 6845 //--------------------------------------------------
whismanoid 25:9d4012b0887f 6846 #if MAX5719_ONSPIPRINT
whismanoid 25:9d4012b0887f 6847 // Optional Diagnostic function to print SPI transactions
whismanoid 25:9d4012b0887f 6848 void onSPIprint_handler(size_t byteCount, uint8_t mosiData[], uint8_t misoData[])
whismanoid 25:9d4012b0887f 6849 {
whismanoid 25:9d4012b0887f 6850 cmdLine_serial.serial().printf("\r\n SPI MOSI->");
whismanoid 25:9d4012b0887f 6851 for (uint8_t index = 0; index < byteCount; index++) {
whismanoid 25:9d4012b0887f 6852 cmdLine_serial.serial().printf(" 0x%2.2X", mosiData[index]);
whismanoid 25:9d4012b0887f 6853 }
whismanoid 25:9d4012b0887f 6854 cmdLine_serial.serial().printf(" MISO<-");
whismanoid 25:9d4012b0887f 6855 for (uint8_t index = 0; index < byteCount; index++) {
whismanoid 25:9d4012b0887f 6856 cmdLine_serial.serial().printf(" 0x%2.2X", misoData[index]);
whismanoid 25:9d4012b0887f 6857 }
whismanoid 25:9d4012b0887f 6858 cmdLine_serial.serial().printf(" ");
whismanoid 25:9d4012b0887f 6859 }
whismanoid 25:9d4012b0887f 6860 #endif // MAX5719_ONSPIPRINT
whismanoid 25:9d4012b0887f 6861
whismanoid 25:9d4012b0887f 6862 //--------------------------------------------------
whismanoid 25:9d4012b0887f 6863 void InitializeConfiguration()
whismanoid 25:9d4012b0887f 6864 {
whismanoid 25:9d4012b0887f 6865 // CODE GENERATOR: example code: member function Init
whismanoid 25:9d4012b0887f 6866 # if HAS_DAPLINK_SERIAL
whismanoid 25:9d4012b0887f 6867 cmdLine_DAPLINKserial.serial().printf("\r\nMAX5719_Init()");
whismanoid 25:9d4012b0887f 6868
whismanoid 25:9d4012b0887f 6869 # endif
whismanoid 25:9d4012b0887f 6870 cmdLine_serial.serial().printf("\r\nMAX5719_Init()");
whismanoid 25:9d4012b0887f 6871
whismanoid 25:9d4012b0887f 6872 g_MAX5719_device.Init(); // defined in #include MAX5719.h
whismanoid 25:9d4012b0887f 6873 # if MAX5719_ONSPIPRINT
whismanoid 25:9d4012b0887f 6874 // Optional Diagnostic function to print SPI transactions
whismanoid 25:9d4012b0887f 6875 # if MAX5719_ONSPIPRINT_ENABLED
whismanoid 25:9d4012b0887f 6876 g_MAX5719_device.onSPIprint = onSPIprint_handler;
whismanoid 25:9d4012b0887f 6877 # else
whismanoid 25:9d4012b0887f 6878 g_MAX5719_device.onSPIprint = NULL;
whismanoid 25:9d4012b0887f 6879 # endif
whismanoid 25:9d4012b0887f 6880 # endif
whismanoid 25:9d4012b0887f 6881 } // end of void InitializeConfiguration()
whismanoid 25:9d4012b0887f 6882
whismanoid 25:9d4012b0887f 6883 //--------------------------------------------------
whismanoid 25:9d4012b0887f 6884 // diagnostic rbg led GREEN
whismanoid 25:9d4012b0887f 6885 void diagnostic_led_EOF()
whismanoid 25:9d4012b0887f 6886 {
whismanoid 25:9d4012b0887f 6887 #if USE_LEDS
whismanoid 25:9d4012b0887f 6888 led1 = LED_ON; led2 = LED_ON; led3 = LED_OFF; // diagnostic rbg led RED+GREEN=YELLOW
whismanoid 25:9d4012b0887f 6889 // TODO1: mbed-os-5.11: [Warning] 'static osStatus rtos::Thread::wait(uint32_t)' is deprecated: Static methods only affecting current thread cause confusion. Replaced by ThisThread::sleep_for. [since mbed-os-5.10] [-Wdeprecated-declarations]
whismanoid 25:9d4012b0887f 6890 ThisThread::sleep_for(250); // [since mbed-os-5.10] vs Thread::wait(250);
whismanoid 25:9d4012b0887f 6891 led1 = LED_OFF; led2 = LED_ON; led3 = LED_OFF; // diagnostic rbg led GREEN
whismanoid 25:9d4012b0887f 6892 ThisThread::sleep_for(250); // [since mbed-os-5.10] vs Thread::wait(250);
whismanoid 25:9d4012b0887f 6893 led1 = LED_ON; led2 = LED_ON; led3 = LED_OFF; // diagnostic rbg led RED+GREEN=YELLOW
whismanoid 25:9d4012b0887f 6894 ThisThread::sleep_for(250); // [since mbed-os-5.10] vs Thread::wait(250);
whismanoid 25:9d4012b0887f 6895 led1 = LED_OFF; led2 = LED_ON; led3 = LED_OFF; // diagnostic rbg led GREEN
whismanoid 25:9d4012b0887f 6896 ThisThread::sleep_for(250); // [since mbed-os-5.10] vs Thread::wait(250);
whismanoid 25:9d4012b0887f 6897 #endif // USE_LEDS
whismanoid 25:9d4012b0887f 6898 }
whismanoid 25:9d4012b0887f 6899
whismanoid 25:9d4012b0887f 6900 //--------------------------------------------------
whismanoid 25:9d4012b0887f 6901 // Support commands that get handled immediately w/o waiting for EOL
whismanoid 25:9d4012b0887f 6902 // handled as immediate command, do not append to buffer
whismanoid 25:9d4012b0887f 6903 void on_immediate_0x21() // Unicode (U+0021) ! EXCLAMATION MARK
whismanoid 25:9d4012b0887f 6904 {
whismanoid 25:9d4012b0887f 6905 #if USE_LEDS
whismanoid 25:9d4012b0887f 6906 led1 = LED_OFF; led2 = LED_OFF; led3 = LED_ON; // diagnostic rbg led BLUE
whismanoid 25:9d4012b0887f 6907 #endif // USE_LEDS
whismanoid 25:9d4012b0887f 6908 InitializeConfiguration();
whismanoid 25:9d4012b0887f 6909 ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125);
whismanoid 25:9d4012b0887f 6910 }
whismanoid 25:9d4012b0887f 6911
whismanoid 25:9d4012b0887f 6912 //--------------------------------------------------
whismanoid 25:9d4012b0887f 6913 // Support commands that get handled immediately w/o waiting for EOL
whismanoid 25:9d4012b0887f 6914 // handled as immediate command, do not append to buffer
whismanoid 25:9d4012b0887f 6915 void on_immediate_0x7b() // Unicode (U+007B) { LEFT CURLY BRACKET
whismanoid 25:9d4012b0887f 6916 {
whismanoid 25:9d4012b0887f 6917 #if HAS_BUTTON2_DEMO_INTERRUPT
whismanoid 25:9d4012b0887f 6918 onButton2FallingEdge();
whismanoid 25:9d4012b0887f 6919 #endif
whismanoid 25:9d4012b0887f 6920 }
whismanoid 25:9d4012b0887f 6921
whismanoid 25:9d4012b0887f 6922 //--------------------------------------------------
whismanoid 25:9d4012b0887f 6923 // Support commands that get handled immediately w/o waiting for EOL
whismanoid 25:9d4012b0887f 6924 // handled as immediate command, do not append to buffer
whismanoid 25:9d4012b0887f 6925 void on_immediate_0x7d() // Unicode (U+007D) } RIGHT CURLY BRACKET
whismanoid 25:9d4012b0887f 6926 {
whismanoid 25:9d4012b0887f 6927 #if HAS_BUTTON1_DEMO_INTERRUPT
whismanoid 25:9d4012b0887f 6928 onButton1FallingEdge();
whismanoid 25:9d4012b0887f 6929 #endif
whismanoid 25:9d4012b0887f 6930 }
whismanoid 25:9d4012b0887f 6931
whismanoid 25:9d4012b0887f 6932 //----------------------------------------
whismanoid 25:9d4012b0887f 6933 // example code main function
whismanoid 25:9d4012b0887f 6934 int main()
whismanoid 25:9d4012b0887f 6935 {
whismanoid 25:9d4012b0887f 6936 // Configure serial ports
whismanoid 25:9d4012b0887f 6937 cmdLine_serial.clear();
whismanoid 25:9d4012b0887f 6938 //~ cmdLine_serial.serial().printf("\r\n cmdLine_serial.serial().printf test\r\n");
whismanoid 25:9d4012b0887f 6939 cmdLine_serial.onEOLcommandParser = main_menu_onEOLcommandParser;
whismanoid 25:9d4012b0887f 6940 cmdLine_serial.diagnostic_led_EOF = diagnostic_led_EOF;
whismanoid 25:9d4012b0887f 6941 /// CmdLine::set_immediate_handler(char, functionPointer_void_void_on_immediate_0x21);
whismanoid 25:9d4012b0887f 6942 cmdLine_serial.on_immediate_0x21 = on_immediate_0x21;
whismanoid 25:9d4012b0887f 6943 cmdLine_serial.on_immediate_0x7b = on_immediate_0x7b;
whismanoid 25:9d4012b0887f 6944 cmdLine_serial.on_immediate_0x7d = on_immediate_0x7d;
whismanoid 25:9d4012b0887f 6945 # if HAS_DAPLINK_SERIAL
whismanoid 25:9d4012b0887f 6946 cmdLine_DAPLINKserial.clear();
whismanoid 25:9d4012b0887f 6947 //~ cmdLine_DAPLINKserial.serial().printf("\r\n cmdLine_DAPLINKserial.serial().printf test\r\n");
whismanoid 25:9d4012b0887f 6948 cmdLine_DAPLINKserial.onEOLcommandParser = main_menu_onEOLcommandParser;
whismanoid 25:9d4012b0887f 6949 /// @todo CmdLine::set_immediate_handler(char, functionPointer_void_void_on_immediate_0x21);
whismanoid 25:9d4012b0887f 6950 cmdLine_DAPLINKserial.on_immediate_0x21 = on_immediate_0x21;
whismanoid 25:9d4012b0887f 6951 cmdLine_DAPLINKserial.on_immediate_0x7b = on_immediate_0x7b;
whismanoid 25:9d4012b0887f 6952 cmdLine_DAPLINKserial.on_immediate_0x7d = on_immediate_0x7d;
whismanoid 25:9d4012b0887f 6953 # endif
whismanoid 25:9d4012b0887f 6954
whismanoid 25:9d4012b0887f 6955
whismanoid 25:9d4012b0887f 6956 //print_banner();
whismanoid 25:9d4012b0887f 6957
whismanoid 25:9d4012b0887f 6958 #if HAS_I2C
whismanoid 25:9d4012b0887f 6959 // i2c init
whismanoid 25:9d4012b0887f 6960 // declare in narrower scope: MAX32625MBED I2C i2cMaster(...)
whismanoid 25:9d4012b0887f 6961 // i2cMaster.frequency(g_I2C_SCL_Hz);
whismanoid 25:9d4012b0887f 6962 #else
whismanoid 25:9d4012b0887f 6963 // Ensure that the unused I2C pins do not interfere with analog inputs A4 and A5
whismanoid 25:9d4012b0887f 6964 #if HAS_digitalInOut14
whismanoid 25:9d4012b0887f 6965 // DigitalInOut digitalInOut14(P1_6, PIN_INPUT, PullUp, 1); // P1_6 TARGET_MAX32635MBED A4/SDA (10pin digital connector)
whismanoid 25:9d4012b0887f 6966 digitalInOut14.input();
whismanoid 25:9d4012b0887f 6967 #endif
whismanoid 25:9d4012b0887f 6968 #if HAS_digitalInOut15
whismanoid 25:9d4012b0887f 6969 // DigitalInOut digitalInOut15(P1_7, PIN_INPUT, PullUp, 1); // P1_7 TARGET_MAX32635MBED A5/SCL (10pin digital connector)
whismanoid 25:9d4012b0887f 6970 digitalInOut15.input();
whismanoid 25:9d4012b0887f 6971 #endif
whismanoid 25:9d4012b0887f 6972 #if HAS_digitalInOut16
whismanoid 25:9d4012b0887f 6973 // DigitalInOut mode can be one of PullUp, PullDown, PullNone, OpenDrain
whismanoid 25:9d4012b0887f 6974 // PullUp-->3.4V, PullDown-->1.7V, PullNone-->3.5V, OpenDrain-->0.00V
whismanoid 25:9d4012b0887f 6975 //DigitalInOut digitalInOut16(P3_4, PIN_INPUT, OpenDrain, 0); // P3_4 TARGET_MAX32635MBED A4/SDA (6pin analog connector)
whismanoid 25:9d4012b0887f 6976 digitalInOut16.input();
whismanoid 25:9d4012b0887f 6977 #endif
whismanoid 25:9d4012b0887f 6978 #if HAS_digitalInOut17
whismanoid 25:9d4012b0887f 6979 //DigitalInOut digitalInOut17(P3_5, PIN_INPUT, OpenDrain, 0); // P3_5 TARGET_MAX32635MBED A5/SCL (6pin analog connector)
whismanoid 25:9d4012b0887f 6980 digitalInOut17.input();
whismanoid 25:9d4012b0887f 6981 #endif
whismanoid 25:9d4012b0887f 6982 #endif // HAS_I2C
whismanoid 25:9d4012b0887f 6983
whismanoid 25:9d4012b0887f 6984
whismanoid 25:9d4012b0887f 6985 #if USE_LEDS
whismanoid 25:9d4012b0887f 6986 #if defined(TARGET_MAX32630)
whismanoid 25:9d4012b0887f 6987 led1 = LED_ON; led2 = LED_OFF; led3 = LED_OFF; // diagnostic rbg led RED
whismanoid 25:9d4012b0887f 6988 ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125);
whismanoid 25:9d4012b0887f 6989 led1 = LED_OFF; led2 = LED_ON; led3 = LED_OFF; // diagnostic rbg led GREEN
whismanoid 25:9d4012b0887f 6990 ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125);
whismanoid 25:9d4012b0887f 6991 led1 = LED_OFF; led2 = LED_OFF; led3 = LED_ON; // diagnostic rbg led BLUE
whismanoid 25:9d4012b0887f 6992 ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125);
whismanoid 25:9d4012b0887f 6993 led1 = LED_ON; led2 = LED_ON; led3 = LED_ON; // diagnostic rbg led RED+GREEN+BLUE=WHITE
whismanoid 25:9d4012b0887f 6994 ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125);
whismanoid 25:9d4012b0887f 6995 led1 = LED_OFF; led2 = LED_ON; led3 = LED_ON; // diagnostic rbg led GREEN+BLUE=CYAN
whismanoid 25:9d4012b0887f 6996 ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125);
whismanoid 25:9d4012b0887f 6997 led1 = LED_ON; led2 = LED_OFF; led3 = LED_ON; // diagnostic rbg led RED+BLUE=MAGENTA
whismanoid 25:9d4012b0887f 6998 ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125);
whismanoid 25:9d4012b0887f 6999 led1 = LED_ON; led2 = LED_ON; led3 = LED_OFF; // diagnostic rbg led RED+GREEN=YELLOW
whismanoid 25:9d4012b0887f 7000 ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125);
whismanoid 25:9d4012b0887f 7001 led1 = LED_OFF; led2 = LED_OFF; led3 = LED_OFF; // diagnostic rbg led BLACK
whismanoid 25:9d4012b0887f 7002 ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125);
whismanoid 25:9d4012b0887f 7003 #elif defined(TARGET_MAX32625MBED)
whismanoid 25:9d4012b0887f 7004 led1 = LED_ON; led2 = LED_OFF; led3 = LED_OFF; // diagnostic rbg led RED
whismanoid 25:9d4012b0887f 7005 ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125);
whismanoid 25:9d4012b0887f 7006 led1 = LED_OFF; led2 = LED_ON; led3 = LED_OFF; // diagnostic rbg led GREEN
whismanoid 25:9d4012b0887f 7007 ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125);
whismanoid 25:9d4012b0887f 7008 led1 = LED_OFF; led2 = LED_OFF; led3 = LED_ON; // diagnostic rbg led BLUE
whismanoid 25:9d4012b0887f 7009 ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125);
whismanoid 25:9d4012b0887f 7010 led1 = LED_ON; led2 = LED_ON; led3 = LED_ON; // diagnostic rbg led RED+GREEN+BLUE=WHITE
whismanoid 25:9d4012b0887f 7011 ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125);
whismanoid 25:9d4012b0887f 7012 led1 = LED_OFF; led2 = LED_ON; led3 = LED_ON; // diagnostic rbg led GREEN+BLUE=CYAN
whismanoid 25:9d4012b0887f 7013 ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125);
whismanoid 25:9d4012b0887f 7014 led1 = LED_ON; led2 = LED_OFF; led3 = LED_ON; // diagnostic rbg led RED+BLUE=MAGENTA
whismanoid 25:9d4012b0887f 7015 ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125);
whismanoid 25:9d4012b0887f 7016 led1 = LED_ON; led2 = LED_ON; led3 = LED_OFF; // diagnostic rbg led RED+GREEN=YELLOW
whismanoid 25:9d4012b0887f 7017 ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125);
whismanoid 25:9d4012b0887f 7018 led1 = LED_OFF; led2 = LED_OFF; led3 = LED_OFF; // diagnostic rbg led BLACK
whismanoid 25:9d4012b0887f 7019 ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125);
whismanoid 25:9d4012b0887f 7020 #else // not defined(TARGET_LPC1768 etc.)
whismanoid 25:9d4012b0887f 7021 led1 = LED_ON;
whismanoid 25:9d4012b0887f 7022 led2 = LED_OFF;
whismanoid 25:9d4012b0887f 7023 led3 = LED_OFF;
whismanoid 25:9d4012b0887f 7024 led4 = LED_OFF;
whismanoid 25:9d4012b0887f 7025 ThisThread::sleep_for(75); // [since mbed-os-5.10] vs Thread::wait(75);
whismanoid 25:9d4012b0887f 7026 //led1 = LED_ON;
whismanoid 25:9d4012b0887f 7027 led2 = LED_ON;
whismanoid 25:9d4012b0887f 7028 ThisThread::sleep_for(75); // [since mbed-os-5.10] vs Thread::wait(75);
whismanoid 25:9d4012b0887f 7029 led1 = LED_OFF;
whismanoid 25:9d4012b0887f 7030 //led2 = LED_ON;
whismanoid 25:9d4012b0887f 7031 led3 = LED_ON;
whismanoid 25:9d4012b0887f 7032 ThisThread::sleep_for(75); // [since mbed-os-5.10] vs Thread::wait(75);
whismanoid 25:9d4012b0887f 7033 led2 = LED_OFF;
whismanoid 25:9d4012b0887f 7034 //led3 = LED_ON;
whismanoid 25:9d4012b0887f 7035 led4 = LED_ON;
whismanoid 25:9d4012b0887f 7036 ThisThread::sleep_for(75); // [since mbed-os-5.10] vs Thread::wait(75);
whismanoid 25:9d4012b0887f 7037 led3 = LED_OFF;
whismanoid 25:9d4012b0887f 7038 led4 = LED_ON;
whismanoid 25:9d4012b0887f 7039 //
whismanoid 25:9d4012b0887f 7040 #endif // target definition
whismanoid 25:9d4012b0887f 7041 #endif
whismanoid 25:9d4012b0887f 7042
whismanoid 25:9d4012b0887f 7043 // cmd_TE();
whismanoid 25:9d4012b0887f 7044
whismanoid 25:9d4012b0887f 7045 // #if USE_LEDS
whismanoid 25:9d4012b0887f 7046 // rgb_led.white(); // diagnostic rbg led RED+GREEN+BLUE=WHITE
whismanoid 25:9d4012b0887f 7047 // #endif // USE_LEDS
whismanoid 25:9d4012b0887f 7048 if (led1.is_connected()) {
whismanoid 25:9d4012b0887f 7049 led1 = LED_ON;
whismanoid 25:9d4012b0887f 7050 }
whismanoid 25:9d4012b0887f 7051 if (led2.is_connected()) {
whismanoid 25:9d4012b0887f 7052 led2 = LED_ON;
whismanoid 25:9d4012b0887f 7053 }
whismanoid 25:9d4012b0887f 7054 if (led3.is_connected()) {
whismanoid 25:9d4012b0887f 7055 led3 = LED_ON;
whismanoid 25:9d4012b0887f 7056 }
whismanoid 25:9d4012b0887f 7057
whismanoid 25:9d4012b0887f 7058 InitializeConfiguration();
whismanoid 25:9d4012b0887f 7059 // example code: serial port banner message
whismanoid 25:9d4012b0887f 7060 #if defined(TARGET_MAX32625MBED)
whismanoid 25:9d4012b0887f 7061 serial.printf("MAX32625MBED ");
whismanoid 25:9d4012b0887f 7062 #elif defined(TARGET_MAX32625PICO)
whismanoid 25:9d4012b0887f 7063 serial.printf("MAX32625PICO ");
whismanoid 25:9d4012b0887f 7064 #elif defined(TARGET_MAX32600MBED)
whismanoid 25:9d4012b0887f 7065 serial.printf("MAX32600MBED ");
whismanoid 25:9d4012b0887f 7066 #elif defined(TARGET_NUCLEO_F446RE)
whismanoid 25:9d4012b0887f 7067 serial.printf("NUCLEO_F446RE ");
whismanoid 25:9d4012b0887f 7068 #endif
whismanoid 25:9d4012b0887f 7069 serial.printf("MAX5719BOB\r\n");
whismanoid 25:9d4012b0887f 7070
whismanoid 25:9d4012b0887f 7071
whismanoid 25:9d4012b0887f 7072 while (1) {
whismanoid 25:9d4012b0887f 7073 #if HAS_BUTTON1_DEMO_INTERRUPT_POLLING
whismanoid 25:9d4012b0887f 7074 // avoid runtime error on button1 press [mbed-os-5.11]
whismanoid 25:9d4012b0887f 7075 // instead of using InterruptIn, use DigitalIn and poll in main while(1)
whismanoid 25:9d4012b0887f 7076 # if HAS_BUTTON1_DEMO_INTERRUPT
whismanoid 25:9d4012b0887f 7077 static int button1_value_prev = 1;
whismanoid 25:9d4012b0887f 7078 static int button1_value_now = 1;
whismanoid 25:9d4012b0887f 7079 button1_value_prev = button1_value_now;
whismanoid 25:9d4012b0887f 7080 button1_value_now = button1.read();
whismanoid 25:9d4012b0887f 7081 if ((button1_value_prev - button1_value_now) == 1)
whismanoid 25:9d4012b0887f 7082 {
whismanoid 25:9d4012b0887f 7083 // on button1 falling edge (button1 press)
whismanoid 25:9d4012b0887f 7084 onButton1FallingEdge();
whismanoid 25:9d4012b0887f 7085 }
whismanoid 25:9d4012b0887f 7086 # endif // HAS_BUTTON1_DEMO_INTERRUPT
whismanoid 25:9d4012b0887f 7087 # if HAS_BUTTON2_DEMO_INTERRUPT
whismanoid 25:9d4012b0887f 7088 static int button2_value_prev = 1;
whismanoid 25:9d4012b0887f 7089 static int button2_value_now = 1;
whismanoid 25:9d4012b0887f 7090 button2_value_prev = button2_value_now;
whismanoid 25:9d4012b0887f 7091 button2_value_now = button2.read();
whismanoid 25:9d4012b0887f 7092 if ((button2_value_prev - button2_value_now) == 1)
whismanoid 25:9d4012b0887f 7093 {
whismanoid 25:9d4012b0887f 7094 // on button2 falling edge (button2 press)
whismanoid 25:9d4012b0887f 7095 onButton2FallingEdge();
whismanoid 25:9d4012b0887f 7096 }
whismanoid 25:9d4012b0887f 7097 # endif // HAS_BUTTON2_DEMO_INTERRUPT
whismanoid 25:9d4012b0887f 7098 #endif
whismanoid 25:9d4012b0887f 7099 # if HAS_DAPLINK_SERIAL
whismanoid 25:9d4012b0887f 7100 if (DAPLINKserial.readable()) {
whismanoid 25:9d4012b0887f 7101 cmdLine_DAPLINKserial.append(DAPLINKserial.getc());
whismanoid 25:9d4012b0887f 7102 }
whismanoid 25:9d4012b0887f 7103 # endif // HAS_DAPLINK_SERIAL
whismanoid 25:9d4012b0887f 7104 if (serial.readable()) {
whismanoid 25:9d4012b0887f 7105 int c = serial.getc();
whismanoid 25:9d4012b0887f 7106 cmdLine_serial.append(c);
whismanoid 25:9d4012b0887f 7107 #if IGNORE_AT_COMMANDS
whismanoid 25:9d4012b0887f 7108 # if HAS_DAPLINK_SERIAL
whismanoid 25:9d4012b0887f 7109 cmdLine_DAPLINKserial.serial().printf("%c", c);
whismanoid 25:9d4012b0887f 7110 # endif // HAS_DAPLINK_SERIAL
whismanoid 25:9d4012b0887f 7111 #endif // IGNORE_AT_COMMANDS
whismanoid 25:9d4012b0887f 7112 //
whismanoid 25:9d4012b0887f 7113 }
whismanoid 25:9d4012b0887f 7114 } // while(1)
whismanoid 25:9d4012b0887f 7115 }