Maxim Integrated MAX5719 20-bit, 0.05nV-sec DAC Test program running on MAX32625MBED. Control through USB Serial commands using a terminal emulator such as teraterm or putty.
Dependencies: MaximTinyTester CmdLine MAX5719 USBDevice
Test_Main_MAX5719.cpp@30:13fc9d492ee0, 2021-06-11 (annotated)
- Committer:
- whismanoid
- Date:
- Fri Jun 11 11:08:21 2021 -0700
- Revision:
- 30:13fc9d492ee0
- Parent:
- 27:485b1b2f334c
- Child:
- 31:9cb570b0685d
SelfTest ". loopfail=4" repeat-until-failure
Who changed what in which revision?
User | Revision | Line number | New 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 | 30:13fc9d492ee0 | 1892 | | 0x0001 // -- halt-on-first-failure configuration flag |
whismanoid | 30:13fc9d492ee0 | 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 | 30:13fc9d492ee0 | 1928 | | 0x0001 // -- halt-on-first-failure configuration flag |
whismanoid | 30:13fc9d492ee0 | 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 | 30:13fc9d492ee0 | 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 | 25:9d4012b0887f | 1943 | // TODO diagnostic LED |
whismanoid | 25:9d4012b0887f | 1944 | led1 = LED_OFF; led2 = LED_OFF; led3 = LED_ON; // diagnostic rbg led BLUE |
whismanoid | 25:9d4012b0887f | 1945 | } |
whismanoid | 25:9d4012b0887f | 1946 | #endif // HAS_BUTTON2_DEMO_INTERRUPT |
whismanoid | 25:9d4012b0887f | 1947 | |
whismanoid | 25:9d4012b0887f | 1948 | //-------------------------------------------------- |
whismanoid | 25:9d4012b0887f | 1949 | void SelfTest(CmdLine & cmdLine) |
whismanoid | 25:9d4012b0887f | 1950 | { |
whismanoid | 25:9d4012b0887f | 1951 | //-------------------------------------------------- |
whismanoid | 25:9d4012b0887f | 1952 | #if analogIn4_IS_HIGH_RANGE_OF_analogIn0 |
whismanoid | 25:9d4012b0887f | 1953 | // Platform board uses AIN4,AIN5,.. as high range of AIN0,AIN1,.. |
whismanoid | 25:9d4012b0887f | 1954 | MaximTinyTester tinyTester(cmdLine, analogIn4, analogIn5, analogIn2, analogIn3, analogIn0, analogIn4, led1_RFailLED, led2_GPassLED, led3_BBusyLED); |
whismanoid | 25:9d4012b0887f | 1955 | tinyTester.analogInPin_fullScaleVoltage[0] = analogInPin_fullScaleVoltage[4]; // board support |
whismanoid | 25:9d4012b0887f | 1956 | tinyTester.analogInPin_fullScaleVoltage[1] = analogInPin_fullScaleVoltage[5]; // board support |
whismanoid | 25:9d4012b0887f | 1957 | tinyTester.analogInPin_fullScaleVoltage[2] = analogInPin_fullScaleVoltage[2]; // board support |
whismanoid | 25:9d4012b0887f | 1958 | tinyTester.analogInPin_fullScaleVoltage[3] = analogInPin_fullScaleVoltage[3]; // board support |
whismanoid | 25:9d4012b0887f | 1959 | tinyTester.analogInPin_fullScaleVoltage[4] = analogInPin_fullScaleVoltage[0]; // board support |
whismanoid | 25:9d4012b0887f | 1960 | tinyTester.analogInPin_fullScaleVoltage[5] = analogInPin_fullScaleVoltage[1]; // board support |
whismanoid | 25:9d4012b0887f | 1961 | // low range channels AIN0, AIN1, AIN2, AIN3 |
whismanoid | 25:9d4012b0887f | 1962 | #else // analogIn4_IS_HIGH_RANGE_OF_analogIn0 |
whismanoid | 25:9d4012b0887f | 1963 | // Platform board uses simple analog inputs |
whismanoid | 25:9d4012b0887f | 1964 | MaximTinyTester tinyTester(cmdLine, analogIn0, analogIn1, analogIn2, analogIn3, analogIn4, analogIn5, led1_RFailLED, led2_GPassLED, led3_BBusyLED); |
whismanoid | 25:9d4012b0887f | 1965 | tinyTester.analogInPin_fullScaleVoltage[0] = analogInPin_fullScaleVoltage[0]; // board support |
whismanoid | 25:9d4012b0887f | 1966 | tinyTester.analogInPin_fullScaleVoltage[1] = analogInPin_fullScaleVoltage[1]; // board support |
whismanoid | 25:9d4012b0887f | 1967 | tinyTester.analogInPin_fullScaleVoltage[2] = analogInPin_fullScaleVoltage[2]; // board support |
whismanoid | 25:9d4012b0887f | 1968 | tinyTester.analogInPin_fullScaleVoltage[3] = analogInPin_fullScaleVoltage[3]; // board support |
whismanoid | 25:9d4012b0887f | 1969 | tinyTester.analogInPin_fullScaleVoltage[4] = analogInPin_fullScaleVoltage[4]; // board support |
whismanoid | 25:9d4012b0887f | 1970 | tinyTester.analogInPin_fullScaleVoltage[5] = analogInPin_fullScaleVoltage[5]; // board support |
whismanoid | 25:9d4012b0887f | 1971 | #endif |
whismanoid | 25:9d4012b0887f | 1972 | tinyTester.clear(); |
whismanoid | 25:9d4012b0887f | 1973 | |
whismanoid | 30:13fc9d492ee0 | 1974 | // repeat-until-failure logic |
whismanoid | 30:13fc9d492ee0 | 1975 | repeatUntilFailure: |
whismanoid | 30:13fc9d492ee0 | 1976 | // Report number of pass and number of fail test results |
whismanoid | 30:13fc9d492ee0 | 1977 | tinyTester.Report_Summary(); |
whismanoid | 30:13fc9d492ee0 | 1978 | // |
whismanoid | 25:9d4012b0887f | 1979 | // @test group CODE_LOAD // Verify function CODE_LOAD vs platform AIN0 analog input (enabled by default) |
whismanoid | 25:9d4012b0887f | 1980 | // @test group CODE_LOAD tinyTester.print("VRef = 4.096 MAX5719 20-bit LSB = 0.000004V = 3.90625uV") |
whismanoid | 25:9d4012b0887f | 1981 | // docTest_item['actionType'] = 'print-string' |
whismanoid | 25:9d4012b0887f | 1982 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 1983 | // docTest_item['action'] = 'tinyTester.print("VRef = 4.096 MAX5719 20-bit LSB = 0.000004V = 3.90625uV")' |
whismanoid | 25:9d4012b0887f | 1984 | // docTest_item['arglist'] = 'VRef = 4.096 MAX5719 20-bit LSB = 0.000004V = 3.90625uV' |
whismanoid | 25:9d4012b0887f | 1985 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 1986 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 1987 | // print-string |
whismanoid | 25:9d4012b0887f | 1988 | // tinyTesterFuncName = "tinyTester.print" |
whismanoid | 25:9d4012b0887f | 1989 | // tinyTesterPrintStringLiteral = "VRef = 4.096 MAX5719 20-bit LSB = 0.000004V = 3.90625uV" |
whismanoid | 25:9d4012b0887f | 1990 | tinyTester.print("VRef = 4.096 MAX5719 20-bit LSB = 0.000004V = 3.90625uV"); |
whismanoid | 30:13fc9d492ee0 | 1991 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 1992 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 1993 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 1994 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 1995 | |
whismanoid | 25:9d4012b0887f | 1996 | // @test group CODE_LOAD tinyTester.print("Wire MAX5719 OUT to platform AIN0 for analog loopback tests...") |
whismanoid | 25:9d4012b0887f | 1997 | // docTest_item['actionType'] = 'print-string' |
whismanoid | 25:9d4012b0887f | 1998 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 1999 | // docTest_item['action'] = 'tinyTester.print("Wire MAX5719 OUT to platform AIN0 for analog loopback tests...")' |
whismanoid | 25:9d4012b0887f | 2000 | // docTest_item['arglist'] = 'Wire MAX5719 OUT to platform AIN0 for analog loopback tests...' |
whismanoid | 25:9d4012b0887f | 2001 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2002 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2003 | // print-string |
whismanoid | 25:9d4012b0887f | 2004 | // tinyTesterFuncName = "tinyTester.print" |
whismanoid | 25:9d4012b0887f | 2005 | // tinyTesterPrintStringLiteral = "Wire MAX5719 OUT to platform AIN0 for analog loopback tests..." |
whismanoid | 25:9d4012b0887f | 2006 | tinyTester.print("Wire MAX5719 OUT to platform AIN0 for analog loopback tests..."); |
whismanoid | 30:13fc9d492ee0 | 2007 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2008 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2009 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2010 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2011 | |
whismanoid | 25:9d4012b0887f | 2012 | // @test group CODE_LOAD VRef = 4.096 |
whismanoid | 25:9d4012b0887f | 2013 | // docTest_item['actionType'] = 'assign-propname-value' |
whismanoid | 25:9d4012b0887f | 2014 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2015 | // docTest_item['action'] = 'VRef = 4.096' |
whismanoid | 25:9d4012b0887f | 2016 | // docTest_item['propName'] = 'VRef' |
whismanoid | 25:9d4012b0887f | 2017 | // docTest_item['propValue'] = '4.096' |
whismanoid | 25:9d4012b0887f | 2018 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2019 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2020 | // assign-propname-value |
whismanoid | 25:9d4012b0887f | 2021 | // tinyTesterPropName = "VRef" |
whismanoid | 25:9d4012b0887f | 2022 | // tinyTesterPropValue = "4.096" |
whismanoid | 25:9d4012b0887f | 2023 | g_MAX5719_device.VRef = 4.096; |
whismanoid | 30:13fc9d492ee0 | 2024 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2025 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2026 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2027 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2028 | |
whismanoid | 25:9d4012b0887f | 2029 | // @test group CODE_LOAD tinyTester.blink_time_msec = 75 // default 75 resume hardware self test |
whismanoid | 25:9d4012b0887f | 2030 | // docTest_item['actionType'] = 'assign-propname-value' |
whismanoid | 25:9d4012b0887f | 2031 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2032 | // docTest_item['action'] = 'tinyTester.blink_time_msec = 75' |
whismanoid | 25:9d4012b0887f | 2033 | // docTest_item['remarks'] = 'default 75 resume hardware self test' |
whismanoid | 25:9d4012b0887f | 2034 | // docTest_item['propName'] = 'tinyTester.blink_time_msec' |
whismanoid | 25:9d4012b0887f | 2035 | // docTest_item['propValue'] = '75' |
whismanoid | 25:9d4012b0887f | 2036 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None default 75 resume hardware self test |
whismanoid | 30:13fc9d492ee0 | 2037 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2038 | // assign-propname-value |
whismanoid | 25:9d4012b0887f | 2039 | // tinyTesterPropName = "tinyTester.blink_time_msec" |
whismanoid | 25:9d4012b0887f | 2040 | // tinyTesterPropValue = "75" |
whismanoid | 25:9d4012b0887f | 2041 | tinyTester.blink_time_msec = 75; |
whismanoid | 30:13fc9d492ee0 | 2042 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2043 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2044 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2045 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2046 | |
whismanoid | 25:9d4012b0887f | 2047 | // @test group CODE_LOAD tinyTester.settle_time_msec = 500 |
whismanoid | 25:9d4012b0887f | 2048 | // docTest_item['actionType'] = 'assign-propname-value' |
whismanoid | 25:9d4012b0887f | 2049 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2050 | // docTest_item['action'] = 'tinyTester.settle_time_msec = 500' |
whismanoid | 25:9d4012b0887f | 2051 | // docTest_item['propName'] = 'tinyTester.settle_time_msec' |
whismanoid | 25:9d4012b0887f | 2052 | // docTest_item['propValue'] = '500' |
whismanoid | 25:9d4012b0887f | 2053 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2054 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2055 | // assign-propname-value |
whismanoid | 25:9d4012b0887f | 2056 | // tinyTesterPropName = "tinyTester.settle_time_msec" |
whismanoid | 25:9d4012b0887f | 2057 | // tinyTesterPropValue = "500" |
whismanoid | 25:9d4012b0887f | 2058 | tinyTester.settle_time_msec = 500; |
whismanoid | 30:13fc9d492ee0 | 2059 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2060 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2061 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2062 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2063 | |
whismanoid | 25:9d4012b0887f | 2064 | // @test Init() |
whismanoid | 25:9d4012b0887f | 2065 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 2066 | // docTest_item['action'] = 'Init()' |
whismanoid | 25:9d4012b0887f | 2067 | // docTest_item['funcName'] = 'Init' |
whismanoid | 25:9d4012b0887f | 2068 | // call-function |
whismanoid | 27:485b1b2f334c | 2069 | // selfTestFunctionClosures['Init']['returnType'] = 'void' |
whismanoid | 25:9d4012b0887f | 2070 | // ASSERT_EQ(g_MAX5719_device.Init(()), (void)None); // |
whismanoid | 25:9d4012b0887f | 2071 | // tinyTester.FunctionCall_Expect("MAX5719.Init", fn_MAX5719_Init, /* empty docTest_argList */ /* empty expect: */ (void)None); // |
whismanoid | 25:9d4012b0887f | 2072 | g_MAX5719_device.Init(); // |
whismanoid | 25:9d4012b0887f | 2073 | |
whismanoid | 25:9d4012b0887f | 2074 | // @test VRef expect 4.096 // Nominal Full-Scale Voltage Reference |
whismanoid | 25:9d4012b0887f | 2075 | // docTest_item['actionType'] = 'test-propname-expect-value' |
whismanoid | 25:9d4012b0887f | 2076 | // docTest_item['action'] = 'VRef expect 4.096' |
whismanoid | 25:9d4012b0887f | 2077 | // docTest_item['remarks'] = 'Nominal Full-Scale Voltage Reference' |
whismanoid | 25:9d4012b0887f | 2078 | // docTest_item['expect-value'] = '4.096' |
whismanoid | 25:9d4012b0887f | 2079 | // docTest_item['propName'] = 'VRef' |
whismanoid | 25:9d4012b0887f | 2080 | // test-propname-expect-value |
whismanoid | 25:9d4012b0887f | 2081 | tinyTester.Expect("MAX5719.VRef", g_MAX5719_device.VRef, /* expect: */ 4.096); // Nominal Full-Scale Voltage Reference |
whismanoid | 25:9d4012b0887f | 2082 | |
whismanoid | 25:9d4012b0887f | 2083 | // @test group CODE_LOAD tinyTester.err_threshold = 0.050 |
whismanoid | 25:9d4012b0887f | 2084 | // docTest_item['actionType'] = 'assign-propname-value' |
whismanoid | 25:9d4012b0887f | 2085 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2086 | // docTest_item['action'] = 'tinyTester.err_threshold = 0.050' |
whismanoid | 25:9d4012b0887f | 2087 | // docTest_item['propName'] = 'tinyTester.err_threshold' |
whismanoid | 25:9d4012b0887f | 2088 | // docTest_item['propValue'] = '0.050' |
whismanoid | 25:9d4012b0887f | 2089 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2090 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2091 | // assign-propname-value |
whismanoid | 25:9d4012b0887f | 2092 | // tinyTesterPropName = "tinyTester.err_threshold" |
whismanoid | 25:9d4012b0887f | 2093 | // tinyTesterPropValue = "0.050" |
whismanoid | 25:9d4012b0887f | 2094 | tinyTester.err_threshold = 0.050; |
whismanoid | 30:13fc9d492ee0 | 2095 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2096 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2097 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2098 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2099 | |
whismanoid | 25:9d4012b0887f | 2100 | // @test group CODE_LOAD tinyTester.print("0x000000 = 0.000V") |
whismanoid | 25:9d4012b0887f | 2101 | // docTest_item['actionType'] = 'print-string' |
whismanoid | 25:9d4012b0887f | 2102 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2103 | // docTest_item['action'] = 'tinyTester.print("0x000000 = 0.000V")' |
whismanoid | 25:9d4012b0887f | 2104 | // docTest_item['arglist'] = '0x000000 = 0.000V' |
whismanoid | 25:9d4012b0887f | 2105 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2106 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2107 | // print-string |
whismanoid | 25:9d4012b0887f | 2108 | // tinyTesterFuncName = "tinyTester.print" |
whismanoid | 25:9d4012b0887f | 2109 | // tinyTesterPrintStringLiteral = "0x000000 = 0.000V" |
whismanoid | 25:9d4012b0887f | 2110 | tinyTester.print("0x000000 = 0.000V"); |
whismanoid | 30:13fc9d492ee0 | 2111 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2112 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2113 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2114 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2115 | |
whismanoid | 25:9d4012b0887f | 2116 | // @test group CODE_LOAD CODE_LOAD(0x000000) // 0.000V |
whismanoid | 25:9d4012b0887f | 2117 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 2118 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2119 | // docTest_item['action'] = 'CODE_LOAD(0x000000)' |
whismanoid | 25:9d4012b0887f | 2120 | // docTest_item['remarks'] = '0.000V' |
whismanoid | 25:9d4012b0887f | 2121 | // docTest_item['funcName'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2122 | // docTest_item['arglist'] = '0x000000' |
whismanoid | 25:9d4012b0887f | 2123 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD CODE_LOAD 0.000V |
whismanoid | 30:13fc9d492ee0 | 2124 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2125 | // call-function |
whismanoid | 27:485b1b2f334c | 2126 | // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t' |
whismanoid | 25:9d4012b0887f | 2127 | // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x000000), (uint8_t)None); // 0.000V |
whismanoid | 25:9d4012b0887f | 2128 | // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x000000, /* empty expect: */ (uint8_t)None); // 0.000V |
whismanoid | 25:9d4012b0887f | 2129 | g_MAX5719_device.CODE_LOAD((uint32_t)0x000000); // 0.000V |
whismanoid | 30:13fc9d492ee0 | 2130 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2131 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2132 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2133 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2134 | |
whismanoid | 25:9d4012b0887f | 2135 | // @test group CODE_LOAD tinyTester.Wait_Output_Settling() |
whismanoid | 25:9d4012b0887f | 2136 | // docTest_item['actionType'] = 'call-tinytester-function' |
whismanoid | 25:9d4012b0887f | 2137 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2138 | // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()' |
whismanoid | 25:9d4012b0887f | 2139 | // docTest_item['propName'] = 'Wait_Output_Settling' |
whismanoid | 25:9d4012b0887f | 2140 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2141 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2142 | // call-tinytester-function |
whismanoid | 25:9d4012b0887f | 2143 | // tinyTesterFuncName = "tinyTester.Wait_Output_Settling" |
whismanoid | 25:9d4012b0887f | 2144 | // docTest_argList = "" |
whismanoid | 25:9d4012b0887f | 2145 | tinyTester.Wait_Output_Settling(); // |
whismanoid | 30:13fc9d492ee0 | 2146 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2147 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2148 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2149 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2150 | |
whismanoid | 25:9d4012b0887f | 2151 | // @test group CODE_LOAD tinyTester.AnalogIn0_Read_Expect_voltageV(0.000000) |
whismanoid | 25:9d4012b0887f | 2152 | // docTest_item['actionType'] = 'call-tinytester-function' |
whismanoid | 25:9d4012b0887f | 2153 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2154 | // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(0.000000)' |
whismanoid | 25:9d4012b0887f | 2155 | // docTest_item['arglist'] = '0.000000' |
whismanoid | 25:9d4012b0887f | 2156 | // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV' |
whismanoid | 25:9d4012b0887f | 2157 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2158 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2159 | // call-tinytester-function |
whismanoid | 25:9d4012b0887f | 2160 | // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV" |
whismanoid | 25:9d4012b0887f | 2161 | // docTest_argList = "0.000000" |
whismanoid | 25:9d4012b0887f | 2162 | tinyTester.AnalogIn0_Read_Expect_voltageV(0.000000); // |
whismanoid | 30:13fc9d492ee0 | 2163 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2164 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2165 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2166 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2167 | |
whismanoid | 27:485b1b2f334c | 2168 | // @test group CODE_LOAD tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0 |
whismanoid | 27:485b1b2f334c | 2169 | // docTest_item['actionType'] = 'call-tinytester-function' |
whismanoid | 27:485b1b2f334c | 2170 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 27:485b1b2f334c | 2171 | // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()' |
whismanoid | 27:485b1b2f334c | 2172 | // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV' |
whismanoid | 27:485b1b2f334c | 2173 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2174 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 27:485b1b2f334c | 2175 | // call-tinytester-function |
whismanoid | 27:485b1b2f334c | 2176 | // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV" |
whismanoid | 27:485b1b2f334c | 2177 | // docTest_argList = "" |
whismanoid | 27:485b1b2f334c | 2178 | tinyTester.AnalogIn1_Read_Report_voltageV(); // |
whismanoid | 30:13fc9d492ee0 | 2179 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2180 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2181 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 27:485b1b2f334c | 2182 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 27:485b1b2f334c | 2183 | |
whismanoid | 25:9d4012b0887f | 2184 | // @test group CODE_LOAD tinyTester.print("0x01f400 = 0.500V") |
whismanoid | 25:9d4012b0887f | 2185 | // docTest_item['actionType'] = 'print-string' |
whismanoid | 25:9d4012b0887f | 2186 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2187 | // docTest_item['action'] = 'tinyTester.print("0x01f400 = 0.500V")' |
whismanoid | 25:9d4012b0887f | 2188 | // docTest_item['arglist'] = '0x01f400 = 0.500V' |
whismanoid | 25:9d4012b0887f | 2189 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2190 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2191 | // print-string |
whismanoid | 25:9d4012b0887f | 2192 | // tinyTesterFuncName = "tinyTester.print" |
whismanoid | 25:9d4012b0887f | 2193 | // tinyTesterPrintStringLiteral = "0x01f400 = 0.500V" |
whismanoid | 25:9d4012b0887f | 2194 | tinyTester.print("0x01f400 = 0.500V"); |
whismanoid | 30:13fc9d492ee0 | 2195 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2196 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2197 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2198 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2199 | |
whismanoid | 25:9d4012b0887f | 2200 | // @test group CODE_LOAD CODE_LOAD(0x01f400) // 0.500V |
whismanoid | 25:9d4012b0887f | 2201 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 2202 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2203 | // docTest_item['action'] = 'CODE_LOAD(0x01f400)' |
whismanoid | 25:9d4012b0887f | 2204 | // docTest_item['remarks'] = '0.500V' |
whismanoid | 25:9d4012b0887f | 2205 | // docTest_item['funcName'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2206 | // docTest_item['arglist'] = '0x01f400' |
whismanoid | 25:9d4012b0887f | 2207 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD CODE_LOAD 0.500V |
whismanoid | 30:13fc9d492ee0 | 2208 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2209 | // call-function |
whismanoid | 27:485b1b2f334c | 2210 | // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t' |
whismanoid | 25:9d4012b0887f | 2211 | // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x01f400), (uint8_t)None); // 0.500V |
whismanoid | 25:9d4012b0887f | 2212 | // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x01f400, /* empty expect: */ (uint8_t)None); // 0.500V |
whismanoid | 25:9d4012b0887f | 2213 | g_MAX5719_device.CODE_LOAD((uint32_t)0x01f400); // 0.500V |
whismanoid | 30:13fc9d492ee0 | 2214 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2215 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2216 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2217 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2218 | |
whismanoid | 25:9d4012b0887f | 2219 | // @test group CODE_LOAD tinyTester.Wait_Output_Settling() |
whismanoid | 25:9d4012b0887f | 2220 | // docTest_item['actionType'] = 'call-tinytester-function' |
whismanoid | 25:9d4012b0887f | 2221 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2222 | // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()' |
whismanoid | 25:9d4012b0887f | 2223 | // docTest_item['propName'] = 'Wait_Output_Settling' |
whismanoid | 25:9d4012b0887f | 2224 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2225 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2226 | // call-tinytester-function |
whismanoid | 25:9d4012b0887f | 2227 | // tinyTesterFuncName = "tinyTester.Wait_Output_Settling" |
whismanoid | 25:9d4012b0887f | 2228 | // docTest_argList = "" |
whismanoid | 25:9d4012b0887f | 2229 | tinyTester.Wait_Output_Settling(); // |
whismanoid | 30:13fc9d492ee0 | 2230 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2231 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2232 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2233 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2234 | |
whismanoid | 25:9d4012b0887f | 2235 | // @test group CODE_LOAD tinyTester.AnalogIn0_Read_Expect_voltageV(0.500000) |
whismanoid | 25:9d4012b0887f | 2236 | // docTest_item['actionType'] = 'call-tinytester-function' |
whismanoid | 25:9d4012b0887f | 2237 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2238 | // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(0.500000)' |
whismanoid | 25:9d4012b0887f | 2239 | // docTest_item['arglist'] = '0.500000' |
whismanoid | 25:9d4012b0887f | 2240 | // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV' |
whismanoid | 25:9d4012b0887f | 2241 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2242 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2243 | // call-tinytester-function |
whismanoid | 25:9d4012b0887f | 2244 | // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV" |
whismanoid | 25:9d4012b0887f | 2245 | // docTest_argList = "0.500000" |
whismanoid | 25:9d4012b0887f | 2246 | tinyTester.AnalogIn0_Read_Expect_voltageV(0.500000); // |
whismanoid | 30:13fc9d492ee0 | 2247 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2248 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2249 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2250 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2251 | |
whismanoid | 27:485b1b2f334c | 2252 | // @test group CODE_LOAD tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0 |
whismanoid | 27:485b1b2f334c | 2253 | // docTest_item['actionType'] = 'call-tinytester-function' |
whismanoid | 27:485b1b2f334c | 2254 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 27:485b1b2f334c | 2255 | // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()' |
whismanoid | 27:485b1b2f334c | 2256 | // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV' |
whismanoid | 27:485b1b2f334c | 2257 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2258 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 27:485b1b2f334c | 2259 | // call-tinytester-function |
whismanoid | 27:485b1b2f334c | 2260 | // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV" |
whismanoid | 27:485b1b2f334c | 2261 | // docTest_argList = "" |
whismanoid | 27:485b1b2f334c | 2262 | tinyTester.AnalogIn1_Read_Report_voltageV(); // |
whismanoid | 30:13fc9d492ee0 | 2263 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2264 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2265 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 27:485b1b2f334c | 2266 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 27:485b1b2f334c | 2267 | |
whismanoid | 25:9d4012b0887f | 2268 | // @test group CODE_LOAD tinyTester.print("0x03e800 = 1.000V") |
whismanoid | 25:9d4012b0887f | 2269 | // docTest_item['actionType'] = 'print-string' |
whismanoid | 25:9d4012b0887f | 2270 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2271 | // docTest_item['action'] = 'tinyTester.print("0x03e800 = 1.000V")' |
whismanoid | 25:9d4012b0887f | 2272 | // docTest_item['arglist'] = '0x03e800 = 1.000V' |
whismanoid | 25:9d4012b0887f | 2273 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2274 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2275 | // print-string |
whismanoid | 25:9d4012b0887f | 2276 | // tinyTesterFuncName = "tinyTester.print" |
whismanoid | 25:9d4012b0887f | 2277 | // tinyTesterPrintStringLiteral = "0x03e800 = 1.000V" |
whismanoid | 25:9d4012b0887f | 2278 | tinyTester.print("0x03e800 = 1.000V"); |
whismanoid | 30:13fc9d492ee0 | 2279 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2280 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2281 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2282 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2283 | |
whismanoid | 25:9d4012b0887f | 2284 | // @test group CODE_LOAD CODE_LOAD(0x03e800) // 1.000V |
whismanoid | 25:9d4012b0887f | 2285 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 2286 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2287 | // docTest_item['action'] = 'CODE_LOAD(0x03e800)' |
whismanoid | 25:9d4012b0887f | 2288 | // docTest_item['remarks'] = '1.000V' |
whismanoid | 25:9d4012b0887f | 2289 | // docTest_item['funcName'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2290 | // docTest_item['arglist'] = '0x03e800' |
whismanoid | 25:9d4012b0887f | 2291 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD CODE_LOAD 1.000V |
whismanoid | 30:13fc9d492ee0 | 2292 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2293 | // call-function |
whismanoid | 27:485b1b2f334c | 2294 | // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t' |
whismanoid | 25:9d4012b0887f | 2295 | // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x03e800), (uint8_t)None); // 1.000V |
whismanoid | 25:9d4012b0887f | 2296 | // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x03e800, /* empty expect: */ (uint8_t)None); // 1.000V |
whismanoid | 25:9d4012b0887f | 2297 | g_MAX5719_device.CODE_LOAD((uint32_t)0x03e800); // 1.000V |
whismanoid | 30:13fc9d492ee0 | 2298 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2299 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2300 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2301 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2302 | |
whismanoid | 25:9d4012b0887f | 2303 | // @test group CODE_LOAD tinyTester.Wait_Output_Settling() |
whismanoid | 25:9d4012b0887f | 2304 | // docTest_item['actionType'] = 'call-tinytester-function' |
whismanoid | 25:9d4012b0887f | 2305 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2306 | // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()' |
whismanoid | 25:9d4012b0887f | 2307 | // docTest_item['propName'] = 'Wait_Output_Settling' |
whismanoid | 25:9d4012b0887f | 2308 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2309 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2310 | // call-tinytester-function |
whismanoid | 25:9d4012b0887f | 2311 | // tinyTesterFuncName = "tinyTester.Wait_Output_Settling" |
whismanoid | 25:9d4012b0887f | 2312 | // docTest_argList = "" |
whismanoid | 25:9d4012b0887f | 2313 | tinyTester.Wait_Output_Settling(); // |
whismanoid | 30:13fc9d492ee0 | 2314 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2315 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2316 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2317 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2318 | |
whismanoid | 25:9d4012b0887f | 2319 | // @test group CODE_LOAD tinyTester.AnalogIn0_Read_Expect_voltageV(1.000000) |
whismanoid | 25:9d4012b0887f | 2320 | // docTest_item['actionType'] = 'call-tinytester-function' |
whismanoid | 25:9d4012b0887f | 2321 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2322 | // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(1.000000)' |
whismanoid | 25:9d4012b0887f | 2323 | // docTest_item['arglist'] = '1.000000' |
whismanoid | 25:9d4012b0887f | 2324 | // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV' |
whismanoid | 25:9d4012b0887f | 2325 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2326 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2327 | // call-tinytester-function |
whismanoid | 25:9d4012b0887f | 2328 | // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV" |
whismanoid | 25:9d4012b0887f | 2329 | // docTest_argList = "1.000000" |
whismanoid | 25:9d4012b0887f | 2330 | tinyTester.AnalogIn0_Read_Expect_voltageV(1.000000); // |
whismanoid | 30:13fc9d492ee0 | 2331 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2332 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2333 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2334 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2335 | |
whismanoid | 27:485b1b2f334c | 2336 | // @test group CODE_LOAD tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0 |
whismanoid | 27:485b1b2f334c | 2337 | // docTest_item['actionType'] = 'call-tinytester-function' |
whismanoid | 27:485b1b2f334c | 2338 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 27:485b1b2f334c | 2339 | // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()' |
whismanoid | 27:485b1b2f334c | 2340 | // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV' |
whismanoid | 27:485b1b2f334c | 2341 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2342 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 27:485b1b2f334c | 2343 | // call-tinytester-function |
whismanoid | 27:485b1b2f334c | 2344 | // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV" |
whismanoid | 27:485b1b2f334c | 2345 | // docTest_argList = "" |
whismanoid | 27:485b1b2f334c | 2346 | tinyTester.AnalogIn1_Read_Report_voltageV(); // |
whismanoid | 30:13fc9d492ee0 | 2347 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2348 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2349 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 27:485b1b2f334c | 2350 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 27:485b1b2f334c | 2351 | |
whismanoid | 26:ec719cd9a579 | 2352 | // @test group CODE_LOAD tinyTester.err_threshold = 0.075 |
whismanoid | 26:ec719cd9a579 | 2353 | // docTest_item['actionType'] = 'assign-propname-value' |
whismanoid | 26:ec719cd9a579 | 2354 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 26:ec719cd9a579 | 2355 | // docTest_item['action'] = 'tinyTester.err_threshold = 0.075' |
whismanoid | 26:ec719cd9a579 | 2356 | // docTest_item['propName'] = 'tinyTester.err_threshold' |
whismanoid | 26:ec719cd9a579 | 2357 | // docTest_item['propValue'] = '0.075' |
whismanoid | 26:ec719cd9a579 | 2358 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2359 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 26:ec719cd9a579 | 2360 | // assign-propname-value |
whismanoid | 26:ec719cd9a579 | 2361 | // tinyTesterPropName = "tinyTester.err_threshold" |
whismanoid | 26:ec719cd9a579 | 2362 | // tinyTesterPropValue = "0.075" |
whismanoid | 26:ec719cd9a579 | 2363 | tinyTester.err_threshold = 0.075; |
whismanoid | 30:13fc9d492ee0 | 2364 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2365 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2366 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 26:ec719cd9a579 | 2367 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 26:ec719cd9a579 | 2368 | |
whismanoid | 25:9d4012b0887f | 2369 | // @test group CODE_LOAD tinyTester.print("0x05dc00 = 1.500V") |
whismanoid | 25:9d4012b0887f | 2370 | // docTest_item['actionType'] = 'print-string' |
whismanoid | 25:9d4012b0887f | 2371 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2372 | // docTest_item['action'] = 'tinyTester.print("0x05dc00 = 1.500V")' |
whismanoid | 25:9d4012b0887f | 2373 | // docTest_item['arglist'] = '0x05dc00 = 1.500V' |
whismanoid | 25:9d4012b0887f | 2374 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2375 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2376 | // print-string |
whismanoid | 25:9d4012b0887f | 2377 | // tinyTesterFuncName = "tinyTester.print" |
whismanoid | 25:9d4012b0887f | 2378 | // tinyTesterPrintStringLiteral = "0x05dc00 = 1.500V" |
whismanoid | 25:9d4012b0887f | 2379 | tinyTester.print("0x05dc00 = 1.500V"); |
whismanoid | 30:13fc9d492ee0 | 2380 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2381 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2382 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2383 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2384 | |
whismanoid | 25:9d4012b0887f | 2385 | // @test group CODE_LOAD CODE_LOAD(0x05dc00) // 1.500V |
whismanoid | 25:9d4012b0887f | 2386 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 2387 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2388 | // docTest_item['action'] = 'CODE_LOAD(0x05dc00)' |
whismanoid | 25:9d4012b0887f | 2389 | // docTest_item['remarks'] = '1.500V' |
whismanoid | 25:9d4012b0887f | 2390 | // docTest_item['funcName'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2391 | // docTest_item['arglist'] = '0x05dc00' |
whismanoid | 25:9d4012b0887f | 2392 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD CODE_LOAD 1.500V |
whismanoid | 30:13fc9d492ee0 | 2393 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2394 | // call-function |
whismanoid | 27:485b1b2f334c | 2395 | // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t' |
whismanoid | 25:9d4012b0887f | 2396 | // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x05dc00), (uint8_t)None); // 1.500V |
whismanoid | 25:9d4012b0887f | 2397 | // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x05dc00, /* empty expect: */ (uint8_t)None); // 1.500V |
whismanoid | 25:9d4012b0887f | 2398 | g_MAX5719_device.CODE_LOAD((uint32_t)0x05dc00); // 1.500V |
whismanoid | 30:13fc9d492ee0 | 2399 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2400 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2401 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2402 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2403 | |
whismanoid | 25:9d4012b0887f | 2404 | // @test group CODE_LOAD tinyTester.Wait_Output_Settling() |
whismanoid | 25:9d4012b0887f | 2405 | // docTest_item['actionType'] = 'call-tinytester-function' |
whismanoid | 25:9d4012b0887f | 2406 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2407 | // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()' |
whismanoid | 25:9d4012b0887f | 2408 | // docTest_item['propName'] = 'Wait_Output_Settling' |
whismanoid | 25:9d4012b0887f | 2409 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2410 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2411 | // call-tinytester-function |
whismanoid | 25:9d4012b0887f | 2412 | // tinyTesterFuncName = "tinyTester.Wait_Output_Settling" |
whismanoid | 25:9d4012b0887f | 2413 | // docTest_argList = "" |
whismanoid | 25:9d4012b0887f | 2414 | tinyTester.Wait_Output_Settling(); // |
whismanoid | 30:13fc9d492ee0 | 2415 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2416 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2417 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2418 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2419 | |
whismanoid | 25:9d4012b0887f | 2420 | // @test group CODE_LOAD tinyTester.AnalogIn0_Read_Expect_voltageV(1.500000) |
whismanoid | 25:9d4012b0887f | 2421 | // docTest_item['actionType'] = 'call-tinytester-function' |
whismanoid | 25:9d4012b0887f | 2422 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2423 | // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(1.500000)' |
whismanoid | 25:9d4012b0887f | 2424 | // docTest_item['arglist'] = '1.500000' |
whismanoid | 25:9d4012b0887f | 2425 | // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV' |
whismanoid | 25:9d4012b0887f | 2426 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2427 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2428 | // call-tinytester-function |
whismanoid | 25:9d4012b0887f | 2429 | // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV" |
whismanoid | 25:9d4012b0887f | 2430 | // docTest_argList = "1.500000" |
whismanoid | 25:9d4012b0887f | 2431 | tinyTester.AnalogIn0_Read_Expect_voltageV(1.500000); // |
whismanoid | 30:13fc9d492ee0 | 2432 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2433 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2434 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2435 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2436 | |
whismanoid | 27:485b1b2f334c | 2437 | // @test group CODE_LOAD tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0 |
whismanoid | 27:485b1b2f334c | 2438 | // docTest_item['actionType'] = 'call-tinytester-function' |
whismanoid | 27:485b1b2f334c | 2439 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 27:485b1b2f334c | 2440 | // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()' |
whismanoid | 27:485b1b2f334c | 2441 | // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV' |
whismanoid | 27:485b1b2f334c | 2442 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2443 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 27:485b1b2f334c | 2444 | // call-tinytester-function |
whismanoid | 27:485b1b2f334c | 2445 | // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV" |
whismanoid | 27:485b1b2f334c | 2446 | // docTest_argList = "" |
whismanoid | 27:485b1b2f334c | 2447 | tinyTester.AnalogIn1_Read_Report_voltageV(); // |
whismanoid | 30:13fc9d492ee0 | 2448 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2449 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2450 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 27:485b1b2f334c | 2451 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 27:485b1b2f334c | 2452 | |
whismanoid | 26:ec719cd9a579 | 2453 | // @test group CODE_LOAD tinyTester.err_threshold = 0.100 |
whismanoid | 26:ec719cd9a579 | 2454 | // docTest_item['actionType'] = 'assign-propname-value' |
whismanoid | 26:ec719cd9a579 | 2455 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 26:ec719cd9a579 | 2456 | // docTest_item['action'] = 'tinyTester.err_threshold = 0.100' |
whismanoid | 26:ec719cd9a579 | 2457 | // docTest_item['propName'] = 'tinyTester.err_threshold' |
whismanoid | 26:ec719cd9a579 | 2458 | // docTest_item['propValue'] = '0.100' |
whismanoid | 26:ec719cd9a579 | 2459 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2460 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 26:ec719cd9a579 | 2461 | // assign-propname-value |
whismanoid | 26:ec719cd9a579 | 2462 | // tinyTesterPropName = "tinyTester.err_threshold" |
whismanoid | 26:ec719cd9a579 | 2463 | // tinyTesterPropValue = "0.100" |
whismanoid | 26:ec719cd9a579 | 2464 | tinyTester.err_threshold = 0.100; |
whismanoid | 30:13fc9d492ee0 | 2465 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2466 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2467 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 26:ec719cd9a579 | 2468 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 26:ec719cd9a579 | 2469 | |
whismanoid | 25:9d4012b0887f | 2470 | // @test group CODE_LOAD tinyTester.print("0x07d000 = 2.000V") |
whismanoid | 25:9d4012b0887f | 2471 | // docTest_item['actionType'] = 'print-string' |
whismanoid | 25:9d4012b0887f | 2472 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2473 | // docTest_item['action'] = 'tinyTester.print("0x07d000 = 2.000V")' |
whismanoid | 25:9d4012b0887f | 2474 | // docTest_item['arglist'] = '0x07d000 = 2.000V' |
whismanoid | 25:9d4012b0887f | 2475 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2476 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2477 | // print-string |
whismanoid | 25:9d4012b0887f | 2478 | // tinyTesterFuncName = "tinyTester.print" |
whismanoid | 25:9d4012b0887f | 2479 | // tinyTesterPrintStringLiteral = "0x07d000 = 2.000V" |
whismanoid | 25:9d4012b0887f | 2480 | tinyTester.print("0x07d000 = 2.000V"); |
whismanoid | 30:13fc9d492ee0 | 2481 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2482 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2483 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2484 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2485 | |
whismanoid | 25:9d4012b0887f | 2486 | // @test group CODE_LOAD CODE_LOAD(0x07d000) // 2.000V |
whismanoid | 25:9d4012b0887f | 2487 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 2488 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2489 | // docTest_item['action'] = 'CODE_LOAD(0x07d000)' |
whismanoid | 25:9d4012b0887f | 2490 | // docTest_item['remarks'] = '2.000V' |
whismanoid | 25:9d4012b0887f | 2491 | // docTest_item['funcName'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2492 | // docTest_item['arglist'] = '0x07d000' |
whismanoid | 25:9d4012b0887f | 2493 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD CODE_LOAD 2.000V |
whismanoid | 30:13fc9d492ee0 | 2494 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2495 | // call-function |
whismanoid | 27:485b1b2f334c | 2496 | // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t' |
whismanoid | 25:9d4012b0887f | 2497 | // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x07d000), (uint8_t)None); // 2.000V |
whismanoid | 25:9d4012b0887f | 2498 | // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x07d000, /* empty expect: */ (uint8_t)None); // 2.000V |
whismanoid | 25:9d4012b0887f | 2499 | g_MAX5719_device.CODE_LOAD((uint32_t)0x07d000); // 2.000V |
whismanoid | 30:13fc9d492ee0 | 2500 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2501 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2502 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2503 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2504 | |
whismanoid | 25:9d4012b0887f | 2505 | // @test group CODE_LOAD tinyTester.Wait_Output_Settling() |
whismanoid | 25:9d4012b0887f | 2506 | // docTest_item['actionType'] = 'call-tinytester-function' |
whismanoid | 25:9d4012b0887f | 2507 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2508 | // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()' |
whismanoid | 25:9d4012b0887f | 2509 | // docTest_item['propName'] = 'Wait_Output_Settling' |
whismanoid | 25:9d4012b0887f | 2510 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2511 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2512 | // call-tinytester-function |
whismanoid | 25:9d4012b0887f | 2513 | // tinyTesterFuncName = "tinyTester.Wait_Output_Settling" |
whismanoid | 25:9d4012b0887f | 2514 | // docTest_argList = "" |
whismanoid | 25:9d4012b0887f | 2515 | tinyTester.Wait_Output_Settling(); // |
whismanoid | 30:13fc9d492ee0 | 2516 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2517 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2518 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2519 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2520 | |
whismanoid | 25:9d4012b0887f | 2521 | // @test group CODE_LOAD tinyTester.AnalogIn0_Read_Expect_voltageV(2.000000) |
whismanoid | 25:9d4012b0887f | 2522 | // docTest_item['actionType'] = 'call-tinytester-function' |
whismanoid | 25:9d4012b0887f | 2523 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2524 | // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(2.000000)' |
whismanoid | 25:9d4012b0887f | 2525 | // docTest_item['arglist'] = '2.000000' |
whismanoid | 25:9d4012b0887f | 2526 | // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV' |
whismanoid | 25:9d4012b0887f | 2527 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2528 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2529 | // call-tinytester-function |
whismanoid | 25:9d4012b0887f | 2530 | // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV" |
whismanoid | 25:9d4012b0887f | 2531 | // docTest_argList = "2.000000" |
whismanoid | 25:9d4012b0887f | 2532 | tinyTester.AnalogIn0_Read_Expect_voltageV(2.000000); // |
whismanoid | 30:13fc9d492ee0 | 2533 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2534 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2535 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2536 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2537 | |
whismanoid | 27:485b1b2f334c | 2538 | // @test group CODE_LOAD tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0 |
whismanoid | 27:485b1b2f334c | 2539 | // docTest_item['actionType'] = 'call-tinytester-function' |
whismanoid | 27:485b1b2f334c | 2540 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 27:485b1b2f334c | 2541 | // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()' |
whismanoid | 27:485b1b2f334c | 2542 | // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV' |
whismanoid | 27:485b1b2f334c | 2543 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2544 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 27:485b1b2f334c | 2545 | // call-tinytester-function |
whismanoid | 27:485b1b2f334c | 2546 | // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV" |
whismanoid | 27:485b1b2f334c | 2547 | // docTest_argList = "" |
whismanoid | 27:485b1b2f334c | 2548 | tinyTester.AnalogIn1_Read_Report_voltageV(); // |
whismanoid | 30:13fc9d492ee0 | 2549 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2550 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2551 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 27:485b1b2f334c | 2552 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 27:485b1b2f334c | 2553 | |
whismanoid | 26:ec719cd9a579 | 2554 | // @test group CODE_LOAD tinyTester.err_threshold = 0.150 |
whismanoid | 26:ec719cd9a579 | 2555 | // docTest_item['actionType'] = 'assign-propname-value' |
whismanoid | 26:ec719cd9a579 | 2556 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 26:ec719cd9a579 | 2557 | // docTest_item['action'] = 'tinyTester.err_threshold = 0.150' |
whismanoid | 26:ec719cd9a579 | 2558 | // docTest_item['propName'] = 'tinyTester.err_threshold' |
whismanoid | 26:ec719cd9a579 | 2559 | // docTest_item['propValue'] = '0.150' |
whismanoid | 26:ec719cd9a579 | 2560 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2561 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 26:ec719cd9a579 | 2562 | // assign-propname-value |
whismanoid | 26:ec719cd9a579 | 2563 | // tinyTesterPropName = "tinyTester.err_threshold" |
whismanoid | 26:ec719cd9a579 | 2564 | // tinyTesterPropValue = "0.150" |
whismanoid | 26:ec719cd9a579 | 2565 | tinyTester.err_threshold = 0.150; |
whismanoid | 30:13fc9d492ee0 | 2566 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2567 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2568 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 26:ec719cd9a579 | 2569 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 26:ec719cd9a579 | 2570 | |
whismanoid | 25:9d4012b0887f | 2571 | // @test group CODE_LOAD tinyTester.print("0x09c400 = 2.500V") |
whismanoid | 25:9d4012b0887f | 2572 | // docTest_item['actionType'] = 'print-string' |
whismanoid | 25:9d4012b0887f | 2573 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2574 | // docTest_item['action'] = 'tinyTester.print("0x09c400 = 2.500V")' |
whismanoid | 25:9d4012b0887f | 2575 | // docTest_item['arglist'] = '0x09c400 = 2.500V' |
whismanoid | 25:9d4012b0887f | 2576 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2577 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2578 | // print-string |
whismanoid | 25:9d4012b0887f | 2579 | // tinyTesterFuncName = "tinyTester.print" |
whismanoid | 25:9d4012b0887f | 2580 | // tinyTesterPrintStringLiteral = "0x09c400 = 2.500V" |
whismanoid | 25:9d4012b0887f | 2581 | tinyTester.print("0x09c400 = 2.500V"); |
whismanoid | 30:13fc9d492ee0 | 2582 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2583 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2584 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2585 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2586 | |
whismanoid | 25:9d4012b0887f | 2587 | // @test group CODE_LOAD CODE_LOAD(0x09c400) // 2.500V |
whismanoid | 25:9d4012b0887f | 2588 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 2589 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2590 | // docTest_item['action'] = 'CODE_LOAD(0x09c400)' |
whismanoid | 25:9d4012b0887f | 2591 | // docTest_item['remarks'] = '2.500V' |
whismanoid | 25:9d4012b0887f | 2592 | // docTest_item['funcName'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2593 | // docTest_item['arglist'] = '0x09c400' |
whismanoid | 25:9d4012b0887f | 2594 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD CODE_LOAD 2.500V |
whismanoid | 30:13fc9d492ee0 | 2595 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2596 | // call-function |
whismanoid | 27:485b1b2f334c | 2597 | // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t' |
whismanoid | 25:9d4012b0887f | 2598 | // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x09c400), (uint8_t)None); // 2.500V |
whismanoid | 25:9d4012b0887f | 2599 | // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x09c400, /* empty expect: */ (uint8_t)None); // 2.500V |
whismanoid | 25:9d4012b0887f | 2600 | g_MAX5719_device.CODE_LOAD((uint32_t)0x09c400); // 2.500V |
whismanoid | 30:13fc9d492ee0 | 2601 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2602 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2603 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2604 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2605 | |
whismanoid | 25:9d4012b0887f | 2606 | // @test group CODE_LOAD tinyTester.Wait_Output_Settling() |
whismanoid | 25:9d4012b0887f | 2607 | // docTest_item['actionType'] = 'call-tinytester-function' |
whismanoid | 25:9d4012b0887f | 2608 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2609 | // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()' |
whismanoid | 25:9d4012b0887f | 2610 | // docTest_item['propName'] = 'Wait_Output_Settling' |
whismanoid | 25:9d4012b0887f | 2611 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2612 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2613 | // call-tinytester-function |
whismanoid | 25:9d4012b0887f | 2614 | // tinyTesterFuncName = "tinyTester.Wait_Output_Settling" |
whismanoid | 25:9d4012b0887f | 2615 | // docTest_argList = "" |
whismanoid | 25:9d4012b0887f | 2616 | tinyTester.Wait_Output_Settling(); // |
whismanoid | 30:13fc9d492ee0 | 2617 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2618 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2619 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2620 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2621 | |
whismanoid | 25:9d4012b0887f | 2622 | // @test group CODE_LOAD tinyTester.AnalogIn0_Read_Expect_voltageV(2.500000) |
whismanoid | 25:9d4012b0887f | 2623 | // docTest_item['actionType'] = 'call-tinytester-function' |
whismanoid | 25:9d4012b0887f | 2624 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2625 | // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(2.500000)' |
whismanoid | 25:9d4012b0887f | 2626 | // docTest_item['arglist'] = '2.500000' |
whismanoid | 25:9d4012b0887f | 2627 | // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV' |
whismanoid | 25:9d4012b0887f | 2628 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2629 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2630 | // call-tinytester-function |
whismanoid | 25:9d4012b0887f | 2631 | // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV" |
whismanoid | 25:9d4012b0887f | 2632 | // docTest_argList = "2.500000" |
whismanoid | 25:9d4012b0887f | 2633 | tinyTester.AnalogIn0_Read_Expect_voltageV(2.500000); // |
whismanoid | 30:13fc9d492ee0 | 2634 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2635 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2636 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2637 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2638 | |
whismanoid | 27:485b1b2f334c | 2639 | // @test group CODE_LOAD tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0 |
whismanoid | 27:485b1b2f334c | 2640 | // docTest_item['actionType'] = 'call-tinytester-function' |
whismanoid | 27:485b1b2f334c | 2641 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 27:485b1b2f334c | 2642 | // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()' |
whismanoid | 27:485b1b2f334c | 2643 | // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV' |
whismanoid | 27:485b1b2f334c | 2644 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2645 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 27:485b1b2f334c | 2646 | // call-tinytester-function |
whismanoid | 27:485b1b2f334c | 2647 | // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV" |
whismanoid | 27:485b1b2f334c | 2648 | // docTest_argList = "" |
whismanoid | 27:485b1b2f334c | 2649 | tinyTester.AnalogIn1_Read_Report_voltageV(); // |
whismanoid | 30:13fc9d492ee0 | 2650 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2651 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2652 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 27:485b1b2f334c | 2653 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 27:485b1b2f334c | 2654 | |
whismanoid | 26:ec719cd9a579 | 2655 | // @test group CODE_LOAD tinyTester.err_threshold = 0.200 |
whismanoid | 26:ec719cd9a579 | 2656 | // docTest_item['actionType'] = 'assign-propname-value' |
whismanoid | 26:ec719cd9a579 | 2657 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 26:ec719cd9a579 | 2658 | // docTest_item['action'] = 'tinyTester.err_threshold = 0.200' |
whismanoid | 26:ec719cd9a579 | 2659 | // docTest_item['propName'] = 'tinyTester.err_threshold' |
whismanoid | 26:ec719cd9a579 | 2660 | // docTest_item['propValue'] = '0.200' |
whismanoid | 26:ec719cd9a579 | 2661 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2662 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 26:ec719cd9a579 | 2663 | // assign-propname-value |
whismanoid | 26:ec719cd9a579 | 2664 | // tinyTesterPropName = "tinyTester.err_threshold" |
whismanoid | 26:ec719cd9a579 | 2665 | // tinyTesterPropValue = "0.200" |
whismanoid | 26:ec719cd9a579 | 2666 | tinyTester.err_threshold = 0.200; |
whismanoid | 30:13fc9d492ee0 | 2667 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2668 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2669 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 26:ec719cd9a579 | 2670 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 26:ec719cd9a579 | 2671 | |
whismanoid | 25:9d4012b0887f | 2672 | // @test group CODE_LOAD tinyTester.print("0x0bb800 = 3.000V") |
whismanoid | 25:9d4012b0887f | 2673 | // docTest_item['actionType'] = 'print-string' |
whismanoid | 25:9d4012b0887f | 2674 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2675 | // docTest_item['action'] = 'tinyTester.print("0x0bb800 = 3.000V")' |
whismanoid | 25:9d4012b0887f | 2676 | // docTest_item['arglist'] = '0x0bb800 = 3.000V' |
whismanoid | 25:9d4012b0887f | 2677 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2678 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2679 | // print-string |
whismanoid | 25:9d4012b0887f | 2680 | // tinyTesterFuncName = "tinyTester.print" |
whismanoid | 25:9d4012b0887f | 2681 | // tinyTesterPrintStringLiteral = "0x0bb800 = 3.000V" |
whismanoid | 25:9d4012b0887f | 2682 | tinyTester.print("0x0bb800 = 3.000V"); |
whismanoid | 30:13fc9d492ee0 | 2683 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2684 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2685 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2686 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2687 | |
whismanoid | 25:9d4012b0887f | 2688 | // @test group CODE_LOAD CODE_LOAD(0x0bb800) // 3.000V |
whismanoid | 25:9d4012b0887f | 2689 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 2690 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2691 | // docTest_item['action'] = 'CODE_LOAD(0x0bb800)' |
whismanoid | 25:9d4012b0887f | 2692 | // docTest_item['remarks'] = '3.000V' |
whismanoid | 25:9d4012b0887f | 2693 | // docTest_item['funcName'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2694 | // docTest_item['arglist'] = '0x0bb800' |
whismanoid | 25:9d4012b0887f | 2695 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD CODE_LOAD 3.000V |
whismanoid | 30:13fc9d492ee0 | 2696 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2697 | // call-function |
whismanoid | 27:485b1b2f334c | 2698 | // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t' |
whismanoid | 25:9d4012b0887f | 2699 | // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x0bb800), (uint8_t)None); // 3.000V |
whismanoid | 25:9d4012b0887f | 2700 | // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x0bb800, /* empty expect: */ (uint8_t)None); // 3.000V |
whismanoid | 25:9d4012b0887f | 2701 | g_MAX5719_device.CODE_LOAD((uint32_t)0x0bb800); // 3.000V |
whismanoid | 30:13fc9d492ee0 | 2702 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2703 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2704 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2705 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2706 | |
whismanoid | 25:9d4012b0887f | 2707 | // @test group CODE_LOAD tinyTester.Wait_Output_Settling() |
whismanoid | 25:9d4012b0887f | 2708 | // docTest_item['actionType'] = 'call-tinytester-function' |
whismanoid | 25:9d4012b0887f | 2709 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2710 | // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()' |
whismanoid | 25:9d4012b0887f | 2711 | // docTest_item['propName'] = 'Wait_Output_Settling' |
whismanoid | 25:9d4012b0887f | 2712 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2713 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2714 | // call-tinytester-function |
whismanoid | 25:9d4012b0887f | 2715 | // tinyTesterFuncName = "tinyTester.Wait_Output_Settling" |
whismanoid | 25:9d4012b0887f | 2716 | // docTest_argList = "" |
whismanoid | 25:9d4012b0887f | 2717 | tinyTester.Wait_Output_Settling(); // |
whismanoid | 30:13fc9d492ee0 | 2718 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2719 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2720 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2721 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2722 | |
whismanoid | 25:9d4012b0887f | 2723 | // @test group CODE_LOAD tinyTester.AnalogIn0_Read_Expect_voltageV(3.000000) |
whismanoid | 25:9d4012b0887f | 2724 | // docTest_item['actionType'] = 'call-tinytester-function' |
whismanoid | 25:9d4012b0887f | 2725 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2726 | // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(3.000000)' |
whismanoid | 25:9d4012b0887f | 2727 | // docTest_item['arglist'] = '3.000000' |
whismanoid | 25:9d4012b0887f | 2728 | // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV' |
whismanoid | 25:9d4012b0887f | 2729 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2730 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2731 | // call-tinytester-function |
whismanoid | 25:9d4012b0887f | 2732 | // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV" |
whismanoid | 25:9d4012b0887f | 2733 | // docTest_argList = "3.000000" |
whismanoid | 25:9d4012b0887f | 2734 | tinyTester.AnalogIn0_Read_Expect_voltageV(3.000000); // |
whismanoid | 30:13fc9d492ee0 | 2735 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2736 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2737 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2738 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2739 | |
whismanoid | 27:485b1b2f334c | 2740 | // @test group CODE_LOAD tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0 |
whismanoid | 27:485b1b2f334c | 2741 | // docTest_item['actionType'] = 'call-tinytester-function' |
whismanoid | 27:485b1b2f334c | 2742 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 27:485b1b2f334c | 2743 | // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()' |
whismanoid | 27:485b1b2f334c | 2744 | // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV' |
whismanoid | 27:485b1b2f334c | 2745 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2746 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 27:485b1b2f334c | 2747 | // call-tinytester-function |
whismanoid | 27:485b1b2f334c | 2748 | // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV" |
whismanoid | 27:485b1b2f334c | 2749 | // docTest_argList = "" |
whismanoid | 27:485b1b2f334c | 2750 | tinyTester.AnalogIn1_Read_Report_voltageV(); // |
whismanoid | 30:13fc9d492ee0 | 2751 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2752 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2753 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 27:485b1b2f334c | 2754 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 27:485b1b2f334c | 2755 | |
whismanoid | 26:ec719cd9a579 | 2756 | // @test group CODE_LOAD tinyTester.err_threshold = 0.250 |
whismanoid | 26:ec719cd9a579 | 2757 | // docTest_item['actionType'] = 'assign-propname-value' |
whismanoid | 26:ec719cd9a579 | 2758 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 26:ec719cd9a579 | 2759 | // docTest_item['action'] = 'tinyTester.err_threshold = 0.250' |
whismanoid | 26:ec719cd9a579 | 2760 | // docTest_item['propName'] = 'tinyTester.err_threshold' |
whismanoid | 26:ec719cd9a579 | 2761 | // docTest_item['propValue'] = '0.250' |
whismanoid | 26:ec719cd9a579 | 2762 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2763 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 26:ec719cd9a579 | 2764 | // assign-propname-value |
whismanoid | 26:ec719cd9a579 | 2765 | // tinyTesterPropName = "tinyTester.err_threshold" |
whismanoid | 26:ec719cd9a579 | 2766 | // tinyTesterPropValue = "0.250" |
whismanoid | 26:ec719cd9a579 | 2767 | tinyTester.err_threshold = 0.250; |
whismanoid | 30:13fc9d492ee0 | 2768 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2769 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2770 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 26:ec719cd9a579 | 2771 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 26:ec719cd9a579 | 2772 | |
whismanoid | 25:9d4012b0887f | 2773 | // @test group CODE_LOAD tinyTester.print("0x0dac00 = 3.500V") |
whismanoid | 25:9d4012b0887f | 2774 | // docTest_item['actionType'] = 'print-string' |
whismanoid | 25:9d4012b0887f | 2775 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2776 | // docTest_item['action'] = 'tinyTester.print("0x0dac00 = 3.500V")' |
whismanoid | 25:9d4012b0887f | 2777 | // docTest_item['arglist'] = '0x0dac00 = 3.500V' |
whismanoid | 25:9d4012b0887f | 2778 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2779 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2780 | // print-string |
whismanoid | 25:9d4012b0887f | 2781 | // tinyTesterFuncName = "tinyTester.print" |
whismanoid | 25:9d4012b0887f | 2782 | // tinyTesterPrintStringLiteral = "0x0dac00 = 3.500V" |
whismanoid | 25:9d4012b0887f | 2783 | tinyTester.print("0x0dac00 = 3.500V"); |
whismanoid | 30:13fc9d492ee0 | 2784 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2785 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2786 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2787 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2788 | |
whismanoid | 25:9d4012b0887f | 2789 | // @test group CODE_LOAD CODE_LOAD(0x0dac00) // 3.500V |
whismanoid | 25:9d4012b0887f | 2790 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 2791 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2792 | // docTest_item['action'] = 'CODE_LOAD(0x0dac00)' |
whismanoid | 25:9d4012b0887f | 2793 | // docTest_item['remarks'] = '3.500V' |
whismanoid | 25:9d4012b0887f | 2794 | // docTest_item['funcName'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2795 | // docTest_item['arglist'] = '0x0dac00' |
whismanoid | 25:9d4012b0887f | 2796 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD CODE_LOAD 3.500V |
whismanoid | 30:13fc9d492ee0 | 2797 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2798 | // call-function |
whismanoid | 27:485b1b2f334c | 2799 | // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t' |
whismanoid | 25:9d4012b0887f | 2800 | // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x0dac00), (uint8_t)None); // 3.500V |
whismanoid | 25:9d4012b0887f | 2801 | // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x0dac00, /* empty expect: */ (uint8_t)None); // 3.500V |
whismanoid | 25:9d4012b0887f | 2802 | g_MAX5719_device.CODE_LOAD((uint32_t)0x0dac00); // 3.500V |
whismanoid | 30:13fc9d492ee0 | 2803 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2804 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2805 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2806 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2807 | |
whismanoid | 25:9d4012b0887f | 2808 | // @test group CODE_LOAD tinyTester.Wait_Output_Settling() |
whismanoid | 25:9d4012b0887f | 2809 | // docTest_item['actionType'] = 'call-tinytester-function' |
whismanoid | 25:9d4012b0887f | 2810 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2811 | // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()' |
whismanoid | 25:9d4012b0887f | 2812 | // docTest_item['propName'] = 'Wait_Output_Settling' |
whismanoid | 25:9d4012b0887f | 2813 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2814 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2815 | // call-tinytester-function |
whismanoid | 25:9d4012b0887f | 2816 | // tinyTesterFuncName = "tinyTester.Wait_Output_Settling" |
whismanoid | 25:9d4012b0887f | 2817 | // docTest_argList = "" |
whismanoid | 25:9d4012b0887f | 2818 | tinyTester.Wait_Output_Settling(); // |
whismanoid | 30:13fc9d492ee0 | 2819 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2820 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2821 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2822 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2823 | |
whismanoid | 25:9d4012b0887f | 2824 | // @test group CODE_LOAD tinyTester.AnalogIn0_Read_Expect_voltageV(3.500000) |
whismanoid | 25:9d4012b0887f | 2825 | // docTest_item['actionType'] = 'call-tinytester-function' |
whismanoid | 25:9d4012b0887f | 2826 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2827 | // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(3.500000)' |
whismanoid | 25:9d4012b0887f | 2828 | // docTest_item['arglist'] = '3.500000' |
whismanoid | 25:9d4012b0887f | 2829 | // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV' |
whismanoid | 25:9d4012b0887f | 2830 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2831 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2832 | // call-tinytester-function |
whismanoid | 25:9d4012b0887f | 2833 | // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV" |
whismanoid | 25:9d4012b0887f | 2834 | // docTest_argList = "3.500000" |
whismanoid | 25:9d4012b0887f | 2835 | tinyTester.AnalogIn0_Read_Expect_voltageV(3.500000); // |
whismanoid | 30:13fc9d492ee0 | 2836 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2837 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2838 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2839 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2840 | |
whismanoid | 27:485b1b2f334c | 2841 | // @test group CODE_LOAD tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0 |
whismanoid | 27:485b1b2f334c | 2842 | // docTest_item['actionType'] = 'call-tinytester-function' |
whismanoid | 27:485b1b2f334c | 2843 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 27:485b1b2f334c | 2844 | // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()' |
whismanoid | 27:485b1b2f334c | 2845 | // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV' |
whismanoid | 27:485b1b2f334c | 2846 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2847 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 27:485b1b2f334c | 2848 | // call-tinytester-function |
whismanoid | 27:485b1b2f334c | 2849 | // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV" |
whismanoid | 27:485b1b2f334c | 2850 | // docTest_argList = "" |
whismanoid | 27:485b1b2f334c | 2851 | tinyTester.AnalogIn1_Read_Report_voltageV(); // |
whismanoid | 30:13fc9d492ee0 | 2852 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2853 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2854 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 27:485b1b2f334c | 2855 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 27:485b1b2f334c | 2856 | |
whismanoid | 26:ec719cd9a579 | 2857 | // @test group CODE_LOAD tinyTester.err_threshold = 0.500 |
whismanoid | 26:ec719cd9a579 | 2858 | // docTest_item['actionType'] = 'assign-propname-value' |
whismanoid | 26:ec719cd9a579 | 2859 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 26:ec719cd9a579 | 2860 | // docTest_item['action'] = 'tinyTester.err_threshold = 0.500' |
whismanoid | 26:ec719cd9a579 | 2861 | // docTest_item['propName'] = 'tinyTester.err_threshold' |
whismanoid | 26:ec719cd9a579 | 2862 | // docTest_item['propValue'] = '0.500' |
whismanoid | 26:ec719cd9a579 | 2863 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2864 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 26:ec719cd9a579 | 2865 | // assign-propname-value |
whismanoid | 26:ec719cd9a579 | 2866 | // tinyTesterPropName = "tinyTester.err_threshold" |
whismanoid | 26:ec719cd9a579 | 2867 | // tinyTesterPropValue = "0.500" |
whismanoid | 26:ec719cd9a579 | 2868 | tinyTester.err_threshold = 0.500; |
whismanoid | 30:13fc9d492ee0 | 2869 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2870 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2871 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 26:ec719cd9a579 | 2872 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 26:ec719cd9a579 | 2873 | |
whismanoid | 25:9d4012b0887f | 2874 | // @test group CODE_LOAD tinyTester.print("0x0fa000 = 4.000V") |
whismanoid | 25:9d4012b0887f | 2875 | // docTest_item['actionType'] = 'print-string' |
whismanoid | 25:9d4012b0887f | 2876 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2877 | // docTest_item['action'] = 'tinyTester.print("0x0fa000 = 4.000V")' |
whismanoid | 25:9d4012b0887f | 2878 | // docTest_item['arglist'] = '0x0fa000 = 4.000V' |
whismanoid | 25:9d4012b0887f | 2879 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2880 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2881 | // print-string |
whismanoid | 25:9d4012b0887f | 2882 | // tinyTesterFuncName = "tinyTester.print" |
whismanoid | 25:9d4012b0887f | 2883 | // tinyTesterPrintStringLiteral = "0x0fa000 = 4.000V" |
whismanoid | 25:9d4012b0887f | 2884 | tinyTester.print("0x0fa000 = 4.000V"); |
whismanoid | 30:13fc9d492ee0 | 2885 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2886 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2887 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2888 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2889 | |
whismanoid | 25:9d4012b0887f | 2890 | // @test group CODE_LOAD CODE_LOAD(0x0fa000) // 4.000V |
whismanoid | 25:9d4012b0887f | 2891 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 2892 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2893 | // docTest_item['action'] = 'CODE_LOAD(0x0fa000)' |
whismanoid | 25:9d4012b0887f | 2894 | // docTest_item['remarks'] = '4.000V' |
whismanoid | 25:9d4012b0887f | 2895 | // docTest_item['funcName'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2896 | // docTest_item['arglist'] = '0x0fa000' |
whismanoid | 25:9d4012b0887f | 2897 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD CODE_LOAD 4.000V |
whismanoid | 30:13fc9d492ee0 | 2898 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2899 | // call-function |
whismanoid | 27:485b1b2f334c | 2900 | // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t' |
whismanoid | 25:9d4012b0887f | 2901 | // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x0fa000), (uint8_t)None); // 4.000V |
whismanoid | 25:9d4012b0887f | 2902 | // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x0fa000, /* empty expect: */ (uint8_t)None); // 4.000V |
whismanoid | 25:9d4012b0887f | 2903 | g_MAX5719_device.CODE_LOAD((uint32_t)0x0fa000); // 4.000V |
whismanoid | 30:13fc9d492ee0 | 2904 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2905 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2906 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2907 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2908 | |
whismanoid | 25:9d4012b0887f | 2909 | // @test group CODE_LOAD tinyTester.Wait_Output_Settling() |
whismanoid | 25:9d4012b0887f | 2910 | // docTest_item['actionType'] = 'call-tinytester-function' |
whismanoid | 25:9d4012b0887f | 2911 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2912 | // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()' |
whismanoid | 25:9d4012b0887f | 2913 | // docTest_item['propName'] = 'Wait_Output_Settling' |
whismanoid | 25:9d4012b0887f | 2914 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2915 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2916 | // call-tinytester-function |
whismanoid | 25:9d4012b0887f | 2917 | // tinyTesterFuncName = "tinyTester.Wait_Output_Settling" |
whismanoid | 25:9d4012b0887f | 2918 | // docTest_argList = "" |
whismanoid | 25:9d4012b0887f | 2919 | tinyTester.Wait_Output_Settling(); // |
whismanoid | 30:13fc9d492ee0 | 2920 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2921 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2922 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2923 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2924 | |
whismanoid | 25:9d4012b0887f | 2925 | // @test group CODE_LOAD tinyTester.AnalogIn0_Read_Expect_voltageV(4.000000) |
whismanoid | 25:9d4012b0887f | 2926 | // docTest_item['actionType'] = 'call-tinytester-function' |
whismanoid | 25:9d4012b0887f | 2927 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2928 | // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(4.000000)' |
whismanoid | 25:9d4012b0887f | 2929 | // docTest_item['arglist'] = '4.000000' |
whismanoid | 25:9d4012b0887f | 2930 | // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV' |
whismanoid | 25:9d4012b0887f | 2931 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2932 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2933 | // call-tinytester-function |
whismanoid | 25:9d4012b0887f | 2934 | // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV" |
whismanoid | 25:9d4012b0887f | 2935 | // docTest_argList = "4.000000" |
whismanoid | 25:9d4012b0887f | 2936 | tinyTester.AnalogIn0_Read_Expect_voltageV(4.000000); // |
whismanoid | 30:13fc9d492ee0 | 2937 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2938 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2939 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2940 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2941 | |
whismanoid | 27:485b1b2f334c | 2942 | // @test group CODE_LOAD tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0 |
whismanoid | 27:485b1b2f334c | 2943 | // docTest_item['actionType'] = 'call-tinytester-function' |
whismanoid | 27:485b1b2f334c | 2944 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 27:485b1b2f334c | 2945 | // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()' |
whismanoid | 27:485b1b2f334c | 2946 | // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV' |
whismanoid | 27:485b1b2f334c | 2947 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2948 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 27:485b1b2f334c | 2949 | // call-tinytester-function |
whismanoid | 27:485b1b2f334c | 2950 | // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV" |
whismanoid | 27:485b1b2f334c | 2951 | // docTest_argList = "" |
whismanoid | 27:485b1b2f334c | 2952 | tinyTester.AnalogIn1_Read_Report_voltageV(); // |
whismanoid | 30:13fc9d492ee0 | 2953 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2954 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2955 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 27:485b1b2f334c | 2956 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 27:485b1b2f334c | 2957 | |
whismanoid | 26:ec719cd9a579 | 2958 | // @test group CODE_LOAD tinyTester.err_threshold = 0.750 |
whismanoid | 26:ec719cd9a579 | 2959 | // docTest_item['actionType'] = 'assign-propname-value' |
whismanoid | 26:ec719cd9a579 | 2960 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 26:ec719cd9a579 | 2961 | // docTest_item['action'] = 'tinyTester.err_threshold = 0.750' |
whismanoid | 26:ec719cd9a579 | 2962 | // docTest_item['propName'] = 'tinyTester.err_threshold' |
whismanoid | 26:ec719cd9a579 | 2963 | // docTest_item['propValue'] = '0.750' |
whismanoid | 26:ec719cd9a579 | 2964 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2965 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 26:ec719cd9a579 | 2966 | // assign-propname-value |
whismanoid | 26:ec719cd9a579 | 2967 | // tinyTesterPropName = "tinyTester.err_threshold" |
whismanoid | 26:ec719cd9a579 | 2968 | // tinyTesterPropValue = "0.750" |
whismanoid | 26:ec719cd9a579 | 2969 | tinyTester.err_threshold = 0.750; |
whismanoid | 30:13fc9d492ee0 | 2970 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2971 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2972 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 26:ec719cd9a579 | 2973 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 26:ec719cd9a579 | 2974 | |
whismanoid | 25:9d4012b0887f | 2975 | // @test group CODE_LOAD tinyTester.print("0x0fffff = 4.095V") |
whismanoid | 25:9d4012b0887f | 2976 | // docTest_item['actionType'] = 'print-string' |
whismanoid | 25:9d4012b0887f | 2977 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2978 | // docTest_item['action'] = 'tinyTester.print("0x0fffff = 4.095V")' |
whismanoid | 25:9d4012b0887f | 2979 | // docTest_item['arglist'] = '0x0fffff = 4.095V' |
whismanoid | 25:9d4012b0887f | 2980 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 2981 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 2982 | // print-string |
whismanoid | 25:9d4012b0887f | 2983 | // tinyTesterFuncName = "tinyTester.print" |
whismanoid | 25:9d4012b0887f | 2984 | // tinyTesterPrintStringLiteral = "0x0fffff = 4.095V" |
whismanoid | 25:9d4012b0887f | 2985 | tinyTester.print("0x0fffff = 4.095V"); |
whismanoid | 30:13fc9d492ee0 | 2986 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 2987 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 2988 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 2989 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 2990 | |
whismanoid | 25:9d4012b0887f | 2991 | // @test group CODE_LOAD CODE_LOAD(0x0fffff) // 4.095V |
whismanoid | 25:9d4012b0887f | 2992 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 2993 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2994 | // docTest_item['action'] = 'CODE_LOAD(0x0fffff)' |
whismanoid | 25:9d4012b0887f | 2995 | // docTest_item['remarks'] = '4.095V' |
whismanoid | 25:9d4012b0887f | 2996 | // docTest_item['funcName'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 2997 | // docTest_item['arglist'] = '0x0fffff' |
whismanoid | 25:9d4012b0887f | 2998 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD CODE_LOAD 4.095V |
whismanoid | 30:13fc9d492ee0 | 2999 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 3000 | // call-function |
whismanoid | 27:485b1b2f334c | 3001 | // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t' |
whismanoid | 25:9d4012b0887f | 3002 | // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x0fffff), (uint8_t)None); // 4.095V |
whismanoid | 25:9d4012b0887f | 3003 | // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x0fffff, /* empty expect: */ (uint8_t)None); // 4.095V |
whismanoid | 25:9d4012b0887f | 3004 | g_MAX5719_device.CODE_LOAD((uint32_t)0x0fffff); // 4.095V |
whismanoid | 30:13fc9d492ee0 | 3005 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3006 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3007 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 3008 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 3009 | |
whismanoid | 25:9d4012b0887f | 3010 | // @test group CODE_LOAD tinyTester.Wait_Output_Settling() |
whismanoid | 25:9d4012b0887f | 3011 | // docTest_item['actionType'] = 'call-tinytester-function' |
whismanoid | 25:9d4012b0887f | 3012 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 3013 | // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()' |
whismanoid | 25:9d4012b0887f | 3014 | // docTest_item['propName'] = 'Wait_Output_Settling' |
whismanoid | 25:9d4012b0887f | 3015 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 3016 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 3017 | // call-tinytester-function |
whismanoid | 25:9d4012b0887f | 3018 | // tinyTesterFuncName = "tinyTester.Wait_Output_Settling" |
whismanoid | 25:9d4012b0887f | 3019 | // docTest_argList = "" |
whismanoid | 25:9d4012b0887f | 3020 | tinyTester.Wait_Output_Settling(); // |
whismanoid | 30:13fc9d492ee0 | 3021 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3022 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3023 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 3024 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 3025 | |
whismanoid | 25:9d4012b0887f | 3026 | // @test group CODE_LOAD tinyTester.AnalogIn0_Read_Expect_voltageV(4.095000) |
whismanoid | 25:9d4012b0887f | 3027 | // docTest_item['actionType'] = 'call-tinytester-function' |
whismanoid | 25:9d4012b0887f | 3028 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 3029 | // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(4.095000)' |
whismanoid | 25:9d4012b0887f | 3030 | // docTest_item['arglist'] = '4.095000' |
whismanoid | 25:9d4012b0887f | 3031 | // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV' |
whismanoid | 25:9d4012b0887f | 3032 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 3033 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 3034 | // call-tinytester-function |
whismanoid | 25:9d4012b0887f | 3035 | // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV" |
whismanoid | 25:9d4012b0887f | 3036 | // docTest_argList = "4.095000" |
whismanoid | 25:9d4012b0887f | 3037 | tinyTester.AnalogIn0_Read_Expect_voltageV(4.095000); // |
whismanoid | 30:13fc9d492ee0 | 3038 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3039 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3040 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 3041 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 3042 | |
whismanoid | 27:485b1b2f334c | 3043 | // @test group CODE_LOAD tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0 |
whismanoid | 27:485b1b2f334c | 3044 | // docTest_item['actionType'] = 'call-tinytester-function' |
whismanoid | 27:485b1b2f334c | 3045 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 27:485b1b2f334c | 3046 | // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()' |
whismanoid | 27:485b1b2f334c | 3047 | // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV' |
whismanoid | 27:485b1b2f334c | 3048 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 3049 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 27:485b1b2f334c | 3050 | // call-tinytester-function |
whismanoid | 27:485b1b2f334c | 3051 | // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV" |
whismanoid | 27:485b1b2f334c | 3052 | // docTest_argList = "" |
whismanoid | 27:485b1b2f334c | 3053 | tinyTester.AnalogIn1_Read_Report_voltageV(); // |
whismanoid | 30:13fc9d492ee0 | 3054 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3055 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3056 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 27:485b1b2f334c | 3057 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 27:485b1b2f334c | 3058 | |
whismanoid | 26:ec719cd9a579 | 3059 | // @test group CODE_LOAD tinyTester.err_threshold = 0.200 |
whismanoid | 26:ec719cd9a579 | 3060 | // docTest_item['actionType'] = 'assign-propname-value' |
whismanoid | 26:ec719cd9a579 | 3061 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 26:ec719cd9a579 | 3062 | // docTest_item['action'] = 'tinyTester.err_threshold = 0.200' |
whismanoid | 26:ec719cd9a579 | 3063 | // docTest_item['propName'] = 'tinyTester.err_threshold' |
whismanoid | 26:ec719cd9a579 | 3064 | // docTest_item['propValue'] = '0.200' |
whismanoid | 26:ec719cd9a579 | 3065 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 3066 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 26:ec719cd9a579 | 3067 | // assign-propname-value |
whismanoid | 26:ec719cd9a579 | 3068 | // tinyTesterPropName = "tinyTester.err_threshold" |
whismanoid | 26:ec719cd9a579 | 3069 | // tinyTesterPropValue = "0.200" |
whismanoid | 26:ec719cd9a579 | 3070 | tinyTester.err_threshold = 0.200; |
whismanoid | 30:13fc9d492ee0 | 3071 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3072 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3073 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 26:ec719cd9a579 | 3074 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 26:ec719cd9a579 | 3075 | |
whismanoid | 25:9d4012b0887f | 3076 | // @test group CODE_LOAD tinyTester.print("0x080000 // 2.048V") |
whismanoid | 25:9d4012b0887f | 3077 | // @test group CODE_LOAD CODE_LOAD(0x080000) // 2.048V |
whismanoid | 25:9d4012b0887f | 3078 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3079 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 3080 | // docTest_item['action'] = 'CODE_LOAD(0x080000)' |
whismanoid | 25:9d4012b0887f | 3081 | // docTest_item['remarks'] = '2.048V' |
whismanoid | 25:9d4012b0887f | 3082 | // docTest_item['funcName'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 3083 | // docTest_item['arglist'] = '0x080000' |
whismanoid | 25:9d4012b0887f | 3084 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD CODE_LOAD 2.048V |
whismanoid | 30:13fc9d492ee0 | 3085 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 3086 | // call-function |
whismanoid | 27:485b1b2f334c | 3087 | // selfTestFunctionClosures['CODE_LOAD']['returnType'] = 'uint8_t' |
whismanoid | 25:9d4012b0887f | 3088 | // ASSERT_EQ(g_MAX5719_device.CODE_LOAD((uint32_t)0x080000), (uint8_t)None); // 2.048V |
whismanoid | 25:9d4012b0887f | 3089 | // tinyTester.FunctionCall_Expect("MAX5719.CODE_LOAD", fn_MAX5719_CODE_LOAD, (uint32_t)0x080000, /* empty expect: */ (uint8_t)None); // 2.048V |
whismanoid | 25:9d4012b0887f | 3090 | g_MAX5719_device.CODE_LOAD((uint32_t)0x080000); // 2.048V |
whismanoid | 30:13fc9d492ee0 | 3091 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3092 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3093 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 3094 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 3095 | |
whismanoid | 25:9d4012b0887f | 3096 | // @test group CODE_LOAD tinyTester.Wait_Output_Settling() |
whismanoid | 25:9d4012b0887f | 3097 | // docTest_item['actionType'] = 'call-tinytester-function' |
whismanoid | 25:9d4012b0887f | 3098 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 3099 | // docTest_item['action'] = 'tinyTester.Wait_Output_Settling()' |
whismanoid | 25:9d4012b0887f | 3100 | // docTest_item['propName'] = 'Wait_Output_Settling' |
whismanoid | 25:9d4012b0887f | 3101 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 3102 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 3103 | // call-tinytester-function |
whismanoid | 25:9d4012b0887f | 3104 | // tinyTesterFuncName = "tinyTester.Wait_Output_Settling" |
whismanoid | 25:9d4012b0887f | 3105 | // docTest_argList = "" |
whismanoid | 25:9d4012b0887f | 3106 | tinyTester.Wait_Output_Settling(); // |
whismanoid | 30:13fc9d492ee0 | 3107 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3108 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3109 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 3110 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 3111 | |
whismanoid | 25:9d4012b0887f | 3112 | // @test group CODE_LOAD tinyTester.AnalogIn0_Read_Expect_voltageV(2.048000) |
whismanoid | 25:9d4012b0887f | 3113 | // docTest_item['actionType'] = 'call-tinytester-function' |
whismanoid | 25:9d4012b0887f | 3114 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 3115 | // docTest_item['action'] = 'tinyTester.AnalogIn0_Read_Expect_voltageV(2.048000)' |
whismanoid | 25:9d4012b0887f | 3116 | // docTest_item['arglist'] = '2.048000' |
whismanoid | 25:9d4012b0887f | 3117 | // docTest_item['propName'] = 'AnalogIn0_Read_Expect_voltageV' |
whismanoid | 25:9d4012b0887f | 3118 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 3119 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 25:9d4012b0887f | 3120 | // call-tinytester-function |
whismanoid | 25:9d4012b0887f | 3121 | // tinyTesterFuncName = "tinyTester.AnalogIn0_Read_Expect_voltageV" |
whismanoid | 25:9d4012b0887f | 3122 | // docTest_argList = "2.048000" |
whismanoid | 25:9d4012b0887f | 3123 | tinyTester.AnalogIn0_Read_Expect_voltageV(2.048000); // |
whismanoid | 30:13fc9d492ee0 | 3124 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3125 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3126 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 25:9d4012b0887f | 3127 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 25:9d4012b0887f | 3128 | |
whismanoid | 27:485b1b2f334c | 3129 | // @test group CODE_LOAD tinyTester.AnalogIn1_Read_Report_voltageV(); // remove unwanted loading on AIN0 |
whismanoid | 27:485b1b2f334c | 3130 | // docTest_item['actionType'] = 'call-tinytester-function' |
whismanoid | 27:485b1b2f334c | 3131 | // docTest_item['group-id-value'] = 'CODE_LOAD' |
whismanoid | 27:485b1b2f334c | 3132 | // docTest_item['action'] = 'tinyTester.AnalogIn1_Read_Report_voltageV()' |
whismanoid | 27:485b1b2f334c | 3133 | // docTest_item['propName'] = 'AnalogIn1_Read_Report_voltageV' |
whismanoid | 27:485b1b2f334c | 3134 | #if MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD None |
whismanoid | 30:13fc9d492ee0 | 3135 | if (SelfTestGroupEnable & 0x0004) { |
whismanoid | 27:485b1b2f334c | 3136 | // call-tinytester-function |
whismanoid | 27:485b1b2f334c | 3137 | // tinyTesterFuncName = "tinyTester.AnalogIn1_Read_Report_voltageV" |
whismanoid | 27:485b1b2f334c | 3138 | // docTest_argList = "" |
whismanoid | 27:485b1b2f334c | 3139 | tinyTester.AnalogIn1_Read_Report_voltageV(); // |
whismanoid | 30:13fc9d492ee0 | 3140 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3141 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3142 | } // if (SelfTestGroupEnable & 0x0004) |
whismanoid | 27:485b1b2f334c | 3143 | #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD |
whismanoid | 27:485b1b2f334c | 3144 | |
whismanoid | 25:9d4012b0887f | 3145 | // @test group DACCodeOfVoltage // Verify function DACCodeOfVoltage (enabled by default) |
whismanoid | 25:9d4012b0887f | 3146 | // @test group DACCodeOfVoltage tinyTester.blink_time_msec = 20 // quickly speed through the software verification |
whismanoid | 25:9d4012b0887f | 3147 | // docTest_item['actionType'] = 'assign-propname-value' |
whismanoid | 25:9d4012b0887f | 3148 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3149 | // docTest_item['action'] = 'tinyTester.blink_time_msec = 20' |
whismanoid | 25:9d4012b0887f | 3150 | // docTest_item['remarks'] = 'quickly speed through the software verification' |
whismanoid | 25:9d4012b0887f | 3151 | // docTest_item['propName'] = 'tinyTester.blink_time_msec' |
whismanoid | 25:9d4012b0887f | 3152 | // docTest_item['propValue'] = '20' |
whismanoid | 25:9d4012b0887f | 3153 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None quickly speed through the software verification |
whismanoid | 30:13fc9d492ee0 | 3154 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3155 | // assign-propname-value |
whismanoid | 25:9d4012b0887f | 3156 | // tinyTesterPropName = "tinyTester.blink_time_msec" |
whismanoid | 25:9d4012b0887f | 3157 | // tinyTesterPropValue = "20" |
whismanoid | 25:9d4012b0887f | 3158 | tinyTester.blink_time_msec = 20; |
whismanoid | 30:13fc9d492ee0 | 3159 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3160 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3161 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3162 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3163 | |
whismanoid | 25:9d4012b0887f | 3164 | // @test group DACCodeOfVoltage tinyTester.print("VRef = 4.096 MAX5719 20-bit LSB = 0.000004V = 3.90625uV") |
whismanoid | 25:9d4012b0887f | 3165 | // docTest_item['actionType'] = 'print-string' |
whismanoid | 25:9d4012b0887f | 3166 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3167 | // docTest_item['action'] = 'tinyTester.print("VRef = 4.096 MAX5719 20-bit LSB = 0.000004V = 3.90625uV")' |
whismanoid | 25:9d4012b0887f | 3168 | // docTest_item['arglist'] = 'VRef = 4.096 MAX5719 20-bit LSB = 0.000004V = 3.90625uV' |
whismanoid | 25:9d4012b0887f | 3169 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None |
whismanoid | 30:13fc9d492ee0 | 3170 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3171 | // print-string |
whismanoid | 25:9d4012b0887f | 3172 | // tinyTesterFuncName = "tinyTester.print" |
whismanoid | 25:9d4012b0887f | 3173 | // tinyTesterPrintStringLiteral = "VRef = 4.096 MAX5719 20-bit LSB = 0.000004V = 3.90625uV" |
whismanoid | 25:9d4012b0887f | 3174 | tinyTester.print("VRef = 4.096 MAX5719 20-bit LSB = 0.000004V = 3.90625uV"); |
whismanoid | 30:13fc9d492ee0 | 3175 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3176 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3177 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3178 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3179 | |
whismanoid | 25:9d4012b0887f | 3180 | // @test group DACCodeOfVoltage VRef = 4.096 |
whismanoid | 25:9d4012b0887f | 3181 | // docTest_item['actionType'] = 'assign-propname-value' |
whismanoid | 25:9d4012b0887f | 3182 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3183 | // docTest_item['action'] = 'VRef = 4.096' |
whismanoid | 25:9d4012b0887f | 3184 | // docTest_item['propName'] = 'VRef' |
whismanoid | 25:9d4012b0887f | 3185 | // docTest_item['propValue'] = '4.096' |
whismanoid | 25:9d4012b0887f | 3186 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None |
whismanoid | 30:13fc9d492ee0 | 3187 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3188 | // assign-propname-value |
whismanoid | 25:9d4012b0887f | 3189 | // tinyTesterPropName = "VRef" |
whismanoid | 25:9d4012b0887f | 3190 | // tinyTesterPropValue = "4.096" |
whismanoid | 25:9d4012b0887f | 3191 | g_MAX5719_device.VRef = 4.096; |
whismanoid | 30:13fc9d492ee0 | 3192 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3193 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3194 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3195 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3196 | |
whismanoid | 25:9d4012b0887f | 3197 | // @test group DACCodeOfVoltage tinyTester.print("test_voltage_sweep V = 0.000000V to 4.096000V precision 0.100000V step 0.500000V") |
whismanoid | 25:9d4012b0887f | 3198 | // docTest_item['actionType'] = 'print-string' |
whismanoid | 25:9d4012b0887f | 3199 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3200 | // docTest_item['action'] = 'tinyTester.print("test_voltage_sweep V = 0.000000V to 4.096000V precision 0.100000V step 0.500000V")' |
whismanoid | 25:9d4012b0887f | 3201 | // docTest_item['arglist'] = 'test_voltage_sweep V = 0.000000V to 4.096000V precision 0.100000V step 0.500000V' |
whismanoid | 25:9d4012b0887f | 3202 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None |
whismanoid | 30:13fc9d492ee0 | 3203 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3204 | // print-string |
whismanoid | 25:9d4012b0887f | 3205 | // tinyTesterFuncName = "tinyTester.print" |
whismanoid | 25:9d4012b0887f | 3206 | // tinyTesterPrintStringLiteral = "test_voltage_sweep V = 0.000000V to 4.096000V precision 0.100000V step 0.500000V" |
whismanoid | 25:9d4012b0887f | 3207 | tinyTester.print("test_voltage_sweep V = 0.000000V to 4.096000V precision 0.100000V step 0.500000V"); |
whismanoid | 30:13fc9d492ee0 | 3208 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3209 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3210 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3211 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3212 | |
whismanoid | 25:9d4012b0887f | 3213 | // @test group DACCodeOfVoltage DACCodeOfVoltage(0.000000) expect 0x000000 // 0.000V |
whismanoid | 25:9d4012b0887f | 3214 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3215 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3216 | // docTest_item['action'] = 'DACCodeOfVoltage(0.000000) expect 0x000000' |
whismanoid | 25:9d4012b0887f | 3217 | // docTest_item['remarks'] = '0.000V' |
whismanoid | 25:9d4012b0887f | 3218 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3219 | // docTest_item['arglist'] = '0.000000' |
whismanoid | 25:9d4012b0887f | 3220 | // docTest_item['expect-value'] = '0x000000' |
whismanoid | 25:9d4012b0887f | 3221 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V |
whismanoid | 30:13fc9d492ee0 | 3222 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3223 | // call-function |
whismanoid | 27:485b1b2f334c | 3224 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3225 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.000000), (uint32_t)0x000000); // 0.000V |
whismanoid | 25:9d4012b0887f | 3226 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.000000, /* expect: */ (uint32_t)0x000000); // 0.000V |
whismanoid | 30:13fc9d492ee0 | 3227 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3228 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3229 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3230 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3231 | |
whismanoid | 25:9d4012b0887f | 3232 | // @test group DACCodeOfVoltage DACCodeOfVoltage(0.500000) expect 0x01f400 // 0.500V |
whismanoid | 25:9d4012b0887f | 3233 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3234 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3235 | // docTest_item['action'] = 'DACCodeOfVoltage(0.500000) expect 0x01f400' |
whismanoid | 25:9d4012b0887f | 3236 | // docTest_item['remarks'] = '0.500V' |
whismanoid | 25:9d4012b0887f | 3237 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3238 | // docTest_item['arglist'] = '0.500000' |
whismanoid | 25:9d4012b0887f | 3239 | // docTest_item['expect-value'] = '0x01f400' |
whismanoid | 25:9d4012b0887f | 3240 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.500V |
whismanoid | 30:13fc9d492ee0 | 3241 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3242 | // call-function |
whismanoid | 27:485b1b2f334c | 3243 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3244 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.500000), (uint32_t)0x01f400); // 0.500V |
whismanoid | 25:9d4012b0887f | 3245 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.500000, /* expect: */ (uint32_t)0x01f400); // 0.500V |
whismanoid | 30:13fc9d492ee0 | 3246 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3247 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3248 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3249 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3250 | |
whismanoid | 25:9d4012b0887f | 3251 | // @test group DACCodeOfVoltage DACCodeOfVoltage(1.000000) expect 0x03e800 // 1.000V |
whismanoid | 25:9d4012b0887f | 3252 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3253 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3254 | // docTest_item['action'] = 'DACCodeOfVoltage(1.000000) expect 0x03e800' |
whismanoid | 25:9d4012b0887f | 3255 | // docTest_item['remarks'] = '1.000V' |
whismanoid | 25:9d4012b0887f | 3256 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3257 | // docTest_item['arglist'] = '1.000000' |
whismanoid | 25:9d4012b0887f | 3258 | // docTest_item['expect-value'] = '0x03e800' |
whismanoid | 25:9d4012b0887f | 3259 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.000V |
whismanoid | 30:13fc9d492ee0 | 3260 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3261 | // call-function |
whismanoid | 27:485b1b2f334c | 3262 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3263 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.000000), (uint32_t)0x03e800); // 1.000V |
whismanoid | 25:9d4012b0887f | 3264 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.000000, /* expect: */ (uint32_t)0x03e800); // 1.000V |
whismanoid | 30:13fc9d492ee0 | 3265 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3266 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3267 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3268 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3269 | |
whismanoid | 25:9d4012b0887f | 3270 | // @test group DACCodeOfVoltage DACCodeOfVoltage(1.500000) expect 0x05dc00 // 1.500V |
whismanoid | 25:9d4012b0887f | 3271 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3272 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3273 | // docTest_item['action'] = 'DACCodeOfVoltage(1.500000) expect 0x05dc00' |
whismanoid | 25:9d4012b0887f | 3274 | // docTest_item['remarks'] = '1.500V' |
whismanoid | 25:9d4012b0887f | 3275 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3276 | // docTest_item['arglist'] = '1.500000' |
whismanoid | 25:9d4012b0887f | 3277 | // docTest_item['expect-value'] = '0x05dc00' |
whismanoid | 25:9d4012b0887f | 3278 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.500V |
whismanoid | 30:13fc9d492ee0 | 3279 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3280 | // call-function |
whismanoid | 27:485b1b2f334c | 3281 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3282 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.500000), (uint32_t)0x05dc00); // 1.500V |
whismanoid | 25:9d4012b0887f | 3283 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.500000, /* expect: */ (uint32_t)0x05dc00); // 1.500V |
whismanoid | 30:13fc9d492ee0 | 3284 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3285 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3286 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3287 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3288 | |
whismanoid | 25:9d4012b0887f | 3289 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.000000) expect 0x07d000 // 2.000V |
whismanoid | 25:9d4012b0887f | 3290 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3291 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3292 | // docTest_item['action'] = 'DACCodeOfVoltage(2.000000) expect 0x07d000' |
whismanoid | 25:9d4012b0887f | 3293 | // docTest_item['remarks'] = '2.000V' |
whismanoid | 25:9d4012b0887f | 3294 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3295 | // docTest_item['arglist'] = '2.000000' |
whismanoid | 25:9d4012b0887f | 3296 | // docTest_item['expect-value'] = '0x07d000' |
whismanoid | 25:9d4012b0887f | 3297 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.000V |
whismanoid | 30:13fc9d492ee0 | 3298 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3299 | // call-function |
whismanoid | 27:485b1b2f334c | 3300 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3301 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.000000), (uint32_t)0x07d000); // 2.000V |
whismanoid | 25:9d4012b0887f | 3302 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.000000, /* expect: */ (uint32_t)0x07d000); // 2.000V |
whismanoid | 30:13fc9d492ee0 | 3303 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3304 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3305 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3306 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3307 | |
whismanoid | 25:9d4012b0887f | 3308 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.500000) expect 0x09c400 // 2.500V |
whismanoid | 25:9d4012b0887f | 3309 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3310 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3311 | // docTest_item['action'] = 'DACCodeOfVoltage(2.500000) expect 0x09c400' |
whismanoid | 25:9d4012b0887f | 3312 | // docTest_item['remarks'] = '2.500V' |
whismanoid | 25:9d4012b0887f | 3313 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3314 | // docTest_item['arglist'] = '2.500000' |
whismanoid | 25:9d4012b0887f | 3315 | // docTest_item['expect-value'] = '0x09c400' |
whismanoid | 25:9d4012b0887f | 3316 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.500V |
whismanoid | 30:13fc9d492ee0 | 3317 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3318 | // call-function |
whismanoid | 27:485b1b2f334c | 3319 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3320 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.500000), (uint32_t)0x09c400); // 2.500V |
whismanoid | 25:9d4012b0887f | 3321 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.500000, /* expect: */ (uint32_t)0x09c400); // 2.500V |
whismanoid | 30:13fc9d492ee0 | 3322 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3323 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3324 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3325 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3326 | |
whismanoid | 25:9d4012b0887f | 3327 | // @test group DACCodeOfVoltage DACCodeOfVoltage(3.000000) expect 0x0bb800 // 3.000V |
whismanoid | 25:9d4012b0887f | 3328 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3329 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3330 | // docTest_item['action'] = 'DACCodeOfVoltage(3.000000) expect 0x0bb800' |
whismanoid | 25:9d4012b0887f | 3331 | // docTest_item['remarks'] = '3.000V' |
whismanoid | 25:9d4012b0887f | 3332 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3333 | // docTest_item['arglist'] = '3.000000' |
whismanoid | 25:9d4012b0887f | 3334 | // docTest_item['expect-value'] = '0x0bb800' |
whismanoid | 25:9d4012b0887f | 3335 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.000V |
whismanoid | 30:13fc9d492ee0 | 3336 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3337 | // call-function |
whismanoid | 27:485b1b2f334c | 3338 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3339 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.000000), (uint32_t)0x0bb800); // 3.000V |
whismanoid | 25:9d4012b0887f | 3340 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.000000, /* expect: */ (uint32_t)0x0bb800); // 3.000V |
whismanoid | 30:13fc9d492ee0 | 3341 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3342 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3343 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3344 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3345 | |
whismanoid | 25:9d4012b0887f | 3346 | // @test group DACCodeOfVoltage DACCodeOfVoltage(3.500000) expect 0x0dac00 // 3.500V |
whismanoid | 25:9d4012b0887f | 3347 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3348 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3349 | // docTest_item['action'] = 'DACCodeOfVoltage(3.500000) expect 0x0dac00' |
whismanoid | 25:9d4012b0887f | 3350 | // docTest_item['remarks'] = '3.500V' |
whismanoid | 25:9d4012b0887f | 3351 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3352 | // docTest_item['arglist'] = '3.500000' |
whismanoid | 25:9d4012b0887f | 3353 | // docTest_item['expect-value'] = '0x0dac00' |
whismanoid | 25:9d4012b0887f | 3354 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.500V |
whismanoid | 30:13fc9d492ee0 | 3355 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3356 | // call-function |
whismanoid | 27:485b1b2f334c | 3357 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3358 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.500000), (uint32_t)0x0dac00); // 3.500V |
whismanoid | 25:9d4012b0887f | 3359 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.500000, /* expect: */ (uint32_t)0x0dac00); // 3.500V |
whismanoid | 30:13fc9d492ee0 | 3360 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3361 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3362 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3363 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3364 | |
whismanoid | 25:9d4012b0887f | 3365 | // @test group DACCodeOfVoltage DACCodeOfVoltage(4.000000) expect 0x0fa000 // 4.000V |
whismanoid | 25:9d4012b0887f | 3366 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3367 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3368 | // docTest_item['action'] = 'DACCodeOfVoltage(4.000000) expect 0x0fa000' |
whismanoid | 25:9d4012b0887f | 3369 | // docTest_item['remarks'] = '4.000V' |
whismanoid | 25:9d4012b0887f | 3370 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3371 | // docTest_item['arglist'] = '4.000000' |
whismanoid | 25:9d4012b0887f | 3372 | // docTest_item['expect-value'] = '0x0fa000' |
whismanoid | 25:9d4012b0887f | 3373 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.000V |
whismanoid | 30:13fc9d492ee0 | 3374 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3375 | // call-function |
whismanoid | 27:485b1b2f334c | 3376 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3377 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.000000), (uint32_t)0x0fa000); // 4.000V |
whismanoid | 25:9d4012b0887f | 3378 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.000000, /* expect: */ (uint32_t)0x0fa000); // 4.000V |
whismanoid | 30:13fc9d492ee0 | 3379 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3380 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3381 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3382 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3383 | |
whismanoid | 25:9d4012b0887f | 3384 | // @test group DACCodeOfVoltage tinyTester.print("test_voltage_sweep V = -0.010000V to 0.100000V precision 0.010000V step 0.010000V") |
whismanoid | 25:9d4012b0887f | 3385 | // docTest_item['actionType'] = 'print-string' |
whismanoid | 25:9d4012b0887f | 3386 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3387 | // docTest_item['action'] = 'tinyTester.print("test_voltage_sweep V = -0.010000V to 0.100000V precision 0.010000V step 0.010000V")' |
whismanoid | 25:9d4012b0887f | 3388 | // docTest_item['arglist'] = 'test_voltage_sweep V = -0.010000V to 0.100000V precision 0.010000V step 0.010000V' |
whismanoid | 25:9d4012b0887f | 3389 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None |
whismanoid | 30:13fc9d492ee0 | 3390 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3391 | // print-string |
whismanoid | 25:9d4012b0887f | 3392 | // tinyTesterFuncName = "tinyTester.print" |
whismanoid | 25:9d4012b0887f | 3393 | // tinyTesterPrintStringLiteral = "test_voltage_sweep V = -0.010000V to 0.100000V precision 0.010000V step 0.010000V" |
whismanoid | 25:9d4012b0887f | 3394 | tinyTester.print("test_voltage_sweep V = -0.010000V to 0.100000V precision 0.010000V step 0.010000V"); |
whismanoid | 30:13fc9d492ee0 | 3395 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3396 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3397 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3398 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3399 | |
whismanoid | 25:9d4012b0887f | 3400 | // @test group DACCodeOfVoltage DACCodeOfVoltage(-0.010000) expect 0x000000 // -0.010V |
whismanoid | 25:9d4012b0887f | 3401 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3402 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3403 | // docTest_item['action'] = 'DACCodeOfVoltage(-0.010000) expect 0x000000' |
whismanoid | 25:9d4012b0887f | 3404 | // docTest_item['remarks'] = '-0.010V' |
whismanoid | 25:9d4012b0887f | 3405 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3406 | // docTest_item['arglist'] = '-0.010000' |
whismanoid | 25:9d4012b0887f | 3407 | // docTest_item['expect-value'] = '0x000000' |
whismanoid | 25:9d4012b0887f | 3408 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage -0.010V |
whismanoid | 30:13fc9d492ee0 | 3409 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3410 | // call-function |
whismanoid | 27:485b1b2f334c | 3411 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3412 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)-0.010000), (uint32_t)0x000000); // -0.010V |
whismanoid | 25:9d4012b0887f | 3413 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)-0.010000, /* expect: */ (uint32_t)0x000000); // -0.010V |
whismanoid | 30:13fc9d492ee0 | 3414 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3415 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3416 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3417 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3418 | |
whismanoid | 25:9d4012b0887f | 3419 | // @test group DACCodeOfVoltage DACCodeOfVoltage(0.000000) expect 0x000000 // 0.000V |
whismanoid | 25:9d4012b0887f | 3420 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3421 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3422 | // docTest_item['action'] = 'DACCodeOfVoltage(0.000000) expect 0x000000' |
whismanoid | 25:9d4012b0887f | 3423 | // docTest_item['remarks'] = '0.000V' |
whismanoid | 25:9d4012b0887f | 3424 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3425 | // docTest_item['arglist'] = '0.000000' |
whismanoid | 25:9d4012b0887f | 3426 | // docTest_item['expect-value'] = '0x000000' |
whismanoid | 25:9d4012b0887f | 3427 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V |
whismanoid | 30:13fc9d492ee0 | 3428 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3429 | // call-function |
whismanoid | 27:485b1b2f334c | 3430 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3431 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.000000), (uint32_t)0x000000); // 0.000V |
whismanoid | 25:9d4012b0887f | 3432 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.000000, /* expect: */ (uint32_t)0x000000); // 0.000V |
whismanoid | 30:13fc9d492ee0 | 3433 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3434 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3435 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3436 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3437 | |
whismanoid | 25:9d4012b0887f | 3438 | // @test group DACCodeOfVoltage DACCodeOfVoltage(0.010000) expect 0x000a00 // 0.010V |
whismanoid | 25:9d4012b0887f | 3439 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3440 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3441 | // docTest_item['action'] = 'DACCodeOfVoltage(0.010000) expect 0x000a00' |
whismanoid | 25:9d4012b0887f | 3442 | // docTest_item['remarks'] = '0.010V' |
whismanoid | 25:9d4012b0887f | 3443 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3444 | // docTest_item['arglist'] = '0.010000' |
whismanoid | 25:9d4012b0887f | 3445 | // docTest_item['expect-value'] = '0x000a00' |
whismanoid | 25:9d4012b0887f | 3446 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.010V |
whismanoid | 30:13fc9d492ee0 | 3447 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3448 | // call-function |
whismanoid | 27:485b1b2f334c | 3449 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3450 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.010000), (uint32_t)0x000a00); // 0.010V |
whismanoid | 25:9d4012b0887f | 3451 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.010000, /* expect: */ (uint32_t)0x000a00); // 0.010V |
whismanoid | 30:13fc9d492ee0 | 3452 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3453 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3454 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3455 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3456 | |
whismanoid | 25:9d4012b0887f | 3457 | // @test group DACCodeOfVoltage DACCodeOfVoltage(0.020000) expect 0x001400 // 0.020V |
whismanoid | 25:9d4012b0887f | 3458 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3459 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3460 | // docTest_item['action'] = 'DACCodeOfVoltage(0.020000) expect 0x001400' |
whismanoid | 25:9d4012b0887f | 3461 | // docTest_item['remarks'] = '0.020V' |
whismanoid | 25:9d4012b0887f | 3462 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3463 | // docTest_item['arglist'] = '0.020000' |
whismanoid | 25:9d4012b0887f | 3464 | // docTest_item['expect-value'] = '0x001400' |
whismanoid | 25:9d4012b0887f | 3465 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.020V |
whismanoid | 30:13fc9d492ee0 | 3466 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3467 | // call-function |
whismanoid | 27:485b1b2f334c | 3468 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3469 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.020000), (uint32_t)0x001400); // 0.020V |
whismanoid | 25:9d4012b0887f | 3470 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.020000, /* expect: */ (uint32_t)0x001400); // 0.020V |
whismanoid | 30:13fc9d492ee0 | 3471 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3472 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3473 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3474 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3475 | |
whismanoid | 25:9d4012b0887f | 3476 | // @test group DACCodeOfVoltage DACCodeOfVoltage(0.030000) expect 0x001e00 // 0.030V |
whismanoid | 25:9d4012b0887f | 3477 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3478 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3479 | // docTest_item['action'] = 'DACCodeOfVoltage(0.030000) expect 0x001e00' |
whismanoid | 25:9d4012b0887f | 3480 | // docTest_item['remarks'] = '0.030V' |
whismanoid | 25:9d4012b0887f | 3481 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3482 | // docTest_item['arglist'] = '0.030000' |
whismanoid | 25:9d4012b0887f | 3483 | // docTest_item['expect-value'] = '0x001e00' |
whismanoid | 25:9d4012b0887f | 3484 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.030V |
whismanoid | 30:13fc9d492ee0 | 3485 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3486 | // call-function |
whismanoid | 27:485b1b2f334c | 3487 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3488 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.030000), (uint32_t)0x001e00); // 0.030V |
whismanoid | 25:9d4012b0887f | 3489 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.030000, /* expect: */ (uint32_t)0x001e00); // 0.030V |
whismanoid | 30:13fc9d492ee0 | 3490 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3491 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3492 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3493 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3494 | |
whismanoid | 25:9d4012b0887f | 3495 | // @test group DACCodeOfVoltage DACCodeOfVoltage(0.040000) expect 0x002800 // 0.040V |
whismanoid | 25:9d4012b0887f | 3496 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3497 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3498 | // docTest_item['action'] = 'DACCodeOfVoltage(0.040000) expect 0x002800' |
whismanoid | 25:9d4012b0887f | 3499 | // docTest_item['remarks'] = '0.040V' |
whismanoid | 25:9d4012b0887f | 3500 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3501 | // docTest_item['arglist'] = '0.040000' |
whismanoid | 25:9d4012b0887f | 3502 | // docTest_item['expect-value'] = '0x002800' |
whismanoid | 25:9d4012b0887f | 3503 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.040V |
whismanoid | 30:13fc9d492ee0 | 3504 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3505 | // call-function |
whismanoid | 27:485b1b2f334c | 3506 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3507 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.040000), (uint32_t)0x002800); // 0.040V |
whismanoid | 25:9d4012b0887f | 3508 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.040000, /* expect: */ (uint32_t)0x002800); // 0.040V |
whismanoid | 30:13fc9d492ee0 | 3509 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3510 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3511 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3512 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3513 | |
whismanoid | 25:9d4012b0887f | 3514 | // @test group DACCodeOfVoltage DACCodeOfVoltage(0.050000) expect 0x003200 // 0.050V |
whismanoid | 25:9d4012b0887f | 3515 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3516 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3517 | // docTest_item['action'] = 'DACCodeOfVoltage(0.050000) expect 0x003200' |
whismanoid | 25:9d4012b0887f | 3518 | // docTest_item['remarks'] = '0.050V' |
whismanoid | 25:9d4012b0887f | 3519 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3520 | // docTest_item['arglist'] = '0.050000' |
whismanoid | 25:9d4012b0887f | 3521 | // docTest_item['expect-value'] = '0x003200' |
whismanoid | 25:9d4012b0887f | 3522 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.050V |
whismanoid | 30:13fc9d492ee0 | 3523 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3524 | // call-function |
whismanoid | 27:485b1b2f334c | 3525 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3526 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.050000), (uint32_t)0x003200); // 0.050V |
whismanoid | 25:9d4012b0887f | 3527 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.050000, /* expect: */ (uint32_t)0x003200); // 0.050V |
whismanoid | 30:13fc9d492ee0 | 3528 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3529 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3530 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3531 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3532 | |
whismanoid | 25:9d4012b0887f | 3533 | // @test group DACCodeOfVoltage DACCodeOfVoltage(0.060000) expect 0x003c00 // 0.060V |
whismanoid | 25:9d4012b0887f | 3534 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3535 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3536 | // docTest_item['action'] = 'DACCodeOfVoltage(0.060000) expect 0x003c00' |
whismanoid | 25:9d4012b0887f | 3537 | // docTest_item['remarks'] = '0.060V' |
whismanoid | 25:9d4012b0887f | 3538 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3539 | // docTest_item['arglist'] = '0.060000' |
whismanoid | 25:9d4012b0887f | 3540 | // docTest_item['expect-value'] = '0x003c00' |
whismanoid | 25:9d4012b0887f | 3541 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.060V |
whismanoid | 30:13fc9d492ee0 | 3542 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3543 | // call-function |
whismanoid | 27:485b1b2f334c | 3544 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3545 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.060000), (uint32_t)0x003c00); // 0.060V |
whismanoid | 25:9d4012b0887f | 3546 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.060000, /* expect: */ (uint32_t)0x003c00); // 0.060V |
whismanoid | 30:13fc9d492ee0 | 3547 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3548 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3549 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3550 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3551 | |
whismanoid | 25:9d4012b0887f | 3552 | // @test group DACCodeOfVoltage DACCodeOfVoltage(0.070000) expect 0x004600 // 0.070V |
whismanoid | 25:9d4012b0887f | 3553 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3554 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3555 | // docTest_item['action'] = 'DACCodeOfVoltage(0.070000) expect 0x004600' |
whismanoid | 25:9d4012b0887f | 3556 | // docTest_item['remarks'] = '0.070V' |
whismanoid | 25:9d4012b0887f | 3557 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3558 | // docTest_item['arglist'] = '0.070000' |
whismanoid | 25:9d4012b0887f | 3559 | // docTest_item['expect-value'] = '0x004600' |
whismanoid | 25:9d4012b0887f | 3560 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.070V |
whismanoid | 30:13fc9d492ee0 | 3561 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3562 | // call-function |
whismanoid | 27:485b1b2f334c | 3563 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3564 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.070000), (uint32_t)0x004600); // 0.070V |
whismanoid | 25:9d4012b0887f | 3565 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.070000, /* expect: */ (uint32_t)0x004600); // 0.070V |
whismanoid | 30:13fc9d492ee0 | 3566 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3567 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3568 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3569 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3570 | |
whismanoid | 25:9d4012b0887f | 3571 | // @test group DACCodeOfVoltage DACCodeOfVoltage(0.080000) expect 0x005000 // 0.080V |
whismanoid | 25:9d4012b0887f | 3572 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3573 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3574 | // docTest_item['action'] = 'DACCodeOfVoltage(0.080000) expect 0x005000' |
whismanoid | 25:9d4012b0887f | 3575 | // docTest_item['remarks'] = '0.080V' |
whismanoid | 25:9d4012b0887f | 3576 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3577 | // docTest_item['arglist'] = '0.080000' |
whismanoid | 25:9d4012b0887f | 3578 | // docTest_item['expect-value'] = '0x005000' |
whismanoid | 25:9d4012b0887f | 3579 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.080V |
whismanoid | 30:13fc9d492ee0 | 3580 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3581 | // call-function |
whismanoid | 27:485b1b2f334c | 3582 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3583 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.080000), (uint32_t)0x005000); // 0.080V |
whismanoid | 25:9d4012b0887f | 3584 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.080000, /* expect: */ (uint32_t)0x005000); // 0.080V |
whismanoid | 30:13fc9d492ee0 | 3585 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3586 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3587 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3588 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3589 | |
whismanoid | 25:9d4012b0887f | 3590 | // @test group DACCodeOfVoltage DACCodeOfVoltage(0.090000) expect 0x005a00 // 0.090V |
whismanoid | 25:9d4012b0887f | 3591 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3592 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3593 | // docTest_item['action'] = 'DACCodeOfVoltage(0.090000) expect 0x005a00' |
whismanoid | 25:9d4012b0887f | 3594 | // docTest_item['remarks'] = '0.090V' |
whismanoid | 25:9d4012b0887f | 3595 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3596 | // docTest_item['arglist'] = '0.090000' |
whismanoid | 25:9d4012b0887f | 3597 | // docTest_item['expect-value'] = '0x005a00' |
whismanoid | 25:9d4012b0887f | 3598 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.090V |
whismanoid | 30:13fc9d492ee0 | 3599 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3600 | // call-function |
whismanoid | 27:485b1b2f334c | 3601 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3602 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.090000), (uint32_t)0x005a00); // 0.090V |
whismanoid | 25:9d4012b0887f | 3603 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.090000, /* expect: */ (uint32_t)0x005a00); // 0.090V |
whismanoid | 30:13fc9d492ee0 | 3604 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3605 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3606 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3607 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3608 | |
whismanoid | 25:9d4012b0887f | 3609 | // @test group DACCodeOfVoltage DACCodeOfVoltage(0.100000) expect 0x006400 // 0.100V |
whismanoid | 25:9d4012b0887f | 3610 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3611 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3612 | // docTest_item['action'] = 'DACCodeOfVoltage(0.100000) expect 0x006400' |
whismanoid | 25:9d4012b0887f | 3613 | // docTest_item['remarks'] = '0.100V' |
whismanoid | 25:9d4012b0887f | 3614 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3615 | // docTest_item['arglist'] = '0.100000' |
whismanoid | 25:9d4012b0887f | 3616 | // docTest_item['expect-value'] = '0x006400' |
whismanoid | 25:9d4012b0887f | 3617 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.100V |
whismanoid | 30:13fc9d492ee0 | 3618 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3619 | // call-function |
whismanoid | 27:485b1b2f334c | 3620 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3621 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.100000), (uint32_t)0x006400); // 0.100V |
whismanoid | 25:9d4012b0887f | 3622 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.100000, /* expect: */ (uint32_t)0x006400); // 0.100V |
whismanoid | 30:13fc9d492ee0 | 3623 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3624 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3625 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3626 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3627 | |
whismanoid | 25:9d4012b0887f | 3628 | // @test group DACCodeOfVoltage tinyTester.print("test_voltage_sweep V = 2.047900V to 2.048100V precision 0.000010V step 0.000010V") |
whismanoid | 25:9d4012b0887f | 3629 | // docTest_item['actionType'] = 'print-string' |
whismanoid | 25:9d4012b0887f | 3630 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3631 | // docTest_item['action'] = 'tinyTester.print("test_voltage_sweep V = 2.047900V to 2.048100V precision 0.000010V step 0.000010V")' |
whismanoid | 25:9d4012b0887f | 3632 | // docTest_item['arglist'] = 'test_voltage_sweep V = 2.047900V to 2.048100V precision 0.000010V step 0.000010V' |
whismanoid | 25:9d4012b0887f | 3633 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None |
whismanoid | 30:13fc9d492ee0 | 3634 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3635 | // print-string |
whismanoid | 25:9d4012b0887f | 3636 | // tinyTesterFuncName = "tinyTester.print" |
whismanoid | 25:9d4012b0887f | 3637 | // tinyTesterPrintStringLiteral = "test_voltage_sweep V = 2.047900V to 2.048100V precision 0.000010V step 0.000010V" |
whismanoid | 25:9d4012b0887f | 3638 | tinyTester.print("test_voltage_sweep V = 2.047900V to 2.048100V precision 0.000010V step 0.000010V"); |
whismanoid | 30:13fc9d492ee0 | 3639 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3640 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3641 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3642 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3643 | |
whismanoid | 25:9d4012b0887f | 3644 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047890) expect 0x07ffe4 // 2.048V |
whismanoid | 25:9d4012b0887f | 3645 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3646 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3647 | // docTest_item['action'] = 'DACCodeOfVoltage(2.047890) expect 0x07ffe4' |
whismanoid | 25:9d4012b0887f | 3648 | // docTest_item['remarks'] = '2.048V' |
whismanoid | 25:9d4012b0887f | 3649 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3650 | // docTest_item['arglist'] = '2.047890' |
whismanoid | 25:9d4012b0887f | 3651 | // docTest_item['expect-value'] = '0x07ffe4' |
whismanoid | 25:9d4012b0887f | 3652 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V |
whismanoid | 30:13fc9d492ee0 | 3653 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3654 | // call-function |
whismanoid | 27:485b1b2f334c | 3655 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3656 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047890), (uint32_t)0x07ffe4); // 2.048V |
whismanoid | 25:9d4012b0887f | 3657 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047890, /* expect: */ (uint32_t)0x07ffe4); // 2.048V |
whismanoid | 30:13fc9d492ee0 | 3658 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3659 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3660 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3661 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3662 | |
whismanoid | 25:9d4012b0887f | 3663 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047900) expect 0x07ffe6 // 2.048V |
whismanoid | 25:9d4012b0887f | 3664 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3665 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3666 | // docTest_item['action'] = 'DACCodeOfVoltage(2.047900) expect 0x07ffe6' |
whismanoid | 25:9d4012b0887f | 3667 | // docTest_item['remarks'] = '2.048V' |
whismanoid | 25:9d4012b0887f | 3668 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3669 | // docTest_item['arglist'] = '2.047900' |
whismanoid | 25:9d4012b0887f | 3670 | // docTest_item['expect-value'] = '0x07ffe6' |
whismanoid | 25:9d4012b0887f | 3671 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V |
whismanoid | 30:13fc9d492ee0 | 3672 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3673 | // call-function |
whismanoid | 27:485b1b2f334c | 3674 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3675 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047900), (uint32_t)0x07ffe6); // 2.048V |
whismanoid | 25:9d4012b0887f | 3676 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047900, /* expect: */ (uint32_t)0x07ffe6); // 2.048V |
whismanoid | 30:13fc9d492ee0 | 3677 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3678 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3679 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3680 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3681 | |
whismanoid | 25:9d4012b0887f | 3682 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047910) expect 0x07ffe9 // 2.048V |
whismanoid | 25:9d4012b0887f | 3683 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3684 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3685 | // docTest_item['action'] = 'DACCodeOfVoltage(2.047910) expect 0x07ffe9' |
whismanoid | 25:9d4012b0887f | 3686 | // docTest_item['remarks'] = '2.048V' |
whismanoid | 25:9d4012b0887f | 3687 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3688 | // docTest_item['arglist'] = '2.047910' |
whismanoid | 25:9d4012b0887f | 3689 | // docTest_item['expect-value'] = '0x07ffe9' |
whismanoid | 25:9d4012b0887f | 3690 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V |
whismanoid | 30:13fc9d492ee0 | 3691 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3692 | // call-function |
whismanoid | 27:485b1b2f334c | 3693 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3694 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047910), (uint32_t)0x07ffe9); // 2.048V |
whismanoid | 25:9d4012b0887f | 3695 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047910, /* expect: */ (uint32_t)0x07ffe9); // 2.048V |
whismanoid | 30:13fc9d492ee0 | 3696 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3697 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3698 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3699 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3700 | |
whismanoid | 25:9d4012b0887f | 3701 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047920) expect 0x07ffec // 2.048V |
whismanoid | 25:9d4012b0887f | 3702 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3703 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3704 | // docTest_item['action'] = 'DACCodeOfVoltage(2.047920) expect 0x07ffec' |
whismanoid | 25:9d4012b0887f | 3705 | // docTest_item['remarks'] = '2.048V' |
whismanoid | 25:9d4012b0887f | 3706 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3707 | // docTest_item['arglist'] = '2.047920' |
whismanoid | 25:9d4012b0887f | 3708 | // docTest_item['expect-value'] = '0x07ffec' |
whismanoid | 25:9d4012b0887f | 3709 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V |
whismanoid | 30:13fc9d492ee0 | 3710 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3711 | // call-function |
whismanoid | 27:485b1b2f334c | 3712 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3713 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047920), (uint32_t)0x07ffec); // 2.048V |
whismanoid | 25:9d4012b0887f | 3714 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047920, /* expect: */ (uint32_t)0x07ffec); // 2.048V |
whismanoid | 30:13fc9d492ee0 | 3715 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3716 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3717 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3718 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3719 | |
whismanoid | 25:9d4012b0887f | 3720 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047930) expect 0x07ffee // 2.048V |
whismanoid | 25:9d4012b0887f | 3721 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3722 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3723 | // docTest_item['action'] = 'DACCodeOfVoltage(2.047930) expect 0x07ffee' |
whismanoid | 25:9d4012b0887f | 3724 | // docTest_item['remarks'] = '2.048V' |
whismanoid | 25:9d4012b0887f | 3725 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3726 | // docTest_item['arglist'] = '2.047930' |
whismanoid | 25:9d4012b0887f | 3727 | // docTest_item['expect-value'] = '0x07ffee' |
whismanoid | 25:9d4012b0887f | 3728 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V |
whismanoid | 30:13fc9d492ee0 | 3729 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3730 | // call-function |
whismanoid | 27:485b1b2f334c | 3731 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3732 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047930), (uint32_t)0x07ffee); // 2.048V |
whismanoid | 25:9d4012b0887f | 3733 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047930, /* expect: */ (uint32_t)0x07ffee); // 2.048V |
whismanoid | 30:13fc9d492ee0 | 3734 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3735 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3736 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3737 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3738 | |
whismanoid | 25:9d4012b0887f | 3739 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047940) expect 0x07fff1 // 2.048V |
whismanoid | 25:9d4012b0887f | 3740 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3741 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3742 | // docTest_item['action'] = 'DACCodeOfVoltage(2.047940) expect 0x07fff1' |
whismanoid | 25:9d4012b0887f | 3743 | // docTest_item['remarks'] = '2.048V' |
whismanoid | 25:9d4012b0887f | 3744 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3745 | // docTest_item['arglist'] = '2.047940' |
whismanoid | 25:9d4012b0887f | 3746 | // docTest_item['expect-value'] = '0x07fff1' |
whismanoid | 25:9d4012b0887f | 3747 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V |
whismanoid | 30:13fc9d492ee0 | 3748 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3749 | // call-function |
whismanoid | 27:485b1b2f334c | 3750 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3751 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047940), (uint32_t)0x07fff1); // 2.048V |
whismanoid | 25:9d4012b0887f | 3752 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047940, /* expect: */ (uint32_t)0x07fff1); // 2.048V |
whismanoid | 30:13fc9d492ee0 | 3753 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3754 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3755 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3756 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3757 | |
whismanoid | 25:9d4012b0887f | 3758 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047950) expect 0x07fff3 // 2.048V |
whismanoid | 25:9d4012b0887f | 3759 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3760 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3761 | // docTest_item['action'] = 'DACCodeOfVoltage(2.047950) expect 0x07fff3' |
whismanoid | 25:9d4012b0887f | 3762 | // docTest_item['remarks'] = '2.048V' |
whismanoid | 25:9d4012b0887f | 3763 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3764 | // docTest_item['arglist'] = '2.047950' |
whismanoid | 25:9d4012b0887f | 3765 | // docTest_item['expect-value'] = '0x07fff3' |
whismanoid | 25:9d4012b0887f | 3766 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V |
whismanoid | 30:13fc9d492ee0 | 3767 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3768 | // call-function |
whismanoid | 27:485b1b2f334c | 3769 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3770 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047950), (uint32_t)0x07fff3); // 2.048V |
whismanoid | 25:9d4012b0887f | 3771 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047950, /* expect: */ (uint32_t)0x07fff3); // 2.048V |
whismanoid | 30:13fc9d492ee0 | 3772 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3773 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3774 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3775 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3776 | |
whismanoid | 25:9d4012b0887f | 3777 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047960) expect 0x07fff6 // 2.048V |
whismanoid | 25:9d4012b0887f | 3778 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3779 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3780 | // docTest_item['action'] = 'DACCodeOfVoltage(2.047960) expect 0x07fff6' |
whismanoid | 25:9d4012b0887f | 3781 | // docTest_item['remarks'] = '2.048V' |
whismanoid | 25:9d4012b0887f | 3782 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3783 | // docTest_item['arglist'] = '2.047960' |
whismanoid | 25:9d4012b0887f | 3784 | // docTest_item['expect-value'] = '0x07fff6' |
whismanoid | 25:9d4012b0887f | 3785 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V |
whismanoid | 30:13fc9d492ee0 | 3786 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3787 | // call-function |
whismanoid | 27:485b1b2f334c | 3788 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3789 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047960), (uint32_t)0x07fff6); // 2.048V |
whismanoid | 25:9d4012b0887f | 3790 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047960, /* expect: */ (uint32_t)0x07fff6); // 2.048V |
whismanoid | 30:13fc9d492ee0 | 3791 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3792 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3793 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3794 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3795 | |
whismanoid | 25:9d4012b0887f | 3796 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047970) expect 0x07fff8 // 2.048V |
whismanoid | 25:9d4012b0887f | 3797 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3798 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3799 | // docTest_item['action'] = 'DACCodeOfVoltage(2.047970) expect 0x07fff8' |
whismanoid | 25:9d4012b0887f | 3800 | // docTest_item['remarks'] = '2.048V' |
whismanoid | 25:9d4012b0887f | 3801 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3802 | // docTest_item['arglist'] = '2.047970' |
whismanoid | 25:9d4012b0887f | 3803 | // docTest_item['expect-value'] = '0x07fff8' |
whismanoid | 25:9d4012b0887f | 3804 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V |
whismanoid | 30:13fc9d492ee0 | 3805 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3806 | // call-function |
whismanoid | 27:485b1b2f334c | 3807 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3808 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047970), (uint32_t)0x07fff8); // 2.048V |
whismanoid | 25:9d4012b0887f | 3809 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047970, /* expect: */ (uint32_t)0x07fff8); // 2.048V |
whismanoid | 30:13fc9d492ee0 | 3810 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3811 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3812 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3813 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3814 | |
whismanoid | 25:9d4012b0887f | 3815 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047980) expect 0x07fffb // 2.048V |
whismanoid | 25:9d4012b0887f | 3816 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3817 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3818 | // docTest_item['action'] = 'DACCodeOfVoltage(2.047980) expect 0x07fffb' |
whismanoid | 25:9d4012b0887f | 3819 | // docTest_item['remarks'] = '2.048V' |
whismanoid | 25:9d4012b0887f | 3820 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3821 | // docTest_item['arglist'] = '2.047980' |
whismanoid | 25:9d4012b0887f | 3822 | // docTest_item['expect-value'] = '0x07fffb' |
whismanoid | 25:9d4012b0887f | 3823 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V |
whismanoid | 30:13fc9d492ee0 | 3824 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3825 | // call-function |
whismanoid | 27:485b1b2f334c | 3826 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3827 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047980), (uint32_t)0x07fffb); // 2.048V |
whismanoid | 25:9d4012b0887f | 3828 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047980, /* expect: */ (uint32_t)0x07fffb); // 2.048V |
whismanoid | 30:13fc9d492ee0 | 3829 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3830 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3831 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3832 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3833 | |
whismanoid | 25:9d4012b0887f | 3834 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047990) expect 0x07fffd // 2.048V |
whismanoid | 25:9d4012b0887f | 3835 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3836 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3837 | // docTest_item['action'] = 'DACCodeOfVoltage(2.047990) expect 0x07fffd' |
whismanoid | 25:9d4012b0887f | 3838 | // docTest_item['remarks'] = '2.048V' |
whismanoid | 25:9d4012b0887f | 3839 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3840 | // docTest_item['arglist'] = '2.047990' |
whismanoid | 25:9d4012b0887f | 3841 | // docTest_item['expect-value'] = '0x07fffd' |
whismanoid | 25:9d4012b0887f | 3842 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V |
whismanoid | 30:13fc9d492ee0 | 3843 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3844 | // call-function |
whismanoid | 27:485b1b2f334c | 3845 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3846 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047990), (uint32_t)0x07fffd); // 2.048V |
whismanoid | 25:9d4012b0887f | 3847 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047990, /* expect: */ (uint32_t)0x07fffd); // 2.048V |
whismanoid | 30:13fc9d492ee0 | 3848 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3849 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3850 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3851 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3852 | |
whismanoid | 25:9d4012b0887f | 3853 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048000) expect 0x080000 // 2.048V |
whismanoid | 25:9d4012b0887f | 3854 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3855 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3856 | // docTest_item['action'] = 'DACCodeOfVoltage(2.048000) expect 0x080000' |
whismanoid | 25:9d4012b0887f | 3857 | // docTest_item['remarks'] = '2.048V' |
whismanoid | 25:9d4012b0887f | 3858 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3859 | // docTest_item['arglist'] = '2.048000' |
whismanoid | 25:9d4012b0887f | 3860 | // docTest_item['expect-value'] = '0x080000' |
whismanoid | 25:9d4012b0887f | 3861 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V |
whismanoid | 30:13fc9d492ee0 | 3862 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3863 | // call-function |
whismanoid | 27:485b1b2f334c | 3864 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3865 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048000), (uint32_t)0x080000); // 2.048V |
whismanoid | 25:9d4012b0887f | 3866 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048000, /* expect: */ (uint32_t)0x080000); // 2.048V |
whismanoid | 30:13fc9d492ee0 | 3867 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3868 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3869 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3870 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3871 | |
whismanoid | 25:9d4012b0887f | 3872 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048010) expect 0x080003 // 2.048V |
whismanoid | 25:9d4012b0887f | 3873 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3874 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3875 | // docTest_item['action'] = 'DACCodeOfVoltage(2.048010) expect 0x080003' |
whismanoid | 25:9d4012b0887f | 3876 | // docTest_item['remarks'] = '2.048V' |
whismanoid | 25:9d4012b0887f | 3877 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3878 | // docTest_item['arglist'] = '2.048010' |
whismanoid | 25:9d4012b0887f | 3879 | // docTest_item['expect-value'] = '0x080003' |
whismanoid | 25:9d4012b0887f | 3880 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V |
whismanoid | 30:13fc9d492ee0 | 3881 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3882 | // call-function |
whismanoid | 27:485b1b2f334c | 3883 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3884 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048010), (uint32_t)0x080003); // 2.048V |
whismanoid | 25:9d4012b0887f | 3885 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048010, /* expect: */ (uint32_t)0x080003); // 2.048V |
whismanoid | 30:13fc9d492ee0 | 3886 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3887 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3888 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3889 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3890 | |
whismanoid | 25:9d4012b0887f | 3891 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048020) expect 0x080005 // 2.048V |
whismanoid | 25:9d4012b0887f | 3892 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3893 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3894 | // docTest_item['action'] = 'DACCodeOfVoltage(2.048020) expect 0x080005' |
whismanoid | 25:9d4012b0887f | 3895 | // docTest_item['remarks'] = '2.048V' |
whismanoid | 25:9d4012b0887f | 3896 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3897 | // docTest_item['arglist'] = '2.048020' |
whismanoid | 25:9d4012b0887f | 3898 | // docTest_item['expect-value'] = '0x080005' |
whismanoid | 25:9d4012b0887f | 3899 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V |
whismanoid | 30:13fc9d492ee0 | 3900 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3901 | // call-function |
whismanoid | 27:485b1b2f334c | 3902 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3903 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048020), (uint32_t)0x080005); // 2.048V |
whismanoid | 25:9d4012b0887f | 3904 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048020, /* expect: */ (uint32_t)0x080005); // 2.048V |
whismanoid | 30:13fc9d492ee0 | 3905 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3906 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3907 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3908 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3909 | |
whismanoid | 25:9d4012b0887f | 3910 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048030) expect 0x080008 // 2.048V |
whismanoid | 25:9d4012b0887f | 3911 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3912 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3913 | // docTest_item['action'] = 'DACCodeOfVoltage(2.048030) expect 0x080008' |
whismanoid | 25:9d4012b0887f | 3914 | // docTest_item['remarks'] = '2.048V' |
whismanoid | 25:9d4012b0887f | 3915 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3916 | // docTest_item['arglist'] = '2.048030' |
whismanoid | 25:9d4012b0887f | 3917 | // docTest_item['expect-value'] = '0x080008' |
whismanoid | 25:9d4012b0887f | 3918 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V |
whismanoid | 30:13fc9d492ee0 | 3919 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3920 | // call-function |
whismanoid | 27:485b1b2f334c | 3921 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3922 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048030), (uint32_t)0x080008); // 2.048V |
whismanoid | 25:9d4012b0887f | 3923 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048030, /* expect: */ (uint32_t)0x080008); // 2.048V |
whismanoid | 30:13fc9d492ee0 | 3924 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3925 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3926 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3927 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3928 | |
whismanoid | 25:9d4012b0887f | 3929 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048040) expect 0x08000a // 2.048V |
whismanoid | 25:9d4012b0887f | 3930 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3931 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3932 | // docTest_item['action'] = 'DACCodeOfVoltage(2.048040) expect 0x08000a' |
whismanoid | 25:9d4012b0887f | 3933 | // docTest_item['remarks'] = '2.048V' |
whismanoid | 25:9d4012b0887f | 3934 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3935 | // docTest_item['arglist'] = '2.048040' |
whismanoid | 25:9d4012b0887f | 3936 | // docTest_item['expect-value'] = '0x08000a' |
whismanoid | 25:9d4012b0887f | 3937 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V |
whismanoid | 30:13fc9d492ee0 | 3938 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3939 | // call-function |
whismanoid | 27:485b1b2f334c | 3940 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3941 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048040), (uint32_t)0x08000a); // 2.048V |
whismanoid | 25:9d4012b0887f | 3942 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048040, /* expect: */ (uint32_t)0x08000a); // 2.048V |
whismanoid | 30:13fc9d492ee0 | 3943 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3944 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3945 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3946 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3947 | |
whismanoid | 25:9d4012b0887f | 3948 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048050) expect 0x08000d // 2.048V |
whismanoid | 25:9d4012b0887f | 3949 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3950 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3951 | // docTest_item['action'] = 'DACCodeOfVoltage(2.048050) expect 0x08000d' |
whismanoid | 25:9d4012b0887f | 3952 | // docTest_item['remarks'] = '2.048V' |
whismanoid | 25:9d4012b0887f | 3953 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3954 | // docTest_item['arglist'] = '2.048050' |
whismanoid | 25:9d4012b0887f | 3955 | // docTest_item['expect-value'] = '0x08000d' |
whismanoid | 25:9d4012b0887f | 3956 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V |
whismanoid | 30:13fc9d492ee0 | 3957 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3958 | // call-function |
whismanoid | 27:485b1b2f334c | 3959 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3960 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048050), (uint32_t)0x08000d); // 2.048V |
whismanoid | 25:9d4012b0887f | 3961 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048050, /* expect: */ (uint32_t)0x08000d); // 2.048V |
whismanoid | 30:13fc9d492ee0 | 3962 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3963 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3964 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3965 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3966 | |
whismanoid | 25:9d4012b0887f | 3967 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048060) expect 0x08000f // 2.048V |
whismanoid | 25:9d4012b0887f | 3968 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3969 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3970 | // docTest_item['action'] = 'DACCodeOfVoltage(2.048060) expect 0x08000f' |
whismanoid | 25:9d4012b0887f | 3971 | // docTest_item['remarks'] = '2.048V' |
whismanoid | 25:9d4012b0887f | 3972 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3973 | // docTest_item['arglist'] = '2.048060' |
whismanoid | 25:9d4012b0887f | 3974 | // docTest_item['expect-value'] = '0x08000f' |
whismanoid | 25:9d4012b0887f | 3975 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V |
whismanoid | 30:13fc9d492ee0 | 3976 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3977 | // call-function |
whismanoid | 27:485b1b2f334c | 3978 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3979 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048060), (uint32_t)0x08000f); // 2.048V |
whismanoid | 25:9d4012b0887f | 3980 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048060, /* expect: */ (uint32_t)0x08000f); // 2.048V |
whismanoid | 30:13fc9d492ee0 | 3981 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 3982 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 3983 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 3984 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 3985 | |
whismanoid | 25:9d4012b0887f | 3986 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048070) expect 0x080012 // 2.048V |
whismanoid | 25:9d4012b0887f | 3987 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 3988 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3989 | // docTest_item['action'] = 'DACCodeOfVoltage(2.048070) expect 0x080012' |
whismanoid | 25:9d4012b0887f | 3990 | // docTest_item['remarks'] = '2.048V' |
whismanoid | 25:9d4012b0887f | 3991 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 3992 | // docTest_item['arglist'] = '2.048070' |
whismanoid | 25:9d4012b0887f | 3993 | // docTest_item['expect-value'] = '0x080012' |
whismanoid | 25:9d4012b0887f | 3994 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V |
whismanoid | 30:13fc9d492ee0 | 3995 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 3996 | // call-function |
whismanoid | 27:485b1b2f334c | 3997 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 3998 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048070), (uint32_t)0x080012); // 2.048V |
whismanoid | 25:9d4012b0887f | 3999 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048070, /* expect: */ (uint32_t)0x080012); // 2.048V |
whismanoid | 30:13fc9d492ee0 | 4000 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4001 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4002 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4003 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4004 | |
whismanoid | 25:9d4012b0887f | 4005 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048080) expect 0x080014 // 2.048V |
whismanoid | 25:9d4012b0887f | 4006 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4007 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4008 | // docTest_item['action'] = 'DACCodeOfVoltage(2.048080) expect 0x080014' |
whismanoid | 25:9d4012b0887f | 4009 | // docTest_item['remarks'] = '2.048V' |
whismanoid | 25:9d4012b0887f | 4010 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4011 | // docTest_item['arglist'] = '2.048080' |
whismanoid | 25:9d4012b0887f | 4012 | // docTest_item['expect-value'] = '0x080014' |
whismanoid | 25:9d4012b0887f | 4013 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V |
whismanoid | 30:13fc9d492ee0 | 4014 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4015 | // call-function |
whismanoid | 27:485b1b2f334c | 4016 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4017 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048080), (uint32_t)0x080014); // 2.048V |
whismanoid | 25:9d4012b0887f | 4018 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048080, /* expect: */ (uint32_t)0x080014); // 2.048V |
whismanoid | 30:13fc9d492ee0 | 4019 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4020 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4021 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4022 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4023 | |
whismanoid | 25:9d4012b0887f | 4024 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048090) expect 0x080017 // 2.048V |
whismanoid | 25:9d4012b0887f | 4025 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4026 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4027 | // docTest_item['action'] = 'DACCodeOfVoltage(2.048090) expect 0x080017' |
whismanoid | 25:9d4012b0887f | 4028 | // docTest_item['remarks'] = '2.048V' |
whismanoid | 25:9d4012b0887f | 4029 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4030 | // docTest_item['arglist'] = '2.048090' |
whismanoid | 25:9d4012b0887f | 4031 | // docTest_item['expect-value'] = '0x080017' |
whismanoid | 25:9d4012b0887f | 4032 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V |
whismanoid | 30:13fc9d492ee0 | 4033 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4034 | // call-function |
whismanoid | 27:485b1b2f334c | 4035 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4036 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048090), (uint32_t)0x080017); // 2.048V |
whismanoid | 25:9d4012b0887f | 4037 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048090, /* expect: */ (uint32_t)0x080017); // 2.048V |
whismanoid | 30:13fc9d492ee0 | 4038 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4039 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4040 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4041 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4042 | |
whismanoid | 25:9d4012b0887f | 4043 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048100) expect 0x08001a // 2.048V |
whismanoid | 25:9d4012b0887f | 4044 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4045 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4046 | // docTest_item['action'] = 'DACCodeOfVoltage(2.048100) expect 0x08001a' |
whismanoid | 25:9d4012b0887f | 4047 | // docTest_item['remarks'] = '2.048V' |
whismanoid | 25:9d4012b0887f | 4048 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4049 | // docTest_item['arglist'] = '2.048100' |
whismanoid | 25:9d4012b0887f | 4050 | // docTest_item['expect-value'] = '0x08001a' |
whismanoid | 25:9d4012b0887f | 4051 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V |
whismanoid | 30:13fc9d492ee0 | 4052 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4053 | // call-function |
whismanoid | 27:485b1b2f334c | 4054 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4055 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048100), (uint32_t)0x08001a); // 2.048V |
whismanoid | 25:9d4012b0887f | 4056 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048100, /* expect: */ (uint32_t)0x08001a); // 2.048V |
whismanoid | 30:13fc9d492ee0 | 4057 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4058 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4059 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4060 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4061 | |
whismanoid | 25:9d4012b0887f | 4062 | // @test group DACCodeOfVoltage tinyTester.print("test_voltage_sweep V = 3.996000V to 4.106000V precision 0.010000V step 0.010000V") |
whismanoid | 25:9d4012b0887f | 4063 | // docTest_item['actionType'] = 'print-string' |
whismanoid | 25:9d4012b0887f | 4064 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4065 | // docTest_item['action'] = 'tinyTester.print("test_voltage_sweep V = 3.996000V to 4.106000V precision 0.010000V step 0.010000V")' |
whismanoid | 25:9d4012b0887f | 4066 | // docTest_item['arglist'] = 'test_voltage_sweep V = 3.996000V to 4.106000V precision 0.010000V step 0.010000V' |
whismanoid | 25:9d4012b0887f | 4067 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None |
whismanoid | 30:13fc9d492ee0 | 4068 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4069 | // print-string |
whismanoid | 25:9d4012b0887f | 4070 | // tinyTesterFuncName = "tinyTester.print" |
whismanoid | 25:9d4012b0887f | 4071 | // tinyTesterPrintStringLiteral = "test_voltage_sweep V = 3.996000V to 4.106000V precision 0.010000V step 0.010000V" |
whismanoid | 25:9d4012b0887f | 4072 | tinyTester.print("test_voltage_sweep V = 3.996000V to 4.106000V precision 0.010000V step 0.010000V"); |
whismanoid | 30:13fc9d492ee0 | 4073 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4074 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4075 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4076 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4077 | |
whismanoid | 25:9d4012b0887f | 4078 | // @test group DACCodeOfVoltage DACCodeOfVoltage(3.990000) expect 0x0f9600 // 3.990V |
whismanoid | 25:9d4012b0887f | 4079 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4080 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4081 | // docTest_item['action'] = 'DACCodeOfVoltage(3.990000) expect 0x0f9600' |
whismanoid | 25:9d4012b0887f | 4082 | // docTest_item['remarks'] = '3.990V' |
whismanoid | 25:9d4012b0887f | 4083 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4084 | // docTest_item['arglist'] = '3.990000' |
whismanoid | 25:9d4012b0887f | 4085 | // docTest_item['expect-value'] = '0x0f9600' |
whismanoid | 25:9d4012b0887f | 4086 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.990V |
whismanoid | 30:13fc9d492ee0 | 4087 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4088 | // call-function |
whismanoid | 27:485b1b2f334c | 4089 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4090 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.990000), (uint32_t)0x0f9600); // 3.990V |
whismanoid | 25:9d4012b0887f | 4091 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.990000, /* expect: */ (uint32_t)0x0f9600); // 3.990V |
whismanoid | 30:13fc9d492ee0 | 4092 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4093 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4094 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4095 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4096 | |
whismanoid | 25:9d4012b0887f | 4097 | // @test group DACCodeOfVoltage DACCodeOfVoltage(4.000000) expect 0x0fa000 // 4.000V |
whismanoid | 25:9d4012b0887f | 4098 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4099 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4100 | // docTest_item['action'] = 'DACCodeOfVoltage(4.000000) expect 0x0fa000' |
whismanoid | 25:9d4012b0887f | 4101 | // docTest_item['remarks'] = '4.000V' |
whismanoid | 25:9d4012b0887f | 4102 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4103 | // docTest_item['arglist'] = '4.000000' |
whismanoid | 25:9d4012b0887f | 4104 | // docTest_item['expect-value'] = '0x0fa000' |
whismanoid | 25:9d4012b0887f | 4105 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.000V |
whismanoid | 30:13fc9d492ee0 | 4106 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4107 | // call-function |
whismanoid | 27:485b1b2f334c | 4108 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4109 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.000000), (uint32_t)0x0fa000); // 4.000V |
whismanoid | 25:9d4012b0887f | 4110 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.000000, /* expect: */ (uint32_t)0x0fa000); // 4.000V |
whismanoid | 30:13fc9d492ee0 | 4111 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4112 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4113 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4114 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4115 | |
whismanoid | 25:9d4012b0887f | 4116 | // @test group DACCodeOfVoltage DACCodeOfVoltage(4.010000) expect 0x0faa00 // 4.010V |
whismanoid | 25:9d4012b0887f | 4117 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4118 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4119 | // docTest_item['action'] = 'DACCodeOfVoltage(4.010000) expect 0x0faa00' |
whismanoid | 25:9d4012b0887f | 4120 | // docTest_item['remarks'] = '4.010V' |
whismanoid | 25:9d4012b0887f | 4121 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4122 | // docTest_item['arglist'] = '4.010000' |
whismanoid | 25:9d4012b0887f | 4123 | // docTest_item['expect-value'] = '0x0faa00' |
whismanoid | 25:9d4012b0887f | 4124 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.010V |
whismanoid | 30:13fc9d492ee0 | 4125 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4126 | // call-function |
whismanoid | 27:485b1b2f334c | 4127 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4128 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.010000), (uint32_t)0x0faa00); // 4.010V |
whismanoid | 25:9d4012b0887f | 4129 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.010000, /* expect: */ (uint32_t)0x0faa00); // 4.010V |
whismanoid | 30:13fc9d492ee0 | 4130 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4131 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4132 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4133 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4134 | |
whismanoid | 25:9d4012b0887f | 4135 | // @test group DACCodeOfVoltage DACCodeOfVoltage(4.020000) expect 0x0fb400 // 4.020V |
whismanoid | 25:9d4012b0887f | 4136 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4137 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4138 | // docTest_item['action'] = 'DACCodeOfVoltage(4.020000) expect 0x0fb400' |
whismanoid | 25:9d4012b0887f | 4139 | // docTest_item['remarks'] = '4.020V' |
whismanoid | 25:9d4012b0887f | 4140 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4141 | // docTest_item['arglist'] = '4.020000' |
whismanoid | 25:9d4012b0887f | 4142 | // docTest_item['expect-value'] = '0x0fb400' |
whismanoid | 25:9d4012b0887f | 4143 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.020V |
whismanoid | 30:13fc9d492ee0 | 4144 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4145 | // call-function |
whismanoid | 27:485b1b2f334c | 4146 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4147 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.020000), (uint32_t)0x0fb400); // 4.020V |
whismanoid | 25:9d4012b0887f | 4148 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.020000, /* expect: */ (uint32_t)0x0fb400); // 4.020V |
whismanoid | 30:13fc9d492ee0 | 4149 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4150 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4151 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4152 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4153 | |
whismanoid | 25:9d4012b0887f | 4154 | // @test group DACCodeOfVoltage DACCodeOfVoltage(4.030000) expect 0x0fbe00 // 4.030V |
whismanoid | 25:9d4012b0887f | 4155 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4156 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4157 | // docTest_item['action'] = 'DACCodeOfVoltage(4.030000) expect 0x0fbe00' |
whismanoid | 25:9d4012b0887f | 4158 | // docTest_item['remarks'] = '4.030V' |
whismanoid | 25:9d4012b0887f | 4159 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4160 | // docTest_item['arglist'] = '4.030000' |
whismanoid | 25:9d4012b0887f | 4161 | // docTest_item['expect-value'] = '0x0fbe00' |
whismanoid | 25:9d4012b0887f | 4162 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.030V |
whismanoid | 30:13fc9d492ee0 | 4163 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4164 | // call-function |
whismanoid | 27:485b1b2f334c | 4165 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4166 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.030000), (uint32_t)0x0fbe00); // 4.030V |
whismanoid | 25:9d4012b0887f | 4167 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.030000, /* expect: */ (uint32_t)0x0fbe00); // 4.030V |
whismanoid | 30:13fc9d492ee0 | 4168 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4169 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4170 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4171 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4172 | |
whismanoid | 25:9d4012b0887f | 4173 | // @test group DACCodeOfVoltage DACCodeOfVoltage(4.040000) expect 0x0fc800 // 4.040V |
whismanoid | 25:9d4012b0887f | 4174 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4175 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4176 | // docTest_item['action'] = 'DACCodeOfVoltage(4.040000) expect 0x0fc800' |
whismanoid | 25:9d4012b0887f | 4177 | // docTest_item['remarks'] = '4.040V' |
whismanoid | 25:9d4012b0887f | 4178 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4179 | // docTest_item['arglist'] = '4.040000' |
whismanoid | 25:9d4012b0887f | 4180 | // docTest_item['expect-value'] = '0x0fc800' |
whismanoid | 25:9d4012b0887f | 4181 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.040V |
whismanoid | 30:13fc9d492ee0 | 4182 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4183 | // call-function |
whismanoid | 27:485b1b2f334c | 4184 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4185 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.040000), (uint32_t)0x0fc800); // 4.040V |
whismanoid | 25:9d4012b0887f | 4186 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.040000, /* expect: */ (uint32_t)0x0fc800); // 4.040V |
whismanoid | 30:13fc9d492ee0 | 4187 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4188 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4189 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4190 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4191 | |
whismanoid | 25:9d4012b0887f | 4192 | // @test group DACCodeOfVoltage DACCodeOfVoltage(4.050000) expect 0x0fd200 // 4.050V |
whismanoid | 25:9d4012b0887f | 4193 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4194 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4195 | // docTest_item['action'] = 'DACCodeOfVoltage(4.050000) expect 0x0fd200' |
whismanoid | 25:9d4012b0887f | 4196 | // docTest_item['remarks'] = '4.050V' |
whismanoid | 25:9d4012b0887f | 4197 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4198 | // docTest_item['arglist'] = '4.050000' |
whismanoid | 25:9d4012b0887f | 4199 | // docTest_item['expect-value'] = '0x0fd200' |
whismanoid | 25:9d4012b0887f | 4200 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.050V |
whismanoid | 30:13fc9d492ee0 | 4201 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4202 | // call-function |
whismanoid | 27:485b1b2f334c | 4203 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4204 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.050000), (uint32_t)0x0fd200); // 4.050V |
whismanoid | 25:9d4012b0887f | 4205 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.050000, /* expect: */ (uint32_t)0x0fd200); // 4.050V |
whismanoid | 30:13fc9d492ee0 | 4206 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4207 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4208 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4209 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4210 | |
whismanoid | 25:9d4012b0887f | 4211 | // @test group DACCodeOfVoltage DACCodeOfVoltage(4.060000) expect 0x0fdc00 // 4.060V |
whismanoid | 25:9d4012b0887f | 4212 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4213 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4214 | // docTest_item['action'] = 'DACCodeOfVoltage(4.060000) expect 0x0fdc00' |
whismanoid | 25:9d4012b0887f | 4215 | // docTest_item['remarks'] = '4.060V' |
whismanoid | 25:9d4012b0887f | 4216 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4217 | // docTest_item['arglist'] = '4.060000' |
whismanoid | 25:9d4012b0887f | 4218 | // docTest_item['expect-value'] = '0x0fdc00' |
whismanoid | 25:9d4012b0887f | 4219 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.060V |
whismanoid | 30:13fc9d492ee0 | 4220 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4221 | // call-function |
whismanoid | 27:485b1b2f334c | 4222 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4223 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.060000), (uint32_t)0x0fdc00); // 4.060V |
whismanoid | 25:9d4012b0887f | 4224 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.060000, /* expect: */ (uint32_t)0x0fdc00); // 4.060V |
whismanoid | 30:13fc9d492ee0 | 4225 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4226 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4227 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4228 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4229 | |
whismanoid | 25:9d4012b0887f | 4230 | // @test group DACCodeOfVoltage DACCodeOfVoltage(4.070000) expect 0x0fe600 // 4.070V |
whismanoid | 25:9d4012b0887f | 4231 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4232 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4233 | // docTest_item['action'] = 'DACCodeOfVoltage(4.070000) expect 0x0fe600' |
whismanoid | 25:9d4012b0887f | 4234 | // docTest_item['remarks'] = '4.070V' |
whismanoid | 25:9d4012b0887f | 4235 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4236 | // docTest_item['arglist'] = '4.070000' |
whismanoid | 25:9d4012b0887f | 4237 | // docTest_item['expect-value'] = '0x0fe600' |
whismanoid | 25:9d4012b0887f | 4238 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.070V |
whismanoid | 30:13fc9d492ee0 | 4239 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4240 | // call-function |
whismanoid | 27:485b1b2f334c | 4241 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4242 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.070000), (uint32_t)0x0fe600); // 4.070V |
whismanoid | 25:9d4012b0887f | 4243 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.070000, /* expect: */ (uint32_t)0x0fe600); // 4.070V |
whismanoid | 30:13fc9d492ee0 | 4244 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4245 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4246 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4247 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4248 | |
whismanoid | 25:9d4012b0887f | 4249 | // @test group DACCodeOfVoltage DACCodeOfVoltage(4.080000) expect 0x0ff000 // 4.080V |
whismanoid | 25:9d4012b0887f | 4250 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4251 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4252 | // docTest_item['action'] = 'DACCodeOfVoltage(4.080000) expect 0x0ff000' |
whismanoid | 25:9d4012b0887f | 4253 | // docTest_item['remarks'] = '4.080V' |
whismanoid | 25:9d4012b0887f | 4254 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4255 | // docTest_item['arglist'] = '4.080000' |
whismanoid | 25:9d4012b0887f | 4256 | // docTest_item['expect-value'] = '0x0ff000' |
whismanoid | 25:9d4012b0887f | 4257 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.080V |
whismanoid | 30:13fc9d492ee0 | 4258 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4259 | // call-function |
whismanoid | 27:485b1b2f334c | 4260 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4261 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.080000), (uint32_t)0x0ff000); // 4.080V |
whismanoid | 25:9d4012b0887f | 4262 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.080000, /* expect: */ (uint32_t)0x0ff000); // 4.080V |
whismanoid | 30:13fc9d492ee0 | 4263 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4264 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4265 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4266 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4267 | |
whismanoid | 25:9d4012b0887f | 4268 | // @test group DACCodeOfVoltage DACCodeOfVoltage(4.090000) expect 0x0ffa00 // 4.090V |
whismanoid | 25:9d4012b0887f | 4269 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4270 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4271 | // docTest_item['action'] = 'DACCodeOfVoltage(4.090000) expect 0x0ffa00' |
whismanoid | 25:9d4012b0887f | 4272 | // docTest_item['remarks'] = '4.090V' |
whismanoid | 25:9d4012b0887f | 4273 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4274 | // docTest_item['arglist'] = '4.090000' |
whismanoid | 25:9d4012b0887f | 4275 | // docTest_item['expect-value'] = '0x0ffa00' |
whismanoid | 25:9d4012b0887f | 4276 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.090V |
whismanoid | 30:13fc9d492ee0 | 4277 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4278 | // call-function |
whismanoid | 27:485b1b2f334c | 4279 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4280 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.090000), (uint32_t)0x0ffa00); // 4.090V |
whismanoid | 25:9d4012b0887f | 4281 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.090000, /* expect: */ (uint32_t)0x0ffa00); // 4.090V |
whismanoid | 30:13fc9d492ee0 | 4282 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4283 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4284 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4285 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4286 | |
whismanoid | 25:9d4012b0887f | 4287 | // @test group DACCodeOfVoltage DACCodeOfVoltage(4.100000) expect 0x0fffff // 4.100V |
whismanoid | 25:9d4012b0887f | 4288 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4289 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4290 | // docTest_item['action'] = 'DACCodeOfVoltage(4.100000) expect 0x0fffff' |
whismanoid | 25:9d4012b0887f | 4291 | // docTest_item['remarks'] = '4.100V' |
whismanoid | 25:9d4012b0887f | 4292 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4293 | // docTest_item['arglist'] = '4.100000' |
whismanoid | 25:9d4012b0887f | 4294 | // docTest_item['expect-value'] = '0x0fffff' |
whismanoid | 25:9d4012b0887f | 4295 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.100V |
whismanoid | 30:13fc9d492ee0 | 4296 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4297 | // call-function |
whismanoid | 27:485b1b2f334c | 4298 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4299 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.100000), (uint32_t)0x0fffff); // 4.100V |
whismanoid | 25:9d4012b0887f | 4300 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.100000, /* expect: */ (uint32_t)0x0fffff); // 4.100V |
whismanoid | 30:13fc9d492ee0 | 4301 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4302 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4303 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4304 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4305 | |
whismanoid | 25:9d4012b0887f | 4306 | // @test group DACCodeOfVoltage tinyTester.print("test_lsb_sweep V = 4.096000V LSBradius = 3LSB") |
whismanoid | 25:9d4012b0887f | 4307 | // docTest_item['actionType'] = 'print-string' |
whismanoid | 25:9d4012b0887f | 4308 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4309 | // docTest_item['action'] = 'tinyTester.print("test_lsb_sweep V = 4.096000V LSBradius = 3LSB")' |
whismanoid | 25:9d4012b0887f | 4310 | // docTest_item['arglist'] = 'test_lsb_sweep V = 4.096000V LSBradius = 3LSB' |
whismanoid | 25:9d4012b0887f | 4311 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None |
whismanoid | 30:13fc9d492ee0 | 4312 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4313 | // print-string |
whismanoid | 25:9d4012b0887f | 4314 | // tinyTesterFuncName = "tinyTester.print" |
whismanoid | 25:9d4012b0887f | 4315 | // tinyTesterPrintStringLiteral = "test_lsb_sweep V = 4.096000V LSBradius = 3LSB" |
whismanoid | 25:9d4012b0887f | 4316 | tinyTester.print("test_lsb_sweep V = 4.096000V LSBradius = 3LSB"); |
whismanoid | 30:13fc9d492ee0 | 4317 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4318 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4319 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4320 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4321 | |
whismanoid | 25:9d4012b0887f | 4322 | // @test group DACCodeOfVoltage DACCodeOfVoltage(4.095988) expect 0x0ffffd // 4.096V + -3.0LSB |
whismanoid | 25:9d4012b0887f | 4323 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4324 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4325 | // docTest_item['action'] = 'DACCodeOfVoltage(4.095988) expect 0x0ffffd' |
whismanoid | 25:9d4012b0887f | 4326 | // docTest_item['remarks'] = '4.096V + -3.0LSB' |
whismanoid | 25:9d4012b0887f | 4327 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4328 | // docTest_item['arglist'] = '4.095988' |
whismanoid | 25:9d4012b0887f | 4329 | // docTest_item['expect-value'] = '0x0ffffd' |
whismanoid | 25:9d4012b0887f | 4330 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + -3.0LSB |
whismanoid | 30:13fc9d492ee0 | 4331 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4332 | // call-function |
whismanoid | 27:485b1b2f334c | 4333 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4334 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.095988), (uint32_t)0x0ffffd); // 4.096V + -3.0LSB |
whismanoid | 25:9d4012b0887f | 4335 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.095988, /* expect: */ (uint32_t)0x0ffffd); // 4.096V + -3.0LSB |
whismanoid | 30:13fc9d492ee0 | 4336 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4337 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4338 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4339 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4340 | |
whismanoid | 25:9d4012b0887f | 4341 | // @test group DACCodeOfVoltage DACCodeOfVoltage(4.095990) expect 0x0ffffd // 4.096V + -2.5LSB 0x0ffffd not 0x0ffffe |
whismanoid | 25:9d4012b0887f | 4342 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4343 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4344 | // docTest_item['action'] = 'DACCodeOfVoltage(4.095990) expect 0x0ffffd' |
whismanoid | 25:9d4012b0887f | 4345 | // docTest_item['remarks'] = '4.096V + -2.5LSB 0x0ffffd not 0x0ffffe' |
whismanoid | 25:9d4012b0887f | 4346 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4347 | // docTest_item['arglist'] = '4.095990' |
whismanoid | 25:9d4012b0887f | 4348 | // docTest_item['expect-value'] = '0x0ffffd' |
whismanoid | 25:9d4012b0887f | 4349 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + -2.5LSB 0x0ffffd not 0x0ffffe |
whismanoid | 30:13fc9d492ee0 | 4350 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4351 | // call-function |
whismanoid | 27:485b1b2f334c | 4352 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4353 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.095990), (uint32_t)0x0ffffd); // 4.096V + -2.5LSB 0x0ffffd not 0x0ffffe |
whismanoid | 25:9d4012b0887f | 4354 | 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 | 4355 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4356 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4357 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4358 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4359 | |
whismanoid | 25:9d4012b0887f | 4360 | // @test group DACCodeOfVoltage DACCodeOfVoltage(4.095992) expect 0x0ffffe // 4.096V + -2.0LSB |
whismanoid | 25:9d4012b0887f | 4361 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4362 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4363 | // docTest_item['action'] = 'DACCodeOfVoltage(4.095992) expect 0x0ffffe' |
whismanoid | 25:9d4012b0887f | 4364 | // docTest_item['remarks'] = '4.096V + -2.0LSB' |
whismanoid | 25:9d4012b0887f | 4365 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4366 | // docTest_item['arglist'] = '4.095992' |
whismanoid | 25:9d4012b0887f | 4367 | // docTest_item['expect-value'] = '0x0ffffe' |
whismanoid | 25:9d4012b0887f | 4368 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + -2.0LSB |
whismanoid | 30:13fc9d492ee0 | 4369 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4370 | // call-function |
whismanoid | 27:485b1b2f334c | 4371 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4372 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.095992), (uint32_t)0x0ffffe); // 4.096V + -2.0LSB |
whismanoid | 25:9d4012b0887f | 4373 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.095992, /* expect: */ (uint32_t)0x0ffffe); // 4.096V + -2.0LSB |
whismanoid | 30:13fc9d492ee0 | 4374 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4375 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4376 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4377 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4378 | |
whismanoid | 25:9d4012b0887f | 4379 | // @test group DACCodeOfVoltage DACCodeOfVoltage(4.095994) expect 0x0ffffe // 4.096V + -1.5LSB |
whismanoid | 25:9d4012b0887f | 4380 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4381 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4382 | // docTest_item['action'] = 'DACCodeOfVoltage(4.095994) expect 0x0ffffe' |
whismanoid | 25:9d4012b0887f | 4383 | // docTest_item['remarks'] = '4.096V + -1.5LSB' |
whismanoid | 25:9d4012b0887f | 4384 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4385 | // docTest_item['arglist'] = '4.095994' |
whismanoid | 25:9d4012b0887f | 4386 | // docTest_item['expect-value'] = '0x0ffffe' |
whismanoid | 25:9d4012b0887f | 4387 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + -1.5LSB |
whismanoid | 30:13fc9d492ee0 | 4388 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4389 | // call-function |
whismanoid | 27:485b1b2f334c | 4390 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4391 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.095994), (uint32_t)0x0ffffe); // 4.096V + -1.5LSB |
whismanoid | 25:9d4012b0887f | 4392 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.095994, /* expect: */ (uint32_t)0x0ffffe); // 4.096V + -1.5LSB |
whismanoid | 30:13fc9d492ee0 | 4393 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4394 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4395 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4396 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4397 | |
whismanoid | 25:9d4012b0887f | 4398 | // @test group DACCodeOfVoltage DACCodeOfVoltage(4.095996) expect 0x0fffff // 4.096V + -1.0LSB |
whismanoid | 25:9d4012b0887f | 4399 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4400 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4401 | // docTest_item['action'] = 'DACCodeOfVoltage(4.095996) expect 0x0fffff' |
whismanoid | 25:9d4012b0887f | 4402 | // docTest_item['remarks'] = '4.096V + -1.0LSB' |
whismanoid | 25:9d4012b0887f | 4403 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4404 | // docTest_item['arglist'] = '4.095996' |
whismanoid | 25:9d4012b0887f | 4405 | // docTest_item['expect-value'] = '0x0fffff' |
whismanoid | 25:9d4012b0887f | 4406 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + -1.0LSB |
whismanoid | 30:13fc9d492ee0 | 4407 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4408 | // call-function |
whismanoid | 27:485b1b2f334c | 4409 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4410 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.095996), (uint32_t)0x0fffff); // 4.096V + -1.0LSB |
whismanoid | 25:9d4012b0887f | 4411 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.095996, /* expect: */ (uint32_t)0x0fffff); // 4.096V + -1.0LSB |
whismanoid | 30:13fc9d492ee0 | 4412 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4413 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4414 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4415 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4416 | |
whismanoid | 25:9d4012b0887f | 4417 | // @test group DACCodeOfVoltage DACCodeOfVoltage(4.095998) expect 0x0fffff // 4.096V + -0.5LSB |
whismanoid | 25:9d4012b0887f | 4418 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4419 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4420 | // docTest_item['action'] = 'DACCodeOfVoltage(4.095998) expect 0x0fffff' |
whismanoid | 25:9d4012b0887f | 4421 | // docTest_item['remarks'] = '4.096V + -0.5LSB' |
whismanoid | 25:9d4012b0887f | 4422 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4423 | // docTest_item['arglist'] = '4.095998' |
whismanoid | 25:9d4012b0887f | 4424 | // docTest_item['expect-value'] = '0x0fffff' |
whismanoid | 25:9d4012b0887f | 4425 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + -0.5LSB |
whismanoid | 30:13fc9d492ee0 | 4426 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4427 | // call-function |
whismanoid | 27:485b1b2f334c | 4428 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4429 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.095998), (uint32_t)0x0fffff); // 4.096V + -0.5LSB |
whismanoid | 25:9d4012b0887f | 4430 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.095998, /* expect: */ (uint32_t)0x0fffff); // 4.096V + -0.5LSB |
whismanoid | 30:13fc9d492ee0 | 4431 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4432 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4433 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4434 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4435 | |
whismanoid | 25:9d4012b0887f | 4436 | // @test group DACCodeOfVoltage DACCodeOfVoltage(4.096000) expect 0x0fffff // 4.096V + 0.0LSB |
whismanoid | 25:9d4012b0887f | 4437 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4438 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4439 | // docTest_item['action'] = 'DACCodeOfVoltage(4.096000) expect 0x0fffff' |
whismanoid | 25:9d4012b0887f | 4440 | // docTest_item['remarks'] = '4.096V + 0.0LSB' |
whismanoid | 25:9d4012b0887f | 4441 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4442 | // docTest_item['arglist'] = '4.096000' |
whismanoid | 25:9d4012b0887f | 4443 | // docTest_item['expect-value'] = '0x0fffff' |
whismanoid | 25:9d4012b0887f | 4444 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + 0.0LSB |
whismanoid | 30:13fc9d492ee0 | 4445 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4446 | // call-function |
whismanoid | 27:485b1b2f334c | 4447 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4448 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.096000), (uint32_t)0x0fffff); // 4.096V + 0.0LSB |
whismanoid | 25:9d4012b0887f | 4449 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.096000, /* expect: */ (uint32_t)0x0fffff); // 4.096V + 0.0LSB |
whismanoid | 30:13fc9d492ee0 | 4450 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4451 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4452 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4453 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4454 | |
whismanoid | 25:9d4012b0887f | 4455 | // @test group DACCodeOfVoltage DACCodeOfVoltage(4.096002) expect 0x0fffff // 4.096V + 0.5LSB |
whismanoid | 25:9d4012b0887f | 4456 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4457 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4458 | // docTest_item['action'] = 'DACCodeOfVoltage(4.096002) expect 0x0fffff' |
whismanoid | 25:9d4012b0887f | 4459 | // docTest_item['remarks'] = '4.096V + 0.5LSB' |
whismanoid | 25:9d4012b0887f | 4460 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4461 | // docTest_item['arglist'] = '4.096002' |
whismanoid | 25:9d4012b0887f | 4462 | // docTest_item['expect-value'] = '0x0fffff' |
whismanoid | 25:9d4012b0887f | 4463 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + 0.5LSB |
whismanoid | 30:13fc9d492ee0 | 4464 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4465 | // call-function |
whismanoid | 27:485b1b2f334c | 4466 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4467 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.096002), (uint32_t)0x0fffff); // 4.096V + 0.5LSB |
whismanoid | 25:9d4012b0887f | 4468 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.096002, /* expect: */ (uint32_t)0x0fffff); // 4.096V + 0.5LSB |
whismanoid | 30:13fc9d492ee0 | 4469 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4470 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4471 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4472 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4473 | |
whismanoid | 25:9d4012b0887f | 4474 | // @test group DACCodeOfVoltage DACCodeOfVoltage(4.096004) expect 0x0fffff // 4.096V + 1.0LSB |
whismanoid | 25:9d4012b0887f | 4475 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4476 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4477 | // docTest_item['action'] = 'DACCodeOfVoltage(4.096004) expect 0x0fffff' |
whismanoid | 25:9d4012b0887f | 4478 | // docTest_item['remarks'] = '4.096V + 1.0LSB' |
whismanoid | 25:9d4012b0887f | 4479 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4480 | // docTest_item['arglist'] = '4.096004' |
whismanoid | 25:9d4012b0887f | 4481 | // docTest_item['expect-value'] = '0x0fffff' |
whismanoid | 25:9d4012b0887f | 4482 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + 1.0LSB |
whismanoid | 30:13fc9d492ee0 | 4483 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4484 | // call-function |
whismanoid | 27:485b1b2f334c | 4485 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4486 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.096004), (uint32_t)0x0fffff); // 4.096V + 1.0LSB |
whismanoid | 25:9d4012b0887f | 4487 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.096004, /* expect: */ (uint32_t)0x0fffff); // 4.096V + 1.0LSB |
whismanoid | 30:13fc9d492ee0 | 4488 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4489 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4490 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4491 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4492 | |
whismanoid | 25:9d4012b0887f | 4493 | // @test group DACCodeOfVoltage DACCodeOfVoltage(4.096006) expect 0x0fffff // 4.096V + 1.5LSB |
whismanoid | 25:9d4012b0887f | 4494 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4495 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4496 | // docTest_item['action'] = 'DACCodeOfVoltage(4.096006) expect 0x0fffff' |
whismanoid | 25:9d4012b0887f | 4497 | // docTest_item['remarks'] = '4.096V + 1.5LSB' |
whismanoid | 25:9d4012b0887f | 4498 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4499 | // docTest_item['arglist'] = '4.096006' |
whismanoid | 25:9d4012b0887f | 4500 | // docTest_item['expect-value'] = '0x0fffff' |
whismanoid | 25:9d4012b0887f | 4501 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + 1.5LSB |
whismanoid | 30:13fc9d492ee0 | 4502 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4503 | // call-function |
whismanoid | 27:485b1b2f334c | 4504 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4505 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.096006), (uint32_t)0x0fffff); // 4.096V + 1.5LSB |
whismanoid | 25:9d4012b0887f | 4506 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.096006, /* expect: */ (uint32_t)0x0fffff); // 4.096V + 1.5LSB |
whismanoid | 30:13fc9d492ee0 | 4507 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4508 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4509 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4510 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4511 | |
whismanoid | 25:9d4012b0887f | 4512 | // @test group DACCodeOfVoltage DACCodeOfVoltage(4.096008) expect 0x0fffff // 4.096V + 2.0LSB |
whismanoid | 25:9d4012b0887f | 4513 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4514 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4515 | // docTest_item['action'] = 'DACCodeOfVoltage(4.096008) expect 0x0fffff' |
whismanoid | 25:9d4012b0887f | 4516 | // docTest_item['remarks'] = '4.096V + 2.0LSB' |
whismanoid | 25:9d4012b0887f | 4517 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4518 | // docTest_item['arglist'] = '4.096008' |
whismanoid | 25:9d4012b0887f | 4519 | // docTest_item['expect-value'] = '0x0fffff' |
whismanoid | 25:9d4012b0887f | 4520 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + 2.0LSB |
whismanoid | 30:13fc9d492ee0 | 4521 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4522 | // call-function |
whismanoid | 27:485b1b2f334c | 4523 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4524 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.096008), (uint32_t)0x0fffff); // 4.096V + 2.0LSB |
whismanoid | 25:9d4012b0887f | 4525 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.096008, /* expect: */ (uint32_t)0x0fffff); // 4.096V + 2.0LSB |
whismanoid | 30:13fc9d492ee0 | 4526 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4527 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4528 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4529 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4530 | |
whismanoid | 25:9d4012b0887f | 4531 | // @test group DACCodeOfVoltage DACCodeOfVoltage(4.096010) expect 0x0fffff // 4.096V + 2.5LSB |
whismanoid | 25:9d4012b0887f | 4532 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4533 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4534 | // docTest_item['action'] = 'DACCodeOfVoltage(4.096010) expect 0x0fffff' |
whismanoid | 25:9d4012b0887f | 4535 | // docTest_item['remarks'] = '4.096V + 2.5LSB' |
whismanoid | 25:9d4012b0887f | 4536 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4537 | // docTest_item['arglist'] = '4.096010' |
whismanoid | 25:9d4012b0887f | 4538 | // docTest_item['expect-value'] = '0x0fffff' |
whismanoid | 25:9d4012b0887f | 4539 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + 2.5LSB |
whismanoid | 30:13fc9d492ee0 | 4540 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4541 | // call-function |
whismanoid | 27:485b1b2f334c | 4542 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4543 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.096010), (uint32_t)0x0fffff); // 4.096V + 2.5LSB |
whismanoid | 25:9d4012b0887f | 4544 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.096010, /* expect: */ (uint32_t)0x0fffff); // 4.096V + 2.5LSB |
whismanoid | 30:13fc9d492ee0 | 4545 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4546 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4547 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4548 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4549 | |
whismanoid | 25:9d4012b0887f | 4550 | // @test group DACCodeOfVoltage DACCodeOfVoltage(4.096012) expect 0x0fffff // 4.096V + 3.0LSB |
whismanoid | 25:9d4012b0887f | 4551 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4552 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4553 | // docTest_item['action'] = 'DACCodeOfVoltage(4.096012) expect 0x0fffff' |
whismanoid | 25:9d4012b0887f | 4554 | // docTest_item['remarks'] = '4.096V + 3.0LSB' |
whismanoid | 25:9d4012b0887f | 4555 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4556 | // docTest_item['arglist'] = '4.096012' |
whismanoid | 25:9d4012b0887f | 4557 | // docTest_item['expect-value'] = '0x0fffff' |
whismanoid | 25:9d4012b0887f | 4558 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 4.096V + 3.0LSB |
whismanoid | 30:13fc9d492ee0 | 4559 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4560 | // call-function |
whismanoid | 27:485b1b2f334c | 4561 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4562 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)4.096012), (uint32_t)0x0fffff); // 4.096V + 3.0LSB |
whismanoid | 25:9d4012b0887f | 4563 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)4.096012, /* expect: */ (uint32_t)0x0fffff); // 4.096V + 3.0LSB |
whismanoid | 30:13fc9d492ee0 | 4564 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4565 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4566 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4567 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4568 | |
whismanoid | 25:9d4012b0887f | 4569 | // @test group DACCodeOfVoltage tinyTester.print("test_lsb_sweep V = 3.072000V LSBradius = 3LSB") |
whismanoid | 25:9d4012b0887f | 4570 | // docTest_item['actionType'] = 'print-string' |
whismanoid | 25:9d4012b0887f | 4571 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4572 | // docTest_item['action'] = 'tinyTester.print("test_lsb_sweep V = 3.072000V LSBradius = 3LSB")' |
whismanoid | 25:9d4012b0887f | 4573 | // docTest_item['arglist'] = 'test_lsb_sweep V = 3.072000V LSBradius = 3LSB' |
whismanoid | 25:9d4012b0887f | 4574 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None |
whismanoid | 30:13fc9d492ee0 | 4575 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4576 | // print-string |
whismanoid | 25:9d4012b0887f | 4577 | // tinyTesterFuncName = "tinyTester.print" |
whismanoid | 25:9d4012b0887f | 4578 | // tinyTesterPrintStringLiteral = "test_lsb_sweep V = 3.072000V LSBradius = 3LSB" |
whismanoid | 25:9d4012b0887f | 4579 | tinyTester.print("test_lsb_sweep V = 3.072000V LSBradius = 3LSB"); |
whismanoid | 30:13fc9d492ee0 | 4580 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4581 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4582 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4583 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4584 | |
whismanoid | 25:9d4012b0887f | 4585 | // @test group DACCodeOfVoltage DACCodeOfVoltage(3.071988) expect 0x0bfffd // 3.072V + -3.0LSB |
whismanoid | 25:9d4012b0887f | 4586 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4587 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4588 | // docTest_item['action'] = 'DACCodeOfVoltage(3.071988) expect 0x0bfffd' |
whismanoid | 25:9d4012b0887f | 4589 | // docTest_item['remarks'] = '3.072V + -3.0LSB' |
whismanoid | 25:9d4012b0887f | 4590 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4591 | // docTest_item['arglist'] = '3.071988' |
whismanoid | 25:9d4012b0887f | 4592 | // docTest_item['expect-value'] = '0x0bfffd' |
whismanoid | 25:9d4012b0887f | 4593 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + -3.0LSB |
whismanoid | 30:13fc9d492ee0 | 4594 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4595 | // call-function |
whismanoid | 27:485b1b2f334c | 4596 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4597 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.071988), (uint32_t)0x0bfffd); // 3.072V + -3.0LSB |
whismanoid | 25:9d4012b0887f | 4598 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.071988, /* expect: */ (uint32_t)0x0bfffd); // 3.072V + -3.0LSB |
whismanoid | 30:13fc9d492ee0 | 4599 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4600 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4601 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4602 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4603 | |
whismanoid | 25:9d4012b0887f | 4604 | // @test group DACCodeOfVoltage DACCodeOfVoltage(3.071990) expect 0x0bfffd // 3.072V + -2.5LSB 0x0bfffd not 0x0bfffe |
whismanoid | 25:9d4012b0887f | 4605 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4606 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4607 | // docTest_item['action'] = 'DACCodeOfVoltage(3.071990) expect 0x0bfffd' |
whismanoid | 25:9d4012b0887f | 4608 | // docTest_item['remarks'] = '3.072V + -2.5LSB 0x0bfffd not 0x0bfffe' |
whismanoid | 25:9d4012b0887f | 4609 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4610 | // docTest_item['arglist'] = '3.071990' |
whismanoid | 25:9d4012b0887f | 4611 | // docTest_item['expect-value'] = '0x0bfffd' |
whismanoid | 25:9d4012b0887f | 4612 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + -2.5LSB 0x0bfffd not 0x0bfffe |
whismanoid | 30:13fc9d492ee0 | 4613 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4614 | // call-function |
whismanoid | 27:485b1b2f334c | 4615 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4616 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.071990), (uint32_t)0x0bfffd); // 3.072V + -2.5LSB 0x0bfffd not 0x0bfffe |
whismanoid | 25:9d4012b0887f | 4617 | 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 | 4618 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4619 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4620 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4621 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4622 | |
whismanoid | 25:9d4012b0887f | 4623 | // @test group DACCodeOfVoltage DACCodeOfVoltage(3.071992) expect 0x0bfffe // 3.072V + -2.0LSB |
whismanoid | 25:9d4012b0887f | 4624 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4625 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4626 | // docTest_item['action'] = 'DACCodeOfVoltage(3.071992) expect 0x0bfffe' |
whismanoid | 25:9d4012b0887f | 4627 | // docTest_item['remarks'] = '3.072V + -2.0LSB' |
whismanoid | 25:9d4012b0887f | 4628 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4629 | // docTest_item['arglist'] = '3.071992' |
whismanoid | 25:9d4012b0887f | 4630 | // docTest_item['expect-value'] = '0x0bfffe' |
whismanoid | 25:9d4012b0887f | 4631 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + -2.0LSB |
whismanoid | 30:13fc9d492ee0 | 4632 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4633 | // call-function |
whismanoid | 27:485b1b2f334c | 4634 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4635 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.071992), (uint32_t)0x0bfffe); // 3.072V + -2.0LSB |
whismanoid | 25:9d4012b0887f | 4636 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.071992, /* expect: */ (uint32_t)0x0bfffe); // 3.072V + -2.0LSB |
whismanoid | 30:13fc9d492ee0 | 4637 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4638 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4639 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4640 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4641 | |
whismanoid | 25:9d4012b0887f | 4642 | // @test group DACCodeOfVoltage DACCodeOfVoltage(3.071994) expect 0x0bfffe // 3.072V + -1.5LSB 0x0bfffe not 0x0bffff |
whismanoid | 25:9d4012b0887f | 4643 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4644 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4645 | // docTest_item['action'] = 'DACCodeOfVoltage(3.071994) expect 0x0bfffe' |
whismanoid | 25:9d4012b0887f | 4646 | // docTest_item['remarks'] = '3.072V + -1.5LSB 0x0bfffe not 0x0bffff' |
whismanoid | 25:9d4012b0887f | 4647 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4648 | // docTest_item['arglist'] = '3.071994' |
whismanoid | 25:9d4012b0887f | 4649 | // docTest_item['expect-value'] = '0x0bfffe' |
whismanoid | 25:9d4012b0887f | 4650 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + -1.5LSB 0x0bfffe not 0x0bffff |
whismanoid | 30:13fc9d492ee0 | 4651 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4652 | // call-function |
whismanoid | 27:485b1b2f334c | 4653 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4654 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.071994), (uint32_t)0x0bfffe); // 3.072V + -1.5LSB 0x0bfffe not 0x0bffff |
whismanoid | 25:9d4012b0887f | 4655 | 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 | 4656 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4657 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4658 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4659 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4660 | |
whismanoid | 25:9d4012b0887f | 4661 | // @test group DACCodeOfVoltage DACCodeOfVoltage(3.071996) expect 0x0bffff // 3.072V + -1.0LSB |
whismanoid | 25:9d4012b0887f | 4662 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4663 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4664 | // docTest_item['action'] = 'DACCodeOfVoltage(3.071996) expect 0x0bffff' |
whismanoid | 25:9d4012b0887f | 4665 | // docTest_item['remarks'] = '3.072V + -1.0LSB' |
whismanoid | 25:9d4012b0887f | 4666 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4667 | // docTest_item['arglist'] = '3.071996' |
whismanoid | 25:9d4012b0887f | 4668 | // docTest_item['expect-value'] = '0x0bffff' |
whismanoid | 25:9d4012b0887f | 4669 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + -1.0LSB |
whismanoid | 30:13fc9d492ee0 | 4670 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4671 | // call-function |
whismanoid | 27:485b1b2f334c | 4672 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4673 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.071996), (uint32_t)0x0bffff); // 3.072V + -1.0LSB |
whismanoid | 25:9d4012b0887f | 4674 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.071996, /* expect: */ (uint32_t)0x0bffff); // 3.072V + -1.0LSB |
whismanoid | 30:13fc9d492ee0 | 4675 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4676 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4677 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4678 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4679 | |
whismanoid | 25:9d4012b0887f | 4680 | // @test group DACCodeOfVoltage DACCodeOfVoltage(3.071998) expect 0x0bffff // 3.072V + -0.5LSB 0x0bffff not 0x0c0000 |
whismanoid | 25:9d4012b0887f | 4681 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4682 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4683 | // docTest_item['action'] = 'DACCodeOfVoltage(3.071998) expect 0x0bffff' |
whismanoid | 25:9d4012b0887f | 4684 | // docTest_item['remarks'] = '3.072V + -0.5LSB 0x0bffff not 0x0c0000' |
whismanoid | 25:9d4012b0887f | 4685 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4686 | // docTest_item['arglist'] = '3.071998' |
whismanoid | 25:9d4012b0887f | 4687 | // docTest_item['expect-value'] = '0x0bffff' |
whismanoid | 25:9d4012b0887f | 4688 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + -0.5LSB 0x0bffff not 0x0c0000 |
whismanoid | 30:13fc9d492ee0 | 4689 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4690 | // call-function |
whismanoid | 27:485b1b2f334c | 4691 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4692 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.071998), (uint32_t)0x0bffff); // 3.072V + -0.5LSB 0x0bffff not 0x0c0000 |
whismanoid | 25:9d4012b0887f | 4693 | 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 | 4694 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4695 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4696 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4697 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4698 | |
whismanoid | 25:9d4012b0887f | 4699 | // @test group DACCodeOfVoltage DACCodeOfVoltage(3.072000) expect 0x0c0000 // 3.072V + 0.0LSB |
whismanoid | 25:9d4012b0887f | 4700 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4701 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4702 | // docTest_item['action'] = 'DACCodeOfVoltage(3.072000) expect 0x0c0000' |
whismanoid | 25:9d4012b0887f | 4703 | // docTest_item['remarks'] = '3.072V + 0.0LSB' |
whismanoid | 25:9d4012b0887f | 4704 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4705 | // docTest_item['arglist'] = '3.072000' |
whismanoid | 25:9d4012b0887f | 4706 | // docTest_item['expect-value'] = '0x0c0000' |
whismanoid | 25:9d4012b0887f | 4707 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + 0.0LSB |
whismanoid | 30:13fc9d492ee0 | 4708 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4709 | // call-function |
whismanoid | 27:485b1b2f334c | 4710 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4711 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.072000), (uint32_t)0x0c0000); // 3.072V + 0.0LSB |
whismanoid | 25:9d4012b0887f | 4712 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.072000, /* expect: */ (uint32_t)0x0c0000); // 3.072V + 0.0LSB |
whismanoid | 30:13fc9d492ee0 | 4713 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4714 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4715 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4716 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4717 | |
whismanoid | 25:9d4012b0887f | 4718 | // @test group DACCodeOfVoltage DACCodeOfVoltage(3.072002) expect 0x0c0001 // 3.072V + 0.5LSB |
whismanoid | 25:9d4012b0887f | 4719 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4720 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4721 | // docTest_item['action'] = 'DACCodeOfVoltage(3.072002) expect 0x0c0001' |
whismanoid | 25:9d4012b0887f | 4722 | // docTest_item['remarks'] = '3.072V + 0.5LSB' |
whismanoid | 25:9d4012b0887f | 4723 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4724 | // docTest_item['arglist'] = '3.072002' |
whismanoid | 25:9d4012b0887f | 4725 | // docTest_item['expect-value'] = '0x0c0001' |
whismanoid | 25:9d4012b0887f | 4726 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + 0.5LSB |
whismanoid | 30:13fc9d492ee0 | 4727 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4728 | // call-function |
whismanoid | 27:485b1b2f334c | 4729 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4730 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.072002), (uint32_t)0x0c0001); // 3.072V + 0.5LSB |
whismanoid | 25:9d4012b0887f | 4731 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.072002, /* expect: */ (uint32_t)0x0c0001); // 3.072V + 0.5LSB |
whismanoid | 30:13fc9d492ee0 | 4732 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4733 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4734 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4735 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4736 | |
whismanoid | 25:9d4012b0887f | 4737 | // @test group DACCodeOfVoltage DACCodeOfVoltage(3.072004) expect 0x0c0001 // 3.072V + 1.0LSB |
whismanoid | 25:9d4012b0887f | 4738 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4739 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4740 | // docTest_item['action'] = 'DACCodeOfVoltage(3.072004) expect 0x0c0001' |
whismanoid | 25:9d4012b0887f | 4741 | // docTest_item['remarks'] = '3.072V + 1.0LSB' |
whismanoid | 25:9d4012b0887f | 4742 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4743 | // docTest_item['arglist'] = '3.072004' |
whismanoid | 25:9d4012b0887f | 4744 | // docTest_item['expect-value'] = '0x0c0001' |
whismanoid | 25:9d4012b0887f | 4745 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + 1.0LSB |
whismanoid | 30:13fc9d492ee0 | 4746 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4747 | // call-function |
whismanoid | 27:485b1b2f334c | 4748 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4749 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.072004), (uint32_t)0x0c0001); // 3.072V + 1.0LSB |
whismanoid | 25:9d4012b0887f | 4750 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.072004, /* expect: */ (uint32_t)0x0c0001); // 3.072V + 1.0LSB |
whismanoid | 30:13fc9d492ee0 | 4751 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4752 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4753 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4754 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4755 | |
whismanoid | 25:9d4012b0887f | 4756 | // @test group DACCodeOfVoltage DACCodeOfVoltage(3.072006) expect 0x0c0002 // 3.072V + 1.5LSB |
whismanoid | 25:9d4012b0887f | 4757 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4758 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4759 | // docTest_item['action'] = 'DACCodeOfVoltage(3.072006) expect 0x0c0002' |
whismanoid | 25:9d4012b0887f | 4760 | // docTest_item['remarks'] = '3.072V + 1.5LSB' |
whismanoid | 25:9d4012b0887f | 4761 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4762 | // docTest_item['arglist'] = '3.072006' |
whismanoid | 25:9d4012b0887f | 4763 | // docTest_item['expect-value'] = '0x0c0002' |
whismanoid | 25:9d4012b0887f | 4764 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + 1.5LSB |
whismanoid | 30:13fc9d492ee0 | 4765 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4766 | // call-function |
whismanoid | 27:485b1b2f334c | 4767 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4768 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.072006), (uint32_t)0x0c0002); // 3.072V + 1.5LSB |
whismanoid | 25:9d4012b0887f | 4769 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.072006, /* expect: */ (uint32_t)0x0c0002); // 3.072V + 1.5LSB |
whismanoid | 30:13fc9d492ee0 | 4770 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4771 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4772 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4773 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4774 | |
whismanoid | 25:9d4012b0887f | 4775 | // @test group DACCodeOfVoltage DACCodeOfVoltage(3.072008) expect 0x0c0002 // 3.072V + 2.0LSB |
whismanoid | 25:9d4012b0887f | 4776 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4777 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4778 | // docTest_item['action'] = 'DACCodeOfVoltage(3.072008) expect 0x0c0002' |
whismanoid | 25:9d4012b0887f | 4779 | // docTest_item['remarks'] = '3.072V + 2.0LSB' |
whismanoid | 25:9d4012b0887f | 4780 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4781 | // docTest_item['arglist'] = '3.072008' |
whismanoid | 25:9d4012b0887f | 4782 | // docTest_item['expect-value'] = '0x0c0002' |
whismanoid | 25:9d4012b0887f | 4783 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + 2.0LSB |
whismanoid | 30:13fc9d492ee0 | 4784 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4785 | // call-function |
whismanoid | 27:485b1b2f334c | 4786 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4787 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.072008), (uint32_t)0x0c0002); // 3.072V + 2.0LSB |
whismanoid | 25:9d4012b0887f | 4788 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.072008, /* expect: */ (uint32_t)0x0c0002); // 3.072V + 2.0LSB |
whismanoid | 30:13fc9d492ee0 | 4789 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4790 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4791 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4792 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4793 | |
whismanoid | 25:9d4012b0887f | 4794 | // @test group DACCodeOfVoltage DACCodeOfVoltage(3.072010) expect 0x0c0003 // 3.072V + 2.5LSB |
whismanoid | 25:9d4012b0887f | 4795 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4796 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4797 | // docTest_item['action'] = 'DACCodeOfVoltage(3.072010) expect 0x0c0003' |
whismanoid | 25:9d4012b0887f | 4798 | // docTest_item['remarks'] = '3.072V + 2.5LSB' |
whismanoid | 25:9d4012b0887f | 4799 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4800 | // docTest_item['arglist'] = '3.072010' |
whismanoid | 25:9d4012b0887f | 4801 | // docTest_item['expect-value'] = '0x0c0003' |
whismanoid | 25:9d4012b0887f | 4802 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + 2.5LSB |
whismanoid | 30:13fc9d492ee0 | 4803 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4804 | // call-function |
whismanoid | 27:485b1b2f334c | 4805 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4806 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.072010), (uint32_t)0x0c0003); // 3.072V + 2.5LSB |
whismanoid | 25:9d4012b0887f | 4807 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.072010, /* expect: */ (uint32_t)0x0c0003); // 3.072V + 2.5LSB |
whismanoid | 30:13fc9d492ee0 | 4808 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4809 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4810 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4811 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4812 | |
whismanoid | 25:9d4012b0887f | 4813 | // @test group DACCodeOfVoltage DACCodeOfVoltage(3.072012) expect 0x0c0003 // 3.072V + 3.0LSB |
whismanoid | 25:9d4012b0887f | 4814 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4815 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4816 | // docTest_item['action'] = 'DACCodeOfVoltage(3.072012) expect 0x0c0003' |
whismanoid | 25:9d4012b0887f | 4817 | // docTest_item['remarks'] = '3.072V + 3.0LSB' |
whismanoid | 25:9d4012b0887f | 4818 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4819 | // docTest_item['arglist'] = '3.072012' |
whismanoid | 25:9d4012b0887f | 4820 | // docTest_item['expect-value'] = '0x0c0003' |
whismanoid | 25:9d4012b0887f | 4821 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 3.072V + 3.0LSB |
whismanoid | 30:13fc9d492ee0 | 4822 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4823 | // call-function |
whismanoid | 27:485b1b2f334c | 4824 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4825 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)3.072012), (uint32_t)0x0c0003); // 3.072V + 3.0LSB |
whismanoid | 25:9d4012b0887f | 4826 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)3.072012, /* expect: */ (uint32_t)0x0c0003); // 3.072V + 3.0LSB |
whismanoid | 30:13fc9d492ee0 | 4827 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4828 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4829 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4830 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4831 | |
whismanoid | 25:9d4012b0887f | 4832 | // @test group DACCodeOfVoltage tinyTester.print("test_lsb_sweep V = 2.048000V LSBradius = 3LSB") |
whismanoid | 25:9d4012b0887f | 4833 | // docTest_item['actionType'] = 'print-string' |
whismanoid | 25:9d4012b0887f | 4834 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4835 | // docTest_item['action'] = 'tinyTester.print("test_lsb_sweep V = 2.048000V LSBradius = 3LSB")' |
whismanoid | 25:9d4012b0887f | 4836 | // docTest_item['arglist'] = 'test_lsb_sweep V = 2.048000V LSBradius = 3LSB' |
whismanoid | 25:9d4012b0887f | 4837 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None |
whismanoid | 30:13fc9d492ee0 | 4838 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4839 | // print-string |
whismanoid | 25:9d4012b0887f | 4840 | // tinyTesterFuncName = "tinyTester.print" |
whismanoid | 25:9d4012b0887f | 4841 | // tinyTesterPrintStringLiteral = "test_lsb_sweep V = 2.048000V LSBradius = 3LSB" |
whismanoid | 25:9d4012b0887f | 4842 | tinyTester.print("test_lsb_sweep V = 2.048000V LSBradius = 3LSB"); |
whismanoid | 30:13fc9d492ee0 | 4843 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4844 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4845 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4846 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4847 | |
whismanoid | 25:9d4012b0887f | 4848 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047988) expect 0x07fffd // 2.048V + -3.0LSB |
whismanoid | 25:9d4012b0887f | 4849 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4850 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4851 | // docTest_item['action'] = 'DACCodeOfVoltage(2.047988) expect 0x07fffd' |
whismanoid | 25:9d4012b0887f | 4852 | // docTest_item['remarks'] = '2.048V + -3.0LSB' |
whismanoid | 25:9d4012b0887f | 4853 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4854 | // docTest_item['arglist'] = '2.047988' |
whismanoid | 25:9d4012b0887f | 4855 | // docTest_item['expect-value'] = '0x07fffd' |
whismanoid | 25:9d4012b0887f | 4856 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + -3.0LSB |
whismanoid | 30:13fc9d492ee0 | 4857 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4858 | // call-function |
whismanoid | 27:485b1b2f334c | 4859 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4860 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047988), (uint32_t)0x07fffd); // 2.048V + -3.0LSB |
whismanoid | 25:9d4012b0887f | 4861 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047988, /* expect: */ (uint32_t)0x07fffd); // 2.048V + -3.0LSB |
whismanoid | 30:13fc9d492ee0 | 4862 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4863 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4864 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4865 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4866 | |
whismanoid | 25:9d4012b0887f | 4867 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047990) expect 0x07fffd // 2.048V + -2.5LSB |
whismanoid | 25:9d4012b0887f | 4868 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4869 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4870 | // docTest_item['action'] = 'DACCodeOfVoltage(2.047990) expect 0x07fffd' |
whismanoid | 25:9d4012b0887f | 4871 | // docTest_item['remarks'] = '2.048V + -2.5LSB' |
whismanoid | 25:9d4012b0887f | 4872 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4873 | // docTest_item['arglist'] = '2.047990' |
whismanoid | 25:9d4012b0887f | 4874 | // docTest_item['expect-value'] = '0x07fffd' |
whismanoid | 25:9d4012b0887f | 4875 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + -2.5LSB |
whismanoid | 30:13fc9d492ee0 | 4876 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4877 | // call-function |
whismanoid | 27:485b1b2f334c | 4878 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4879 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047990), (uint32_t)0x07fffd); // 2.048V + -2.5LSB |
whismanoid | 25:9d4012b0887f | 4880 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047990, /* expect: */ (uint32_t)0x07fffd); // 2.048V + -2.5LSB |
whismanoid | 30:13fc9d492ee0 | 4881 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4882 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4883 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4884 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4885 | |
whismanoid | 25:9d4012b0887f | 4886 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047992) expect 0x07fffe // 2.048V + -2.0LSB |
whismanoid | 25:9d4012b0887f | 4887 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4888 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4889 | // docTest_item['action'] = 'DACCodeOfVoltage(2.047992) expect 0x07fffe' |
whismanoid | 25:9d4012b0887f | 4890 | // docTest_item['remarks'] = '2.048V + -2.0LSB' |
whismanoid | 25:9d4012b0887f | 4891 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4892 | // docTest_item['arglist'] = '2.047992' |
whismanoid | 25:9d4012b0887f | 4893 | // docTest_item['expect-value'] = '0x07fffe' |
whismanoid | 25:9d4012b0887f | 4894 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + -2.0LSB |
whismanoid | 30:13fc9d492ee0 | 4895 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4896 | // call-function |
whismanoid | 27:485b1b2f334c | 4897 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4898 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047992), (uint32_t)0x07fffe); // 2.048V + -2.0LSB |
whismanoid | 25:9d4012b0887f | 4899 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047992, /* expect: */ (uint32_t)0x07fffe); // 2.048V + -2.0LSB |
whismanoid | 30:13fc9d492ee0 | 4900 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4901 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4902 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4903 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4904 | |
whismanoid | 25:9d4012b0887f | 4905 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047994) expect 0x07fffe // 2.048V + -1.5LSB 0x07fffe not 0x07ffff |
whismanoid | 25:9d4012b0887f | 4906 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4907 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4908 | // docTest_item['action'] = 'DACCodeOfVoltage(2.047994) expect 0x07fffe' |
whismanoid | 25:9d4012b0887f | 4909 | // docTest_item['remarks'] = '2.048V + -1.5LSB 0x07fffe not 0x07ffff' |
whismanoid | 25:9d4012b0887f | 4910 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4911 | // docTest_item['arglist'] = '2.047994' |
whismanoid | 25:9d4012b0887f | 4912 | // docTest_item['expect-value'] = '0x07fffe' |
whismanoid | 25:9d4012b0887f | 4913 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + -1.5LSB 0x07fffe not 0x07ffff |
whismanoid | 30:13fc9d492ee0 | 4914 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4915 | // call-function |
whismanoid | 27:485b1b2f334c | 4916 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4917 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047994), (uint32_t)0x07fffe); // 2.048V + -1.5LSB 0x07fffe not 0x07ffff |
whismanoid | 25:9d4012b0887f | 4918 | 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 | 4919 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4920 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4921 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4922 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4923 | |
whismanoid | 25:9d4012b0887f | 4924 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047996) expect 0x07ffff // 2.048V + -1.0LSB |
whismanoid | 25:9d4012b0887f | 4925 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4926 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4927 | // docTest_item['action'] = 'DACCodeOfVoltage(2.047996) expect 0x07ffff' |
whismanoid | 25:9d4012b0887f | 4928 | // docTest_item['remarks'] = '2.048V + -1.0LSB' |
whismanoid | 25:9d4012b0887f | 4929 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4930 | // docTest_item['arglist'] = '2.047996' |
whismanoid | 25:9d4012b0887f | 4931 | // docTest_item['expect-value'] = '0x07ffff' |
whismanoid | 25:9d4012b0887f | 4932 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + -1.0LSB |
whismanoid | 30:13fc9d492ee0 | 4933 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4934 | // call-function |
whismanoid | 27:485b1b2f334c | 4935 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4936 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047996), (uint32_t)0x07ffff); // 2.048V + -1.0LSB |
whismanoid | 25:9d4012b0887f | 4937 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.047996, /* expect: */ (uint32_t)0x07ffff); // 2.048V + -1.0LSB |
whismanoid | 30:13fc9d492ee0 | 4938 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4939 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4940 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4941 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4942 | |
whismanoid | 25:9d4012b0887f | 4943 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.047998) expect 0x07ffff // 2.048V + -0.5LSB 0x07ffff not 0x080000 |
whismanoid | 25:9d4012b0887f | 4944 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4945 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4946 | // docTest_item['action'] = 'DACCodeOfVoltage(2.047998) expect 0x07ffff' |
whismanoid | 25:9d4012b0887f | 4947 | // docTest_item['remarks'] = '2.048V + -0.5LSB 0x07ffff not 0x080000' |
whismanoid | 25:9d4012b0887f | 4948 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4949 | // docTest_item['arglist'] = '2.047998' |
whismanoid | 25:9d4012b0887f | 4950 | // docTest_item['expect-value'] = '0x07ffff' |
whismanoid | 25:9d4012b0887f | 4951 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + -0.5LSB 0x07ffff not 0x080000 |
whismanoid | 30:13fc9d492ee0 | 4952 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4953 | // call-function |
whismanoid | 27:485b1b2f334c | 4954 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4955 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.047998), (uint32_t)0x07ffff); // 2.048V + -0.5LSB 0x07ffff not 0x080000 |
whismanoid | 25:9d4012b0887f | 4956 | 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 | 4957 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4958 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4959 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4960 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4961 | |
whismanoid | 25:9d4012b0887f | 4962 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048000) expect 0x080000 // 2.048V + 0.0LSB |
whismanoid | 25:9d4012b0887f | 4963 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4964 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4965 | // docTest_item['action'] = 'DACCodeOfVoltage(2.048000) expect 0x080000' |
whismanoid | 25:9d4012b0887f | 4966 | // docTest_item['remarks'] = '2.048V + 0.0LSB' |
whismanoid | 25:9d4012b0887f | 4967 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4968 | // docTest_item['arglist'] = '2.048000' |
whismanoid | 25:9d4012b0887f | 4969 | // docTest_item['expect-value'] = '0x080000' |
whismanoid | 25:9d4012b0887f | 4970 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + 0.0LSB |
whismanoid | 30:13fc9d492ee0 | 4971 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4972 | // call-function |
whismanoid | 27:485b1b2f334c | 4973 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4974 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048000), (uint32_t)0x080000); // 2.048V + 0.0LSB |
whismanoid | 25:9d4012b0887f | 4975 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048000, /* expect: */ (uint32_t)0x080000); // 2.048V + 0.0LSB |
whismanoid | 30:13fc9d492ee0 | 4976 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4977 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4978 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4979 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4980 | |
whismanoid | 25:9d4012b0887f | 4981 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048002) expect 0x080001 // 2.048V + 0.5LSB |
whismanoid | 25:9d4012b0887f | 4982 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 4983 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4984 | // docTest_item['action'] = 'DACCodeOfVoltage(2.048002) expect 0x080001' |
whismanoid | 25:9d4012b0887f | 4985 | // docTest_item['remarks'] = '2.048V + 0.5LSB' |
whismanoid | 25:9d4012b0887f | 4986 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 4987 | // docTest_item['arglist'] = '2.048002' |
whismanoid | 25:9d4012b0887f | 4988 | // docTest_item['expect-value'] = '0x080001' |
whismanoid | 25:9d4012b0887f | 4989 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + 0.5LSB |
whismanoid | 30:13fc9d492ee0 | 4990 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 4991 | // call-function |
whismanoid | 27:485b1b2f334c | 4992 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 4993 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048002), (uint32_t)0x080001); // 2.048V + 0.5LSB |
whismanoid | 25:9d4012b0887f | 4994 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048002, /* expect: */ (uint32_t)0x080001); // 2.048V + 0.5LSB |
whismanoid | 30:13fc9d492ee0 | 4995 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 4996 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 4997 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 4998 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 4999 | |
whismanoid | 25:9d4012b0887f | 5000 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048004) expect 0x080001 // 2.048V + 1.0LSB |
whismanoid | 25:9d4012b0887f | 5001 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 5002 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5003 | // docTest_item['action'] = 'DACCodeOfVoltage(2.048004) expect 0x080001' |
whismanoid | 25:9d4012b0887f | 5004 | // docTest_item['remarks'] = '2.048V + 1.0LSB' |
whismanoid | 25:9d4012b0887f | 5005 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5006 | // docTest_item['arglist'] = '2.048004' |
whismanoid | 25:9d4012b0887f | 5007 | // docTest_item['expect-value'] = '0x080001' |
whismanoid | 25:9d4012b0887f | 5008 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + 1.0LSB |
whismanoid | 30:13fc9d492ee0 | 5009 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 5010 | // call-function |
whismanoid | 27:485b1b2f334c | 5011 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 5012 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048004), (uint32_t)0x080001); // 2.048V + 1.0LSB |
whismanoid | 25:9d4012b0887f | 5013 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048004, /* expect: */ (uint32_t)0x080001); // 2.048V + 1.0LSB |
whismanoid | 30:13fc9d492ee0 | 5014 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5015 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 5016 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 5017 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 5018 | |
whismanoid | 25:9d4012b0887f | 5019 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048006) expect 0x080002 // 2.048V + 1.5LSB |
whismanoid | 25:9d4012b0887f | 5020 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 5021 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5022 | // docTest_item['action'] = 'DACCodeOfVoltage(2.048006) expect 0x080002' |
whismanoid | 25:9d4012b0887f | 5023 | // docTest_item['remarks'] = '2.048V + 1.5LSB' |
whismanoid | 25:9d4012b0887f | 5024 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5025 | // docTest_item['arglist'] = '2.048006' |
whismanoid | 25:9d4012b0887f | 5026 | // docTest_item['expect-value'] = '0x080002' |
whismanoid | 25:9d4012b0887f | 5027 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + 1.5LSB |
whismanoid | 30:13fc9d492ee0 | 5028 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 5029 | // call-function |
whismanoid | 27:485b1b2f334c | 5030 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 5031 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048006), (uint32_t)0x080002); // 2.048V + 1.5LSB |
whismanoid | 25:9d4012b0887f | 5032 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048006, /* expect: */ (uint32_t)0x080002); // 2.048V + 1.5LSB |
whismanoid | 30:13fc9d492ee0 | 5033 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5034 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 5035 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 5036 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 5037 | |
whismanoid | 25:9d4012b0887f | 5038 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048008) expect 0x080002 // 2.048V + 2.0LSB |
whismanoid | 25:9d4012b0887f | 5039 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 5040 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5041 | // docTest_item['action'] = 'DACCodeOfVoltage(2.048008) expect 0x080002' |
whismanoid | 25:9d4012b0887f | 5042 | // docTest_item['remarks'] = '2.048V + 2.0LSB' |
whismanoid | 25:9d4012b0887f | 5043 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5044 | // docTest_item['arglist'] = '2.048008' |
whismanoid | 25:9d4012b0887f | 5045 | // docTest_item['expect-value'] = '0x080002' |
whismanoid | 25:9d4012b0887f | 5046 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + 2.0LSB |
whismanoid | 30:13fc9d492ee0 | 5047 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 5048 | // call-function |
whismanoid | 27:485b1b2f334c | 5049 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 5050 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048008), (uint32_t)0x080002); // 2.048V + 2.0LSB |
whismanoid | 25:9d4012b0887f | 5051 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048008, /* expect: */ (uint32_t)0x080002); // 2.048V + 2.0LSB |
whismanoid | 30:13fc9d492ee0 | 5052 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5053 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 5054 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 5055 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 5056 | |
whismanoid | 25:9d4012b0887f | 5057 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048010) expect 0x080003 // 2.048V + 2.5LSB |
whismanoid | 25:9d4012b0887f | 5058 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 5059 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5060 | // docTest_item['action'] = 'DACCodeOfVoltage(2.048010) expect 0x080003' |
whismanoid | 25:9d4012b0887f | 5061 | // docTest_item['remarks'] = '2.048V + 2.5LSB' |
whismanoid | 25:9d4012b0887f | 5062 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5063 | // docTest_item['arglist'] = '2.048010' |
whismanoid | 25:9d4012b0887f | 5064 | // docTest_item['expect-value'] = '0x080003' |
whismanoid | 25:9d4012b0887f | 5065 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + 2.5LSB |
whismanoid | 30:13fc9d492ee0 | 5066 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 5067 | // call-function |
whismanoid | 27:485b1b2f334c | 5068 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 5069 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048010), (uint32_t)0x080003); // 2.048V + 2.5LSB |
whismanoid | 25:9d4012b0887f | 5070 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048010, /* expect: */ (uint32_t)0x080003); // 2.048V + 2.5LSB |
whismanoid | 30:13fc9d492ee0 | 5071 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5072 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 5073 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 5074 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 5075 | |
whismanoid | 25:9d4012b0887f | 5076 | // @test group DACCodeOfVoltage DACCodeOfVoltage(2.048012) expect 0x080003 // 2.048V + 3.0LSB |
whismanoid | 25:9d4012b0887f | 5077 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 5078 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5079 | // docTest_item['action'] = 'DACCodeOfVoltage(2.048012) expect 0x080003' |
whismanoid | 25:9d4012b0887f | 5080 | // docTest_item['remarks'] = '2.048V + 3.0LSB' |
whismanoid | 25:9d4012b0887f | 5081 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5082 | // docTest_item['arglist'] = '2.048012' |
whismanoid | 25:9d4012b0887f | 5083 | // docTest_item['expect-value'] = '0x080003' |
whismanoid | 25:9d4012b0887f | 5084 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 2.048V + 3.0LSB |
whismanoid | 30:13fc9d492ee0 | 5085 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 5086 | // call-function |
whismanoid | 27:485b1b2f334c | 5087 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 5088 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)2.048012), (uint32_t)0x080003); // 2.048V + 3.0LSB |
whismanoid | 25:9d4012b0887f | 5089 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)2.048012, /* expect: */ (uint32_t)0x080003); // 2.048V + 3.0LSB |
whismanoid | 30:13fc9d492ee0 | 5090 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5091 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 5092 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 5093 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 5094 | |
whismanoid | 25:9d4012b0887f | 5095 | // @test group DACCodeOfVoltage tinyTester.print("test_lsb_sweep V = 1.024000V LSBradius = 3LSB") |
whismanoid | 25:9d4012b0887f | 5096 | // docTest_item['actionType'] = 'print-string' |
whismanoid | 25:9d4012b0887f | 5097 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5098 | // docTest_item['action'] = 'tinyTester.print("test_lsb_sweep V = 1.024000V LSBradius = 3LSB")' |
whismanoid | 25:9d4012b0887f | 5099 | // docTest_item['arglist'] = 'test_lsb_sweep V = 1.024000V LSBradius = 3LSB' |
whismanoid | 25:9d4012b0887f | 5100 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None |
whismanoid | 30:13fc9d492ee0 | 5101 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 5102 | // print-string |
whismanoid | 25:9d4012b0887f | 5103 | // tinyTesterFuncName = "tinyTester.print" |
whismanoid | 25:9d4012b0887f | 5104 | // tinyTesterPrintStringLiteral = "test_lsb_sweep V = 1.024000V LSBradius = 3LSB" |
whismanoid | 25:9d4012b0887f | 5105 | tinyTester.print("test_lsb_sweep V = 1.024000V LSBradius = 3LSB"); |
whismanoid | 30:13fc9d492ee0 | 5106 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5107 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 5108 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 5109 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 5110 | |
whismanoid | 25:9d4012b0887f | 5111 | // @test group DACCodeOfVoltage DACCodeOfVoltage(1.023988) expect 0x03fffd // 1.024V + -3.0LSB |
whismanoid | 25:9d4012b0887f | 5112 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 5113 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5114 | // docTest_item['action'] = 'DACCodeOfVoltage(1.023988) expect 0x03fffd' |
whismanoid | 25:9d4012b0887f | 5115 | // docTest_item['remarks'] = '1.024V + -3.0LSB' |
whismanoid | 25:9d4012b0887f | 5116 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5117 | // docTest_item['arglist'] = '1.023988' |
whismanoid | 25:9d4012b0887f | 5118 | // docTest_item['expect-value'] = '0x03fffd' |
whismanoid | 25:9d4012b0887f | 5119 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + -3.0LSB |
whismanoid | 30:13fc9d492ee0 | 5120 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 5121 | // call-function |
whismanoid | 27:485b1b2f334c | 5122 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 5123 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.023988), (uint32_t)0x03fffd); // 1.024V + -3.0LSB |
whismanoid | 25:9d4012b0887f | 5124 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.023988, /* expect: */ (uint32_t)0x03fffd); // 1.024V + -3.0LSB |
whismanoid | 30:13fc9d492ee0 | 5125 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5126 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 5127 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 5128 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 5129 | |
whismanoid | 25:9d4012b0887f | 5130 | // @test group DACCodeOfVoltage DACCodeOfVoltage(1.023990) expect 0x03fffd // 1.024V + -2.5LSB 0x03fffd not 0x03fffe |
whismanoid | 25:9d4012b0887f | 5131 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 5132 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5133 | // docTest_item['action'] = 'DACCodeOfVoltage(1.023990) expect 0x03fffd' |
whismanoid | 25:9d4012b0887f | 5134 | // docTest_item['remarks'] = '1.024V + -2.5LSB 0x03fffd not 0x03fffe' |
whismanoid | 25:9d4012b0887f | 5135 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5136 | // docTest_item['arglist'] = '1.023990' |
whismanoid | 25:9d4012b0887f | 5137 | // docTest_item['expect-value'] = '0x03fffd' |
whismanoid | 25:9d4012b0887f | 5138 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + -2.5LSB 0x03fffd not 0x03fffe |
whismanoid | 30:13fc9d492ee0 | 5139 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 5140 | // call-function |
whismanoid | 27:485b1b2f334c | 5141 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 5142 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.023990), (uint32_t)0x03fffd); // 1.024V + -2.5LSB 0x03fffd not 0x03fffe |
whismanoid | 25:9d4012b0887f | 5143 | 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 | 5144 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5145 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 5146 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 5147 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 5148 | |
whismanoid | 25:9d4012b0887f | 5149 | // @test group DACCodeOfVoltage DACCodeOfVoltage(1.023992) expect 0x03fffe // 1.024V + -2.0LSB |
whismanoid | 25:9d4012b0887f | 5150 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 5151 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5152 | // docTest_item['action'] = 'DACCodeOfVoltage(1.023992) expect 0x03fffe' |
whismanoid | 25:9d4012b0887f | 5153 | // docTest_item['remarks'] = '1.024V + -2.0LSB' |
whismanoid | 25:9d4012b0887f | 5154 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5155 | // docTest_item['arglist'] = '1.023992' |
whismanoid | 25:9d4012b0887f | 5156 | // docTest_item['expect-value'] = '0x03fffe' |
whismanoid | 25:9d4012b0887f | 5157 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + -2.0LSB |
whismanoid | 30:13fc9d492ee0 | 5158 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 5159 | // call-function |
whismanoid | 27:485b1b2f334c | 5160 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 5161 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.023992), (uint32_t)0x03fffe); // 1.024V + -2.0LSB |
whismanoid | 25:9d4012b0887f | 5162 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.023992, /* expect: */ (uint32_t)0x03fffe); // 1.024V + -2.0LSB |
whismanoid | 30:13fc9d492ee0 | 5163 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5164 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 5165 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 5166 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 5167 | |
whismanoid | 25:9d4012b0887f | 5168 | // @test group DACCodeOfVoltage DACCodeOfVoltage(1.023994) expect 0x03fffe // 1.024V + -1.5LSB |
whismanoid | 25:9d4012b0887f | 5169 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 5170 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5171 | // docTest_item['action'] = 'DACCodeOfVoltage(1.023994) expect 0x03fffe' |
whismanoid | 25:9d4012b0887f | 5172 | // docTest_item['remarks'] = '1.024V + -1.5LSB' |
whismanoid | 25:9d4012b0887f | 5173 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5174 | // docTest_item['arglist'] = '1.023994' |
whismanoid | 25:9d4012b0887f | 5175 | // docTest_item['expect-value'] = '0x03fffe' |
whismanoid | 25:9d4012b0887f | 5176 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + -1.5LSB |
whismanoid | 30:13fc9d492ee0 | 5177 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 5178 | // call-function |
whismanoid | 27:485b1b2f334c | 5179 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 5180 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.023994), (uint32_t)0x03fffe); // 1.024V + -1.5LSB |
whismanoid | 25:9d4012b0887f | 5181 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.023994, /* expect: */ (uint32_t)0x03fffe); // 1.024V + -1.5LSB |
whismanoid | 30:13fc9d492ee0 | 5182 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5183 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 5184 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 5185 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 5186 | |
whismanoid | 25:9d4012b0887f | 5187 | // @test group DACCodeOfVoltage DACCodeOfVoltage(1.023996) expect 0x03ffff // 1.024V + -1.0LSB |
whismanoid | 25:9d4012b0887f | 5188 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 5189 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5190 | // docTest_item['action'] = 'DACCodeOfVoltage(1.023996) expect 0x03ffff' |
whismanoid | 25:9d4012b0887f | 5191 | // docTest_item['remarks'] = '1.024V + -1.0LSB' |
whismanoid | 25:9d4012b0887f | 5192 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5193 | // docTest_item['arglist'] = '1.023996' |
whismanoid | 25:9d4012b0887f | 5194 | // docTest_item['expect-value'] = '0x03ffff' |
whismanoid | 25:9d4012b0887f | 5195 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + -1.0LSB |
whismanoid | 30:13fc9d492ee0 | 5196 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 5197 | // call-function |
whismanoid | 27:485b1b2f334c | 5198 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 5199 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.023996), (uint32_t)0x03ffff); // 1.024V + -1.0LSB |
whismanoid | 25:9d4012b0887f | 5200 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.023996, /* expect: */ (uint32_t)0x03ffff); // 1.024V + -1.0LSB |
whismanoid | 30:13fc9d492ee0 | 5201 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5202 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 5203 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 5204 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 5205 | |
whismanoid | 25:9d4012b0887f | 5206 | // @test group DACCodeOfVoltage DACCodeOfVoltage(1.023998) expect 0x03ffff // 1.024V + -0.5LSB 0x03ffff not 0x040000 |
whismanoid | 25:9d4012b0887f | 5207 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 5208 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5209 | // docTest_item['action'] = 'DACCodeOfVoltage(1.023998) expect 0x03ffff' |
whismanoid | 25:9d4012b0887f | 5210 | // docTest_item['remarks'] = '1.024V + -0.5LSB 0x03ffff not 0x040000' |
whismanoid | 25:9d4012b0887f | 5211 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5212 | // docTest_item['arglist'] = '1.023998' |
whismanoid | 25:9d4012b0887f | 5213 | // docTest_item['expect-value'] = '0x03ffff' |
whismanoid | 25:9d4012b0887f | 5214 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + -0.5LSB 0x03ffff not 0x040000 |
whismanoid | 30:13fc9d492ee0 | 5215 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 5216 | // call-function |
whismanoid | 27:485b1b2f334c | 5217 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 5218 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.023998), (uint32_t)0x03ffff); // 1.024V + -0.5LSB 0x03ffff not 0x040000 |
whismanoid | 25:9d4012b0887f | 5219 | 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 | 5220 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5221 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 5222 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 5223 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 5224 | |
whismanoid | 25:9d4012b0887f | 5225 | // @test group DACCodeOfVoltage DACCodeOfVoltage(1.024000) expect 0x040000 // 1.024V + 0.0LSB |
whismanoid | 25:9d4012b0887f | 5226 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 5227 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5228 | // docTest_item['action'] = 'DACCodeOfVoltage(1.024000) expect 0x040000' |
whismanoid | 25:9d4012b0887f | 5229 | // docTest_item['remarks'] = '1.024V + 0.0LSB' |
whismanoid | 25:9d4012b0887f | 5230 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5231 | // docTest_item['arglist'] = '1.024000' |
whismanoid | 25:9d4012b0887f | 5232 | // docTest_item['expect-value'] = '0x040000' |
whismanoid | 25:9d4012b0887f | 5233 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + 0.0LSB |
whismanoid | 30:13fc9d492ee0 | 5234 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 5235 | // call-function |
whismanoid | 27:485b1b2f334c | 5236 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 5237 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.024000), (uint32_t)0x040000); // 1.024V + 0.0LSB |
whismanoid | 25:9d4012b0887f | 5238 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.024000, /* expect: */ (uint32_t)0x040000); // 1.024V + 0.0LSB |
whismanoid | 30:13fc9d492ee0 | 5239 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5240 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 5241 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 5242 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 5243 | |
whismanoid | 25:9d4012b0887f | 5244 | // @test group DACCodeOfVoltage DACCodeOfVoltage(1.024002) expect 0x040001 // 1.024V + 0.5LSB |
whismanoid | 25:9d4012b0887f | 5245 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 5246 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5247 | // docTest_item['action'] = 'DACCodeOfVoltage(1.024002) expect 0x040001' |
whismanoid | 25:9d4012b0887f | 5248 | // docTest_item['remarks'] = '1.024V + 0.5LSB' |
whismanoid | 25:9d4012b0887f | 5249 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5250 | // docTest_item['arglist'] = '1.024002' |
whismanoid | 25:9d4012b0887f | 5251 | // docTest_item['expect-value'] = '0x040001' |
whismanoid | 25:9d4012b0887f | 5252 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + 0.5LSB |
whismanoid | 30:13fc9d492ee0 | 5253 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 5254 | // call-function |
whismanoid | 27:485b1b2f334c | 5255 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 5256 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.024002), (uint32_t)0x040001); // 1.024V + 0.5LSB |
whismanoid | 25:9d4012b0887f | 5257 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.024002, /* expect: */ (uint32_t)0x040001); // 1.024V + 0.5LSB |
whismanoid | 30:13fc9d492ee0 | 5258 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5259 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 5260 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 5261 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 5262 | |
whismanoid | 25:9d4012b0887f | 5263 | // @test group DACCodeOfVoltage DACCodeOfVoltage(1.024004) expect 0x040001 // 1.024V + 1.0LSB |
whismanoid | 25:9d4012b0887f | 5264 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 5265 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5266 | // docTest_item['action'] = 'DACCodeOfVoltage(1.024004) expect 0x040001' |
whismanoid | 25:9d4012b0887f | 5267 | // docTest_item['remarks'] = '1.024V + 1.0LSB' |
whismanoid | 25:9d4012b0887f | 5268 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5269 | // docTest_item['arglist'] = '1.024004' |
whismanoid | 25:9d4012b0887f | 5270 | // docTest_item['expect-value'] = '0x040001' |
whismanoid | 25:9d4012b0887f | 5271 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + 1.0LSB |
whismanoid | 30:13fc9d492ee0 | 5272 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 5273 | // call-function |
whismanoid | 27:485b1b2f334c | 5274 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 5275 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.024004), (uint32_t)0x040001); // 1.024V + 1.0LSB |
whismanoid | 25:9d4012b0887f | 5276 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.024004, /* expect: */ (uint32_t)0x040001); // 1.024V + 1.0LSB |
whismanoid | 30:13fc9d492ee0 | 5277 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5278 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 5279 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 5280 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 5281 | |
whismanoid | 25:9d4012b0887f | 5282 | // @test group DACCodeOfVoltage DACCodeOfVoltage(1.024006) expect 0x040002 // 1.024V + 1.5LSB |
whismanoid | 25:9d4012b0887f | 5283 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 5284 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5285 | // docTest_item['action'] = 'DACCodeOfVoltage(1.024006) expect 0x040002' |
whismanoid | 25:9d4012b0887f | 5286 | // docTest_item['remarks'] = '1.024V + 1.5LSB' |
whismanoid | 25:9d4012b0887f | 5287 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5288 | // docTest_item['arglist'] = '1.024006' |
whismanoid | 25:9d4012b0887f | 5289 | // docTest_item['expect-value'] = '0x040002' |
whismanoid | 25:9d4012b0887f | 5290 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + 1.5LSB |
whismanoid | 30:13fc9d492ee0 | 5291 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 5292 | // call-function |
whismanoid | 27:485b1b2f334c | 5293 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 5294 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.024006), (uint32_t)0x040002); // 1.024V + 1.5LSB |
whismanoid | 25:9d4012b0887f | 5295 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.024006, /* expect: */ (uint32_t)0x040002); // 1.024V + 1.5LSB |
whismanoid | 30:13fc9d492ee0 | 5296 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5297 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 5298 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 5299 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 5300 | |
whismanoid | 25:9d4012b0887f | 5301 | // @test group DACCodeOfVoltage DACCodeOfVoltage(1.024008) expect 0x040002 // 1.024V + 2.0LSB |
whismanoid | 25:9d4012b0887f | 5302 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 5303 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5304 | // docTest_item['action'] = 'DACCodeOfVoltage(1.024008) expect 0x040002' |
whismanoid | 25:9d4012b0887f | 5305 | // docTest_item['remarks'] = '1.024V + 2.0LSB' |
whismanoid | 25:9d4012b0887f | 5306 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5307 | // docTest_item['arglist'] = '1.024008' |
whismanoid | 25:9d4012b0887f | 5308 | // docTest_item['expect-value'] = '0x040002' |
whismanoid | 25:9d4012b0887f | 5309 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + 2.0LSB |
whismanoid | 30:13fc9d492ee0 | 5310 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 5311 | // call-function |
whismanoid | 27:485b1b2f334c | 5312 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 5313 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.024008), (uint32_t)0x040002); // 1.024V + 2.0LSB |
whismanoid | 25:9d4012b0887f | 5314 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.024008, /* expect: */ (uint32_t)0x040002); // 1.024V + 2.0LSB |
whismanoid | 30:13fc9d492ee0 | 5315 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5316 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 5317 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 5318 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 5319 | |
whismanoid | 25:9d4012b0887f | 5320 | // @test group DACCodeOfVoltage DACCodeOfVoltage(1.024010) expect 0x040003 // 1.024V + 2.5LSB |
whismanoid | 25:9d4012b0887f | 5321 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 5322 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5323 | // docTest_item['action'] = 'DACCodeOfVoltage(1.024010) expect 0x040003' |
whismanoid | 25:9d4012b0887f | 5324 | // docTest_item['remarks'] = '1.024V + 2.5LSB' |
whismanoid | 25:9d4012b0887f | 5325 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5326 | // docTest_item['arglist'] = '1.024010' |
whismanoid | 25:9d4012b0887f | 5327 | // docTest_item['expect-value'] = '0x040003' |
whismanoid | 25:9d4012b0887f | 5328 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + 2.5LSB |
whismanoid | 30:13fc9d492ee0 | 5329 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 5330 | // call-function |
whismanoid | 27:485b1b2f334c | 5331 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 5332 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.024010), (uint32_t)0x040003); // 1.024V + 2.5LSB |
whismanoid | 25:9d4012b0887f | 5333 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.024010, /* expect: */ (uint32_t)0x040003); // 1.024V + 2.5LSB |
whismanoid | 30:13fc9d492ee0 | 5334 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5335 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 5336 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 5337 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 5338 | |
whismanoid | 25:9d4012b0887f | 5339 | // @test group DACCodeOfVoltage DACCodeOfVoltage(1.024012) expect 0x040003 // 1.024V + 3.0LSB |
whismanoid | 25:9d4012b0887f | 5340 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 5341 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5342 | // docTest_item['action'] = 'DACCodeOfVoltage(1.024012) expect 0x040003' |
whismanoid | 25:9d4012b0887f | 5343 | // docTest_item['remarks'] = '1.024V + 3.0LSB' |
whismanoid | 25:9d4012b0887f | 5344 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5345 | // docTest_item['arglist'] = '1.024012' |
whismanoid | 25:9d4012b0887f | 5346 | // docTest_item['expect-value'] = '0x040003' |
whismanoid | 25:9d4012b0887f | 5347 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 1.024V + 3.0LSB |
whismanoid | 30:13fc9d492ee0 | 5348 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 5349 | // call-function |
whismanoid | 27:485b1b2f334c | 5350 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 5351 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)1.024012), (uint32_t)0x040003); // 1.024V + 3.0LSB |
whismanoid | 25:9d4012b0887f | 5352 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)1.024012, /* expect: */ (uint32_t)0x040003); // 1.024V + 3.0LSB |
whismanoid | 30:13fc9d492ee0 | 5353 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5354 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 5355 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 5356 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 5357 | |
whismanoid | 25:9d4012b0887f | 5358 | // @test group DACCodeOfVoltage tinyTester.print("test_lsb_sweep V = 0.000000V LSBradius = 3LSB") |
whismanoid | 25:9d4012b0887f | 5359 | // docTest_item['actionType'] = 'print-string' |
whismanoid | 25:9d4012b0887f | 5360 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5361 | // docTest_item['action'] = 'tinyTester.print("test_lsb_sweep V = 0.000000V LSBradius = 3LSB")' |
whismanoid | 25:9d4012b0887f | 5362 | // docTest_item['arglist'] = 'test_lsb_sweep V = 0.000000V LSBradius = 3LSB' |
whismanoid | 25:9d4012b0887f | 5363 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None |
whismanoid | 30:13fc9d492ee0 | 5364 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 5365 | // print-string |
whismanoid | 25:9d4012b0887f | 5366 | // tinyTesterFuncName = "tinyTester.print" |
whismanoid | 25:9d4012b0887f | 5367 | // tinyTesterPrintStringLiteral = "test_lsb_sweep V = 0.000000V LSBradius = 3LSB" |
whismanoid | 25:9d4012b0887f | 5368 | tinyTester.print("test_lsb_sweep V = 0.000000V LSBradius = 3LSB"); |
whismanoid | 30:13fc9d492ee0 | 5369 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5370 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 5371 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 5372 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 5373 | |
whismanoid | 25:9d4012b0887f | 5374 | // @test group DACCodeOfVoltage DACCodeOfVoltage(-0.000012) expect 0x000000 // 0.000V + -3.0LSB |
whismanoid | 25:9d4012b0887f | 5375 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 5376 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5377 | // docTest_item['action'] = 'DACCodeOfVoltage(-0.000012) expect 0x000000' |
whismanoid | 25:9d4012b0887f | 5378 | // docTest_item['remarks'] = '0.000V + -3.0LSB' |
whismanoid | 25:9d4012b0887f | 5379 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5380 | // docTest_item['arglist'] = '-0.000012' |
whismanoid | 25:9d4012b0887f | 5381 | // docTest_item['expect-value'] = '0x000000' |
whismanoid | 25:9d4012b0887f | 5382 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + -3.0LSB |
whismanoid | 30:13fc9d492ee0 | 5383 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 5384 | // call-function |
whismanoid | 27:485b1b2f334c | 5385 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 5386 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)-0.000012), (uint32_t)0x000000); // 0.000V + -3.0LSB |
whismanoid | 25:9d4012b0887f | 5387 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)-0.000012, /* expect: */ (uint32_t)0x000000); // 0.000V + -3.0LSB |
whismanoid | 30:13fc9d492ee0 | 5388 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5389 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 5390 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 5391 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 5392 | |
whismanoid | 25:9d4012b0887f | 5393 | // @test group DACCodeOfVoltage DACCodeOfVoltage(-0.000010) expect 0x000000 // 0.000V + -2.5LSB |
whismanoid | 25:9d4012b0887f | 5394 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 5395 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5396 | // docTest_item['action'] = 'DACCodeOfVoltage(-0.000010) expect 0x000000' |
whismanoid | 25:9d4012b0887f | 5397 | // docTest_item['remarks'] = '0.000V + -2.5LSB' |
whismanoid | 25:9d4012b0887f | 5398 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5399 | // docTest_item['arglist'] = '-0.000010' |
whismanoid | 25:9d4012b0887f | 5400 | // docTest_item['expect-value'] = '0x000000' |
whismanoid | 25:9d4012b0887f | 5401 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + -2.5LSB |
whismanoid | 30:13fc9d492ee0 | 5402 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 5403 | // call-function |
whismanoid | 27:485b1b2f334c | 5404 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 5405 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)-0.000010), (uint32_t)0x000000); // 0.000V + -2.5LSB |
whismanoid | 25:9d4012b0887f | 5406 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)-0.000010, /* expect: */ (uint32_t)0x000000); // 0.000V + -2.5LSB |
whismanoid | 30:13fc9d492ee0 | 5407 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5408 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 5409 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 5410 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 5411 | |
whismanoid | 25:9d4012b0887f | 5412 | // @test group DACCodeOfVoltage DACCodeOfVoltage(-0.000008) expect 0x000000 // 0.000V + -2.0LSB |
whismanoid | 25:9d4012b0887f | 5413 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 5414 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5415 | // docTest_item['action'] = 'DACCodeOfVoltage(-0.000008) expect 0x000000' |
whismanoid | 25:9d4012b0887f | 5416 | // docTest_item['remarks'] = '0.000V + -2.0LSB' |
whismanoid | 25:9d4012b0887f | 5417 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5418 | // docTest_item['arglist'] = '-0.000008' |
whismanoid | 25:9d4012b0887f | 5419 | // docTest_item['expect-value'] = '0x000000' |
whismanoid | 25:9d4012b0887f | 5420 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + -2.0LSB |
whismanoid | 30:13fc9d492ee0 | 5421 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 5422 | // call-function |
whismanoid | 27:485b1b2f334c | 5423 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 5424 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)-0.000008), (uint32_t)0x000000); // 0.000V + -2.0LSB |
whismanoid | 25:9d4012b0887f | 5425 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)-0.000008, /* expect: */ (uint32_t)0x000000); // 0.000V + -2.0LSB |
whismanoid | 30:13fc9d492ee0 | 5426 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5427 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 5428 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 5429 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 5430 | |
whismanoid | 25:9d4012b0887f | 5431 | // @test group DACCodeOfVoltage DACCodeOfVoltage(-0.000006) expect 0x000000 // 0.000V + -1.5LSB |
whismanoid | 25:9d4012b0887f | 5432 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 5433 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5434 | // docTest_item['action'] = 'DACCodeOfVoltage(-0.000006) expect 0x000000' |
whismanoid | 25:9d4012b0887f | 5435 | // docTest_item['remarks'] = '0.000V + -1.5LSB' |
whismanoid | 25:9d4012b0887f | 5436 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5437 | // docTest_item['arglist'] = '-0.000006' |
whismanoid | 25:9d4012b0887f | 5438 | // docTest_item['expect-value'] = '0x000000' |
whismanoid | 25:9d4012b0887f | 5439 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + -1.5LSB |
whismanoid | 30:13fc9d492ee0 | 5440 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 5441 | // call-function |
whismanoid | 27:485b1b2f334c | 5442 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 5443 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)-0.000006), (uint32_t)0x000000); // 0.000V + -1.5LSB |
whismanoid | 25:9d4012b0887f | 5444 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)-0.000006, /* expect: */ (uint32_t)0x000000); // 0.000V + -1.5LSB |
whismanoid | 30:13fc9d492ee0 | 5445 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5446 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 5447 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 5448 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 5449 | |
whismanoid | 25:9d4012b0887f | 5450 | // @test group DACCodeOfVoltage DACCodeOfVoltage(-0.000004) expect 0x000000 // 0.000V + -1.0LSB |
whismanoid | 25:9d4012b0887f | 5451 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 5452 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5453 | // docTest_item['action'] = 'DACCodeOfVoltage(-0.000004) expect 0x000000' |
whismanoid | 25:9d4012b0887f | 5454 | // docTest_item['remarks'] = '0.000V + -1.0LSB' |
whismanoid | 25:9d4012b0887f | 5455 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5456 | // docTest_item['arglist'] = '-0.000004' |
whismanoid | 25:9d4012b0887f | 5457 | // docTest_item['expect-value'] = '0x000000' |
whismanoid | 25:9d4012b0887f | 5458 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + -1.0LSB |
whismanoid | 30:13fc9d492ee0 | 5459 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 5460 | // call-function |
whismanoid | 27:485b1b2f334c | 5461 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 5462 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)-0.000004), (uint32_t)0x000000); // 0.000V + -1.0LSB |
whismanoid | 25:9d4012b0887f | 5463 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)-0.000004, /* expect: */ (uint32_t)0x000000); // 0.000V + -1.0LSB |
whismanoid | 30:13fc9d492ee0 | 5464 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5465 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 5466 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 5467 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 5468 | |
whismanoid | 25:9d4012b0887f | 5469 | // @test group DACCodeOfVoltage DACCodeOfVoltage(-0.000002) expect 0x000000 // 0.000V + -0.5LSB |
whismanoid | 25:9d4012b0887f | 5470 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 5471 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5472 | // docTest_item['action'] = 'DACCodeOfVoltage(-0.000002) expect 0x000000' |
whismanoid | 25:9d4012b0887f | 5473 | // docTest_item['remarks'] = '0.000V + -0.5LSB' |
whismanoid | 25:9d4012b0887f | 5474 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5475 | // docTest_item['arglist'] = '-0.000002' |
whismanoid | 25:9d4012b0887f | 5476 | // docTest_item['expect-value'] = '0x000000' |
whismanoid | 25:9d4012b0887f | 5477 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + -0.5LSB |
whismanoid | 30:13fc9d492ee0 | 5478 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 5479 | // call-function |
whismanoid | 27:485b1b2f334c | 5480 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 5481 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)-0.000002), (uint32_t)0x000000); // 0.000V + -0.5LSB |
whismanoid | 25:9d4012b0887f | 5482 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)-0.000002, /* expect: */ (uint32_t)0x000000); // 0.000V + -0.5LSB |
whismanoid | 30:13fc9d492ee0 | 5483 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5484 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 5485 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 5486 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 5487 | |
whismanoid | 25:9d4012b0887f | 5488 | // @test group DACCodeOfVoltage DACCodeOfVoltage(0.000000) expect 0x000000 // 0.000V + 0.0LSB |
whismanoid | 25:9d4012b0887f | 5489 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 5490 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5491 | // docTest_item['action'] = 'DACCodeOfVoltage(0.000000) expect 0x000000' |
whismanoid | 25:9d4012b0887f | 5492 | // docTest_item['remarks'] = '0.000V + 0.0LSB' |
whismanoid | 25:9d4012b0887f | 5493 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5494 | // docTest_item['arglist'] = '0.000000' |
whismanoid | 25:9d4012b0887f | 5495 | // docTest_item['expect-value'] = '0x000000' |
whismanoid | 25:9d4012b0887f | 5496 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + 0.0LSB |
whismanoid | 30:13fc9d492ee0 | 5497 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 5498 | // call-function |
whismanoid | 27:485b1b2f334c | 5499 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 5500 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.000000), (uint32_t)0x000000); // 0.000V + 0.0LSB |
whismanoid | 25:9d4012b0887f | 5501 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.000000, /* expect: */ (uint32_t)0x000000); // 0.000V + 0.0LSB |
whismanoid | 30:13fc9d492ee0 | 5502 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5503 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 5504 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 5505 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 5506 | |
whismanoid | 25:9d4012b0887f | 5507 | // @test group DACCodeOfVoltage DACCodeOfVoltage(0.000002) expect 0x000001 // 0.000V + 0.5LSB |
whismanoid | 25:9d4012b0887f | 5508 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 5509 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5510 | // docTest_item['action'] = 'DACCodeOfVoltage(0.000002) expect 0x000001' |
whismanoid | 25:9d4012b0887f | 5511 | // docTest_item['remarks'] = '0.000V + 0.5LSB' |
whismanoid | 25:9d4012b0887f | 5512 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5513 | // docTest_item['arglist'] = '0.000002' |
whismanoid | 25:9d4012b0887f | 5514 | // docTest_item['expect-value'] = '0x000001' |
whismanoid | 25:9d4012b0887f | 5515 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + 0.5LSB |
whismanoid | 30:13fc9d492ee0 | 5516 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 5517 | // call-function |
whismanoid | 27:485b1b2f334c | 5518 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 5519 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.000002), (uint32_t)0x000001); // 0.000V + 0.5LSB |
whismanoid | 25:9d4012b0887f | 5520 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.000002, /* expect: */ (uint32_t)0x000001); // 0.000V + 0.5LSB |
whismanoid | 30:13fc9d492ee0 | 5521 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5522 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 5523 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 5524 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 5525 | |
whismanoid | 25:9d4012b0887f | 5526 | // @test group DACCodeOfVoltage DACCodeOfVoltage(0.000004) expect 0x000001 // 0.000V + 1.0LSB |
whismanoid | 25:9d4012b0887f | 5527 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 5528 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5529 | // docTest_item['action'] = 'DACCodeOfVoltage(0.000004) expect 0x000001' |
whismanoid | 25:9d4012b0887f | 5530 | // docTest_item['remarks'] = '0.000V + 1.0LSB' |
whismanoid | 25:9d4012b0887f | 5531 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5532 | // docTest_item['arglist'] = '0.000004' |
whismanoid | 25:9d4012b0887f | 5533 | // docTest_item['expect-value'] = '0x000001' |
whismanoid | 25:9d4012b0887f | 5534 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + 1.0LSB |
whismanoid | 30:13fc9d492ee0 | 5535 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 5536 | // call-function |
whismanoid | 27:485b1b2f334c | 5537 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 5538 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.000004), (uint32_t)0x000001); // 0.000V + 1.0LSB |
whismanoid | 25:9d4012b0887f | 5539 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.000004, /* expect: */ (uint32_t)0x000001); // 0.000V + 1.0LSB |
whismanoid | 30:13fc9d492ee0 | 5540 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5541 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 5542 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 5543 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 5544 | |
whismanoid | 25:9d4012b0887f | 5545 | // @test group DACCodeOfVoltage DACCodeOfVoltage(0.000006) expect 0x000002 // 0.000V + 1.5LSB |
whismanoid | 25:9d4012b0887f | 5546 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 5547 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5548 | // docTest_item['action'] = 'DACCodeOfVoltage(0.000006) expect 0x000002' |
whismanoid | 25:9d4012b0887f | 5549 | // docTest_item['remarks'] = '0.000V + 1.5LSB' |
whismanoid | 25:9d4012b0887f | 5550 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5551 | // docTest_item['arglist'] = '0.000006' |
whismanoid | 25:9d4012b0887f | 5552 | // docTest_item['expect-value'] = '0x000002' |
whismanoid | 25:9d4012b0887f | 5553 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + 1.5LSB |
whismanoid | 30:13fc9d492ee0 | 5554 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 5555 | // call-function |
whismanoid | 27:485b1b2f334c | 5556 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 5557 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.000006), (uint32_t)0x000002); // 0.000V + 1.5LSB |
whismanoid | 25:9d4012b0887f | 5558 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.000006, /* expect: */ (uint32_t)0x000002); // 0.000V + 1.5LSB |
whismanoid | 30:13fc9d492ee0 | 5559 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5560 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 5561 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 5562 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 5563 | |
whismanoid | 25:9d4012b0887f | 5564 | // @test group DACCodeOfVoltage DACCodeOfVoltage(0.000008) expect 0x000002 // 0.000V + 2.0LSB |
whismanoid | 25:9d4012b0887f | 5565 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 5566 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5567 | // docTest_item['action'] = 'DACCodeOfVoltage(0.000008) expect 0x000002' |
whismanoid | 25:9d4012b0887f | 5568 | // docTest_item['remarks'] = '0.000V + 2.0LSB' |
whismanoid | 25:9d4012b0887f | 5569 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5570 | // docTest_item['arglist'] = '0.000008' |
whismanoid | 25:9d4012b0887f | 5571 | // docTest_item['expect-value'] = '0x000002' |
whismanoid | 25:9d4012b0887f | 5572 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + 2.0LSB |
whismanoid | 30:13fc9d492ee0 | 5573 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 5574 | // call-function |
whismanoid | 27:485b1b2f334c | 5575 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 5576 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.000008), (uint32_t)0x000002); // 0.000V + 2.0LSB |
whismanoid | 25:9d4012b0887f | 5577 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.000008, /* expect: */ (uint32_t)0x000002); // 0.000V + 2.0LSB |
whismanoid | 30:13fc9d492ee0 | 5578 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5579 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 5580 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 5581 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 5582 | |
whismanoid | 25:9d4012b0887f | 5583 | // @test group DACCodeOfVoltage DACCodeOfVoltage(0.000010) expect 0x000003 // 0.000V + 2.5LSB |
whismanoid | 25:9d4012b0887f | 5584 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 5585 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5586 | // docTest_item['action'] = 'DACCodeOfVoltage(0.000010) expect 0x000003' |
whismanoid | 25:9d4012b0887f | 5587 | // docTest_item['remarks'] = '0.000V + 2.5LSB' |
whismanoid | 25:9d4012b0887f | 5588 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5589 | // docTest_item['arglist'] = '0.000010' |
whismanoid | 25:9d4012b0887f | 5590 | // docTest_item['expect-value'] = '0x000003' |
whismanoid | 25:9d4012b0887f | 5591 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + 2.5LSB |
whismanoid | 30:13fc9d492ee0 | 5592 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 5593 | // call-function |
whismanoid | 27:485b1b2f334c | 5594 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 5595 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.000010), (uint32_t)0x000003); // 0.000V + 2.5LSB |
whismanoid | 25:9d4012b0887f | 5596 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.000010, /* expect: */ (uint32_t)0x000003); // 0.000V + 2.5LSB |
whismanoid | 30:13fc9d492ee0 | 5597 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5598 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 5599 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 5600 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 5601 | |
whismanoid | 25:9d4012b0887f | 5602 | // @test group DACCodeOfVoltage DACCodeOfVoltage(0.000012) expect 0x000003 // 0.000V + 3.0LSB |
whismanoid | 25:9d4012b0887f | 5603 | // docTest_item['actionType'] = 'call-function' |
whismanoid | 25:9d4012b0887f | 5604 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5605 | // docTest_item['action'] = 'DACCodeOfVoltage(0.000012) expect 0x000003' |
whismanoid | 25:9d4012b0887f | 5606 | // docTest_item['remarks'] = '0.000V + 3.0LSB' |
whismanoid | 25:9d4012b0887f | 5607 | // docTest_item['funcName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5608 | // docTest_item['arglist'] = '0.000012' |
whismanoid | 25:9d4012b0887f | 5609 | // docTest_item['expect-value'] = '0x000003' |
whismanoid | 25:9d4012b0887f | 5610 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage DACCodeOfVoltage 0.000V + 3.0LSB |
whismanoid | 30:13fc9d492ee0 | 5611 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 5612 | // call-function |
whismanoid | 27:485b1b2f334c | 5613 | // selfTestFunctionClosures['DACCodeOfVoltage']['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 5614 | // ASSERT_EQ(g_MAX5719_device.DACCodeOfVoltage((double)0.000012), (uint32_t)0x000003); // 0.000V + 3.0LSB |
whismanoid | 25:9d4012b0887f | 5615 | tinyTester.FunctionCall_lu_f_Expect("MAX5719.DACCodeOfVoltage", fn_MAX5719_DACCodeOfVoltage, (double)0.000012, /* expect: */ (uint32_t)0x000003); // 0.000V + 3.0LSB |
whismanoid | 30:13fc9d492ee0 | 5616 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5617 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 5618 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 5619 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 5620 | |
whismanoid | 25:9d4012b0887f | 5621 | // @test group DACCodeOfVoltage tinyTester.blink_time_msec = 75 // default 75 resume hardware self test |
whismanoid | 25:9d4012b0887f | 5622 | // docTest_item['actionType'] = 'assign-propname-value' |
whismanoid | 25:9d4012b0887f | 5623 | // docTest_item['group-id-value'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5624 | // docTest_item['action'] = 'tinyTester.blink_time_msec = 75' |
whismanoid | 25:9d4012b0887f | 5625 | // docTest_item['remarks'] = 'default 75 resume hardware self test' |
whismanoid | 25:9d4012b0887f | 5626 | // docTest_item['propName'] = 'tinyTester.blink_time_msec' |
whismanoid | 25:9d4012b0887f | 5627 | // docTest_item['propValue'] = '75' |
whismanoid | 25:9d4012b0887f | 5628 | #if MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage None default 75 resume hardware self test |
whismanoid | 30:13fc9d492ee0 | 5629 | if (SelfTestGroupEnable & 0x0008) { |
whismanoid | 25:9d4012b0887f | 5630 | // assign-propname-value |
whismanoid | 25:9d4012b0887f | 5631 | // tinyTesterPropName = "tinyTester.blink_time_msec" |
whismanoid | 25:9d4012b0887f | 5632 | // tinyTesterPropValue = "75" |
whismanoid | 25:9d4012b0887f | 5633 | tinyTester.blink_time_msec = 75; |
whismanoid | 30:13fc9d492ee0 | 5634 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5635 | if ((SelfTestGroupEnable & 0x0001) && (tinyTester.nFail != 0)) { goto exitTesting; } |
whismanoid | 30:13fc9d492ee0 | 5636 | } // if (SelfTestGroupEnable & 0x0008) |
whismanoid | 25:9d4012b0887f | 5637 | #endif // MAX5719_SELFTEST_DACCodeOfVoltage // group DACCodeOfVoltage |
whismanoid | 25:9d4012b0887f | 5638 | |
whismanoid | 25:9d4012b0887f | 5639 | // |
whismanoid | 25:9d4012b0887f | 5640 | #if INJECT_SELFTEST_FAIL |
whismanoid | 25:9d4012b0887f | 5641 | // Test of the pass/fail report mechanism |
whismanoid | 25:9d4012b0887f | 5642 | tinyTester.FAIL(); |
whismanoid | 25:9d4012b0887f | 5643 | cmdLine.serial().print(F("injecting one false failure for test reporting")); |
whismanoid | 25:9d4012b0887f | 5644 | #endif |
whismanoid | 25:9d4012b0887f | 5645 | // |
whismanoid | 30:13fc9d492ee0 | 5646 | // repeat-until-failure logic |
whismanoid | 30:13fc9d492ee0 | 5647 | if ((SelfTestGroupEnable & 0x0002) && (tinyTester.nFail == 0)) { goto repeatUntilFailure; } |
whismanoid | 30:13fc9d492ee0 | 5648 | // |
whismanoid | 30:13fc9d492ee0 | 5649 | // halt-on-first-failure logic |
whismanoid | 30:13fc9d492ee0 | 5650 | exitTesting: |
whismanoid | 30:13fc9d492ee0 | 5651 | // |
whismanoid | 25:9d4012b0887f | 5652 | // Report number of pass and number of fail test results |
whismanoid | 25:9d4012b0887f | 5653 | tinyTester.Report_Summary(); |
whismanoid | 25:9d4012b0887f | 5654 | } |
whismanoid | 25:9d4012b0887f | 5655 | |
whismanoid | 25:9d4012b0887f | 5656 | //-------------------------------------------------- |
whismanoid | 25:9d4012b0887f | 5657 | // selfTestFunctionClosures[functionName]['functionName'] = 'Init' |
whismanoid | 25:9d4012b0887f | 5658 | // selfTestFunctionClosures[functionName]['argListDeclaration'] = 'void' |
whismanoid | 25:9d4012b0887f | 5659 | // selfTestFunctionClosures[functionName]['returnType'] = 'void' |
whismanoid | 25:9d4012b0887f | 5660 | // selfTestFunctionClosures[functionName]['argNames'] = '' |
whismanoid | 25:9d4012b0887f | 5661 | // CommandParamIn_declaration = 'void' |
whismanoid | 25:9d4012b0887f | 5662 | // argNames_recast_implementation = '' |
whismanoid | 25:9d4012b0887f | 5663 | //-------------------------------------------------- |
whismanoid | 25:9d4012b0887f | 5664 | // selftest: define function under test |
whismanoid | 25:9d4012b0887f | 5665 | // void MAX5719::Init(void) |
whismanoid | 25:9d4012b0887f | 5666 | void fn_MAX5719_Init(void) |
whismanoid | 25:9d4012b0887f | 5667 | { |
whismanoid | 25:9d4012b0887f | 5668 | return g_MAX5719_device.Init(); |
whismanoid | 25:9d4012b0887f | 5669 | } |
whismanoid | 25:9d4012b0887f | 5670 | |
whismanoid | 25:9d4012b0887f | 5671 | //-------------------------------------------------- |
whismanoid | 25:9d4012b0887f | 5672 | // selfTestFunctionClosures[functionName]['functionName'] = 'CODE_LOAD' |
whismanoid | 25:9d4012b0887f | 5673 | // selfTestFunctionClosures[functionName]['argListDeclaration'] = 'uint32_t dacCodeLsbs' |
whismanoid | 25:9d4012b0887f | 5674 | // selfTestFunctionClosures[functionName]['returnType'] = 'uint8_t' |
whismanoid | 25:9d4012b0887f | 5675 | // selfTestFunctionClosures[functionName]['argNames'] = 'dacCodeLsbs' |
whismanoid | 25:9d4012b0887f | 5676 | // CommandParamIn_declaration = 'uint32_t dacCodeLsbs' |
whismanoid | 25:9d4012b0887f | 5677 | // argNames_recast_implementation = '(uint32_t)dacCodeLsbs' |
whismanoid | 25:9d4012b0887f | 5678 | //-------------------------------------------------- |
whismanoid | 25:9d4012b0887f | 5679 | // selftest: define function under test |
whismanoid | 25:9d4012b0887f | 5680 | // uint8_t MAX5719::CODE_LOAD(uint32_t dacCodeLsbs) |
whismanoid | 25:9d4012b0887f | 5681 | uint8_t fn_MAX5719_CODE_LOAD(uint32_t dacCodeLsbs) |
whismanoid | 25:9d4012b0887f | 5682 | { |
whismanoid | 25:9d4012b0887f | 5683 | return g_MAX5719_device.CODE_LOAD((uint32_t)dacCodeLsbs); |
whismanoid | 25:9d4012b0887f | 5684 | } |
whismanoid | 25:9d4012b0887f | 5685 | |
whismanoid | 25:9d4012b0887f | 5686 | //-------------------------------------------------- |
whismanoid | 25:9d4012b0887f | 5687 | // selfTestFunctionClosures[functionName]['functionName'] = 'DACCodeOfVoltage' |
whismanoid | 25:9d4012b0887f | 5688 | // selfTestFunctionClosures[functionName]['argListDeclaration'] = 'double voltageV' |
whismanoid | 25:9d4012b0887f | 5689 | // selfTestFunctionClosures[functionName]['returnType'] = 'uint32_t' |
whismanoid | 25:9d4012b0887f | 5690 | // selfTestFunctionClosures[functionName]['argNames'] = 'voltageV' |
whismanoid | 25:9d4012b0887f | 5691 | // CommandParamIn_declaration = 'double voltageV' |
whismanoid | 25:9d4012b0887f | 5692 | // argNames_recast_implementation = '(double)voltageV' |
whismanoid | 25:9d4012b0887f | 5693 | //-------------------------------------------------- |
whismanoid | 25:9d4012b0887f | 5694 | // selftest: define function under test |
whismanoid | 25:9d4012b0887f | 5695 | // uint32_t MAX5719::DACCodeOfVoltage(double voltageV) |
whismanoid | 25:9d4012b0887f | 5696 | uint32_t fn_MAX5719_DACCodeOfVoltage(double voltageV) |
whismanoid | 25:9d4012b0887f | 5697 | { |
whismanoid | 25:9d4012b0887f | 5698 | return g_MAX5719_device.DACCodeOfVoltage((double)voltageV); |
whismanoid | 25:9d4012b0887f | 5699 | } |
whismanoid | 25:9d4012b0887f | 5700 | |
whismanoid | 25:9d4012b0887f | 5701 | |
whismanoid | 25:9d4012b0887f | 5702 | //-------------------------------------------------- |
whismanoid | 25:9d4012b0887f | 5703 | inline void print_command_prompt() |
whismanoid | 25:9d4012b0887f | 5704 | { |
whismanoid | 25:9d4012b0887f | 5705 | cmdLine_serial.serial().printf("\r\n> "); |
whismanoid | 25:9d4012b0887f | 5706 | |
whismanoid | 25:9d4012b0887f | 5707 | } |
whismanoid | 25:9d4012b0887f | 5708 | |
whismanoid | 25:9d4012b0887f | 5709 | |
whismanoid | 25:9d4012b0887f | 5710 | //-------------------------------------------------- |
whismanoid | 25:9d4012b0887f | 5711 | void pinsMonitor_submenu_onEOLcommandParser(CmdLine& cmdLine) |
whismanoid | 25:9d4012b0887f | 5712 | { |
whismanoid | 25:9d4012b0887f | 5713 | // % diagnostic commands submenu |
whismanoid | 25:9d4012b0887f | 5714 | // %Hpin -- digital output high |
whismanoid | 25:9d4012b0887f | 5715 | // %Lpin -- digital output low |
whismanoid | 25:9d4012b0887f | 5716 | // %?pin -- digital input |
whismanoid | 25:9d4012b0887f | 5717 | // %A %Apin -- analog input |
whismanoid | 25:9d4012b0887f | 5718 | // %Ppin df=xx -- pwm output |
whismanoid | 25:9d4012b0887f | 5719 | // %Wpin -- measure high pulsewidth input in usec |
whismanoid | 25:9d4012b0887f | 5720 | // %wpin -- measure low pulsewidth input in usec |
whismanoid | 25:9d4012b0887f | 5721 | // %I... -- I2C diagnostics |
whismanoid | 25:9d4012b0887f | 5722 | // %IP -- I2C probe |
whismanoid | 25:9d4012b0887f | 5723 | // %IC scl=100khz ADDR=? -- I2C configure |
whismanoid | 25:9d4012b0887f | 5724 | // %IW byte byte ... byte RD=? ADDR=0x -- write |
whismanoid | 25:9d4012b0887f | 5725 | // %IR ADDR=? RD=? -- read |
whismanoid | 25:9d4012b0887f | 5726 | // %I^ cmd=? -- i2c_smbus_read_word_data |
whismanoid | 25:9d4012b0887f | 5727 | // %S... -- SPI diagnostics |
whismanoid | 25:9d4012b0887f | 5728 | // %SC sclk=1Mhz -- SPI configure |
whismanoid | 25:9d4012b0887f | 5729 | // %SW -- write (write and read) |
whismanoid | 25:9d4012b0887f | 5730 | // %SR -- read (alias for %SW because SPI always write and read) |
whismanoid | 25:9d4012b0887f | 5731 | // A-Z,a-z,0-9 reserved for application use |
whismanoid | 25:9d4012b0887f | 5732 | // |
whismanoid | 25:9d4012b0887f | 5733 | char strPinIndex[3]; |
whismanoid | 25:9d4012b0887f | 5734 | strPinIndex[0] = cmdLine[2]; |
whismanoid | 25:9d4012b0887f | 5735 | strPinIndex[1] = cmdLine[3]; |
whismanoid | 25:9d4012b0887f | 5736 | strPinIndex[2] = '\0'; |
whismanoid | 25:9d4012b0887f | 5737 | int pinIndex = strtoul(strPinIndex, NULL, 10); // strtol(str, NULL, 10): get decimal value |
whismanoid | 25:9d4012b0887f | 5738 | //cmdLine.serial().printf(" pinIndex=%d ", pinIndex); |
whismanoid | 25:9d4012b0887f | 5739 | // |
whismanoid | 25:9d4012b0887f | 5740 | // get next character |
whismanoid | 25:9d4012b0887f | 5741 | switch (cmdLine[1]) |
whismanoid | 25:9d4012b0887f | 5742 | { |
whismanoid | 25:9d4012b0887f | 5743 | #if HAS_digitalInOuts |
whismanoid | 25:9d4012b0887f | 5744 | case 'H': case 'h': |
whismanoid | 25:9d4012b0887f | 5745 | { |
whismanoid | 25:9d4012b0887f | 5746 | // %Hpin -- digital output high |
whismanoid | 25:9d4012b0887f | 5747 | #if ARDUINO_STYLE |
whismanoid | 25:9d4012b0887f | 5748 | pinMode(pinIndex, OUTPUT); // digital pins 0, 1, 2, .. 13, analog input pins A0, A1, .. A5 |
whismanoid | 25:9d4012b0887f | 5749 | digitalWrite(pinIndex, HIGH); // digital pins 0, 1, 2, .. 13, analog input pins A0, A1, .. A5 |
whismanoid | 25:9d4012b0887f | 5750 | #else |
whismanoid | 25:9d4012b0887f | 5751 | DigitalInOut& digitalInOutPin = find_digitalInOutPin(pinIndex); |
whismanoid | 25:9d4012b0887f | 5752 | digitalInOutPin.output(); |
whismanoid | 25:9d4012b0887f | 5753 | digitalInOutPin.write(1); |
whismanoid | 25:9d4012b0887f | 5754 | #endif |
whismanoid | 25:9d4012b0887f | 5755 | cmdLine.serial().printf(" digitalInOutPin %d Output High ", pinIndex); |
whismanoid | 25:9d4012b0887f | 5756 | } |
whismanoid | 25:9d4012b0887f | 5757 | break; |
whismanoid | 25:9d4012b0887f | 5758 | case 'L': case 'l': |
whismanoid | 25:9d4012b0887f | 5759 | { |
whismanoid | 25:9d4012b0887f | 5760 | // %Lpin -- digital output low |
whismanoid | 25:9d4012b0887f | 5761 | #if ARDUINO_STYLE |
whismanoid | 25:9d4012b0887f | 5762 | pinMode(pinIndex, OUTPUT); // digital pins 0, 1, 2, .. 13, analog input pins A0, A1, .. A5 |
whismanoid | 25:9d4012b0887f | 5763 | digitalWrite(pinIndex, LOW); // digital pins 0, 1, 2, .. 13, analog input pins A0, A1, .. A5 |
whismanoid | 25:9d4012b0887f | 5764 | #else |
whismanoid | 25:9d4012b0887f | 5765 | DigitalInOut& digitalInOutPin = find_digitalInOutPin(pinIndex); |
whismanoid | 25:9d4012b0887f | 5766 | digitalInOutPin.output(); |
whismanoid | 25:9d4012b0887f | 5767 | digitalInOutPin.write(0); |
whismanoid | 25:9d4012b0887f | 5768 | #endif |
whismanoid | 25:9d4012b0887f | 5769 | cmdLine.serial().printf(" digitalInOutPin %d Output Low ", pinIndex); |
whismanoid | 25:9d4012b0887f | 5770 | } |
whismanoid | 25:9d4012b0887f | 5771 | break; |
whismanoid | 25:9d4012b0887f | 5772 | case '?': |
whismanoid | 25:9d4012b0887f | 5773 | { |
whismanoid | 25:9d4012b0887f | 5774 | // %?pin -- digital input |
whismanoid | 25:9d4012b0887f | 5775 | #if ARDUINO_STYLE |
whismanoid | 25:9d4012b0887f | 5776 | pinMode(pinIndex, INPUT); // digital pins 0, 1, 2, .. 13, analog input pins A0, A1, .. A5 |
whismanoid | 25:9d4012b0887f | 5777 | #else |
whismanoid | 25:9d4012b0887f | 5778 | DigitalInOut& digitalInOutPin = find_digitalInOutPin(pinIndex); |
whismanoid | 25:9d4012b0887f | 5779 | digitalInOutPin.input(); |
whismanoid | 25:9d4012b0887f | 5780 | #endif |
whismanoid | 25:9d4012b0887f | 5781 | serial.printf(" digitalInOutPin %d Input ", pinIndex); |
whismanoid | 25:9d4012b0887f | 5782 | #if ARDUINO_STYLE |
whismanoid | 25:9d4012b0887f | 5783 | int value = digitalRead(pinIndex); |
whismanoid | 25:9d4012b0887f | 5784 | #else |
whismanoid | 25:9d4012b0887f | 5785 | int value = digitalInOutPin.read(); |
whismanoid | 25:9d4012b0887f | 5786 | #endif |
whismanoid | 25:9d4012b0887f | 5787 | cmdLine.serial().printf("%d ", value); |
whismanoid | 25:9d4012b0887f | 5788 | } |
whismanoid | 25:9d4012b0887f | 5789 | break; |
whismanoid | 25:9d4012b0887f | 5790 | #endif |
whismanoid | 25:9d4012b0887f | 5791 | // |
whismanoid | 25:9d4012b0887f | 5792 | #if HAS_analogIns |
whismanoid | 25:9d4012b0887f | 5793 | case 'A': case 'a': |
whismanoid | 25:9d4012b0887f | 5794 | { |
whismanoid | 25:9d4012b0887f | 5795 | // %A %Apin -- analog input |
whismanoid | 25:9d4012b0887f | 5796 | #if analogIn4_IS_HIGH_RANGE_OF_analogIn0 |
whismanoid | 25:9d4012b0887f | 5797 | // Platform board uses AIN4,AIN5,.. as high range of AIN0,AIN1,.. |
whismanoid | 25:9d4012b0887f | 5798 | for (int pinIndex = 0; pinIndex < 2; pinIndex++) |
whismanoid | 25:9d4012b0887f | 5799 | { |
whismanoid | 25:9d4012b0887f | 5800 | int cPinIndex = '0' + pinIndex; |
whismanoid | 25:9d4012b0887f | 5801 | AnalogIn& analogInPin = find_analogInPin(cPinIndex); |
whismanoid | 25:9d4012b0887f | 5802 | float adc_full_scale_voltage = analogInPin_fullScaleVoltage[pinIndex]; |
whismanoid | 25:9d4012b0887f | 5803 | float normValue_0_1 = analogInPin.read(); |
whismanoid | 25:9d4012b0887f | 5804 | // |
whismanoid | 25:9d4012b0887f | 5805 | int pinIndexH = pinIndex + 4; |
whismanoid | 25:9d4012b0887f | 5806 | int cPinIndexH = '0' + pinIndexH; |
whismanoid | 25:9d4012b0887f | 5807 | AnalogIn& analogInPinH = find_analogInPin(cPinIndexH); |
whismanoid | 25:9d4012b0887f | 5808 | float adc_full_scale_voltageH = analogInPin_fullScaleVoltage[pinIndexH]; |
whismanoid | 25:9d4012b0887f | 5809 | float normValueH_0_1 = analogInPinH.read(); |
whismanoid | 25:9d4012b0887f | 5810 | // |
whismanoid | 25:9d4012b0887f | 5811 | cmdLine.serial().printf("AIN%c = %7.3f%% = %1.3fV AIN%c = %7.3f%% = %1.3fV \r\n", |
whismanoid | 25:9d4012b0887f | 5812 | cPinIndex, |
whismanoid | 25:9d4012b0887f | 5813 | normValue_0_1 * 100.0, |
whismanoid | 25:9d4012b0887f | 5814 | normValue_0_1 * adc_full_scale_voltage, |
whismanoid | 25:9d4012b0887f | 5815 | cPinIndexH, |
whismanoid | 25:9d4012b0887f | 5816 | normValueH_0_1 * 100.0, |
whismanoid | 25:9d4012b0887f | 5817 | normValueH_0_1 * adc_full_scale_voltageH |
whismanoid | 25:9d4012b0887f | 5818 | ); |
whismanoid | 25:9d4012b0887f | 5819 | } |
whismanoid | 25:9d4012b0887f | 5820 | for (int pinIndex = 2; pinIndex < 4; pinIndex++) |
whismanoid | 25:9d4012b0887f | 5821 | { |
whismanoid | 25:9d4012b0887f | 5822 | int cPinIndex = '0' + pinIndex; |
whismanoid | 25:9d4012b0887f | 5823 | AnalogIn& analogInPin = find_analogInPin(cPinIndex); |
whismanoid | 25:9d4012b0887f | 5824 | float adc_full_scale_voltage = analogInPin_fullScaleVoltage[pinIndex]; |
whismanoid | 25:9d4012b0887f | 5825 | float normValue_0_1 = analogInPin.read(); |
whismanoid | 25:9d4012b0887f | 5826 | // |
whismanoid | 25:9d4012b0887f | 5827 | cmdLine.serial().printf("AIN%c = %7.3f%% = %1.3fV\r\n", |
whismanoid | 25:9d4012b0887f | 5828 | cPinIndex, |
whismanoid | 25:9d4012b0887f | 5829 | normValue_0_1 * 100.0, |
whismanoid | 25:9d4012b0887f | 5830 | normValue_0_1 * adc_full_scale_voltage |
whismanoid | 25:9d4012b0887f | 5831 | ); |
whismanoid | 25:9d4012b0887f | 5832 | } |
whismanoid | 25:9d4012b0887f | 5833 | #else // analogIn4_IS_HIGH_RANGE_OF_analogIn0 |
whismanoid | 25:9d4012b0887f | 5834 | // Platform board uses simple analog inputs |
whismanoid | 25:9d4012b0887f | 5835 | // assume standard Arduino analog inputs A0-A5 |
whismanoid | 25:9d4012b0887f | 5836 | for (int pinIndex = 0; pinIndex < 6; pinIndex++) |
whismanoid | 25:9d4012b0887f | 5837 | { |
whismanoid | 25:9d4012b0887f | 5838 | int cPinIndex = '0' + pinIndex; |
whismanoid | 25:9d4012b0887f | 5839 | AnalogIn& analogInPin = find_analogInPin(cPinIndex); |
whismanoid | 25:9d4012b0887f | 5840 | float adc_full_scale_voltage = analogInPin_fullScaleVoltage[pinIndex]; |
whismanoid | 25:9d4012b0887f | 5841 | float normValue_0_1 = analogInPin.read(); |
whismanoid | 25:9d4012b0887f | 5842 | // |
whismanoid | 25:9d4012b0887f | 5843 | cmdLine.serial().printf("AIN%c = %7.3f%% = %1.3fV\r\n", |
whismanoid | 25:9d4012b0887f | 5844 | cPinIndex, |
whismanoid | 25:9d4012b0887f | 5845 | normValue_0_1 * 100.0, |
whismanoid | 25:9d4012b0887f | 5846 | normValue_0_1 * adc_full_scale_voltage |
whismanoid | 25:9d4012b0887f | 5847 | ); |
whismanoid | 25:9d4012b0887f | 5848 | } |
whismanoid | 25:9d4012b0887f | 5849 | #endif // analogIn4_IS_HIGH_RANGE_OF_analogIn0 |
whismanoid | 25:9d4012b0887f | 5850 | } |
whismanoid | 25:9d4012b0887f | 5851 | break; |
whismanoid | 25:9d4012b0887f | 5852 | #endif |
whismanoid | 25:9d4012b0887f | 5853 | // |
whismanoid | 25:9d4012b0887f | 5854 | #if HAS_SPI2_MAX541 |
whismanoid | 25:9d4012b0887f | 5855 | case 'D': case 'd': |
whismanoid | 25:9d4012b0887f | 5856 | { |
whismanoid | 25:9d4012b0887f | 5857 | // %D -- DAC output MAX541 (SPI2) -- need cmdLine.parse_float(voltageV) |
whismanoid | 25:9d4012b0887f | 5858 | // MAX541 max541(spi2_max541, spi2_max541_cs); |
whismanoid | 25:9d4012b0887f | 5859 | float voltageV = max541.Get_Voltage(); |
whismanoid | 25:9d4012b0887f | 5860 | // if (cmdLine[2] == '+') { |
whismanoid | 25:9d4012b0887f | 5861 | // // %D+ |
whismanoid | 25:9d4012b0887f | 5862 | // voltageV = voltageV * 1.25f; |
whismanoid | 25:9d4012b0887f | 5863 | // if (voltageV >= max541.VRef) voltageV = max541.VRef; |
whismanoid | 25:9d4012b0887f | 5864 | // SelfTest_MAX541_Voltage(cmdLine, max541, voltageV); |
whismanoid | 25:9d4012b0887f | 5865 | // } |
whismanoid | 25:9d4012b0887f | 5866 | // else if (cmdLine[2] == '-') { |
whismanoid | 25:9d4012b0887f | 5867 | // // %D- |
whismanoid | 25:9d4012b0887f | 5868 | // voltageV = voltageV * 0.75f; |
whismanoid | 25:9d4012b0887f | 5869 | // if (voltageV < 0.1f) voltageV = 0.1f; |
whismanoid | 25:9d4012b0887f | 5870 | // SelfTest_MAX541_Voltage(cmdLine, max541, voltageV); |
whismanoid | 25:9d4012b0887f | 5871 | // } |
whismanoid | 25:9d4012b0887f | 5872 | if (cmdLine.parse_float("V", voltageV)) |
whismanoid | 25:9d4012b0887f | 5873 | { |
whismanoid | 25:9d4012b0887f | 5874 | // %D V=1.234 -- set voltage |
whismanoid | 25:9d4012b0887f | 5875 | max541.Set_Voltage(voltageV); |
whismanoid | 25:9d4012b0887f | 5876 | } |
whismanoid | 25:9d4012b0887f | 5877 | else if (cmdLine.parse_float("TEST", voltageV)) |
whismanoid | 25:9d4012b0887f | 5878 | { |
whismanoid | 25:9d4012b0887f | 5879 | // %D TEST=1.234 -- set voltage and compare with AIN0 |
whismanoid | 25:9d4012b0887f | 5880 | SelfTest_MAX541_Voltage(cmdLine, max541, voltageV); |
whismanoid | 25:9d4012b0887f | 5881 | } |
whismanoid | 25:9d4012b0887f | 5882 | else if (cmdLine.parse_float("CAL", voltageV)) |
whismanoid | 25:9d4012b0887f | 5883 | { |
whismanoid | 25:9d4012b0887f | 5884 | // %D CAL=1.234 -- calibrate VRef and compare with AIN0 |
whismanoid | 25:9d4012b0887f | 5885 | |
whismanoid | 25:9d4012b0887f | 5886 | max541.Set_Code(0x8000); // we don't know the fullscale voltage yet, so set code to midscale |
whismanoid | 25:9d4012b0887f | 5887 | 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 | 5888 | const int average_count = 100; |
whismanoid | 25:9d4012b0887f | 5889 | const double average_K = 0.25; |
whismanoid | 25:9d4012b0887f | 5890 | for (int count = 0; count < average_count; count++) { |
whismanoid | 25:9d4012b0887f | 5891 | double measurement_V = analogInPin_fullScaleVoltage[4] * analogIn4.read(); // TARGET_MAX32630 J1.5 AIN_4 = AIN0 / 5.0 fullscale is 6.0V |
whismanoid | 25:9d4012b0887f | 5892 | max541_midscale_V = ((1 - average_K) * max541_midscale_V) + (average_K * measurement_V); |
whismanoid | 25:9d4012b0887f | 5893 | } |
whismanoid | 25:9d4012b0887f | 5894 | max541.VRef = 2.0 * max541_midscale_V; |
whismanoid | 25:9d4012b0887f | 5895 | cmdLine.serial().printf( |
whismanoid | 25:9d4012b0887f | 5896 | "\r\n MAX541 midscale = %1.3fV, so fullscale = %1.3fV", |
whismanoid | 25:9d4012b0887f | 5897 | max541_midscale_V, max541.VRef); |
whismanoid | 25:9d4012b0887f | 5898 | // Detect whether MAX541 is really connected to MAX32625MBED.AIN0/AIN4 |
whismanoid | 25:9d4012b0887f | 5899 | voltageV = 1.0f; |
whismanoid | 25:9d4012b0887f | 5900 | SelfTest_MAX541_Voltage(cmdLine, max541, voltageV); |
whismanoid | 25:9d4012b0887f | 5901 | } |
whismanoid | 25:9d4012b0887f | 5902 | else { |
whismanoid | 25:9d4012b0887f | 5903 | // %D -- print MAX541 DAC status |
whismanoid | 25:9d4012b0887f | 5904 | cmdLine.serial().printf("MAX541 code=0x%4.4x = %1.3fV VRef=%1.3fV\r\n", |
whismanoid | 25:9d4012b0887f | 5905 | max541.Get_Code(), max541.Get_Voltage(), max541.VRef); |
whismanoid | 25:9d4012b0887f | 5906 | } |
whismanoid | 25:9d4012b0887f | 5907 | } |
whismanoid | 25:9d4012b0887f | 5908 | break; |
whismanoid | 25:9d4012b0887f | 5909 | #endif |
whismanoid | 25:9d4012b0887f | 5910 | |
whismanoid | 25:9d4012b0887f | 5911 | // |
whismanoid | 25:9d4012b0887f | 5912 | #if HAS_I2C // SUPPORT_I2C |
whismanoid | 25:9d4012b0887f | 5913 | case 'I': case 'i': |
whismanoid | 25:9d4012b0887f | 5914 | // %I... -- I2C diagnostics |
whismanoid | 25:9d4012b0887f | 5915 | // %IP -- I2C probe |
whismanoid | 25:9d4012b0887f | 5916 | // %IC scl=100khz ADDR=? -- I2C configure |
whismanoid | 25:9d4012b0887f | 5917 | // %IW byte byte ... byte RD=? ADDR=0x -- write |
whismanoid | 25:9d4012b0887f | 5918 | // %IR ADDR=? RD=? -- read |
whismanoid | 25:9d4012b0887f | 5919 | // %I^ cmd=? -- i2c_smbus_read_word_data |
whismanoid | 25:9d4012b0887f | 5920 | // get next character |
whismanoid | 25:9d4012b0887f | 5921 | // TODO: parse cmdLine arg (ADDR=\d+)? --> g_I2C_deviceAddress7 |
whismanoid | 25:9d4012b0887f | 5922 | cmdLine.parse_byte_hex("ADDR", g_I2C_deviceAddress7); |
whismanoid | 25:9d4012b0887f | 5923 | // TODO: parse cmdLine arg (RD=\d)? --> g_I2C_read_count |
whismanoid | 25:9d4012b0887f | 5924 | g_I2C_read_count = 0; // read count must be reset every command |
whismanoid | 25:9d4012b0887f | 5925 | cmdLine.parse_byte_dec("RD", g_I2C_read_count); |
whismanoid | 25:9d4012b0887f | 5926 | // TODO: parse cmdLine arg (CMD=\d)? --> g_I2C_command_regAddress |
whismanoid | 25:9d4012b0887f | 5927 | cmdLine.parse_byte_hex("CMD", g_I2C_command_regAddress); |
whismanoid | 25:9d4012b0887f | 5928 | switch (cmdLine[2]) |
whismanoid | 25:9d4012b0887f | 5929 | { |
whismanoid | 25:9d4012b0887f | 5930 | case 'P': case 'p': |
whismanoid | 25:9d4012b0887f | 5931 | { |
whismanoid | 25:9d4012b0887f | 5932 | // %IP -- I2C probe |
whismanoid | 25:9d4012b0887f | 5933 | HuntAttachedI2CDevices(cmdLine, 0x03, 0x77); |
whismanoid | 25:9d4012b0887f | 5934 | } |
whismanoid | 25:9d4012b0887f | 5935 | break; |
whismanoid | 25:9d4012b0887f | 5936 | case 'C': case 'c': |
whismanoid | 25:9d4012b0887f | 5937 | { |
whismanoid | 25:9d4012b0887f | 5938 | bool isUpdatedI2CConfig = false; |
whismanoid | 25:9d4012b0887f | 5939 | // %IC scl=100khz ADDR=? -- I2C configure |
whismanoid | 25:9d4012b0887f | 5940 | // parse cmdLine arg (SCL=\d+(kHZ|MHZ)?)? --> g_I2C_SCL_Hz |
whismanoid | 25:9d4012b0887f | 5941 | if (cmdLine.parse_frequency_Hz("SCL", g_I2C_SCL_Hz)) |
whismanoid | 25:9d4012b0887f | 5942 | { |
whismanoid | 25:9d4012b0887f | 5943 | isUpdatedI2CConfig = true; |
whismanoid | 25:9d4012b0887f | 5944 | // TODO1: validate g_I2C_SCL_Hz against system clock frequency F_CPU |
whismanoid | 25:9d4012b0887f | 5945 | if (g_I2C_SCL_Hz > limit_max_I2C_SCL_Hz) |
whismanoid | 25:9d4012b0887f | 5946 | { |
whismanoid | 25:9d4012b0887f | 5947 | g_I2C_SCL_Hz = limit_max_I2C_SCL_Hz; |
whismanoid | 25:9d4012b0887f | 5948 | } |
whismanoid | 25:9d4012b0887f | 5949 | if (g_I2C_SCL_Hz < limit_min_I2C_SCL_Hz) |
whismanoid | 25:9d4012b0887f | 5950 | { |
whismanoid | 25:9d4012b0887f | 5951 | g_I2C_SCL_Hz = limit_min_I2C_SCL_Hz; |
whismanoid | 25:9d4012b0887f | 5952 | } |
whismanoid | 25:9d4012b0887f | 5953 | } |
whismanoid | 25:9d4012b0887f | 5954 | if (isUpdatedI2CConfig) |
whismanoid | 25:9d4012b0887f | 5955 | { |
whismanoid | 25:9d4012b0887f | 5956 | // declare in narrower scope: MAX32625MBED I2C i2cMaster(...) |
whismanoid | 25:9d4012b0887f | 5957 | I2C i2cMaster(I2C0_SDA, I2C0_SCL); // sda scl TARGET_MAX32635MBED: P1_6, P1_7 Arduino 10-pin header |
whismanoid | 25:9d4012b0887f | 5958 | i2cMaster.frequency(g_I2C_SCL_Hz); |
whismanoid | 25:9d4012b0887f | 5959 | i2cMaster.start(); |
whismanoid | 25:9d4012b0887f | 5960 | i2cMaster.stop(); |
whismanoid | 25:9d4012b0887f | 5961 | i2cMaster.frequency(g_I2C_SCL_Hz); |
whismanoid | 25:9d4012b0887f | 5962 | cmdLine.serial().printf( |
whismanoid | 25:9d4012b0887f | 5963 | "\r\n %%IC ADDR=0x%2.2x=(0x%2.2x>>1) SCL=%d=%1.3fkHz -- I2C config", |
whismanoid | 25:9d4012b0887f | 5964 | g_I2C_deviceAddress7, (g_I2C_deviceAddress7 << 1), g_I2C_SCL_Hz, |
whismanoid | 25:9d4012b0887f | 5965 | (g_I2C_SCL_Hz / 1000.)); |
whismanoid | 25:9d4012b0887f | 5966 | i2cMaster.start(); |
whismanoid | 25:9d4012b0887f | 5967 | i2cMaster.stop(); |
whismanoid | 25:9d4012b0887f | 5968 | } |
whismanoid | 25:9d4012b0887f | 5969 | } |
whismanoid | 25:9d4012b0887f | 5970 | break; |
whismanoid | 25:9d4012b0887f | 5971 | case 'W': case 'w': |
whismanoid | 25:9d4012b0887f | 5972 | { |
whismanoid | 25:9d4012b0887f | 5973 | // declare in narrower scope: MAX32625MBED I2C i2cMaster(...) |
whismanoid | 25:9d4012b0887f | 5974 | I2C i2cMaster(I2C0_SDA, I2C0_SCL); // sda scl TARGET_MAX32635MBED: P1_6, P1_7 Arduino 10-pin header |
whismanoid | 25:9d4012b0887f | 5975 | i2cMaster.frequency(g_I2C_SCL_Hz); |
whismanoid | 25:9d4012b0887f | 5976 | // %IW byte byte ... byte RD=? ADDR=0x -- write |
whismanoid | 25:9d4012b0887f | 5977 | // parse cmdLine byte list --> int byteCount; int mosiData[MAX_SPI_BYTE_COUNT]; |
whismanoid | 25:9d4012b0887f | 5978 | #define MAX_I2C_BYTE_COUNT 32 |
whismanoid | 25:9d4012b0887f | 5979 | size_t byteCount = byteCount; |
whismanoid | 25:9d4012b0887f | 5980 | static char mosiData[MAX_I2C_BYTE_COUNT]; |
whismanoid | 25:9d4012b0887f | 5981 | static char misoData[MAX_I2C_BYTE_COUNT]; |
whismanoid | 25:9d4012b0887f | 5982 | if (cmdLine.parse_byteCount_byteList_hex(byteCount, mosiData, |
whismanoid | 25:9d4012b0887f | 5983 | MAX_I2C_BYTE_COUNT)) |
whismanoid | 25:9d4012b0887f | 5984 | { |
whismanoid | 25:9d4012b0887f | 5985 | // hex dump mosiData[0..byteCount-1] |
whismanoid | 25:9d4012b0887f | 5986 | cmdLine.serial().printf( |
whismanoid | 25:9d4012b0887f | 5987 | "\r\nADDR=0x%2.2x=(0x%2.2x>>1) byteCount:%d RD=%d\r\nI2C MOSI->", |
whismanoid | 25:9d4012b0887f | 5988 | g_I2C_deviceAddress7, |
whismanoid | 25:9d4012b0887f | 5989 | (g_I2C_deviceAddress7 << 1), byteCount, g_I2C_read_count); |
whismanoid | 25:9d4012b0887f | 5990 | for (unsigned int byteIndex = 0; byteIndex < byteCount; byteIndex++) |
whismanoid | 25:9d4012b0887f | 5991 | { |
whismanoid | 25:9d4012b0887f | 5992 | cmdLine.serial().printf(" 0x%2.2X", mosiData[byteIndex]); |
whismanoid | 25:9d4012b0887f | 5993 | } |
whismanoid | 25:9d4012b0887f | 5994 | // |
whismanoid | 25:9d4012b0887f | 5995 | // TODO: i2c transfer |
whismanoid | 25:9d4012b0887f | 5996 | //const int addr7bit = 0x48; // 7 bit I2C address |
whismanoid | 25:9d4012b0887f | 5997 | //const int addr8bit = 0x48 << 1; // 8bit I2C address, 0x90 |
whismanoid | 25:9d4012b0887f | 5998 | // /* int */ i2cMaster.read (int addr8bit, char *data, int length, bool repeated=false) // Read from an I2C slave. |
whismanoid | 25:9d4012b0887f | 5999 | // /* int */ i2cMaster.read (int ack) // Read a single byte from the I2C bus. |
whismanoid | 25:9d4012b0887f | 6000 | // /* int */ i2cMaster.write (int addr8bit, const char *data, int length, bool repeated=false) // Write to an I2C slave. |
whismanoid | 25:9d4012b0887f | 6001 | // /* int */ i2cMaster.write (int data) // Write single byte out on the I2C bus. |
whismanoid | 25:9d4012b0887f | 6002 | // /* void */ i2cMaster.start (void) // Creates a start condition on the I2C bus. |
whismanoid | 25:9d4012b0887f | 6003 | // /* void */ i2cMaster.stop (void) // Creates a stop condition on the I2C bus. |
whismanoid | 25:9d4012b0887f | 6004 | // /* 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 | 6005 | // /* void */ i2cMaster.abort_transfer () // Abort the ongoing I2C transfer. More... |
whismanoid | 25:9d4012b0887f | 6006 | const int addr8bit = g_I2C_deviceAddress7 << 1; // 8bit I2C address, 0x90 |
whismanoid | 25:9d4012b0887f | 6007 | unsigned int misoLength = 0; |
whismanoid | 25:9d4012b0887f | 6008 | bool repeated = (g_I2C_read_count > 0); |
whismanoid | 25:9d4012b0887f | 6009 | // |
whismanoid | 25:9d4012b0887f | 6010 | int writeStatus = i2cMaster.write (addr8bit, mosiData, byteCount, repeated); |
whismanoid | 25:9d4012b0887f | 6011 | switch (writeStatus) |
whismanoid | 25:9d4012b0887f | 6012 | { |
whismanoid | 25:9d4012b0887f | 6013 | case 0: cmdLine.serial().printf(" ack "); break; |
whismanoid | 25:9d4012b0887f | 6014 | case 1: cmdLine.serial().printf(" nack "); break; |
whismanoid | 25:9d4012b0887f | 6015 | default: cmdLine.serial().printf(" {writeStatus 0x%2.2X} ", |
whismanoid | 25:9d4012b0887f | 6016 | writeStatus); |
whismanoid | 25:9d4012b0887f | 6017 | } |
whismanoid | 25:9d4012b0887f | 6018 | if (repeated) |
whismanoid | 25:9d4012b0887f | 6019 | { |
whismanoid | 25:9d4012b0887f | 6020 | int readStatus = |
whismanoid | 25:9d4012b0887f | 6021 | i2cMaster.read (addr8bit, misoData, g_I2C_read_count, false); |
whismanoid | 25:9d4012b0887f | 6022 | switch (readStatus) |
whismanoid | 25:9d4012b0887f | 6023 | { |
whismanoid | 25:9d4012b0887f | 6024 | case 1: cmdLine.serial().printf(" nack "); break; |
whismanoid | 25:9d4012b0887f | 6025 | case 0: cmdLine.serial().printf(" ack "); break; |
whismanoid | 25:9d4012b0887f | 6026 | default: cmdLine.serial().printf(" {readStatus 0x%2.2X} ", |
whismanoid | 25:9d4012b0887f | 6027 | readStatus); |
whismanoid | 25:9d4012b0887f | 6028 | } |
whismanoid | 25:9d4012b0887f | 6029 | } |
whismanoid | 25:9d4012b0887f | 6030 | // |
whismanoid | 25:9d4012b0887f | 6031 | if (misoLength > 0) |
whismanoid | 25:9d4012b0887f | 6032 | { |
whismanoid | 25:9d4012b0887f | 6033 | // hex dump misoData[0..byteCount-1] |
whismanoid | 25:9d4012b0887f | 6034 | cmdLine.serial().printf(" MISO<-"); |
whismanoid | 25:9d4012b0887f | 6035 | for (unsigned int byteIndex = 0; byteIndex < g_I2C_read_count; |
whismanoid | 25:9d4012b0887f | 6036 | byteIndex++) |
whismanoid | 25:9d4012b0887f | 6037 | { |
whismanoid | 25:9d4012b0887f | 6038 | cmdLine.serial().printf(" 0x%2.2X", misoData[byteIndex]); |
whismanoid | 25:9d4012b0887f | 6039 | } |
whismanoid | 25:9d4012b0887f | 6040 | } |
whismanoid | 25:9d4012b0887f | 6041 | cmdLine.serial().printf(" "); |
whismanoid | 25:9d4012b0887f | 6042 | } |
whismanoid | 25:9d4012b0887f | 6043 | } |
whismanoid | 25:9d4012b0887f | 6044 | break; |
whismanoid | 25:9d4012b0887f | 6045 | case 'R': case 'r': |
whismanoid | 25:9d4012b0887f | 6046 | { |
whismanoid | 25:9d4012b0887f | 6047 | // declare in narrower scope: MAX32625MBED I2C i2cMaster(...) |
whismanoid | 25:9d4012b0887f | 6048 | I2C i2cMaster(I2C0_SDA, I2C0_SCL); // sda scl TARGET_MAX32635MBED: P1_6, P1_7 Arduino 10-pin header |
whismanoid | 25:9d4012b0887f | 6049 | i2cMaster.frequency(g_I2C_SCL_Hz); |
whismanoid | 25:9d4012b0887f | 6050 | // %IR ADDR=? RD=? -- read |
whismanoid | 25:9d4012b0887f | 6051 | // TODO: i2c transfer |
whismanoid | 25:9d4012b0887f | 6052 | //const int addr7bit = 0x48; // 7 bit I2C address |
whismanoid | 25:9d4012b0887f | 6053 | //const int addr8bit = 0x48 << 1; // 8bit I2C address, 0x90 |
whismanoid | 25:9d4012b0887f | 6054 | // /* int */ i2cMaster.read (int addr8bit, char *data, int length, bool repeated=false) // Read from an I2C slave. |
whismanoid | 25:9d4012b0887f | 6055 | // /* int */ i2cMaster.read (int ack) // Read a single byte from the I2C bus. |
whismanoid | 25:9d4012b0887f | 6056 | // /* int */ i2cMaster.write (int addr8bit, const char *data, int length, bool repeated=false) // Write to an I2C slave. |
whismanoid | 25:9d4012b0887f | 6057 | // /* int */ i2cMaster.write (int data) // Write single byte out on the I2C bus. |
whismanoid | 25:9d4012b0887f | 6058 | // /* void */ i2cMaster.start (void) // Creates a start condition on the I2C bus. |
whismanoid | 25:9d4012b0887f | 6059 | // /* void */ i2cMaster.stop (void) // Creates a stop condition on the I2C bus. |
whismanoid | 25:9d4012b0887f | 6060 | // /* 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 | 6061 | // /* void */ i2cMaster.abort_transfer () // Abort the ongoing I2C transfer. More... |
whismanoid | 25:9d4012b0887f | 6062 | } |
whismanoid | 25:9d4012b0887f | 6063 | break; |
whismanoid | 25:9d4012b0887f | 6064 | case '^': |
whismanoid | 25:9d4012b0887f | 6065 | { |
whismanoid | 25:9d4012b0887f | 6066 | // declare in narrower scope: MAX32625MBED I2C i2cMaster(...) |
whismanoid | 25:9d4012b0887f | 6067 | I2C i2cMaster(I2C0_SDA, I2C0_SCL); // sda scl TARGET_MAX32635MBED: P1_6, P1_7 Arduino 10-pin header |
whismanoid | 25:9d4012b0887f | 6068 | i2cMaster.frequency(g_I2C_SCL_Hz); |
whismanoid | 25:9d4012b0887f | 6069 | // %I^ cmd=? -- i2c_smbus_read_word_data |
whismanoid | 25:9d4012b0887f | 6070 | // TODO: i2c transfer |
whismanoid | 25:9d4012b0887f | 6071 | //const int addr7bit = 0x48; // 7 bit I2C address |
whismanoid | 25:9d4012b0887f | 6072 | //const int addr8bit = 0x48 << 1; // 8bit I2C address, 0x90 |
whismanoid | 25:9d4012b0887f | 6073 | // /* int */ i2cMaster.read (int addr8bit, char *data, int length, bool repeated=false) // Read from an I2C slave. |
whismanoid | 25:9d4012b0887f | 6074 | // /* int */ i2cMaster.read (int ack) // Read a single byte from the I2C bus. |
whismanoid | 25:9d4012b0887f | 6075 | // /* int */ i2cMaster.write (int addr8bit, const char *data, int length, bool repeated=false) // Write to an I2C slave. |
whismanoid | 25:9d4012b0887f | 6076 | // /* int */ i2cMaster.write (int data) // Write single byte out on the I2C bus. |
whismanoid | 25:9d4012b0887f | 6077 | // /* void */ i2cMaster.start (void) // Creates a start condition on the I2C bus. |
whismanoid | 25:9d4012b0887f | 6078 | // /* void */ i2cMaster.stop (void) // Creates a stop condition on the I2C bus. |
whismanoid | 25:9d4012b0887f | 6079 | // /* 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 | 6080 | // /* void */ i2cMaster.abort_transfer () // Abort the ongoing I2C transfer. More... |
whismanoid | 25:9d4012b0887f | 6081 | } |
whismanoid | 25:9d4012b0887f | 6082 | break; |
whismanoid | 25:9d4012b0887f | 6083 | } // switch(cmdLine[2]) |
whismanoid | 25:9d4012b0887f | 6084 | break; |
whismanoid | 25:9d4012b0887f | 6085 | #endif |
whismanoid | 25:9d4012b0887f | 6086 | // |
whismanoid | 25:9d4012b0887f | 6087 | #if HAS_SPI // SUPPORT_SPI |
whismanoid | 25:9d4012b0887f | 6088 | case 'S': case 's': |
whismanoid | 25:9d4012b0887f | 6089 | { |
whismanoid | 25:9d4012b0887f | 6090 | // %S... -- SPI diagnostics |
whismanoid | 25:9d4012b0887f | 6091 | // %SC sclk=1Mhz -- SPI configure |
whismanoid | 25:9d4012b0887f | 6092 | // %SW -- write (write and read) |
whismanoid | 25:9d4012b0887f | 6093 | // %SR -- read (alias for %SW because SPI always write and read) |
whismanoid | 25:9d4012b0887f | 6094 | // |
whismanoid | 25:9d4012b0887f | 6095 | // Process arguments SCLK=\d+(kHZ|MHZ) CPOL=\d CPHA=\d |
whismanoid | 25:9d4012b0887f | 6096 | bool isUpdatedSPIConfig = false; |
whismanoid | 25:9d4012b0887f | 6097 | // parse cmdLine arg (CPOL=\d)? --> g_SPI_dataMode | SPI_MODE2 |
whismanoid | 25:9d4012b0887f | 6098 | // parse cmdLine arg (CPHA=\d)? --> g_SPI_dataMode | SPI_MODE1 |
whismanoid | 25:9d4012b0887f | 6099 | if (cmdLine.parse_flag("CPOL", g_SPI_dataMode, SPI_MODE2)) |
whismanoid | 25:9d4012b0887f | 6100 | { |
whismanoid | 25:9d4012b0887f | 6101 | isUpdatedSPIConfig = true; |
whismanoid | 25:9d4012b0887f | 6102 | } |
whismanoid | 25:9d4012b0887f | 6103 | if (cmdLine.parse_flag("CPHA", g_SPI_dataMode, SPI_MODE1)) |
whismanoid | 25:9d4012b0887f | 6104 | { |
whismanoid | 25:9d4012b0887f | 6105 | isUpdatedSPIConfig = true; |
whismanoid | 25:9d4012b0887f | 6106 | } |
whismanoid | 25:9d4012b0887f | 6107 | if (cmdLine.parse_flag("CS", g_SPI_cs_state, 1)) |
whismanoid | 25:9d4012b0887f | 6108 | { |
whismanoid | 25:9d4012b0887f | 6109 | isUpdatedSPIConfig = true; |
whismanoid | 25:9d4012b0887f | 6110 | } |
whismanoid | 25:9d4012b0887f | 6111 | // parse cmdLine arg (SCLK=\d+(kHZ|MHZ)?)? --> g_SPI_SCLK_Hz |
whismanoid | 25:9d4012b0887f | 6112 | if (cmdLine.parse_frequency_Hz("SCLK", g_SPI_SCLK_Hz)) |
whismanoid | 25:9d4012b0887f | 6113 | { |
whismanoid | 25:9d4012b0887f | 6114 | isUpdatedSPIConfig = true; |
whismanoid | 25:9d4012b0887f | 6115 | // TODO1: validate g_SPI_SCLK_Hz against system clock frequency F_CPU |
whismanoid | 25:9d4012b0887f | 6116 | if (g_SPI_SCLK_Hz > limit_max_SPI_SCLK_Hz) |
whismanoid | 25:9d4012b0887f | 6117 | { |
whismanoid | 25:9d4012b0887f | 6118 | g_SPI_SCLK_Hz = limit_max_SPI_SCLK_Hz; |
whismanoid | 25:9d4012b0887f | 6119 | } |
whismanoid | 25:9d4012b0887f | 6120 | if (g_SPI_SCLK_Hz < limit_min_SPI_SCLK_Hz) |
whismanoid | 25:9d4012b0887f | 6121 | { |
whismanoid | 25:9d4012b0887f | 6122 | g_SPI_SCLK_Hz = limit_min_SPI_SCLK_Hz; |
whismanoid | 25:9d4012b0887f | 6123 | } |
whismanoid | 25:9d4012b0887f | 6124 | } |
whismanoid | 25:9d4012b0887f | 6125 | // Update SPI configuration |
whismanoid | 25:9d4012b0887f | 6126 | if (isUpdatedSPIConfig) |
whismanoid | 25:9d4012b0887f | 6127 | { |
whismanoid | 25:9d4012b0887f | 6128 | // %SC sclk=1Mhz -- SPI configure |
whismanoid | 25:9d4012b0887f | 6129 | spi_cs = g_SPI_cs_state; |
whismanoid | 25:9d4012b0887f | 6130 | spi.format(8,g_SPI_dataMode); // int bits_must_be_8, int mode=0_3 CPOL=0,CPHA=0 |
whismanoid | 25:9d4012b0887f | 6131 | #if APPLICATION_MAX5715 |
whismanoid | 25:9d4012b0887f | 6132 | g_MAX5715_device.spi_frequency(g_SPI_SCLK_Hz); |
whismanoid | 25:9d4012b0887f | 6133 | #elif APPLICATION_MAX11131 |
whismanoid | 25:9d4012b0887f | 6134 | g_MAX11131_device.spi_frequency(g_SPI_SCLK_Hz); |
whismanoid | 25:9d4012b0887f | 6135 | #elif APPLICATION_MAX5171 |
whismanoid | 25:9d4012b0887f | 6136 | g_MAX5171_device.spi_frequency(g_SPI_SCLK_Hz); |
whismanoid | 25:9d4012b0887f | 6137 | #elif APPLICATION_MAX11410 |
whismanoid | 25:9d4012b0887f | 6138 | g_MAX11410_device.spi_frequency(g_SPI_SCLK_Hz); |
whismanoid | 25:9d4012b0887f | 6139 | #elif APPLICATION_MAX12345 |
whismanoid | 25:9d4012b0887f | 6140 | g_MAX12345_device.spi_frequency(g_SPI_SCLK_Hz); |
whismanoid | 25:9d4012b0887f | 6141 | #else |
whismanoid | 25:9d4012b0887f | 6142 | spi.frequency(g_SPI_SCLK_Hz); // int SCLK_Hz=1000000 = 1MHz (initial default) |
whismanoid | 25:9d4012b0887f | 6143 | #endif |
whismanoid | 25:9d4012b0887f | 6144 | // |
whismanoid | 25:9d4012b0887f | 6145 | double ideal_divisor = ((double)SystemCoreClock) / g_SPI_SCLK_Hz; |
whismanoid | 25:9d4012b0887f | 6146 | int actual_divisor = (int)(ideal_divisor + 0.0); // frequency divisor truncate |
whismanoid | 25:9d4012b0887f | 6147 | double actual_SCLK_Hz = SystemCoreClock / actual_divisor; |
whismanoid | 25:9d4012b0887f | 6148 | // |
whismanoid | 25:9d4012b0887f | 6149 | // 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 | 6150 | cmdLine.serial().printf( |
whismanoid | 25:9d4012b0887f | 6151 | "\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 | 6152 | ((g_SPI_dataMode & SPI_MODE2) ? 1 : 0), |
whismanoid | 25:9d4012b0887f | 6153 | ((g_SPI_dataMode & SPI_MODE1) ? 1 : 0), |
whismanoid | 25:9d4012b0887f | 6154 | g_SPI_cs_state, |
whismanoid | 25:9d4012b0887f | 6155 | g_SPI_SCLK_Hz, |
whismanoid | 25:9d4012b0887f | 6156 | (g_SPI_SCLK_Hz / 1000000.), |
whismanoid | 25:9d4012b0887f | 6157 | ((double)(SystemCoreClock / 1000000.)), |
whismanoid | 25:9d4012b0887f | 6158 | ideal_divisor, |
whismanoid | 25:9d4012b0887f | 6159 | (actual_SCLK_Hz / 1000000.) |
whismanoid | 25:9d4012b0887f | 6160 | ); |
whismanoid | 25:9d4012b0887f | 6161 | } |
whismanoid | 25:9d4012b0887f | 6162 | // get next character |
whismanoid | 25:9d4012b0887f | 6163 | switch (cmdLine[2]) |
whismanoid | 25:9d4012b0887f | 6164 | { |
whismanoid | 25:9d4012b0887f | 6165 | case 'C': case 's': |
whismanoid | 25:9d4012b0887f | 6166 | // %SC sclk=1Mhz -- SPI configure |
whismanoid | 25:9d4012b0887f | 6167 | break; |
whismanoid | 25:9d4012b0887f | 6168 | case 'D': case 'd': |
whismanoid | 25:9d4012b0887f | 6169 | // %SD -- SPI diagnostic messages enable |
whismanoid | 25:9d4012b0887f | 6170 | if (g_MAX5719_device.onSPIprint) { |
whismanoid | 25:9d4012b0887f | 6171 | g_MAX5719_device.onSPIprint = NULL; |
whismanoid | 25:9d4012b0887f | 6172 | // no g_MAX5719_device.loop_limit property; device_has_property(Device, 'loop_limit') != None is false |
whismanoid | 25:9d4012b0887f | 6173 | } |
whismanoid | 25:9d4012b0887f | 6174 | else { |
whismanoid | 25:9d4012b0887f | 6175 | void onSPIprint_handler(size_t byteCount, uint8_t mosiData[], uint8_t misoData[]); |
whismanoid | 25:9d4012b0887f | 6176 | g_MAX5719_device.onSPIprint = onSPIprint_handler; |
whismanoid | 25:9d4012b0887f | 6177 | // no g_MAX5719_device.loop_limit property; device_has_property(Device, 'loop_limit') is false |
whismanoid | 25:9d4012b0887f | 6178 | } |
whismanoid | 25:9d4012b0887f | 6179 | break; |
whismanoid | 25:9d4012b0887f | 6180 | case 'W': case 'R': case 'w': case 'r': |
whismanoid | 25:9d4012b0887f | 6181 | { |
whismanoid | 25:9d4012b0887f | 6182 | // %SW -- write (write and read) |
whismanoid | 25:9d4012b0887f | 6183 | // %SR -- read (alias for %SW because SPI always write and read) |
whismanoid | 25:9d4012b0887f | 6184 | // parse cmdLine byte list --> int byteCount; int mosiData[MAX_SPI_BYTE_COUNT]; |
whismanoid | 25:9d4012b0887f | 6185 | #define MAX_SPI_BYTE_COUNT 32 |
whismanoid | 25:9d4012b0887f | 6186 | size_t byteCount = byteCount; |
whismanoid | 25:9d4012b0887f | 6187 | static char mosiData[MAX_SPI_BYTE_COUNT]; |
whismanoid | 25:9d4012b0887f | 6188 | static char misoData[MAX_SPI_BYTE_COUNT]; |
whismanoid | 25:9d4012b0887f | 6189 | if (cmdLine.parse_byteCount_byteList_hex(byteCount, mosiData, |
whismanoid | 25:9d4012b0887f | 6190 | MAX_SPI_BYTE_COUNT)) |
whismanoid | 25:9d4012b0887f | 6191 | { |
whismanoid | 25:9d4012b0887f | 6192 | // hex dump mosiData[0..byteCount-1] |
whismanoid | 25:9d4012b0887f | 6193 | cmdLine.serial().printf("\r\nSPI"); |
whismanoid | 25:9d4012b0887f | 6194 | if (byteCount > 7) { |
whismanoid | 25:9d4012b0887f | 6195 | cmdLine.serial().printf(" byteCount:%d", byteCount); |
whismanoid | 25:9d4012b0887f | 6196 | } |
whismanoid | 25:9d4012b0887f | 6197 | cmdLine.serial().printf(" MOSI->"); |
whismanoid | 25:9d4012b0887f | 6198 | for (unsigned int byteIndex = 0; byteIndex < byteCount; byteIndex++) |
whismanoid | 25:9d4012b0887f | 6199 | { |
whismanoid | 25:9d4012b0887f | 6200 | cmdLine.serial().printf(" 0x%2.2X", mosiData[byteIndex]); |
whismanoid | 25:9d4012b0887f | 6201 | } |
whismanoid | 25:9d4012b0887f | 6202 | spi_cs = 0; |
whismanoid | 25:9d4012b0887f | 6203 | unsigned int numBytesTransferred = |
whismanoid | 25:9d4012b0887f | 6204 | spi.write(mosiData, byteCount, misoData, byteCount); |
whismanoid | 25:9d4012b0887f | 6205 | spi_cs = 1; |
whismanoid | 25:9d4012b0887f | 6206 | // hex dump misoData[0..byteCount-1] |
whismanoid | 25:9d4012b0887f | 6207 | cmdLine.serial().printf(" MISO<-"); |
whismanoid | 25:9d4012b0887f | 6208 | for (unsigned int byteIndex = 0; byteIndex < numBytesTransferred; |
whismanoid | 25:9d4012b0887f | 6209 | byteIndex++) |
whismanoid | 25:9d4012b0887f | 6210 | { |
whismanoid | 25:9d4012b0887f | 6211 | cmdLine.serial().printf(" 0x%2.2X", misoData[byteIndex]); |
whismanoid | 25:9d4012b0887f | 6212 | } |
whismanoid | 25:9d4012b0887f | 6213 | cmdLine.serial().printf(" "); |
whismanoid | 25:9d4012b0887f | 6214 | } |
whismanoid | 25:9d4012b0887f | 6215 | } |
whismanoid | 25:9d4012b0887f | 6216 | break; |
whismanoid | 25:9d4012b0887f | 6217 | } // switch(cmdLine[2]) |
whismanoid | 25:9d4012b0887f | 6218 | } // case 'S': // %S... -- SPI diagnostics |
whismanoid | 25:9d4012b0887f | 6219 | break; |
whismanoid | 25:9d4012b0887f | 6220 | #endif |
whismanoid | 25:9d4012b0887f | 6221 | // |
whismanoid | 25:9d4012b0887f | 6222 | // A-Z,a-z,0-9 reserved for application use |
whismanoid | 25:9d4012b0887f | 6223 | } // switch(cmdLine[1]) |
whismanoid | 25:9d4012b0887f | 6224 | } // end void pinsMonitor_submenu_onEOLcommandParser(CmdLine & cmdLine) |
whismanoid | 25:9d4012b0887f | 6225 | |
whismanoid | 25:9d4012b0887f | 6226 | |
whismanoid | 25:9d4012b0887f | 6227 | //-------------------------------------------------- |
whismanoid | 25:9d4012b0887f | 6228 | void main_menu_status(CmdLine & cmdLine) |
whismanoid | 25:9d4012b0887f | 6229 | { |
whismanoid | 25:9d4012b0887f | 6230 | cmdLine.serial().printf("\r\nMain menu"); |
whismanoid | 25:9d4012b0887f | 6231 | |
whismanoid | 27:485b1b2f334c | 6232 | cmdLine.serial().printf(" MAX5719 20-bit 0.05nV-sec DAC"); |
whismanoid | 25:9d4012b0887f | 6233 | |
whismanoid | 25:9d4012b0887f | 6234 | //cmdLine.serial().print(" %s", TARGET_NAME); |
whismanoid | 25:9d4012b0887f | 6235 | if (cmdLine.nameStr()) |
whismanoid | 25:9d4012b0887f | 6236 | { |
whismanoid | 25:9d4012b0887f | 6237 | cmdLine.serial().printf(" [%s]", cmdLine.nameStr()); |
whismanoid | 25:9d4012b0887f | 6238 | |
whismanoid | 25:9d4012b0887f | 6239 | } |
whismanoid | 25:9d4012b0887f | 6240 | cmdLine.serial().printf("\r\n ? -- help"); |
whismanoid | 25:9d4012b0887f | 6241 | |
whismanoid | 25:9d4012b0887f | 6242 | } |
whismanoid | 25:9d4012b0887f | 6243 | |
whismanoid | 25:9d4012b0887f | 6244 | |
whismanoid | 25:9d4012b0887f | 6245 | //-------------------------------------------------- |
whismanoid | 25:9d4012b0887f | 6246 | void main_menu_help(CmdLine & cmdLine) |
whismanoid | 25:9d4012b0887f | 6247 | { |
whismanoid | 25:9d4012b0887f | 6248 | // ? -- help |
whismanoid | 25:9d4012b0887f | 6249 | //~ cmdLine.serial().print(F("\r\nMenu:")); |
whismanoid | 25:9d4012b0887f | 6250 | cmdLine.serial().printf("\r\n # -- lines beginning with # are comments"); |
whismanoid | 25:9d4012b0887f | 6251 | |
whismanoid | 25:9d4012b0887f | 6252 | cmdLine.serial().printf("\r\n . -- SelfTest"); |
whismanoid | 25:9d4012b0887f | 6253 | |
whismanoid | 25:9d4012b0887f | 6254 | //cmdLine.serial().print(F("\r\n ! -- Initial Configuration")); |
whismanoid | 25:9d4012b0887f | 6255 | // |
whismanoid | 25:9d4012b0887f | 6256 | // % standardize diagnostic commands |
whismanoid | 25:9d4012b0887f | 6257 | // %Hpin -- digital output high |
whismanoid | 25:9d4012b0887f | 6258 | // %Lpin -- digital output low |
whismanoid | 25:9d4012b0887f | 6259 | // %?pin -- digital input |
whismanoid | 25:9d4012b0887f | 6260 | // %A %Apin -- analog input |
whismanoid | 25:9d4012b0887f | 6261 | // %Ppin df=xx -- pwm output |
whismanoid | 25:9d4012b0887f | 6262 | // %Wpin -- measure high pulsewidth input in usec |
whismanoid | 25:9d4012b0887f | 6263 | // %wpin -- measure low pulsewidth input in usec |
whismanoid | 25:9d4012b0887f | 6264 | // %I... -- I2C diagnostics |
whismanoid | 25:9d4012b0887f | 6265 | // %IP -- I2C probe |
whismanoid | 25:9d4012b0887f | 6266 | // %IC scl=100khz ADDR=? -- I2C configure |
whismanoid | 25:9d4012b0887f | 6267 | // %IW ADDR=? cmd=? data,data,data -- write |
whismanoid | 25:9d4012b0887f | 6268 | // %IR ADDR=? RD=? -- read |
whismanoid | 25:9d4012b0887f | 6269 | // %I^ cmd=? -- i2c_smbus_read_word_data |
whismanoid | 25:9d4012b0887f | 6270 | // %S... -- SPI diagnostics |
whismanoid | 25:9d4012b0887f | 6271 | // %SC sclk=1Mhz -- SPI configure |
whismanoid | 25:9d4012b0887f | 6272 | // %SW -- write (write and read) |
whismanoid | 25:9d4012b0887f | 6273 | // %SR -- read (alias for %SW because SPI always write and read) |
whismanoid | 25:9d4012b0887f | 6274 | // A-Z,a-z,0-9 reserved for application use |
whismanoid | 25:9d4012b0887f | 6275 | // |
whismanoid | 25:9d4012b0887f | 6276 | #if HAS_digitalInOuts |
whismanoid | 25:9d4012b0887f | 6277 | // %Hpin -- digital output high |
whismanoid | 25:9d4012b0887f | 6278 | // %Lpin -- digital output low |
whismanoid | 25:9d4012b0887f | 6279 | // %?pin -- digital input |
whismanoid | 25:9d4012b0887f | 6280 | cmdLine.serial().printf("\r\n %%Hn {pin:"); |
whismanoid | 25:9d4012b0887f | 6281 | list_digitalInOutPins(cmdLine.serial()); |
whismanoid | 25:9d4012b0887f | 6282 | cmdLine.serial().printf("} -- High Output"); |
whismanoid | 25:9d4012b0887f | 6283 | cmdLine.serial().printf("\r\n %%Ln {pin:"); |
whismanoid | 25:9d4012b0887f | 6284 | list_digitalInOutPins(cmdLine.serial()); |
whismanoid | 25:9d4012b0887f | 6285 | cmdLine.serial().printf("} -- Low Output"); |
whismanoid | 25:9d4012b0887f | 6286 | cmdLine.serial().printf("\r\n %%?n {pin:"); |
whismanoid | 25:9d4012b0887f | 6287 | list_digitalInOutPins(cmdLine.serial()); |
whismanoid | 25:9d4012b0887f | 6288 | cmdLine.serial().printf("} -- Input"); |
whismanoid | 25:9d4012b0887f | 6289 | #endif |
whismanoid | 25:9d4012b0887f | 6290 | |
whismanoid | 25:9d4012b0887f | 6291 | #if HAS_analogIns |
whismanoid | 25:9d4012b0887f | 6292 | // Menu A) analogRead A0..7 |
whismanoid | 25:9d4012b0887f | 6293 | // %A %Apin -- analog input |
whismanoid | 25:9d4012b0887f | 6294 | // analogRead(pinIndex) // analog input pins A0, A1, A2, A3, A4, A5; float voltage = analogRead(A0) * (5.0 / 1023.0) |
whismanoid | 25:9d4012b0887f | 6295 | cmdLine.serial().printf("\r\n %%A -- analogRead"); |
whismanoid | 25:9d4012b0887f | 6296 | #endif |
whismanoid | 25:9d4012b0887f | 6297 | |
whismanoid | 25:9d4012b0887f | 6298 | #if HAS_SPI2_MAX541 |
whismanoid | 25:9d4012b0887f | 6299 | // TODO1: MAX541 max541(spi2_max541, spi2_max541_cs); |
whismanoid | 25:9d4012b0887f | 6300 | cmdLine.serial().printf("\r\n %%D -- DAC output MAX541 (SPI2)"); |
whismanoid | 25:9d4012b0887f | 6301 | #endif |
whismanoid | 25:9d4012b0887f | 6302 | |
whismanoid | 25:9d4012b0887f | 6303 | #if HAS_I2C // SUPPORT_I2C |
whismanoid | 25:9d4012b0887f | 6304 | // TODO: support I2C HAS_I2C // SUPPORT_I2C |
whismanoid | 25:9d4012b0887f | 6305 | // VERIFY: I2C utility commands SUPPORT_I2C |
whismanoid | 25:9d4012b0887f | 6306 | // VERIFY: report g_I2C_SCL_Hz = (F_CPU / ((TWBR * 2) + 16)) from last Wire_Sr.setClock(I2C_SCL_Hz); |
whismanoid | 25:9d4012b0887f | 6307 | // %I... -- I2C diagnostics |
whismanoid | 25:9d4012b0887f | 6308 | // %IP -- I2C probe |
whismanoid | 25:9d4012b0887f | 6309 | // %IC scl=100khz ADDR=? -- I2C configure |
whismanoid | 25:9d4012b0887f | 6310 | // %IW byte byte ... byte RD=? ADDR=0x -- write |
whismanoid | 25:9d4012b0887f | 6311 | // %IR ADDR=? RD=? -- read |
whismanoid | 25:9d4012b0887f | 6312 | // %I^ cmd=? -- i2c_smbus_read_word_data |
whismanoid | 25:9d4012b0887f | 6313 | //g_I2C_SCL_Hz = (F_CPU / ((TWBR * 2) + 16)); // 'F_CPU' 'TWBR' not declared in this scope |
whismanoid | 25:9d4012b0887f | 6314 | cmdLine.serial().printf("\r\n %%IC ADDR=0x%2.2x=(0x%2.2x>>1) SCL=%d=%1.3fkHz -- I2C config", |
whismanoid | 25:9d4012b0887f | 6315 | g_I2C_deviceAddress7, (g_I2C_deviceAddress7 << 1), g_I2C_SCL_Hz, |
whismanoid | 25:9d4012b0887f | 6316 | (g_I2C_SCL_Hz / 1000.)); |
whismanoid | 25:9d4012b0887f | 6317 | cmdLine.serial().printf("\r\n %%IW byte byte ... byte RD=? ADDR=0x%2.2x -- I2C write/read", |
whismanoid | 25:9d4012b0887f | 6318 | g_I2C_deviceAddress7); |
whismanoid | 25:9d4012b0887f | 6319 | // |
whismanoid | 25:9d4012b0887f | 6320 | #if SUPPORT_I2C |
whismanoid | 25:9d4012b0887f | 6321 | // Menu ^ cmd=?) i2c_smbus_read_word_data |
whismanoid | 25:9d4012b0887f | 6322 | cmdLine.serial().printf("\r\n %%I^ cmd=? -- i2c_smbus_read_word_data"); |
whismanoid | 25:9d4012b0887f | 6323 | // test low-level I2C i2c_smbus_read_word_data |
whismanoid | 25:9d4012b0887f | 6324 | #endif // SUPPORT_I2C |
whismanoid | 25:9d4012b0887f | 6325 | //cmdLine.serial().printf(" H) Hunt for attached I2C devices"); |
whismanoid | 25:9d4012b0887f | 6326 | cmdLine.serial().printf("\r\n %%IP -- I2C Probe for attached devices"); |
whismanoid | 25:9d4012b0887f | 6327 | // cmdLine.serial().printf(" s) search i2c address"); |
whismanoid | 25:9d4012b0887f | 6328 | #endif // SUPPORT_I2C |
whismanoid | 25:9d4012b0887f | 6329 | |
whismanoid | 25:9d4012b0887f | 6330 | #if HAS_SPI // SUPPORT_SPI |
whismanoid | 25:9d4012b0887f | 6331 | // TODO: support SPI HAS_SPI // SUPPORT_SPI |
whismanoid | 25:9d4012b0887f | 6332 | // SPI test command S (mosiData)+ |
whismanoid | 25:9d4012b0887f | 6333 | // %S... -- SPI diagnostics |
whismanoid | 25:9d4012b0887f | 6334 | // %SC sclk=1Mhz -- SPI configure |
whismanoid | 25:9d4012b0887f | 6335 | // %SW -- write (write and read) |
whismanoid | 25:9d4012b0887f | 6336 | // %SR -- read (alias for %SW because SPI always write and read) |
whismanoid | 25:9d4012b0887f | 6337 | // spi.format(8,0); // int bits_must_be_8, int mode=0_3 CPOL=0,CPHA=0 rising edge (initial default) |
whismanoid | 25:9d4012b0887f | 6338 | // spi.format(8,1); // int bits_must_be_8, int mode=0_3 CPOL=0,CPHA=1 falling edge (initial default) |
whismanoid | 25:9d4012b0887f | 6339 | // spi.format(8,2); // int bits_must_be_8, int mode=0_3 CPOL=1,CPHA=0 falling edge (initial default) |
whismanoid | 25:9d4012b0887f | 6340 | // spi.format(8,3); // int bits_must_be_8, int mode=0_3 CPOL=1,CPHA=1 rising edge (initial default) |
whismanoid | 25:9d4012b0887f | 6341 | // spi.frequency(1000000); // int SCLK_Hz=1000000 = 1MHz (initial default) |
whismanoid | 25:9d4012b0887f | 6342 | // mode | POL PHA |
whismanoid | 25:9d4012b0887f | 6343 | // -----+-------- |
whismanoid | 25:9d4012b0887f | 6344 | // 0 | 0 0 |
whismanoid | 25:9d4012b0887f | 6345 | // 1 | 0 1 |
whismanoid | 25:9d4012b0887f | 6346 | // 2 | 1 0 |
whismanoid | 25:9d4012b0887f | 6347 | // 3 | 1 1 |
whismanoid | 25:9d4012b0887f | 6348 | //cmdLine.serial().printf(" S) SPI mosi,mosi,...mosi hex bytes SCLK=1000000 CPOL=0 CPHA=0"); |
whismanoid | 25:9d4012b0887f | 6349 | // 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 | 6350 | cmdLine.serial().printf("\r\n %%SC SCLK=%ld=%1.3fMHz CPOL=%d CPHA=%d -- SPI config", |
whismanoid | 25:9d4012b0887f | 6351 | g_SPI_SCLK_Hz, (g_SPI_SCLK_Hz / 1000000.), |
whismanoid | 25:9d4012b0887f | 6352 | ((g_SPI_dataMode & SPI_MODE2) ? 1 : 0), |
whismanoid | 25:9d4012b0887f | 6353 | ((g_SPI_dataMode & SPI_MODE1) ? 1 : 0)); |
whismanoid | 25:9d4012b0887f | 6354 | cmdLine.serial().printf("\r\n %%SD -- SPI diagnostic messages "); |
whismanoid | 25:9d4012b0887f | 6355 | if (g_MAX5719_device.onSPIprint) { |
whismanoid | 25:9d4012b0887f | 6356 | cmdLine.serial().printf("hide"); |
whismanoid | 25:9d4012b0887f | 6357 | } |
whismanoid | 25:9d4012b0887f | 6358 | else { |
whismanoid | 25:9d4012b0887f | 6359 | cmdLine.serial().printf("show"); |
whismanoid | 25:9d4012b0887f | 6360 | } |
whismanoid | 25:9d4012b0887f | 6361 | cmdLine.serial().printf("\r\n %%SW mosi,mosi,...mosi -- SPI write hex bytes"); |
whismanoid | 25:9d4012b0887f | 6362 | // VERIFY: parse new SPI settings parse_strCommandArgs() SCLK=1000000 CPOL=0 CPHA=0 |
whismanoid | 25:9d4012b0887f | 6363 | #endif // SUPPORT_SPI |
whismanoid | 25:9d4012b0887f | 6364 | // |
whismanoid | 25:9d4012b0887f | 6365 | // Application-specific commands (help text) here |
whismanoid | 25:9d4012b0887f | 6366 | // |
whismanoid | 25:9d4012b0887f | 6367 | #if APPLICATION_ArduinoPinsMonitor |
whismanoid | 25:9d4012b0887f | 6368 | cmdLine.serial().printf("\r\n A-Z,a-z,0-9 -- reserved for application use"); // ArduinoPinsMonitor |
whismanoid | 25:9d4012b0887f | 6369 | #endif // APPLICATION_ArduinoPinsMonitor |
whismanoid | 25:9d4012b0887f | 6370 | // |
whismanoid | 25:9d4012b0887f | 6371 | |
whismanoid | 25:9d4012b0887f | 6372 | extern void MAX5719_menu_help(CmdLine & cmdLine); // defined in Test_Menu_MAX5719.cpp\n |
whismanoid | 25:9d4012b0887f | 6373 | MAX5719_menu_help(cmdLine); |
whismanoid | 25:9d4012b0887f | 6374 | } |
whismanoid | 25:9d4012b0887f | 6375 | |
whismanoid | 25:9d4012b0887f | 6376 | |
whismanoid | 25:9d4012b0887f | 6377 | |
whismanoid | 25:9d4012b0887f | 6378 | //-------------------------------------------------- |
whismanoid | 25:9d4012b0887f | 6379 | // main menu command-line parser |
whismanoid | 25:9d4012b0887f | 6380 | // invoked by CmdLine::append(char ch) or CmdLine::idleAppendIfReadable() |
whismanoid | 25:9d4012b0887f | 6381 | void main_menu_onEOLcommandParser(CmdLine & cmdLine) |
whismanoid | 25:9d4012b0887f | 6382 | { |
whismanoid | 25:9d4012b0887f | 6383 | // DIAGNOSTIC: print line buffer |
whismanoid | 25:9d4012b0887f | 6384 | //~ cmdLine.serial().printf("\r\nmain_menu_onEOLcommandParser: ~%s~\r\n", cmdLine.str()); |
whismanoid | 25:9d4012b0887f | 6385 | // |
whismanoid | 25:9d4012b0887f | 6386 | switch (cmdLine[0]) |
whismanoid | 25:9d4012b0887f | 6387 | { |
whismanoid | 25:9d4012b0887f | 6388 | case '?': |
whismanoid | 25:9d4012b0887f | 6389 | main_menu_status(cmdLine); |
whismanoid | 25:9d4012b0887f | 6390 | main_menu_help(cmdLine); |
whismanoid | 25:9d4012b0887f | 6391 | // print command prompt |
whismanoid | 25:9d4012b0887f | 6392 | //cmdLine.serial().printf("\r\n>"); |
whismanoid | 25:9d4012b0887f | 6393 | break; |
whismanoid | 25:9d4012b0887f | 6394 | case '\r': case '\n': // ignore blank line |
whismanoid | 25:9d4012b0887f | 6395 | case '\0': // ignore empty line |
whismanoid | 25:9d4012b0887f | 6396 | case '#': // ignore comment line |
whismanoid | 25:9d4012b0887f | 6397 | // # -- lines beginning with # are comments |
whismanoid | 25:9d4012b0887f | 6398 | main_menu_status(cmdLine); |
whismanoid | 25:9d4012b0887f | 6399 | //~ main_menu_help(cmdLine); |
whismanoid | 25:9d4012b0887f | 6400 | // print command prompt |
whismanoid | 25:9d4012b0887f | 6401 | //cmdLine.serial().printf("\r\n>"); |
whismanoid | 25:9d4012b0887f | 6402 | break; |
whismanoid | 25:9d4012b0887f | 6403 | #if ECHO_EOF_ON_EOL |
whismanoid | 25:9d4012b0887f | 6404 | case '\x04': // Unicode (U+0004) EOT END OF TRANSMISSION = CTRL+D as EOF end of file |
whismanoid | 25:9d4012b0887f | 6405 | cmdLine.serial().printf("\x04"); // immediately echo EOF for test scripting |
whismanoid | 25:9d4012b0887f | 6406 | diagnostic_led_EOF(); |
whismanoid | 25:9d4012b0887f | 6407 | break; |
whismanoid | 25:9d4012b0887f | 6408 | case '\x1a': // Unicode (U+001A) SUB SUBSTITUTE = CTRL+Z as EOF end of file |
whismanoid | 25:9d4012b0887f | 6409 | cmdLine.serial().printf("\x1a"); // immediately echo EOF for test scripting |
whismanoid | 25:9d4012b0887f | 6410 | diagnostic_led_EOF(); |
whismanoid | 25:9d4012b0887f | 6411 | break; |
whismanoid | 25:9d4012b0887f | 6412 | #endif |
whismanoid | 25:9d4012b0887f | 6413 | #if APPLICATION_ArduinoPinsMonitor |
whismanoid | 25:9d4012b0887f | 6414 | case '.': |
whismanoid | 25:9d4012b0887f | 6415 | { |
whismanoid | 25:9d4012b0887f | 6416 | // . -- SelfTest |
whismanoid | 25:9d4012b0887f | 6417 | cmdLine.serial().printf("SelfTest()"); |
whismanoid | 30:13fc9d492ee0 | 6418 | // TODO parse "run?" prints SelfTestGroupEnable bitmask and immediately exits |
whismanoid | 30:13fc9d492ee0 | 6419 | // parse "run=0x0020" set SelfTestGroupEnable bitmask and run tests |
whismanoid | 30:13fc9d492ee0 | 6420 | if (cmdLine.parse_int_dec("run", SelfTestGroupEnable)) |
whismanoid | 30:13fc9d492ee0 | 6421 | { |
whismanoid | 30:13fc9d492ee0 | 6422 | cmdLine.serial().printf("\r\nrun=0x%4.4x", SelfTestGroupEnable); |
whismanoid | 30:13fc9d492ee0 | 6423 | } |
whismanoid | 30:13fc9d492ee0 | 6424 | // parse "runfail=0x0020" -- set SelfTestGroupEnable and run tests, halt on first failure |
whismanoid | 30:13fc9d492ee0 | 6425 | if (cmdLine.parse_int_dec("runfail", SelfTestGroupEnable)) |
whismanoid | 30:13fc9d492ee0 | 6426 | { |
whismanoid | 30:13fc9d492ee0 | 6427 | SelfTestGroupEnable |= 1; |
whismanoid | 30:13fc9d492ee0 | 6428 | cmdLine.serial().printf("\r\nrun=0x%4.4x", SelfTestGroupEnable); |
whismanoid | 30:13fc9d492ee0 | 6429 | } |
whismanoid | 30:13fc9d492ee0 | 6430 | // parse "runall=0x0020" -- run selected tests, continue even if tests fail |
whismanoid | 30:13fc9d492ee0 | 6431 | if (cmdLine.parse_int_dec("runall", SelfTestGroupEnable)) |
whismanoid | 30:13fc9d492ee0 | 6432 | { |
whismanoid | 30:13fc9d492ee0 | 6433 | SelfTestGroupEnable &=~ 1; |
whismanoid | 30:13fc9d492ee0 | 6434 | cmdLine.serial().printf("\r\nrun=0x%4.4x", SelfTestGroupEnable); |
whismanoid | 30:13fc9d492ee0 | 6435 | } |
whismanoid | 30:13fc9d492ee0 | 6436 | // parse "loopfail=0x0020" -- run selected tests, repeat until first failure |
whismanoid | 30:13fc9d492ee0 | 6437 | if (cmdLine.parse_int_dec("loopfail", SelfTestGroupEnable)) |
whismanoid | 30:13fc9d492ee0 | 6438 | { |
whismanoid | 30:13fc9d492ee0 | 6439 | SelfTestGroupEnable |= 3; |
whismanoid | 30:13fc9d492ee0 | 6440 | cmdLine.serial().printf("\r\nrun=0x%4.4x", SelfTestGroupEnable); |
whismanoid | 30:13fc9d492ee0 | 6441 | } |
whismanoid | 25:9d4012b0887f | 6442 | SelfTest(cmdLine); |
whismanoid | 25:9d4012b0887f | 6443 | } |
whismanoid | 25:9d4012b0887f | 6444 | break; |
whismanoid | 25:9d4012b0887f | 6445 | case '%': |
whismanoid | 25:9d4012b0887f | 6446 | { |
whismanoid | 25:9d4012b0887f | 6447 | pinsMonitor_submenu_onEOLcommandParser(cmdLine); |
whismanoid | 25:9d4012b0887f | 6448 | } |
whismanoid | 25:9d4012b0887f | 6449 | break; // case '%' |
whismanoid | 25:9d4012b0887f | 6450 | #endif // APPLICATION_ArduinoPinsMonitor |
whismanoid | 25:9d4012b0887f | 6451 | // |
whismanoid | 25:9d4012b0887f | 6452 | // Application-specific commands here |
whismanoid | 25:9d4012b0887f | 6453 | // alphanumeric command codes A-Z,a-z,0-9 reserved for application use |
whismanoid | 25:9d4012b0887f | 6454 | // |
whismanoid | 25:9d4012b0887f | 6455 | #if APPLICATION_ArduinoPinsMonitor |
whismanoid | 25:9d4012b0887f | 6456 | #endif // APPLICATION_ArduinoPinsMonitor |
whismanoid | 25:9d4012b0887f | 6457 | |
whismanoid | 25:9d4012b0887f | 6458 | // |
whismanoid | 25:9d4012b0887f | 6459 | // add new commands here |
whismanoid | 25:9d4012b0887f | 6460 | // |
whismanoid | 25:9d4012b0887f | 6461 | default: |
whismanoid | 25:9d4012b0887f | 6462 | extern bool MAX5719_menu_onEOLcommandParser(CmdLine & cmdLine); // defined in Test_Menu_MAX5719.cpp |
whismanoid | 25:9d4012b0887f | 6463 | if (!MAX5719_menu_onEOLcommandParser(cmdLine)) |
whismanoid | 25:9d4012b0887f | 6464 | { // not_handled_by_device_submenu |
whismanoid | 25:9d4012b0887f | 6465 | cmdLine.serial().printf("\r\n unknown command 0x%2.2x \"%s\"\r\n", cmdLine.str()[0], cmdLine.str()); |
whismanoid | 25:9d4012b0887f | 6466 | |
whismanoid | 25:9d4012b0887f | 6467 | # if HAS_DAPLINK_SERIAL |
whismanoid | 25:9d4012b0887f | 6468 | cmdLine_DAPLINKserial.serial().printf("\r\n unknown command 0x%2.2x \"%s\"\r\n", cmdLine.str()[0], cmdLine.str()); |
whismanoid | 25:9d4012b0887f | 6469 | |
whismanoid | 25:9d4012b0887f | 6470 | # endif // HAS_DAPLINK_SERIAL |
whismanoid | 25:9d4012b0887f | 6471 | } |
whismanoid | 25:9d4012b0887f | 6472 | } // switch (cmdLine[0]) |
whismanoid | 25:9d4012b0887f | 6473 | // |
whismanoid | 25:9d4012b0887f | 6474 | // print command prompt |
whismanoid | 25:9d4012b0887f | 6475 | cmdLine.serial().printf("\r\nMAX5719 > "); |
whismanoid | 25:9d4012b0887f | 6476 | |
whismanoid | 25:9d4012b0887f | 6477 | } // end void main_menu_onEOLcommandParser(CmdLine & cmdLine) |
whismanoid | 25:9d4012b0887f | 6478 | |
whismanoid | 25:9d4012b0887f | 6479 | //-------------------------------------------------- |
whismanoid | 25:9d4012b0887f | 6480 | #if MAX5719_ONSPIPRINT |
whismanoid | 25:9d4012b0887f | 6481 | // Optional Diagnostic function to print SPI transactions |
whismanoid | 25:9d4012b0887f | 6482 | void onSPIprint_handler(size_t byteCount, uint8_t mosiData[], uint8_t misoData[]) |
whismanoid | 25:9d4012b0887f | 6483 | { |
whismanoid | 25:9d4012b0887f | 6484 | cmdLine_serial.serial().printf("\r\n SPI MOSI->"); |
whismanoid | 25:9d4012b0887f | 6485 | for (uint8_t index = 0; index < byteCount; index++) { |
whismanoid | 25:9d4012b0887f | 6486 | cmdLine_serial.serial().printf(" 0x%2.2X", mosiData[index]); |
whismanoid | 25:9d4012b0887f | 6487 | } |
whismanoid | 25:9d4012b0887f | 6488 | cmdLine_serial.serial().printf(" MISO<-"); |
whismanoid | 25:9d4012b0887f | 6489 | for (uint8_t index = 0; index < byteCount; index++) { |
whismanoid | 25:9d4012b0887f | 6490 | cmdLine_serial.serial().printf(" 0x%2.2X", misoData[index]); |
whismanoid | 25:9d4012b0887f | 6491 | } |
whismanoid | 25:9d4012b0887f | 6492 | cmdLine_serial.serial().printf(" "); |
whismanoid | 25:9d4012b0887f | 6493 | } |
whismanoid | 25:9d4012b0887f | 6494 | #endif // MAX5719_ONSPIPRINT |
whismanoid | 25:9d4012b0887f | 6495 | |
whismanoid | 25:9d4012b0887f | 6496 | //-------------------------------------------------- |
whismanoid | 25:9d4012b0887f | 6497 | void InitializeConfiguration() |
whismanoid | 25:9d4012b0887f | 6498 | { |
whismanoid | 25:9d4012b0887f | 6499 | // CODE GENERATOR: example code: member function Init |
whismanoid | 25:9d4012b0887f | 6500 | # if HAS_DAPLINK_SERIAL |
whismanoid | 25:9d4012b0887f | 6501 | cmdLine_DAPLINKserial.serial().printf("\r\nMAX5719_Init()"); |
whismanoid | 25:9d4012b0887f | 6502 | |
whismanoid | 25:9d4012b0887f | 6503 | # endif |
whismanoid | 25:9d4012b0887f | 6504 | cmdLine_serial.serial().printf("\r\nMAX5719_Init()"); |
whismanoid | 25:9d4012b0887f | 6505 | |
whismanoid | 25:9d4012b0887f | 6506 | g_MAX5719_device.Init(); // defined in #include MAX5719.h |
whismanoid | 25:9d4012b0887f | 6507 | # if MAX5719_ONSPIPRINT |
whismanoid | 25:9d4012b0887f | 6508 | // Optional Diagnostic function to print SPI transactions |
whismanoid | 25:9d4012b0887f | 6509 | # if MAX5719_ONSPIPRINT_ENABLED |
whismanoid | 25:9d4012b0887f | 6510 | g_MAX5719_device.onSPIprint = onSPIprint_handler; |
whismanoid | 25:9d4012b0887f | 6511 | # else |
whismanoid | 25:9d4012b0887f | 6512 | g_MAX5719_device.onSPIprint = NULL; |
whismanoid | 25:9d4012b0887f | 6513 | # endif |
whismanoid | 25:9d4012b0887f | 6514 | # endif |
whismanoid | 25:9d4012b0887f | 6515 | } // end of void InitializeConfiguration() |
whismanoid | 25:9d4012b0887f | 6516 | |
whismanoid | 25:9d4012b0887f | 6517 | //-------------------------------------------------- |
whismanoid | 25:9d4012b0887f | 6518 | // diagnostic rbg led GREEN |
whismanoid | 25:9d4012b0887f | 6519 | void diagnostic_led_EOF() |
whismanoid | 25:9d4012b0887f | 6520 | { |
whismanoid | 25:9d4012b0887f | 6521 | #if USE_LEDS |
whismanoid | 25:9d4012b0887f | 6522 | led1 = LED_ON; led2 = LED_ON; led3 = LED_OFF; // diagnostic rbg led RED+GREEN=YELLOW |
whismanoid | 25:9d4012b0887f | 6523 | // 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 | 6524 | ThisThread::sleep_for(250); // [since mbed-os-5.10] vs Thread::wait(250); |
whismanoid | 25:9d4012b0887f | 6525 | led1 = LED_OFF; led2 = LED_ON; led3 = LED_OFF; // diagnostic rbg led GREEN |
whismanoid | 25:9d4012b0887f | 6526 | ThisThread::sleep_for(250); // [since mbed-os-5.10] vs Thread::wait(250); |
whismanoid | 25:9d4012b0887f | 6527 | led1 = LED_ON; led2 = LED_ON; led3 = LED_OFF; // diagnostic rbg led RED+GREEN=YELLOW |
whismanoid | 25:9d4012b0887f | 6528 | ThisThread::sleep_for(250); // [since mbed-os-5.10] vs Thread::wait(250); |
whismanoid | 25:9d4012b0887f | 6529 | led1 = LED_OFF; led2 = LED_ON; led3 = LED_OFF; // diagnostic rbg led GREEN |
whismanoid | 25:9d4012b0887f | 6530 | ThisThread::sleep_for(250); // [since mbed-os-5.10] vs Thread::wait(250); |
whismanoid | 25:9d4012b0887f | 6531 | #endif // USE_LEDS |
whismanoid | 25:9d4012b0887f | 6532 | } |
whismanoid | 25:9d4012b0887f | 6533 | |
whismanoid | 25:9d4012b0887f | 6534 | //-------------------------------------------------- |
whismanoid | 25:9d4012b0887f | 6535 | // Support commands that get handled immediately w/o waiting for EOL |
whismanoid | 25:9d4012b0887f | 6536 | // handled as immediate command, do not append to buffer |
whismanoid | 25:9d4012b0887f | 6537 | void on_immediate_0x21() // Unicode (U+0021) ! EXCLAMATION MARK |
whismanoid | 25:9d4012b0887f | 6538 | { |
whismanoid | 25:9d4012b0887f | 6539 | #if USE_LEDS |
whismanoid | 25:9d4012b0887f | 6540 | led1 = LED_OFF; led2 = LED_OFF; led3 = LED_ON; // diagnostic rbg led BLUE |
whismanoid | 25:9d4012b0887f | 6541 | #endif // USE_LEDS |
whismanoid | 25:9d4012b0887f | 6542 | InitializeConfiguration(); |
whismanoid | 25:9d4012b0887f | 6543 | ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125); |
whismanoid | 25:9d4012b0887f | 6544 | } |
whismanoid | 25:9d4012b0887f | 6545 | |
whismanoid | 25:9d4012b0887f | 6546 | //-------------------------------------------------- |
whismanoid | 25:9d4012b0887f | 6547 | // Support commands that get handled immediately w/o waiting for EOL |
whismanoid | 25:9d4012b0887f | 6548 | // handled as immediate command, do not append to buffer |
whismanoid | 25:9d4012b0887f | 6549 | void on_immediate_0x7b() // Unicode (U+007B) { LEFT CURLY BRACKET |
whismanoid | 25:9d4012b0887f | 6550 | { |
whismanoid | 25:9d4012b0887f | 6551 | #if HAS_BUTTON2_DEMO_INTERRUPT |
whismanoid | 25:9d4012b0887f | 6552 | onButton2FallingEdge(); |
whismanoid | 25:9d4012b0887f | 6553 | #endif |
whismanoid | 25:9d4012b0887f | 6554 | } |
whismanoid | 25:9d4012b0887f | 6555 | |
whismanoid | 25:9d4012b0887f | 6556 | //-------------------------------------------------- |
whismanoid | 25:9d4012b0887f | 6557 | // Support commands that get handled immediately w/o waiting for EOL |
whismanoid | 25:9d4012b0887f | 6558 | // handled as immediate command, do not append to buffer |
whismanoid | 25:9d4012b0887f | 6559 | void on_immediate_0x7d() // Unicode (U+007D) } RIGHT CURLY BRACKET |
whismanoid | 25:9d4012b0887f | 6560 | { |
whismanoid | 25:9d4012b0887f | 6561 | #if HAS_BUTTON1_DEMO_INTERRUPT |
whismanoid | 25:9d4012b0887f | 6562 | onButton1FallingEdge(); |
whismanoid | 25:9d4012b0887f | 6563 | #endif |
whismanoid | 25:9d4012b0887f | 6564 | } |
whismanoid | 25:9d4012b0887f | 6565 | |
whismanoid | 25:9d4012b0887f | 6566 | //---------------------------------------- |
whismanoid | 25:9d4012b0887f | 6567 | // example code main function |
whismanoid | 25:9d4012b0887f | 6568 | int main() |
whismanoid | 25:9d4012b0887f | 6569 | { |
whismanoid | 25:9d4012b0887f | 6570 | // Configure serial ports |
whismanoid | 25:9d4012b0887f | 6571 | cmdLine_serial.clear(); |
whismanoid | 25:9d4012b0887f | 6572 | //~ cmdLine_serial.serial().printf("\r\n cmdLine_serial.serial().printf test\r\n"); |
whismanoid | 25:9d4012b0887f | 6573 | cmdLine_serial.onEOLcommandParser = main_menu_onEOLcommandParser; |
whismanoid | 25:9d4012b0887f | 6574 | cmdLine_serial.diagnostic_led_EOF = diagnostic_led_EOF; |
whismanoid | 25:9d4012b0887f | 6575 | /// CmdLine::set_immediate_handler(char, functionPointer_void_void_on_immediate_0x21); |
whismanoid | 25:9d4012b0887f | 6576 | cmdLine_serial.on_immediate_0x21 = on_immediate_0x21; |
whismanoid | 25:9d4012b0887f | 6577 | cmdLine_serial.on_immediate_0x7b = on_immediate_0x7b; |
whismanoid | 25:9d4012b0887f | 6578 | cmdLine_serial.on_immediate_0x7d = on_immediate_0x7d; |
whismanoid | 25:9d4012b0887f | 6579 | # if HAS_DAPLINK_SERIAL |
whismanoid | 25:9d4012b0887f | 6580 | cmdLine_DAPLINKserial.clear(); |
whismanoid | 25:9d4012b0887f | 6581 | //~ cmdLine_DAPLINKserial.serial().printf("\r\n cmdLine_DAPLINKserial.serial().printf test\r\n"); |
whismanoid | 25:9d4012b0887f | 6582 | cmdLine_DAPLINKserial.onEOLcommandParser = main_menu_onEOLcommandParser; |
whismanoid | 25:9d4012b0887f | 6583 | /// @todo CmdLine::set_immediate_handler(char, functionPointer_void_void_on_immediate_0x21); |
whismanoid | 25:9d4012b0887f | 6584 | cmdLine_DAPLINKserial.on_immediate_0x21 = on_immediate_0x21; |
whismanoid | 25:9d4012b0887f | 6585 | cmdLine_DAPLINKserial.on_immediate_0x7b = on_immediate_0x7b; |
whismanoid | 25:9d4012b0887f | 6586 | cmdLine_DAPLINKserial.on_immediate_0x7d = on_immediate_0x7d; |
whismanoid | 25:9d4012b0887f | 6587 | # endif |
whismanoid | 25:9d4012b0887f | 6588 | |
whismanoid | 25:9d4012b0887f | 6589 | |
whismanoid | 25:9d4012b0887f | 6590 | //print_banner(); |
whismanoid | 25:9d4012b0887f | 6591 | |
whismanoid | 25:9d4012b0887f | 6592 | #if HAS_I2C |
whismanoid | 25:9d4012b0887f | 6593 | // i2c init |
whismanoid | 25:9d4012b0887f | 6594 | // declare in narrower scope: MAX32625MBED I2C i2cMaster(...) |
whismanoid | 25:9d4012b0887f | 6595 | // i2cMaster.frequency(g_I2C_SCL_Hz); |
whismanoid | 25:9d4012b0887f | 6596 | #else |
whismanoid | 25:9d4012b0887f | 6597 | // Ensure that the unused I2C pins do not interfere with analog inputs A4 and A5 |
whismanoid | 25:9d4012b0887f | 6598 | #if HAS_digitalInOut14 |
whismanoid | 25:9d4012b0887f | 6599 | // DigitalInOut digitalInOut14(P1_6, PIN_INPUT, PullUp, 1); // P1_6 TARGET_MAX32635MBED A4/SDA (10pin digital connector) |
whismanoid | 25:9d4012b0887f | 6600 | digitalInOut14.input(); |
whismanoid | 25:9d4012b0887f | 6601 | #endif |
whismanoid | 25:9d4012b0887f | 6602 | #if HAS_digitalInOut15 |
whismanoid | 25:9d4012b0887f | 6603 | // DigitalInOut digitalInOut15(P1_7, PIN_INPUT, PullUp, 1); // P1_7 TARGET_MAX32635MBED A5/SCL (10pin digital connector) |
whismanoid | 25:9d4012b0887f | 6604 | digitalInOut15.input(); |
whismanoid | 25:9d4012b0887f | 6605 | #endif |
whismanoid | 25:9d4012b0887f | 6606 | #if HAS_digitalInOut16 |
whismanoid | 25:9d4012b0887f | 6607 | // DigitalInOut mode can be one of PullUp, PullDown, PullNone, OpenDrain |
whismanoid | 25:9d4012b0887f | 6608 | // PullUp-->3.4V, PullDown-->1.7V, PullNone-->3.5V, OpenDrain-->0.00V |
whismanoid | 25:9d4012b0887f | 6609 | //DigitalInOut digitalInOut16(P3_4, PIN_INPUT, OpenDrain, 0); // P3_4 TARGET_MAX32635MBED A4/SDA (6pin analog connector) |
whismanoid | 25:9d4012b0887f | 6610 | digitalInOut16.input(); |
whismanoid | 25:9d4012b0887f | 6611 | #endif |
whismanoid | 25:9d4012b0887f | 6612 | #if HAS_digitalInOut17 |
whismanoid | 25:9d4012b0887f | 6613 | //DigitalInOut digitalInOut17(P3_5, PIN_INPUT, OpenDrain, 0); // P3_5 TARGET_MAX32635MBED A5/SCL (6pin analog connector) |
whismanoid | 25:9d4012b0887f | 6614 | digitalInOut17.input(); |
whismanoid | 25:9d4012b0887f | 6615 | #endif |
whismanoid | 25:9d4012b0887f | 6616 | #endif // HAS_I2C |
whismanoid | 25:9d4012b0887f | 6617 | |
whismanoid | 25:9d4012b0887f | 6618 | |
whismanoid | 25:9d4012b0887f | 6619 | #if USE_LEDS |
whismanoid | 25:9d4012b0887f | 6620 | #if defined(TARGET_MAX32630) |
whismanoid | 25:9d4012b0887f | 6621 | led1 = LED_ON; led2 = LED_OFF; led3 = LED_OFF; // diagnostic rbg led RED |
whismanoid | 25:9d4012b0887f | 6622 | ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125); |
whismanoid | 25:9d4012b0887f | 6623 | led1 = LED_OFF; led2 = LED_ON; led3 = LED_OFF; // diagnostic rbg led GREEN |
whismanoid | 25:9d4012b0887f | 6624 | ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125); |
whismanoid | 25:9d4012b0887f | 6625 | led1 = LED_OFF; led2 = LED_OFF; led3 = LED_ON; // diagnostic rbg led BLUE |
whismanoid | 25:9d4012b0887f | 6626 | ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125); |
whismanoid | 25:9d4012b0887f | 6627 | led1 = LED_ON; led2 = LED_ON; led3 = LED_ON; // diagnostic rbg led RED+GREEN+BLUE=WHITE |
whismanoid | 25:9d4012b0887f | 6628 | ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125); |
whismanoid | 25:9d4012b0887f | 6629 | led1 = LED_OFF; led2 = LED_ON; led3 = LED_ON; // diagnostic rbg led GREEN+BLUE=CYAN |
whismanoid | 25:9d4012b0887f | 6630 | ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125); |
whismanoid | 25:9d4012b0887f | 6631 | led1 = LED_ON; led2 = LED_OFF; led3 = LED_ON; // diagnostic rbg led RED+BLUE=MAGENTA |
whismanoid | 25:9d4012b0887f | 6632 | ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125); |
whismanoid | 25:9d4012b0887f | 6633 | led1 = LED_ON; led2 = LED_ON; led3 = LED_OFF; // diagnostic rbg led RED+GREEN=YELLOW |
whismanoid | 25:9d4012b0887f | 6634 | ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125); |
whismanoid | 25:9d4012b0887f | 6635 | led1 = LED_OFF; led2 = LED_OFF; led3 = LED_OFF; // diagnostic rbg led BLACK |
whismanoid | 25:9d4012b0887f | 6636 | ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125); |
whismanoid | 25:9d4012b0887f | 6637 | #elif defined(TARGET_MAX32625MBED) |
whismanoid | 25:9d4012b0887f | 6638 | led1 = LED_ON; led2 = LED_OFF; led3 = LED_OFF; // diagnostic rbg led RED |
whismanoid | 25:9d4012b0887f | 6639 | ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125); |
whismanoid | 25:9d4012b0887f | 6640 | led1 = LED_OFF; led2 = LED_ON; led3 = LED_OFF; // diagnostic rbg led GREEN |
whismanoid | 25:9d4012b0887f | 6641 | ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125); |
whismanoid | 25:9d4012b0887f | 6642 | led1 = LED_OFF; led2 = LED_OFF; led3 = LED_ON; // diagnostic rbg led BLUE |
whismanoid | 25:9d4012b0887f | 6643 | ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125); |
whismanoid | 25:9d4012b0887f | 6644 | led1 = LED_ON; led2 = LED_ON; led3 = LED_ON; // diagnostic rbg led RED+GREEN+BLUE=WHITE |
whismanoid | 25:9d4012b0887f | 6645 | ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125); |
whismanoid | 25:9d4012b0887f | 6646 | led1 = LED_OFF; led2 = LED_ON; led3 = LED_ON; // diagnostic rbg led GREEN+BLUE=CYAN |
whismanoid | 25:9d4012b0887f | 6647 | ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125); |
whismanoid | 25:9d4012b0887f | 6648 | led1 = LED_ON; led2 = LED_OFF; led3 = LED_ON; // diagnostic rbg led RED+BLUE=MAGENTA |
whismanoid | 25:9d4012b0887f | 6649 | ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125); |
whismanoid | 25:9d4012b0887f | 6650 | led1 = LED_ON; led2 = LED_ON; led3 = LED_OFF; // diagnostic rbg led RED+GREEN=YELLOW |
whismanoid | 25:9d4012b0887f | 6651 | ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125); |
whismanoid | 25:9d4012b0887f | 6652 | led1 = LED_OFF; led2 = LED_OFF; led3 = LED_OFF; // diagnostic rbg led BLACK |
whismanoid | 25:9d4012b0887f | 6653 | ThisThread::sleep_for(125); // [since mbed-os-5.10] vs Thread::wait(125); |
whismanoid | 25:9d4012b0887f | 6654 | #else // not defined(TARGET_LPC1768 etc.) |
whismanoid | 25:9d4012b0887f | 6655 | led1 = LED_ON; |
whismanoid | 25:9d4012b0887f | 6656 | led2 = LED_OFF; |
whismanoid | 25:9d4012b0887f | 6657 | led3 = LED_OFF; |
whismanoid | 25:9d4012b0887f | 6658 | led4 = LED_OFF; |
whismanoid | 25:9d4012b0887f | 6659 | ThisThread::sleep_for(75); // [since mbed-os-5.10] vs Thread::wait(75); |
whismanoid | 25:9d4012b0887f | 6660 | //led1 = LED_ON; |
whismanoid | 25:9d4012b0887f | 6661 | led2 = LED_ON; |
whismanoid | 25:9d4012b0887f | 6662 | ThisThread::sleep_for(75); // [since mbed-os-5.10] vs Thread::wait(75); |
whismanoid | 25:9d4012b0887f | 6663 | led1 = LED_OFF; |
whismanoid | 25:9d4012b0887f | 6664 | //led2 = LED_ON; |
whismanoid | 25:9d4012b0887f | 6665 | led3 = LED_ON; |
whismanoid | 25:9d4012b0887f | 6666 | ThisThread::sleep_for(75); // [since mbed-os-5.10] vs Thread::wait(75); |
whismanoid | 25:9d4012b0887f | 6667 | led2 = LED_OFF; |
whismanoid | 25:9d4012b0887f | 6668 | //led3 = LED_ON; |
whismanoid | 25:9d4012b0887f | 6669 | led4 = LED_ON; |
whismanoid | 25:9d4012b0887f | 6670 | ThisThread::sleep_for(75); // [since mbed-os-5.10] vs Thread::wait(75); |
whismanoid | 25:9d4012b0887f | 6671 | led3 = LED_OFF; |
whismanoid | 25:9d4012b0887f | 6672 | led4 = LED_ON; |
whismanoid | 25:9d4012b0887f | 6673 | // |
whismanoid | 25:9d4012b0887f | 6674 | #endif // target definition |
whismanoid | 25:9d4012b0887f | 6675 | #endif |
whismanoid | 25:9d4012b0887f | 6676 | |
whismanoid | 25:9d4012b0887f | 6677 | // cmd_TE(); |
whismanoid | 25:9d4012b0887f | 6678 | |
whismanoid | 25:9d4012b0887f | 6679 | // #if USE_LEDS |
whismanoid | 25:9d4012b0887f | 6680 | // rgb_led.white(); // diagnostic rbg led RED+GREEN+BLUE=WHITE |
whismanoid | 25:9d4012b0887f | 6681 | // #endif // USE_LEDS |
whismanoid | 25:9d4012b0887f | 6682 | if (led1.is_connected()) { |
whismanoid | 25:9d4012b0887f | 6683 | led1 = LED_ON; |
whismanoid | 25:9d4012b0887f | 6684 | } |
whismanoid | 25:9d4012b0887f | 6685 | if (led2.is_connected()) { |
whismanoid | 25:9d4012b0887f | 6686 | led2 = LED_ON; |
whismanoid | 25:9d4012b0887f | 6687 | } |
whismanoid | 25:9d4012b0887f | 6688 | if (led3.is_connected()) { |
whismanoid | 25:9d4012b0887f | 6689 | led3 = LED_ON; |
whismanoid | 25:9d4012b0887f | 6690 | } |
whismanoid | 25:9d4012b0887f | 6691 | |
whismanoid | 25:9d4012b0887f | 6692 | InitializeConfiguration(); |
whismanoid | 25:9d4012b0887f | 6693 | // example code: serial port banner message |
whismanoid | 25:9d4012b0887f | 6694 | #if defined(TARGET_MAX32625MBED) |
whismanoid | 25:9d4012b0887f | 6695 | serial.printf("MAX32625MBED "); |
whismanoid | 25:9d4012b0887f | 6696 | #elif defined(TARGET_MAX32625PICO) |
whismanoid | 25:9d4012b0887f | 6697 | serial.printf("MAX32625PICO "); |
whismanoid | 25:9d4012b0887f | 6698 | #elif defined(TARGET_MAX32600MBED) |
whismanoid | 25:9d4012b0887f | 6699 | serial.printf("MAX32600MBED "); |
whismanoid | 25:9d4012b0887f | 6700 | #elif defined(TARGET_NUCLEO_F446RE) |
whismanoid | 25:9d4012b0887f | 6701 | serial.printf("NUCLEO_F446RE "); |
whismanoid | 25:9d4012b0887f | 6702 | #endif |
whismanoid | 25:9d4012b0887f | 6703 | serial.printf("MAX5719BOB\r\n"); |
whismanoid | 25:9d4012b0887f | 6704 | |
whismanoid | 25:9d4012b0887f | 6705 | |
whismanoid | 25:9d4012b0887f | 6706 | while (1) { |
whismanoid | 25:9d4012b0887f | 6707 | #if HAS_BUTTON1_DEMO_INTERRUPT_POLLING |
whismanoid | 25:9d4012b0887f | 6708 | // avoid runtime error on button1 press [mbed-os-5.11] |
whismanoid | 25:9d4012b0887f | 6709 | // instead of using InterruptIn, use DigitalIn and poll in main while(1) |
whismanoid | 25:9d4012b0887f | 6710 | # if HAS_BUTTON1_DEMO_INTERRUPT |
whismanoid | 25:9d4012b0887f | 6711 | static int button1_value_prev = 1; |
whismanoid | 25:9d4012b0887f | 6712 | static int button1_value_now = 1; |
whismanoid | 25:9d4012b0887f | 6713 | button1_value_prev = button1_value_now; |
whismanoid | 25:9d4012b0887f | 6714 | button1_value_now = button1.read(); |
whismanoid | 25:9d4012b0887f | 6715 | if ((button1_value_prev - button1_value_now) == 1) |
whismanoid | 25:9d4012b0887f | 6716 | { |
whismanoid | 25:9d4012b0887f | 6717 | // on button1 falling edge (button1 press) |
whismanoid | 25:9d4012b0887f | 6718 | onButton1FallingEdge(); |
whismanoid | 25:9d4012b0887f | 6719 | } |
whismanoid | 25:9d4012b0887f | 6720 | # endif // HAS_BUTTON1_DEMO_INTERRUPT |
whismanoid | 25:9d4012b0887f | 6721 | # if HAS_BUTTON2_DEMO_INTERRUPT |
whismanoid | 25:9d4012b0887f | 6722 | static int button2_value_prev = 1; |
whismanoid | 25:9d4012b0887f | 6723 | static int button2_value_now = 1; |
whismanoid | 25:9d4012b0887f | 6724 | button2_value_prev = button2_value_now; |
whismanoid | 25:9d4012b0887f | 6725 | button2_value_now = button2.read(); |
whismanoid | 25:9d4012b0887f | 6726 | if ((button2_value_prev - button2_value_now) == 1) |
whismanoid | 25:9d4012b0887f | 6727 | { |
whismanoid | 25:9d4012b0887f | 6728 | // on button2 falling edge (button2 press) |
whismanoid | 25:9d4012b0887f | 6729 | onButton2FallingEdge(); |
whismanoid | 25:9d4012b0887f | 6730 | } |
whismanoid | 25:9d4012b0887f | 6731 | # endif // HAS_BUTTON2_DEMO_INTERRUPT |
whismanoid | 25:9d4012b0887f | 6732 | #endif |
whismanoid | 25:9d4012b0887f | 6733 | # if HAS_DAPLINK_SERIAL |
whismanoid | 25:9d4012b0887f | 6734 | if (DAPLINKserial.readable()) { |
whismanoid | 25:9d4012b0887f | 6735 | cmdLine_DAPLINKserial.append(DAPLINKserial.getc()); |
whismanoid | 25:9d4012b0887f | 6736 | } |
whismanoid | 25:9d4012b0887f | 6737 | # endif // HAS_DAPLINK_SERIAL |
whismanoid | 25:9d4012b0887f | 6738 | if (serial.readable()) { |
whismanoid | 25:9d4012b0887f | 6739 | int c = serial.getc(); |
whismanoid | 25:9d4012b0887f | 6740 | cmdLine_serial.append(c); |
whismanoid | 25:9d4012b0887f | 6741 | #if IGNORE_AT_COMMANDS |
whismanoid | 25:9d4012b0887f | 6742 | # if HAS_DAPLINK_SERIAL |
whismanoid | 25:9d4012b0887f | 6743 | cmdLine_DAPLINKserial.serial().printf("%c", c); |
whismanoid | 25:9d4012b0887f | 6744 | # endif // HAS_DAPLINK_SERIAL |
whismanoid | 25:9d4012b0887f | 6745 | #endif // IGNORE_AT_COMMANDS |
whismanoid | 25:9d4012b0887f | 6746 | // |
whismanoid | 25:9d4012b0887f | 6747 | } |
whismanoid | 25:9d4012b0887f | 6748 | } // while(1) |
whismanoid | 25:9d4012b0887f | 6749 | } |