Maxim Integrated / Mbed OS MAX5719BOB_Serial_Tester

Dependencies:   MaximTinyTester CmdLine MAX5719 USBDevice

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