Maxim Integrated / Mbed OS MAX5719BOB_Serial_Tester

Dependencies:   MaximTinyTester CmdLine MAX5719 USBDevice

Committer:
whismanoid
Date:
Tue Jun 15 02:41:36 2021 -0700
Revision:
34:f9ed6213f781
Parent:
33:2c675744a01b
Child:
35:eb705b9c219f
SelfTest . runall= runfail= loopall= loopfail=

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 30:13fc9d492ee0 2025 // Report number of pass and number of fail test results
whismanoid 30:13fc9d492ee0 2026 tinyTester.Report_Summary();
whismanoid 30:13fc9d492ee0 2027 //
whismanoid 25:9d4012b0887f 2028 // @test group CODE_LOAD // Verify function CODE_LOAD vs platform AIN0 analog input (enabled by default)
whismanoid 25:9d4012b0887f 2029 // @test group CODE_LOAD tinyTester.print("VRef = 4.096 MAX5719 20-bit LSB = 0.000004V = 3.90625uV")
whismanoid 25:9d4012b0887f 2030 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 2031 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2032 // docTest_item['action'] = 'tinyTester.print("VRef = 4.096 MAX5719 20-bit LSB = 0.000004V = 3.90625uV")'
whismanoid 25:9d4012b0887f 2033 // docTest_item['arglist'] = 'VRef = 4.096 MAX5719 20-bit LSB = 0.000004V = 3.90625uV'
whismanoid 25:9d4012b0887f 2034 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2035 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2036 // print-string
whismanoid 25:9d4012b0887f 2037 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 2038 // tinyTesterPrintStringLiteral = "VRef = 4.096 MAX5719 20-bit LSB = 0.000004V = 3.90625uV"
whismanoid 25:9d4012b0887f 2039 tinyTester.print("VRef = 4.096 MAX5719 20-bit LSB = 0.000004V = 3.90625uV");
whismanoid 30:13fc9d492ee0 2040 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2041 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2042 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2043 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2044
whismanoid 25:9d4012b0887f 2045 // @test group CODE_LOAD tinyTester.print("Wire MAX5719 OUT to platform AIN0 for analog loopback tests...")
whismanoid 25:9d4012b0887f 2046 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 2047 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2048 // docTest_item['action'] = 'tinyTester.print("Wire MAX5719 OUT to platform AIN0 for analog loopback tests...")'
whismanoid 25:9d4012b0887f 2049 // docTest_item['arglist'] = 'Wire MAX5719 OUT to platform AIN0 for analog loopback tests...'
whismanoid 25:9d4012b0887f 2050 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2051 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2052 // print-string
whismanoid 25:9d4012b0887f 2053 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 2054 // tinyTesterPrintStringLiteral = "Wire MAX5719 OUT to platform AIN0 for analog loopback tests..."
whismanoid 25:9d4012b0887f 2055 tinyTester.print("Wire MAX5719 OUT to platform AIN0 for analog loopback tests...");
whismanoid 30:13fc9d492ee0 2056 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2057 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2058 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2059 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2060
whismanoid 25:9d4012b0887f 2061 // @test group CODE_LOAD VRef = 4.096
whismanoid 25:9d4012b0887f 2062 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 25:9d4012b0887f 2063 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2064 // docTest_item['action'] = 'VRef = 4.096'
whismanoid 25:9d4012b0887f 2065 // docTest_item['propName'] = 'VRef'
whismanoid 25:9d4012b0887f 2066 // docTest_item['propValue'] = '4.096'
whismanoid 25:9d4012b0887f 2067 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2068 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2069 // assign-propname-value
whismanoid 25:9d4012b0887f 2070 // tinyTesterPropName = "VRef"
whismanoid 25:9d4012b0887f 2071 // tinyTesterPropValue = "4.096"
whismanoid 25:9d4012b0887f 2072 g_MAX5719_device.VRef = 4.096;
whismanoid 30:13fc9d492ee0 2073 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2074 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2075 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2076 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2077
whismanoid 25:9d4012b0887f 2078 // @test group CODE_LOAD tinyTester.blink_time_msec = 75 // default 75 resume hardware self test
whismanoid 25:9d4012b0887f 2079 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 25:9d4012b0887f 2080 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2081 // docTest_item['action'] = 'tinyTester.blink_time_msec = 75'
whismanoid 25:9d4012b0887f 2082 // docTest_item['remarks'] = 'default 75 resume hardware self test'
whismanoid 25:9d4012b0887f 2083 // docTest_item['propName'] = 'tinyTester.blink_time_msec'
whismanoid 25:9d4012b0887f 2084 // docTest_item['propValue'] = '75'
whismanoid 25:9d4012b0887f 2085 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None default 75 resume hardware self test
whismanoid 30:13fc9d492ee0 2086 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2087 // assign-propname-value
whismanoid 25:9d4012b0887f 2088 // tinyTesterPropName = "tinyTester.blink_time_msec"
whismanoid 25:9d4012b0887f 2089 // tinyTesterPropValue = "75"
whismanoid 25:9d4012b0887f 2090 tinyTester.blink_time_msec = 75;
whismanoid 30:13fc9d492ee0 2091 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2092 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2093 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2094 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2095
whismanoid 25:9d4012b0887f 2096 // @test group CODE_LOAD tinyTester.settle_time_msec = 500
whismanoid 25:9d4012b0887f 2097 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 25:9d4012b0887f 2098 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2099 // docTest_item['action'] = 'tinyTester.settle_time_msec = 500'
whismanoid 25:9d4012b0887f 2100 // docTest_item['propName'] = 'tinyTester.settle_time_msec'
whismanoid 25:9d4012b0887f 2101 // docTest_item['propValue'] = '500'
whismanoid 25:9d4012b0887f 2102 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2103 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2104 // assign-propname-value
whismanoid 25:9d4012b0887f 2105 // tinyTesterPropName = "tinyTester.settle_time_msec"
whismanoid 25:9d4012b0887f 2106 // tinyTesterPropValue = "500"
whismanoid 25:9d4012b0887f 2107 tinyTester.settle_time_msec = 500;
whismanoid 30:13fc9d492ee0 2108 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2109 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2110 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2111 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2112
whismanoid 25:9d4012b0887f 2113 // @test Init()
whismanoid 25:9d4012b0887f 2114 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 2115 // docTest_item['action'] = 'Init()'
whismanoid 25:9d4012b0887f 2116 // docTest_item['funcName'] = 'Init'
whismanoid 25:9d4012b0887f 2117 // call-function
whismanoid 27:485b1b2f334c 2118 // selfTestFunctionClosures['Init']['returnType'] = 'void'
whismanoid 25:9d4012b0887f 2119 // ASSERT_EQ(g_MAX5719_device.Init(()), (void)None); //
whismanoid 25:9d4012b0887f 2120 // tinyTester.FunctionCall_Expect("MAX5719.Init", fn_MAX5719_Init, /* empty docTest_argList */ /* empty expect: */ (void)None); //
whismanoid 25:9d4012b0887f 2121 g_MAX5719_device.Init(); //
whismanoid 25:9d4012b0887f 2122
whismanoid 25:9d4012b0887f 2123 // @test VRef expect 4.096 // Nominal Full-Scale Voltage Reference
whismanoid 25:9d4012b0887f 2124 // docTest_item['actionType'] = 'test-propname-expect-value'
whismanoid 25:9d4012b0887f 2125 // docTest_item['action'] = 'VRef expect 4.096'
whismanoid 25:9d4012b0887f 2126 // docTest_item['remarks'] = 'Nominal Full-Scale Voltage Reference'
whismanoid 25:9d4012b0887f 2127 // docTest_item['expect-value'] = '4.096'
whismanoid 25:9d4012b0887f 2128 // docTest_item['propName'] = 'VRef'
whismanoid 25:9d4012b0887f 2129 // test-propname-expect-value
whismanoid 25:9d4012b0887f 2130 tinyTester.Expect("MAX5719.VRef", g_MAX5719_device.VRef, /* expect: */ 4.096); // Nominal Full-Scale Voltage Reference
whismanoid 25:9d4012b0887f 2131
whismanoid 25:9d4012b0887f 2132 // @test group CODE_LOAD tinyTester.err_threshold = 0.050
whismanoid 25:9d4012b0887f 2133 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 25:9d4012b0887f 2134 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2135 // docTest_item['action'] = 'tinyTester.err_threshold = 0.050'
whismanoid 25:9d4012b0887f 2136 // docTest_item['propName'] = 'tinyTester.err_threshold'
whismanoid 25:9d4012b0887f 2137 // docTest_item['propValue'] = '0.050'
whismanoid 25:9d4012b0887f 2138 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2139 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2140 // assign-propname-value
whismanoid 25:9d4012b0887f 2141 // tinyTesterPropName = "tinyTester.err_threshold"
whismanoid 25:9d4012b0887f 2142 // tinyTesterPropValue = "0.050"
whismanoid 25:9d4012b0887f 2143 tinyTester.err_threshold = 0.050;
whismanoid 30:13fc9d492ee0 2144 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2145 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2146 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2147 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2148
whismanoid 25:9d4012b0887f 2149 // @test group CODE_LOAD tinyTester.print("0x000000 = 0.000V")
whismanoid 25:9d4012b0887f 2150 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 2151 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2152 // docTest_item['action'] = 'tinyTester.print("0x000000 = 0.000V")'
whismanoid 25:9d4012b0887f 2153 // docTest_item['arglist'] = '0x000000 = 0.000V'
whismanoid 25:9d4012b0887f 2154 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2155 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2156 // print-string
whismanoid 25:9d4012b0887f 2157 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 2158 // tinyTesterPrintStringLiteral = "0x000000 = 0.000V"
whismanoid 25:9d4012b0887f 2159 tinyTester.print("0x000000 = 0.000V");
whismanoid 30:13fc9d492ee0 2160 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2161 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2162 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2163 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2164
whismanoid 25:9d4012b0887f 2165 // @test group CODE_LOAD CODE_LOAD(0x000000) // 0.000V
whismanoid 25:9d4012b0887f 2166 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 2167 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2168 // docTest_item['action'] = 'CODE_LOAD(0x000000)'
whismanoid 25:9d4012b0887f 2169 // docTest_item['remarks'] = '0.000V'
whismanoid 25:9d4012b0887f 2170 // docTest_item['funcName'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2171 // docTest_item['arglist'] = '0x000000'
whismanoid 25:9d4012b0887f 2172 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD CODE_LOAD 0.000V
whismanoid 30:13fc9d492ee0 2173 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2174 // call-function
whismanoid 27:485b1b2f334c 2175 // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t'
whismanoid 25:9d4012b0887f 2176 // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x000000), (uint8_t)None); // 0.000V
whismanoid 25:9d4012b0887f 2177 // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x000000, /* empty expect: */ (uint8_t)None); // 0.000V
whismanoid 25:9d4012b0887f 2178 g_MAX5719_device.CODE_LOAD((uint32_t)0x000000); // 0.000V
whismanoid 30:13fc9d492ee0 2179 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2180 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2181 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2182 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2183
whismanoid 25:9d4012b0887f 2184 // @test group CODE_LOAD tinyTester.Wait_Output_Settling()
whismanoid 25:9d4012b0887f 2185 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2186 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2187 // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()'
whismanoid 25:9d4012b0887f 2188 // docTest_item['propName'] = 'Wait_Output_Settling'
whismanoid 25:9d4012b0887f 2189 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2190 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2191 // call-tinytester-function
whismanoid 25:9d4012b0887f 2192 // tinyTesterFuncName = "tinyTester.Wait_Output_Settling"
whismanoid 25:9d4012b0887f 2193 // docTest_argList = ""
whismanoid 25:9d4012b0887f 2194 tinyTester.Wait_Output_Settling(); //
whismanoid 30:13fc9d492ee0 2195 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2196 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2197 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2198 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2199
whismanoid 25:9d4012b0887f 2200 // @test group CODE_LOAD tinyTester.AnalogIn0_Read_Expect_voltageV(0.000000)
whismanoid 25:9d4012b0887f 2201 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2202 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2203 // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(0.000000)'
whismanoid 25:9d4012b0887f 2204 // docTest_item['arglist'] = '0.000000'
whismanoid 25:9d4012b0887f 2205 // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV'
whismanoid 25:9d4012b0887f 2206 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2207 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2208 // call-tinytester-function
whismanoid 25:9d4012b0887f 2209 // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV"
whismanoid 25:9d4012b0887f 2210 // docTest_argList = "0.000000"
whismanoid 25:9d4012b0887f 2211 tinyTester.AnalogIn0_Read_Expect_voltageV(0.000000); //
whismanoid 30:13fc9d492ee0 2212 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2213 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2214 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2215 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2216
whismanoid 27:485b1b2f334c 2217 // @test group CODE_LOAD tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0
whismanoid 27:485b1b2f334c 2218 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 27:485b1b2f334c 2219 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 27:485b1b2f334c 2220 // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()'
whismanoid 27:485b1b2f334c 2221 // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV'
whismanoid 27:485b1b2f334c 2222 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2223 if (SelfTestGroupEnable & 0x0004) {
whismanoid 27:485b1b2f334c 2224 // call-tinytester-function
whismanoid 27:485b1b2f334c 2225 // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV"
whismanoid 27:485b1b2f334c 2226 // docTest_argList = ""
whismanoid 27:485b1b2f334c 2227 tinyTester.AnalogIn1_Read_Report_voltageV(); //
whismanoid 30:13fc9d492ee0 2228 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2229 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2230 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 27:485b1b2f334c 2231 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 27:485b1b2f334c 2232
whismanoid 25:9d4012b0887f 2233 // @test group CODE_LOAD tinyTester.print("0x01f400 = 0.500V")
whismanoid 25:9d4012b0887f 2234 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 2235 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2236 // docTest_item['action'] = 'tinyTester.print("0x01f400 = 0.500V")'
whismanoid 25:9d4012b0887f 2237 // docTest_item['arglist'] = '0x01f400 = 0.500V'
whismanoid 25:9d4012b0887f 2238 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2239 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2240 // print-string
whismanoid 25:9d4012b0887f 2241 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 2242 // tinyTesterPrintStringLiteral = "0x01f400 = 0.500V"
whismanoid 25:9d4012b0887f 2243 tinyTester.print("0x01f400 = 0.500V");
whismanoid 30:13fc9d492ee0 2244 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2245 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2246 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2247 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2248
whismanoid 25:9d4012b0887f 2249 // @test group CODE_LOAD CODE_LOAD(0x01f400) // 0.500V
whismanoid 25:9d4012b0887f 2250 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 2251 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2252 // docTest_item['action'] = 'CODE_LOAD(0x01f400)'
whismanoid 25:9d4012b0887f 2253 // docTest_item['remarks'] = '0.500V'
whismanoid 25:9d4012b0887f 2254 // docTest_item['funcName'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2255 // docTest_item['arglist'] = '0x01f400'
whismanoid 25:9d4012b0887f 2256 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD CODE_LOAD 0.500V
whismanoid 30:13fc9d492ee0 2257 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2258 // call-function
whismanoid 27:485b1b2f334c 2259 // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t'
whismanoid 25:9d4012b0887f 2260 // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x01f400), (uint8_t)None); // 0.500V
whismanoid 25:9d4012b0887f 2261 // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x01f400, /* empty expect: */ (uint8_t)None); // 0.500V
whismanoid 25:9d4012b0887f 2262 g_MAX5719_device.CODE_LOAD((uint32_t)0x01f400); // 0.500V
whismanoid 30:13fc9d492ee0 2263 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2264 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2265 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2266 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2267
whismanoid 25:9d4012b0887f 2268 // @test group CODE_LOAD tinyTester.Wait_Output_Settling()
whismanoid 25:9d4012b0887f 2269 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2270 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2271 // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()'
whismanoid 25:9d4012b0887f 2272 // docTest_item['propName'] = 'Wait_Output_Settling'
whismanoid 25:9d4012b0887f 2273 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2274 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2275 // call-tinytester-function
whismanoid 25:9d4012b0887f 2276 // tinyTesterFuncName = "tinyTester.Wait_Output_Settling"
whismanoid 25:9d4012b0887f 2277 // docTest_argList = ""
whismanoid 25:9d4012b0887f 2278 tinyTester.Wait_Output_Settling(); //
whismanoid 30:13fc9d492ee0 2279 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2280 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2281 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2282 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2283
whismanoid 25:9d4012b0887f 2284 // @test group CODE_LOAD tinyTester.AnalogIn0_Read_Expect_voltageV(0.500000)
whismanoid 25:9d4012b0887f 2285 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2286 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2287 // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(0.500000)'
whismanoid 25:9d4012b0887f 2288 // docTest_item['arglist'] = '0.500000'
whismanoid 25:9d4012b0887f 2289 // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV'
whismanoid 25:9d4012b0887f 2290 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2291 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2292 // call-tinytester-function
whismanoid 25:9d4012b0887f 2293 // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV"
whismanoid 25:9d4012b0887f 2294 // docTest_argList = "0.500000"
whismanoid 25:9d4012b0887f 2295 tinyTester.AnalogIn0_Read_Expect_voltageV(0.500000); //
whismanoid 30:13fc9d492ee0 2296 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2297 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2298 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2299 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2300
whismanoid 27:485b1b2f334c 2301 // @test group CODE_LOAD tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0
whismanoid 27:485b1b2f334c 2302 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 27:485b1b2f334c 2303 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 27:485b1b2f334c 2304 // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()'
whismanoid 27:485b1b2f334c 2305 // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV'
whismanoid 27:485b1b2f334c 2306 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2307 if (SelfTestGroupEnable & 0x0004) {
whismanoid 27:485b1b2f334c 2308 // call-tinytester-function
whismanoid 27:485b1b2f334c 2309 // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV"
whismanoid 27:485b1b2f334c 2310 // docTest_argList = ""
whismanoid 27:485b1b2f334c 2311 tinyTester.AnalogIn1_Read_Report_voltageV(); //
whismanoid 30:13fc9d492ee0 2312 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2313 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2314 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 27:485b1b2f334c 2315 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 27:485b1b2f334c 2316
whismanoid 25:9d4012b0887f 2317 // @test group CODE_LOAD tinyTester.print("0x03e800 = 1.000V")
whismanoid 25:9d4012b0887f 2318 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 2319 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2320 // docTest_item['action'] = 'tinyTester.print("0x03e800 = 1.000V")'
whismanoid 25:9d4012b0887f 2321 // docTest_item['arglist'] = '0x03e800 = 1.000V'
whismanoid 25:9d4012b0887f 2322 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2323 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2324 // print-string
whismanoid 25:9d4012b0887f 2325 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 2326 // tinyTesterPrintStringLiteral = "0x03e800 = 1.000V"
whismanoid 25:9d4012b0887f 2327 tinyTester.print("0x03e800 = 1.000V");
whismanoid 30:13fc9d492ee0 2328 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2329 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2330 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2331 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2332
whismanoid 25:9d4012b0887f 2333 // @test group CODE_LOAD CODE_LOAD(0x03e800) // 1.000V
whismanoid 25:9d4012b0887f 2334 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 2335 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2336 // docTest_item['action'] = 'CODE_LOAD(0x03e800)'
whismanoid 25:9d4012b0887f 2337 // docTest_item['remarks'] = '1.000V'
whismanoid 25:9d4012b0887f 2338 // docTest_item['funcName'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2339 // docTest_item['arglist'] = '0x03e800'
whismanoid 25:9d4012b0887f 2340 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD CODE_LOAD 1.000V
whismanoid 30:13fc9d492ee0 2341 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2342 // call-function
whismanoid 27:485b1b2f334c 2343 // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t'
whismanoid 25:9d4012b0887f 2344 // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x03e800), (uint8_t)None); // 1.000V
whismanoid 25:9d4012b0887f 2345 // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x03e800, /* empty expect: */ (uint8_t)None); // 1.000V
whismanoid 25:9d4012b0887f 2346 g_MAX5719_device.CODE_LOAD((uint32_t)0x03e800); // 1.000V
whismanoid 30:13fc9d492ee0 2347 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2348 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2349 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2350 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2351
whismanoid 25:9d4012b0887f 2352 // @test group CODE_LOAD tinyTester.Wait_Output_Settling()
whismanoid 25:9d4012b0887f 2353 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2354 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2355 // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()'
whismanoid 25:9d4012b0887f 2356 // docTest_item['propName'] = 'Wait_Output_Settling'
whismanoid 25:9d4012b0887f 2357 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2358 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2359 // call-tinytester-function
whismanoid 25:9d4012b0887f 2360 // tinyTesterFuncName = "tinyTester.Wait_Output_Settling"
whismanoid 25:9d4012b0887f 2361 // docTest_argList = ""
whismanoid 25:9d4012b0887f 2362 tinyTester.Wait_Output_Settling(); //
whismanoid 30:13fc9d492ee0 2363 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2364 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2365 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2366 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2367
whismanoid 25:9d4012b0887f 2368 // @test group CODE_LOAD tinyTester.AnalogIn0_Read_Expect_voltageV(1.000000)
whismanoid 25:9d4012b0887f 2369 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2370 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2371 // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(1.000000)'
whismanoid 25:9d4012b0887f 2372 // docTest_item['arglist'] = '1.000000'
whismanoid 25:9d4012b0887f 2373 // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV'
whismanoid 25:9d4012b0887f 2374 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2375 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2376 // call-tinytester-function
whismanoid 25:9d4012b0887f 2377 // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV"
whismanoid 25:9d4012b0887f 2378 // docTest_argList = "1.000000"
whismanoid 25:9d4012b0887f 2379 tinyTester.AnalogIn0_Read_Expect_voltageV(1.000000); //
whismanoid 30:13fc9d492ee0 2380 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2381 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2382 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2383 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2384
whismanoid 27:485b1b2f334c 2385 // @test group CODE_LOAD tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0
whismanoid 27:485b1b2f334c 2386 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 27:485b1b2f334c 2387 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 27:485b1b2f334c 2388 // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()'
whismanoid 27:485b1b2f334c 2389 // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV'
whismanoid 27:485b1b2f334c 2390 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2391 if (SelfTestGroupEnable & 0x0004) {
whismanoid 27:485b1b2f334c 2392 // call-tinytester-function
whismanoid 27:485b1b2f334c 2393 // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV"
whismanoid 27:485b1b2f334c 2394 // docTest_argList = ""
whismanoid 27:485b1b2f334c 2395 tinyTester.AnalogIn1_Read_Report_voltageV(); //
whismanoid 30:13fc9d492ee0 2396 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2397 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2398 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 27:485b1b2f334c 2399 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 27:485b1b2f334c 2400
whismanoid 26:ec719cd9a579 2401 // @test group CODE_LOAD tinyTester.err_threshold = 0.075
whismanoid 26:ec719cd9a579 2402 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 26:ec719cd9a579 2403 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 26:ec719cd9a579 2404 // docTest_item['action'] = 'tinyTester.err_threshold = 0.075'
whismanoid 26:ec719cd9a579 2405 // docTest_item['propName'] = 'tinyTester.err_threshold'
whismanoid 26:ec719cd9a579 2406 // docTest_item['propValue'] = '0.075'
whismanoid 26:ec719cd9a579 2407 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2408 if (SelfTestGroupEnable & 0x0004) {
whismanoid 26:ec719cd9a579 2409 // assign-propname-value
whismanoid 26:ec719cd9a579 2410 // tinyTesterPropName = "tinyTester.err_threshold"
whismanoid 26:ec719cd9a579 2411 // tinyTesterPropValue = "0.075"
whismanoid 26:ec719cd9a579 2412 tinyTester.err_threshold = 0.075;
whismanoid 30:13fc9d492ee0 2413 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2414 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2415 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 26:ec719cd9a579 2416 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 26:ec719cd9a579 2417
whismanoid 25:9d4012b0887f 2418 // @test group CODE_LOAD tinyTester.print("0x05dc00 = 1.500V")
whismanoid 25:9d4012b0887f 2419 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 2420 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2421 // docTest_item['action'] = 'tinyTester.print("0x05dc00 = 1.500V")'
whismanoid 25:9d4012b0887f 2422 // docTest_item['arglist'] = '0x05dc00 = 1.500V'
whismanoid 25:9d4012b0887f 2423 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2424 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2425 // print-string
whismanoid 25:9d4012b0887f 2426 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 2427 // tinyTesterPrintStringLiteral = "0x05dc00 = 1.500V"
whismanoid 25:9d4012b0887f 2428 tinyTester.print("0x05dc00 = 1.500V");
whismanoid 30:13fc9d492ee0 2429 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2430 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2431 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2432 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2433
whismanoid 25:9d4012b0887f 2434 // @test group CODE_LOAD CODE_LOAD(0x05dc00) // 1.500V
whismanoid 25:9d4012b0887f 2435 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 2436 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2437 // docTest_item['action'] = 'CODE_LOAD(0x05dc00)'
whismanoid 25:9d4012b0887f 2438 // docTest_item['remarks'] = '1.500V'
whismanoid 25:9d4012b0887f 2439 // docTest_item['funcName'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2440 // docTest_item['arglist'] = '0x05dc00'
whismanoid 25:9d4012b0887f 2441 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD CODE_LOAD 1.500V
whismanoid 30:13fc9d492ee0 2442 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2443 // call-function
whismanoid 27:485b1b2f334c 2444 // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t'
whismanoid 25:9d4012b0887f 2445 // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x05dc00), (uint8_t)None); // 1.500V
whismanoid 25:9d4012b0887f 2446 // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x05dc00, /* empty expect: */ (uint8_t)None); // 1.500V
whismanoid 25:9d4012b0887f 2447 g_MAX5719_device.CODE_LOAD((uint32_t)0x05dc00); // 1.500V
whismanoid 30:13fc9d492ee0 2448 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2449 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2450 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2451 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2452
whismanoid 25:9d4012b0887f 2453 // @test group CODE_LOAD tinyTester.Wait_Output_Settling()
whismanoid 25:9d4012b0887f 2454 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2455 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2456 // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()'
whismanoid 25:9d4012b0887f 2457 // docTest_item['propName'] = 'Wait_Output_Settling'
whismanoid 25:9d4012b0887f 2458 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2459 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2460 // call-tinytester-function
whismanoid 25:9d4012b0887f 2461 // tinyTesterFuncName = "tinyTester.Wait_Output_Settling"
whismanoid 25:9d4012b0887f 2462 // docTest_argList = ""
whismanoid 25:9d4012b0887f 2463 tinyTester.Wait_Output_Settling(); //
whismanoid 30:13fc9d492ee0 2464 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2465 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2466 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2467 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2468
whismanoid 25:9d4012b0887f 2469 // @test group CODE_LOAD tinyTester.AnalogIn0_Read_Expect_voltageV(1.500000)
whismanoid 25:9d4012b0887f 2470 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2471 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2472 // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(1.500000)'
whismanoid 25:9d4012b0887f 2473 // docTest_item['arglist'] = '1.500000'
whismanoid 25:9d4012b0887f 2474 // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV'
whismanoid 25:9d4012b0887f 2475 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2476 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2477 // call-tinytester-function
whismanoid 25:9d4012b0887f 2478 // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV"
whismanoid 25:9d4012b0887f 2479 // docTest_argList = "1.500000"
whismanoid 25:9d4012b0887f 2480 tinyTester.AnalogIn0_Read_Expect_voltageV(1.500000); //
whismanoid 30:13fc9d492ee0 2481 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2482 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2483 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2484 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2485
whismanoid 27:485b1b2f334c 2486 // @test group CODE_LOAD tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0
whismanoid 27:485b1b2f334c 2487 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 27:485b1b2f334c 2488 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 27:485b1b2f334c 2489 // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()'
whismanoid 27:485b1b2f334c 2490 // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV'
whismanoid 27:485b1b2f334c 2491 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2492 if (SelfTestGroupEnable & 0x0004) {
whismanoid 27:485b1b2f334c 2493 // call-tinytester-function
whismanoid 27:485b1b2f334c 2494 // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV"
whismanoid 27:485b1b2f334c 2495 // docTest_argList = ""
whismanoid 27:485b1b2f334c 2496 tinyTester.AnalogIn1_Read_Report_voltageV(); //
whismanoid 30:13fc9d492ee0 2497 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2498 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2499 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 27:485b1b2f334c 2500 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 27:485b1b2f334c 2501
whismanoid 26:ec719cd9a579 2502 // @test group CODE_LOAD tinyTester.err_threshold = 0.100
whismanoid 26:ec719cd9a579 2503 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 26:ec719cd9a579 2504 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 26:ec719cd9a579 2505 // docTest_item['action'] = 'tinyTester.err_threshold = 0.100'
whismanoid 26:ec719cd9a579 2506 // docTest_item['propName'] = 'tinyTester.err_threshold'
whismanoid 26:ec719cd9a579 2507 // docTest_item['propValue'] = '0.100'
whismanoid 26:ec719cd9a579 2508 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2509 if (SelfTestGroupEnable & 0x0004) {
whismanoid 26:ec719cd9a579 2510 // assign-propname-value
whismanoid 26:ec719cd9a579 2511 // tinyTesterPropName = "tinyTester.err_threshold"
whismanoid 26:ec719cd9a579 2512 // tinyTesterPropValue = "0.100"
whismanoid 26:ec719cd9a579 2513 tinyTester.err_threshold = 0.100;
whismanoid 30:13fc9d492ee0 2514 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2515 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2516 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 26:ec719cd9a579 2517 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 26:ec719cd9a579 2518
whismanoid 25:9d4012b0887f 2519 // @test group CODE_LOAD tinyTester.print("0x07d000 = 2.000V")
whismanoid 25:9d4012b0887f 2520 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 2521 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2522 // docTest_item['action'] = 'tinyTester.print("0x07d000 = 2.000V")'
whismanoid 25:9d4012b0887f 2523 // docTest_item['arglist'] = '0x07d000 = 2.000V'
whismanoid 25:9d4012b0887f 2524 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2525 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2526 // print-string
whismanoid 25:9d4012b0887f 2527 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 2528 // tinyTesterPrintStringLiteral = "0x07d000 = 2.000V"
whismanoid 25:9d4012b0887f 2529 tinyTester.print("0x07d000 = 2.000V");
whismanoid 30:13fc9d492ee0 2530 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2531 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2532 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2533 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2534
whismanoid 25:9d4012b0887f 2535 // @test group CODE_LOAD CODE_LOAD(0x07d000) // 2.000V
whismanoid 25:9d4012b0887f 2536 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 2537 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2538 // docTest_item['action'] = 'CODE_LOAD(0x07d000)'
whismanoid 25:9d4012b0887f 2539 // docTest_item['remarks'] = '2.000V'
whismanoid 25:9d4012b0887f 2540 // docTest_item['funcName'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2541 // docTest_item['arglist'] = '0x07d000'
whismanoid 25:9d4012b0887f 2542 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD CODE_LOAD 2.000V
whismanoid 30:13fc9d492ee0 2543 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2544 // call-function
whismanoid 27:485b1b2f334c 2545 // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t'
whismanoid 25:9d4012b0887f 2546 // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x07d000), (uint8_t)None); // 2.000V
whismanoid 25:9d4012b0887f 2547 // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x07d000, /* empty expect: */ (uint8_t)None); // 2.000V
whismanoid 25:9d4012b0887f 2548 g_MAX5719_device.CODE_LOAD((uint32_t)0x07d000); // 2.000V
whismanoid 30:13fc9d492ee0 2549 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2550 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2551 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2552 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2553
whismanoid 25:9d4012b0887f 2554 // @test group CODE_LOAD tinyTester.Wait_Output_Settling()
whismanoid 25:9d4012b0887f 2555 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2556 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2557 // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()'
whismanoid 25:9d4012b0887f 2558 // docTest_item['propName'] = 'Wait_Output_Settling'
whismanoid 25:9d4012b0887f 2559 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2560 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2561 // call-tinytester-function
whismanoid 25:9d4012b0887f 2562 // tinyTesterFuncName = "tinyTester.Wait_Output_Settling"
whismanoid 25:9d4012b0887f 2563 // docTest_argList = ""
whismanoid 25:9d4012b0887f 2564 tinyTester.Wait_Output_Settling(); //
whismanoid 30:13fc9d492ee0 2565 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2566 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2567 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2568 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2569
whismanoid 25:9d4012b0887f 2570 // @test group CODE_LOAD tinyTester.AnalogIn0_Read_Expect_voltageV(2.000000)
whismanoid 25:9d4012b0887f 2571 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2572 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2573 // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(2.000000)'
whismanoid 25:9d4012b0887f 2574 // docTest_item['arglist'] = '2.000000'
whismanoid 25:9d4012b0887f 2575 // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV'
whismanoid 25:9d4012b0887f 2576 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2577 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2578 // call-tinytester-function
whismanoid 25:9d4012b0887f 2579 // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV"
whismanoid 25:9d4012b0887f 2580 // docTest_argList = "2.000000"
whismanoid 25:9d4012b0887f 2581 tinyTester.AnalogIn0_Read_Expect_voltageV(2.000000); //
whismanoid 30:13fc9d492ee0 2582 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2583 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2584 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2585 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2586
whismanoid 27:485b1b2f334c 2587 // @test group CODE_LOAD tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0
whismanoid 27:485b1b2f334c 2588 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 27:485b1b2f334c 2589 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 27:485b1b2f334c 2590 // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()'
whismanoid 27:485b1b2f334c 2591 // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV'
whismanoid 27:485b1b2f334c 2592 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2593 if (SelfTestGroupEnable & 0x0004) {
whismanoid 27:485b1b2f334c 2594 // call-tinytester-function
whismanoid 27:485b1b2f334c 2595 // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV"
whismanoid 27:485b1b2f334c 2596 // docTest_argList = ""
whismanoid 27:485b1b2f334c 2597 tinyTester.AnalogIn1_Read_Report_voltageV(); //
whismanoid 30:13fc9d492ee0 2598 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2599 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2600 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 27:485b1b2f334c 2601 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 27:485b1b2f334c 2602
whismanoid 26:ec719cd9a579 2603 // @test group CODE_LOAD tinyTester.err_threshold = 0.150
whismanoid 26:ec719cd9a579 2604 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 26:ec719cd9a579 2605 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 26:ec719cd9a579 2606 // docTest_item['action'] = 'tinyTester.err_threshold = 0.150'
whismanoid 26:ec719cd9a579 2607 // docTest_item['propName'] = 'tinyTester.err_threshold'
whismanoid 26:ec719cd9a579 2608 // docTest_item['propValue'] = '0.150'
whismanoid 26:ec719cd9a579 2609 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2610 if (SelfTestGroupEnable & 0x0004) {
whismanoid 26:ec719cd9a579 2611 // assign-propname-value
whismanoid 26:ec719cd9a579 2612 // tinyTesterPropName = "tinyTester.err_threshold"
whismanoid 26:ec719cd9a579 2613 // tinyTesterPropValue = "0.150"
whismanoid 26:ec719cd9a579 2614 tinyTester.err_threshold = 0.150;
whismanoid 30:13fc9d492ee0 2615 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2616 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2617 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 26:ec719cd9a579 2618 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 26:ec719cd9a579 2619
whismanoid 25:9d4012b0887f 2620 // @test group CODE_LOAD tinyTester.print("0x09c400 = 2.500V")
whismanoid 25:9d4012b0887f 2621 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 2622 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2623 // docTest_item['action'] = 'tinyTester.print("0x09c400 = 2.500V")'
whismanoid 25:9d4012b0887f 2624 // docTest_item['arglist'] = '0x09c400 = 2.500V'
whismanoid 25:9d4012b0887f 2625 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2626 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2627 // print-string
whismanoid 25:9d4012b0887f 2628 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 2629 // tinyTesterPrintStringLiteral = "0x09c400 = 2.500V"
whismanoid 25:9d4012b0887f 2630 tinyTester.print("0x09c400 = 2.500V");
whismanoid 30:13fc9d492ee0 2631 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2632 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2633 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2634 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2635
whismanoid 25:9d4012b0887f 2636 // @test group CODE_LOAD CODE_LOAD(0x09c400) // 2.500V
whismanoid 25:9d4012b0887f 2637 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 2638 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2639 // docTest_item['action'] = 'CODE_LOAD(0x09c400)'
whismanoid 25:9d4012b0887f 2640 // docTest_item['remarks'] = '2.500V'
whismanoid 25:9d4012b0887f 2641 // docTest_item['funcName'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2642 // docTest_item['arglist'] = '0x09c400'
whismanoid 25:9d4012b0887f 2643 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD CODE_LOAD 2.500V
whismanoid 30:13fc9d492ee0 2644 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2645 // call-function
whismanoid 27:485b1b2f334c 2646 // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t'
whismanoid 25:9d4012b0887f 2647 // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x09c400), (uint8_t)None); // 2.500V
whismanoid 25:9d4012b0887f 2648 // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x09c400, /* empty expect: */ (uint8_t)None); // 2.500V
whismanoid 25:9d4012b0887f 2649 g_MAX5719_device.CODE_LOAD((uint32_t)0x09c400); // 2.500V
whismanoid 30:13fc9d492ee0 2650 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2651 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2652 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2653 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2654
whismanoid 25:9d4012b0887f 2655 // @test group CODE_LOAD tinyTester.Wait_Output_Settling()
whismanoid 25:9d4012b0887f 2656 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2657 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2658 // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()'
whismanoid 25:9d4012b0887f 2659 // docTest_item['propName'] = 'Wait_Output_Settling'
whismanoid 25:9d4012b0887f 2660 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2661 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2662 // call-tinytester-function
whismanoid 25:9d4012b0887f 2663 // tinyTesterFuncName = "tinyTester.Wait_Output_Settling"
whismanoid 25:9d4012b0887f 2664 // docTest_argList = ""
whismanoid 25:9d4012b0887f 2665 tinyTester.Wait_Output_Settling(); //
whismanoid 30:13fc9d492ee0 2666 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2667 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2668 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2669 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2670
whismanoid 25:9d4012b0887f 2671 // @test group CODE_LOAD tinyTester.AnalogIn0_Read_Expect_voltageV(2.500000)
whismanoid 25:9d4012b0887f 2672 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2673 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2674 // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(2.500000)'
whismanoid 25:9d4012b0887f 2675 // docTest_item['arglist'] = '2.500000'
whismanoid 25:9d4012b0887f 2676 // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV'
whismanoid 25:9d4012b0887f 2677 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2678 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2679 // call-tinytester-function
whismanoid 25:9d4012b0887f 2680 // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV"
whismanoid 25:9d4012b0887f 2681 // docTest_argList = "2.500000"
whismanoid 25:9d4012b0887f 2682 tinyTester.AnalogIn0_Read_Expect_voltageV(2.500000); //
whismanoid 30:13fc9d492ee0 2683 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2684 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2685 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2686 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2687
whismanoid 27:485b1b2f334c 2688 // @test group CODE_LOAD tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0
whismanoid 27:485b1b2f334c 2689 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 27:485b1b2f334c 2690 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 27:485b1b2f334c 2691 // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()'
whismanoid 27:485b1b2f334c 2692 // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV'
whismanoid 27:485b1b2f334c 2693 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2694 if (SelfTestGroupEnable & 0x0004) {
whismanoid 27:485b1b2f334c 2695 // call-tinytester-function
whismanoid 27:485b1b2f334c 2696 // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV"
whismanoid 27:485b1b2f334c 2697 // docTest_argList = ""
whismanoid 27:485b1b2f334c 2698 tinyTester.AnalogIn1_Read_Report_voltageV(); //
whismanoid 30:13fc9d492ee0 2699 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2700 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2701 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 27:485b1b2f334c 2702 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 27:485b1b2f334c 2703
whismanoid 26:ec719cd9a579 2704 // @test group CODE_LOAD tinyTester.err_threshold = 0.200
whismanoid 26:ec719cd9a579 2705 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 26:ec719cd9a579 2706 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 26:ec719cd9a579 2707 // docTest_item['action'] = 'tinyTester.err_threshold = 0.200'
whismanoid 26:ec719cd9a579 2708 // docTest_item['propName'] = 'tinyTester.err_threshold'
whismanoid 26:ec719cd9a579 2709 // docTest_item['propValue'] = '0.200'
whismanoid 26:ec719cd9a579 2710 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2711 if (SelfTestGroupEnable & 0x0004) {
whismanoid 26:ec719cd9a579 2712 // assign-propname-value
whismanoid 26:ec719cd9a579 2713 // tinyTesterPropName = "tinyTester.err_threshold"
whismanoid 26:ec719cd9a579 2714 // tinyTesterPropValue = "0.200"
whismanoid 26:ec719cd9a579 2715 tinyTester.err_threshold = 0.200;
whismanoid 30:13fc9d492ee0 2716 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2717 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2718 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 26:ec719cd9a579 2719 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 26:ec719cd9a579 2720
whismanoid 25:9d4012b0887f 2721 // @test group CODE_LOAD tinyTester.print("0x0bb800 = 3.000V")
whismanoid 25:9d4012b0887f 2722 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 2723 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2724 // docTest_item['action'] = 'tinyTester.print("0x0bb800 = 3.000V")'
whismanoid 25:9d4012b0887f 2725 // docTest_item['arglist'] = '0x0bb800 = 3.000V'
whismanoid 25:9d4012b0887f 2726 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2727 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2728 // print-string
whismanoid 25:9d4012b0887f 2729 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 2730 // tinyTesterPrintStringLiteral = "0x0bb800 = 3.000V"
whismanoid 25:9d4012b0887f 2731 tinyTester.print("0x0bb800 = 3.000V");
whismanoid 30:13fc9d492ee0 2732 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2733 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2734 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2735 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2736
whismanoid 25:9d4012b0887f 2737 // @test group CODE_LOAD CODE_LOAD(0x0bb800) // 3.000V
whismanoid 25:9d4012b0887f 2738 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 2739 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2740 // docTest_item['action'] = 'CODE_LOAD(0x0bb800)'
whismanoid 25:9d4012b0887f 2741 // docTest_item['remarks'] = '3.000V'
whismanoid 25:9d4012b0887f 2742 // docTest_item['funcName'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2743 // docTest_item['arglist'] = '0x0bb800'
whismanoid 25:9d4012b0887f 2744 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD CODE_LOAD 3.000V
whismanoid 30:13fc9d492ee0 2745 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2746 // call-function
whismanoid 27:485b1b2f334c 2747 // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t'
whismanoid 25:9d4012b0887f 2748 // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x0bb800), (uint8_t)None); // 3.000V
whismanoid 25:9d4012b0887f 2749 // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x0bb800, /* empty expect: */ (uint8_t)None); // 3.000V
whismanoid 25:9d4012b0887f 2750 g_MAX5719_device.CODE_LOAD((uint32_t)0x0bb800); // 3.000V
whismanoid 30:13fc9d492ee0 2751 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2752 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2753 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2754 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2755
whismanoid 25:9d4012b0887f 2756 // @test group CODE_LOAD tinyTester.Wait_Output_Settling()
whismanoid 25:9d4012b0887f 2757 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2758 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2759 // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()'
whismanoid 25:9d4012b0887f 2760 // docTest_item['propName'] = 'Wait_Output_Settling'
whismanoid 25:9d4012b0887f 2761 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2762 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2763 // call-tinytester-function
whismanoid 25:9d4012b0887f 2764 // tinyTesterFuncName = "tinyTester.Wait_Output_Settling"
whismanoid 25:9d4012b0887f 2765 // docTest_argList = ""
whismanoid 25:9d4012b0887f 2766 tinyTester.Wait_Output_Settling(); //
whismanoid 30:13fc9d492ee0 2767 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2768 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2769 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2770 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2771
whismanoid 25:9d4012b0887f 2772 // @test group CODE_LOAD tinyTester.AnalogIn0_Read_Expect_voltageV(3.000000)
whismanoid 25:9d4012b0887f 2773 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2774 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2775 // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(3.000000)'
whismanoid 25:9d4012b0887f 2776 // docTest_item['arglist'] = '3.000000'
whismanoid 25:9d4012b0887f 2777 // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV'
whismanoid 25:9d4012b0887f 2778 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2779 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2780 // call-tinytester-function
whismanoid 25:9d4012b0887f 2781 // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV"
whismanoid 25:9d4012b0887f 2782 // docTest_argList = "3.000000"
whismanoid 25:9d4012b0887f 2783 tinyTester.AnalogIn0_Read_Expect_voltageV(3.000000); //
whismanoid 30:13fc9d492ee0 2784 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2785 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2786 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2787 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2788
whismanoid 27:485b1b2f334c 2789 // @test group CODE_LOAD tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0
whismanoid 27:485b1b2f334c 2790 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 27:485b1b2f334c 2791 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 27:485b1b2f334c 2792 // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()'
whismanoid 27:485b1b2f334c 2793 // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV'
whismanoid 27:485b1b2f334c 2794 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2795 if (SelfTestGroupEnable & 0x0004) {
whismanoid 27:485b1b2f334c 2796 // call-tinytester-function
whismanoid 27:485b1b2f334c 2797 // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV"
whismanoid 27:485b1b2f334c 2798 // docTest_argList = ""
whismanoid 27:485b1b2f334c 2799 tinyTester.AnalogIn1_Read_Report_voltageV(); //
whismanoid 30:13fc9d492ee0 2800 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2801 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2802 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 27:485b1b2f334c 2803 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 27:485b1b2f334c 2804
whismanoid 26:ec719cd9a579 2805 // @test group CODE_LOAD tinyTester.err_threshold = 0.250
whismanoid 26:ec719cd9a579 2806 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 26:ec719cd9a579 2807 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 26:ec719cd9a579 2808 // docTest_item['action'] = 'tinyTester.err_threshold = 0.250'
whismanoid 26:ec719cd9a579 2809 // docTest_item['propName'] = 'tinyTester.err_threshold'
whismanoid 26:ec719cd9a579 2810 // docTest_item['propValue'] = '0.250'
whismanoid 26:ec719cd9a579 2811 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2812 if (SelfTestGroupEnable & 0x0004) {
whismanoid 26:ec719cd9a579 2813 // assign-propname-value
whismanoid 26:ec719cd9a579 2814 // tinyTesterPropName = "tinyTester.err_threshold"
whismanoid 26:ec719cd9a579 2815 // tinyTesterPropValue = "0.250"
whismanoid 26:ec719cd9a579 2816 tinyTester.err_threshold = 0.250;
whismanoid 30:13fc9d492ee0 2817 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2818 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2819 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 26:ec719cd9a579 2820 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 26:ec719cd9a579 2821
whismanoid 25:9d4012b0887f 2822 // @test group CODE_LOAD tinyTester.print("0x0dac00 = 3.500V")
whismanoid 25:9d4012b0887f 2823 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 2824 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2825 // docTest_item['action'] = 'tinyTester.print("0x0dac00 = 3.500V")'
whismanoid 25:9d4012b0887f 2826 // docTest_item['arglist'] = '0x0dac00 = 3.500V'
whismanoid 25:9d4012b0887f 2827 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2828 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2829 // print-string
whismanoid 25:9d4012b0887f 2830 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 2831 // tinyTesterPrintStringLiteral = "0x0dac00 = 3.500V"
whismanoid 25:9d4012b0887f 2832 tinyTester.print("0x0dac00 = 3.500V");
whismanoid 30:13fc9d492ee0 2833 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2834 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2835 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2836 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2837
whismanoid 25:9d4012b0887f 2838 // @test group CODE_LOAD CODE_LOAD(0x0dac00) // 3.500V
whismanoid 25:9d4012b0887f 2839 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 2840 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2841 // docTest_item['action'] = 'CODE_LOAD(0x0dac00)'
whismanoid 25:9d4012b0887f 2842 // docTest_item['remarks'] = '3.500V'
whismanoid 25:9d4012b0887f 2843 // docTest_item['funcName'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2844 // docTest_item['arglist'] = '0x0dac00'
whismanoid 25:9d4012b0887f 2845 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD CODE_LOAD 3.500V
whismanoid 30:13fc9d492ee0 2846 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2847 // call-function
whismanoid 27:485b1b2f334c 2848 // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t'
whismanoid 25:9d4012b0887f 2849 // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x0dac00), (uint8_t)None); // 3.500V
whismanoid 25:9d4012b0887f 2850 // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x0dac00, /* empty expect: */ (uint8_t)None); // 3.500V
whismanoid 25:9d4012b0887f 2851 g_MAX5719_device.CODE_LOAD((uint32_t)0x0dac00); // 3.500V
whismanoid 30:13fc9d492ee0 2852 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2853 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2854 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2855 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2856
whismanoid 25:9d4012b0887f 2857 // @test group CODE_LOAD tinyTester.Wait_Output_Settling()
whismanoid 25:9d4012b0887f 2858 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2859 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2860 // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()'
whismanoid 25:9d4012b0887f 2861 // docTest_item['propName'] = 'Wait_Output_Settling'
whismanoid 25:9d4012b0887f 2862 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2863 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2864 // call-tinytester-function
whismanoid 25:9d4012b0887f 2865 // tinyTesterFuncName = "tinyTester.Wait_Output_Settling"
whismanoid 25:9d4012b0887f 2866 // docTest_argList = ""
whismanoid 25:9d4012b0887f 2867 tinyTester.Wait_Output_Settling(); //
whismanoid 30:13fc9d492ee0 2868 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2869 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2870 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2871 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2872
whismanoid 25:9d4012b0887f 2873 // @test group CODE_LOAD tinyTester.AnalogIn0_Read_Expect_voltageV(3.500000)
whismanoid 25:9d4012b0887f 2874 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2875 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2876 // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(3.500000)'
whismanoid 25:9d4012b0887f 2877 // docTest_item['arglist'] = '3.500000'
whismanoid 25:9d4012b0887f 2878 // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV'
whismanoid 25:9d4012b0887f 2879 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2880 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2881 // call-tinytester-function
whismanoid 25:9d4012b0887f 2882 // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV"
whismanoid 25:9d4012b0887f 2883 // docTest_argList = "3.500000"
whismanoid 25:9d4012b0887f 2884 tinyTester.AnalogIn0_Read_Expect_voltageV(3.500000); //
whismanoid 30:13fc9d492ee0 2885 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2886 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2887 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2888 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2889
whismanoid 27:485b1b2f334c 2890 // @test group CODE_LOAD tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0
whismanoid 27:485b1b2f334c 2891 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 27:485b1b2f334c 2892 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 27:485b1b2f334c 2893 // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()'
whismanoid 27:485b1b2f334c 2894 // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV'
whismanoid 27:485b1b2f334c 2895 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2896 if (SelfTestGroupEnable & 0x0004) {
whismanoid 27:485b1b2f334c 2897 // call-tinytester-function
whismanoid 27:485b1b2f334c 2898 // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV"
whismanoid 27:485b1b2f334c 2899 // docTest_argList = ""
whismanoid 27:485b1b2f334c 2900 tinyTester.AnalogIn1_Read_Report_voltageV(); //
whismanoid 30:13fc9d492ee0 2901 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2902 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2903 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 27:485b1b2f334c 2904 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 27:485b1b2f334c 2905
whismanoid 26:ec719cd9a579 2906 // @test group CODE_LOAD tinyTester.err_threshold = 0.500
whismanoid 26:ec719cd9a579 2907 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 26:ec719cd9a579 2908 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 26:ec719cd9a579 2909 // docTest_item['action'] = 'tinyTester.err_threshold = 0.500'
whismanoid 26:ec719cd9a579 2910 // docTest_item['propName'] = 'tinyTester.err_threshold'
whismanoid 26:ec719cd9a579 2911 // docTest_item['propValue'] = '0.500'
whismanoid 26:ec719cd9a579 2912 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2913 if (SelfTestGroupEnable & 0x0004) {
whismanoid 26:ec719cd9a579 2914 // assign-propname-value
whismanoid 26:ec719cd9a579 2915 // tinyTesterPropName = "tinyTester.err_threshold"
whismanoid 26:ec719cd9a579 2916 // tinyTesterPropValue = "0.500"
whismanoid 26:ec719cd9a579 2917 tinyTester.err_threshold = 0.500;
whismanoid 30:13fc9d492ee0 2918 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2919 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2920 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 26:ec719cd9a579 2921 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 26:ec719cd9a579 2922
whismanoid 25:9d4012b0887f 2923 // @test group CODE_LOAD tinyTester.print("0x0fa000 = 4.000V")
whismanoid 25:9d4012b0887f 2924 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 2925 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2926 // docTest_item['action'] = 'tinyTester.print("0x0fa000 = 4.000V")'
whismanoid 25:9d4012b0887f 2927 // docTest_item['arglist'] = '0x0fa000 = 4.000V'
whismanoid 25:9d4012b0887f 2928 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2929 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2930 // print-string
whismanoid 25:9d4012b0887f 2931 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 2932 // tinyTesterPrintStringLiteral = "0x0fa000 = 4.000V"
whismanoid 25:9d4012b0887f 2933 tinyTester.print("0x0fa000 = 4.000V");
whismanoid 30:13fc9d492ee0 2934 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2935 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2936 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2937 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2938
whismanoid 25:9d4012b0887f 2939 // @test group CODE_LOAD CODE_LOAD(0x0fa000) // 4.000V
whismanoid 25:9d4012b0887f 2940 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 2941 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2942 // docTest_item['action'] = 'CODE_LOAD(0x0fa000)'
whismanoid 25:9d4012b0887f 2943 // docTest_item['remarks'] = '4.000V'
whismanoid 25:9d4012b0887f 2944 // docTest_item['funcName'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2945 // docTest_item['arglist'] = '0x0fa000'
whismanoid 25:9d4012b0887f 2946 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD CODE_LOAD 4.000V
whismanoid 30:13fc9d492ee0 2947 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2948 // call-function
whismanoid 27:485b1b2f334c 2949 // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t'
whismanoid 25:9d4012b0887f 2950 // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x0fa000), (uint8_t)None); // 4.000V
whismanoid 25:9d4012b0887f 2951 // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x0fa000, /* empty expect: */ (uint8_t)None); // 4.000V
whismanoid 25:9d4012b0887f 2952 g_MAX5719_device.CODE_LOAD((uint32_t)0x0fa000); // 4.000V
whismanoid 30:13fc9d492ee0 2953 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2954 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2955 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2956 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2957
whismanoid 25:9d4012b0887f 2958 // @test group CODE_LOAD tinyTester.Wait_Output_Settling()
whismanoid 25:9d4012b0887f 2959 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2960 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2961 // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()'
whismanoid 25:9d4012b0887f 2962 // docTest_item['propName'] = 'Wait_Output_Settling'
whismanoid 25:9d4012b0887f 2963 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2964 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2965 // call-tinytester-function
whismanoid 25:9d4012b0887f 2966 // tinyTesterFuncName = "tinyTester.Wait_Output_Settling"
whismanoid 25:9d4012b0887f 2967 // docTest_argList = ""
whismanoid 25:9d4012b0887f 2968 tinyTester.Wait_Output_Settling(); //
whismanoid 30:13fc9d492ee0 2969 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2970 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2971 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2972 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2973
whismanoid 25:9d4012b0887f 2974 // @test group CODE_LOAD tinyTester.AnalogIn0_Read_Expect_voltageV(4.000000)
whismanoid 25:9d4012b0887f 2975 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 2976 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 2977 // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(4.000000)'
whismanoid 25:9d4012b0887f 2978 // docTest_item['arglist'] = '4.000000'
whismanoid 25:9d4012b0887f 2979 // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV'
whismanoid 25:9d4012b0887f 2980 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2981 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 2982 // call-tinytester-function
whismanoid 25:9d4012b0887f 2983 // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV"
whismanoid 25:9d4012b0887f 2984 // docTest_argList = "4.000000"
whismanoid 25:9d4012b0887f 2985 tinyTester.AnalogIn0_Read_Expect_voltageV(4.000000); //
whismanoid 30:13fc9d492ee0 2986 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 2987 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 2988 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 2989 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 2990
whismanoid 27:485b1b2f334c 2991 // @test group CODE_LOAD tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0
whismanoid 27:485b1b2f334c 2992 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 27:485b1b2f334c 2993 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 27:485b1b2f334c 2994 // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()'
whismanoid 27:485b1b2f334c 2995 // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV'
whismanoid 27:485b1b2f334c 2996 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 2997 if (SelfTestGroupEnable & 0x0004) {
whismanoid 27:485b1b2f334c 2998 // call-tinytester-function
whismanoid 27:485b1b2f334c 2999 // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV"
whismanoid 27:485b1b2f334c 3000 // docTest_argList = ""
whismanoid 27:485b1b2f334c 3001 tinyTester.AnalogIn1_Read_Report_voltageV(); //
whismanoid 30:13fc9d492ee0 3002 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3003 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 3004 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 27:485b1b2f334c 3005 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 27:485b1b2f334c 3006
whismanoid 26:ec719cd9a579 3007 // @test group CODE_LOAD tinyTester.err_threshold = 0.750
whismanoid 26:ec719cd9a579 3008 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 26:ec719cd9a579 3009 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 26:ec719cd9a579 3010 // docTest_item['action'] = 'tinyTester.err_threshold = 0.750'
whismanoid 26:ec719cd9a579 3011 // docTest_item['propName'] = 'tinyTester.err_threshold'
whismanoid 26:ec719cd9a579 3012 // docTest_item['propValue'] = '0.750'
whismanoid 26:ec719cd9a579 3013 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 3014 if (SelfTestGroupEnable & 0x0004) {
whismanoid 26:ec719cd9a579 3015 // assign-propname-value
whismanoid 26:ec719cd9a579 3016 // tinyTesterPropName = "tinyTester.err_threshold"
whismanoid 26:ec719cd9a579 3017 // tinyTesterPropValue = "0.750"
whismanoid 26:ec719cd9a579 3018 tinyTester.err_threshold = 0.750;
whismanoid 30:13fc9d492ee0 3019 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3020 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 3021 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 26:ec719cd9a579 3022 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 26:ec719cd9a579 3023
whismanoid 25:9d4012b0887f 3024 // @test group CODE_LOAD tinyTester.print("0x0fffff = 4.095V")
whismanoid 25:9d4012b0887f 3025 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 3026 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 3027 // docTest_item['action'] = 'tinyTester.print("0x0fffff = 4.095V")'
whismanoid 25:9d4012b0887f 3028 // docTest_item['arglist'] = '0x0fffff = 4.095V'
whismanoid 25:9d4012b0887f 3029 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 3030 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 3031 // print-string
whismanoid 25:9d4012b0887f 3032 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 3033 // tinyTesterPrintStringLiteral = "0x0fffff = 4.095V"
whismanoid 25:9d4012b0887f 3034 tinyTester.print("0x0fffff = 4.095V");
whismanoid 30:13fc9d492ee0 3035 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3036 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 3037 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 3038 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 3039
whismanoid 25:9d4012b0887f 3040 // @test group CODE_LOAD CODE_LOAD(0x0fffff) // 4.095V
whismanoid 25:9d4012b0887f 3041 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 3042 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 3043 // docTest_item['action'] = 'CODE_LOAD(0x0fffff)'
whismanoid 25:9d4012b0887f 3044 // docTest_item['remarks'] = '4.095V'
whismanoid 25:9d4012b0887f 3045 // docTest_item['funcName'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 3046 // docTest_item['arglist'] = '0x0fffff'
whismanoid 25:9d4012b0887f 3047 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD CODE_LOAD 4.095V
whismanoid 30:13fc9d492ee0 3048 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 3049 // call-function
whismanoid 27:485b1b2f334c 3050 // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t'
whismanoid 25:9d4012b0887f 3051 // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x0fffff), (uint8_t)None); // 4.095V
whismanoid 25:9d4012b0887f 3052 // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x0fffff, /* empty expect: */ (uint8_t)None); // 4.095V
whismanoid 25:9d4012b0887f 3053 g_MAX5719_device.CODE_LOAD((uint32_t)0x0fffff); // 4.095V
whismanoid 30:13fc9d492ee0 3054 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3055 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 3056 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 3057 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 3058
whismanoid 25:9d4012b0887f 3059 // @test group CODE_LOAD tinyTester.Wait_Output_Settling()
whismanoid 25:9d4012b0887f 3060 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 3061 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 3062 // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()'
whismanoid 25:9d4012b0887f 3063 // docTest_item['propName'] = 'Wait_Output_Settling'
whismanoid 25:9d4012b0887f 3064 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 3065 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 3066 // call-tinytester-function
whismanoid 25:9d4012b0887f 3067 // tinyTesterFuncName = "tinyTester.Wait_Output_Settling"
whismanoid 25:9d4012b0887f 3068 // docTest_argList = ""
whismanoid 25:9d4012b0887f 3069 tinyTester.Wait_Output_Settling(); //
whismanoid 30:13fc9d492ee0 3070 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3071 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 3072 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 3073 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 3074
whismanoid 25:9d4012b0887f 3075 // @test group CODE_LOAD tinyTester.AnalogIn0_Read_Expect_voltageV(4.095000)
whismanoid 25:9d4012b0887f 3076 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 3077 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 3078 // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(4.095000)'
whismanoid 25:9d4012b0887f 3079 // docTest_item['arglist'] = '4.095000'
whismanoid 25:9d4012b0887f 3080 // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV'
whismanoid 25:9d4012b0887f 3081 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 3082 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 3083 // call-tinytester-function
whismanoid 25:9d4012b0887f 3084 // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV"
whismanoid 25:9d4012b0887f 3085 // docTest_argList = "4.095000"
whismanoid 25:9d4012b0887f 3086 tinyTester.AnalogIn0_Read_Expect_voltageV(4.095000); //
whismanoid 30:13fc9d492ee0 3087 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3088 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 3089 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 3090 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 3091
whismanoid 27:485b1b2f334c 3092 // @test group CODE_LOAD tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0
whismanoid 27:485b1b2f334c 3093 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 27:485b1b2f334c 3094 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 27:485b1b2f334c 3095 // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()'
whismanoid 27:485b1b2f334c 3096 // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV'
whismanoid 27:485b1b2f334c 3097 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 3098 if (SelfTestGroupEnable & 0x0004) {
whismanoid 27:485b1b2f334c 3099 // call-tinytester-function
whismanoid 27:485b1b2f334c 3100 // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV"
whismanoid 27:485b1b2f334c 3101 // docTest_argList = ""
whismanoid 27:485b1b2f334c 3102 tinyTester.AnalogIn1_Read_Report_voltageV(); //
whismanoid 30:13fc9d492ee0 3103 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3104 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 3105 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 27:485b1b2f334c 3106 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 27:485b1b2f334c 3107
whismanoid 26:ec719cd9a579 3108 // @test group CODE_LOAD tinyTester.err_threshold = 0.200
whismanoid 26:ec719cd9a579 3109 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 26:ec719cd9a579 3110 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 26:ec719cd9a579 3111 // docTest_item['action'] = 'tinyTester.err_threshold = 0.200'
whismanoid 26:ec719cd9a579 3112 // docTest_item['propName'] = 'tinyTester.err_threshold'
whismanoid 26:ec719cd9a579 3113 // docTest_item['propValue'] = '0.200'
whismanoid 26:ec719cd9a579 3114 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 3115 if (SelfTestGroupEnable & 0x0004) {
whismanoid 26:ec719cd9a579 3116 // assign-propname-value
whismanoid 26:ec719cd9a579 3117 // tinyTesterPropName = "tinyTester.err_threshold"
whismanoid 26:ec719cd9a579 3118 // tinyTesterPropValue = "0.200"
whismanoid 26:ec719cd9a579 3119 tinyTester.err_threshold = 0.200;
whismanoid 30:13fc9d492ee0 3120 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3121 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 3122 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 26:ec719cd9a579 3123 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 26:ec719cd9a579 3124
whismanoid 25:9d4012b0887f 3125 // @test group CODE_LOAD tinyTester.print("0x080000 // 2.048V")
whismanoid 25:9d4012b0887f 3126 // @test group CODE_LOAD CODE_LOAD(0x080000) // 2.048V
whismanoid 25:9d4012b0887f 3127 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 3128 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 3129 // docTest_item['action'] = 'CODE_LOAD(0x080000)'
whismanoid 25:9d4012b0887f 3130 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 3131 // docTest_item['funcName'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 3132 // docTest_item['arglist'] = '0x080000'
whismanoid 25:9d4012b0887f 3133 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD CODE_LOAD 2.048V
whismanoid 30:13fc9d492ee0 3134 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 3135 // call-function
whismanoid 27:485b1b2f334c 3136 // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t'
whismanoid 25:9d4012b0887f 3137 // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x080000), (uint8_t)None); // 2.048V
whismanoid 25:9d4012b0887f 3138 // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x080000, /* empty expect: */ (uint8_t)None); // 2.048V
whismanoid 25:9d4012b0887f 3139 g_MAX5719_device.CODE_LOAD((uint32_t)0x080000); // 2.048V
whismanoid 30:13fc9d492ee0 3140 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3141 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 3142 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 3143 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 3144
whismanoid 25:9d4012b0887f 3145 // @test group CODE_LOAD tinyTester.Wait_Output_Settling()
whismanoid 25:9d4012b0887f 3146 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 3147 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 3148 // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()'
whismanoid 25:9d4012b0887f 3149 // docTest_item['propName'] = 'Wait_Output_Settling'
whismanoid 25:9d4012b0887f 3150 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 3151 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 3152 // call-tinytester-function
whismanoid 25:9d4012b0887f 3153 // tinyTesterFuncName = "tinyTester.Wait_Output_Settling"
whismanoid 25:9d4012b0887f 3154 // docTest_argList = ""
whismanoid 25:9d4012b0887f 3155 tinyTester.Wait_Output_Settling(); //
whismanoid 30:13fc9d492ee0 3156 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3157 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 3158 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 3159 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 3160
whismanoid 25:9d4012b0887f 3161 // @test group CODE_LOAD tinyTester.AnalogIn0_Read_Expect_voltageV(2.048000)
whismanoid 25:9d4012b0887f 3162 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 25:9d4012b0887f 3163 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 3164 // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(2.048000)'
whismanoid 25:9d4012b0887f 3165 // docTest_item['arglist'] = '2.048000'
whismanoid 25:9d4012b0887f 3166 // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV'
whismanoid 25:9d4012b0887f 3167 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 3168 if (SelfTestGroupEnable & 0x0004) {
whismanoid 25:9d4012b0887f 3169 // call-tinytester-function
whismanoid 25:9d4012b0887f 3170 // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV"
whismanoid 25:9d4012b0887f 3171 // docTest_argList = "2.048000"
whismanoid 25:9d4012b0887f 3172 tinyTester.AnalogIn0_Read_Expect_voltageV(2.048000); //
whismanoid 30:13fc9d492ee0 3173 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3174 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 3175 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 25:9d4012b0887f 3176 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 25:9d4012b0887f 3177
whismanoid 27:485b1b2f334c 3178 // @test group CODE_LOAD tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0
whismanoid 27:485b1b2f334c 3179 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 27:485b1b2f334c 3180 // docTest_item['group-id-value'] = 'CODE_LOAD'
whismanoid 27:485b1b2f334c 3181 // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()'
whismanoid 27:485b1b2f334c 3182 // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV'
whismanoid 27:485b1b2f334c 3183 #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None
whismanoid 30:13fc9d492ee0 3184 if (SelfTestGroupEnable & 0x0004) {
whismanoid 27:485b1b2f334c 3185 // call-tinytester-function
whismanoid 27:485b1b2f334c 3186 // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV"
whismanoid 27:485b1b2f334c 3187 // docTest_argList = ""
whismanoid 27:485b1b2f334c 3188 tinyTester.AnalogIn1_Read_Report_voltageV(); //
whismanoid 30:13fc9d492ee0 3189 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3190 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 3191 } // if (SelfTestGroupEnable & 0x0004)
whismanoid 27:485b1b2f334c 3192 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
whismanoid 27:485b1b2f334c 3193
whismanoid 33:2c675744a01b 3194 // @test group CODE_LOAD_2V5 // Verify function CODE_LOAD vs platform AIN0 analog input (enabled by default) (no run on button)
whismanoid 33:2c675744a01b 3195 // @test group CODE_LOAD_2V5 tinyTester.err_threshold = 0.150
whismanoid 33:2c675744a01b 3196 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 33:2c675744a01b 3197 // docTest_item['group-id-value'] = 'CODE_LOAD_2V5'
whismanoid 33:2c675744a01b 3198 // docTest_item['action'] = 'tinyTester.err_threshold = 0.150'
whismanoid 33:2c675744a01b 3199 // docTest_item['propName'] = 'tinyTester.err_threshold'
whismanoid 33:2c675744a01b 3200 // docTest_item['propValue'] = '0.150'
whismanoid 33:2c675744a01b 3201 #if MAX5719_SELFTEST_CODE_LOAD_2V5 // group CODE_LOAD_2V5 None
whismanoid 33:2c675744a01b 3202 if (SelfTestGroupEnable & 0x0008) {
whismanoid 33:2c675744a01b 3203 // assign-propname-value
whismanoid 33:2c675744a01b 3204 // tinyTesterPropName = "tinyTester.err_threshold"
whismanoid 33:2c675744a01b 3205 // tinyTesterPropValue = "0.150"
whismanoid 33:2c675744a01b 3206 tinyTester.err_threshold = 0.150;
whismanoid 33:2c675744a01b 3207 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3208 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3209 } // if (SelfTestGroupEnable & 0x0008)
whismanoid 33:2c675744a01b 3210 #endif // MAX5719_SELFTEST_CODE_LOAD_2V5 // group CODE_LOAD_2V5
whismanoid 33:2c675744a01b 3211
whismanoid 33:2c675744a01b 3212 // @test group CODE_LOAD_2V5 tinyTester.print("0x09c400 = 2.500V")
whismanoid 33:2c675744a01b 3213 // docTest_item['actionType'] = 'print-string'
whismanoid 33:2c675744a01b 3214 // docTest_item['group-id-value'] = 'CODE_LOAD_2V5'
whismanoid 33:2c675744a01b 3215 // docTest_item['action'] = 'tinyTester.print("0x09c400 = 2.500V")'
whismanoid 33:2c675744a01b 3216 // docTest_item['arglist'] = '0x09c400 = 2.500V'
whismanoid 33:2c675744a01b 3217 #if MAX5719_SELFTEST_CODE_LOAD_2V5 // group CODE_LOAD_2V5 None
whismanoid 33:2c675744a01b 3218 if (SelfTestGroupEnable & 0x0008) {
whismanoid 33:2c675744a01b 3219 // print-string
whismanoid 33:2c675744a01b 3220 // tinyTesterFuncName = "tinyTester.print"
whismanoid 33:2c675744a01b 3221 // tinyTesterPrintStringLiteral = "0x09c400 = 2.500V"
whismanoid 33:2c675744a01b 3222 tinyTester.print("0x09c400 = 2.500V");
whismanoid 33:2c675744a01b 3223 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3224 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3225 } // if (SelfTestGroupEnable & 0x0008)
whismanoid 33:2c675744a01b 3226 #endif // MAX5719_SELFTEST_CODE_LOAD_2V5 // group CODE_LOAD_2V5
whismanoid 33:2c675744a01b 3227
whismanoid 33:2c675744a01b 3228 // @test group CODE_LOAD_2V5 CODE_LOAD(0x09c400) // 2.500V
whismanoid 33:2c675744a01b 3229 // docTest_item['actionType'] = 'call-function'
whismanoid 33:2c675744a01b 3230 // docTest_item['group-id-value'] = 'CODE_LOAD_2V5'
whismanoid 33:2c675744a01b 3231 // docTest_item['action'] = 'CODE_LOAD(0x09c400)'
whismanoid 33:2c675744a01b 3232 // docTest_item['remarks'] = '2.500V'
whismanoid 33:2c675744a01b 3233 // docTest_item['funcName'] = 'CODE_LOAD'
whismanoid 33:2c675744a01b 3234 // docTest_item['arglist'] = '0x09c400'
whismanoid 33:2c675744a01b 3235 #if MAX5719_SELFTEST_CODE_LOAD_2V5 // group CODE_LOAD_2V5 CODE_LOAD 2.500V
whismanoid 33:2c675744a01b 3236 if (SelfTestGroupEnable & 0x0008) {
whismanoid 33:2c675744a01b 3237 // call-function
whismanoid 33:2c675744a01b 3238 // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t'
whismanoid 33:2c675744a01b 3239 // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x09c400), (uint8_t)None); // 2.500V
whismanoid 33:2c675744a01b 3240 // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x09c400, /* empty expect: */ (uint8_t)None); // 2.500V
whismanoid 33:2c675744a01b 3241 g_MAX5719_device.CODE_LOAD((uint32_t)0x09c400); // 2.500V
whismanoid 33:2c675744a01b 3242 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3243 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3244 } // if (SelfTestGroupEnable & 0x0008)
whismanoid 33:2c675744a01b 3245 #endif // MAX5719_SELFTEST_CODE_LOAD_2V5 // group CODE_LOAD_2V5
whismanoid 33:2c675744a01b 3246
whismanoid 33:2c675744a01b 3247 // @test group CODE_LOAD_2V5 tinyTester.Wait_Output_Settling()
whismanoid 33:2c675744a01b 3248 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 33:2c675744a01b 3249 // docTest_item['group-id-value'] = 'CODE_LOAD_2V5'
whismanoid 33:2c675744a01b 3250 // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()'
whismanoid 33:2c675744a01b 3251 // docTest_item['propName'] = 'Wait_Output_Settling'
whismanoid 33:2c675744a01b 3252 #if MAX5719_SELFTEST_CODE_LOAD_2V5 // group CODE_LOAD_2V5 None
whismanoid 33:2c675744a01b 3253 if (SelfTestGroupEnable & 0x0008) {
whismanoid 33:2c675744a01b 3254 // call-tinytester-function
whismanoid 33:2c675744a01b 3255 // tinyTesterFuncName = "tinyTester.Wait_Output_Settling"
whismanoid 33:2c675744a01b 3256 // docTest_argList = ""
whismanoid 33:2c675744a01b 3257 tinyTester.Wait_Output_Settling(); //
whismanoid 33:2c675744a01b 3258 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3259 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3260 } // if (SelfTestGroupEnable & 0x0008)
whismanoid 33:2c675744a01b 3261 #endif // MAX5719_SELFTEST_CODE_LOAD_2V5 // group CODE_LOAD_2V5
whismanoid 33:2c675744a01b 3262
whismanoid 33:2c675744a01b 3263 // @test group CODE_LOAD_2V5 tinyTester.AnalogIn0_Read_Expect_voltageV(2.500000)
whismanoid 33:2c675744a01b 3264 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 33:2c675744a01b 3265 // docTest_item['group-id-value'] = 'CODE_LOAD_2V5'
whismanoid 33:2c675744a01b 3266 // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(2.500000)'
whismanoid 33:2c675744a01b 3267 // docTest_item['arglist'] = '2.500000'
whismanoid 33:2c675744a01b 3268 // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV'
whismanoid 33:2c675744a01b 3269 #if MAX5719_SELFTEST_CODE_LOAD_2V5 // group CODE_LOAD_2V5 None
whismanoid 33:2c675744a01b 3270 if (SelfTestGroupEnable & 0x0008) {
whismanoid 33:2c675744a01b 3271 // call-tinytester-function
whismanoid 33:2c675744a01b 3272 // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV"
whismanoid 33:2c675744a01b 3273 // docTest_argList = "2.500000"
whismanoid 33:2c675744a01b 3274 tinyTester.AnalogIn0_Read_Expect_voltageV(2.500000); //
whismanoid 33:2c675744a01b 3275 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3276 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3277 } // if (SelfTestGroupEnable & 0x0008)
whismanoid 33:2c675744a01b 3278 #endif // MAX5719_SELFTEST_CODE_LOAD_2V5 // group CODE_LOAD_2V5
whismanoid 33:2c675744a01b 3279
whismanoid 33:2c675744a01b 3280 // @test group CODE_LOAD_2V5 tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0
whismanoid 33:2c675744a01b 3281 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 33:2c675744a01b 3282 // docTest_item['group-id-value'] = 'CODE_LOAD_2V5'
whismanoid 33:2c675744a01b 3283 // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()'
whismanoid 33:2c675744a01b 3284 // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV'
whismanoid 33:2c675744a01b 3285 #if MAX5719_SELFTEST_CODE_LOAD_2V5 // group CODE_LOAD_2V5 None
whismanoid 33:2c675744a01b 3286 if (SelfTestGroupEnable & 0x0008) {
whismanoid 33:2c675744a01b 3287 // call-tinytester-function
whismanoid 33:2c675744a01b 3288 // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV"
whismanoid 33:2c675744a01b 3289 // docTest_argList = ""
whismanoid 33:2c675744a01b 3290 tinyTester.AnalogIn1_Read_Report_voltageV(); //
whismanoid 33:2c675744a01b 3291 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3292 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3293 } // if (SelfTestGroupEnable & 0x0008)
whismanoid 33:2c675744a01b 3294 #endif // MAX5719_SELFTEST_CODE_LOAD_2V5 // group CODE_LOAD_2V5
whismanoid 33:2c675744a01b 3295
whismanoid 33:2c675744a01b 3296 // @test group CODE_LOAD_3V0 // Verify function CODE_LOAD vs platform AIN0 analog input (enabled by default) (no run on button)
whismanoid 33:2c675744a01b 3297 // @test group CODE_LOAD_3V0 tinyTester.err_threshold = 0.200
whismanoid 33:2c675744a01b 3298 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 33:2c675744a01b 3299 // docTest_item['group-id-value'] = 'CODE_LOAD_3V0'
whismanoid 33:2c675744a01b 3300 // docTest_item['action'] = 'tinyTester.err_threshold = 0.200'
whismanoid 33:2c675744a01b 3301 // docTest_item['propName'] = 'tinyTester.err_threshold'
whismanoid 33:2c675744a01b 3302 // docTest_item['propValue'] = '0.200'
whismanoid 33:2c675744a01b 3303 #if MAX5719_SELFTEST_CODE_LOAD_3V0 // group CODE_LOAD_3V0 None
whismanoid 33:2c675744a01b 3304 if (SelfTestGroupEnable & 0x0010) {
whismanoid 33:2c675744a01b 3305 // assign-propname-value
whismanoid 33:2c675744a01b 3306 // tinyTesterPropName = "tinyTester.err_threshold"
whismanoid 33:2c675744a01b 3307 // tinyTesterPropValue = "0.200"
whismanoid 33:2c675744a01b 3308 tinyTester.err_threshold = 0.200;
whismanoid 33:2c675744a01b 3309 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3310 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3311 } // if (SelfTestGroupEnable & 0x0010)
whismanoid 33:2c675744a01b 3312 #endif // MAX5719_SELFTEST_CODE_LOAD_3V0 // group CODE_LOAD_3V0
whismanoid 33:2c675744a01b 3313
whismanoid 33:2c675744a01b 3314 // @test group CODE_LOAD_3V0 tinyTester.print("0x0bb800 = 3.000V")
whismanoid 33:2c675744a01b 3315 // docTest_item['actionType'] = 'print-string'
whismanoid 33:2c675744a01b 3316 // docTest_item['group-id-value'] = 'CODE_LOAD_3V0'
whismanoid 33:2c675744a01b 3317 // docTest_item['action'] = 'tinyTester.print("0x0bb800 = 3.000V")'
whismanoid 33:2c675744a01b 3318 // docTest_item['arglist'] = '0x0bb800 = 3.000V'
whismanoid 33:2c675744a01b 3319 #if MAX5719_SELFTEST_CODE_LOAD_3V0 // group CODE_LOAD_3V0 None
whismanoid 33:2c675744a01b 3320 if (SelfTestGroupEnable & 0x0010) {
whismanoid 33:2c675744a01b 3321 // print-string
whismanoid 33:2c675744a01b 3322 // tinyTesterFuncName = "tinyTester.print"
whismanoid 33:2c675744a01b 3323 // tinyTesterPrintStringLiteral = "0x0bb800 = 3.000V"
whismanoid 33:2c675744a01b 3324 tinyTester.print("0x0bb800 = 3.000V");
whismanoid 33:2c675744a01b 3325 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3326 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3327 } // if (SelfTestGroupEnable & 0x0010)
whismanoid 33:2c675744a01b 3328 #endif // MAX5719_SELFTEST_CODE_LOAD_3V0 // group CODE_LOAD_3V0
whismanoid 33:2c675744a01b 3329
whismanoid 33:2c675744a01b 3330 // @test group CODE_LOAD_3V0 CODE_LOAD(0x0bb800) // 3.000V
whismanoid 33:2c675744a01b 3331 // docTest_item['actionType'] = 'call-function'
whismanoid 33:2c675744a01b 3332 // docTest_item['group-id-value'] = 'CODE_LOAD_3V0'
whismanoid 33:2c675744a01b 3333 // docTest_item['action'] = 'CODE_LOAD(0x0bb800)'
whismanoid 33:2c675744a01b 3334 // docTest_item['remarks'] = '3.000V'
whismanoid 33:2c675744a01b 3335 // docTest_item['funcName'] = 'CODE_LOAD'
whismanoid 33:2c675744a01b 3336 // docTest_item['arglist'] = '0x0bb800'
whismanoid 33:2c675744a01b 3337 #if MAX5719_SELFTEST_CODE_LOAD_3V0 // group CODE_LOAD_3V0 CODE_LOAD 3.000V
whismanoid 33:2c675744a01b 3338 if (SelfTestGroupEnable & 0x0010) {
whismanoid 33:2c675744a01b 3339 // call-function
whismanoid 33:2c675744a01b 3340 // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t'
whismanoid 33:2c675744a01b 3341 // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x0bb800), (uint8_t)None); // 3.000V
whismanoid 33:2c675744a01b 3342 // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x0bb800, /* empty expect: */ (uint8_t)None); // 3.000V
whismanoid 33:2c675744a01b 3343 g_MAX5719_device.CODE_LOAD((uint32_t)0x0bb800); // 3.000V
whismanoid 33:2c675744a01b 3344 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3345 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3346 } // if (SelfTestGroupEnable & 0x0010)
whismanoid 33:2c675744a01b 3347 #endif // MAX5719_SELFTEST_CODE_LOAD_3V0 // group CODE_LOAD_3V0
whismanoid 33:2c675744a01b 3348
whismanoid 33:2c675744a01b 3349 // @test group CODE_LOAD_3V0 tinyTester.Wait_Output_Settling()
whismanoid 33:2c675744a01b 3350 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 33:2c675744a01b 3351 // docTest_item['group-id-value'] = 'CODE_LOAD_3V0'
whismanoid 33:2c675744a01b 3352 // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()'
whismanoid 33:2c675744a01b 3353 // docTest_item['propName'] = 'Wait_Output_Settling'
whismanoid 33:2c675744a01b 3354 #if MAX5719_SELFTEST_CODE_LOAD_3V0 // group CODE_LOAD_3V0 None
whismanoid 33:2c675744a01b 3355 if (SelfTestGroupEnable & 0x0010) {
whismanoid 33:2c675744a01b 3356 // call-tinytester-function
whismanoid 33:2c675744a01b 3357 // tinyTesterFuncName = "tinyTester.Wait_Output_Settling"
whismanoid 33:2c675744a01b 3358 // docTest_argList = ""
whismanoid 33:2c675744a01b 3359 tinyTester.Wait_Output_Settling(); //
whismanoid 33:2c675744a01b 3360 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3361 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3362 } // if (SelfTestGroupEnable & 0x0010)
whismanoid 33:2c675744a01b 3363 #endif // MAX5719_SELFTEST_CODE_LOAD_3V0 // group CODE_LOAD_3V0
whismanoid 33:2c675744a01b 3364
whismanoid 33:2c675744a01b 3365 // @test group CODE_LOAD_3V0 tinyTester.AnalogIn0_Read_Expect_voltageV(3.000000)
whismanoid 33:2c675744a01b 3366 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 33:2c675744a01b 3367 // docTest_item['group-id-value'] = 'CODE_LOAD_3V0'
whismanoid 33:2c675744a01b 3368 // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(3.000000)'
whismanoid 33:2c675744a01b 3369 // docTest_item['arglist'] = '3.000000'
whismanoid 33:2c675744a01b 3370 // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV'
whismanoid 33:2c675744a01b 3371 #if MAX5719_SELFTEST_CODE_LOAD_3V0 // group CODE_LOAD_3V0 None
whismanoid 33:2c675744a01b 3372 if (SelfTestGroupEnable & 0x0010) {
whismanoid 33:2c675744a01b 3373 // call-tinytester-function
whismanoid 33:2c675744a01b 3374 // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV"
whismanoid 33:2c675744a01b 3375 // docTest_argList = "3.000000"
whismanoid 33:2c675744a01b 3376 tinyTester.AnalogIn0_Read_Expect_voltageV(3.000000); //
whismanoid 33:2c675744a01b 3377 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3378 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3379 } // if (SelfTestGroupEnable & 0x0010)
whismanoid 33:2c675744a01b 3380 #endif // MAX5719_SELFTEST_CODE_LOAD_3V0 // group CODE_LOAD_3V0
whismanoid 33:2c675744a01b 3381
whismanoid 33:2c675744a01b 3382 // @test group CODE_LOAD_3V0 tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0
whismanoid 33:2c675744a01b 3383 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 33:2c675744a01b 3384 // docTest_item['group-id-value'] = 'CODE_LOAD_3V0'
whismanoid 33:2c675744a01b 3385 // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()'
whismanoid 33:2c675744a01b 3386 // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV'
whismanoid 33:2c675744a01b 3387 #if MAX5719_SELFTEST_CODE_LOAD_3V0 // group CODE_LOAD_3V0 None
whismanoid 33:2c675744a01b 3388 if (SelfTestGroupEnable & 0x0010) {
whismanoid 33:2c675744a01b 3389 // call-tinytester-function
whismanoid 33:2c675744a01b 3390 // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV"
whismanoid 33:2c675744a01b 3391 // docTest_argList = ""
whismanoid 33:2c675744a01b 3392 tinyTester.AnalogIn1_Read_Report_voltageV(); //
whismanoid 33:2c675744a01b 3393 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3394 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3395 } // if (SelfTestGroupEnable & 0x0010)
whismanoid 33:2c675744a01b 3396 #endif // MAX5719_SELFTEST_CODE_LOAD_3V0 // group CODE_LOAD_3V0
whismanoid 33:2c675744a01b 3397
whismanoid 33:2c675744a01b 3398 // @test group CODE_LOAD_4V1 // Verify function CODE_LOAD vs platform AIN0 analog input (enabled by default) (no run on button)
whismanoid 33:2c675744a01b 3399 // @test group CODE_LOAD_4V1 tinyTester.err_threshold = 0.750
whismanoid 33:2c675744a01b 3400 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 33:2c675744a01b 3401 // docTest_item['group-id-value'] = 'CODE_LOAD_4V1'
whismanoid 33:2c675744a01b 3402 // docTest_item['action'] = 'tinyTester.err_threshold = 0.750'
whismanoid 33:2c675744a01b 3403 // docTest_item['propName'] = 'tinyTester.err_threshold'
whismanoid 33:2c675744a01b 3404 // docTest_item['propValue'] = '0.750'
whismanoid 33:2c675744a01b 3405 #if MAX5719_SELFTEST_CODE_LOAD_4V1 // group CODE_LOAD_4V1 None
whismanoid 33:2c675744a01b 3406 if (SelfTestGroupEnable & 0x0020) {
whismanoid 33:2c675744a01b 3407 // assign-propname-value
whismanoid 33:2c675744a01b 3408 // tinyTesterPropName = "tinyTester.err_threshold"
whismanoid 33:2c675744a01b 3409 // tinyTesterPropValue = "0.750"
whismanoid 33:2c675744a01b 3410 tinyTester.err_threshold = 0.750;
whismanoid 33:2c675744a01b 3411 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3412 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3413 } // if (SelfTestGroupEnable & 0x0020)
whismanoid 33:2c675744a01b 3414 #endif // MAX5719_SELFTEST_CODE_LOAD_4V1 // group CODE_LOAD_4V1
whismanoid 33:2c675744a01b 3415
whismanoid 33:2c675744a01b 3416 // @test group CODE_LOAD_4V1 tinyTester.print("0x0fffff = 4.095V")
whismanoid 33:2c675744a01b 3417 // docTest_item['actionType'] = 'print-string'
whismanoid 33:2c675744a01b 3418 // docTest_item['group-id-value'] = 'CODE_LOAD_4V1'
whismanoid 33:2c675744a01b 3419 // docTest_item['action'] = 'tinyTester.print("0x0fffff = 4.095V")'
whismanoid 33:2c675744a01b 3420 // docTest_item['arglist'] = '0x0fffff = 4.095V'
whismanoid 33:2c675744a01b 3421 #if MAX5719_SELFTEST_CODE_LOAD_4V1 // group CODE_LOAD_4V1 None
whismanoid 33:2c675744a01b 3422 if (SelfTestGroupEnable & 0x0020) {
whismanoid 33:2c675744a01b 3423 // print-string
whismanoid 33:2c675744a01b 3424 // tinyTesterFuncName = "tinyTester.print"
whismanoid 33:2c675744a01b 3425 // tinyTesterPrintStringLiteral = "0x0fffff = 4.095V"
whismanoid 33:2c675744a01b 3426 tinyTester.print("0x0fffff = 4.095V");
whismanoid 33:2c675744a01b 3427 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3428 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3429 } // if (SelfTestGroupEnable & 0x0020)
whismanoid 33:2c675744a01b 3430 #endif // MAX5719_SELFTEST_CODE_LOAD_4V1 // group CODE_LOAD_4V1
whismanoid 33:2c675744a01b 3431
whismanoid 33:2c675744a01b 3432 // @test group CODE_LOAD_4V1 CODE_LOAD(0x0fffff) // 4.095V
whismanoid 33:2c675744a01b 3433 // docTest_item['actionType'] = 'call-function'
whismanoid 33:2c675744a01b 3434 // docTest_item['group-id-value'] = 'CODE_LOAD_4V1'
whismanoid 33:2c675744a01b 3435 // docTest_item['action'] = 'CODE_LOAD(0x0fffff)'
whismanoid 33:2c675744a01b 3436 // docTest_item['remarks'] = '4.095V'
whismanoid 33:2c675744a01b 3437 // docTest_item['funcName'] = 'CODE_LOAD'
whismanoid 33:2c675744a01b 3438 // docTest_item['arglist'] = '0x0fffff'
whismanoid 33:2c675744a01b 3439 #if MAX5719_SELFTEST_CODE_LOAD_4V1 // group CODE_LOAD_4V1 CODE_LOAD 4.095V
whismanoid 33:2c675744a01b 3440 if (SelfTestGroupEnable & 0x0020) {
whismanoid 33:2c675744a01b 3441 // call-function
whismanoid 33:2c675744a01b 3442 // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t'
whismanoid 33:2c675744a01b 3443 // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x0fffff), (uint8_t)None); // 4.095V
whismanoid 33:2c675744a01b 3444 // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x0fffff, /* empty expect: */ (uint8_t)None); // 4.095V
whismanoid 33:2c675744a01b 3445 g_MAX5719_device.CODE_LOAD((uint32_t)0x0fffff); // 4.095V
whismanoid 33:2c675744a01b 3446 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3447 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3448 } // if (SelfTestGroupEnable & 0x0020)
whismanoid 33:2c675744a01b 3449 #endif // MAX5719_SELFTEST_CODE_LOAD_4V1 // group CODE_LOAD_4V1
whismanoid 33:2c675744a01b 3450
whismanoid 33:2c675744a01b 3451 // @test group CODE_LOAD_4V1 tinyTester.Wait_Output_Settling()
whismanoid 33:2c675744a01b 3452 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 33:2c675744a01b 3453 // docTest_item['group-id-value'] = 'CODE_LOAD_4V1'
whismanoid 33:2c675744a01b 3454 // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()'
whismanoid 33:2c675744a01b 3455 // docTest_item['propName'] = 'Wait_Output_Settling'
whismanoid 33:2c675744a01b 3456 #if MAX5719_SELFTEST_CODE_LOAD_4V1 // group CODE_LOAD_4V1 None
whismanoid 33:2c675744a01b 3457 if (SelfTestGroupEnable & 0x0020) {
whismanoid 33:2c675744a01b 3458 // call-tinytester-function
whismanoid 33:2c675744a01b 3459 // tinyTesterFuncName = "tinyTester.Wait_Output_Settling"
whismanoid 33:2c675744a01b 3460 // docTest_argList = ""
whismanoid 33:2c675744a01b 3461 tinyTester.Wait_Output_Settling(); //
whismanoid 33:2c675744a01b 3462 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3463 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3464 } // if (SelfTestGroupEnable & 0x0020)
whismanoid 33:2c675744a01b 3465 #endif // MAX5719_SELFTEST_CODE_LOAD_4V1 // group CODE_LOAD_4V1
whismanoid 33:2c675744a01b 3466
whismanoid 33:2c675744a01b 3467 // @test group CODE_LOAD_4V1 tinyTester.AnalogIn0_Read_Expect_voltageV(4.095000)
whismanoid 33:2c675744a01b 3468 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 33:2c675744a01b 3469 // docTest_item['group-id-value'] = 'CODE_LOAD_4V1'
whismanoid 33:2c675744a01b 3470 // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(4.095000)'
whismanoid 33:2c675744a01b 3471 // docTest_item['arglist'] = '4.095000'
whismanoid 33:2c675744a01b 3472 // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV'
whismanoid 33:2c675744a01b 3473 #if MAX5719_SELFTEST_CODE_LOAD_4V1 // group CODE_LOAD_4V1 None
whismanoid 33:2c675744a01b 3474 if (SelfTestGroupEnable & 0x0020) {
whismanoid 33:2c675744a01b 3475 // call-tinytester-function
whismanoid 33:2c675744a01b 3476 // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV"
whismanoid 33:2c675744a01b 3477 // docTest_argList = "4.095000"
whismanoid 33:2c675744a01b 3478 tinyTester.AnalogIn0_Read_Expect_voltageV(4.095000); //
whismanoid 33:2c675744a01b 3479 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3480 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3481 } // if (SelfTestGroupEnable & 0x0020)
whismanoid 33:2c675744a01b 3482 #endif // MAX5719_SELFTEST_CODE_LOAD_4V1 // group CODE_LOAD_4V1
whismanoid 33:2c675744a01b 3483
whismanoid 33:2c675744a01b 3484 // @test group CODE_LOAD_4V1 tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0
whismanoid 33:2c675744a01b 3485 // docTest_item['actionType'] = 'call-tinytester-function'
whismanoid 33:2c675744a01b 3486 // docTest_item['group-id-value'] = 'CODE_LOAD_4V1'
whismanoid 33:2c675744a01b 3487 // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()'
whismanoid 33:2c675744a01b 3488 // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV'
whismanoid 33:2c675744a01b 3489 #if MAX5719_SELFTEST_CODE_LOAD_4V1 // group CODE_LOAD_4V1 None
whismanoid 33:2c675744a01b 3490 if (SelfTestGroupEnable & 0x0020) {
whismanoid 33:2c675744a01b 3491 // call-tinytester-function
whismanoid 33:2c675744a01b 3492 // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV"
whismanoid 33:2c675744a01b 3493 // docTest_argList = ""
whismanoid 33:2c675744a01b 3494 tinyTester.AnalogIn1_Read_Report_voltageV(); //
whismanoid 33:2c675744a01b 3495 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3496 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3497 } // if (SelfTestGroupEnable & 0x0020)
whismanoid 33:2c675744a01b 3498 #endif // MAX5719_SELFTEST_CODE_LOAD_4V1 // group CODE_LOAD_4V1
whismanoid 33:2c675744a01b 3499
whismanoid 32:016a142143a5 3500 // @test group DACCodeOfVoltage // Verify function DACCodeOfVoltage (enabled by default) (no run on button)
whismanoid 25:9d4012b0887f 3501 // @test group DACCodeOfVoltage tinyTester.blink_time_msec = 20 // quickly speed through the software verification
whismanoid 25:9d4012b0887f 3502 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 25:9d4012b0887f 3503 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3504 // docTest_item['action'] = 'tinyTester.blink_time_msec = 20'
whismanoid 25:9d4012b0887f 3505 // docTest_item['remarks'] = 'quickly speed through the software verification'
whismanoid 25:9d4012b0887f 3506 // docTest_item['propName'] = 'tinyTester.blink_time_msec'
whismanoid 25:9d4012b0887f 3507 // docTest_item['propValue'] = '20'
whismanoid 25:9d4012b0887f 3508 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None quickly speed through the software verification
whismanoid 33:2c675744a01b 3509 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 3510 // assign-propname-value
whismanoid 25:9d4012b0887f 3511 // tinyTesterPropName = "tinyTester.blink_time_msec"
whismanoid 25:9d4012b0887f 3512 // tinyTesterPropValue = "20"
whismanoid 25:9d4012b0887f 3513 tinyTester.blink_time_msec = 20;
whismanoid 30:13fc9d492ee0 3514 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3515 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3516 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 3517 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 3518
whismanoid 25:9d4012b0887f 3519 // @test group DACCodeOfVoltage tinyTester.print("VRef = 4.096 MAX5719 20-bit LSB = 0.000004V = 3.90625uV")
whismanoid 25:9d4012b0887f 3520 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 3521 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3522 // docTest_item['action'] = 'tinyTester.print("VRef = 4.096 MAX5719 20-bit LSB = 0.000004V = 3.90625uV")'
whismanoid 25:9d4012b0887f 3523 // docTest_item['arglist'] = 'VRef = 4.096 MAX5719 20-bit LSB = 0.000004V = 3.90625uV'
whismanoid 25:9d4012b0887f 3524 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None
whismanoid 33:2c675744a01b 3525 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 3526 // print-string
whismanoid 25:9d4012b0887f 3527 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 3528 // tinyTesterPrintStringLiteral = "VRef = 4.096 MAX5719 20-bit LSB = 0.000004V = 3.90625uV"
whismanoid 25:9d4012b0887f 3529 tinyTester.print("VRef = 4.096 MAX5719 20-bit LSB = 0.000004V = 3.90625uV");
whismanoid 30:13fc9d492ee0 3530 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3531 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3532 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 3533 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 3534
whismanoid 25:9d4012b0887f 3535 // @test group DACCodeOfVoltage VRef = 4.096
whismanoid 25:9d4012b0887f 3536 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 25:9d4012b0887f 3537 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3538 // docTest_item['action'] = 'VRef = 4.096'
whismanoid 25:9d4012b0887f 3539 // docTest_item['propName'] = 'VRef'
whismanoid 25:9d4012b0887f 3540 // docTest_item['propValue'] = '4.096'
whismanoid 25:9d4012b0887f 3541 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None
whismanoid 33:2c675744a01b 3542 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 3543 // assign-propname-value
whismanoid 25:9d4012b0887f 3544 // tinyTesterPropName = "VRef"
whismanoid 25:9d4012b0887f 3545 // tinyTesterPropValue = "4.096"
whismanoid 25:9d4012b0887f 3546 g_MAX5719_device.VRef = 4.096;
whismanoid 30:13fc9d492ee0 3547 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3548 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3549 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 3550 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 3551
whismanoid 25:9d4012b0887f 3552 // @test group DACCodeOfVoltage tinyTester.print("test_voltage_sweep V = 0.000000V to 4.096000V precision 0.100000V step 0.500000V")
whismanoid 25:9d4012b0887f 3553 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 3554 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3555 // docTest_item['action'] = 'tinyTester.print("test_voltage_sweep V = 0.000000V to 4.096000V precision 0.100000V step 0.500000V")'
whismanoid 25:9d4012b0887f 3556 // docTest_item['arglist'] = 'test_voltage_sweep V = 0.000000V to 4.096000V precision 0.100000V step 0.500000V'
whismanoid 25:9d4012b0887f 3557 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None
whismanoid 33:2c675744a01b 3558 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 3559 // print-string
whismanoid 25:9d4012b0887f 3560 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 3561 // tinyTesterPrintStringLiteral = "test_voltage_sweep V = 0.000000V to 4.096000V precision 0.100000V step 0.500000V"
whismanoid 25:9d4012b0887f 3562 tinyTester.print("test_voltage_sweep V = 0.000000V to 4.096000V precision 0.100000V step 0.500000V");
whismanoid 30:13fc9d492ee0 3563 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3564 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3565 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 3566 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 3567
whismanoid 25:9d4012b0887f 3568 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.000000) expect 0x000000 // 0.000V
whismanoid 25:9d4012b0887f 3569 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 3570 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3571 // docTest_item['action'] = 'DACCodeOfVoltage(0.000000) expect 0x000000'
whismanoid 25:9d4012b0887f 3572 // docTest_item['remarks'] = '0.000V'
whismanoid 25:9d4012b0887f 3573 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3574 // docTest_item['arglist'] = '0.000000'
whismanoid 25:9d4012b0887f 3575 // docTest_item['expect-value'] = '0x000000'
whismanoid 25:9d4012b0887f 3576 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V
whismanoid 33:2c675744a01b 3577 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 3578 // call-function
whismanoid 27:485b1b2f334c 3579 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 3580 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.000000), (uint32_t)0x000000); // 0.000V
whismanoid 25:9d4012b0887f 3581 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.000000, /* expect: */ (uint32_t)0x000000); // 0.000V
whismanoid 30:13fc9d492ee0 3582 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3583 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3584 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 33:2c675744a01b 3585 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 33:2c675744a01b 3586
whismanoid 33:2c675744a01b 3587 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.500000) expect 0x01f400 // 0.500V
whismanoid 33:2c675744a01b 3588 // docTest_item['actionType'] = 'call-function'
whismanoid 33:2c675744a01b 3589 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3590 // docTest_item['action'] = 'DACCodeOfVoltage(0.500000) expect 0x01f400'
whismanoid 33:2c675744a01b 3591 // docTest_item['remarks'] = '0.500V'
whismanoid 33:2c675744a01b 3592 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3593 // docTest_item['arglist'] = '0.500000'
whismanoid 33:2c675744a01b 3594 // docTest_item['expect-value'] = '0x01f400'
whismanoid 33:2c675744a01b 3595 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.500V
whismanoid 33:2c675744a01b 3596 if (SelfTestGroupEnable & 0x0040) {
whismanoid 33:2c675744a01b 3597 // call-function
whismanoid 33:2c675744a01b 3598 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 33:2c675744a01b 3599 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.500000), (uint32_t)0x01f400); // 0.500V
whismanoid 33:2c675744a01b 3600 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.500000, /* expect: */ (uint32_t)0x01f400); // 0.500V
whismanoid 33:2c675744a01b 3601 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3602 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3603 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 33:2c675744a01b 3604 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 33:2c675744a01b 3605
whismanoid 33:2c675744a01b 3606 // @test group DACCodeOfVoltage DACCodeOfVoltage(1.000000) expect 0x03e800 // 1.000V
whismanoid 33:2c675744a01b 3607 // docTest_item['actionType'] = 'call-function'
whismanoid 33:2c675744a01b 3608 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3609 // docTest_item['action'] = 'DACCodeOfVoltage(1.000000) expect 0x03e800'
whismanoid 33:2c675744a01b 3610 // docTest_item['remarks'] = '1.000V'
whismanoid 33:2c675744a01b 3611 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3612 // docTest_item['arglist'] = '1.000000'
whismanoid 33:2c675744a01b 3613 // docTest_item['expect-value'] = '0x03e800'
whismanoid 33:2c675744a01b 3614 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.000V
whismanoid 33:2c675744a01b 3615 if (SelfTestGroupEnable & 0x0040) {
whismanoid 33:2c675744a01b 3616 // call-function
whismanoid 33:2c675744a01b 3617 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 33:2c675744a01b 3618 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.000000), (uint32_t)0x03e800); // 1.000V
whismanoid 33:2c675744a01b 3619 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.000000, /* expect: */ (uint32_t)0x03e800); // 1.000V
whismanoid 33:2c675744a01b 3620 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3621 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3622 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 33:2c675744a01b 3623 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 33:2c675744a01b 3624
whismanoid 33:2c675744a01b 3625 // @test group DACCodeOfVoltage DACCodeOfVoltage(1.500000) expect 0x05dc00 // 1.500V
whismanoid 33:2c675744a01b 3626 // docTest_item['actionType'] = 'call-function'
whismanoid 33:2c675744a01b 3627 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3628 // docTest_item['action'] = 'DACCodeOfVoltage(1.500000) expect 0x05dc00'
whismanoid 33:2c675744a01b 3629 // docTest_item['remarks'] = '1.500V'
whismanoid 33:2c675744a01b 3630 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3631 // docTest_item['arglist'] = '1.500000'
whismanoid 33:2c675744a01b 3632 // docTest_item['expect-value'] = '0x05dc00'
whismanoid 33:2c675744a01b 3633 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.500V
whismanoid 33:2c675744a01b 3634 if (SelfTestGroupEnable & 0x0040) {
whismanoid 33:2c675744a01b 3635 // call-function
whismanoid 33:2c675744a01b 3636 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 33:2c675744a01b 3637 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.500000), (uint32_t)0x05dc00); // 1.500V
whismanoid 33:2c675744a01b 3638 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.500000, /* expect: */ (uint32_t)0x05dc00); // 1.500V
whismanoid 33:2c675744a01b 3639 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3640 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3641 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 33:2c675744a01b 3642 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 33:2c675744a01b 3643
whismanoid 33:2c675744a01b 3644 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.000000) expect 0x07d000 // 2.000V
whismanoid 33:2c675744a01b 3645 // docTest_item['actionType'] = 'call-function'
whismanoid 33:2c675744a01b 3646 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3647 // docTest_item['action'] = 'DACCodeOfVoltage(2.000000) expect 0x07d000'
whismanoid 33:2c675744a01b 3648 // docTest_item['remarks'] = '2.000V'
whismanoid 33:2c675744a01b 3649 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3650 // docTest_item['arglist'] = '2.000000'
whismanoid 33:2c675744a01b 3651 // docTest_item['expect-value'] = '0x07d000'
whismanoid 33:2c675744a01b 3652 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.000V
whismanoid 33:2c675744a01b 3653 if (SelfTestGroupEnable & 0x0040) {
whismanoid 33:2c675744a01b 3654 // call-function
whismanoid 33:2c675744a01b 3655 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 33:2c675744a01b 3656 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.000000), (uint32_t)0x07d000); // 2.000V
whismanoid 33:2c675744a01b 3657 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.000000, /* expect: */ (uint32_t)0x07d000); // 2.000V
whismanoid 33:2c675744a01b 3658 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3659 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3660 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 33:2c675744a01b 3661 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 33:2c675744a01b 3662
whismanoid 33:2c675744a01b 3663 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.500000) expect 0x09c400 // 2.500V
whismanoid 33:2c675744a01b 3664 // docTest_item['actionType'] = 'call-function'
whismanoid 33:2c675744a01b 3665 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3666 // docTest_item['action'] = 'DACCodeOfVoltage(2.500000) expect 0x09c400'
whismanoid 33:2c675744a01b 3667 // docTest_item['remarks'] = '2.500V'
whismanoid 33:2c675744a01b 3668 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3669 // docTest_item['arglist'] = '2.500000'
whismanoid 33:2c675744a01b 3670 // docTest_item['expect-value'] = '0x09c400'
whismanoid 33:2c675744a01b 3671 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.500V
whismanoid 33:2c675744a01b 3672 if (SelfTestGroupEnable & 0x0040) {
whismanoid 33:2c675744a01b 3673 // call-function
whismanoid 33:2c675744a01b 3674 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 33:2c675744a01b 3675 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.500000), (uint32_t)0x09c400); // 2.500V
whismanoid 33:2c675744a01b 3676 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.500000, /* expect: */ (uint32_t)0x09c400); // 2.500V
whismanoid 33:2c675744a01b 3677 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3678 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3679 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 33:2c675744a01b 3680 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 33:2c675744a01b 3681
whismanoid 33:2c675744a01b 3682 // @test group DACCodeOfVoltage DACCodeOfVoltage(3.000000) expect 0x0bb800 // 3.000V
whismanoid 33:2c675744a01b 3683 // docTest_item['actionType'] = 'call-function'
whismanoid 33:2c675744a01b 3684 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3685 // docTest_item['action'] = 'DACCodeOfVoltage(3.000000) expect 0x0bb800'
whismanoid 33:2c675744a01b 3686 // docTest_item['remarks'] = '3.000V'
whismanoid 33:2c675744a01b 3687 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3688 // docTest_item['arglist'] = '3.000000'
whismanoid 33:2c675744a01b 3689 // docTest_item['expect-value'] = '0x0bb800'
whismanoid 33:2c675744a01b 3690 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.000V
whismanoid 33:2c675744a01b 3691 if (SelfTestGroupEnable & 0x0040) {
whismanoid 33:2c675744a01b 3692 // call-function
whismanoid 33:2c675744a01b 3693 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 33:2c675744a01b 3694 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.000000), (uint32_t)0x0bb800); // 3.000V
whismanoid 33:2c675744a01b 3695 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.000000, /* expect: */ (uint32_t)0x0bb800); // 3.000V
whismanoid 33:2c675744a01b 3696 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3697 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3698 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 33:2c675744a01b 3699 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 33:2c675744a01b 3700
whismanoid 33:2c675744a01b 3701 // @test group DACCodeOfVoltage DACCodeOfVoltage(3.500000) expect 0x0dac00 // 3.500V
whismanoid 33:2c675744a01b 3702 // docTest_item['actionType'] = 'call-function'
whismanoid 33:2c675744a01b 3703 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3704 // docTest_item['action'] = 'DACCodeOfVoltage(3.500000) expect 0x0dac00'
whismanoid 33:2c675744a01b 3705 // docTest_item['remarks'] = '3.500V'
whismanoid 33:2c675744a01b 3706 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3707 // docTest_item['arglist'] = '3.500000'
whismanoid 33:2c675744a01b 3708 // docTest_item['expect-value'] = '0x0dac00'
whismanoid 33:2c675744a01b 3709 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.500V
whismanoid 33:2c675744a01b 3710 if (SelfTestGroupEnable & 0x0040) {
whismanoid 33:2c675744a01b 3711 // call-function
whismanoid 33:2c675744a01b 3712 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 33:2c675744a01b 3713 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.500000), (uint32_t)0x0dac00); // 3.500V
whismanoid 33:2c675744a01b 3714 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.500000, /* expect: */ (uint32_t)0x0dac00); // 3.500V
whismanoid 33:2c675744a01b 3715 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3716 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3717 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 33:2c675744a01b 3718 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 33:2c675744a01b 3719
whismanoid 33:2c675744a01b 3720 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.000000) expect 0x0fa000 // 4.000V
whismanoid 33:2c675744a01b 3721 // docTest_item['actionType'] = 'call-function'
whismanoid 33:2c675744a01b 3722 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3723 // docTest_item['action'] = 'DACCodeOfVoltage(4.000000) expect 0x0fa000'
whismanoid 33:2c675744a01b 3724 // docTest_item['remarks'] = '4.000V'
whismanoid 33:2c675744a01b 3725 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3726 // docTest_item['arglist'] = '4.000000'
whismanoid 33:2c675744a01b 3727 // docTest_item['expect-value'] = '0x0fa000'
whismanoid 33:2c675744a01b 3728 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.000V
whismanoid 33:2c675744a01b 3729 if (SelfTestGroupEnable & 0x0040) {
whismanoid 33:2c675744a01b 3730 // call-function
whismanoid 33:2c675744a01b 3731 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 33:2c675744a01b 3732 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.000000), (uint32_t)0x0fa000); // 4.000V
whismanoid 33:2c675744a01b 3733 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.000000, /* expect: */ (uint32_t)0x0fa000); // 4.000V
whismanoid 33:2c675744a01b 3734 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3735 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3736 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 33:2c675744a01b 3737 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 33:2c675744a01b 3738
whismanoid 33:2c675744a01b 3739 // @test group DACCodeOfVoltage tinyTester.print("test_voltage_sweep V = -0.010000V to 0.100000V precision 0.010000V step 0.010000V")
whismanoid 33:2c675744a01b 3740 // docTest_item['actionType'] = 'print-string'
whismanoid 33:2c675744a01b 3741 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3742 // docTest_item['action'] = 'tinyTester.print("test_voltage_sweep V = -0.010000V to 0.100000V precision 0.010000V step 0.010000V")'
whismanoid 33:2c675744a01b 3743 // docTest_item['arglist'] = 'test_voltage_sweep V = -0.010000V to 0.100000V precision 0.010000V step 0.010000V'
whismanoid 33:2c675744a01b 3744 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None
whismanoid 33:2c675744a01b 3745 if (SelfTestGroupEnable & 0x0040) {
whismanoid 33:2c675744a01b 3746 // print-string
whismanoid 33:2c675744a01b 3747 // tinyTesterFuncName = "tinyTester.print"
whismanoid 33:2c675744a01b 3748 // tinyTesterPrintStringLiteral = "test_voltage_sweep V = -0.010000V to 0.100000V precision 0.010000V step 0.010000V"
whismanoid 33:2c675744a01b 3749 tinyTester.print("test_voltage_sweep V = -0.010000V to 0.100000V precision 0.010000V step 0.010000V");
whismanoid 33:2c675744a01b 3750 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3751 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3752 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 33:2c675744a01b 3753 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 33:2c675744a01b 3754
whismanoid 33:2c675744a01b 3755 // @test group DACCodeOfVoltage DACCodeOfVoltage(-0.010000) expect 0x000000 // -0.010V
whismanoid 33:2c675744a01b 3756 // docTest_item['actionType'] = 'call-function'
whismanoid 33:2c675744a01b 3757 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3758 // docTest_item['action'] = 'DACCodeOfVoltage(-0.010000) expect 0x000000'
whismanoid 33:2c675744a01b 3759 // docTest_item['remarks'] = '-0.010V'
whismanoid 33:2c675744a01b 3760 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3761 // docTest_item['arglist'] = '-0.010000'
whismanoid 33:2c675744a01b 3762 // docTest_item['expect-value'] = '0x000000'
whismanoid 33:2c675744a01b 3763 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage -0.010V
whismanoid 33:2c675744a01b 3764 if (SelfTestGroupEnable & 0x0040) {
whismanoid 33:2c675744a01b 3765 // call-function
whismanoid 33:2c675744a01b 3766 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 33:2c675744a01b 3767 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)-0.010000), (uint32_t)0x000000); // -0.010V
whismanoid 33:2c675744a01b 3768 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)-0.010000, /* expect: */ (uint32_t)0x000000); // -0.010V
whismanoid 33:2c675744a01b 3769 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3770 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3771 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 33:2c675744a01b 3772 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 33:2c675744a01b 3773
whismanoid 33:2c675744a01b 3774 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.000000) expect 0x000000 // 0.000V
whismanoid 33:2c675744a01b 3775 // docTest_item['actionType'] = 'call-function'
whismanoid 33:2c675744a01b 3776 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3777 // docTest_item['action'] = 'DACCodeOfVoltage(0.000000) expect 0x000000'
whismanoid 33:2c675744a01b 3778 // docTest_item['remarks'] = '0.000V'
whismanoid 33:2c675744a01b 3779 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 33:2c675744a01b 3780 // docTest_item['arglist'] = '0.000000'
whismanoid 33:2c675744a01b 3781 // docTest_item['expect-value'] = '0x000000'
whismanoid 33:2c675744a01b 3782 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V
whismanoid 33:2c675744a01b 3783 if (SelfTestGroupEnable & 0x0040) {
whismanoid 33:2c675744a01b 3784 // call-function
whismanoid 33:2c675744a01b 3785 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 33:2c675744a01b 3786 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.000000), (uint32_t)0x000000); // 0.000V
whismanoid 33:2c675744a01b 3787 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.000000, /* expect: */ (uint32_t)0x000000); // 0.000V
whismanoid 33:2c675744a01b 3788 // halt-on-first-failure logic
whismanoid 33:2c675744a01b 3789 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3790 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 3791 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 3792
whismanoid 25:9d4012b0887f 3793 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.010000) expect 0x000a00 // 0.010V
whismanoid 25:9d4012b0887f 3794 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 3795 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3796 // docTest_item['action'] = 'DACCodeOfVoltage(0.010000) expect 0x000a00'
whismanoid 25:9d4012b0887f 3797 // docTest_item['remarks'] = '0.010V'
whismanoid 25:9d4012b0887f 3798 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3799 // docTest_item['arglist'] = '0.010000'
whismanoid 25:9d4012b0887f 3800 // docTest_item['expect-value'] = '0x000a00'
whismanoid 25:9d4012b0887f 3801 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.010V
whismanoid 33:2c675744a01b 3802 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 3803 // call-function
whismanoid 27:485b1b2f334c 3804 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 3805 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.010000), (uint32_t)0x000a00); // 0.010V
whismanoid 25:9d4012b0887f 3806 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.010000, /* expect: */ (uint32_t)0x000a00); // 0.010V
whismanoid 30:13fc9d492ee0 3807 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3808 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3809 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 3810 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 3811
whismanoid 25:9d4012b0887f 3812 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.020000) expect 0x001400 // 0.020V
whismanoid 25:9d4012b0887f 3813 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 3814 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3815 // docTest_item['action'] = 'DACCodeOfVoltage(0.020000) expect 0x001400'
whismanoid 25:9d4012b0887f 3816 // docTest_item['remarks'] = '0.020V'
whismanoid 25:9d4012b0887f 3817 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3818 // docTest_item['arglist'] = '0.020000'
whismanoid 25:9d4012b0887f 3819 // docTest_item['expect-value'] = '0x001400'
whismanoid 25:9d4012b0887f 3820 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.020V
whismanoid 33:2c675744a01b 3821 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 3822 // call-function
whismanoid 27:485b1b2f334c 3823 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 3824 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.020000), (uint32_t)0x001400); // 0.020V
whismanoid 25:9d4012b0887f 3825 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.020000, /* expect: */ (uint32_t)0x001400); // 0.020V
whismanoid 30:13fc9d492ee0 3826 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3827 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3828 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 3829 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 3830
whismanoid 25:9d4012b0887f 3831 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.030000) expect 0x001e00 // 0.030V
whismanoid 25:9d4012b0887f 3832 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 3833 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3834 // docTest_item['action'] = 'DACCodeOfVoltage(0.030000) expect 0x001e00'
whismanoid 25:9d4012b0887f 3835 // docTest_item['remarks'] = '0.030V'
whismanoid 25:9d4012b0887f 3836 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3837 // docTest_item['arglist'] = '0.030000'
whismanoid 25:9d4012b0887f 3838 // docTest_item['expect-value'] = '0x001e00'
whismanoid 25:9d4012b0887f 3839 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.030V
whismanoid 33:2c675744a01b 3840 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 3841 // call-function
whismanoid 27:485b1b2f334c 3842 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 3843 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.030000), (uint32_t)0x001e00); // 0.030V
whismanoid 25:9d4012b0887f 3844 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.030000, /* expect: */ (uint32_t)0x001e00); // 0.030V
whismanoid 30:13fc9d492ee0 3845 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3846 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3847 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 3848 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 3849
whismanoid 25:9d4012b0887f 3850 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.040000) expect 0x002800 // 0.040V
whismanoid 25:9d4012b0887f 3851 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 3852 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3853 // docTest_item['action'] = 'DACCodeOfVoltage(0.040000) expect 0x002800'
whismanoid 25:9d4012b0887f 3854 // docTest_item['remarks'] = '0.040V'
whismanoid 25:9d4012b0887f 3855 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3856 // docTest_item['arglist'] = '0.040000'
whismanoid 25:9d4012b0887f 3857 // docTest_item['expect-value'] = '0x002800'
whismanoid 25:9d4012b0887f 3858 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.040V
whismanoid 33:2c675744a01b 3859 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 3860 // call-function
whismanoid 27:485b1b2f334c 3861 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 3862 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.040000), (uint32_t)0x002800); // 0.040V
whismanoid 25:9d4012b0887f 3863 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.040000, /* expect: */ (uint32_t)0x002800); // 0.040V
whismanoid 30:13fc9d492ee0 3864 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3865 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3866 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 3867 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 3868
whismanoid 25:9d4012b0887f 3869 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.050000) expect 0x003200 // 0.050V
whismanoid 25:9d4012b0887f 3870 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 3871 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3872 // docTest_item['action'] = 'DACCodeOfVoltage(0.050000) expect 0x003200'
whismanoid 25:9d4012b0887f 3873 // docTest_item['remarks'] = '0.050V'
whismanoid 25:9d4012b0887f 3874 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3875 // docTest_item['arglist'] = '0.050000'
whismanoid 25:9d4012b0887f 3876 // docTest_item['expect-value'] = '0x003200'
whismanoid 25:9d4012b0887f 3877 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.050V
whismanoid 33:2c675744a01b 3878 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 3879 // call-function
whismanoid 27:485b1b2f334c 3880 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 3881 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.050000), (uint32_t)0x003200); // 0.050V
whismanoid 25:9d4012b0887f 3882 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.050000, /* expect: */ (uint32_t)0x003200); // 0.050V
whismanoid 30:13fc9d492ee0 3883 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3884 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3885 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 3886 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 3887
whismanoid 25:9d4012b0887f 3888 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.060000) expect 0x003c00 // 0.060V
whismanoid 25:9d4012b0887f 3889 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 3890 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3891 // docTest_item['action'] = 'DACCodeOfVoltage(0.060000) expect 0x003c00'
whismanoid 25:9d4012b0887f 3892 // docTest_item['remarks'] = '0.060V'
whismanoid 25:9d4012b0887f 3893 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3894 // docTest_item['arglist'] = '0.060000'
whismanoid 25:9d4012b0887f 3895 // docTest_item['expect-value'] = '0x003c00'
whismanoid 25:9d4012b0887f 3896 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.060V
whismanoid 33:2c675744a01b 3897 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 3898 // call-function
whismanoid 27:485b1b2f334c 3899 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 3900 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.060000), (uint32_t)0x003c00); // 0.060V
whismanoid 25:9d4012b0887f 3901 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.060000, /* expect: */ (uint32_t)0x003c00); // 0.060V
whismanoid 30:13fc9d492ee0 3902 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3903 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3904 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 3905 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 3906
whismanoid 25:9d4012b0887f 3907 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.070000) expect 0x004600 // 0.070V
whismanoid 25:9d4012b0887f 3908 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 3909 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3910 // docTest_item['action'] = 'DACCodeOfVoltage(0.070000) expect 0x004600'
whismanoid 25:9d4012b0887f 3911 // docTest_item['remarks'] = '0.070V'
whismanoid 25:9d4012b0887f 3912 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3913 // docTest_item['arglist'] = '0.070000'
whismanoid 25:9d4012b0887f 3914 // docTest_item['expect-value'] = '0x004600'
whismanoid 25:9d4012b0887f 3915 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.070V
whismanoid 33:2c675744a01b 3916 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 3917 // call-function
whismanoid 27:485b1b2f334c 3918 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 3919 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.070000), (uint32_t)0x004600); // 0.070V
whismanoid 25:9d4012b0887f 3920 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.070000, /* expect: */ (uint32_t)0x004600); // 0.070V
whismanoid 30:13fc9d492ee0 3921 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3922 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3923 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 3924 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 3925
whismanoid 25:9d4012b0887f 3926 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.080000) expect 0x005000 // 0.080V
whismanoid 25:9d4012b0887f 3927 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 3928 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3929 // docTest_item['action'] = 'DACCodeOfVoltage(0.080000) expect 0x005000'
whismanoid 25:9d4012b0887f 3930 // docTest_item['remarks'] = '0.080V'
whismanoid 25:9d4012b0887f 3931 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3932 // docTest_item['arglist'] = '0.080000'
whismanoid 25:9d4012b0887f 3933 // docTest_item['expect-value'] = '0x005000'
whismanoid 25:9d4012b0887f 3934 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.080V
whismanoid 33:2c675744a01b 3935 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 3936 // call-function
whismanoid 27:485b1b2f334c 3937 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 3938 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.080000), (uint32_t)0x005000); // 0.080V
whismanoid 25:9d4012b0887f 3939 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.080000, /* expect: */ (uint32_t)0x005000); // 0.080V
whismanoid 30:13fc9d492ee0 3940 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3941 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3942 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 3943 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 3944
whismanoid 25:9d4012b0887f 3945 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.090000) expect 0x005a00 // 0.090V
whismanoid 25:9d4012b0887f 3946 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 3947 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3948 // docTest_item['action'] = 'DACCodeOfVoltage(0.090000) expect 0x005a00'
whismanoid 25:9d4012b0887f 3949 // docTest_item['remarks'] = '0.090V'
whismanoid 25:9d4012b0887f 3950 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3951 // docTest_item['arglist'] = '0.090000'
whismanoid 25:9d4012b0887f 3952 // docTest_item['expect-value'] = '0x005a00'
whismanoid 25:9d4012b0887f 3953 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.090V
whismanoid 33:2c675744a01b 3954 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 3955 // call-function
whismanoid 27:485b1b2f334c 3956 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 3957 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.090000), (uint32_t)0x005a00); // 0.090V
whismanoid 25:9d4012b0887f 3958 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.090000, /* expect: */ (uint32_t)0x005a00); // 0.090V
whismanoid 30:13fc9d492ee0 3959 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3960 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3961 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 3962 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 3963
whismanoid 25:9d4012b0887f 3964 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.100000) expect 0x006400 // 0.100V
whismanoid 25:9d4012b0887f 3965 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 3966 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3967 // docTest_item['action'] = 'DACCodeOfVoltage(0.100000) expect 0x006400'
whismanoid 25:9d4012b0887f 3968 // docTest_item['remarks'] = '0.100V'
whismanoid 25:9d4012b0887f 3969 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3970 // docTest_item['arglist'] = '0.100000'
whismanoid 25:9d4012b0887f 3971 // docTest_item['expect-value'] = '0x006400'
whismanoid 25:9d4012b0887f 3972 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.100V
whismanoid 33:2c675744a01b 3973 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 3974 // call-function
whismanoid 27:485b1b2f334c 3975 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 3976 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.100000), (uint32_t)0x006400); // 0.100V
whismanoid 25:9d4012b0887f 3977 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.100000, /* expect: */ (uint32_t)0x006400); // 0.100V
whismanoid 30:13fc9d492ee0 3978 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3979 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3980 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 3981 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 3982
whismanoid 25:9d4012b0887f 3983 // @test group DACCodeOfVoltage tinyTester.print("test_voltage_sweep V = 2.047900V to 2.048100V precision 0.000010V step 0.000010V")
whismanoid 25:9d4012b0887f 3984 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 3985 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 3986 // docTest_item['action'] = 'tinyTester.print("test_voltage_sweep V = 2.047900V to 2.048100V precision 0.000010V step 0.000010V")'
whismanoid 25:9d4012b0887f 3987 // docTest_item['arglist'] = 'test_voltage_sweep V = 2.047900V to 2.048100V precision 0.000010V step 0.000010V'
whismanoid 25:9d4012b0887f 3988 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None
whismanoid 33:2c675744a01b 3989 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 3990 // print-string
whismanoid 25:9d4012b0887f 3991 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 3992 // tinyTesterPrintStringLiteral = "test_voltage_sweep V = 2.047900V to 2.048100V precision 0.000010V step 0.000010V"
whismanoid 25:9d4012b0887f 3993 tinyTester.print("test_voltage_sweep V = 2.047900V to 2.048100V precision 0.000010V step 0.000010V");
whismanoid 30:13fc9d492ee0 3994 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 3995 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 3996 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 3997 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 3998
whismanoid 25:9d4012b0887f 3999 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047890) expect 0x07ffe4 // 2.048V
whismanoid 25:9d4012b0887f 4000 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4001 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4002 // docTest_item['action'] = 'DACCodeOfVoltage(2.047890) expect 0x07ffe4'
whismanoid 25:9d4012b0887f 4003 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4004 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4005 // docTest_item['arglist'] = '2.047890'
whismanoid 25:9d4012b0887f 4006 // docTest_item['expect-value'] = '0x07ffe4'
whismanoid 25:9d4012b0887f 4007 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4008 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4009 // call-function
whismanoid 27:485b1b2f334c 4010 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4011 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047890), (uint32_t)0x07ffe4); // 2.048V
whismanoid 25:9d4012b0887f 4012 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047890, /* expect: */ (uint32_t)0x07ffe4); // 2.048V
whismanoid 30:13fc9d492ee0 4013 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4014 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4015 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4016 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4017
whismanoid 25:9d4012b0887f 4018 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047900) expect 0x07ffe6 // 2.048V
whismanoid 25:9d4012b0887f 4019 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4020 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4021 // docTest_item['action'] = 'DACCodeOfVoltage(2.047900) expect 0x07ffe6'
whismanoid 25:9d4012b0887f 4022 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4023 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4024 // docTest_item['arglist'] = '2.047900'
whismanoid 25:9d4012b0887f 4025 // docTest_item['expect-value'] = '0x07ffe6'
whismanoid 25:9d4012b0887f 4026 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4027 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4028 // call-function
whismanoid 27:485b1b2f334c 4029 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4030 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047900), (uint32_t)0x07ffe6); // 2.048V
whismanoid 25:9d4012b0887f 4031 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047900, /* expect: */ (uint32_t)0x07ffe6); // 2.048V
whismanoid 30:13fc9d492ee0 4032 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4033 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4034 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4035 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4036
whismanoid 25:9d4012b0887f 4037 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047910) expect 0x07ffe9 // 2.048V
whismanoid 25:9d4012b0887f 4038 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4039 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4040 // docTest_item['action'] = 'DACCodeOfVoltage(2.047910) expect 0x07ffe9'
whismanoid 25:9d4012b0887f 4041 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4042 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4043 // docTest_item['arglist'] = '2.047910'
whismanoid 25:9d4012b0887f 4044 // docTest_item['expect-value'] = '0x07ffe9'
whismanoid 25:9d4012b0887f 4045 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4046 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4047 // call-function
whismanoid 27:485b1b2f334c 4048 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4049 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047910), (uint32_t)0x07ffe9); // 2.048V
whismanoid 25:9d4012b0887f 4050 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047910, /* expect: */ (uint32_t)0x07ffe9); // 2.048V
whismanoid 30:13fc9d492ee0 4051 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4052 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4053 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4054 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4055
whismanoid 25:9d4012b0887f 4056 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047920) expect 0x07ffec // 2.048V
whismanoid 25:9d4012b0887f 4057 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4058 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4059 // docTest_item['action'] = 'DACCodeOfVoltage(2.047920) expect 0x07ffec'
whismanoid 25:9d4012b0887f 4060 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4061 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4062 // docTest_item['arglist'] = '2.047920'
whismanoid 25:9d4012b0887f 4063 // docTest_item['expect-value'] = '0x07ffec'
whismanoid 25:9d4012b0887f 4064 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4065 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4066 // call-function
whismanoid 27:485b1b2f334c 4067 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4068 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047920), (uint32_t)0x07ffec); // 2.048V
whismanoid 25:9d4012b0887f 4069 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047920, /* expect: */ (uint32_t)0x07ffec); // 2.048V
whismanoid 30:13fc9d492ee0 4070 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4071 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4072 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4073 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4074
whismanoid 25:9d4012b0887f 4075 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047930) expect 0x07ffee // 2.048V
whismanoid 25:9d4012b0887f 4076 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4077 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4078 // docTest_item['action'] = 'DACCodeOfVoltage(2.047930) expect 0x07ffee'
whismanoid 25:9d4012b0887f 4079 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4080 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4081 // docTest_item['arglist'] = '2.047930'
whismanoid 25:9d4012b0887f 4082 // docTest_item['expect-value'] = '0x07ffee'
whismanoid 25:9d4012b0887f 4083 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4084 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4085 // call-function
whismanoid 27:485b1b2f334c 4086 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4087 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047930), (uint32_t)0x07ffee); // 2.048V
whismanoid 25:9d4012b0887f 4088 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047930, /* expect: */ (uint32_t)0x07ffee); // 2.048V
whismanoid 30:13fc9d492ee0 4089 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4090 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4091 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4092 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4093
whismanoid 25:9d4012b0887f 4094 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047940) expect 0x07fff1 // 2.048V
whismanoid 25:9d4012b0887f 4095 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4096 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4097 // docTest_item['action'] = 'DACCodeOfVoltage(2.047940) expect 0x07fff1'
whismanoid 25:9d4012b0887f 4098 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4099 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4100 // docTest_item['arglist'] = '2.047940'
whismanoid 25:9d4012b0887f 4101 // docTest_item['expect-value'] = '0x07fff1'
whismanoid 25:9d4012b0887f 4102 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4103 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4104 // call-function
whismanoid 27:485b1b2f334c 4105 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4106 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047940), (uint32_t)0x07fff1); // 2.048V
whismanoid 25:9d4012b0887f 4107 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047940, /* expect: */ (uint32_t)0x07fff1); // 2.048V
whismanoid 30:13fc9d492ee0 4108 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4109 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4110 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4111 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4112
whismanoid 25:9d4012b0887f 4113 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047950) expect 0x07fff3 // 2.048V
whismanoid 25:9d4012b0887f 4114 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4115 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4116 // docTest_item['action'] = 'DACCodeOfVoltage(2.047950) expect 0x07fff3'
whismanoid 25:9d4012b0887f 4117 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4118 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4119 // docTest_item['arglist'] = '2.047950'
whismanoid 25:9d4012b0887f 4120 // docTest_item['expect-value'] = '0x07fff3'
whismanoid 25:9d4012b0887f 4121 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4122 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4123 // call-function
whismanoid 27:485b1b2f334c 4124 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4125 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047950), (uint32_t)0x07fff3); // 2.048V
whismanoid 25:9d4012b0887f 4126 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047950, /* expect: */ (uint32_t)0x07fff3); // 2.048V
whismanoid 30:13fc9d492ee0 4127 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4128 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4129 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4130 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4131
whismanoid 25:9d4012b0887f 4132 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047960) expect 0x07fff6 // 2.048V
whismanoid 25:9d4012b0887f 4133 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4134 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4135 // docTest_item['action'] = 'DACCodeOfVoltage(2.047960) expect 0x07fff6'
whismanoid 25:9d4012b0887f 4136 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4137 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4138 // docTest_item['arglist'] = '2.047960'
whismanoid 25:9d4012b0887f 4139 // docTest_item['expect-value'] = '0x07fff6'
whismanoid 25:9d4012b0887f 4140 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4141 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4142 // call-function
whismanoid 27:485b1b2f334c 4143 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4144 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047960), (uint32_t)0x07fff6); // 2.048V
whismanoid 25:9d4012b0887f 4145 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047960, /* expect: */ (uint32_t)0x07fff6); // 2.048V
whismanoid 30:13fc9d492ee0 4146 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4147 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4148 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4149 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4150
whismanoid 25:9d4012b0887f 4151 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047970) expect 0x07fff8 // 2.048V
whismanoid 25:9d4012b0887f 4152 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4153 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4154 // docTest_item['action'] = 'DACCodeOfVoltage(2.047970) expect 0x07fff8'
whismanoid 25:9d4012b0887f 4155 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4156 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4157 // docTest_item['arglist'] = '2.047970'
whismanoid 25:9d4012b0887f 4158 // docTest_item['expect-value'] = '0x07fff8'
whismanoid 25:9d4012b0887f 4159 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4160 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4161 // call-function
whismanoid 27:485b1b2f334c 4162 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4163 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047970), (uint32_t)0x07fff8); // 2.048V
whismanoid 25:9d4012b0887f 4164 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047970, /* expect: */ (uint32_t)0x07fff8); // 2.048V
whismanoid 30:13fc9d492ee0 4165 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4166 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4167 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4168 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4169
whismanoid 25:9d4012b0887f 4170 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047980) expect 0x07fffb // 2.048V
whismanoid 25:9d4012b0887f 4171 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4172 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4173 // docTest_item['action'] = 'DACCodeOfVoltage(2.047980) expect 0x07fffb'
whismanoid 25:9d4012b0887f 4174 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4175 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4176 // docTest_item['arglist'] = '2.047980'
whismanoid 25:9d4012b0887f 4177 // docTest_item['expect-value'] = '0x07fffb'
whismanoid 25:9d4012b0887f 4178 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4179 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4180 // call-function
whismanoid 27:485b1b2f334c 4181 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4182 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047980), (uint32_t)0x07fffb); // 2.048V
whismanoid 25:9d4012b0887f 4183 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047980, /* expect: */ (uint32_t)0x07fffb); // 2.048V
whismanoid 30:13fc9d492ee0 4184 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4185 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4186 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4187 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4188
whismanoid 25:9d4012b0887f 4189 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047990) expect 0x07fffd // 2.048V
whismanoid 25:9d4012b0887f 4190 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4191 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4192 // docTest_item['action'] = 'DACCodeOfVoltage(2.047990) expect 0x07fffd'
whismanoid 25:9d4012b0887f 4193 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4194 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4195 // docTest_item['arglist'] = '2.047990'
whismanoid 25:9d4012b0887f 4196 // docTest_item['expect-value'] = '0x07fffd'
whismanoid 25:9d4012b0887f 4197 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4198 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4199 // call-function
whismanoid 27:485b1b2f334c 4200 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4201 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047990), (uint32_t)0x07fffd); // 2.048V
whismanoid 25:9d4012b0887f 4202 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047990, /* expect: */ (uint32_t)0x07fffd); // 2.048V
whismanoid 30:13fc9d492ee0 4203 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4204 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4205 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4206 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4207
whismanoid 25:9d4012b0887f 4208 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048000) expect 0x080000 // 2.048V
whismanoid 25:9d4012b0887f 4209 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4210 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4211 // docTest_item['action'] = 'DACCodeOfVoltage(2.048000) expect 0x080000'
whismanoid 25:9d4012b0887f 4212 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4213 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4214 // docTest_item['arglist'] = '2.048000'
whismanoid 25:9d4012b0887f 4215 // docTest_item['expect-value'] = '0x080000'
whismanoid 25:9d4012b0887f 4216 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4217 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4218 // call-function
whismanoid 27:485b1b2f334c 4219 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4220 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048000), (uint32_t)0x080000); // 2.048V
whismanoid 25:9d4012b0887f 4221 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048000, /* expect: */ (uint32_t)0x080000); // 2.048V
whismanoid 30:13fc9d492ee0 4222 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4223 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4224 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4225 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4226
whismanoid 25:9d4012b0887f 4227 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048010) expect 0x080003 // 2.048V
whismanoid 25:9d4012b0887f 4228 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4229 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4230 // docTest_item['action'] = 'DACCodeOfVoltage(2.048010) expect 0x080003'
whismanoid 25:9d4012b0887f 4231 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4232 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4233 // docTest_item['arglist'] = '2.048010'
whismanoid 25:9d4012b0887f 4234 // docTest_item['expect-value'] = '0x080003'
whismanoid 25:9d4012b0887f 4235 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4236 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4237 // call-function
whismanoid 27:485b1b2f334c 4238 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4239 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048010), (uint32_t)0x080003); // 2.048V
whismanoid 25:9d4012b0887f 4240 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048010, /* expect: */ (uint32_t)0x080003); // 2.048V
whismanoid 30:13fc9d492ee0 4241 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4242 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4243 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4244 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4245
whismanoid 25:9d4012b0887f 4246 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048020) expect 0x080005 // 2.048V
whismanoid 25:9d4012b0887f 4247 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4248 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4249 // docTest_item['action'] = 'DACCodeOfVoltage(2.048020) expect 0x080005'
whismanoid 25:9d4012b0887f 4250 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4251 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4252 // docTest_item['arglist'] = '2.048020'
whismanoid 25:9d4012b0887f 4253 // docTest_item['expect-value'] = '0x080005'
whismanoid 25:9d4012b0887f 4254 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4255 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4256 // call-function
whismanoid 27:485b1b2f334c 4257 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4258 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048020), (uint32_t)0x080005); // 2.048V
whismanoid 25:9d4012b0887f 4259 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048020, /* expect: */ (uint32_t)0x080005); // 2.048V
whismanoid 30:13fc9d492ee0 4260 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4261 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4262 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4263 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4264
whismanoid 25:9d4012b0887f 4265 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048030) expect 0x080008 // 2.048V
whismanoid 25:9d4012b0887f 4266 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4267 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4268 // docTest_item['action'] = 'DACCodeOfVoltage(2.048030) expect 0x080008'
whismanoid 25:9d4012b0887f 4269 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4270 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4271 // docTest_item['arglist'] = '2.048030'
whismanoid 25:9d4012b0887f 4272 // docTest_item['expect-value'] = '0x080008'
whismanoid 25:9d4012b0887f 4273 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4274 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4275 // call-function
whismanoid 27:485b1b2f334c 4276 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4277 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048030), (uint32_t)0x080008); // 2.048V
whismanoid 25:9d4012b0887f 4278 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048030, /* expect: */ (uint32_t)0x080008); // 2.048V
whismanoid 30:13fc9d492ee0 4279 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4280 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4281 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4282 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4283
whismanoid 25:9d4012b0887f 4284 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048040) expect 0x08000a // 2.048V
whismanoid 25:9d4012b0887f 4285 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4286 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4287 // docTest_item['action'] = 'DACCodeOfVoltage(2.048040) expect 0x08000a'
whismanoid 25:9d4012b0887f 4288 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4289 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4290 // docTest_item['arglist'] = '2.048040'
whismanoid 25:9d4012b0887f 4291 // docTest_item['expect-value'] = '0x08000a'
whismanoid 25:9d4012b0887f 4292 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4293 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4294 // call-function
whismanoid 27:485b1b2f334c 4295 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4296 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048040), (uint32_t)0x08000a); // 2.048V
whismanoid 25:9d4012b0887f 4297 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048040, /* expect: */ (uint32_t)0x08000a); // 2.048V
whismanoid 30:13fc9d492ee0 4298 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4299 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4300 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4301 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4302
whismanoid 25:9d4012b0887f 4303 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048050) expect 0x08000d // 2.048V
whismanoid 25:9d4012b0887f 4304 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4305 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4306 // docTest_item['action'] = 'DACCodeOfVoltage(2.048050) expect 0x08000d'
whismanoid 25:9d4012b0887f 4307 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4308 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4309 // docTest_item['arglist'] = '2.048050'
whismanoid 25:9d4012b0887f 4310 // docTest_item['expect-value'] = '0x08000d'
whismanoid 25:9d4012b0887f 4311 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4312 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4313 // call-function
whismanoid 27:485b1b2f334c 4314 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4315 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048050), (uint32_t)0x08000d); // 2.048V
whismanoid 25:9d4012b0887f 4316 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048050, /* expect: */ (uint32_t)0x08000d); // 2.048V
whismanoid 30:13fc9d492ee0 4317 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4318 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4319 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4320 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4321
whismanoid 25:9d4012b0887f 4322 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048060) expect 0x08000f // 2.048V
whismanoid 25:9d4012b0887f 4323 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4324 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4325 // docTest_item['action'] = 'DACCodeOfVoltage(2.048060) expect 0x08000f'
whismanoid 25:9d4012b0887f 4326 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4327 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4328 // docTest_item['arglist'] = '2.048060'
whismanoid 25:9d4012b0887f 4329 // docTest_item['expect-value'] = '0x08000f'
whismanoid 25:9d4012b0887f 4330 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4331 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4332 // call-function
whismanoid 27:485b1b2f334c 4333 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4334 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048060), (uint32_t)0x08000f); // 2.048V
whismanoid 25:9d4012b0887f 4335 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048060, /* expect: */ (uint32_t)0x08000f); // 2.048V
whismanoid 30:13fc9d492ee0 4336 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4337 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4338 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4339 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4340
whismanoid 25:9d4012b0887f 4341 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048070) expect 0x080012 // 2.048V
whismanoid 25:9d4012b0887f 4342 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4343 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4344 // docTest_item['action'] = 'DACCodeOfVoltage(2.048070) expect 0x080012'
whismanoid 25:9d4012b0887f 4345 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4346 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4347 // docTest_item['arglist'] = '2.048070'
whismanoid 25:9d4012b0887f 4348 // docTest_item['expect-value'] = '0x080012'
whismanoid 25:9d4012b0887f 4349 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4350 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4351 // call-function
whismanoid 27:485b1b2f334c 4352 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4353 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048070), (uint32_t)0x080012); // 2.048V
whismanoid 25:9d4012b0887f 4354 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048070, /* expect: */ (uint32_t)0x080012); // 2.048V
whismanoid 30:13fc9d492ee0 4355 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4356 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4357 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4358 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4359
whismanoid 25:9d4012b0887f 4360 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048080) expect 0x080014 // 2.048V
whismanoid 25:9d4012b0887f 4361 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4362 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4363 // docTest_item['action'] = 'DACCodeOfVoltage(2.048080) expect 0x080014'
whismanoid 25:9d4012b0887f 4364 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4365 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4366 // docTest_item['arglist'] = '2.048080'
whismanoid 25:9d4012b0887f 4367 // docTest_item['expect-value'] = '0x080014'
whismanoid 25:9d4012b0887f 4368 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4369 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4370 // call-function
whismanoid 27:485b1b2f334c 4371 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4372 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048080), (uint32_t)0x080014); // 2.048V
whismanoid 25:9d4012b0887f 4373 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048080, /* expect: */ (uint32_t)0x080014); // 2.048V
whismanoid 30:13fc9d492ee0 4374 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4375 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4376 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4377 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4378
whismanoid 25:9d4012b0887f 4379 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048090) expect 0x080017 // 2.048V
whismanoid 25:9d4012b0887f 4380 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4381 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4382 // docTest_item['action'] = 'DACCodeOfVoltage(2.048090) expect 0x080017'
whismanoid 25:9d4012b0887f 4383 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4384 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4385 // docTest_item['arglist'] = '2.048090'
whismanoid 25:9d4012b0887f 4386 // docTest_item['expect-value'] = '0x080017'
whismanoid 25:9d4012b0887f 4387 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4388 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4389 // call-function
whismanoid 27:485b1b2f334c 4390 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4391 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048090), (uint32_t)0x080017); // 2.048V
whismanoid 25:9d4012b0887f 4392 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048090, /* expect: */ (uint32_t)0x080017); // 2.048V
whismanoid 30:13fc9d492ee0 4393 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4394 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4395 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4396 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4397
whismanoid 25:9d4012b0887f 4398 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048100) expect 0x08001a // 2.048V
whismanoid 25:9d4012b0887f 4399 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4400 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4401 // docTest_item['action'] = 'DACCodeOfVoltage(2.048100) expect 0x08001a'
whismanoid 25:9d4012b0887f 4402 // docTest_item['remarks'] = '2.048V'
whismanoid 25:9d4012b0887f 4403 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4404 // docTest_item['arglist'] = '2.048100'
whismanoid 25:9d4012b0887f 4405 // docTest_item['expect-value'] = '0x08001a'
whismanoid 25:9d4012b0887f 4406 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V
whismanoid 33:2c675744a01b 4407 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4408 // call-function
whismanoid 27:485b1b2f334c 4409 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4410 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048100), (uint32_t)0x08001a); // 2.048V
whismanoid 25:9d4012b0887f 4411 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048100, /* expect: */ (uint32_t)0x08001a); // 2.048V
whismanoid 30:13fc9d492ee0 4412 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4413 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4414 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4415 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4416
whismanoid 25:9d4012b0887f 4417 // @test group DACCodeOfVoltage tinyTester.print("test_voltage_sweep V = 3.996000V to 4.106000V precision 0.010000V step 0.010000V")
whismanoid 25:9d4012b0887f 4418 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 4419 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4420 // docTest_item['action'] = 'tinyTester.print("test_voltage_sweep V = 3.996000V to 4.106000V precision 0.010000V step 0.010000V")'
whismanoid 25:9d4012b0887f 4421 // docTest_item['arglist'] = 'test_voltage_sweep V = 3.996000V to 4.106000V precision 0.010000V step 0.010000V'
whismanoid 25:9d4012b0887f 4422 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None
whismanoid 33:2c675744a01b 4423 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4424 // print-string
whismanoid 25:9d4012b0887f 4425 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 4426 // tinyTesterPrintStringLiteral = "test_voltage_sweep V = 3.996000V to 4.106000V precision 0.010000V step 0.010000V"
whismanoid 25:9d4012b0887f 4427 tinyTester.print("test_voltage_sweep V = 3.996000V to 4.106000V precision 0.010000V step 0.010000V");
whismanoid 30:13fc9d492ee0 4428 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4429 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4430 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4431 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4432
whismanoid 25:9d4012b0887f 4433 // @test group DACCodeOfVoltage DACCodeOfVoltage(3.990000) expect 0x0f9600 // 3.990V
whismanoid 25:9d4012b0887f 4434 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4435 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4436 // docTest_item['action'] = 'DACCodeOfVoltage(3.990000) expect 0x0f9600'
whismanoid 25:9d4012b0887f 4437 // docTest_item['remarks'] = '3.990V'
whismanoid 25:9d4012b0887f 4438 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4439 // docTest_item['arglist'] = '3.990000'
whismanoid 25:9d4012b0887f 4440 // docTest_item['expect-value'] = '0x0f9600'
whismanoid 25:9d4012b0887f 4441 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.990V
whismanoid 33:2c675744a01b 4442 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4443 // call-function
whismanoid 27:485b1b2f334c 4444 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4445 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.990000), (uint32_t)0x0f9600); // 3.990V
whismanoid 25:9d4012b0887f 4446 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.990000, /* expect: */ (uint32_t)0x0f9600); // 3.990V
whismanoid 30:13fc9d492ee0 4447 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4448 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4449 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4450 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4451
whismanoid 25:9d4012b0887f 4452 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.000000) expect 0x0fa000 // 4.000V
whismanoid 25:9d4012b0887f 4453 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4454 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4455 // docTest_item['action'] = 'DACCodeOfVoltage(4.000000) expect 0x0fa000'
whismanoid 25:9d4012b0887f 4456 // docTest_item['remarks'] = '4.000V'
whismanoid 25:9d4012b0887f 4457 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4458 // docTest_item['arglist'] = '4.000000'
whismanoid 25:9d4012b0887f 4459 // docTest_item['expect-value'] = '0x0fa000'
whismanoid 25:9d4012b0887f 4460 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.000V
whismanoid 33:2c675744a01b 4461 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4462 // call-function
whismanoid 27:485b1b2f334c 4463 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4464 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.000000), (uint32_t)0x0fa000); // 4.000V
whismanoid 25:9d4012b0887f 4465 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.000000, /* expect: */ (uint32_t)0x0fa000); // 4.000V
whismanoid 30:13fc9d492ee0 4466 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4467 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4468 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4469 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4470
whismanoid 25:9d4012b0887f 4471 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.010000) expect 0x0faa00 // 4.010V
whismanoid 25:9d4012b0887f 4472 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4473 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4474 // docTest_item['action'] = 'DACCodeOfVoltage(4.010000) expect 0x0faa00'
whismanoid 25:9d4012b0887f 4475 // docTest_item['remarks'] = '4.010V'
whismanoid 25:9d4012b0887f 4476 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4477 // docTest_item['arglist'] = '4.010000'
whismanoid 25:9d4012b0887f 4478 // docTest_item['expect-value'] = '0x0faa00'
whismanoid 25:9d4012b0887f 4479 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.010V
whismanoid 33:2c675744a01b 4480 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4481 // call-function
whismanoid 27:485b1b2f334c 4482 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4483 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.010000), (uint32_t)0x0faa00); // 4.010V
whismanoid 25:9d4012b0887f 4484 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.010000, /* expect: */ (uint32_t)0x0faa00); // 4.010V
whismanoid 30:13fc9d492ee0 4485 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4486 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4487 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4488 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4489
whismanoid 25:9d4012b0887f 4490 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.020000) expect 0x0fb400 // 4.020V
whismanoid 25:9d4012b0887f 4491 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4492 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4493 // docTest_item['action'] = 'DACCodeOfVoltage(4.020000) expect 0x0fb400'
whismanoid 25:9d4012b0887f 4494 // docTest_item['remarks'] = '4.020V'
whismanoid 25:9d4012b0887f 4495 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4496 // docTest_item['arglist'] = '4.020000'
whismanoid 25:9d4012b0887f 4497 // docTest_item['expect-value'] = '0x0fb400'
whismanoid 25:9d4012b0887f 4498 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.020V
whismanoid 33:2c675744a01b 4499 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4500 // call-function
whismanoid 27:485b1b2f334c 4501 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4502 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.020000), (uint32_t)0x0fb400); // 4.020V
whismanoid 25:9d4012b0887f 4503 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.020000, /* expect: */ (uint32_t)0x0fb400); // 4.020V
whismanoid 30:13fc9d492ee0 4504 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4505 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4506 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4507 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4508
whismanoid 25:9d4012b0887f 4509 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.030000) expect 0x0fbe00 // 4.030V
whismanoid 25:9d4012b0887f 4510 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4511 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4512 // docTest_item['action'] = 'DACCodeOfVoltage(4.030000) expect 0x0fbe00'
whismanoid 25:9d4012b0887f 4513 // docTest_item['remarks'] = '4.030V'
whismanoid 25:9d4012b0887f 4514 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4515 // docTest_item['arglist'] = '4.030000'
whismanoid 25:9d4012b0887f 4516 // docTest_item['expect-value'] = '0x0fbe00'
whismanoid 25:9d4012b0887f 4517 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.030V
whismanoid 33:2c675744a01b 4518 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4519 // call-function
whismanoid 27:485b1b2f334c 4520 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4521 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.030000), (uint32_t)0x0fbe00); // 4.030V
whismanoid 25:9d4012b0887f 4522 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.030000, /* expect: */ (uint32_t)0x0fbe00); // 4.030V
whismanoid 30:13fc9d492ee0 4523 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4524 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4525 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4526 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4527
whismanoid 25:9d4012b0887f 4528 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.040000) expect 0x0fc800 // 4.040V
whismanoid 25:9d4012b0887f 4529 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4530 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4531 // docTest_item['action'] = 'DACCodeOfVoltage(4.040000) expect 0x0fc800'
whismanoid 25:9d4012b0887f 4532 // docTest_item['remarks'] = '4.040V'
whismanoid 25:9d4012b0887f 4533 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4534 // docTest_item['arglist'] = '4.040000'
whismanoid 25:9d4012b0887f 4535 // docTest_item['expect-value'] = '0x0fc800'
whismanoid 25:9d4012b0887f 4536 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.040V
whismanoid 33:2c675744a01b 4537 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4538 // call-function
whismanoid 27:485b1b2f334c 4539 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4540 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.040000), (uint32_t)0x0fc800); // 4.040V
whismanoid 25:9d4012b0887f 4541 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.040000, /* expect: */ (uint32_t)0x0fc800); // 4.040V
whismanoid 30:13fc9d492ee0 4542 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4543 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4544 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4545 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4546
whismanoid 25:9d4012b0887f 4547 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.050000) expect 0x0fd200 // 4.050V
whismanoid 25:9d4012b0887f 4548 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4549 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4550 // docTest_item['action'] = 'DACCodeOfVoltage(4.050000) expect 0x0fd200'
whismanoid 25:9d4012b0887f 4551 // docTest_item['remarks'] = '4.050V'
whismanoid 25:9d4012b0887f 4552 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4553 // docTest_item['arglist'] = '4.050000'
whismanoid 25:9d4012b0887f 4554 // docTest_item['expect-value'] = '0x0fd200'
whismanoid 25:9d4012b0887f 4555 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.050V
whismanoid 33:2c675744a01b 4556 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4557 // call-function
whismanoid 27:485b1b2f334c 4558 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4559 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.050000), (uint32_t)0x0fd200); // 4.050V
whismanoid 25:9d4012b0887f 4560 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.050000, /* expect: */ (uint32_t)0x0fd200); // 4.050V
whismanoid 30:13fc9d492ee0 4561 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4562 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4563 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4564 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4565
whismanoid 25:9d4012b0887f 4566 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.060000) expect 0x0fdc00 // 4.060V
whismanoid 25:9d4012b0887f 4567 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4568 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4569 // docTest_item['action'] = 'DACCodeOfVoltage(4.060000) expect 0x0fdc00'
whismanoid 25:9d4012b0887f 4570 // docTest_item['remarks'] = '4.060V'
whismanoid 25:9d4012b0887f 4571 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4572 // docTest_item['arglist'] = '4.060000'
whismanoid 25:9d4012b0887f 4573 // docTest_item['expect-value'] = '0x0fdc00'
whismanoid 25:9d4012b0887f 4574 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.060V
whismanoid 33:2c675744a01b 4575 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4576 // call-function
whismanoid 27:485b1b2f334c 4577 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4578 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.060000), (uint32_t)0x0fdc00); // 4.060V
whismanoid 25:9d4012b0887f 4579 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.060000, /* expect: */ (uint32_t)0x0fdc00); // 4.060V
whismanoid 30:13fc9d492ee0 4580 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4581 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4582 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4583 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4584
whismanoid 25:9d4012b0887f 4585 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.070000) expect 0x0fe600 // 4.070V
whismanoid 25:9d4012b0887f 4586 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4587 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4588 // docTest_item['action'] = 'DACCodeOfVoltage(4.070000) expect 0x0fe600'
whismanoid 25:9d4012b0887f 4589 // docTest_item['remarks'] = '4.070V'
whismanoid 25:9d4012b0887f 4590 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4591 // docTest_item['arglist'] = '4.070000'
whismanoid 25:9d4012b0887f 4592 // docTest_item['expect-value'] = '0x0fe600'
whismanoid 25:9d4012b0887f 4593 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.070V
whismanoid 33:2c675744a01b 4594 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4595 // call-function
whismanoid 27:485b1b2f334c 4596 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4597 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.070000), (uint32_t)0x0fe600); // 4.070V
whismanoid 25:9d4012b0887f 4598 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.070000, /* expect: */ (uint32_t)0x0fe600); // 4.070V
whismanoid 30:13fc9d492ee0 4599 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4600 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4601 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4602 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4603
whismanoid 25:9d4012b0887f 4604 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.080000) expect 0x0ff000 // 4.080V
whismanoid 25:9d4012b0887f 4605 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4606 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4607 // docTest_item['action'] = 'DACCodeOfVoltage(4.080000) expect 0x0ff000'
whismanoid 25:9d4012b0887f 4608 // docTest_item['remarks'] = '4.080V'
whismanoid 25:9d4012b0887f 4609 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4610 // docTest_item['arglist'] = '4.080000'
whismanoid 25:9d4012b0887f 4611 // docTest_item['expect-value'] = '0x0ff000'
whismanoid 25:9d4012b0887f 4612 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.080V
whismanoid 33:2c675744a01b 4613 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4614 // call-function
whismanoid 27:485b1b2f334c 4615 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4616 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.080000), (uint32_t)0x0ff000); // 4.080V
whismanoid 25:9d4012b0887f 4617 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.080000, /* expect: */ (uint32_t)0x0ff000); // 4.080V
whismanoid 30:13fc9d492ee0 4618 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4619 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4620 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4621 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4622
whismanoid 25:9d4012b0887f 4623 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.090000) expect 0x0ffa00 // 4.090V
whismanoid 25:9d4012b0887f 4624 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4625 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4626 // docTest_item['action'] = 'DACCodeOfVoltage(4.090000) expect 0x0ffa00'
whismanoid 25:9d4012b0887f 4627 // docTest_item['remarks'] = '4.090V'
whismanoid 25:9d4012b0887f 4628 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4629 // docTest_item['arglist'] = '4.090000'
whismanoid 25:9d4012b0887f 4630 // docTest_item['expect-value'] = '0x0ffa00'
whismanoid 25:9d4012b0887f 4631 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.090V
whismanoid 33:2c675744a01b 4632 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4633 // call-function
whismanoid 27:485b1b2f334c 4634 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4635 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.090000), (uint32_t)0x0ffa00); // 4.090V
whismanoid 25:9d4012b0887f 4636 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.090000, /* expect: */ (uint32_t)0x0ffa00); // 4.090V
whismanoid 30:13fc9d492ee0 4637 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4638 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4639 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4640 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4641
whismanoid 25:9d4012b0887f 4642 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.100000) expect 0x0fffff // 4.100V
whismanoid 25:9d4012b0887f 4643 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4644 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4645 // docTest_item['action'] = 'DACCodeOfVoltage(4.100000) expect 0x0fffff'
whismanoid 25:9d4012b0887f 4646 // docTest_item['remarks'] = '4.100V'
whismanoid 25:9d4012b0887f 4647 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4648 // docTest_item['arglist'] = '4.100000'
whismanoid 25:9d4012b0887f 4649 // docTest_item['expect-value'] = '0x0fffff'
whismanoid 25:9d4012b0887f 4650 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.100V
whismanoid 33:2c675744a01b 4651 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4652 // call-function
whismanoid 27:485b1b2f334c 4653 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4654 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.100000), (uint32_t)0x0fffff); // 4.100V
whismanoid 25:9d4012b0887f 4655 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.100000, /* expect: */ (uint32_t)0x0fffff); // 4.100V
whismanoid 30:13fc9d492ee0 4656 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4657 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4658 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4659 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4660
whismanoid 25:9d4012b0887f 4661 // @test group DACCodeOfVoltage tinyTester.print("test_lsb_sweep V = 4.096000V LSBradius = 3LSB")
whismanoid 25:9d4012b0887f 4662 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 4663 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4664 // docTest_item['action'] = 'tinyTester.print("test_lsb_sweep V = 4.096000V LSBradius = 3LSB")'
whismanoid 25:9d4012b0887f 4665 // docTest_item['arglist'] = 'test_lsb_sweep V = 4.096000V LSBradius = 3LSB'
whismanoid 25:9d4012b0887f 4666 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None
whismanoid 33:2c675744a01b 4667 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4668 // print-string
whismanoid 25:9d4012b0887f 4669 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 4670 // tinyTesterPrintStringLiteral = "test_lsb_sweep V = 4.096000V LSBradius = 3LSB"
whismanoid 25:9d4012b0887f 4671 tinyTester.print("test_lsb_sweep V = 4.096000V LSBradius = 3LSB");
whismanoid 30:13fc9d492ee0 4672 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4673 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4674 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4675 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4676
whismanoid 25:9d4012b0887f 4677 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.095988) expect 0x0ffffd // 4.096V + -3.0LSB
whismanoid 25:9d4012b0887f 4678 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4679 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4680 // docTest_item['action'] = 'DACCodeOfVoltage(4.095988) expect 0x0ffffd'
whismanoid 25:9d4012b0887f 4681 // docTest_item['remarks'] = '4.096V + -3.0LSB'
whismanoid 25:9d4012b0887f 4682 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4683 // docTest_item['arglist'] = '4.095988'
whismanoid 25:9d4012b0887f 4684 // docTest_item['expect-value'] = '0x0ffffd'
whismanoid 25:9d4012b0887f 4685 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + -3.0LSB
whismanoid 33:2c675744a01b 4686 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4687 // call-function
whismanoid 27:485b1b2f334c 4688 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4689 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.095988), (uint32_t)0x0ffffd); // 4.096V + -3.0LSB
whismanoid 25:9d4012b0887f 4690 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.095988, /* expect: */ (uint32_t)0x0ffffd); // 4.096V + -3.0LSB
whismanoid 30:13fc9d492ee0 4691 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4692 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4693 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4694 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4695
whismanoid 25:9d4012b0887f 4696 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.095990) expect 0x0ffffd // 4.096V + -2.5LSB 0x0ffffd not 0x0ffffe
whismanoid 25:9d4012b0887f 4697 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4698 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4699 // docTest_item['action'] = 'DACCodeOfVoltage(4.095990) expect 0x0ffffd'
whismanoid 25:9d4012b0887f 4700 // docTest_item['remarks'] = '4.096V + -2.5LSB 0x0ffffd not 0x0ffffe'
whismanoid 25:9d4012b0887f 4701 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4702 // docTest_item['arglist'] = '4.095990'
whismanoid 25:9d4012b0887f 4703 // docTest_item['expect-value'] = '0x0ffffd'
whismanoid 25:9d4012b0887f 4704 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + -2.5LSB 0x0ffffd not 0x0ffffe
whismanoid 33:2c675744a01b 4705 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4706 // call-function
whismanoid 27:485b1b2f334c 4707 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4708 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.095990), (uint32_t)0x0ffffd); // 4.096V + -2.5LSB 0x0ffffd not 0x0ffffe
whismanoid 25:9d4012b0887f 4709 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 4710 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4711 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4712 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4713 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4714
whismanoid 25:9d4012b0887f 4715 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.095992) expect 0x0ffffe // 4.096V + -2.0LSB
whismanoid 25:9d4012b0887f 4716 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4717 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4718 // docTest_item['action'] = 'DACCodeOfVoltage(4.095992) expect 0x0ffffe'
whismanoid 25:9d4012b0887f 4719 // docTest_item['remarks'] = '4.096V + -2.0LSB'
whismanoid 25:9d4012b0887f 4720 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4721 // docTest_item['arglist'] = '4.095992'
whismanoid 25:9d4012b0887f 4722 // docTest_item['expect-value'] = '0x0ffffe'
whismanoid 25:9d4012b0887f 4723 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + -2.0LSB
whismanoid 33:2c675744a01b 4724 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4725 // call-function
whismanoid 27:485b1b2f334c 4726 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4727 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.095992), (uint32_t)0x0ffffe); // 4.096V + -2.0LSB
whismanoid 25:9d4012b0887f 4728 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.095992, /* expect: */ (uint32_t)0x0ffffe); // 4.096V + -2.0LSB
whismanoid 30:13fc9d492ee0 4729 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4730 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4731 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4732 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4733
whismanoid 25:9d4012b0887f 4734 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.095994) expect 0x0ffffe // 4.096V + -1.5LSB
whismanoid 25:9d4012b0887f 4735 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4736 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4737 // docTest_item['action'] = 'DACCodeOfVoltage(4.095994) expect 0x0ffffe'
whismanoid 25:9d4012b0887f 4738 // docTest_item['remarks'] = '4.096V + -1.5LSB'
whismanoid 25:9d4012b0887f 4739 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4740 // docTest_item['arglist'] = '4.095994'
whismanoid 25:9d4012b0887f 4741 // docTest_item['expect-value'] = '0x0ffffe'
whismanoid 25:9d4012b0887f 4742 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + -1.5LSB
whismanoid 33:2c675744a01b 4743 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4744 // call-function
whismanoid 27:485b1b2f334c 4745 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4746 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.095994), (uint32_t)0x0ffffe); // 4.096V + -1.5LSB
whismanoid 25:9d4012b0887f 4747 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.095994, /* expect: */ (uint32_t)0x0ffffe); // 4.096V + -1.5LSB
whismanoid 30:13fc9d492ee0 4748 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4749 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4750 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4751 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4752
whismanoid 25:9d4012b0887f 4753 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.095996) expect 0x0fffff // 4.096V + -1.0LSB
whismanoid 25:9d4012b0887f 4754 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4755 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4756 // docTest_item['action'] = 'DACCodeOfVoltage(4.095996) expect 0x0fffff'
whismanoid 25:9d4012b0887f 4757 // docTest_item['remarks'] = '4.096V + -1.0LSB'
whismanoid 25:9d4012b0887f 4758 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4759 // docTest_item['arglist'] = '4.095996'
whismanoid 25:9d4012b0887f 4760 // docTest_item['expect-value'] = '0x0fffff'
whismanoid 25:9d4012b0887f 4761 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + -1.0LSB
whismanoid 33:2c675744a01b 4762 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4763 // call-function
whismanoid 27:485b1b2f334c 4764 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4765 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.095996), (uint32_t)0x0fffff); // 4.096V + -1.0LSB
whismanoid 25:9d4012b0887f 4766 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.095996, /* expect: */ (uint32_t)0x0fffff); // 4.096V + -1.0LSB
whismanoid 30:13fc9d492ee0 4767 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4768 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4769 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4770 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4771
whismanoid 25:9d4012b0887f 4772 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.095998) expect 0x0fffff // 4.096V + -0.5LSB
whismanoid 25:9d4012b0887f 4773 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4774 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4775 // docTest_item['action'] = 'DACCodeOfVoltage(4.095998) expect 0x0fffff'
whismanoid 25:9d4012b0887f 4776 // docTest_item['remarks'] = '4.096V + -0.5LSB'
whismanoid 25:9d4012b0887f 4777 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4778 // docTest_item['arglist'] = '4.095998'
whismanoid 25:9d4012b0887f 4779 // docTest_item['expect-value'] = '0x0fffff'
whismanoid 25:9d4012b0887f 4780 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + -0.5LSB
whismanoid 33:2c675744a01b 4781 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4782 // call-function
whismanoid 27:485b1b2f334c 4783 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4784 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.095998), (uint32_t)0x0fffff); // 4.096V + -0.5LSB
whismanoid 25:9d4012b0887f 4785 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.095998, /* expect: */ (uint32_t)0x0fffff); // 4.096V + -0.5LSB
whismanoid 30:13fc9d492ee0 4786 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4787 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4788 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4789 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4790
whismanoid 25:9d4012b0887f 4791 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.096000) expect 0x0fffff // 4.096V + 0.0LSB
whismanoid 25:9d4012b0887f 4792 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4793 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4794 // docTest_item['action'] = 'DACCodeOfVoltage(4.096000) expect 0x0fffff'
whismanoid 25:9d4012b0887f 4795 // docTest_item['remarks'] = '4.096V + 0.0LSB'
whismanoid 25:9d4012b0887f 4796 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4797 // docTest_item['arglist'] = '4.096000'
whismanoid 25:9d4012b0887f 4798 // docTest_item['expect-value'] = '0x0fffff'
whismanoid 25:9d4012b0887f 4799 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + 0.0LSB
whismanoid 33:2c675744a01b 4800 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4801 // call-function
whismanoid 27:485b1b2f334c 4802 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4803 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.096000), (uint32_t)0x0fffff); // 4.096V + 0.0LSB
whismanoid 25:9d4012b0887f 4804 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.096000, /* expect: */ (uint32_t)0x0fffff); // 4.096V + 0.0LSB
whismanoid 30:13fc9d492ee0 4805 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4806 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4807 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4808 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4809
whismanoid 25:9d4012b0887f 4810 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.096002) expect 0x0fffff // 4.096V + 0.5LSB
whismanoid 25:9d4012b0887f 4811 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4812 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4813 // docTest_item['action'] = 'DACCodeOfVoltage(4.096002) expect 0x0fffff'
whismanoid 25:9d4012b0887f 4814 // docTest_item['remarks'] = '4.096V + 0.5LSB'
whismanoid 25:9d4012b0887f 4815 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4816 // docTest_item['arglist'] = '4.096002'
whismanoid 25:9d4012b0887f 4817 // docTest_item['expect-value'] = '0x0fffff'
whismanoid 25:9d4012b0887f 4818 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + 0.5LSB
whismanoid 33:2c675744a01b 4819 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4820 // call-function
whismanoid 27:485b1b2f334c 4821 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4822 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.096002), (uint32_t)0x0fffff); // 4.096V + 0.5LSB
whismanoid 25:9d4012b0887f 4823 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.096002, /* expect: */ (uint32_t)0x0fffff); // 4.096V + 0.5LSB
whismanoid 30:13fc9d492ee0 4824 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4825 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4826 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4827 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4828
whismanoid 25:9d4012b0887f 4829 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.096004) expect 0x0fffff // 4.096V + 1.0LSB
whismanoid 25:9d4012b0887f 4830 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4831 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4832 // docTest_item['action'] = 'DACCodeOfVoltage(4.096004) expect 0x0fffff'
whismanoid 25:9d4012b0887f 4833 // docTest_item['remarks'] = '4.096V + 1.0LSB'
whismanoid 25:9d4012b0887f 4834 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4835 // docTest_item['arglist'] = '4.096004'
whismanoid 25:9d4012b0887f 4836 // docTest_item['expect-value'] = '0x0fffff'
whismanoid 25:9d4012b0887f 4837 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + 1.0LSB
whismanoid 33:2c675744a01b 4838 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4839 // call-function
whismanoid 27:485b1b2f334c 4840 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4841 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.096004), (uint32_t)0x0fffff); // 4.096V + 1.0LSB
whismanoid 25:9d4012b0887f 4842 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.096004, /* expect: */ (uint32_t)0x0fffff); // 4.096V + 1.0LSB
whismanoid 30:13fc9d492ee0 4843 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4844 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4845 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4846 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4847
whismanoid 25:9d4012b0887f 4848 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.096006) expect 0x0fffff // 4.096V + 1.5LSB
whismanoid 25:9d4012b0887f 4849 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4850 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4851 // docTest_item['action'] = 'DACCodeOfVoltage(4.096006) expect 0x0fffff'
whismanoid 25:9d4012b0887f 4852 // docTest_item['remarks'] = '4.096V + 1.5LSB'
whismanoid 25:9d4012b0887f 4853 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4854 // docTest_item['arglist'] = '4.096006'
whismanoid 25:9d4012b0887f 4855 // docTest_item['expect-value'] = '0x0fffff'
whismanoid 25:9d4012b0887f 4856 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + 1.5LSB
whismanoid 33:2c675744a01b 4857 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4858 // call-function
whismanoid 27:485b1b2f334c 4859 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4860 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.096006), (uint32_t)0x0fffff); // 4.096V + 1.5LSB
whismanoid 25:9d4012b0887f 4861 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.096006, /* expect: */ (uint32_t)0x0fffff); // 4.096V + 1.5LSB
whismanoid 30:13fc9d492ee0 4862 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4863 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4864 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4865 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4866
whismanoid 25:9d4012b0887f 4867 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.096008) expect 0x0fffff // 4.096V + 2.0LSB
whismanoid 25:9d4012b0887f 4868 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4869 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4870 // docTest_item['action'] = 'DACCodeOfVoltage(4.096008) expect 0x0fffff'
whismanoid 25:9d4012b0887f 4871 // docTest_item['remarks'] = '4.096V + 2.0LSB'
whismanoid 25:9d4012b0887f 4872 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4873 // docTest_item['arglist'] = '4.096008'
whismanoid 25:9d4012b0887f 4874 // docTest_item['expect-value'] = '0x0fffff'
whismanoid 25:9d4012b0887f 4875 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + 2.0LSB
whismanoid 33:2c675744a01b 4876 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4877 // call-function
whismanoid 27:485b1b2f334c 4878 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4879 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.096008), (uint32_t)0x0fffff); // 4.096V + 2.0LSB
whismanoid 25:9d4012b0887f 4880 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.096008, /* expect: */ (uint32_t)0x0fffff); // 4.096V + 2.0LSB
whismanoid 30:13fc9d492ee0 4881 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4882 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4883 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4884 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4885
whismanoid 25:9d4012b0887f 4886 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.096010) expect 0x0fffff // 4.096V + 2.5LSB
whismanoid 25:9d4012b0887f 4887 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4888 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4889 // docTest_item['action'] = 'DACCodeOfVoltage(4.096010) expect 0x0fffff'
whismanoid 25:9d4012b0887f 4890 // docTest_item['remarks'] = '4.096V + 2.5LSB'
whismanoid 25:9d4012b0887f 4891 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4892 // docTest_item['arglist'] = '4.096010'
whismanoid 25:9d4012b0887f 4893 // docTest_item['expect-value'] = '0x0fffff'
whismanoid 25:9d4012b0887f 4894 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + 2.5LSB
whismanoid 33:2c675744a01b 4895 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4896 // call-function
whismanoid 27:485b1b2f334c 4897 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4898 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.096010), (uint32_t)0x0fffff); // 4.096V + 2.5LSB
whismanoid 25:9d4012b0887f 4899 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.096010, /* expect: */ (uint32_t)0x0fffff); // 4.096V + 2.5LSB
whismanoid 30:13fc9d492ee0 4900 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4901 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4902 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4903 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4904
whismanoid 25:9d4012b0887f 4905 // @test group DACCodeOfVoltage DACCodeOfVoltage(4.096012) expect 0x0fffff // 4.096V + 3.0LSB
whismanoid 25:9d4012b0887f 4906 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4907 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4908 // docTest_item['action'] = 'DACCodeOfVoltage(4.096012) expect 0x0fffff'
whismanoid 25:9d4012b0887f 4909 // docTest_item['remarks'] = '4.096V + 3.0LSB'
whismanoid 25:9d4012b0887f 4910 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4911 // docTest_item['arglist'] = '4.096012'
whismanoid 25:9d4012b0887f 4912 // docTest_item['expect-value'] = '0x0fffff'
whismanoid 25:9d4012b0887f 4913 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + 3.0LSB
whismanoid 33:2c675744a01b 4914 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4915 // call-function
whismanoid 27:485b1b2f334c 4916 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4917 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.096012), (uint32_t)0x0fffff); // 4.096V + 3.0LSB
whismanoid 25:9d4012b0887f 4918 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.096012, /* expect: */ (uint32_t)0x0fffff); // 4.096V + 3.0LSB
whismanoid 30:13fc9d492ee0 4919 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4920 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4921 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4922 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4923
whismanoid 25:9d4012b0887f 4924 // @test group DACCodeOfVoltage tinyTester.print("test_lsb_sweep V = 3.072000V LSBradius = 3LSB")
whismanoid 25:9d4012b0887f 4925 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 4926 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4927 // docTest_item['action'] = 'tinyTester.print("test_lsb_sweep V = 3.072000V LSBradius = 3LSB")'
whismanoid 25:9d4012b0887f 4928 // docTest_item['arglist'] = 'test_lsb_sweep V = 3.072000V LSBradius = 3LSB'
whismanoid 25:9d4012b0887f 4929 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None
whismanoid 33:2c675744a01b 4930 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4931 // print-string
whismanoid 25:9d4012b0887f 4932 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 4933 // tinyTesterPrintStringLiteral = "test_lsb_sweep V = 3.072000V LSBradius = 3LSB"
whismanoid 25:9d4012b0887f 4934 tinyTester.print("test_lsb_sweep V = 3.072000V LSBradius = 3LSB");
whismanoid 30:13fc9d492ee0 4935 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4936 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4937 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4938 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4939
whismanoid 25:9d4012b0887f 4940 // @test group DACCodeOfVoltage DACCodeOfVoltage(3.071988) expect 0x0bfffd // 3.072V + -3.0LSB
whismanoid 25:9d4012b0887f 4941 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4942 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4943 // docTest_item['action'] = 'DACCodeOfVoltage(3.071988) expect 0x0bfffd'
whismanoid 25:9d4012b0887f 4944 // docTest_item['remarks'] = '3.072V + -3.0LSB'
whismanoid 25:9d4012b0887f 4945 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4946 // docTest_item['arglist'] = '3.071988'
whismanoid 25:9d4012b0887f 4947 // docTest_item['expect-value'] = '0x0bfffd'
whismanoid 25:9d4012b0887f 4948 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + -3.0LSB
whismanoid 33:2c675744a01b 4949 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4950 // call-function
whismanoid 27:485b1b2f334c 4951 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4952 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.071988), (uint32_t)0x0bfffd); // 3.072V + -3.0LSB
whismanoid 25:9d4012b0887f 4953 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.071988, /* expect: */ (uint32_t)0x0bfffd); // 3.072V + -3.0LSB
whismanoid 30:13fc9d492ee0 4954 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4955 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4956 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4957 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4958
whismanoid 25:9d4012b0887f 4959 // @test group DACCodeOfVoltage DACCodeOfVoltage(3.071990) expect 0x0bfffd // 3.072V + -2.5LSB 0x0bfffd not 0x0bfffe
whismanoid 25:9d4012b0887f 4960 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4961 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4962 // docTest_item['action'] = 'DACCodeOfVoltage(3.071990) expect 0x0bfffd'
whismanoid 25:9d4012b0887f 4963 // docTest_item['remarks'] = '3.072V + -2.5LSB 0x0bfffd not 0x0bfffe'
whismanoid 25:9d4012b0887f 4964 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4965 // docTest_item['arglist'] = '3.071990'
whismanoid 25:9d4012b0887f 4966 // docTest_item['expect-value'] = '0x0bfffd'
whismanoid 25:9d4012b0887f 4967 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + -2.5LSB 0x0bfffd not 0x0bfffe
whismanoid 33:2c675744a01b 4968 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4969 // call-function
whismanoid 27:485b1b2f334c 4970 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4971 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.071990), (uint32_t)0x0bfffd); // 3.072V + -2.5LSB 0x0bfffd not 0x0bfffe
whismanoid 25:9d4012b0887f 4972 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 4973 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4974 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4975 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4976 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4977
whismanoid 25:9d4012b0887f 4978 // @test group DACCodeOfVoltage DACCodeOfVoltage(3.071992) expect 0x0bfffe // 3.072V + -2.0LSB
whismanoid 25:9d4012b0887f 4979 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4980 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4981 // docTest_item['action'] = 'DACCodeOfVoltage(3.071992) expect 0x0bfffe'
whismanoid 25:9d4012b0887f 4982 // docTest_item['remarks'] = '3.072V + -2.0LSB'
whismanoid 25:9d4012b0887f 4983 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 4984 // docTest_item['arglist'] = '3.071992'
whismanoid 25:9d4012b0887f 4985 // docTest_item['expect-value'] = '0x0bfffe'
whismanoid 25:9d4012b0887f 4986 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + -2.0LSB
whismanoid 33:2c675744a01b 4987 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 4988 // call-function
whismanoid 27:485b1b2f334c 4989 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 4990 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.071992), (uint32_t)0x0bfffe); // 3.072V + -2.0LSB
whismanoid 25:9d4012b0887f 4991 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.071992, /* expect: */ (uint32_t)0x0bfffe); // 3.072V + -2.0LSB
whismanoid 30:13fc9d492ee0 4992 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 4993 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 4994 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 4995 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 4996
whismanoid 25:9d4012b0887f 4997 // @test group DACCodeOfVoltage DACCodeOfVoltage(3.071994) expect 0x0bfffe // 3.072V + -1.5LSB 0x0bfffe not 0x0bffff
whismanoid 25:9d4012b0887f 4998 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 4999 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5000 // docTest_item['action'] = 'DACCodeOfVoltage(3.071994) expect 0x0bfffe'
whismanoid 25:9d4012b0887f 5001 // docTest_item['remarks'] = '3.072V + -1.5LSB 0x0bfffe not 0x0bffff'
whismanoid 25:9d4012b0887f 5002 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5003 // docTest_item['arglist'] = '3.071994'
whismanoid 25:9d4012b0887f 5004 // docTest_item['expect-value'] = '0x0bfffe'
whismanoid 25:9d4012b0887f 5005 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + -1.5LSB 0x0bfffe not 0x0bffff
whismanoid 33:2c675744a01b 5006 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5007 // call-function
whismanoid 27:485b1b2f334c 5008 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5009 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.071994), (uint32_t)0x0bfffe); // 3.072V + -1.5LSB 0x0bfffe not 0x0bffff
whismanoid 25:9d4012b0887f 5010 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 5011 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5012 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5013 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5014 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5015
whismanoid 25:9d4012b0887f 5016 // @test group DACCodeOfVoltage DACCodeOfVoltage(3.071996) expect 0x0bffff // 3.072V + -1.0LSB
whismanoid 25:9d4012b0887f 5017 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5018 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5019 // docTest_item['action'] = 'DACCodeOfVoltage(3.071996) expect 0x0bffff'
whismanoid 25:9d4012b0887f 5020 // docTest_item['remarks'] = '3.072V + -1.0LSB'
whismanoid 25:9d4012b0887f 5021 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5022 // docTest_item['arglist'] = '3.071996'
whismanoid 25:9d4012b0887f 5023 // docTest_item['expect-value'] = '0x0bffff'
whismanoid 25:9d4012b0887f 5024 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + -1.0LSB
whismanoid 33:2c675744a01b 5025 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5026 // call-function
whismanoid 27:485b1b2f334c 5027 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5028 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.071996), (uint32_t)0x0bffff); // 3.072V + -1.0LSB
whismanoid 25:9d4012b0887f 5029 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.071996, /* expect: */ (uint32_t)0x0bffff); // 3.072V + -1.0LSB
whismanoid 30:13fc9d492ee0 5030 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5031 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5032 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5033 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5034
whismanoid 25:9d4012b0887f 5035 // @test group DACCodeOfVoltage DACCodeOfVoltage(3.071998) expect 0x0bffff // 3.072V + -0.5LSB 0x0bffff not 0x0c0000
whismanoid 25:9d4012b0887f 5036 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5037 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5038 // docTest_item['action'] = 'DACCodeOfVoltage(3.071998) expect 0x0bffff'
whismanoid 25:9d4012b0887f 5039 // docTest_item['remarks'] = '3.072V + -0.5LSB 0x0bffff not 0x0c0000'
whismanoid 25:9d4012b0887f 5040 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5041 // docTest_item['arglist'] = '3.071998'
whismanoid 25:9d4012b0887f 5042 // docTest_item['expect-value'] = '0x0bffff'
whismanoid 25:9d4012b0887f 5043 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + -0.5LSB 0x0bffff not 0x0c0000
whismanoid 33:2c675744a01b 5044 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5045 // call-function
whismanoid 27:485b1b2f334c 5046 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5047 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.071998), (uint32_t)0x0bffff); // 3.072V + -0.5LSB 0x0bffff not 0x0c0000
whismanoid 25:9d4012b0887f 5048 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 5049 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5050 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5051 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5052 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5053
whismanoid 25:9d4012b0887f 5054 // @test group DACCodeOfVoltage DACCodeOfVoltage(3.072000) expect 0x0c0000 // 3.072V + 0.0LSB
whismanoid 25:9d4012b0887f 5055 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5056 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5057 // docTest_item['action'] = 'DACCodeOfVoltage(3.072000) expect 0x0c0000'
whismanoid 25:9d4012b0887f 5058 // docTest_item['remarks'] = '3.072V + 0.0LSB'
whismanoid 25:9d4012b0887f 5059 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5060 // docTest_item['arglist'] = '3.072000'
whismanoid 25:9d4012b0887f 5061 // docTest_item['expect-value'] = '0x0c0000'
whismanoid 25:9d4012b0887f 5062 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + 0.0LSB
whismanoid 33:2c675744a01b 5063 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5064 // call-function
whismanoid 27:485b1b2f334c 5065 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5066 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.072000), (uint32_t)0x0c0000); // 3.072V + 0.0LSB
whismanoid 25:9d4012b0887f 5067 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.072000, /* expect: */ (uint32_t)0x0c0000); // 3.072V + 0.0LSB
whismanoid 30:13fc9d492ee0 5068 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5069 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5070 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5071 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5072
whismanoid 25:9d4012b0887f 5073 // @test group DACCodeOfVoltage DACCodeOfVoltage(3.072002) expect 0x0c0001 // 3.072V + 0.5LSB
whismanoid 25:9d4012b0887f 5074 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5075 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5076 // docTest_item['action'] = 'DACCodeOfVoltage(3.072002) expect 0x0c0001'
whismanoid 25:9d4012b0887f 5077 // docTest_item['remarks'] = '3.072V + 0.5LSB'
whismanoid 25:9d4012b0887f 5078 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5079 // docTest_item['arglist'] = '3.072002'
whismanoid 25:9d4012b0887f 5080 // docTest_item['expect-value'] = '0x0c0001'
whismanoid 25:9d4012b0887f 5081 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + 0.5LSB
whismanoid 33:2c675744a01b 5082 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5083 // call-function
whismanoid 27:485b1b2f334c 5084 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5085 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.072002), (uint32_t)0x0c0001); // 3.072V + 0.5LSB
whismanoid 25:9d4012b0887f 5086 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.072002, /* expect: */ (uint32_t)0x0c0001); // 3.072V + 0.5LSB
whismanoid 30:13fc9d492ee0 5087 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5088 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5089 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5090 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5091
whismanoid 25:9d4012b0887f 5092 // @test group DACCodeOfVoltage DACCodeOfVoltage(3.072004) expect 0x0c0001 // 3.072V + 1.0LSB
whismanoid 25:9d4012b0887f 5093 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5094 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5095 // docTest_item['action'] = 'DACCodeOfVoltage(3.072004) expect 0x0c0001'
whismanoid 25:9d4012b0887f 5096 // docTest_item['remarks'] = '3.072V + 1.0LSB'
whismanoid 25:9d4012b0887f 5097 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5098 // docTest_item['arglist'] = '3.072004'
whismanoid 25:9d4012b0887f 5099 // docTest_item['expect-value'] = '0x0c0001'
whismanoid 25:9d4012b0887f 5100 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + 1.0LSB
whismanoid 33:2c675744a01b 5101 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5102 // call-function
whismanoid 27:485b1b2f334c 5103 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5104 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.072004), (uint32_t)0x0c0001); // 3.072V + 1.0LSB
whismanoid 25:9d4012b0887f 5105 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.072004, /* expect: */ (uint32_t)0x0c0001); // 3.072V + 1.0LSB
whismanoid 30:13fc9d492ee0 5106 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5107 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5108 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5109 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5110
whismanoid 25:9d4012b0887f 5111 // @test group DACCodeOfVoltage DACCodeOfVoltage(3.072006) expect 0x0c0002 // 3.072V + 1.5LSB
whismanoid 25:9d4012b0887f 5112 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5113 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5114 // docTest_item['action'] = 'DACCodeOfVoltage(3.072006) expect 0x0c0002'
whismanoid 25:9d4012b0887f 5115 // docTest_item['remarks'] = '3.072V + 1.5LSB'
whismanoid 25:9d4012b0887f 5116 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5117 // docTest_item['arglist'] = '3.072006'
whismanoid 25:9d4012b0887f 5118 // docTest_item['expect-value'] = '0x0c0002'
whismanoid 25:9d4012b0887f 5119 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + 1.5LSB
whismanoid 33:2c675744a01b 5120 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5121 // call-function
whismanoid 27:485b1b2f334c 5122 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5123 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.072006), (uint32_t)0x0c0002); // 3.072V + 1.5LSB
whismanoid 25:9d4012b0887f 5124 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.072006, /* expect: */ (uint32_t)0x0c0002); // 3.072V + 1.5LSB
whismanoid 30:13fc9d492ee0 5125 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5126 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5127 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5128 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5129
whismanoid 25:9d4012b0887f 5130 // @test group DACCodeOfVoltage DACCodeOfVoltage(3.072008) expect 0x0c0002 // 3.072V + 2.0LSB
whismanoid 25:9d4012b0887f 5131 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5132 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5133 // docTest_item['action'] = 'DACCodeOfVoltage(3.072008) expect 0x0c0002'
whismanoid 25:9d4012b0887f 5134 // docTest_item['remarks'] = '3.072V + 2.0LSB'
whismanoid 25:9d4012b0887f 5135 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5136 // docTest_item['arglist'] = '3.072008'
whismanoid 25:9d4012b0887f 5137 // docTest_item['expect-value'] = '0x0c0002'
whismanoid 25:9d4012b0887f 5138 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + 2.0LSB
whismanoid 33:2c675744a01b 5139 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5140 // call-function
whismanoid 27:485b1b2f334c 5141 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5142 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.072008), (uint32_t)0x0c0002); // 3.072V + 2.0LSB
whismanoid 25:9d4012b0887f 5143 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.072008, /* expect: */ (uint32_t)0x0c0002); // 3.072V + 2.0LSB
whismanoid 30:13fc9d492ee0 5144 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5145 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5146 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5147 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5148
whismanoid 25:9d4012b0887f 5149 // @test group DACCodeOfVoltage DACCodeOfVoltage(3.072010) expect 0x0c0003 // 3.072V + 2.5LSB
whismanoid 25:9d4012b0887f 5150 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5151 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5152 // docTest_item['action'] = 'DACCodeOfVoltage(3.072010) expect 0x0c0003'
whismanoid 25:9d4012b0887f 5153 // docTest_item['remarks'] = '3.072V + 2.5LSB'
whismanoid 25:9d4012b0887f 5154 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5155 // docTest_item['arglist'] = '3.072010'
whismanoid 25:9d4012b0887f 5156 // docTest_item['expect-value'] = '0x0c0003'
whismanoid 25:9d4012b0887f 5157 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + 2.5LSB
whismanoid 33:2c675744a01b 5158 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5159 // call-function
whismanoid 27:485b1b2f334c 5160 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5161 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.072010), (uint32_t)0x0c0003); // 3.072V + 2.5LSB
whismanoid 25:9d4012b0887f 5162 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.072010, /* expect: */ (uint32_t)0x0c0003); // 3.072V + 2.5LSB
whismanoid 30:13fc9d492ee0 5163 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5164 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5165 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5166 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5167
whismanoid 25:9d4012b0887f 5168 // @test group DACCodeOfVoltage DACCodeOfVoltage(3.072012) expect 0x0c0003 // 3.072V + 3.0LSB
whismanoid 25:9d4012b0887f 5169 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5170 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5171 // docTest_item['action'] = 'DACCodeOfVoltage(3.072012) expect 0x0c0003'
whismanoid 25:9d4012b0887f 5172 // docTest_item['remarks'] = '3.072V + 3.0LSB'
whismanoid 25:9d4012b0887f 5173 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5174 // docTest_item['arglist'] = '3.072012'
whismanoid 25:9d4012b0887f 5175 // docTest_item['expect-value'] = '0x0c0003'
whismanoid 25:9d4012b0887f 5176 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + 3.0LSB
whismanoid 33:2c675744a01b 5177 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5178 // call-function
whismanoid 27:485b1b2f334c 5179 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5180 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.072012), (uint32_t)0x0c0003); // 3.072V + 3.0LSB
whismanoid 25:9d4012b0887f 5181 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.072012, /* expect: */ (uint32_t)0x0c0003); // 3.072V + 3.0LSB
whismanoid 30:13fc9d492ee0 5182 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5183 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5184 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5185 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5186
whismanoid 25:9d4012b0887f 5187 // @test group DACCodeOfVoltage tinyTester.print("test_lsb_sweep V = 2.048000V LSBradius = 3LSB")
whismanoid 25:9d4012b0887f 5188 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 5189 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5190 // docTest_item['action'] = 'tinyTester.print("test_lsb_sweep V = 2.048000V LSBradius = 3LSB")'
whismanoid 25:9d4012b0887f 5191 // docTest_item['arglist'] = 'test_lsb_sweep V = 2.048000V LSBradius = 3LSB'
whismanoid 25:9d4012b0887f 5192 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None
whismanoid 33:2c675744a01b 5193 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5194 // print-string
whismanoid 25:9d4012b0887f 5195 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 5196 // tinyTesterPrintStringLiteral = "test_lsb_sweep V = 2.048000V LSBradius = 3LSB"
whismanoid 25:9d4012b0887f 5197 tinyTester.print("test_lsb_sweep V = 2.048000V LSBradius = 3LSB");
whismanoid 30:13fc9d492ee0 5198 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5199 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5200 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5201 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5202
whismanoid 25:9d4012b0887f 5203 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047988) expect 0x07fffd // 2.048V + -3.0LSB
whismanoid 25:9d4012b0887f 5204 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5205 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5206 // docTest_item['action'] = 'DACCodeOfVoltage(2.047988) expect 0x07fffd'
whismanoid 25:9d4012b0887f 5207 // docTest_item['remarks'] = '2.048V + -3.0LSB'
whismanoid 25:9d4012b0887f 5208 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5209 // docTest_item['arglist'] = '2.047988'
whismanoid 25:9d4012b0887f 5210 // docTest_item['expect-value'] = '0x07fffd'
whismanoid 25:9d4012b0887f 5211 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + -3.0LSB
whismanoid 33:2c675744a01b 5212 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5213 // call-function
whismanoid 27:485b1b2f334c 5214 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5215 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047988), (uint32_t)0x07fffd); // 2.048V + -3.0LSB
whismanoid 25:9d4012b0887f 5216 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047988, /* expect: */ (uint32_t)0x07fffd); // 2.048V + -3.0LSB
whismanoid 30:13fc9d492ee0 5217 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5218 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5219 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5220 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5221
whismanoid 25:9d4012b0887f 5222 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047990) expect 0x07fffd // 2.048V + -2.5LSB
whismanoid 25:9d4012b0887f 5223 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5224 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5225 // docTest_item['action'] = 'DACCodeOfVoltage(2.047990) expect 0x07fffd'
whismanoid 25:9d4012b0887f 5226 // docTest_item['remarks'] = '2.048V + -2.5LSB'
whismanoid 25:9d4012b0887f 5227 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5228 // docTest_item['arglist'] = '2.047990'
whismanoid 25:9d4012b0887f 5229 // docTest_item['expect-value'] = '0x07fffd'
whismanoid 25:9d4012b0887f 5230 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + -2.5LSB
whismanoid 33:2c675744a01b 5231 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5232 // call-function
whismanoid 27:485b1b2f334c 5233 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5234 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047990), (uint32_t)0x07fffd); // 2.048V + -2.5LSB
whismanoid 25:9d4012b0887f 5235 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047990, /* expect: */ (uint32_t)0x07fffd); // 2.048V + -2.5LSB
whismanoid 30:13fc9d492ee0 5236 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5237 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5238 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5239 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5240
whismanoid 25:9d4012b0887f 5241 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047992) expect 0x07fffe // 2.048V + -2.0LSB
whismanoid 25:9d4012b0887f 5242 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5243 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5244 // docTest_item['action'] = 'DACCodeOfVoltage(2.047992) expect 0x07fffe'
whismanoid 25:9d4012b0887f 5245 // docTest_item['remarks'] = '2.048V + -2.0LSB'
whismanoid 25:9d4012b0887f 5246 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5247 // docTest_item['arglist'] = '2.047992'
whismanoid 25:9d4012b0887f 5248 // docTest_item['expect-value'] = '0x07fffe'
whismanoid 25:9d4012b0887f 5249 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + -2.0LSB
whismanoid 33:2c675744a01b 5250 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5251 // call-function
whismanoid 27:485b1b2f334c 5252 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5253 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047992), (uint32_t)0x07fffe); // 2.048V + -2.0LSB
whismanoid 25:9d4012b0887f 5254 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047992, /* expect: */ (uint32_t)0x07fffe); // 2.048V + -2.0LSB
whismanoid 30:13fc9d492ee0 5255 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5256 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5257 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5258 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5259
whismanoid 25:9d4012b0887f 5260 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047994) expect 0x07fffe // 2.048V + -1.5LSB 0x07fffe not 0x07ffff
whismanoid 25:9d4012b0887f 5261 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5262 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5263 // docTest_item['action'] = 'DACCodeOfVoltage(2.047994) expect 0x07fffe'
whismanoid 25:9d4012b0887f 5264 // docTest_item['remarks'] = '2.048V + -1.5LSB 0x07fffe not 0x07ffff'
whismanoid 25:9d4012b0887f 5265 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5266 // docTest_item['arglist'] = '2.047994'
whismanoid 25:9d4012b0887f 5267 // docTest_item['expect-value'] = '0x07fffe'
whismanoid 25:9d4012b0887f 5268 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + -1.5LSB 0x07fffe not 0x07ffff
whismanoid 33:2c675744a01b 5269 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5270 // call-function
whismanoid 27:485b1b2f334c 5271 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5272 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047994), (uint32_t)0x07fffe); // 2.048V + -1.5LSB 0x07fffe not 0x07ffff
whismanoid 25:9d4012b0887f 5273 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 5274 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5275 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5276 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5277 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5278
whismanoid 25:9d4012b0887f 5279 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047996) expect 0x07ffff // 2.048V + -1.0LSB
whismanoid 25:9d4012b0887f 5280 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5281 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5282 // docTest_item['action'] = 'DACCodeOfVoltage(2.047996) expect 0x07ffff'
whismanoid 25:9d4012b0887f 5283 // docTest_item['remarks'] = '2.048V + -1.0LSB'
whismanoid 25:9d4012b0887f 5284 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5285 // docTest_item['arglist'] = '2.047996'
whismanoid 25:9d4012b0887f 5286 // docTest_item['expect-value'] = '0x07ffff'
whismanoid 25:9d4012b0887f 5287 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + -1.0LSB
whismanoid 33:2c675744a01b 5288 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5289 // call-function
whismanoid 27:485b1b2f334c 5290 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5291 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047996), (uint32_t)0x07ffff); // 2.048V + -1.0LSB
whismanoid 25:9d4012b0887f 5292 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047996, /* expect: */ (uint32_t)0x07ffff); // 2.048V + -1.0LSB
whismanoid 30:13fc9d492ee0 5293 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5294 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5295 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5296 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5297
whismanoid 25:9d4012b0887f 5298 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047998) expect 0x07ffff // 2.048V + -0.5LSB 0x07ffff not 0x080000
whismanoid 25:9d4012b0887f 5299 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5300 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5301 // docTest_item['action'] = 'DACCodeOfVoltage(2.047998) expect 0x07ffff'
whismanoid 25:9d4012b0887f 5302 // docTest_item['remarks'] = '2.048V + -0.5LSB 0x07ffff not 0x080000'
whismanoid 25:9d4012b0887f 5303 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5304 // docTest_item['arglist'] = '2.047998'
whismanoid 25:9d4012b0887f 5305 // docTest_item['expect-value'] = '0x07ffff'
whismanoid 25:9d4012b0887f 5306 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + -0.5LSB 0x07ffff not 0x080000
whismanoid 33:2c675744a01b 5307 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5308 // call-function
whismanoid 27:485b1b2f334c 5309 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5310 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047998), (uint32_t)0x07ffff); // 2.048V + -0.5LSB 0x07ffff not 0x080000
whismanoid 25:9d4012b0887f 5311 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 5312 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5313 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5314 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5315 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5316
whismanoid 25:9d4012b0887f 5317 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048000) expect 0x080000 // 2.048V + 0.0LSB
whismanoid 25:9d4012b0887f 5318 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5319 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5320 // docTest_item['action'] = 'DACCodeOfVoltage(2.048000) expect 0x080000'
whismanoid 25:9d4012b0887f 5321 // docTest_item['remarks'] = '2.048V + 0.0LSB'
whismanoid 25:9d4012b0887f 5322 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5323 // docTest_item['arglist'] = '2.048000'
whismanoid 25:9d4012b0887f 5324 // docTest_item['expect-value'] = '0x080000'
whismanoid 25:9d4012b0887f 5325 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + 0.0LSB
whismanoid 33:2c675744a01b 5326 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5327 // call-function
whismanoid 27:485b1b2f334c 5328 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5329 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048000), (uint32_t)0x080000); // 2.048V + 0.0LSB
whismanoid 25:9d4012b0887f 5330 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048000, /* expect: */ (uint32_t)0x080000); // 2.048V + 0.0LSB
whismanoid 30:13fc9d492ee0 5331 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5332 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5333 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5334 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5335
whismanoid 25:9d4012b0887f 5336 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048002) expect 0x080001 // 2.048V + 0.5LSB
whismanoid 25:9d4012b0887f 5337 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5338 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5339 // docTest_item['action'] = 'DACCodeOfVoltage(2.048002) expect 0x080001'
whismanoid 25:9d4012b0887f 5340 // docTest_item['remarks'] = '2.048V + 0.5LSB'
whismanoid 25:9d4012b0887f 5341 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5342 // docTest_item['arglist'] = '2.048002'
whismanoid 25:9d4012b0887f 5343 // docTest_item['expect-value'] = '0x080001'
whismanoid 25:9d4012b0887f 5344 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + 0.5LSB
whismanoid 33:2c675744a01b 5345 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5346 // call-function
whismanoid 27:485b1b2f334c 5347 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5348 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048002), (uint32_t)0x080001); // 2.048V + 0.5LSB
whismanoid 25:9d4012b0887f 5349 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048002, /* expect: */ (uint32_t)0x080001); // 2.048V + 0.5LSB
whismanoid 30:13fc9d492ee0 5350 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5351 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5352 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5353 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5354
whismanoid 25:9d4012b0887f 5355 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048004) expect 0x080001 // 2.048V + 1.0LSB
whismanoid 25:9d4012b0887f 5356 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5357 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5358 // docTest_item['action'] = 'DACCodeOfVoltage(2.048004) expect 0x080001'
whismanoid 25:9d4012b0887f 5359 // docTest_item['remarks'] = '2.048V + 1.0LSB'
whismanoid 25:9d4012b0887f 5360 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5361 // docTest_item['arglist'] = '2.048004'
whismanoid 25:9d4012b0887f 5362 // docTest_item['expect-value'] = '0x080001'
whismanoid 25:9d4012b0887f 5363 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + 1.0LSB
whismanoid 33:2c675744a01b 5364 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5365 // call-function
whismanoid 27:485b1b2f334c 5366 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5367 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048004), (uint32_t)0x080001); // 2.048V + 1.0LSB
whismanoid 25:9d4012b0887f 5368 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048004, /* expect: */ (uint32_t)0x080001); // 2.048V + 1.0LSB
whismanoid 30:13fc9d492ee0 5369 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5370 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5371 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5372 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5373
whismanoid 25:9d4012b0887f 5374 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048006) expect 0x080002 // 2.048V + 1.5LSB
whismanoid 25:9d4012b0887f 5375 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5376 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5377 // docTest_item['action'] = 'DACCodeOfVoltage(2.048006) expect 0x080002'
whismanoid 25:9d4012b0887f 5378 // docTest_item['remarks'] = '2.048V + 1.5LSB'
whismanoid 25:9d4012b0887f 5379 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5380 // docTest_item['arglist'] = '2.048006'
whismanoid 25:9d4012b0887f 5381 // docTest_item['expect-value'] = '0x080002'
whismanoid 25:9d4012b0887f 5382 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + 1.5LSB
whismanoid 33:2c675744a01b 5383 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5384 // call-function
whismanoid 27:485b1b2f334c 5385 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5386 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048006), (uint32_t)0x080002); // 2.048V + 1.5LSB
whismanoid 25:9d4012b0887f 5387 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048006, /* expect: */ (uint32_t)0x080002); // 2.048V + 1.5LSB
whismanoid 30:13fc9d492ee0 5388 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5389 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5390 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5391 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5392
whismanoid 25:9d4012b0887f 5393 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048008) expect 0x080002 // 2.048V + 2.0LSB
whismanoid 25:9d4012b0887f 5394 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5395 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5396 // docTest_item['action'] = 'DACCodeOfVoltage(2.048008) expect 0x080002'
whismanoid 25:9d4012b0887f 5397 // docTest_item['remarks'] = '2.048V + 2.0LSB'
whismanoid 25:9d4012b0887f 5398 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5399 // docTest_item['arglist'] = '2.048008'
whismanoid 25:9d4012b0887f 5400 // docTest_item['expect-value'] = '0x080002'
whismanoid 25:9d4012b0887f 5401 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + 2.0LSB
whismanoid 33:2c675744a01b 5402 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5403 // call-function
whismanoid 27:485b1b2f334c 5404 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5405 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048008), (uint32_t)0x080002); // 2.048V + 2.0LSB
whismanoid 25:9d4012b0887f 5406 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048008, /* expect: */ (uint32_t)0x080002); // 2.048V + 2.0LSB
whismanoid 30:13fc9d492ee0 5407 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5408 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5409 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5410 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5411
whismanoid 25:9d4012b0887f 5412 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048010) expect 0x080003 // 2.048V + 2.5LSB
whismanoid 25:9d4012b0887f 5413 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5414 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5415 // docTest_item['action'] = 'DACCodeOfVoltage(2.048010) expect 0x080003'
whismanoid 25:9d4012b0887f 5416 // docTest_item['remarks'] = '2.048V + 2.5LSB'
whismanoid 25:9d4012b0887f 5417 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5418 // docTest_item['arglist'] = '2.048010'
whismanoid 25:9d4012b0887f 5419 // docTest_item['expect-value'] = '0x080003'
whismanoid 25:9d4012b0887f 5420 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + 2.5LSB
whismanoid 33:2c675744a01b 5421 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5422 // call-function
whismanoid 27:485b1b2f334c 5423 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5424 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048010), (uint32_t)0x080003); // 2.048V + 2.5LSB
whismanoid 25:9d4012b0887f 5425 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048010, /* expect: */ (uint32_t)0x080003); // 2.048V + 2.5LSB
whismanoid 30:13fc9d492ee0 5426 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5427 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5428 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5429 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5430
whismanoid 25:9d4012b0887f 5431 // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048012) expect 0x080003 // 2.048V + 3.0LSB
whismanoid 25:9d4012b0887f 5432 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5433 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5434 // docTest_item['action'] = 'DACCodeOfVoltage(2.048012) expect 0x080003'
whismanoid 25:9d4012b0887f 5435 // docTest_item['remarks'] = '2.048V + 3.0LSB'
whismanoid 25:9d4012b0887f 5436 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5437 // docTest_item['arglist'] = '2.048012'
whismanoid 25:9d4012b0887f 5438 // docTest_item['expect-value'] = '0x080003'
whismanoid 25:9d4012b0887f 5439 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + 3.0LSB
whismanoid 33:2c675744a01b 5440 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5441 // call-function
whismanoid 27:485b1b2f334c 5442 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5443 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048012), (uint32_t)0x080003); // 2.048V + 3.0LSB
whismanoid 25:9d4012b0887f 5444 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048012, /* expect: */ (uint32_t)0x080003); // 2.048V + 3.0LSB
whismanoid 30:13fc9d492ee0 5445 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5446 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5447 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5448 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5449
whismanoid 25:9d4012b0887f 5450 // @test group DACCodeOfVoltage tinyTester.print("test_lsb_sweep V = 1.024000V LSBradius = 3LSB")
whismanoid 25:9d4012b0887f 5451 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 5452 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5453 // docTest_item['action'] = 'tinyTester.print("test_lsb_sweep V = 1.024000V LSBradius = 3LSB")'
whismanoid 25:9d4012b0887f 5454 // docTest_item['arglist'] = 'test_lsb_sweep V = 1.024000V LSBradius = 3LSB'
whismanoid 25:9d4012b0887f 5455 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None
whismanoid 33:2c675744a01b 5456 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5457 // print-string
whismanoid 25:9d4012b0887f 5458 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 5459 // tinyTesterPrintStringLiteral = "test_lsb_sweep V = 1.024000V LSBradius = 3LSB"
whismanoid 25:9d4012b0887f 5460 tinyTester.print("test_lsb_sweep V = 1.024000V LSBradius = 3LSB");
whismanoid 30:13fc9d492ee0 5461 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5462 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5463 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5464 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5465
whismanoid 25:9d4012b0887f 5466 // @test group DACCodeOfVoltage DACCodeOfVoltage(1.023988) expect 0x03fffd // 1.024V + -3.0LSB
whismanoid 25:9d4012b0887f 5467 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5468 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5469 // docTest_item['action'] = 'DACCodeOfVoltage(1.023988) expect 0x03fffd'
whismanoid 25:9d4012b0887f 5470 // docTest_item['remarks'] = '1.024V + -3.0LSB'
whismanoid 25:9d4012b0887f 5471 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5472 // docTest_item['arglist'] = '1.023988'
whismanoid 25:9d4012b0887f 5473 // docTest_item['expect-value'] = '0x03fffd'
whismanoid 25:9d4012b0887f 5474 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + -3.0LSB
whismanoid 33:2c675744a01b 5475 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5476 // call-function
whismanoid 27:485b1b2f334c 5477 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5478 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.023988), (uint32_t)0x03fffd); // 1.024V + -3.0LSB
whismanoid 25:9d4012b0887f 5479 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.023988, /* expect: */ (uint32_t)0x03fffd); // 1.024V + -3.0LSB
whismanoid 30:13fc9d492ee0 5480 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5481 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5482 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5483 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5484
whismanoid 25:9d4012b0887f 5485 // @test group DACCodeOfVoltage DACCodeOfVoltage(1.023990) expect 0x03fffd // 1.024V + -2.5LSB 0x03fffd not 0x03fffe
whismanoid 25:9d4012b0887f 5486 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5487 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5488 // docTest_item['action'] = 'DACCodeOfVoltage(1.023990) expect 0x03fffd'
whismanoid 25:9d4012b0887f 5489 // docTest_item['remarks'] = '1.024V + -2.5LSB 0x03fffd not 0x03fffe'
whismanoid 25:9d4012b0887f 5490 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5491 // docTest_item['arglist'] = '1.023990'
whismanoid 25:9d4012b0887f 5492 // docTest_item['expect-value'] = '0x03fffd'
whismanoid 25:9d4012b0887f 5493 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + -2.5LSB 0x03fffd not 0x03fffe
whismanoid 33:2c675744a01b 5494 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5495 // call-function
whismanoid 27:485b1b2f334c 5496 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5497 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.023990), (uint32_t)0x03fffd); // 1.024V + -2.5LSB 0x03fffd not 0x03fffe
whismanoid 25:9d4012b0887f 5498 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 5499 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5500 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5501 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5502 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5503
whismanoid 25:9d4012b0887f 5504 // @test group DACCodeOfVoltage DACCodeOfVoltage(1.023992) expect 0x03fffe // 1.024V + -2.0LSB
whismanoid 25:9d4012b0887f 5505 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5506 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5507 // docTest_item['action'] = 'DACCodeOfVoltage(1.023992) expect 0x03fffe'
whismanoid 25:9d4012b0887f 5508 // docTest_item['remarks'] = '1.024V + -2.0LSB'
whismanoid 25:9d4012b0887f 5509 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5510 // docTest_item['arglist'] = '1.023992'
whismanoid 25:9d4012b0887f 5511 // docTest_item['expect-value'] = '0x03fffe'
whismanoid 25:9d4012b0887f 5512 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + -2.0LSB
whismanoid 33:2c675744a01b 5513 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5514 // call-function
whismanoid 27:485b1b2f334c 5515 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5516 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.023992), (uint32_t)0x03fffe); // 1.024V + -2.0LSB
whismanoid 25:9d4012b0887f 5517 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.023992, /* expect: */ (uint32_t)0x03fffe); // 1.024V + -2.0LSB
whismanoid 30:13fc9d492ee0 5518 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5519 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5520 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5521 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5522
whismanoid 25:9d4012b0887f 5523 // @test group DACCodeOfVoltage DACCodeOfVoltage(1.023994) expect 0x03fffe // 1.024V + -1.5LSB
whismanoid 25:9d4012b0887f 5524 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5525 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5526 // docTest_item['action'] = 'DACCodeOfVoltage(1.023994) expect 0x03fffe'
whismanoid 25:9d4012b0887f 5527 // docTest_item['remarks'] = '1.024V + -1.5LSB'
whismanoid 25:9d4012b0887f 5528 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5529 // docTest_item['arglist'] = '1.023994'
whismanoid 25:9d4012b0887f 5530 // docTest_item['expect-value'] = '0x03fffe'
whismanoid 25:9d4012b0887f 5531 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + -1.5LSB
whismanoid 33:2c675744a01b 5532 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5533 // call-function
whismanoid 27:485b1b2f334c 5534 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5535 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.023994), (uint32_t)0x03fffe); // 1.024V + -1.5LSB
whismanoid 25:9d4012b0887f 5536 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.023994, /* expect: */ (uint32_t)0x03fffe); // 1.024V + -1.5LSB
whismanoid 30:13fc9d492ee0 5537 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5538 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5539 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5540 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5541
whismanoid 25:9d4012b0887f 5542 // @test group DACCodeOfVoltage DACCodeOfVoltage(1.023996) expect 0x03ffff // 1.024V + -1.0LSB
whismanoid 25:9d4012b0887f 5543 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5544 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5545 // docTest_item['action'] = 'DACCodeOfVoltage(1.023996) expect 0x03ffff'
whismanoid 25:9d4012b0887f 5546 // docTest_item['remarks'] = '1.024V + -1.0LSB'
whismanoid 25:9d4012b0887f 5547 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5548 // docTest_item['arglist'] = '1.023996'
whismanoid 25:9d4012b0887f 5549 // docTest_item['expect-value'] = '0x03ffff'
whismanoid 25:9d4012b0887f 5550 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + -1.0LSB
whismanoid 33:2c675744a01b 5551 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5552 // call-function
whismanoid 27:485b1b2f334c 5553 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5554 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.023996), (uint32_t)0x03ffff); // 1.024V + -1.0LSB
whismanoid 25:9d4012b0887f 5555 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.023996, /* expect: */ (uint32_t)0x03ffff); // 1.024V + -1.0LSB
whismanoid 30:13fc9d492ee0 5556 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5557 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5558 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5559 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5560
whismanoid 25:9d4012b0887f 5561 // @test group DACCodeOfVoltage DACCodeOfVoltage(1.023998) expect 0x03ffff // 1.024V + -0.5LSB 0x03ffff not 0x040000
whismanoid 25:9d4012b0887f 5562 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5563 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5564 // docTest_item['action'] = 'DACCodeOfVoltage(1.023998) expect 0x03ffff'
whismanoid 25:9d4012b0887f 5565 // docTest_item['remarks'] = '1.024V + -0.5LSB 0x03ffff not 0x040000'
whismanoid 25:9d4012b0887f 5566 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5567 // docTest_item['arglist'] = '1.023998'
whismanoid 25:9d4012b0887f 5568 // docTest_item['expect-value'] = '0x03ffff'
whismanoid 25:9d4012b0887f 5569 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + -0.5LSB 0x03ffff not 0x040000
whismanoid 33:2c675744a01b 5570 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5571 // call-function
whismanoid 27:485b1b2f334c 5572 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5573 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.023998), (uint32_t)0x03ffff); // 1.024V + -0.5LSB 0x03ffff not 0x040000
whismanoid 25:9d4012b0887f 5574 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 5575 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5576 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5577 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5578 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5579
whismanoid 25:9d4012b0887f 5580 // @test group DACCodeOfVoltage DACCodeOfVoltage(1.024000) expect 0x040000 // 1.024V + 0.0LSB
whismanoid 25:9d4012b0887f 5581 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5582 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5583 // docTest_item['action'] = 'DACCodeOfVoltage(1.024000) expect 0x040000'
whismanoid 25:9d4012b0887f 5584 // docTest_item['remarks'] = '1.024V + 0.0LSB'
whismanoid 25:9d4012b0887f 5585 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5586 // docTest_item['arglist'] = '1.024000'
whismanoid 25:9d4012b0887f 5587 // docTest_item['expect-value'] = '0x040000'
whismanoid 25:9d4012b0887f 5588 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + 0.0LSB
whismanoid 33:2c675744a01b 5589 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5590 // call-function
whismanoid 27:485b1b2f334c 5591 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5592 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.024000), (uint32_t)0x040000); // 1.024V + 0.0LSB
whismanoid 25:9d4012b0887f 5593 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.024000, /* expect: */ (uint32_t)0x040000); // 1.024V + 0.0LSB
whismanoid 30:13fc9d492ee0 5594 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5595 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5596 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5597 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5598
whismanoid 25:9d4012b0887f 5599 // @test group DACCodeOfVoltage DACCodeOfVoltage(1.024002) expect 0x040001 // 1.024V + 0.5LSB
whismanoid 25:9d4012b0887f 5600 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5601 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5602 // docTest_item['action'] = 'DACCodeOfVoltage(1.024002) expect 0x040001'
whismanoid 25:9d4012b0887f 5603 // docTest_item['remarks'] = '1.024V + 0.5LSB'
whismanoid 25:9d4012b0887f 5604 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5605 // docTest_item['arglist'] = '1.024002'
whismanoid 25:9d4012b0887f 5606 // docTest_item['expect-value'] = '0x040001'
whismanoid 25:9d4012b0887f 5607 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + 0.5LSB
whismanoid 33:2c675744a01b 5608 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5609 // call-function
whismanoid 27:485b1b2f334c 5610 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5611 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.024002), (uint32_t)0x040001); // 1.024V + 0.5LSB
whismanoid 25:9d4012b0887f 5612 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.024002, /* expect: */ (uint32_t)0x040001); // 1.024V + 0.5LSB
whismanoid 30:13fc9d492ee0 5613 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5614 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5615 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5616 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5617
whismanoid 25:9d4012b0887f 5618 // @test group DACCodeOfVoltage DACCodeOfVoltage(1.024004) expect 0x040001 // 1.024V + 1.0LSB
whismanoid 25:9d4012b0887f 5619 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5620 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5621 // docTest_item['action'] = 'DACCodeOfVoltage(1.024004) expect 0x040001'
whismanoid 25:9d4012b0887f 5622 // docTest_item['remarks'] = '1.024V + 1.0LSB'
whismanoid 25:9d4012b0887f 5623 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5624 // docTest_item['arglist'] = '1.024004'
whismanoid 25:9d4012b0887f 5625 // docTest_item['expect-value'] = '0x040001'
whismanoid 25:9d4012b0887f 5626 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + 1.0LSB
whismanoid 33:2c675744a01b 5627 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5628 // call-function
whismanoid 27:485b1b2f334c 5629 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5630 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.024004), (uint32_t)0x040001); // 1.024V + 1.0LSB
whismanoid 25:9d4012b0887f 5631 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.024004, /* expect: */ (uint32_t)0x040001); // 1.024V + 1.0LSB
whismanoid 30:13fc9d492ee0 5632 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5633 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5634 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5635 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5636
whismanoid 25:9d4012b0887f 5637 // @test group DACCodeOfVoltage DACCodeOfVoltage(1.024006) expect 0x040002 // 1.024V + 1.5LSB
whismanoid 25:9d4012b0887f 5638 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5639 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5640 // docTest_item['action'] = 'DACCodeOfVoltage(1.024006) expect 0x040002'
whismanoid 25:9d4012b0887f 5641 // docTest_item['remarks'] = '1.024V + 1.5LSB'
whismanoid 25:9d4012b0887f 5642 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5643 // docTest_item['arglist'] = '1.024006'
whismanoid 25:9d4012b0887f 5644 // docTest_item['expect-value'] = '0x040002'
whismanoid 25:9d4012b0887f 5645 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + 1.5LSB
whismanoid 33:2c675744a01b 5646 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5647 // call-function
whismanoid 27:485b1b2f334c 5648 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5649 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.024006), (uint32_t)0x040002); // 1.024V + 1.5LSB
whismanoid 25:9d4012b0887f 5650 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.024006, /* expect: */ (uint32_t)0x040002); // 1.024V + 1.5LSB
whismanoid 30:13fc9d492ee0 5651 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5652 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5653 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5654 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5655
whismanoid 25:9d4012b0887f 5656 // @test group DACCodeOfVoltage DACCodeOfVoltage(1.024008) expect 0x040002 // 1.024V + 2.0LSB
whismanoid 25:9d4012b0887f 5657 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5658 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5659 // docTest_item['action'] = 'DACCodeOfVoltage(1.024008) expect 0x040002'
whismanoid 25:9d4012b0887f 5660 // docTest_item['remarks'] = '1.024V + 2.0LSB'
whismanoid 25:9d4012b0887f 5661 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5662 // docTest_item['arglist'] = '1.024008'
whismanoid 25:9d4012b0887f 5663 // docTest_item['expect-value'] = '0x040002'
whismanoid 25:9d4012b0887f 5664 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + 2.0LSB
whismanoid 33:2c675744a01b 5665 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5666 // call-function
whismanoid 27:485b1b2f334c 5667 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5668 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.024008), (uint32_t)0x040002); // 1.024V + 2.0LSB
whismanoid 25:9d4012b0887f 5669 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.024008, /* expect: */ (uint32_t)0x040002); // 1.024V + 2.0LSB
whismanoid 30:13fc9d492ee0 5670 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5671 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5672 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5673 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5674
whismanoid 25:9d4012b0887f 5675 // @test group DACCodeOfVoltage DACCodeOfVoltage(1.024010) expect 0x040003 // 1.024V + 2.5LSB
whismanoid 25:9d4012b0887f 5676 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5677 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5678 // docTest_item['action'] = 'DACCodeOfVoltage(1.024010) expect 0x040003'
whismanoid 25:9d4012b0887f 5679 // docTest_item['remarks'] = '1.024V + 2.5LSB'
whismanoid 25:9d4012b0887f 5680 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5681 // docTest_item['arglist'] = '1.024010'
whismanoid 25:9d4012b0887f 5682 // docTest_item['expect-value'] = '0x040003'
whismanoid 25:9d4012b0887f 5683 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + 2.5LSB
whismanoid 33:2c675744a01b 5684 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5685 // call-function
whismanoid 27:485b1b2f334c 5686 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5687 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.024010), (uint32_t)0x040003); // 1.024V + 2.5LSB
whismanoid 25:9d4012b0887f 5688 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.024010, /* expect: */ (uint32_t)0x040003); // 1.024V + 2.5LSB
whismanoid 30:13fc9d492ee0 5689 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5690 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5691 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5692 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5693
whismanoid 25:9d4012b0887f 5694 // @test group DACCodeOfVoltage DACCodeOfVoltage(1.024012) expect 0x040003 // 1.024V + 3.0LSB
whismanoid 25:9d4012b0887f 5695 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5696 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5697 // docTest_item['action'] = 'DACCodeOfVoltage(1.024012) expect 0x040003'
whismanoid 25:9d4012b0887f 5698 // docTest_item['remarks'] = '1.024V + 3.0LSB'
whismanoid 25:9d4012b0887f 5699 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5700 // docTest_item['arglist'] = '1.024012'
whismanoid 25:9d4012b0887f 5701 // docTest_item['expect-value'] = '0x040003'
whismanoid 25:9d4012b0887f 5702 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + 3.0LSB
whismanoid 33:2c675744a01b 5703 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5704 // call-function
whismanoid 27:485b1b2f334c 5705 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5706 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.024012), (uint32_t)0x040003); // 1.024V + 3.0LSB
whismanoid 25:9d4012b0887f 5707 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.024012, /* expect: */ (uint32_t)0x040003); // 1.024V + 3.0LSB
whismanoid 30:13fc9d492ee0 5708 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5709 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5710 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5711 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5712
whismanoid 25:9d4012b0887f 5713 // @test group DACCodeOfVoltage tinyTester.print("test_lsb_sweep V = 0.000000V LSBradius = 3LSB")
whismanoid 25:9d4012b0887f 5714 // docTest_item['actionType'] = 'print-string'
whismanoid 25:9d4012b0887f 5715 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5716 // docTest_item['action'] = 'tinyTester.print("test_lsb_sweep V = 0.000000V LSBradius = 3LSB")'
whismanoid 25:9d4012b0887f 5717 // docTest_item['arglist'] = 'test_lsb_sweep V = 0.000000V LSBradius = 3LSB'
whismanoid 25:9d4012b0887f 5718 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None
whismanoid 33:2c675744a01b 5719 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5720 // print-string
whismanoid 25:9d4012b0887f 5721 // tinyTesterFuncName = "tinyTester.print"
whismanoid 25:9d4012b0887f 5722 // tinyTesterPrintStringLiteral = "test_lsb_sweep V = 0.000000V LSBradius = 3LSB"
whismanoid 25:9d4012b0887f 5723 tinyTester.print("test_lsb_sweep V = 0.000000V LSBradius = 3LSB");
whismanoid 30:13fc9d492ee0 5724 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5725 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5726 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5727 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5728
whismanoid 25:9d4012b0887f 5729 // @test group DACCodeOfVoltage DACCodeOfVoltage(-0.000012) expect 0x000000 // 0.000V + -3.0LSB
whismanoid 25:9d4012b0887f 5730 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5731 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5732 // docTest_item['action'] = 'DACCodeOfVoltage(-0.000012) expect 0x000000'
whismanoid 25:9d4012b0887f 5733 // docTest_item['remarks'] = '0.000V + -3.0LSB'
whismanoid 25:9d4012b0887f 5734 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5735 // docTest_item['arglist'] = '-0.000012'
whismanoid 25:9d4012b0887f 5736 // docTest_item['expect-value'] = '0x000000'
whismanoid 25:9d4012b0887f 5737 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + -3.0LSB
whismanoid 33:2c675744a01b 5738 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5739 // call-function
whismanoid 27:485b1b2f334c 5740 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5741 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)-0.000012), (uint32_t)0x000000); // 0.000V + -3.0LSB
whismanoid 25:9d4012b0887f 5742 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)-0.000012, /* expect: */ (uint32_t)0x000000); // 0.000V + -3.0LSB
whismanoid 30:13fc9d492ee0 5743 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5744 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5745 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5746 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5747
whismanoid 25:9d4012b0887f 5748 // @test group DACCodeOfVoltage DACCodeOfVoltage(-0.000010) expect 0x000000 // 0.000V + -2.5LSB
whismanoid 25:9d4012b0887f 5749 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5750 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5751 // docTest_item['action'] = 'DACCodeOfVoltage(-0.000010) expect 0x000000'
whismanoid 25:9d4012b0887f 5752 // docTest_item['remarks'] = '0.000V + -2.5LSB'
whismanoid 25:9d4012b0887f 5753 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5754 // docTest_item['arglist'] = '-0.000010'
whismanoid 25:9d4012b0887f 5755 // docTest_item['expect-value'] = '0x000000'
whismanoid 25:9d4012b0887f 5756 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + -2.5LSB
whismanoid 33:2c675744a01b 5757 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5758 // call-function
whismanoid 27:485b1b2f334c 5759 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5760 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)-0.000010), (uint32_t)0x000000); // 0.000V + -2.5LSB
whismanoid 25:9d4012b0887f 5761 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)-0.000010, /* expect: */ (uint32_t)0x000000); // 0.000V + -2.5LSB
whismanoid 30:13fc9d492ee0 5762 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5763 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5764 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5765 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5766
whismanoid 25:9d4012b0887f 5767 // @test group DACCodeOfVoltage DACCodeOfVoltage(-0.000008) expect 0x000000 // 0.000V + -2.0LSB
whismanoid 25:9d4012b0887f 5768 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5769 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5770 // docTest_item['action'] = 'DACCodeOfVoltage(-0.000008) expect 0x000000'
whismanoid 25:9d4012b0887f 5771 // docTest_item['remarks'] = '0.000V + -2.0LSB'
whismanoid 25:9d4012b0887f 5772 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5773 // docTest_item['arglist'] = '-0.000008'
whismanoid 25:9d4012b0887f 5774 // docTest_item['expect-value'] = '0x000000'
whismanoid 25:9d4012b0887f 5775 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + -2.0LSB
whismanoid 33:2c675744a01b 5776 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5777 // call-function
whismanoid 27:485b1b2f334c 5778 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5779 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)-0.000008), (uint32_t)0x000000); // 0.000V + -2.0LSB
whismanoid 25:9d4012b0887f 5780 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)-0.000008, /* expect: */ (uint32_t)0x000000); // 0.000V + -2.0LSB
whismanoid 30:13fc9d492ee0 5781 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5782 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5783 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5784 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5785
whismanoid 25:9d4012b0887f 5786 // @test group DACCodeOfVoltage DACCodeOfVoltage(-0.000006) expect 0x000000 // 0.000V + -1.5LSB
whismanoid 25:9d4012b0887f 5787 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5788 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5789 // docTest_item['action'] = 'DACCodeOfVoltage(-0.000006) expect 0x000000'
whismanoid 25:9d4012b0887f 5790 // docTest_item['remarks'] = '0.000V + -1.5LSB'
whismanoid 25:9d4012b0887f 5791 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5792 // docTest_item['arglist'] = '-0.000006'
whismanoid 25:9d4012b0887f 5793 // docTest_item['expect-value'] = '0x000000'
whismanoid 25:9d4012b0887f 5794 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + -1.5LSB
whismanoid 33:2c675744a01b 5795 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5796 // call-function
whismanoid 27:485b1b2f334c 5797 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5798 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)-0.000006), (uint32_t)0x000000); // 0.000V + -1.5LSB
whismanoid 25:9d4012b0887f 5799 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)-0.000006, /* expect: */ (uint32_t)0x000000); // 0.000V + -1.5LSB
whismanoid 30:13fc9d492ee0 5800 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5801 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5802 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5803 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5804
whismanoid 25:9d4012b0887f 5805 // @test group DACCodeOfVoltage DACCodeOfVoltage(-0.000004) expect 0x000000 // 0.000V + -1.0LSB
whismanoid 25:9d4012b0887f 5806 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5807 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5808 // docTest_item['action'] = 'DACCodeOfVoltage(-0.000004) expect 0x000000'
whismanoid 25:9d4012b0887f 5809 // docTest_item['remarks'] = '0.000V + -1.0LSB'
whismanoid 25:9d4012b0887f 5810 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5811 // docTest_item['arglist'] = '-0.000004'
whismanoid 25:9d4012b0887f 5812 // docTest_item['expect-value'] = '0x000000'
whismanoid 25:9d4012b0887f 5813 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + -1.0LSB
whismanoid 33:2c675744a01b 5814 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5815 // call-function
whismanoid 27:485b1b2f334c 5816 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5817 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)-0.000004), (uint32_t)0x000000); // 0.000V + -1.0LSB
whismanoid 25:9d4012b0887f 5818 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)-0.000004, /* expect: */ (uint32_t)0x000000); // 0.000V + -1.0LSB
whismanoid 30:13fc9d492ee0 5819 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5820 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5821 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5822 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5823
whismanoid 25:9d4012b0887f 5824 // @test group DACCodeOfVoltage DACCodeOfVoltage(-0.000002) expect 0x000000 // 0.000V + -0.5LSB
whismanoid 25:9d4012b0887f 5825 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5826 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5827 // docTest_item['action'] = 'DACCodeOfVoltage(-0.000002) expect 0x000000'
whismanoid 25:9d4012b0887f 5828 // docTest_item['remarks'] = '0.000V + -0.5LSB'
whismanoid 25:9d4012b0887f 5829 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5830 // docTest_item['arglist'] = '-0.000002'
whismanoid 25:9d4012b0887f 5831 // docTest_item['expect-value'] = '0x000000'
whismanoid 25:9d4012b0887f 5832 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + -0.5LSB
whismanoid 33:2c675744a01b 5833 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5834 // call-function
whismanoid 27:485b1b2f334c 5835 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5836 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)-0.000002), (uint32_t)0x000000); // 0.000V + -0.5LSB
whismanoid 25:9d4012b0887f 5837 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)-0.000002, /* expect: */ (uint32_t)0x000000); // 0.000V + -0.5LSB
whismanoid 30:13fc9d492ee0 5838 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5839 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5840 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5841 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5842
whismanoid 25:9d4012b0887f 5843 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.000000) expect 0x000000 // 0.000V + 0.0LSB
whismanoid 25:9d4012b0887f 5844 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5845 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5846 // docTest_item['action'] = 'DACCodeOfVoltage(0.000000) expect 0x000000'
whismanoid 25:9d4012b0887f 5847 // docTest_item['remarks'] = '0.000V + 0.0LSB'
whismanoid 25:9d4012b0887f 5848 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5849 // docTest_item['arglist'] = '0.000000'
whismanoid 25:9d4012b0887f 5850 // docTest_item['expect-value'] = '0x000000'
whismanoid 25:9d4012b0887f 5851 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + 0.0LSB
whismanoid 33:2c675744a01b 5852 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5853 // call-function
whismanoid 27:485b1b2f334c 5854 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5855 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.000000), (uint32_t)0x000000); // 0.000V + 0.0LSB
whismanoid 25:9d4012b0887f 5856 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.000000, /* expect: */ (uint32_t)0x000000); // 0.000V + 0.0LSB
whismanoid 30:13fc9d492ee0 5857 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5858 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5859 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5860 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5861
whismanoid 25:9d4012b0887f 5862 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.000002) expect 0x000001 // 0.000V + 0.5LSB
whismanoid 25:9d4012b0887f 5863 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5864 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5865 // docTest_item['action'] = 'DACCodeOfVoltage(0.000002) expect 0x000001'
whismanoid 25:9d4012b0887f 5866 // docTest_item['remarks'] = '0.000V + 0.5LSB'
whismanoid 25:9d4012b0887f 5867 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5868 // docTest_item['arglist'] = '0.000002'
whismanoid 25:9d4012b0887f 5869 // docTest_item['expect-value'] = '0x000001'
whismanoid 25:9d4012b0887f 5870 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + 0.5LSB
whismanoid 33:2c675744a01b 5871 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5872 // call-function
whismanoid 27:485b1b2f334c 5873 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5874 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.000002), (uint32_t)0x000001); // 0.000V + 0.5LSB
whismanoid 25:9d4012b0887f 5875 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.000002, /* expect: */ (uint32_t)0x000001); // 0.000V + 0.5LSB
whismanoid 30:13fc9d492ee0 5876 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5877 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5878 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5879 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5880
whismanoid 25:9d4012b0887f 5881 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.000004) expect 0x000001 // 0.000V + 1.0LSB
whismanoid 25:9d4012b0887f 5882 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5883 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5884 // docTest_item['action'] = 'DACCodeOfVoltage(0.000004) expect 0x000001'
whismanoid 25:9d4012b0887f 5885 // docTest_item['remarks'] = '0.000V + 1.0LSB'
whismanoid 25:9d4012b0887f 5886 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5887 // docTest_item['arglist'] = '0.000004'
whismanoid 25:9d4012b0887f 5888 // docTest_item['expect-value'] = '0x000001'
whismanoid 25:9d4012b0887f 5889 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + 1.0LSB
whismanoid 33:2c675744a01b 5890 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5891 // call-function
whismanoid 27:485b1b2f334c 5892 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5893 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.000004), (uint32_t)0x000001); // 0.000V + 1.0LSB
whismanoid 25:9d4012b0887f 5894 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.000004, /* expect: */ (uint32_t)0x000001); // 0.000V + 1.0LSB
whismanoid 30:13fc9d492ee0 5895 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5896 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5897 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5898 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5899
whismanoid 25:9d4012b0887f 5900 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.000006) expect 0x000002 // 0.000V + 1.5LSB
whismanoid 25:9d4012b0887f 5901 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5902 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5903 // docTest_item['action'] = 'DACCodeOfVoltage(0.000006) expect 0x000002'
whismanoid 25:9d4012b0887f 5904 // docTest_item['remarks'] = '0.000V + 1.5LSB'
whismanoid 25:9d4012b0887f 5905 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5906 // docTest_item['arglist'] = '0.000006'
whismanoid 25:9d4012b0887f 5907 // docTest_item['expect-value'] = '0x000002'
whismanoid 25:9d4012b0887f 5908 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + 1.5LSB
whismanoid 33:2c675744a01b 5909 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5910 // call-function
whismanoid 27:485b1b2f334c 5911 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5912 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.000006), (uint32_t)0x000002); // 0.000V + 1.5LSB
whismanoid 25:9d4012b0887f 5913 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.000006, /* expect: */ (uint32_t)0x000002); // 0.000V + 1.5LSB
whismanoid 30:13fc9d492ee0 5914 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5915 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5916 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5917 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5918
whismanoid 25:9d4012b0887f 5919 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.000008) expect 0x000002 // 0.000V + 2.0LSB
whismanoid 25:9d4012b0887f 5920 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5921 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5922 // docTest_item['action'] = 'DACCodeOfVoltage(0.000008) expect 0x000002'
whismanoid 25:9d4012b0887f 5923 // docTest_item['remarks'] = '0.000V + 2.0LSB'
whismanoid 25:9d4012b0887f 5924 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5925 // docTest_item['arglist'] = '0.000008'
whismanoid 25:9d4012b0887f 5926 // docTest_item['expect-value'] = '0x000002'
whismanoid 25:9d4012b0887f 5927 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + 2.0LSB
whismanoid 33:2c675744a01b 5928 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5929 // call-function
whismanoid 27:485b1b2f334c 5930 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5931 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.000008), (uint32_t)0x000002); // 0.000V + 2.0LSB
whismanoid 25:9d4012b0887f 5932 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.000008, /* expect: */ (uint32_t)0x000002); // 0.000V + 2.0LSB
whismanoid 30:13fc9d492ee0 5933 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5934 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5935 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5936 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5937
whismanoid 25:9d4012b0887f 5938 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.000010) expect 0x000003 // 0.000V + 2.5LSB
whismanoid 25:9d4012b0887f 5939 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5940 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5941 // docTest_item['action'] = 'DACCodeOfVoltage(0.000010) expect 0x000003'
whismanoid 25:9d4012b0887f 5942 // docTest_item['remarks'] = '0.000V + 2.5LSB'
whismanoid 25:9d4012b0887f 5943 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5944 // docTest_item['arglist'] = '0.000010'
whismanoid 25:9d4012b0887f 5945 // docTest_item['expect-value'] = '0x000003'
whismanoid 25:9d4012b0887f 5946 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + 2.5LSB
whismanoid 33:2c675744a01b 5947 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5948 // call-function
whismanoid 27:485b1b2f334c 5949 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5950 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.000010), (uint32_t)0x000003); // 0.000V + 2.5LSB
whismanoid 25:9d4012b0887f 5951 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.000010, /* expect: */ (uint32_t)0x000003); // 0.000V + 2.5LSB
whismanoid 30:13fc9d492ee0 5952 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5953 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5954 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5955 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5956
whismanoid 25:9d4012b0887f 5957 // @test group DACCodeOfVoltage DACCodeOfVoltage(0.000012) expect 0x000003 // 0.000V + 3.0LSB
whismanoid 25:9d4012b0887f 5958 // docTest_item['actionType'] = 'call-function'
whismanoid 25:9d4012b0887f 5959 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5960 // docTest_item['action'] = 'DACCodeOfVoltage(0.000012) expect 0x000003'
whismanoid 25:9d4012b0887f 5961 // docTest_item['remarks'] = '0.000V + 3.0LSB'
whismanoid 25:9d4012b0887f 5962 // docTest_item['funcName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5963 // docTest_item['arglist'] = '0.000012'
whismanoid 25:9d4012b0887f 5964 // docTest_item['expect-value'] = '0x000003'
whismanoid 25:9d4012b0887f 5965 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + 3.0LSB
whismanoid 33:2c675744a01b 5966 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5967 // call-function
whismanoid 27:485b1b2f334c 5968 // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 5969 // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.000012), (uint32_t)0x000003); // 0.000V + 3.0LSB
whismanoid 25:9d4012b0887f 5970 tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.000012, /* expect: */ (uint32_t)0x000003); // 0.000V + 3.0LSB
whismanoid 30:13fc9d492ee0 5971 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5972 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5973 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5974 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5975
whismanoid 25:9d4012b0887f 5976 // @test group DACCodeOfVoltage tinyTester.blink_time_msec = 75 // default 75 resume hardware self test
whismanoid 25:9d4012b0887f 5977 // docTest_item['actionType'] = 'assign-propname-value'
whismanoid 25:9d4012b0887f 5978 // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 5979 // docTest_item['action'] = 'tinyTester.blink_time_msec = 75'
whismanoid 25:9d4012b0887f 5980 // docTest_item['remarks'] = 'default 75 resume hardware self test'
whismanoid 25:9d4012b0887f 5981 // docTest_item['propName'] = 'tinyTester.blink_time_msec'
whismanoid 25:9d4012b0887f 5982 // docTest_item['propValue'] = '75'
whismanoid 25:9d4012b0887f 5983 #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None default 75 resume hardware self test
whismanoid 33:2c675744a01b 5984 if (SelfTestGroupEnable & 0x0040) {
whismanoid 25:9d4012b0887f 5985 // assign-propname-value
whismanoid 25:9d4012b0887f 5986 // tinyTesterPropName = "tinyTester.blink_time_msec"
whismanoid 25:9d4012b0887f 5987 // tinyTesterPropValue = "75"
whismanoid 25:9d4012b0887f 5988 tinyTester.blink_time_msec = 75;
whismanoid 30:13fc9d492ee0 5989 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 5990 if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; }
whismanoid 33:2c675744a01b 5991 } // if (SelfTestGroupEnable & 0x0040)
whismanoid 25:9d4012b0887f 5992 #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage
whismanoid 25:9d4012b0887f 5993
whismanoid 25:9d4012b0887f 5994 //
whismanoid 25:9d4012b0887f 5995 #if INJECT_SELFTEST_FAIL
whismanoid 25:9d4012b0887f 5996 // Test of the pass/fail report mechanism
whismanoid 25:9d4012b0887f 5997 tinyTester.FAIL();
whismanoid 25:9d4012b0887f 5998 cmdLine.serial().print(F("injecting one false failure for test reporting"));
whismanoid 25:9d4012b0887f 5999 #endif
whismanoid 25:9d4012b0887f 6000 //
whismanoid 30:13fc9d492ee0 6001 // repeat-until-failure logic
whismanoid 33:2c675744a01b 6002 // if (cmdLine.serial().readable()) { goto exitTesting; }
whismanoid 33:2c675744a01b 6003 if (serial.readable()) { goto exitTesting; }
whismanoid 30:13fc9d492ee0 6004 if ((SelfTestGroupEnable & 0x0002) && (tinyTester.nFail == 0)) { goto repeatUntilFailure; }
whismanoid 30:13fc9d492ee0 6005 //
whismanoid 30:13fc9d492ee0 6006 // halt-on-first-failure logic
whismanoid 30:13fc9d492ee0 6007 exitTesting:
whismanoid 30:13fc9d492ee0 6008 //
whismanoid 25:9d4012b0887f 6009 // Report number of pass and number of fail test results
whismanoid 25:9d4012b0887f 6010 tinyTester.Report_Summary();
whismanoid 25:9d4012b0887f 6011 }
whismanoid 25:9d4012b0887f 6012
whismanoid 25:9d4012b0887f 6013 //--------------------------------------------------
whismanoid 25:9d4012b0887f 6014 // selfTestFunctionClosures[functionName]['functionName'] = 'Init'
whismanoid 25:9d4012b0887f 6015 // selfTestFunctionClosures[functionName]['argListDeclaration'] = 'void'
whismanoid 25:9d4012b0887f 6016 // selfTestFunctionClosures[functionName]['returnType'] = 'void'
whismanoid 25:9d4012b0887f 6017 // selfTestFunctionClosures[functionName]['argNames'] = ''
whismanoid 25:9d4012b0887f 6018 // CommandParamIn_declaration = 'void'
whismanoid 25:9d4012b0887f 6019 // argNames_recast_implementation = ''
whismanoid 25:9d4012b0887f 6020 //--------------------------------------------------
whismanoid 25:9d4012b0887f 6021 // selftest: define function under test
whismanoid 25:9d4012b0887f 6022 // void MAX5719::Init(void)
whismanoid 25:9d4012b0887f 6023 void fn_MAX5719_Init(void)
whismanoid 25:9d4012b0887f 6024 {
whismanoid 25:9d4012b0887f 6025 return g_MAX5719_device.Init();
whismanoid 25:9d4012b0887f 6026 }
whismanoid 25:9d4012b0887f 6027
whismanoid 25:9d4012b0887f 6028 //--------------------------------------------------
whismanoid 25:9d4012b0887f 6029 // selfTestFunctionClosures[functionName]['functionName'] = 'CODE_LOAD'
whismanoid 25:9d4012b0887f 6030 // selfTestFunctionClosures[functionName]['argListDeclaration'] = 'uint32_t dacCodeLsbs'
whismanoid 25:9d4012b0887f 6031 // selfTestFunctionClosures[functionName]['returnType'] = 'uint8_t'
whismanoid 25:9d4012b0887f 6032 // selfTestFunctionClosures[functionName]['argNames'] = 'dacCodeLsbs'
whismanoid 25:9d4012b0887f 6033 // CommandParamIn_declaration = 'uint32_t dacCodeLsbs'
whismanoid 25:9d4012b0887f 6034 // argNames_recast_implementation = '(uint32_t)dacCodeLsbs'
whismanoid 25:9d4012b0887f 6035 //--------------------------------------------------
whismanoid 25:9d4012b0887f 6036 // selftest: define function under test
whismanoid 25:9d4012b0887f 6037 // uint8_t MAX5719::CODE_LOAD(uint32_t dacCodeLsbs)
whismanoid 25:9d4012b0887f 6038 uint8_t fn_MAX5719_CODE_LOAD(uint32_t dacCodeLsbs)
whismanoid 25:9d4012b0887f 6039 {
whismanoid 25:9d4012b0887f 6040 return g_MAX5719_device.CODE_LOAD((uint32_t)dacCodeLsbs);
whismanoid 25:9d4012b0887f 6041 }
whismanoid 25:9d4012b0887f 6042
whismanoid 25:9d4012b0887f 6043 //--------------------------------------------------
whismanoid 25:9d4012b0887f 6044 // selfTestFunctionClosures[functionName]['functionName'] = 'DACCodeOfVoltage'
whismanoid 25:9d4012b0887f 6045 // selfTestFunctionClosures[functionName]['argListDeclaration'] = 'double voltageV'
whismanoid 25:9d4012b0887f 6046 // selfTestFunctionClosures[functionName]['returnType'] = 'uint32_t'
whismanoid 25:9d4012b0887f 6047 // selfTestFunctionClosures[functionName]['argNames'] = 'voltageV'
whismanoid 25:9d4012b0887f 6048 // CommandParamIn_declaration = 'double voltageV'
whismanoid 25:9d4012b0887f 6049 // argNames_recast_implementation = '(double)voltageV'
whismanoid 25:9d4012b0887f 6050 //--------------------------------------------------
whismanoid 25:9d4012b0887f 6051 // selftest: define function under test
whismanoid 25:9d4012b0887f 6052 // uint32_t MAX5719::DACCodeOfVoltage(double voltageV)
whismanoid 25:9d4012b0887f 6053 uint32_t fn_MAX5719_DACCodeOfVoltage(double voltageV)
whismanoid 25:9d4012b0887f 6054 {
whismanoid 25:9d4012b0887f 6055 return g_MAX5719_device.DACCodeOfVoltage((double)voltageV);
whismanoid 25:9d4012b0887f 6056 }
whismanoid 25:9d4012b0887f 6057
whismanoid 25:9d4012b0887f 6058
whismanoid 25:9d4012b0887f 6059 //--------------------------------------------------
whismanoid 25:9d4012b0887f 6060 inline void print_command_prompt()
whismanoid 25:9d4012b0887f 6061 {
whismanoid 25:9d4012b0887f 6062 cmdLine_serial.serial().printf("\r\n> ");
whismanoid 25:9d4012b0887f 6063
whismanoid 25:9d4012b0887f 6064 }
whismanoid 25:9d4012b0887f 6065
whismanoid 25:9d4012b0887f 6066
whismanoid 25:9d4012b0887f 6067 //--------------------------------------------------
whismanoid 25:9d4012b0887f 6068 void pinsMonitor_submenu_onEOLcommandParser(CmdLine& cmdLine)
whismanoid 25:9d4012b0887f 6069 {
whismanoid 25:9d4012b0887f 6070 // % diagnostic commands submenu
whismanoid 25:9d4012b0887f 6071 // %Hpin -- digital output high
whismanoid 25:9d4012b0887f 6072 // %Lpin -- digital output low
whismanoid 25:9d4012b0887f 6073 // %?pin -- digital input
whismanoid 25:9d4012b0887f 6074 // %A %Apin -- analog input
whismanoid 25:9d4012b0887f 6075 // %Ppin df=xx -- pwm output
whismanoid 25:9d4012b0887f 6076 // %Wpin -- measure high pulsewidth input in usec
whismanoid 25:9d4012b0887f 6077 // %wpin -- measure low pulsewidth input in usec
whismanoid 25:9d4012b0887f 6078 // %I... -- I2C diagnostics
whismanoid 25:9d4012b0887f 6079 // %IP -- I2C probe
whismanoid 25:9d4012b0887f 6080 // %IC scl=100khz ADDR=? -- I2C configure
whismanoid 25:9d4012b0887f 6081 // %IW byte byte ... byte RD=? ADDR=0x -- write
whismanoid 25:9d4012b0887f 6082 // %IR ADDR=? RD=? -- read
whismanoid 25:9d4012b0887f 6083 // %I^ cmd=? -- i2c_smbus_read_word_data
whismanoid 25:9d4012b0887f 6084 // %S... -- SPI diagnostics
whismanoid 25:9d4012b0887f 6085 // %SC sclk=1Mhz -- SPI configure
whismanoid 25:9d4012b0887f 6086 // %SW -- write (write and read)
whismanoid 25:9d4012b0887f 6087 // %SR -- read (alias for %SW because SPI always write and read)
whismanoid 25:9d4012b0887f 6088 // A-Z,a-z,0-9 reserved for application use
whismanoid 25:9d4012b0887f 6089 //
whismanoid 25:9d4012b0887f 6090 char strPinIndex[3];
whismanoid 25:9d4012b0887f 6091 strPinIndex[0] = cmdLine[2];
whismanoid 25:9d4012b0887f 6092 strPinIndex[1] = cmdLine[3];
whismanoid 25:9d4012b0887f 6093 strPinIndex[2] = '\0';
whismanoid 25:9d4012b0887f 6094 int pinIndex = strtoul(strPinIndex, NULL, 10); // strtol(str, NULL, 10): get decimal value
whismanoid 25:9d4012b0887f 6095 //cmdLine.serial().printf(" pinIndex=%d ", pinIndex);
whismanoid 25:9d4012b0887f 6096 //
whismanoid 25:9d4012b0887f 6097 // get next character
whismanoid 25:9d4012b0887f 6098 switch (cmdLine[1])
whismanoid 25:9d4012b0887f 6099 {
whismanoid 25:9d4012b0887f 6100 #if HAS_digitalInOuts
whismanoid 25:9d4012b0887f 6101 case 'H': case 'h':
whismanoid 25:9d4012b0887f 6102 {
whismanoid 25:9d4012b0887f 6103 // %Hpin -- digital output high
whismanoid 25:9d4012b0887f 6104 #if ARDUINO_STYLE
whismanoid 25:9d4012b0887f 6105 pinMode(pinIndex, OUTPUT); // digital pins 0, 1, 2, .. 13, analog input pins A0, A1, .. A5
whismanoid 25:9d4012b0887f 6106 digitalWrite(pinIndex, HIGH); // digital pins 0, 1, 2, .. 13, analog input pins A0, A1, .. A5
whismanoid 25:9d4012b0887f 6107 #else
whismanoid 25:9d4012b0887f 6108 DigitalInOut& digitalInOutPin = find_digitalInOutPin(pinIndex);
whismanoid 25:9d4012b0887f 6109 digitalInOutPin.output();
whismanoid 25:9d4012b0887f 6110 digitalInOutPin.write(1);
whismanoid 25:9d4012b0887f 6111 #endif
whismanoid 25:9d4012b0887f 6112 cmdLine.serial().printf(" digitalInOutPin %d Output High ", pinIndex);
whismanoid 25:9d4012b0887f 6113 }
whismanoid 25:9d4012b0887f 6114 break;
whismanoid 25:9d4012b0887f 6115 case 'L': case 'l':
whismanoid 25:9d4012b0887f 6116 {
whismanoid 25:9d4012b0887f 6117 // %Lpin -- digital output low
whismanoid 25:9d4012b0887f 6118 #if ARDUINO_STYLE
whismanoid 25:9d4012b0887f 6119 pinMode(pinIndex, OUTPUT); // digital pins 0, 1, 2, .. 13, analog input pins A0, A1, .. A5
whismanoid 25:9d4012b0887f 6120 digitalWrite(pinIndex, LOW); // digital pins 0, 1, 2, .. 13, analog input pins A0, A1, .. A5
whismanoid 25:9d4012b0887f 6121 #else
whismanoid 25:9d4012b0887f 6122 DigitalInOut& digitalInOutPin = find_digitalInOutPin(pinIndex);
whismanoid 25:9d4012b0887f 6123 digitalInOutPin.output();
whismanoid 25:9d4012b0887f 6124 digitalInOutPin.write(0);
whismanoid 25:9d4012b0887f 6125 #endif
whismanoid 25:9d4012b0887f 6126 cmdLine.serial().printf(" digitalInOutPin %d Output Low ", pinIndex);
whismanoid 25:9d4012b0887f 6127 }
whismanoid 25:9d4012b0887f 6128 break;
whismanoid 25:9d4012b0887f 6129 case '?':
whismanoid 25:9d4012b0887f 6130 {
whismanoid 25:9d4012b0887f 6131 // %?pin -- digital input
whismanoid 25:9d4012b0887f 6132 #if ARDUINO_STYLE
whismanoid 25:9d4012b0887f 6133 pinMode(pinIndex, INPUT); // digital pins 0, 1, 2, .. 13, analog input pins A0, A1, .. A5
whismanoid 25:9d4012b0887f 6134 #else
whismanoid 25:9d4012b0887f 6135 DigitalInOut& digitalInOutPin = find_digitalInOutPin(pinIndex);
whismanoid 25:9d4012b0887f 6136 digitalInOutPin.input();
whismanoid 25:9d4012b0887f 6137 #endif
whismanoid 25:9d4012b0887f 6138 serial.printf(" digitalInOutPin %d Input ", pinIndex);
whismanoid 25:9d4012b0887f 6139 #if ARDUINO_STYLE
whismanoid 25:9d4012b0887f 6140 int value = digitalRead(pinIndex);
whismanoid 25:9d4012b0887f 6141 #else
whismanoid 25:9d4012b0887f 6142 int value = digitalInOutPin.read();
whismanoid 25:9d4012b0887f 6143 #endif
whismanoid 25:9d4012b0887f 6144 cmdLine.serial().printf("%d ", value);
whismanoid 25:9d4012b0887f 6145 }
whismanoid 25:9d4012b0887f 6146 break;
whismanoid 25:9d4012b0887f 6147 #endif
whismanoid 25:9d4012b0887f 6148 //
whismanoid 25:9d4012b0887f 6149 #if HAS_analogIns
whismanoid 25:9d4012b0887f 6150 case 'A': case 'a':
whismanoid 25:9d4012b0887f 6151 {
whismanoid 25:9d4012b0887f 6152 // %A %Apin -- analog input
whismanoid 25:9d4012b0887f 6153 #if analogIn4_IS_HIGH_RANGE_OF_analogIn0
whismanoid 25:9d4012b0887f 6154 // Platform board uses AIN4,AIN5,.. as high range of AIN0,AIN1,..
whismanoid 25:9d4012b0887f 6155 for (int pinIndex = 0; pinIndex < 2; pinIndex++)
whismanoid 25:9d4012b0887f 6156 {
whismanoid 25:9d4012b0887f 6157 int cPinIndex = '0' + pinIndex;
whismanoid 25:9d4012b0887f 6158 AnalogIn& analogInPin = find_analogInPin(cPinIndex);
whismanoid 25:9d4012b0887f 6159 float adc_full_scale_voltage = analogInPin_fullScaleVoltage[pinIndex];
whismanoid 25:9d4012b0887f 6160 float normValue_0_1 = analogInPin.read();
whismanoid 25:9d4012b0887f 6161 //
whismanoid 25:9d4012b0887f 6162 int pinIndexH = pinIndex + 4;
whismanoid 25:9d4012b0887f 6163 int cPinIndexH = '0' + pinIndexH;
whismanoid 25:9d4012b0887f 6164 AnalogIn& analogInPinH = find_analogInPin(cPinIndexH);
whismanoid 25:9d4012b0887f 6165 float adc_full_scale_voltageH = analogInPin_fullScaleVoltage[pinIndexH];
whismanoid 25:9d4012b0887f 6166 float normValueH_0_1 = analogInPinH.read();
whismanoid 25:9d4012b0887f 6167 //
whismanoid 25:9d4012b0887f 6168 cmdLine.serial().printf("AIN%c = %7.3f%% = %1.3fV AIN%c = %7.3f%% = %1.3fV \r\n",
whismanoid 25:9d4012b0887f 6169 cPinIndex,
whismanoid 25:9d4012b0887f 6170 normValue_0_1 * 100.0,
whismanoid 25:9d4012b0887f 6171 normValue_0_1 * adc_full_scale_voltage,
whismanoid 25:9d4012b0887f 6172 cPinIndexH,
whismanoid 25:9d4012b0887f 6173 normValueH_0_1 * 100.0,
whismanoid 25:9d4012b0887f 6174 normValueH_0_1 * adc_full_scale_voltageH
whismanoid 25:9d4012b0887f 6175 );
whismanoid 25:9d4012b0887f 6176 }
whismanoid 25:9d4012b0887f 6177 for (int pinIndex = 2; pinIndex < 4; pinIndex++)
whismanoid 25:9d4012b0887f 6178 {
whismanoid 25:9d4012b0887f 6179 int cPinIndex = '0' + pinIndex;
whismanoid 25:9d4012b0887f 6180 AnalogIn& analogInPin = find_analogInPin(cPinIndex);
whismanoid 25:9d4012b0887f 6181 float adc_full_scale_voltage = analogInPin_fullScaleVoltage[pinIndex];
whismanoid 25:9d4012b0887f 6182 float normValue_0_1 = analogInPin.read();
whismanoid 25:9d4012b0887f 6183 //
whismanoid 25:9d4012b0887f 6184 cmdLine.serial().printf("AIN%c = %7.3f%% = %1.3fV\r\n",
whismanoid 25:9d4012b0887f 6185 cPinIndex,
whismanoid 25:9d4012b0887f 6186 normValue_0_1 * 100.0,
whismanoid 25:9d4012b0887f 6187 normValue_0_1 * adc_full_scale_voltage
whismanoid 25:9d4012b0887f 6188 );
whismanoid 25:9d4012b0887f 6189 }
whismanoid 25:9d4012b0887f 6190 #else // analogIn4_IS_HIGH_RANGE_OF_analogIn0
whismanoid 25:9d4012b0887f 6191 // Platform board uses simple analog inputs
whismanoid 25:9d4012b0887f 6192 // assume standard Arduino analog inputs A0-A5
whismanoid 25:9d4012b0887f 6193 for (int pinIndex = 0; pinIndex < 6; pinIndex++)
whismanoid 25:9d4012b0887f 6194 {
whismanoid 25:9d4012b0887f 6195 int cPinIndex = '0' + pinIndex;
whismanoid 25:9d4012b0887f 6196 AnalogIn& analogInPin = find_analogInPin(cPinIndex);
whismanoid 25:9d4012b0887f 6197 float adc_full_scale_voltage = analogInPin_fullScaleVoltage[pinIndex];
whismanoid 25:9d4012b0887f 6198 float normValue_0_1 = analogInPin.read();
whismanoid 25:9d4012b0887f 6199 //
whismanoid 25:9d4012b0887f 6200 cmdLine.serial().printf("AIN%c = %7.3f%% = %1.3fV\r\n",
whismanoid 25:9d4012b0887f 6201 cPinIndex,
whismanoid 25:9d4012b0887f 6202 normValue_0_1 * 100.0,
whismanoid 25:9d4012b0887f 6203 normValue_0_1 * adc_full_scale_voltage
whismanoid 25:9d4012b0887f 6204 );
whismanoid 25:9d4012b0887f 6205 }
whismanoid 25:9d4012b0887f 6206 #endif // analogIn4_IS_HIGH_RANGE_OF_analogIn0
whismanoid 25:9d4012b0887f 6207 }
whismanoid 25:9d4012b0887f 6208 break;
whismanoid 25:9d4012b0887f 6209 #endif
whismanoid 25:9d4012b0887f 6210 //
whismanoid 25:9d4012b0887f 6211 #if HAS_SPI2_MAX541
whismanoid 25:9d4012b0887f 6212 case 'D': case 'd':
whismanoid 25:9d4012b0887f 6213 {
whismanoid 25:9d4012b0887f 6214 // %D -- DAC output MAX541 (SPI2) -- need cmdLine.parse_float(voltageV)
whismanoid 25:9d4012b0887f 6215 // MAX541 max541(spi2_max541, spi2_max541_cs);
whismanoid 25:9d4012b0887f 6216 float voltageV = max541.Get_Voltage();
whismanoid 25:9d4012b0887f 6217 // if (cmdLine[2] == '+') {
whismanoid 25:9d4012b0887f 6218 // // %D+
whismanoid 25:9d4012b0887f 6219 // voltageV = voltageV * 1.25f;
whismanoid 25:9d4012b0887f 6220 // if (voltageV >= max541.VRef) voltageV = max541.VRef;
whismanoid 25:9d4012b0887f 6221 // SelfTest_MAX541_Voltage(cmdLine, max541, voltageV);
whismanoid 25:9d4012b0887f 6222 // }
whismanoid 25:9d4012b0887f 6223 // else if (cmdLine[2] == '-') {
whismanoid 25:9d4012b0887f 6224 // // %D-
whismanoid 25:9d4012b0887f 6225 // voltageV = voltageV * 0.75f;
whismanoid 25:9d4012b0887f 6226 // if (voltageV < 0.1f) voltageV = 0.1f;
whismanoid 25:9d4012b0887f 6227 // SelfTest_MAX541_Voltage(cmdLine, max541, voltageV);
whismanoid 25:9d4012b0887f 6228 // }
whismanoid 25:9d4012b0887f 6229 if (cmdLine.parse_float("V", voltageV))
whismanoid 25:9d4012b0887f 6230 {
whismanoid 25:9d4012b0887f 6231 // %D V=1.234 -- set voltage
whismanoid 25:9d4012b0887f 6232 max541.Set_Voltage(voltageV);
whismanoid 25:9d4012b0887f 6233 }
whismanoid 25:9d4012b0887f 6234 else if (cmdLine.parse_float("TEST", voltageV))
whismanoid 25:9d4012b0887f 6235 {
whismanoid 25:9d4012b0887f 6236 // %D TEST=1.234 -- set voltage and compare with AIN0
whismanoid 25:9d4012b0887f 6237 SelfTest_MAX541_Voltage(cmdLine, max541, voltageV);
whismanoid 25:9d4012b0887f 6238 }
whismanoid 25:9d4012b0887f 6239 else if (cmdLine.parse_float("CAL", voltageV))
whismanoid 25:9d4012b0887f 6240 {
whismanoid 25:9d4012b0887f 6241 // %D CAL=1.234 -- calibrate VRef and compare with AIN0
whismanoid 25:9d4012b0887f 6242
whismanoid 25:9d4012b0887f 6243 max541.Set_Code(0x8000); // we don't know the fullscale voltage yet, so set code to midscale
whismanoid 25:9d4012b0887f 6244 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 6245 const int average_count = 100;
whismanoid 25:9d4012b0887f 6246 const double average_K = 0.25;
whismanoid 25:9d4012b0887f 6247 for (int count = 0; count < average_count; count++) {
whismanoid 25:9d4012b0887f 6248 double measurement_V = analogInPin_fullScaleVoltage[4] * analogIn4.read(); // TARGET_MAX32630 J1.5 AIN_4 = AIN0 / 5.0 fullscale is 6.0V
whismanoid 25:9d4012b0887f 6249 max541_midscale_V = ((1 - average_K) * max541_midscale_V) + (average_K * measurement_V);
whismanoid 25:9d4012b0887f 6250 }
whismanoid 25:9d4012b0887f 6251 max541.VRef = 2.0 * max541_midscale_V;
whismanoid 25:9d4012b0887f 6252 cmdLine.serial().printf(
whismanoid 25:9d4012b0887f 6253 "\r\n MAX541 midscale = %1.3fV, so fullscale = %1.3fV",
whismanoid 25:9d4012b0887f 6254 max541_midscale_V, max541.VRef);
whismanoid 25:9d4012b0887f 6255 // Detect whether MAX541 is really connected to MAX32625MBED.AIN0/AIN4
whismanoid 25:9d4012b0887f 6256 voltageV = 1.0f;
whismanoid 25:9d4012b0887f 6257 SelfTest_MAX541_Voltage(cmdLine, max541, voltageV);
whismanoid 25:9d4012b0887f 6258 }
whismanoid 25:9d4012b0887f 6259 else {
whismanoid 25:9d4012b0887f 6260 // %D -- print MAX541 DAC status
whismanoid 25:9d4012b0887f 6261 cmdLine.serial().printf("MAX541 code=0x%4.4x = %1.3fV VRef=%1.3fV\r\n",
whismanoid 25:9d4012b0887f 6262 max541.Get_Code(), max541.Get_Voltage(), max541.VRef);
whismanoid 25:9d4012b0887f 6263 }
whismanoid 25:9d4012b0887f 6264 }
whismanoid 25:9d4012b0887f 6265 break;
whismanoid 25:9d4012b0887f 6266 #endif
whismanoid 25:9d4012b0887f 6267
whismanoid 25:9d4012b0887f 6268 //
whismanoid 25:9d4012b0887f 6269 #if HAS_I2C // SUPPORT_I2C
whismanoid 25:9d4012b0887f 6270 case 'I': case 'i':
whismanoid 25:9d4012b0887f 6271 // %I... -- I2C diagnostics
whismanoid 25:9d4012b0887f 6272 // %IP -- I2C probe
whismanoid 25:9d4012b0887f 6273 // %IC scl=100khz ADDR=? -- I2C configure
whismanoid 25:9d4012b0887f 6274 // %IW byte byte ... byte RD=? ADDR=0x -- write
whismanoid 25:9d4012b0887f 6275 // %IR ADDR=? RD=? -- read
whismanoid 25:9d4012b0887f 6276 // %I^ cmd=? -- i2c_smbus_read_word_data
whismanoid 25:9d4012b0887f 6277 // get next character
whismanoid 25:9d4012b0887f 6278 // TODO: parse cmdLine arg (ADDR=\d+)? --> g_I2C_deviceAddress7
whismanoid 25:9d4012b0887f 6279 cmdLine.parse_byte_hex("ADDR", g_I2C_deviceAddress7);
whismanoid 25:9d4012b0887f 6280 // TODO: parse cmdLine arg (RD=\d)? --> g_I2C_read_count
whismanoid 25:9d4012b0887f 6281 g_I2C_read_count = 0; // read count must be reset every command
whismanoid 25:9d4012b0887f 6282 cmdLine.parse_byte_dec("RD", g_I2C_read_count);
whismanoid 25:9d4012b0887f 6283 // TODO: parse cmdLine arg (CMD=\d)? --> g_I2C_command_regAddress
whismanoid 25:9d4012b0887f 6284 cmdLine.parse_byte_hex("CMD", g_I2C_command_regAddress);
whismanoid 25:9d4012b0887f 6285 switch (cmdLine[2])
whismanoid 25:9d4012b0887f 6286 {
whismanoid 25:9d4012b0887f 6287 case 'P': case 'p':
whismanoid 25:9d4012b0887f 6288 {
whismanoid 25:9d4012b0887f 6289 // %IP -- I2C probe
whismanoid 25:9d4012b0887f 6290 HuntAttachedI2CDevices(cmdLine, 0x03, 0x77);
whismanoid 25:9d4012b0887f 6291 }
whismanoid 25:9d4012b0887f 6292 break;
whismanoid 25:9d4012b0887f 6293 case 'C': case 'c':
whismanoid 25:9d4012b0887f 6294 {
whismanoid 25:9d4012b0887f 6295 bool isUpdatedI2CConfig = false;
whismanoid 25:9d4012b0887f 6296 // %IC scl=100khz ADDR=? -- I2C configure
whismanoid 25:9d4012b0887f 6297 // parse cmdLine arg (SCL=\d+(kHZ|MHZ)?)? --> g_I2C_SCL_Hz
whismanoid 25:9d4012b0887f 6298 if (cmdLine.parse_frequency_Hz("SCL", g_I2C_SCL_Hz))
whismanoid 25:9d4012b0887f 6299 {
whismanoid 25:9d4012b0887f 6300 isUpdatedI2CConfig = true;
whismanoid 25:9d4012b0887f 6301 // TODO1: validate g_I2C_SCL_Hz against system clock frequency F_CPU
whismanoid 25:9d4012b0887f 6302 if (g_I2C_SCL_Hz > limit_max_I2C_SCL_Hz)
whismanoid 25:9d4012b0887f 6303 {
whismanoid 25:9d4012b0887f 6304 g_I2C_SCL_Hz = limit_max_I2C_SCL_Hz;
whismanoid 25:9d4012b0887f 6305 }
whismanoid 25:9d4012b0887f 6306 if (g_I2C_SCL_Hz < limit_min_I2C_SCL_Hz)
whismanoid 25:9d4012b0887f 6307 {
whismanoid 25:9d4012b0887f 6308 g_I2C_SCL_Hz = limit_min_I2C_SCL_Hz;
whismanoid 25:9d4012b0887f 6309 }
whismanoid 25:9d4012b0887f 6310 }
whismanoid 25:9d4012b0887f 6311 if (isUpdatedI2CConfig)
whismanoid 25:9d4012b0887f 6312 {
whismanoid 25:9d4012b0887f 6313 // declare in narrower scope: MAX32625MBED I2C i2cMaster(...)
whismanoid 25:9d4012b0887f 6314 I2C i2cMaster(I2C0_SDA, I2C0_SCL); // sda scl TARGET_MAX32635MBED: P1_6, P1_7 Arduino 10-pin header
whismanoid 25:9d4012b0887f 6315 i2cMaster.frequency(g_I2C_SCL_Hz);
whismanoid 25:9d4012b0887f 6316 i2cMaster.start();
whismanoid 25:9d4012b0887f 6317 i2cMaster.stop();
whismanoid 25:9d4012b0887f 6318 i2cMaster.frequency(g_I2C_SCL_Hz);
whismanoid 25:9d4012b0887f 6319 cmdLine.serial().printf(
whismanoid 25:9d4012b0887f 6320 "\r\n %%IC ADDR=0x%2.2x=(0x%2.2x>>1) SCL=%d=%1.3fkHz -- I2C config",
whismanoid 25:9d4012b0887f 6321 g_I2C_deviceAddress7, (g_I2C_deviceAddress7 << 1), g_I2C_SCL_Hz,
whismanoid 25:9d4012b0887f 6322 (g_I2C_SCL_Hz / 1000.));
whismanoid 25:9d4012b0887f 6323 i2cMaster.start();
whismanoid 25:9d4012b0887f 6324 i2cMaster.stop();
whismanoid 25:9d4012b0887f 6325 }
whismanoid 25:9d4012b0887f 6326 }
whismanoid 25:9d4012b0887f 6327 break;
whismanoid 25:9d4012b0887f 6328 case 'W': case 'w':
whismanoid 25:9d4012b0887f 6329 {
whismanoid 25:9d4012b0887f 6330 // declare in narrower scope: MAX32625MBED I2C i2cMaster(...)
whismanoid 25:9d4012b0887f 6331 I2C i2cMaster(I2C0_SDA, I2C0_SCL); // sda scl TARGET_MAX32635MBED: P1_6, P1_7 Arduino 10-pin header
whismanoid 25:9d4012b0887f 6332 i2cMaster.frequency(g_I2C_SCL_Hz);
whismanoid 25:9d4012b0887f 6333 // %IW byte byte ... byte RD=? ADDR=0x -- write
whismanoid 25:9d4012b0887f 6334 // parse cmdLine byte list --> int byteCount; int mosiData[MAX_SPI_BYTE_COUNT];
whismanoid 25:9d4012b0887f 6335 #define MAX_I2C_BYTE_COUNT 32
whismanoid 25:9d4012b0887f 6336 size_t byteCount = byteCount;
whismanoid 25:9d4012b0887f 6337 static char mosiData[MAX_I2C_BYTE_COUNT];
whismanoid 25:9d4012b0887f 6338 static char misoData[MAX_I2C_BYTE_COUNT];
whismanoid 25:9d4012b0887f 6339 if (cmdLine.parse_byteCount_byteList_hex(byteCount, mosiData,
whismanoid 25:9d4012b0887f 6340 MAX_I2C_BYTE_COUNT))
whismanoid 25:9d4012b0887f 6341 {
whismanoid 25:9d4012b0887f 6342 // hex dump mosiData[0..byteCount-1]
whismanoid 25:9d4012b0887f 6343 cmdLine.serial().printf(
whismanoid 25:9d4012b0887f 6344 "\r\nADDR=0x%2.2x=(0x%2.2x>>1) byteCount:%d RD=%d\r\nI2C MOSI->",
whismanoid 25:9d4012b0887f 6345 g_I2C_deviceAddress7,
whismanoid 25:9d4012b0887f 6346 (g_I2C_deviceAddress7 << 1), byteCount, g_I2C_read_count);
whismanoid 25:9d4012b0887f 6347 for (unsigned int byteIndex = 0; byteIndex < byteCount; byteIndex++)
whismanoid 25:9d4012b0887f 6348 {
whismanoid 25:9d4012b0887f 6349 cmdLine.serial().printf(" 0x%2.2X", mosiData[byteIndex]);
whismanoid 25:9d4012b0887f 6350 }
whismanoid 25:9d4012b0887f 6351 //
whismanoid 25:9d4012b0887f 6352 // TODO: i2c transfer
whismanoid 25:9d4012b0887f 6353 //const int addr7bit = 0x48; // 7 bit I2C address
whismanoid 25:9d4012b0887f 6354 //const int addr8bit = 0x48 << 1; // 8bit I2C address, 0x90
whismanoid 25:9d4012b0887f 6355 // /* int */ i2cMaster.read (int addr8bit, char *data, int length, bool repeated=false) // Read from an I2C slave.
whismanoid 25:9d4012b0887f 6356 // /* int */ i2cMaster.read (int ack) // Read a single byte from the I2C bus.
whismanoid 25:9d4012b0887f 6357 // /* int */ i2cMaster.write (int addr8bit, const char *data, int length, bool repeated=false) // Write to an I2C slave.
whismanoid 25:9d4012b0887f 6358 // /* int */ i2cMaster.write (int data) // Write single byte out on the I2C bus.
whismanoid 25:9d4012b0887f 6359 // /* void */ i2cMaster.start (void) // Creates a start condition on the I2C bus.
whismanoid 25:9d4012b0887f 6360 // /* void */ i2cMaster.stop (void) // Creates a stop condition on the I2C bus.
whismanoid 25:9d4012b0887f 6361 // /* 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 6362 // /* void */ i2cMaster.abort_transfer () // Abort the ongoing I2C transfer. More...
whismanoid 25:9d4012b0887f 6363 const int addr8bit = g_I2C_deviceAddress7 << 1; // 8bit I2C address, 0x90
whismanoid 25:9d4012b0887f 6364 unsigned int misoLength = 0;
whismanoid 25:9d4012b0887f 6365 bool repeated = (g_I2C_read_count > 0);
whismanoid 25:9d4012b0887f 6366 //
whismanoid 25:9d4012b0887f 6367 int writeStatus = i2cMaster.write (addr8bit, mosiData, byteCount, repeated);
whismanoid 25:9d4012b0887f 6368 switch (writeStatus)
whismanoid 25:9d4012b0887f 6369 {
whismanoid 25:9d4012b0887f 6370 case 0: cmdLine.serial().printf(" ack "); break;
whismanoid 25:9d4012b0887f 6371 case 1: cmdLine.serial().printf(" nack "); break;
whismanoid 25:9d4012b0887f 6372 default: cmdLine.serial().printf(" {writeStatus 0x%2.2X} ",
whismanoid 25:9d4012b0887f 6373 writeStatus);
whismanoid 25:9d4012b0887f 6374 }
whismanoid 25:9d4012b0887f 6375 if (repeated)
whismanoid 25:9d4012b0887f 6376 {
whismanoid 25:9d4012b0887f 6377 int readStatus =
whismanoid 25:9d4012b0887f 6378 i2cMaster.read (addr8bit, misoData, g_I2C_read_count, false);
whismanoid 25:9d4012b0887f 6379 switch (readStatus)
whismanoid 25:9d4012b0887f 6380 {
whismanoid 25:9d4012b0887f 6381 case 1: cmdLine.serial().printf(" nack "); break;
whismanoid 25:9d4012b0887f 6382 case 0: cmdLine.serial().printf(" ack "); break;
whismanoid 25:9d4012b0887f 6383 default: cmdLine.serial().printf(" {readStatus 0x%2.2X} ",
whismanoid 25:9d4012b0887f 6384 readStatus);
whismanoid 25:9d4012b0887f 6385 }
whismanoid 25:9d4012b0887f 6386 }
whismanoid 25:9d4012b0887f 6387 //
whismanoid 25:9d4012b0887f 6388 if (misoLength > 0)
whismanoid 25:9d4012b0887f 6389 {
whismanoid 25:9d4012b0887f 6390 // hex dump misoData[0..byteCount-1]
whismanoid 25:9d4012b0887f 6391 cmdLine.serial().printf(" MISO<-");
whismanoid 25:9d4012b0887f 6392 for (unsigned int byteIndex = 0; byteIndex < g_I2C_read_count;
whismanoid 25:9d4012b0887f 6393 byteIndex++)
whismanoid 25:9d4012b0887f 6394 {
whismanoid 25:9d4012b0887f 6395 cmdLine.serial().printf(" 0x%2.2X", misoData[byteIndex]);
whismanoid 25:9d4012b0887f 6396 }
whismanoid 25:9d4012b0887f 6397 }
whismanoid 25:9d4012b0887f 6398 cmdLine.serial().printf(" ");
whismanoid 25:9d4012b0887f 6399 }
whismanoid 25:9d4012b0887f 6400 }
whismanoid 25:9d4012b0887f 6401 break;
whismanoid 25:9d4012b0887f 6402 case 'R': case 'r':
whismanoid 25:9d4012b0887f 6403 {
whismanoid 25:9d4012b0887f 6404 // declare in narrower scope: MAX32625MBED I2C i2cMaster(...)
whismanoid 25:9d4012b0887f 6405 I2C i2cMaster(I2C0_SDA, I2C0_SCL); // sda scl TARGET_MAX32635MBED: P1_6, P1_7 Arduino 10-pin header
whismanoid 25:9d4012b0887f 6406 i2cMaster.frequency(g_I2C_SCL_Hz);
whismanoid 25:9d4012b0887f 6407 // %IR ADDR=? RD=? -- read
whismanoid 25:9d4012b0887f 6408 // TODO: i2c transfer
whismanoid 25:9d4012b0887f 6409 //const int addr7bit = 0x48; // 7 bit I2C address
whismanoid 25:9d4012b0887f 6410 //const int addr8bit = 0x48 << 1; // 8bit I2C address, 0x90
whismanoid 25:9d4012b0887f 6411 // /* int */ i2cMaster.read (int addr8bit, char *data, int length, bool repeated=false) // Read from an I2C slave.
whismanoid 25:9d4012b0887f 6412 // /* int */ i2cMaster.read (int ack) // Read a single byte from the I2C bus.
whismanoid 25:9d4012b0887f 6413 // /* int */ i2cMaster.write (int addr8bit, const char *data, int length, bool repeated=false) // Write to an I2C slave.
whismanoid 25:9d4012b0887f 6414 // /* int */ i2cMaster.write (int data) // Write single byte out on the I2C bus.
whismanoid 25:9d4012b0887f 6415 // /* void */ i2cMaster.start (void) // Creates a start condition on the I2C bus.
whismanoid 25:9d4012b0887f 6416 // /* void */ i2cMaster.stop (void) // Creates a stop condition on the I2C bus.
whismanoid 25:9d4012b0887f 6417 // /* 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 6418 // /* void */ i2cMaster.abort_transfer () // Abort the ongoing I2C transfer. More...
whismanoid 25:9d4012b0887f 6419 }
whismanoid 25:9d4012b0887f 6420 break;
whismanoid 25:9d4012b0887f 6421 case '^':
whismanoid 25:9d4012b0887f 6422 {
whismanoid 25:9d4012b0887f 6423 // declare in narrower scope: MAX32625MBED I2C i2cMaster(...)
whismanoid 25:9d4012b0887f 6424 I2C i2cMaster(I2C0_SDA, I2C0_SCL); // sda scl TARGET_MAX32635MBED: P1_6, P1_7 Arduino 10-pin header
whismanoid 25:9d4012b0887f 6425 i2cMaster.frequency(g_I2C_SCL_Hz);
whismanoid 25:9d4012b0887f 6426 // %I^ cmd=? -- i2c_smbus_read_word_data
whismanoid 25:9d4012b0887f 6427 // TODO: i2c transfer
whismanoid 25:9d4012b0887f 6428 //const int addr7bit = 0x48; // 7 bit I2C address
whismanoid 25:9d4012b0887f 6429 //const int addr8bit = 0x48 << 1; // 8bit I2C address, 0x90
whismanoid 25:9d4012b0887f 6430 // /* int */ i2cMaster.read (int addr8bit, char *data, int length, bool repeated=false) // Read from an I2C slave.
whismanoid 25:9d4012b0887f 6431 // /* int */ i2cMaster.read (int ack) // Read a single byte from the I2C bus.
whismanoid 25:9d4012b0887f 6432 // /* int */ i2cMaster.write (int addr8bit, const char *data, int length, bool repeated=false) // Write to an I2C slave.
whismanoid 25:9d4012b0887f 6433 // /* int */ i2cMaster.write (int data) // Write single byte out on the I2C bus.
whismanoid 25:9d4012b0887f 6434 // /* void */ i2cMaster.start (void) // Creates a start condition on the I2C bus.
whismanoid 25:9d4012b0887f 6435 // /* void */ i2cMaster.stop (void) // Creates a stop condition on the I2C bus.
whismanoid 25:9d4012b0887f 6436 // /* 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 6437 // /* void */ i2cMaster.abort_transfer () // Abort the ongoing I2C transfer. More...
whismanoid 25:9d4012b0887f 6438 }
whismanoid 25:9d4012b0887f 6439 break;
whismanoid 25:9d4012b0887f 6440 } // switch(cmdLine[2])
whismanoid 25:9d4012b0887f 6441 break;
whismanoid 25:9d4012b0887f 6442 #endif
whismanoid 25:9d4012b0887f 6443 //
whismanoid 25:9d4012b0887f 6444 #if HAS_SPI // SUPPORT_SPI
whismanoid 25:9d4012b0887f 6445 case 'S': case 's':
whismanoid 25:9d4012b0887f 6446 {
whismanoid 25:9d4012b0887f 6447 // %S... -- SPI diagnostics
whismanoid 25:9d4012b0887f 6448 // %SC sclk=1Mhz -- SPI configure
whismanoid 25:9d4012b0887f 6449 // %SW -- write (write and read)
whismanoid 25:9d4012b0887f 6450 // %SR -- read (alias for %SW because SPI always write and read)
whismanoid 25:9d4012b0887f 6451 //
whismanoid 25:9d4012b0887f 6452 // Process arguments SCLK=\d+(kHZ|MHZ) CPOL=\d CPHA=\d
whismanoid 25:9d4012b0887f 6453 bool isUpdatedSPIConfig = false;
whismanoid 25:9d4012b0887f 6454 // parse cmdLine arg (CPOL=\d)? --> g_SPI_dataMode | SPI_MODE2
whismanoid 25:9d4012b0887f 6455 // parse cmdLine arg (CPHA=\d)? --> g_SPI_dataMode | SPI_MODE1
whismanoid 25:9d4012b0887f 6456 if (cmdLine.parse_flag("CPOL", g_SPI_dataMode, SPI_MODE2))
whismanoid 25:9d4012b0887f 6457 {
whismanoid 25:9d4012b0887f 6458 isUpdatedSPIConfig = true;
whismanoid 25:9d4012b0887f 6459 }
whismanoid 25:9d4012b0887f 6460 if (cmdLine.parse_flag("CPHA", g_SPI_dataMode, SPI_MODE1))
whismanoid 25:9d4012b0887f 6461 {
whismanoid 25:9d4012b0887f 6462 isUpdatedSPIConfig = true;
whismanoid 25:9d4012b0887f 6463 }
whismanoid 25:9d4012b0887f 6464 if (cmdLine.parse_flag("CS", g_SPI_cs_state, 1))
whismanoid 25:9d4012b0887f 6465 {
whismanoid 25:9d4012b0887f 6466 isUpdatedSPIConfig = true;
whismanoid 25:9d4012b0887f 6467 }
whismanoid 25:9d4012b0887f 6468 // parse cmdLine arg (SCLK=\d+(kHZ|MHZ)?)? --> g_SPI_SCLK_Hz
whismanoid 25:9d4012b0887f 6469 if (cmdLine.parse_frequency_Hz("SCLK", g_SPI_SCLK_Hz))
whismanoid 25:9d4012b0887f 6470 {
whismanoid 25:9d4012b0887f 6471 isUpdatedSPIConfig = true;
whismanoid 25:9d4012b0887f 6472 // TODO1: validate g_SPI_SCLK_Hz against system clock frequency F_CPU
whismanoid 25:9d4012b0887f 6473 if (g_SPI_SCLK_Hz > limit_max_SPI_SCLK_Hz)
whismanoid 25:9d4012b0887f 6474 {
whismanoid 25:9d4012b0887f 6475 g_SPI_SCLK_Hz = limit_max_SPI_SCLK_Hz;
whismanoid 25:9d4012b0887f 6476 }
whismanoid 25:9d4012b0887f 6477 if (g_SPI_SCLK_Hz < limit_min_SPI_SCLK_Hz)
whismanoid 25:9d4012b0887f 6478 {
whismanoid 25:9d4012b0887f 6479 g_SPI_SCLK_Hz = limit_min_SPI_SCLK_Hz;
whismanoid 25:9d4012b0887f 6480 }
whismanoid 25:9d4012b0887f 6481 }
whismanoid 25:9d4012b0887f 6482 // Update SPI configuration
whismanoid 25:9d4012b0887f 6483 if (isUpdatedSPIConfig)
whismanoid 25:9d4012b0887f 6484 {
whismanoid 25:9d4012b0887f 6485 // %SC sclk=1Mhz -- SPI configure
whismanoid 25:9d4012b0887f 6486 spi_cs = g_SPI_cs_state;
whismanoid 25:9d4012b0887f 6487 spi.format(8,g_SPI_dataMode); // int bits_must_be_8, int mode=0_3 CPOL=0,CPHA=0
whismanoid 25:9d4012b0887f 6488 #if APPLICATION_MAX5715
whismanoid 25:9d4012b0887f 6489 g_MAX5715_device.spi_frequency(g_SPI_SCLK_Hz);
whismanoid 25:9d4012b0887f 6490 #elif APPLICATION_MAX11131
whismanoid 25:9d4012b0887f 6491 g_MAX11131_device.spi_frequency(g_SPI_SCLK_Hz);
whismanoid 25:9d4012b0887f 6492 #elif APPLICATION_MAX5171
whismanoid 25:9d4012b0887f 6493 g_MAX5171_device.spi_frequency(g_SPI_SCLK_Hz);
whismanoid 25:9d4012b0887f 6494 #elif APPLICATION_MAX11410
whismanoid 25:9d4012b0887f 6495 g_MAX11410_device.spi_frequency(g_SPI_SCLK_Hz);
whismanoid 25:9d4012b0887f 6496 #elif APPLICATION_MAX12345
whismanoid 25:9d4012b0887f 6497 g_MAX12345_device.spi_frequency(g_SPI_SCLK_Hz);
whismanoid 25:9d4012b0887f 6498 #else
whismanoid 25:9d4012b0887f 6499 spi.frequency(g_SPI_SCLK_Hz); // int SCLK_Hz=1000000 = 1MHz (initial default)
whismanoid 25:9d4012b0887f 6500 #endif
whismanoid 25:9d4012b0887f 6501 //
whismanoid 25:9d4012b0887f 6502 double ideal_divisor = ((double)SystemCoreClock) / g_SPI_SCLK_Hz;
whismanoid 25:9d4012b0887f 6503 int actual_divisor = (int)(ideal_divisor + 0.0); // frequency divisor truncate
whismanoid 25:9d4012b0887f 6504 double actual_SCLK_Hz = SystemCoreClock / actual_divisor;
whismanoid 25:9d4012b0887f 6505 //
whismanoid 25:9d4012b0887f 6506 // 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 6507 cmdLine.serial().printf(
whismanoid 25:9d4012b0887f 6508 "\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 6509 ((g_SPI_dataMode & SPI_MODE2) ? 1 : 0),
whismanoid 25:9d4012b0887f 6510 ((g_SPI_dataMode & SPI_MODE1) ? 1 : 0),
whismanoid 25:9d4012b0887f 6511 g_SPI_cs_state,
whismanoid 25:9d4012b0887f 6512 g_SPI_SCLK_Hz,
whismanoid 25:9d4012b0887f 6513 (g_SPI_SCLK_Hz / 1000000.),
whismanoid 25:9d4012b0887f 6514 ((double)(SystemCoreClock / 1000000.)),
whismanoid 25:9d4012b0887f 6515 ideal_divisor,
whismanoid 25:9d4012b0887f 6516 (actual_SCLK_Hz / 1000000.)
whismanoid 25:9d4012b0887f 6517 );
whismanoid 25:9d4012b0887f 6518 }
whismanoid 25:9d4012b0887f 6519 // get next character
whismanoid 25:9d4012b0887f 6520 switch (cmdLine[2])
whismanoid 25:9d4012b0887f 6521 {
whismanoid 25:9d4012b0887f 6522 case 'C': case 's':
whismanoid 25:9d4012b0887f 6523 // %SC sclk=1Mhz -- SPI configure
whismanoid 25:9d4012b0887f 6524 break;
whismanoid 25:9d4012b0887f 6525 case 'D': case 'd':
whismanoid 25:9d4012b0887f 6526 // %SD -- SPI diagnostic messages enable
whismanoid 25:9d4012b0887f 6527 if (g_MAX5719_device.onSPIprint) {
whismanoid 25:9d4012b0887f 6528 g_MAX5719_device.onSPIprint = NULL;
whismanoid 25:9d4012b0887f 6529 // no g_MAX5719_device.loop_limit property; device_has_property(Device, 'loop_limit') != None is false
whismanoid 25:9d4012b0887f 6530 }
whismanoid 25:9d4012b0887f 6531 else {
whismanoid 25:9d4012b0887f 6532 void onSPIprint_handler(size_t byteCount, uint8_t mosiData[], uint8_t misoData[]);
whismanoid 25:9d4012b0887f 6533 g_MAX5719_device.onSPIprint = onSPIprint_handler;
whismanoid 25:9d4012b0887f 6534 // no g_MAX5719_device.loop_limit property; device_has_property(Device, 'loop_limit') is false
whismanoid 25:9d4012b0887f 6535 }
whismanoid 25:9d4012b0887f 6536 break;
whismanoid 25:9d4012b0887f 6537 case 'W': case 'R': case 'w': case 'r':
whismanoid 25:9d4012b0887f 6538 {
whismanoid 25:9d4012b0887f 6539 // %SW -- write (write and read)
whismanoid 25:9d4012b0887f 6540 // %SR -- read (alias for %SW because SPI always write and read)
whismanoid 25:9d4012b0887f 6541 // parse cmdLine byte list --> int byteCount; int mosiData[MAX_SPI_BYTE_COUNT];
whismanoid 25:9d4012b0887f 6542 #define MAX_SPI_BYTE_COUNT 32
whismanoid 25:9d4012b0887f 6543 size_t byteCount = byteCount;
whismanoid 25:9d4012b0887f 6544 static char mosiData[MAX_SPI_BYTE_COUNT];
whismanoid 25:9d4012b0887f 6545 static char misoData[MAX_SPI_BYTE_COUNT];
whismanoid 25:9d4012b0887f 6546 if (cmdLine.parse_byteCount_byteList_hex(byteCount, mosiData,
whismanoid 25:9d4012b0887f 6547 MAX_SPI_BYTE_COUNT))
whismanoid 25:9d4012b0887f 6548 {
whismanoid 25:9d4012b0887f 6549 // hex dump mosiData[0..byteCount-1]
whismanoid 25:9d4012b0887f 6550 cmdLine.serial().printf("\r\nSPI");
whismanoid 25:9d4012b0887f 6551 if (byteCount > 7) {
whismanoid 25:9d4012b0887f 6552 cmdLine.serial().printf(" byteCount:%d", byteCount);
whismanoid 25:9d4012b0887f 6553 }
whismanoid 25:9d4012b0887f 6554 cmdLine.serial().printf(" MOSI->");
whismanoid 25:9d4012b0887f 6555 for (unsigned int byteIndex = 0; byteIndex < byteCount; byteIndex++)
whismanoid 25:9d4012b0887f 6556 {
whismanoid 25:9d4012b0887f 6557 cmdLine.serial().printf(" 0x%2.2X", mosiData[byteIndex]);
whismanoid 25:9d4012b0887f 6558 }
whismanoid 25:9d4012b0887f 6559 spi_cs = 0;
whismanoid 25:9d4012b0887f 6560 unsigned int numBytesTransferred =
whismanoid 25:9d4012b0887f 6561 spi.write(mosiData, byteCount, misoData, byteCount);
whismanoid 25:9d4012b0887f 6562 spi_cs = 1;
whismanoid 25:9d4012b0887f 6563 // hex dump misoData[0..byteCount-1]
whismanoid 25:9d4012b0887f 6564 cmdLine.serial().printf(" MISO<-");
whismanoid 25:9d4012b0887f 6565 for (unsigned int byteIndex = 0; byteIndex < numBytesTransferred;
whismanoid 25:9d4012b0887f 6566 byteIndex++)
whismanoid 25:9d4012b0887f 6567 {
whismanoid 25:9d4012b0887f 6568 cmdLine.serial().printf(" 0x%2.2X", misoData[byteIndex]);
whismanoid 25:9d4012b0887f 6569 }
whismanoid 25:9d4012b0887f 6570 cmdLine.serial().printf(" ");
whismanoid 25:9d4012b0887f 6571 }
whismanoid 25:9d4012b0887f 6572 }
whismanoid 25:9d4012b0887f 6573 break;
whismanoid 25:9d4012b0887f 6574 } // switch(cmdLine[2])
whismanoid 25:9d4012b0887f 6575 } // case 'S': // %S... -- SPI diagnostics
whismanoid 25:9d4012b0887f 6576 break;
whismanoid 25:9d4012b0887f 6577 #endif
whismanoid 25:9d4012b0887f 6578 //
whismanoid 25:9d4012b0887f 6579 // A-Z,a-z,0-9 reserved for application use
whismanoid 25:9d4012b0887f 6580 } // switch(cmdLine[1])
whismanoid 25:9d4012b0887f 6581 } // end void pinsMonitor_submenu_onEOLcommandParser(CmdLine & cmdLine)
whismanoid 25:9d4012b0887f 6582
whismanoid 25:9d4012b0887f 6583
whismanoid 25:9d4012b0887f 6584 //--------------------------------------------------
whismanoid 25:9d4012b0887f 6585 void main_menu_status(CmdLine & cmdLine)
whismanoid 25:9d4012b0887f 6586 {
whismanoid 25:9d4012b0887f 6587 cmdLine.serial().printf("\r\nMain menu");
whismanoid 25:9d4012b0887f 6588
whismanoid 27:485b1b2f334c 6589 cmdLine.serial().printf(" MAX5719 20-bit 0.05nV-sec DAC");
whismanoid 25:9d4012b0887f 6590
whismanoid 25:9d4012b0887f 6591 //cmdLine.serial().print(" %s", TARGET_NAME);
whismanoid 25:9d4012b0887f 6592 if (cmdLine.nameStr())
whismanoid 25:9d4012b0887f 6593 {
whismanoid 25:9d4012b0887f 6594 cmdLine.serial().printf(" [%s]", cmdLine.nameStr());
whismanoid 25:9d4012b0887f 6595
whismanoid 25:9d4012b0887f 6596 }
whismanoid 25:9d4012b0887f 6597 cmdLine.serial().printf("\r\n ? -- help");
whismanoid 25:9d4012b0887f 6598
whismanoid 25:9d4012b0887f 6599 }
whismanoid 25:9d4012b0887f 6600
whismanoid 25:9d4012b0887f 6601
whismanoid 25:9d4012b0887f 6602 //--------------------------------------------------
whismanoid 25:9d4012b0887f 6603 void main_menu_help(CmdLine & cmdLine)
whismanoid 25:9d4012b0887f 6604 {
whismanoid 25:9d4012b0887f 6605 // ? -- help
whismanoid 25:9d4012b0887f 6606 //~ cmdLine.serial().print(F("\r\nMenu:"));
whismanoid 25:9d4012b0887f 6607 cmdLine.serial().printf("\r\n # -- lines beginning with # are comments");
whismanoid 25:9d4012b0887f 6608
whismanoid 34:f9ed6213f781 6609 cmdLine.serial().printf("\r\n . runall=? runfail=? loopall=? loopfail=? -- SelfTest");
whismanoid 25:9d4012b0887f 6610
whismanoid 25:9d4012b0887f 6611 //cmdLine.serial().print(F("\r\n ! -- Initial Configuration"));
whismanoid 25:9d4012b0887f 6612 //
whismanoid 25:9d4012b0887f 6613 // % standardize diagnostic commands
whismanoid 25:9d4012b0887f 6614 // %Hpin -- digital output high
whismanoid 25:9d4012b0887f 6615 // %Lpin -- digital output low
whismanoid 25:9d4012b0887f 6616 // %?pin -- digital input
whismanoid 25:9d4012b0887f 6617 // %A %Apin -- analog input
whismanoid 25:9d4012b0887f 6618 // %Ppin df=xx -- pwm output
whismanoid 25:9d4012b0887f 6619 // %Wpin -- measure high pulsewidth input in usec
whismanoid 25:9d4012b0887f 6620 // %wpin -- measure low pulsewidth input in usec
whismanoid 25:9d4012b0887f 6621 // %I... -- I2C diagnostics
whismanoid 25:9d4012b0887f 6622 // %IP -- I2C probe
whismanoid 25:9d4012b0887f 6623 // %IC scl=100khz ADDR=? -- I2C configure
whismanoid 25:9d4012b0887f 6624 // %IW ADDR=? cmd=? data,data,data -- write
whismanoid 25:9d4012b0887f 6625 // %IR ADDR=? RD=? -- read
whismanoid 25:9d4012b0887f 6626 // %I^ cmd=? -- i2c_smbus_read_word_data
whismanoid 25:9d4012b0887f 6627 // %S... -- SPI diagnostics
whismanoid 25:9d4012b0887f 6628 // %SC sclk=1Mhz -- SPI configure
whismanoid 25:9d4012b0887f 6629 // %SW -- write (write and read)
whismanoid 25:9d4012b0887f 6630 // %SR -- read (alias for %SW because SPI always write and read)
whismanoid 25:9d4012b0887f 6631 // A-Z,a-z,0-9 reserved for application use
whismanoid 25:9d4012b0887f 6632 //
whismanoid 25:9d4012b0887f 6633 #if HAS_digitalInOuts
whismanoid 25:9d4012b0887f 6634 // %Hpin -- digital output high
whismanoid 25:9d4012b0887f 6635 // %Lpin -- digital output low
whismanoid 25:9d4012b0887f 6636 // %?pin -- digital input
whismanoid 25:9d4012b0887f 6637 cmdLine.serial().printf("\r\n %%Hn {pin:");
whismanoid 25:9d4012b0887f 6638 list_digitalInOutPins(cmdLine.serial());
whismanoid 25:9d4012b0887f 6639 cmdLine.serial().printf("} -- High Output");
whismanoid 25:9d4012b0887f 6640 cmdLine.serial().printf("\r\n %%Ln {pin:");
whismanoid 25:9d4012b0887f 6641 list_digitalInOutPins(cmdLine.serial());
whismanoid 25:9d4012b0887f 6642 cmdLine.serial().printf("} -- Low Output");
whismanoid 25:9d4012b0887f 6643 cmdLine.serial().printf("\r\n %%?n {pin:");
whismanoid 25:9d4012b0887f 6644 list_digitalInOutPins(cmdLine.serial());
whismanoid 25:9d4012b0887f 6645 cmdLine.serial().printf("} -- Input");
whismanoid 25:9d4012b0887f 6646 #endif
whismanoid 25:9d4012b0887f 6647
whismanoid 25:9d4012b0887f 6648 #if HAS_analogIns
whismanoid 25:9d4012b0887f 6649 // Menu A) analogRead A0..7
whismanoid 25:9d4012b0887f 6650 // %A %Apin -- analog input
whismanoid 25:9d4012b0887f 6651 // analogRead(pinIndex) // analog input pins A0, A1, A2, A3, A4, A5; float voltage = analogRead(A0) * (5.0 / 1023.0)
whismanoid 25:9d4012b0887f 6652 cmdLine.serial().printf("\r\n %%A -- analogRead");
whismanoid 25:9d4012b0887f 6653 #endif
whismanoid 25:9d4012b0887f 6654
whismanoid 25:9d4012b0887f 6655 #if HAS_SPI2_MAX541
whismanoid 25:9d4012b0887f 6656 // TODO1: MAX541 max541(spi2_max541, spi2_max541_cs);
whismanoid 25:9d4012b0887f 6657 cmdLine.serial().printf("\r\n %%D -- DAC output MAX541 (SPI2)");
whismanoid 25:9d4012b0887f 6658 #endif
whismanoid 25:9d4012b0887f 6659
whismanoid 25:9d4012b0887f 6660 #if HAS_I2C // SUPPORT_I2C
whismanoid 25:9d4012b0887f 6661 // TODO: support I2C HAS_I2C // SUPPORT_I2C
whismanoid 25:9d4012b0887f 6662 // VERIFY: I2C utility commands SUPPORT_I2C
whismanoid 25:9d4012b0887f 6663 // VERIFY: report g_I2C_SCL_Hz = (F_CPU / ((TWBR * 2) + 16)) from last Wire_Sr.setClock(I2C_SCL_Hz);
whismanoid 25:9d4012b0887f 6664 // %I... -- I2C diagnostics
whismanoid 25:9d4012b0887f 6665 // %IP -- I2C probe
whismanoid 25:9d4012b0887f 6666 // %IC scl=100khz ADDR=? -- I2C configure
whismanoid 25:9d4012b0887f 6667 // %IW byte byte ... byte RD=? ADDR=0x -- write
whismanoid 25:9d4012b0887f 6668 // %IR ADDR=? RD=? -- read
whismanoid 25:9d4012b0887f 6669 // %I^ cmd=? -- i2c_smbus_read_word_data
whismanoid 25:9d4012b0887f 6670 //g_I2C_SCL_Hz = (F_CPU / ((TWBR * 2) + 16)); // 'F_CPU' 'TWBR' not declared in this scope
whismanoid 25:9d4012b0887f 6671 cmdLine.serial().printf("\r\n %%IC ADDR=0x%2.2x=(0x%2.2x>>1) SCL=%d=%1.3fkHz -- I2C config",
whismanoid 25:9d4012b0887f 6672 g_I2C_deviceAddress7, (g_I2C_deviceAddress7 << 1), g_I2C_SCL_Hz,
whismanoid 25:9d4012b0887f 6673 (g_I2C_SCL_Hz / 1000.));
whismanoid 25:9d4012b0887f 6674 cmdLine.serial().printf("\r\n %%IW byte byte ... byte RD=? ADDR=0x%2.2x -- I2C write/read",
whismanoid 25:9d4012b0887f 6675 g_I2C_deviceAddress7);
whismanoid 25:9d4012b0887f 6676 //
whismanoid 25:9d4012b0887f 6677 #if SUPPORT_I2C
whismanoid 25:9d4012b0887f 6678 // Menu ^ cmd=?) i2c_smbus_read_word_data
whismanoid 25:9d4012b0887f 6679 cmdLine.serial().printf("\r\n %%I^ cmd=? -- i2c_smbus_read_word_data");
whismanoid 25:9d4012b0887f 6680 // test low-level I2C i2c_smbus_read_word_data
whismanoid 25:9d4012b0887f 6681 #endif // SUPPORT_I2C
whismanoid 25:9d4012b0887f 6682 //cmdLine.serial().printf(" H) Hunt for attached I2C devices");
whismanoid 25:9d4012b0887f 6683 cmdLine.serial().printf("\r\n %%IP -- I2C Probe for attached devices");
whismanoid 25:9d4012b0887f 6684 // cmdLine.serial().printf(" s) search i2c address");
whismanoid 25:9d4012b0887f 6685 #endif // SUPPORT_I2C
whismanoid 25:9d4012b0887f 6686
whismanoid 25:9d4012b0887f 6687 #if HAS_SPI // SUPPORT_SPI
whismanoid 25:9d4012b0887f 6688 // TODO: support SPI HAS_SPI // SUPPORT_SPI
whismanoid 25:9d4012b0887f 6689 // SPI test command S (mosiData)+
whismanoid 25:9d4012b0887f 6690 // %S... -- SPI diagnostics
whismanoid 25:9d4012b0887f 6691 // %SC sclk=1Mhz -- SPI configure
whismanoid 25:9d4012b0887f 6692 // %SW -- write (write and read)
whismanoid 25:9d4012b0887f 6693 // %SR -- read (alias for %SW because SPI always write and read)
whismanoid 25:9d4012b0887f 6694 // spi.format(8,0); // int bits_must_be_8, int mode=0_3 CPOL=0,CPHA=0 rising edge (initial default)
whismanoid 25:9d4012b0887f 6695 // spi.format(8,1); // int bits_must_be_8, int mode=0_3 CPOL=0,CPHA=1 falling edge (initial default)
whismanoid 25:9d4012b0887f 6696 // spi.format(8,2); // int bits_must_be_8, int mode=0_3 CPOL=1,CPHA=0 falling edge (initial default)
whismanoid 25:9d4012b0887f 6697 // spi.format(8,3); // int bits_must_be_8, int mode=0_3 CPOL=1,CPHA=1 rising edge (initial default)
whismanoid 25:9d4012b0887f 6698 // spi.frequency(1000000); // int SCLK_Hz=1000000 = 1MHz (initial default)
whismanoid 25:9d4012b0887f 6699 // mode | POL PHA
whismanoid 25:9d4012b0887f 6700 // -----+--------
whismanoid 25:9d4012b0887f 6701 // 0 | 0 0
whismanoid 25:9d4012b0887f 6702 // 1 | 0 1
whismanoid 25:9d4012b0887f 6703 // 2 | 1 0
whismanoid 25:9d4012b0887f 6704 // 3 | 1 1
whismanoid 25:9d4012b0887f 6705 //cmdLine.serial().printf(" S) SPI mosi,mosi,...mosi hex bytes SCLK=1000000 CPOL=0 CPHA=0");
whismanoid 25:9d4012b0887f 6706 // 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 6707 cmdLine.serial().printf("\r\n %%SC SCLK=%ld=%1.3fMHz CPOL=%d CPHA=%d -- SPI config",
whismanoid 25:9d4012b0887f 6708 g_SPI_SCLK_Hz, (g_SPI_SCLK_Hz / 1000000.),
whismanoid 25:9d4012b0887f 6709 ((g_SPI_dataMode & SPI_MODE2) ? 1 : 0),
whismanoid 25:9d4012b0887f 6710 ((g_SPI_dataMode & SPI_MODE1) ? 1 : 0));
whismanoid 25:9d4012b0887f 6711 cmdLine.serial().printf("\r\n %%SD -- SPI diagnostic messages ");
whismanoid 25:9d4012b0887f 6712 if (g_MAX5719_device.onSPIprint) {
whismanoid 25:9d4012b0887f 6713 cmdLine.serial().printf("hide");
whismanoid 25:9d4012b0887f 6714 }
whismanoid 25:9d4012b0887f 6715 else {
whismanoid 25:9d4012b0887f 6716 cmdLine.serial().printf("show");
whismanoid 25:9d4012b0887f 6717 }
whismanoid 25:9d4012b0887f 6718 cmdLine.serial().printf("\r\n %%SW mosi,mosi,...mosi -- SPI write hex bytes");
whismanoid 25:9d4012b0887f 6719 // VERIFY: parse new SPI settings parse_strCommandArgs() SCLK=1000000 CPOL=0 CPHA=0
whismanoid 25:9d4012b0887f 6720 #endif // SUPPORT_SPI
whismanoid 25:9d4012b0887f 6721 //
whismanoid 25:9d4012b0887f 6722 // Application-specific commands (help text) here
whismanoid 25:9d4012b0887f 6723 //
whismanoid 25:9d4012b0887f 6724 #if APPLICATION_ArduinoPinsMonitor
whismanoid 25:9d4012b0887f 6725 cmdLine.serial().printf("\r\n A-Z,a-z,0-9 -- reserved for application use"); // ArduinoPinsMonitor
whismanoid 25:9d4012b0887f 6726 #endif // APPLICATION_ArduinoPinsMonitor
whismanoid 25:9d4012b0887f 6727 //
whismanoid 25:9d4012b0887f 6728
whismanoid 25:9d4012b0887f 6729 extern void MAX5719_menu_help(CmdLine & cmdLine); // defined in Test_Menu_MAX5719.cpp\n
whismanoid 25:9d4012b0887f 6730 MAX5719_menu_help(cmdLine);
whismanoid 25:9d4012b0887f 6731 }
whismanoid 25:9d4012b0887f 6732
whismanoid 25:9d4012b0887f 6733
whismanoid 25:9d4012b0887f 6734
whismanoid 25:9d4012b0887f 6735 //--------------------------------------------------
whismanoid 25:9d4012b0887f 6736 // main menu command-line parser
whismanoid 25:9d4012b0887f 6737 // invoked by CmdLine::append(char ch) or CmdLine::idleAppendIfReadable()
whismanoid 25:9d4012b0887f 6738 void main_menu_onEOLcommandParser(CmdLine & cmdLine)
whismanoid 25:9d4012b0887f 6739 {
whismanoid 25:9d4012b0887f 6740 // DIAGNOSTIC: print line buffer
whismanoid 25:9d4012b0887f 6741 //~ cmdLine.serial().printf("\r\nmain_menu_onEOLcommandParser: ~%s~\r\n", cmdLine.str());
whismanoid 25:9d4012b0887f 6742 //
whismanoid 25:9d4012b0887f 6743 switch (cmdLine[0])
whismanoid 25:9d4012b0887f 6744 {
whismanoid 25:9d4012b0887f 6745 case '?':
whismanoid 25:9d4012b0887f 6746 main_menu_status(cmdLine);
whismanoid 25:9d4012b0887f 6747 main_menu_help(cmdLine);
whismanoid 25:9d4012b0887f 6748 // print command prompt
whismanoid 25:9d4012b0887f 6749 //cmdLine.serial().printf("\r\n>");
whismanoid 25:9d4012b0887f 6750 break;
whismanoid 25:9d4012b0887f 6751 case '\r': case '\n': // ignore blank line
whismanoid 25:9d4012b0887f 6752 case '\0': // ignore empty line
whismanoid 25:9d4012b0887f 6753 case '#': // ignore comment line
whismanoid 25:9d4012b0887f 6754 // # -- lines beginning with # are comments
whismanoid 25:9d4012b0887f 6755 main_menu_status(cmdLine);
whismanoid 25:9d4012b0887f 6756 //~ main_menu_help(cmdLine);
whismanoid 25:9d4012b0887f 6757 // print command prompt
whismanoid 25:9d4012b0887f 6758 //cmdLine.serial().printf("\r\n>");
whismanoid 25:9d4012b0887f 6759 break;
whismanoid 25:9d4012b0887f 6760 #if ECHO_EOF_ON_EOL
whismanoid 25:9d4012b0887f 6761 case '\x04': // Unicode (U+0004) EOT END OF TRANSMISSION = CTRL+D as EOF end of file
whismanoid 25:9d4012b0887f 6762 cmdLine.serial().printf("\x04"); // immediately echo EOF for test scripting
whismanoid 25:9d4012b0887f 6763 diagnostic_led_EOF();
whismanoid 25:9d4012b0887f 6764 break;
whismanoid 25:9d4012b0887f 6765 case '\x1a': // Unicode (U+001A) SUB SUBSTITUTE = CTRL+Z as EOF end of file
whismanoid 25:9d4012b0887f 6766 cmdLine.serial().printf("\x1a"); // immediately echo EOF for test scripting
whismanoid 25:9d4012b0887f 6767 diagnostic_led_EOF();
whismanoid 25:9d4012b0887f 6768 break;
whismanoid 25:9d4012b0887f 6769 #endif
whismanoid 25:9d4012b0887f 6770 #if APPLICATION_ArduinoPinsMonitor
whismanoid 25:9d4012b0887f 6771 case '.':
whismanoid 25:9d4012b0887f 6772 {
whismanoid 25:9d4012b0887f 6773 // . -- SelfTest
whismanoid 25:9d4012b0887f 6774 cmdLine.serial().printf("SelfTest()");
whismanoid 33:2c675744a01b 6775 // parse "run=0x0004" -- run selected tests
whismanoid 30:13fc9d492ee0 6776 if (cmdLine.parse_int_dec("run", SelfTestGroupEnable))
whismanoid 30:13fc9d492ee0 6777 {
whismanoid 30:13fc9d492ee0 6778 }
whismanoid 33:2c675744a01b 6779 // parse "runall=0x0004" -- run selected tests, continue even if tests fail
whismanoid 33:2c675744a01b 6780 if (cmdLine.parse_int_dec("runall", SelfTestGroupEnable))
whismanoid 33:2c675744a01b 6781 {
whismanoid 33:2c675744a01b 6782 SelfTestGroupEnable &=~ 2; // xxxxxx0x: no repeat-until-failure
whismanoid 33:2c675744a01b 6783 SelfTestGroupEnable &=~ 1; // xxxxxxx0: no halt-on-first-failure
whismanoid 33:2c675744a01b 6784 }
whismanoid 33:2c675744a01b 6785 // parse "runfail=0x0004" -- run selected tests, halt on first failure
whismanoid 30:13fc9d492ee0 6786 if (cmdLine.parse_int_dec("runfail", SelfTestGroupEnable))
whismanoid 30:13fc9d492ee0 6787 {
whismanoid 33:2c675744a01b 6788 SelfTestGroupEnable &=~ 2; // xxxxxx0x: no repeat-until-failure
whismanoid 33:2c675744a01b 6789 SelfTestGroupEnable |= 1; // xxxxxxx1: halt-on-first-failure
whismanoid 30:13fc9d492ee0 6790 }
whismanoid 33:2c675744a01b 6791 // parse "loopall=0x0004" -- run selected tests, repeat until keypress
whismanoid 33:2c675744a01b 6792 if (cmdLine.parse_int_dec("loopall", SelfTestGroupEnable))
whismanoid 30:13fc9d492ee0 6793 {
whismanoid 33:2c675744a01b 6794 SelfTestGroupEnable |= 2; // xxxxxx1x: repeat-until-failure
whismanoid 33:2c675744a01b 6795 SelfTestGroupEnable &=~ 1; // xxxxxx10
whismanoid 30:13fc9d492ee0 6796 }
whismanoid 33:2c675744a01b 6797 // parse "loopfail=0x0004" -- run selected tests, repeat until first failure
whismanoid 30:13fc9d492ee0 6798 if (cmdLine.parse_int_dec("loopfail", SelfTestGroupEnable))
whismanoid 30:13fc9d492ee0 6799 {
whismanoid 33:2c675744a01b 6800 SelfTestGroupEnable |= 2; // xxxxxx1x: repeat-until-failure
whismanoid 33:2c675744a01b 6801 SelfTestGroupEnable |= 1; // xxxxxxx1: halt-on-first-failure
whismanoid 30:13fc9d492ee0 6802 }
whismanoid 25:9d4012b0887f 6803 SelfTest(cmdLine);
whismanoid 25:9d4012b0887f 6804 }
whismanoid 25:9d4012b0887f 6805 break;
whismanoid 25:9d4012b0887f 6806 case '%':
whismanoid 25:9d4012b0887f 6807 {
whismanoid 25:9d4012b0887f 6808 pinsMonitor_submenu_onEOLcommandParser(cmdLine);
whismanoid 25:9d4012b0887f 6809 }
whismanoid 25:9d4012b0887f 6810 break; // case '%'
whismanoid 25:9d4012b0887f 6811 #endif // APPLICATION_ArduinoPinsMonitor
whismanoid 25:9d4012b0887f 6812 //
whismanoid 25:9d4012b0887f 6813 // Application-specific commands here
whismanoid 25:9d4012b0887f 6814 // alphanumeric command codes A-Z,a-z,0-9 reserved for application use
whismanoid 25:9d4012b0887f 6815 //
whismanoid 25:9d4012b0887f 6816 #if APPLICATION_ArduinoPinsMonitor
whismanoid 25:9d4012b0887f 6817 #endif // APPLICATION_ArduinoPinsMonitor
whismanoid 25:9d4012b0887f 6818
whismanoid 25:9d4012b0887f 6819 //
whismanoid 25:9d4012b0887f 6820 // add new commands here
whismanoid 25:9d4012b0887f 6821 //
whismanoid 25:9d4012b0887f 6822 default:
whismanoid 25:9d4012b0887f 6823 extern bool MAX5719_menu_onEOLcommandParser(CmdLine & cmdLine); // defined in Test_Menu_MAX5719.cpp
whismanoid 25:9d4012b0887f 6824 if (!MAX5719_menu_onEOLcommandParser(cmdLine))
whismanoid 25:9d4012b0887f 6825 { // not_handled_by_device_submenu
whismanoid 25:9d4012b0887f 6826 cmdLine.serial().printf("\r\n unknown command 0x%2.2x \"%s\"\r\n", cmdLine.str()[0], cmdLine.str());
whismanoid 25:9d4012b0887f 6827
whismanoid 25:9d4012b0887f 6828 # if HAS_DAPLINK_SERIAL
whismanoid 25:9d4012b0887f 6829 cmdLine_DAPLINKserial.serial().printf("\r\n unknown command 0x%2.2x \"%s\"\r\n", cmdLine.str()[0], cmdLine.str());
whismanoid 25:9d4012b0887f 6830
whismanoid 25:9d4012b0887f 6831 # endif // HAS_DAPLINK_SERIAL
whismanoid 25:9d4012b0887f 6832 }
whismanoid 25:9d4012b0887f 6833 } // switch (cmdLine[0])
whismanoid 25:9d4012b0887f 6834 //
whismanoid 25:9d4012b0887f 6835 // print command prompt
whismanoid 25:9d4012b0887f 6836 cmdLine.serial().printf("\r\nMAX5719 > ");
whismanoid 25:9d4012b0887f 6837
whismanoid 25:9d4012b0887f 6838 } // end void main_menu_onEOLcommandParser(CmdLine & cmdLine)
whismanoid 25:9d4012b0887f 6839
whismanoid 25:9d4012b0887f 6840 //--------------------------------------------------
whismanoid 25:9d4012b0887f 6841 #if MAX5719_ONSPIPRINT
whismanoid 25:9d4012b0887f 6842 // Optional Diagnostic function to print SPI transactions
whismanoid 25:9d4012b0887f 6843 void onSPIprint_handler(size_t byteCount, uint8_t mosiData[], uint8_t misoData[])
whismanoid 25:9d4012b0887f 6844 {
whismanoid 25:9d4012b0887f 6845 cmdLine_serial.serial().printf("\r\n SPI MOSI->");
whismanoid 25:9d4012b0887f 6846 for (uint8_t index = 0; index < byteCount; index++) {
whismanoid 25:9d4012b0887f 6847 cmdLine_serial.serial().printf(" 0x%2.2X", mosiData[index]);
whismanoid 25:9d4012b0887f 6848 }
whismanoid 25:9d4012b0887f 6849 cmdLine_serial.serial().printf(" MISO<-");
whismanoid 25:9d4012b0887f 6850 for (uint8_t index = 0; index < byteCount; index++) {
whismanoid 25:9d4012b0887f 6851 cmdLine_serial.serial().printf(" 0x%2.2X", misoData[index]);
whismanoid 25:9d4012b0887f 6852 }
whismanoid 25:9d4012b0887f 6853 cmdLine_serial.serial().printf(" ");
whismanoid 25:9d4012b0887f 6854 }
whismanoid 25:9d4012b0887f 6855 #endif // MAX5719_ONSPIPRINT
whismanoid 25:9d4012b0887f 6856
whismanoid 25:9d4012b0887f 6857 //--------------------------------------------------
whismanoid 25:9d4012b0887f 6858 void InitializeConfiguration()
whismanoid 25:9d4012b0887f 6859 {
whismanoid 25:9d4012b0887f 6860 // CODE GENERATOR: example code: member function Init
whismanoid 25:9d4012b0887f 6861 # if HAS_DAPLINK_SERIAL
whismanoid 25:9d4012b0887f 6862 cmdLine_DAPLINKserial.serial().printf("\r\nMAX5719_Init()");
whismanoid 25:9d4012b0887f 6863
whismanoid 25:9d4012b0887f 6864 # endif
whismanoid 25:9d4012b0887f 6865 cmdLine_serial.serial().printf("\r\nMAX5719_Init()");
whismanoid 25:9d4012b0887f 6866
whismanoid 25:9d4012b0887f 6867 g_MAX5719_device.Init(); // defined in #include MAX5719.h
whismanoid 25:9d4012b0887f 6868 # if MAX5719_ONSPIPRINT
whismanoid 25:9d4012b0887f 6869 // Optional Diagnostic function to print SPI transactions
whismanoid 25:9d4012b0887f 6870 # if MAX5719_ONSPIPRINT_ENABLED
whismanoid 25:9d4012b0887f 6871 g_MAX5719_device.onSPIprint = onSPIprint_handler;
whismanoid 25:9d4012b0887f 6872 # else
whismanoid 25:9d4012b0887f 6873 g_MAX5719_device.onSPIprint = NULL;
whismanoid 25:9d4012b0887f 6874 # endif
whismanoid 25:9d4012b0887f 6875 # endif
whismanoid 25:9d4012b0887f 6876 } // end of void InitializeConfiguration()
whismanoid 25:9d4012b0887f 6877
whismanoid 25:9d4012b0887f 6878 //--------------------------------------------------
whismanoid 25:9d4012b0887f 6879 // diagnostic rbg led GREEN
whismanoid 25:9d4012b0887f 6880 void diagnostic_led_EOF()
whismanoid 25:9d4012b0887f 6881 {
whismanoid 25:9d4012b0887f 6882 #if USE_LEDS
whismanoid 25:9d4012b0887f 6883 led1 = LED_ON; led2 = LED_ON; led3 = LED_OFF; // diagnostic rbg led RED+GREEN=YELLOW
whismanoid 25:9d4012b0887f 6884 // 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 6885 ThisThread::sleep_for(250); // [since mbed-os-5.10] vs Thread::wait(250);
whismanoid 25:9d4012b0887f 6886 led1 = LED_OFF; led2 = LED_ON; led3 = LED_OFF; // diagnostic rbg led GREEN
whismanoid 25:9d4012b0887f 6887 ThisThread::sleep_for(250); // [since mbed-os-5.10] vs Thread::wait(250);
whismanoid 25:9d4012b0887f 6888 led1 = LED_ON; led2 = LED_ON; led3 = LED_OFF; // diagnostic rbg led RED+GREEN=YELLOW
whismanoid 25:9d4012b0887f 6889 ThisThread::sleep_for(250); // [since mbed-os-5.10] vs Thread::wait(250);
whismanoid 25:9d4012b0887f 6890 led1 = LED_OFF; led2 = LED_ON; led3 = LED_OFF; // diagnostic rbg led GREEN
whismanoid 25:9d4012b0887f 6891 ThisThread::sleep_for(250); // [since mbed-os-5.10] vs Thread::wait(250);
whismanoid 25:9d4012b0887f 6892 #endif // USE_LEDS
whismanoid 25:9d4012b0887f 6893 }
whismanoid 25:9d4012b0887f 6894
whismanoid 25:9d4012b0887f 6895 //--------------------------------------------------
whismanoid 25:9d4012b0887f 6896 // Support commands that get handled immediately w/o waiting for EOL
whismanoid 25:9d4012b0887f 6897 // handled as immediate command, do not append to buffer
whismanoid 25:9d4012b0887f 6898 void on_immediate_0x21() // Unicode (U+0021) ! EXCLAMATION MARK
whismanoid 25:9d4012b0887f 6899 {
whismanoid 25:9d4012b0887f 6900 #if USE_LEDS
whismanoid 25:9d4012b0887f 6901 led1 = LED_OFF; led2 = LED_OFF; led3 = LED_ON; // diagnostic rbg led BLUE
whismanoid 25:9d4012b0887f 6902 #endif // USE_LEDS
whismanoid 25:9d4012b0887f 6903 InitializeConfiguration();
whismanoid 25:9d4012b0887f 6904 ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125);
whismanoid 25:9d4012b0887f 6905 }
whismanoid 25:9d4012b0887f 6906
whismanoid 25:9d4012b0887f 6907 //--------------------------------------------------
whismanoid 25:9d4012b0887f 6908 // Support commands that get handled immediately w/o waiting for EOL
whismanoid 25:9d4012b0887f 6909 // handled as immediate command, do not append to buffer
whismanoid 25:9d4012b0887f 6910 void on_immediate_0x7b() // Unicode (U+007B) { LEFT CURLY BRACKET
whismanoid 25:9d4012b0887f 6911 {
whismanoid 25:9d4012b0887f 6912 #if HAS_BUTTON2_DEMO_INTERRUPT
whismanoid 25:9d4012b0887f 6913 onButton2FallingEdge();
whismanoid 25:9d4012b0887f 6914 #endif
whismanoid 25:9d4012b0887f 6915 }
whismanoid 25:9d4012b0887f 6916
whismanoid 25:9d4012b0887f 6917 //--------------------------------------------------
whismanoid 25:9d4012b0887f 6918 // Support commands that get handled immediately w/o waiting for EOL
whismanoid 25:9d4012b0887f 6919 // handled as immediate command, do not append to buffer
whismanoid 25:9d4012b0887f 6920 void on_immediate_0x7d() // Unicode (U+007D) } RIGHT CURLY BRACKET
whismanoid 25:9d4012b0887f 6921 {
whismanoid 25:9d4012b0887f 6922 #if HAS_BUTTON1_DEMO_INTERRUPT
whismanoid 25:9d4012b0887f 6923 onButton1FallingEdge();
whismanoid 25:9d4012b0887f 6924 #endif
whismanoid 25:9d4012b0887f 6925 }
whismanoid 25:9d4012b0887f 6926
whismanoid 25:9d4012b0887f 6927 //----------------------------------------
whismanoid 25:9d4012b0887f 6928 // example code main function
whismanoid 25:9d4012b0887f 6929 int main()
whismanoid 25:9d4012b0887f 6930 {
whismanoid 25:9d4012b0887f 6931 // Configure serial ports
whismanoid 25:9d4012b0887f 6932 cmdLine_serial.clear();
whismanoid 25:9d4012b0887f 6933 //~ cmdLine_serial.serial().printf("\r\n cmdLine_serial.serial().printf test\r\n");
whismanoid 25:9d4012b0887f 6934 cmdLine_serial.onEOLcommandParser = main_menu_onEOLcommandParser;
whismanoid 25:9d4012b0887f 6935 cmdLine_serial.diagnostic_led_EOF = diagnostic_led_EOF;
whismanoid 25:9d4012b0887f 6936 /// CmdLine::set_immediate_handler(char, functionPointer_void_void_on_immediate_0x21);
whismanoid 25:9d4012b0887f 6937 cmdLine_serial.on_immediate_0x21 = on_immediate_0x21;
whismanoid 25:9d4012b0887f 6938 cmdLine_serial.on_immediate_0x7b = on_immediate_0x7b;
whismanoid 25:9d4012b0887f 6939 cmdLine_serial.on_immediate_0x7d = on_immediate_0x7d;
whismanoid 25:9d4012b0887f 6940 # if HAS_DAPLINK_SERIAL
whismanoid 25:9d4012b0887f 6941 cmdLine_DAPLINKserial.clear();
whismanoid 25:9d4012b0887f 6942 //~ cmdLine_DAPLINKserial.serial().printf("\r\n cmdLine_DAPLINKserial.serial().printf test\r\n");
whismanoid 25:9d4012b0887f 6943 cmdLine_DAPLINKserial.onEOLcommandParser = main_menu_onEOLcommandParser;
whismanoid 25:9d4012b0887f 6944 /// @todo CmdLine::set_immediate_handler(char, functionPointer_void_void_on_immediate_0x21);
whismanoid 25:9d4012b0887f 6945 cmdLine_DAPLINKserial.on_immediate_0x21 = on_immediate_0x21;
whismanoid 25:9d4012b0887f 6946 cmdLine_DAPLINKserial.on_immediate_0x7b = on_immediate_0x7b;
whismanoid 25:9d4012b0887f 6947 cmdLine_DAPLINKserial.on_immediate_0x7d = on_immediate_0x7d;
whismanoid 25:9d4012b0887f 6948 # endif
whismanoid 25:9d4012b0887f 6949
whismanoid 25:9d4012b0887f 6950
whismanoid 25:9d4012b0887f 6951 //print_banner();
whismanoid 25:9d4012b0887f 6952
whismanoid 25:9d4012b0887f 6953 #if HAS_I2C
whismanoid 25:9d4012b0887f 6954 // i2c init
whismanoid 25:9d4012b0887f 6955 // declare in narrower scope: MAX32625MBED I2C i2cMaster(...)
whismanoid 25:9d4012b0887f 6956 // i2cMaster.frequency(g_I2C_SCL_Hz);
whismanoid 25:9d4012b0887f 6957 #else
whismanoid 25:9d4012b0887f 6958 // Ensure that the unused I2C pins do not interfere with analog inputs A4 and A5
whismanoid 25:9d4012b0887f 6959 #if HAS_digitalInOut14
whismanoid 25:9d4012b0887f 6960 // DigitalInOut digitalInOut14(P1_6, PIN_INPUT, PullUp, 1); // P1_6 TARGET_MAX32635MBED A4/SDA (10pin digital connector)
whismanoid 25:9d4012b0887f 6961 digitalInOut14.input();
whismanoid 25:9d4012b0887f 6962 #endif
whismanoid 25:9d4012b0887f 6963 #if HAS_digitalInOut15
whismanoid 25:9d4012b0887f 6964 // DigitalInOut digitalInOut15(P1_7, PIN_INPUT, PullUp, 1); // P1_7 TARGET_MAX32635MBED A5/SCL (10pin digital connector)
whismanoid 25:9d4012b0887f 6965 digitalInOut15.input();
whismanoid 25:9d4012b0887f 6966 #endif
whismanoid 25:9d4012b0887f 6967 #if HAS_digitalInOut16
whismanoid 25:9d4012b0887f 6968 // DigitalInOut mode can be one of PullUp, PullDown, PullNone, OpenDrain
whismanoid 25:9d4012b0887f 6969 // PullUp-->3.4V, PullDown-->1.7V, PullNone-->3.5V, OpenDrain-->0.00V
whismanoid 25:9d4012b0887f 6970 //DigitalInOut digitalInOut16(P3_4, PIN_INPUT, OpenDrain, 0); // P3_4 TARGET_MAX32635MBED A4/SDA (6pin analog connector)
whismanoid 25:9d4012b0887f 6971 digitalInOut16.input();
whismanoid 25:9d4012b0887f 6972 #endif
whismanoid 25:9d4012b0887f 6973 #if HAS_digitalInOut17
whismanoid 25:9d4012b0887f 6974 //DigitalInOut digitalInOut17(P3_5, PIN_INPUT, OpenDrain, 0); // P3_5 TARGET_MAX32635MBED A5/SCL (6pin analog connector)
whismanoid 25:9d4012b0887f 6975 digitalInOut17.input();
whismanoid 25:9d4012b0887f 6976 #endif
whismanoid 25:9d4012b0887f 6977 #endif // HAS_I2C
whismanoid 25:9d4012b0887f 6978
whismanoid 25:9d4012b0887f 6979
whismanoid 25:9d4012b0887f 6980 #if USE_LEDS
whismanoid 25:9d4012b0887f 6981 #if defined(TARGET_MAX32630)
whismanoid 25:9d4012b0887f 6982 led1 = LED_ON; led2 = LED_OFF; led3 = LED_OFF; // diagnostic rbg led RED
whismanoid 25:9d4012b0887f 6983 ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125);
whismanoid 25:9d4012b0887f 6984 led1 = LED_OFF; led2 = LED_ON; led3 = LED_OFF; // diagnostic rbg led GREEN
whismanoid 25:9d4012b0887f 6985 ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125);
whismanoid 25:9d4012b0887f 6986 led1 = LED_OFF; led2 = LED_OFF; led3 = LED_ON; // diagnostic rbg led BLUE
whismanoid 25:9d4012b0887f 6987 ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125);
whismanoid 25:9d4012b0887f 6988 led1 = LED_ON; led2 = LED_ON; led3 = LED_ON; // diagnostic rbg led RED+GREEN+BLUE=WHITE
whismanoid 25:9d4012b0887f 6989 ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125);
whismanoid 25:9d4012b0887f 6990 led1 = LED_OFF; led2 = LED_ON; led3 = LED_ON; // diagnostic rbg led GREEN+BLUE=CYAN
whismanoid 25:9d4012b0887f 6991 ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125);
whismanoid 25:9d4012b0887f 6992 led1 = LED_ON; led2 = LED_OFF; led3 = LED_ON; // diagnostic rbg led RED+BLUE=MAGENTA
whismanoid 25:9d4012b0887f 6993 ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125);
whismanoid 25:9d4012b0887f 6994 led1 = LED_ON; led2 = LED_ON; led3 = LED_OFF; // diagnostic rbg led RED+GREEN=YELLOW
whismanoid 25:9d4012b0887f 6995 ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125);
whismanoid 25:9d4012b0887f 6996 led1 = LED_OFF; led2 = LED_OFF; led3 = LED_OFF; // diagnostic rbg led BLACK
whismanoid 25:9d4012b0887f 6997 ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125);
whismanoid 25:9d4012b0887f 6998 #elif defined(TARGET_MAX32625MBED)
whismanoid 25:9d4012b0887f 6999 led1 = LED_ON; led2 = LED_OFF; led3 = LED_OFF; // diagnostic rbg led RED
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_ON; led3 = LED_OFF; // diagnostic rbg led GREEN
whismanoid 25:9d4012b0887f 7002 ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125);
whismanoid 25:9d4012b0887f 7003 led1 = LED_OFF; led2 = LED_OFF; led3 = LED_ON; // diagnostic rbg led BLUE
whismanoid 25:9d4012b0887f 7004 ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125);
whismanoid 25:9d4012b0887f 7005 led1 = LED_ON; led2 = LED_ON; led3 = LED_ON; // diagnostic rbg led RED+GREEN+BLUE=WHITE
whismanoid 25:9d4012b0887f 7006 ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125);
whismanoid 25:9d4012b0887f 7007 led1 = LED_OFF; led2 = LED_ON; led3 = LED_ON; // diagnostic rbg led GREEN+BLUE=CYAN
whismanoid 25:9d4012b0887f 7008 ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125);
whismanoid 25:9d4012b0887f 7009 led1 = LED_ON; led2 = LED_OFF; led3 = LED_ON; // diagnostic rbg led RED+BLUE=MAGENTA
whismanoid 25:9d4012b0887f 7010 ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125);
whismanoid 25:9d4012b0887f 7011 led1 = LED_ON; led2 = LED_ON; led3 = LED_OFF; // diagnostic rbg led RED+GREEN=YELLOW
whismanoid 25:9d4012b0887f 7012 ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125);
whismanoid 25:9d4012b0887f 7013 led1 = LED_OFF; led2 = LED_OFF; led3 = LED_OFF; // diagnostic rbg led BLACK
whismanoid 25:9d4012b0887f 7014 ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125);
whismanoid 25:9d4012b0887f 7015 #else // not defined(TARGET_LPC1768 etc.)
whismanoid 25:9d4012b0887f 7016 led1 = LED_ON;
whismanoid 25:9d4012b0887f 7017 led2 = LED_OFF;
whismanoid 25:9d4012b0887f 7018 led3 = LED_OFF;
whismanoid 25:9d4012b0887f 7019 led4 = LED_OFF;
whismanoid 25:9d4012b0887f 7020 ThisThread::sleep_for(75); // [since mbed-os-5.10] vs Thread::wait(75);
whismanoid 25:9d4012b0887f 7021 //led1 = LED_ON;
whismanoid 25:9d4012b0887f 7022 led2 = LED_ON;
whismanoid 25:9d4012b0887f 7023 ThisThread::sleep_for(75); // [since mbed-os-5.10] vs Thread::wait(75);
whismanoid 25:9d4012b0887f 7024 led1 = LED_OFF;
whismanoid 25:9d4012b0887f 7025 //led2 = LED_ON;
whismanoid 25:9d4012b0887f 7026 led3 = LED_ON;
whismanoid 25:9d4012b0887f 7027 ThisThread::sleep_for(75); // [since mbed-os-5.10] vs Thread::wait(75);
whismanoid 25:9d4012b0887f 7028 led2 = LED_OFF;
whismanoid 25:9d4012b0887f 7029 //led3 = LED_ON;
whismanoid 25:9d4012b0887f 7030 led4 = LED_ON;
whismanoid 25:9d4012b0887f 7031 ThisThread::sleep_for(75); // [since mbed-os-5.10] vs Thread::wait(75);
whismanoid 25:9d4012b0887f 7032 led3 = LED_OFF;
whismanoid 25:9d4012b0887f 7033 led4 = LED_ON;
whismanoid 25:9d4012b0887f 7034 //
whismanoid 25:9d4012b0887f 7035 #endif // target definition
whismanoid 25:9d4012b0887f 7036 #endif
whismanoid 25:9d4012b0887f 7037
whismanoid 25:9d4012b0887f 7038 // cmd_TE();
whismanoid 25:9d4012b0887f 7039
whismanoid 25:9d4012b0887f 7040 // #if USE_LEDS
whismanoid 25:9d4012b0887f 7041 // rgb_led.white(); // diagnostic rbg led RED+GREEN+BLUE=WHITE
whismanoid 25:9d4012b0887f 7042 // #endif // USE_LEDS
whismanoid 25:9d4012b0887f 7043 if (led1.is_connected()) {
whismanoid 25:9d4012b0887f 7044 led1 = LED_ON;
whismanoid 25:9d4012b0887f 7045 }
whismanoid 25:9d4012b0887f 7046 if (led2.is_connected()) {
whismanoid 25:9d4012b0887f 7047 led2 = LED_ON;
whismanoid 25:9d4012b0887f 7048 }
whismanoid 25:9d4012b0887f 7049 if (led3.is_connected()) {
whismanoid 25:9d4012b0887f 7050 led3 = LED_ON;
whismanoid 25:9d4012b0887f 7051 }
whismanoid 25:9d4012b0887f 7052
whismanoid 25:9d4012b0887f 7053 InitializeConfiguration();
whismanoid 25:9d4012b0887f 7054 // example code: serial port banner message
whismanoid 25:9d4012b0887f 7055 #if defined(TARGET_MAX32625MBED)
whismanoid 25:9d4012b0887f 7056 serial.printf("MAX32625MBED ");
whismanoid 25:9d4012b0887f 7057 #elif defined(TARGET_MAX32625PICO)
whismanoid 25:9d4012b0887f 7058 serial.printf("MAX32625PICO ");
whismanoid 25:9d4012b0887f 7059 #elif defined(TARGET_MAX32600MBED)
whismanoid 25:9d4012b0887f 7060 serial.printf("MAX32600MBED ");
whismanoid 25:9d4012b0887f 7061 #elif defined(TARGET_NUCLEO_F446RE)
whismanoid 25:9d4012b0887f 7062 serial.printf("NUCLEO_F446RE ");
whismanoid 25:9d4012b0887f 7063 #endif
whismanoid 25:9d4012b0887f 7064 serial.printf("MAX5719BOB\r\n");
whismanoid 25:9d4012b0887f 7065
whismanoid 25:9d4012b0887f 7066
whismanoid 25:9d4012b0887f 7067 while (1) {
whismanoid 25:9d4012b0887f 7068 #if HAS_BUTTON1_DEMO_INTERRUPT_POLLING
whismanoid 25:9d4012b0887f 7069 // avoid runtime error on button1 press [mbed-os-5.11]
whismanoid 25:9d4012b0887f 7070 // instead of using InterruptIn, use DigitalIn and poll in main while(1)
whismanoid 25:9d4012b0887f 7071 # if HAS_BUTTON1_DEMO_INTERRUPT
whismanoid 25:9d4012b0887f 7072 static int button1_value_prev = 1;
whismanoid 25:9d4012b0887f 7073 static int button1_value_now = 1;
whismanoid 25:9d4012b0887f 7074 button1_value_prev = button1_value_now;
whismanoid 25:9d4012b0887f 7075 button1_value_now = button1.read();
whismanoid 25:9d4012b0887f 7076 if ((button1_value_prev - button1_value_now) == 1)
whismanoid 25:9d4012b0887f 7077 {
whismanoid 25:9d4012b0887f 7078 // on button1 falling edge (button1 press)
whismanoid 25:9d4012b0887f 7079 onButton1FallingEdge();
whismanoid 25:9d4012b0887f 7080 }
whismanoid 25:9d4012b0887f 7081 # endif // HAS_BUTTON1_DEMO_INTERRUPT
whismanoid 25:9d4012b0887f 7082 # if HAS_BUTTON2_DEMO_INTERRUPT
whismanoid 25:9d4012b0887f 7083 static int button2_value_prev = 1;
whismanoid 25:9d4012b0887f 7084 static int button2_value_now = 1;
whismanoid 25:9d4012b0887f 7085 button2_value_prev = button2_value_now;
whismanoid 25:9d4012b0887f 7086 button2_value_now = button2.read();
whismanoid 25:9d4012b0887f 7087 if ((button2_value_prev - button2_value_now) == 1)
whismanoid 25:9d4012b0887f 7088 {
whismanoid 25:9d4012b0887f 7089 // on button2 falling edge (button2 press)
whismanoid 25:9d4012b0887f 7090 onButton2FallingEdge();
whismanoid 25:9d4012b0887f 7091 }
whismanoid 25:9d4012b0887f 7092 # endif // HAS_BUTTON2_DEMO_INTERRUPT
whismanoid 25:9d4012b0887f 7093 #endif
whismanoid 25:9d4012b0887f 7094 # if HAS_DAPLINK_SERIAL
whismanoid 25:9d4012b0887f 7095 if (DAPLINKserial.readable()) {
whismanoid 25:9d4012b0887f 7096 cmdLine_DAPLINKserial.append(DAPLINKserial.getc());
whismanoid 25:9d4012b0887f 7097 }
whismanoid 25:9d4012b0887f 7098 # endif // HAS_DAPLINK_SERIAL
whismanoid 25:9d4012b0887f 7099 if (serial.readable()) {
whismanoid 25:9d4012b0887f 7100 int c = serial.getc();
whismanoid 25:9d4012b0887f 7101 cmdLine_serial.append(c);
whismanoid 25:9d4012b0887f 7102 #if IGNORE_AT_COMMANDS
whismanoid 25:9d4012b0887f 7103 # if HAS_DAPLINK_SERIAL
whismanoid 25:9d4012b0887f 7104 cmdLine_DAPLINKserial.serial().printf("%c", c);
whismanoid 25:9d4012b0887f 7105 # endif // HAS_DAPLINK_SERIAL
whismanoid 25:9d4012b0887f 7106 #endif // IGNORE_AT_COMMANDS
whismanoid 25:9d4012b0887f 7107 //
whismanoid 25:9d4012b0887f 7108 }
whismanoid 25:9d4012b0887f 7109 } // while(1)
whismanoid 25:9d4012b0887f 7110 }