Maxim Integrated / Mbed OS MAX5719BOB_Serial_Tester

Dependencies:   MaximTinyTester CmdLine MAX5719 USBDevice

Committer:
whismanoid
Date:
Fri Jun 11 16:47:20 2021 -0700
Revision:
32:016a142143a5
Parent:
31:9cb570b0685d
Child:
33:2c675744a01b
SelfTest ". loopfail=4" repeat-until-failure

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