MAX11410 high speed 24-bit Delta-Sigma ADC
Dependents: MAX11410BOB_24bit_ADC MAX11410BOB_Serial_Tester
MAX11410.h@35:f94470c95dde, 2020-10-27 (annotated)
- Committer:
- whismanoid
- Date:
- Tue Oct 27 00:53:50 2020 +0000
- Revision:
- 35:f94470c95dde
- Parent:
- 34:1b72865fa71f
improve response time Measure_Voltage (for MAX11410 EMC testing)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
whismanoid | 0:68e64068330f | 1 | // /******************************************************************************* |
whismanoid | 4:c169ba85d673 | 2 | // * Copyright (C) 2020 Maxim Integrated Products, Inc., All Rights Reserved. |
whismanoid | 0:68e64068330f | 3 | // * |
whismanoid | 0:68e64068330f | 4 | // * Permission is hereby granted, free of charge, to any person obtaining a |
whismanoid | 0:68e64068330f | 5 | // * copy of this software and associated documentation files (the "Software"), |
whismanoid | 0:68e64068330f | 6 | // * to deal in the Software without restriction, including without limitation |
whismanoid | 0:68e64068330f | 7 | // * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
whismanoid | 0:68e64068330f | 8 | // * and/or sell copies of the Software, and to permit persons to whom the |
whismanoid | 0:68e64068330f | 9 | // * Software is furnished to do so, subject to the following conditions: |
whismanoid | 0:68e64068330f | 10 | // * |
whismanoid | 0:68e64068330f | 11 | // * The above copyright notice and this permission notice shall be included |
whismanoid | 0:68e64068330f | 12 | // * in all copies or substantial portions of the Software. |
whismanoid | 0:68e64068330f | 13 | // * |
whismanoid | 0:68e64068330f | 14 | // * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
whismanoid | 0:68e64068330f | 15 | // * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
whismanoid | 0:68e64068330f | 16 | // * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
whismanoid | 0:68e64068330f | 17 | // * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES |
whismanoid | 0:68e64068330f | 18 | // * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
whismanoid | 0:68e64068330f | 19 | // * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
whismanoid | 0:68e64068330f | 20 | // * OTHER DEALINGS IN THE SOFTWARE. |
whismanoid | 0:68e64068330f | 21 | // * |
whismanoid | 0:68e64068330f | 22 | // * Except as contained in this notice, the name of Maxim Integrated |
whismanoid | 0:68e64068330f | 23 | // * Products, Inc. shall not be used except as stated in the Maxim Integrated |
whismanoid | 0:68e64068330f | 24 | // * Products, Inc. Branding Policy. |
whismanoid | 0:68e64068330f | 25 | // * |
whismanoid | 0:68e64068330f | 26 | // * The mere transfer of this software does not imply any licenses |
whismanoid | 0:68e64068330f | 27 | // * of trade secrets, proprietary technology, copyrights, patents, |
whismanoid | 0:68e64068330f | 28 | // * trademarks, maskwork rights, or any other form of intellectual |
whismanoid | 0:68e64068330f | 29 | // * property whatsoever. Maxim Integrated Products, Inc. retains all |
whismanoid | 0:68e64068330f | 30 | // * ownership rights. |
whismanoid | 0:68e64068330f | 31 | // ******************************************************************************* |
whismanoid | 0:68e64068330f | 32 | // */ |
whismanoid | 0:68e64068330f | 33 | // ********************************************************************* |
whismanoid | 0:68e64068330f | 34 | // @file MAX11410.h |
whismanoid | 0:68e64068330f | 35 | // ********************************************************************* |
whismanoid | 0:68e64068330f | 36 | // Header file |
whismanoid | 0:68e64068330f | 37 | // DO NOT EDIT; except areas designated "CUSTOMIZE". Automatically generated file. |
whismanoid | 0:68e64068330f | 38 | // generated by XMLSystemOfDevicesToMBED.py |
whismanoid | 0:68e64068330f | 39 | // System Name = ExampleSystem |
whismanoid | 0:68e64068330f | 40 | // System Description = Device driver example |
whismanoid | 0:68e64068330f | 41 | // Device Name = MAX11410 |
whismanoid | 0:68e64068330f | 42 | // Device Description = 1.9ksps, Low-Power, Serial SPI 24-Bit, 10-Channel, Differential/Single-Ended Input, SAR ADC |
whismanoid | 0:68e64068330f | 43 | // Device DeviceBriefDescription = 24-bit 1.9ksps Delta-Sigma ADC |
whismanoid | 0:68e64068330f | 44 | // Device Manufacturer = Maxim Integrated |
whismanoid | 0:68e64068330f | 45 | // Device PartNumber = MAX11410ATI+ |
whismanoid | 0:68e64068330f | 46 | // Device RegValue_Width = DataWidth16bit_HL |
whismanoid | 0:68e64068330f | 47 | // |
whismanoid | 0:68e64068330f | 48 | // ADC MaxOutputDataRate = 1.9ksps |
whismanoid | 0:68e64068330f | 49 | // ADC NumChannels = 10 |
whismanoid | 0:68e64068330f | 50 | // ADC ResolutionBits = 24 |
whismanoid | 0:68e64068330f | 51 | // |
whismanoid | 0:68e64068330f | 52 | // SPI CS = ActiveLow |
whismanoid | 0:68e64068330f | 53 | // SPI FrameStart = CS |
whismanoid | 0:68e64068330f | 54 | // SPI CPOL = 0 |
whismanoid | 0:68e64068330f | 55 | // SPI CPHA = 0 |
whismanoid | 0:68e64068330f | 56 | // SPI MOSI and MISO Data are both stable on Rising edge of SCLK |
whismanoid | 0:68e64068330f | 57 | // SPI SCLK Idle Low |
whismanoid | 0:68e64068330f | 58 | // SPI SCLKMaxMHz = 8 |
whismanoid | 0:68e64068330f | 59 | // SPI SCLKMinMHz = 0 |
whismanoid | 0:68e64068330f | 60 | // |
whismanoid | 0:68e64068330f | 61 | |
whismanoid | 0:68e64068330f | 62 | |
whismanoid | 0:68e64068330f | 63 | // Prevent multiple declaration |
whismanoid | 0:68e64068330f | 64 | #ifndef __MAX11410_H__ |
whismanoid | 0:68e64068330f | 65 | #define __MAX11410_H__ |
whismanoid | 0:68e64068330f | 66 | |
whismanoid | 0:68e64068330f | 67 | // standard include for target platform -- Platform_Include_Boilerplate |
whismanoid | 0:68e64068330f | 68 | #include "mbed.h" |
whismanoid | 0:68e64068330f | 69 | // Platforms: |
whismanoid | 0:68e64068330f | 70 | // - MAX32625MBED |
whismanoid | 0:68e64068330f | 71 | // - supports mbed-os-5.11, requires USBDevice library |
whismanoid | 0:68e64068330f | 72 | // - add https://developer.mbed.org/teams/MaximIntegrated/code/USBDevice/ |
whismanoid | 0:68e64068330f | 73 | // - remove max32630fthr library (if present) |
whismanoid | 0:68e64068330f | 74 | // - remove MAX32620FTHR library (if present) |
whismanoid | 0:68e64068330f | 75 | // - MAX32600MBED |
whismanoid | 0:68e64068330f | 76 | // - remove max32630fthr library (if present) |
whismanoid | 0:68e64068330f | 77 | // - remove MAX32620FTHR library (if present) |
whismanoid | 0:68e64068330f | 78 | // - Windows 10 note: Don't connect HDK until you are ready to load new firmware into the board. |
whismanoid | 0:68e64068330f | 79 | // - NUCLEO_F446RE |
whismanoid | 0:68e64068330f | 80 | // - remove USBDevice library |
whismanoid | 0:68e64068330f | 81 | // - remove max32630fthr library (if present) |
whismanoid | 0:68e64068330f | 82 | // - remove MAX32620FTHR library (if present) |
whismanoid | 0:68e64068330f | 83 | // - NUCLEO_F401RE |
whismanoid | 0:68e64068330f | 84 | // - remove USBDevice library |
whismanoid | 0:68e64068330f | 85 | // - remove max32630fthr library (if present) |
whismanoid | 0:68e64068330f | 86 | // - remove MAX32620FTHR library (if present) |
whismanoid | 0:68e64068330f | 87 | // - MAX32630FTHR |
whismanoid | 0:68e64068330f | 88 | // - #include "max32630fthr.h" |
whismanoid | 0:68e64068330f | 89 | // - add http://os.mbed.org/teams/MaximIntegrated/code/max32630fthr/ |
whismanoid | 0:68e64068330f | 90 | // - remove MAX32620FTHR library (if present) |
whismanoid | 0:68e64068330f | 91 | // - MAX32620FTHR |
whismanoid | 0:68e64068330f | 92 | // - #include "MAX32620FTHR.h" |
whismanoid | 0:68e64068330f | 93 | // - remove max32630fthr library (if present) |
whismanoid | 0:68e64068330f | 94 | // - add https://os.mbed.com/teams/MaximIntegrated/code/MAX32620FTHR/ |
whismanoid | 0:68e64068330f | 95 | // - not tested yet |
whismanoid | 0:68e64068330f | 96 | // - MAX32625PICO |
whismanoid | 35:f94470c95dde | 97 | // - #include "max32625pico.h" |
whismanoid | 35:f94470c95dde | 98 | // - add https://os.mbed.com/users/switches/code/max32625pico/ |
whismanoid | 0:68e64068330f | 99 | // - remove max32630fthr library (if present) |
whismanoid | 0:68e64068330f | 100 | // - remove MAX32620FTHR library (if present) |
whismanoid | 0:68e64068330f | 101 | // - not tested yet |
whismanoid | 35:f94470c95dde | 102 | // - see https://os.mbed.com/users/switches/code/max32625pico/ |
whismanoid | 35:f94470c95dde | 103 | // - see https://os.mbed.com/users/switches/code/PICO_board_demo/ |
whismanoid | 35:f94470c95dde | 104 | // - see https://os.mbed.com/users/switches/code/PICO_USB_I2C_SPI/ |
whismanoid | 35:f94470c95dde | 105 | // - see https://os.mbed.com/users/switches/code/SerialInterface/ |
whismanoid | 35:f94470c95dde | 106 | // - Note: To load the MAX32625PICO firmware, hold the button while |
whismanoid | 35:f94470c95dde | 107 | // connecting the USB cable, then copy firmware bin file |
whismanoid | 35:f94470c95dde | 108 | // to the MAINTENANCE drive. |
whismanoid | 35:f94470c95dde | 109 | // - see https://os.mbed.com/platforms/MAX32625PICO/ |
whismanoid | 35:f94470c95dde | 110 | // - see https://os.mbed.com/teams/MaximIntegrated/wiki/MAX32625PICO-Firmware-Updates |
whismanoid | 0:68e64068330f | 111 | // |
whismanoid | 0:68e64068330f | 112 | // end Platform_Include_Boilerplate |
whismanoid | 0:68e64068330f | 113 | |
whismanoid | 0:68e64068330f | 114 | // CODE GENERATOR: conditional defines |
whismanoid | 0:68e64068330f | 115 | // CODE GENERATOR: class declaration and docstrings |
whismanoid | 0:68e64068330f | 116 | /** |
whismanoid | 0:68e64068330f | 117 | * @brief MAX11410 1.9ksps, Low-Power, Serial SPI 24-Bit, 10-Channel, Differential/Single-Ended Input, SAR ADC |
whismanoid | 0:68e64068330f | 118 | * |
whismanoid | 0:68e64068330f | 119 | * |
whismanoid | 0:68e64068330f | 120 | * |
whismanoid | 0:68e64068330f | 121 | * Datasheet: https://www.maximintegrated.com/MAX11410 |
whismanoid | 0:68e64068330f | 122 | * |
whismanoid | 0:68e64068330f | 123 | * |
whismanoid | 0:68e64068330f | 124 | * |
whismanoid | 0:68e64068330f | 125 | * //---------- CODE GENERATOR: helloCppCodeList |
whismanoid | 0:68e64068330f | 126 | * @code |
whismanoid | 0:68e64068330f | 127 | * // CODE GENERATOR: example code includes |
whismanoid | 0:68e64068330f | 128 | * |
whismanoid | 0:68e64068330f | 129 | * // example code includes |
whismanoid | 0:68e64068330f | 130 | * // standard include for target platform -- Platform_Include_Boilerplate |
whismanoid | 0:68e64068330f | 131 | * #include "mbed.h" |
whismanoid | 0:68e64068330f | 132 | * // Platforms: |
whismanoid | 0:68e64068330f | 133 | * // - MAX32625MBED |
whismanoid | 0:68e64068330f | 134 | * // - supports mbed-os-5.11, requires USBDevice library |
whismanoid | 0:68e64068330f | 135 | * // - add https://developer.mbed.org/teams/MaximIntegrated/code/USBDevice/ |
whismanoid | 0:68e64068330f | 136 | * // - remove max32630fthr library (if present) |
whismanoid | 0:68e64068330f | 137 | * // - remove MAX32620FTHR library (if present) |
whismanoid | 0:68e64068330f | 138 | * // - MAX32600MBED |
whismanoid | 0:68e64068330f | 139 | * // - remove max32630fthr library (if present) |
whismanoid | 0:68e64068330f | 140 | * // - remove MAX32620FTHR library (if present) |
whismanoid | 0:68e64068330f | 141 | * // - Windows 10 note: Don't connect HDK until you are ready to load new firmware into the board. |
whismanoid | 0:68e64068330f | 142 | * // - NUCLEO_F446RE |
whismanoid | 0:68e64068330f | 143 | * // - remove USBDevice library |
whismanoid | 0:68e64068330f | 144 | * // - remove max32630fthr library (if present) |
whismanoid | 0:68e64068330f | 145 | * // - remove MAX32620FTHR library (if present) |
whismanoid | 0:68e64068330f | 146 | * // - NUCLEO_F401RE |
whismanoid | 0:68e64068330f | 147 | * // - remove USBDevice library |
whismanoid | 0:68e64068330f | 148 | * // - remove max32630fthr library (if present) |
whismanoid | 0:68e64068330f | 149 | * // - remove MAX32620FTHR library (if present) |
whismanoid | 0:68e64068330f | 150 | * // - MAX32630FTHR |
whismanoid | 0:68e64068330f | 151 | * // - #include "max32630fthr.h" |
whismanoid | 0:68e64068330f | 152 | * // - add http://os.mbed.org/teams/MaximIntegrated/code/max32630fthr/ |
whismanoid | 0:68e64068330f | 153 | * // - remove MAX32620FTHR library (if present) |
whismanoid | 0:68e64068330f | 154 | * // - MAX32620FTHR |
whismanoid | 0:68e64068330f | 155 | * // - #include "MAX32620FTHR.h" |
whismanoid | 0:68e64068330f | 156 | * // - remove max32630fthr library (if present) |
whismanoid | 0:68e64068330f | 157 | * // - add https://os.mbed.com/teams/MaximIntegrated/code/MAX32620FTHR/ |
whismanoid | 0:68e64068330f | 158 | * // - not tested yet |
whismanoid | 0:68e64068330f | 159 | * // - MAX32625PICO |
whismanoid | 35:f94470c95dde | 160 | * // - #include "max32625pico.h" |
whismanoid | 35:f94470c95dde | 161 | * // - add https://os.mbed.com/users/switches/code/max32625pico/ |
whismanoid | 0:68e64068330f | 162 | * // - remove max32630fthr library (if present) |
whismanoid | 0:68e64068330f | 163 | * // - remove MAX32620FTHR library (if present) |
whismanoid | 0:68e64068330f | 164 | * // - not tested yet |
whismanoid | 35:f94470c95dde | 165 | * // - see https://os.mbed.com/users/switches/code/max32625pico/ |
whismanoid | 35:f94470c95dde | 166 | * // - see https://os.mbed.com/users/switches/code/PICO_board_demo/ |
whismanoid | 35:f94470c95dde | 167 | * // - see https://os.mbed.com/users/switches/code/PICO_USB_I2C_SPI/ |
whismanoid | 35:f94470c95dde | 168 | * // - see https://os.mbed.com/users/switches/code/SerialInterface/ |
whismanoid | 35:f94470c95dde | 169 | * // - Note: To load the MAX32625PICO firmware, hold the button while |
whismanoid | 35:f94470c95dde | 170 | * // connecting the USB cable, then copy firmware bin file |
whismanoid | 35:f94470c95dde | 171 | * // to the MAINTENANCE drive. |
whismanoid | 35:f94470c95dde | 172 | * // - see https://os.mbed.com/platforms/MAX32625PICO/ |
whismanoid | 35:f94470c95dde | 173 | * // - see https://os.mbed.com/teams/MaximIntegrated/wiki/MAX32625PICO-Firmware-Updates |
whismanoid | 0:68e64068330f | 174 | * // |
whismanoid | 0:68e64068330f | 175 | * // end Platform_Include_Boilerplate |
whismanoid | 0:68e64068330f | 176 | * #include "MAX11410.h" |
whismanoid | 0:68e64068330f | 177 | * |
whismanoid | 0:68e64068330f | 178 | * // example code board support |
whismanoid | 0:68e64068330f | 179 | * //MAX32630FTHR pegasus(MAX32630FTHR::VIO_3V3); |
whismanoid | 0:68e64068330f | 180 | * //DigitalOut rLED(LED1); |
whismanoid | 0:68e64068330f | 181 | * //DigitalOut gLED(LED2); |
whismanoid | 0:68e64068330f | 182 | * //DigitalOut bLED(LED3); |
whismanoid | 0:68e64068330f | 183 | * // |
whismanoid | 0:68e64068330f | 184 | * // Arduino "shield" connector port definitions (MAX32625MBED shown) |
whismanoid | 0:68e64068330f | 185 | * #if defined(TARGET_MAX32625MBED) |
whismanoid | 0:68e64068330f | 186 | * #define A0 AIN_0 |
whismanoid | 0:68e64068330f | 187 | * #define A1 AIN_1 |
whismanoid | 0:68e64068330f | 188 | * #define A2 AIN_2 |
whismanoid | 0:68e64068330f | 189 | * #define A3 AIN_3 |
whismanoid | 0:68e64068330f | 190 | * #define D0 P0_0 |
whismanoid | 0:68e64068330f | 191 | * #define D1 P0_1 |
whismanoid | 0:68e64068330f | 192 | * #define D2 P0_2 |
whismanoid | 0:68e64068330f | 193 | * #define D3 P0_3 |
whismanoid | 0:68e64068330f | 194 | * #define D4 P0_4 |
whismanoid | 0:68e64068330f | 195 | * #define D5 P0_5 |
whismanoid | 0:68e64068330f | 196 | * #define D6 P0_6 |
whismanoid | 0:68e64068330f | 197 | * #define D7 P0_7 |
whismanoid | 0:68e64068330f | 198 | * #define D8 P1_4 |
whismanoid | 0:68e64068330f | 199 | * #define D9 P1_5 |
whismanoid | 0:68e64068330f | 200 | * #define D10 P1_3 |
whismanoid | 0:68e64068330f | 201 | * #define D11 P1_1 |
whismanoid | 0:68e64068330f | 202 | * #define D12 P1_2 |
whismanoid | 0:68e64068330f | 203 | * #define D13 P1_0 |
whismanoid | 35:f94470c95dde | 204 | * #elif defined(TARGET_MAX32625PICO) |
whismanoid | 35:f94470c95dde | 205 | * #warning "TARGET_MAX32625PICO not previously tested; need to define pins..." |
whismanoid | 35:f94470c95dde | 206 | * #define A0 AIN_1 |
whismanoid | 35:f94470c95dde | 207 | * #define A1 AIN_2 |
whismanoid | 35:f94470c95dde | 208 | * // #define A2 AIN_3 |
whismanoid | 35:f94470c95dde | 209 | * // #define A3 AIN_0 |
whismanoid | 35:f94470c95dde | 210 | * #define D0 P0_0 |
whismanoid | 35:f94470c95dde | 211 | * #define D1 P0_1 |
whismanoid | 35:f94470c95dde | 212 | * #define D2 P0_2 |
whismanoid | 35:f94470c95dde | 213 | * #define D3 P0_3 |
whismanoid | 35:f94470c95dde | 214 | * #define D4 P1_7 |
whismanoid | 35:f94470c95dde | 215 | * #define D5 P1_6 |
whismanoid | 35:f94470c95dde | 216 | * #define D6 P4_4 |
whismanoid | 35:f94470c95dde | 217 | * #define D7 P4_5 |
whismanoid | 35:f94470c95dde | 218 | * #define D8 P4_6 |
whismanoid | 35:f94470c95dde | 219 | * #define D9 P4_7 |
whismanoid | 35:f94470c95dde | 220 | * #define D10 P0_7 |
whismanoid | 35:f94470c95dde | 221 | * #define D11 P0_6 |
whismanoid | 35:f94470c95dde | 222 | * #define D12 P0_5 |
whismanoid | 35:f94470c95dde | 223 | * #define D13 P0_4 |
whismanoid | 0:68e64068330f | 224 | * #endif |
whismanoid | 0:68e64068330f | 225 | * |
whismanoid | 17:0e9f2dfc2a30 | 226 | * // example code declare SPI interface (GPIO controlled CS) |
whismanoid | 0:68e64068330f | 227 | * #if defined(TARGET_MAX32625MBED) |
whismanoid | 0:68e64068330f | 228 | * 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 | 0:68e64068330f | 229 | * DigitalOut spi_cs(SPI1_SS); // TARGET_MAX32625MBED: P1_3 Arduino 10-pin header D10 |
whismanoid | 35:f94470c95dde | 230 | * #elif defined(TARGET_MAX32625PICO) |
whismanoid | 35:f94470c95dde | 231 | * #warning "TARGET_MAX32625PICO not previously tested; need to define pins..." |
whismanoid | 35:f94470c95dde | 232 | * SPI spi(SPI0_MOSI, SPI0_MISO, SPI0_SCK); // mosi, miso, sclk spi1 TARGET_MAX32625PICO: pin P0_5 P0_6 P0_4 |
whismanoid | 35:f94470c95dde | 233 | * DigitalOut spi_cs(SPI0_SS); // TARGET_MAX32625PICO: pin P0_7 |
whismanoid | 0:68e64068330f | 234 | * #elif defined(TARGET_MAX32600MBED) |
whismanoid | 0:68e64068330f | 235 | * SPI spi(SPI2_MOSI, SPI2_MISO, SPI2_SCK); // mosi, miso, sclk spi1 TARGET_MAX32600MBED: Arduino 10-pin header D11 D12 D13 |
whismanoid | 0:68e64068330f | 236 | * DigitalOut spi_cs(SPI2_SS); // Generic: Arduino 10-pin header D10 |
whismanoid | 17:0e9f2dfc2a30 | 237 | * #elif defined(TARGET_NUCLEO_F446RE) || defined(TARGET_NUCLEO_F401RE) |
whismanoid | 17:0e9f2dfc2a30 | 238 | * // TODO1: avoid resource conflict between P5_0, P5_1, P5_2 SPI and DigitalInOut |
whismanoid | 17:0e9f2dfc2a30 | 239 | * // void spi_init(spi_t *obj, PinName mosi, PinName miso, PinName sclk, PinName ssel) |
whismanoid | 17:0e9f2dfc2a30 | 240 | * // |
whismanoid | 17:0e9f2dfc2a30 | 241 | * // TODO1: NUCLEO_F446RE SPI not working; CS and MOSI data looks OK but no SCLK clock pulses. |
whismanoid | 17:0e9f2dfc2a30 | 242 | * SPI spi(SPI_MOSI, SPI_MISO, SPI_SCK); // mosi, miso, sclk spi1 TARGET_NUCLEO_F446RE: Arduino 10-pin header D11 D12 D13 |
whismanoid | 17:0e9f2dfc2a30 | 243 | * DigitalOut spi_cs(SPI_CS); // TARGET_NUCLEO_F446RE: PB_6 Arduino 10-pin header D10 |
whismanoid | 17:0e9f2dfc2a30 | 244 | * // |
whismanoid | 0:68e64068330f | 245 | * #else |
whismanoid | 0:68e64068330f | 246 | * SPI spi(D11, D12, D13); // mosi, miso, sclk spi1 TARGET_MAX32600MBED: Arduino 10-pin header D11 D12 D13 |
whismanoid | 0:68e64068330f | 247 | * DigitalOut spi_cs(D10); // Generic: Arduino 10-pin header D10 |
whismanoid | 0:68e64068330f | 248 | * #endif |
whismanoid | 0:68e64068330f | 249 | * |
whismanoid | 0:68e64068330f | 250 | * // example code declare GPIO interface pins |
whismanoid | 0:68e64068330f | 251 | * // example code declare device instance |
whismanoid | 0:68e64068330f | 252 | * MAX11410 g_MAX11410_device(spi, spi_cs, MAX11410::MAX11410_IC); |
whismanoid | 0:68e64068330f | 253 | * |
whismanoid | 0:68e64068330f | 254 | * // CODE GENERATOR: example code for ADC: serial port declaration |
whismanoid | 0:68e64068330f | 255 | * //-------------------------------------------------- |
whismanoid | 0:68e64068330f | 256 | * // Declare the Serial driver |
whismanoid | 0:68e64068330f | 257 | * // default baud rate settings are 9600 8N1 |
whismanoid | 0:68e64068330f | 258 | * // install device driver from http://developer.mbed.org/media/downloads/drivers/mbedWinSerial_16466.exe |
whismanoid | 0:68e64068330f | 259 | * // see docs https://docs.mbed.com/docs/mbed-os-handbook/en/5.5/getting_started/what_need/ |
whismanoid | 0:68e64068330f | 260 | * #if defined(TARGET_MAX32630) |
whismanoid | 0:68e64068330f | 261 | * #include "USBSerial.h" |
whismanoid | 0:68e64068330f | 262 | * // Hardware serial port over DAPLink |
whismanoid | 0:68e64068330f | 263 | * // The default baud rate for the DapLink UART is 9600 |
whismanoid | 0:68e64068330f | 264 | * //Serial DAPLINKserial(P2_1, P2_0); // tx, rx |
whismanoid | 0:68e64068330f | 265 | * // #define HAS_DAPLINK_SERIAL 1 |
whismanoid | 0:68e64068330f | 266 | * // Virtual serial port over USB |
whismanoid | 0:68e64068330f | 267 | * // The baud rate does not affect the virtual USBSerial UART. |
whismanoid | 0:68e64068330f | 268 | * USBSerial serial; |
whismanoid | 0:68e64068330f | 269 | * //-------------------------------------------------- |
whismanoid | 0:68e64068330f | 270 | * #elif defined(TARGET_MAX32625MBED) |
whismanoid | 0:68e64068330f | 271 | * #include "USBSerial.h" |
whismanoid | 0:68e64068330f | 272 | * // Hardware serial port over DAPLink |
whismanoid | 0:68e64068330f | 273 | * // The default baud rate for the DapLink UART is 9600 |
whismanoid | 0:68e64068330f | 274 | * //Serial DAPLINKserial(P2_1, P2_0); // tx, rx |
whismanoid | 0:68e64068330f | 275 | * // #define HAS_DAPLINK_SERIAL 1 |
whismanoid | 0:68e64068330f | 276 | * // Virtual serial port over USB |
whismanoid | 0:68e64068330f | 277 | * // The baud rate does not affect the virtual USBSerial UART. |
whismanoid | 0:68e64068330f | 278 | * USBSerial serial; |
whismanoid | 0:68e64068330f | 279 | * //-------------------------------------------------- |
whismanoid | 0:68e64068330f | 280 | * #elif defined(TARGET_MAX32600) |
whismanoid | 0:68e64068330f | 281 | * #include "USBSerial.h" |
whismanoid | 0:68e64068330f | 282 | * // Hardware serial port over DAPLink |
whismanoid | 0:68e64068330f | 283 | * // The default baud rate for the DapLink UART is 9600 |
whismanoid | 0:68e64068330f | 284 | * Serial DAPLINKserial(P1_1, P1_0); // tx, rx |
whismanoid | 0:68e64068330f | 285 | * #define HAS_DAPLINK_SERIAL 1 |
whismanoid | 0:68e64068330f | 286 | * // Virtual serial port over USB |
whismanoid | 0:68e64068330f | 287 | * // The baud rate does not affect the virtual USBSerial UART. |
whismanoid | 0:68e64068330f | 288 | * USBSerial serial; |
whismanoid | 0:68e64068330f | 289 | * //-------------------------------------------------- |
whismanoid | 0:68e64068330f | 290 | * #elif defined(TARGET_NUCLEO_F446RE) || defined(TARGET_NUCLEO_F401RE) |
whismanoid | 0:68e64068330f | 291 | * Serial serial(SERIAL_TX, SERIAL_RX); // tx, rx |
whismanoid | 0:68e64068330f | 292 | * //-------------------------------------------------- |
whismanoid | 0:68e64068330f | 293 | * #else |
whismanoid | 0:68e64068330f | 294 | * #if defined(SERIAL_TX) |
whismanoid | 0:68e64068330f | 295 | * #warning "target not previously tested; guess serial pins are SERIAL_TX, SERIAL_RX..." |
whismanoid | 0:68e64068330f | 296 | * Serial serial(SERIAL_TX, SERIAL_RX); // tx, rx |
whismanoid | 0:68e64068330f | 297 | * #elif defined(USBTX) |
whismanoid | 0:68e64068330f | 298 | * #warning "target not previously tested; guess serial pins are USBTX, USBRX..." |
whismanoid | 0:68e64068330f | 299 | * Serial serial(USBTX, USBRX); // tx, rx |
whismanoid | 0:68e64068330f | 300 | * #elif defined(UART_TX) |
whismanoid | 0:68e64068330f | 301 | * #warning "target not previously tested; guess serial pins are UART_TX, UART_RX..." |
whismanoid | 0:68e64068330f | 302 | * Serial serial(UART_TX, UART_RX); // tx, rx |
whismanoid | 0:68e64068330f | 303 | * #else |
whismanoid | 0:68e64068330f | 304 | * #warning "target not previously tested; need to define serial pins..." |
whismanoid | 0:68e64068330f | 305 | * #endif |
whismanoid | 0:68e64068330f | 306 | * #endif |
whismanoid | 0:68e64068330f | 307 | * // |
whismanoid | 0:68e64068330f | 308 | * #include "CmdLine.h" |
whismanoid | 0:68e64068330f | 309 | * CmdLine cmdLine(serial, "serial"); |
whismanoid | 0:68e64068330f | 310 | * |
whismanoid | 0:68e64068330f | 311 | * // example code main function |
whismanoid | 0:68e64068330f | 312 | * int main() |
whismanoid | 0:68e64068330f | 313 | * { |
whismanoid | 35:f94470c95dde | 314 | * // setup: put your setup code here, to run once |
whismanoid | 35:f94470c95dde | 315 | * |
whismanoid | 18:83a84c5ee00f | 316 | * // example code: serial port banner message |
whismanoid | 18:83a84c5ee00f | 317 | * wait(3); // 3000ms timing delay function, platform-specific |
whismanoid | 18:83a84c5ee00f | 318 | * cmdLine.serial().printf("\r\nHello_MAX11410\r\n"); |
whismanoid | 18:83a84c5ee00f | 319 | * |
whismanoid | 0:68e64068330f | 320 | * // CODE GENERATOR: example code: member function Init |
whismanoid | 18:83a84c5ee00f | 321 | * // Initialize MAX11410 and verify device ID |
whismanoid | 18:83a84c5ee00f | 322 | * uint32_t g_SPI_SCLK_Hz = 24000000; // platform limit 24MHz intSPI_SCLK_Platform_Max_MHz * 1000000 |
whismanoid | 18:83a84c5ee00f | 323 | * if (g_MAX11410_device.Init() == 0) |
whismanoid | 18:83a84c5ee00f | 324 | * { // init failed; try "safe mode" SPI at slower SCLK rate |
whismanoid | 18:83a84c5ee00f | 325 | * cmdLine.serial().printf("\r\nMAX11410 Init failed; retry at SPI SCLK frequency 2000000 Hz\r\n"); |
whismanoid | 18:83a84c5ee00f | 326 | * |
whismanoid | 18:83a84c5ee00f | 327 | * g_SPI_SCLK_Hz = 2000000; |
whismanoid | 18:83a84c5ee00f | 328 | * g_MAX11410_device.spi_frequency(2000000); |
whismanoid | 18:83a84c5ee00f | 329 | * g_MAX11410_device.Init(); |
whismanoid | 18:83a84c5ee00f | 330 | * } |
whismanoid | 18:83a84c5ee00f | 331 | * // CODE GENERATOR: get spi properties from device |
whismanoid | 18:83a84c5ee00f | 332 | * if (g_SPI_SCLK_Hz > g_MAX11410_device.get_spi_frequency()) |
whismanoid | 18:83a84c5ee00f | 333 | * { // Device limits SPI SCLK frequency |
whismanoid | 18:83a84c5ee00f | 334 | * g_SPI_SCLK_Hz = g_MAX11410_device.get_spi_frequency(); |
whismanoid | 18:83a84c5ee00f | 335 | * cmdLine.serial().printf("\r\nMAX11410 limits SPI SCLK frequency to %ld Hz\r\n", g_SPI_SCLK_Hz); |
whismanoid | 18:83a84c5ee00f | 336 | * |
whismanoid | 18:83a84c5ee00f | 337 | * g_MAX11410_device.Init(); |
whismanoid | 18:83a84c5ee00f | 338 | * } |
whismanoid | 18:83a84c5ee00f | 339 | * if (g_MAX11410_device.get_spi_frequency() > g_SPI_SCLK_Hz) |
whismanoid | 18:83a84c5ee00f | 340 | * { // Platform limits SPI SCLK frequency |
whismanoid | 18:83a84c5ee00f | 341 | * g_MAX11410_device.spi_frequency(g_SPI_SCLK_Hz); |
whismanoid | 18:83a84c5ee00f | 342 | * cmdLine.serial().printf("\r\nPlatform limits MAX11410 SPI SCLK frequency to %ld Hz\r\n", g_SPI_SCLK_Hz); |
whismanoid | 18:83a84c5ee00f | 343 | * |
whismanoid | 18:83a84c5ee00f | 344 | * g_MAX11410_device.Init(); |
whismanoid | 18:83a84c5ee00f | 345 | * } |
whismanoid | 18:83a84c5ee00f | 346 | * // g_SPI_dataMode = g_MAX11410_device.get_spi_dataMode(); |
whismanoid | 18:83a84c5ee00f | 347 | * while (g_MAX11410_device.Init() == 0) |
whismanoid | 18:83a84c5ee00f | 348 | * { |
whismanoid | 18:83a84c5ee00f | 349 | * wait(3); // 3000ms timing delay function, platform-specific |
whismanoid | 18:83a84c5ee00f | 350 | * cmdLine.serial().printf("\r\nMAX11410 Init failed; retry...\r\n"); |
whismanoid | 18:83a84c5ee00f | 351 | * |
whismanoid | 18:83a84c5ee00f | 352 | * } |
whismanoid | 0:68e64068330f | 353 | * |
whismanoid | 0:68e64068330f | 354 | * while (1) |
whismanoid | 0:68e64068330f | 355 | * { |
whismanoid | 35:f94470c95dde | 356 | * // loop: put your main code here, to run repeatedly |
whismanoid | 35:f94470c95dde | 357 | * |
whismanoid | 0:68e64068330f | 358 | * // CODE GENERATOR: example code: has no member function REF |
whismanoid | 0:68e64068330f | 359 | * // CODE GENERATOR: example code for ADC: repeat-forever convert and print conversion result, one record per line |
whismanoid | 0:68e64068330f | 360 | * // CODE GENERATOR: ResolutionBits = 24 |
whismanoid | 35:f94470c95dde | 361 | * // CODE GENERATOR: FScode = 0xffffff |
whismanoid | 0:68e64068330f | 362 | * // CODE GENERATOR: NumChannels = 10 |
whismanoid | 35:f94470c95dde | 363 | * // CODE GENERATOR: banner before helloCppCodeList while(1) |
whismanoid | 35:f94470c95dde | 364 | * cmdLine.serial().printf("v_filter = 0x%2.2x\r\n", g_MAX11410_device.v_filter); |
whismanoid | 35:f94470c95dde | 365 | * |
whismanoid | 35:f94470c95dde | 366 | * cmdLine.serial().printf("v_pga = 0x%2.2x\r\n", g_MAX11410_device.v_pga); |
whismanoid | 35:f94470c95dde | 367 | * |
whismanoid | 35:f94470c95dde | 368 | * cmdLine.serial().printf("v_ctrl = 0x%2.2x\r\n", g_MAX11410_device.v_ctrl); |
whismanoid | 35:f94470c95dde | 369 | * |
whismanoid | 35:f94470c95dde | 370 | * // banner for csv data columns |
whismanoid | 35:f94470c95dde | 371 | * cmdLine.serial().printf("\"AIN0_LSB\",\"AIN1_LSB\",\"AIN2_LSB\",\"AIN3_LSB\",\"AIN4_LSB\",\"AIN5_LSB\",\"AIN6_LSB\",\"AIN7_LSB\",\"AIN8_LSB\",\"AIN9_LSB\""); |
whismanoid | 35:f94470c95dde | 372 | * |
whismanoid | 35:f94470c95dde | 373 | * cmdLine.serial().printf("\r\n"); |
whismanoid | 35:f94470c95dde | 374 | * |
whismanoid | 0:68e64068330f | 375 | * while(1) { // this code repeats forever |
whismanoid | 0:68e64068330f | 376 | * // this code repeats forever |
whismanoid | 0:68e64068330f | 377 | * // CODE GENERATOR: example code: has no member function ScanStandardExternalClock |
whismanoid | 0:68e64068330f | 378 | * // CODE GENERATOR: example code: has no member function ReadAINcode |
whismanoid | 1:d57c1a2cb83c | 379 | * // CODE GENERATOR: example code: member function Read_All_Voltages |
whismanoid | 0:68e64068330f | 380 | * // Measure ADC channels in sequence from AIN0 to channelNumber_0_9. |
whismanoid | 0:68e64068330f | 381 | * // @param[in] g_MAX11410_device.channelNumber_0_15: AIN Channel Number |
whismanoid | 0:68e64068330f | 382 | * // @param[in] g_MAX11410_device.PowerManagement_0_2: 0=Normal, 1=AutoShutdown, 2=AutoStandby |
whismanoid | 0:68e64068330f | 383 | * // @param[in] g_MAX11410_device.chan_id_0_1: ADC_MODE_CONTROL.CHAN_ID |
whismanoid | 0:68e64068330f | 384 | * int channelId_0_9 = 9; |
whismanoid | 0:68e64068330f | 385 | * //g_MAX11410_device.channelNumber_0_15 = channelId_0_9; |
whismanoid | 0:68e64068330f | 386 | * //g_MAX11410_device.PowerManagement_0_2 = 0; |
whismanoid | 0:68e64068330f | 387 | * //g_MAX11410_device.chan_id_0_1 = 1; |
whismanoid | 6:2d39fd70692c | 388 | * g_MAX11410_device.Read_All_Voltages(); |
whismanoid | 0:68e64068330f | 389 | * |
whismanoid | 0:68e64068330f | 390 | * // wait(3.0); |
whismanoid | 0:68e64068330f | 391 | * // CODE GENERATOR: print conversion result |
whismanoid | 0:68e64068330f | 392 | * // Use Arduino Serial Plotter to view output: Tools | Serial Plotter |
whismanoid | 0:68e64068330f | 393 | * cmdLine.serial().printf("%d", g_MAX11410_device.AINcode[0]); |
whismanoid | 0:68e64068330f | 394 | * for (int index = 1; index <= channelId_0_9; index++) { |
whismanoid | 0:68e64068330f | 395 | * cmdLine.serial().printf(",%d", g_MAX11410_device.AINcode[index]); |
whismanoid | 0:68e64068330f | 396 | * } |
whismanoid | 0:68e64068330f | 397 | * cmdLine.serial().printf("\r\n"); |
whismanoid | 0:68e64068330f | 398 | * |
whismanoid | 0:68e64068330f | 399 | * } // this code repeats forever |
whismanoid | 0:68e64068330f | 400 | * } |
whismanoid | 0:68e64068330f | 401 | * } |
whismanoid | 0:68e64068330f | 402 | * @endcode |
whismanoid | 0:68e64068330f | 403 | * //---------- CODE GENERATOR: end helloCppCodeList |
whismanoid | 0:68e64068330f | 404 | */ |
whismanoid | 0:68e64068330f | 405 | class MAX11410 { |
whismanoid | 0:68e64068330f | 406 | public: |
whismanoid | 0:68e64068330f | 407 | // CODE GENERATOR: TypedefEnum EnumItem declarations |
whismanoid | 11:abde565b8497 | 408 | // CODE GENERATOR: TypedefEnum MAX11410_CMDOP_enum_t |
whismanoid | 11:abde565b8497 | 409 | //---------------------------------------- |
whismanoid | 11:abde565b8497 | 410 | /// Command Operation Format (see function DecodeCommand) |
whismanoid | 11:abde565b8497 | 411 | /// |
whismanoid | 11:abde565b8497 | 412 | /// Naming convention is CMDOP_bitstream_OPERATION_NAME |
whismanoid | 11:abde565b8497 | 413 | /// - rxxx_xxxx = read/write bit (1=read, 0=write) |
whismanoid | 14:b49eecf7e4d8 | 414 | /// - xaaa_aaaa = 7-bit register address field -- see MAX11410_CMD_enum_t |
whismanoid | 11:abde565b8497 | 415 | /// - xxxx = don't care |
whismanoid | 11:abde565b8497 | 416 | typedef enum MAX11410_CMDOP_enum_t { |
whismanoid | 18:83a84c5ee00f | 417 | CMDOP_0aaa_aaaa_WriteRegister = 0x00, //!< 0b00000000 |
whismanoid | 18:83a84c5ee00f | 418 | CMDOP_1aaa_aaaa_ReadRegister = 0x80, //!< 0b10000000 |
whismanoid | 11:abde565b8497 | 419 | } MAX11410_CMDOP_enum_t; |
whismanoid | 11:abde565b8497 | 420 | |
whismanoid | 0:68e64068330f | 421 | // CODE GENERATOR: TypedefEnum MAX11410_CMD_enum_t |
whismanoid | 0:68e64068330f | 422 | //---------------------------------------- |
whismanoid | 0:68e64068330f | 423 | /// Register Addresses |
whismanoid | 0:68e64068330f | 424 | /// |
whismanoid | 0:68e64068330f | 425 | /// Naming convention is CMD_bitstream_FUNCTION_NAME |
whismanoid | 0:68e64068330f | 426 | /// - r = read/write bit (1=read, 0=write) |
whismanoid | 0:68e64068330f | 427 | /// - xaaa_aaaa = 7-bit register address field |
whismanoid | 0:68e64068330f | 428 | /// - dddd_dddd = 8-bit register data field |
whismanoid | 0:68e64068330f | 429 | /// - dddd_dddd_dddd_dddd = 16-bit register data field |
whismanoid | 0:68e64068330f | 430 | /// - dddd_dddd_dddd_dddd_dddd_dddd = 24-bit register data field |
whismanoid | 0:68e64068330f | 431 | /// - xxxx = don't care |
whismanoid | 0:68e64068330f | 432 | typedef enum MAX11410_CMD_enum_t { |
whismanoid | 18:83a84c5ee00f | 433 | CMD_r000_0000_xxxx_xxdd_PD = 0x00, //!< 0b0000000 |
whismanoid | 18:83a84c5ee00f | 434 | CMD_r000_0001_xddd_xxdd_CONV_START = 0x01, //!< 0b0000001 |
whismanoid | 18:83a84c5ee00f | 435 | CMD_r000_0010_xddd_dddd_SEQ_START = 0x02, //!< 0b0000010 |
whismanoid | 18:83a84c5ee00f | 436 | CMD_r000_0011_xxxx_xddd_CAL_START = 0x03, //!< 0b0000011 |
whismanoid | 18:83a84c5ee00f | 437 | CMD_r000_0100_dddd_xddd_GP0_CTRL = 0x04, //!< 0b0000100 |
whismanoid | 18:83a84c5ee00f | 438 | CMD_r000_0101_dddd_xddd_GP1_CTRL = 0x05, //!< 0b0000101 |
whismanoid | 18:83a84c5ee00f | 439 | CMD_r000_0110_xddd_xxdd_GP_CONV = 0x06, //!< 0b0000110 |
whismanoid | 18:83a84c5ee00f | 440 | CMD_r000_0111_xddd_dddd_GP_SEQ_ADDR = 0x07, //!< 0b0000111 |
whismanoid | 18:83a84c5ee00f | 441 | CMD_r000_1000_x0dd_dddd_FILTER = 0x08, //!< 0b0001000 |
whismanoid | 18:83a84c5ee00f | 442 | CMD_r000_1001_dddd_dddd_CTRL = 0x09, //!< 0b0001001 |
whismanoid | 18:83a84c5ee00f | 443 | CMD_r000_1010_dddd_dddd_SOURCE = 0x0a, //!< 0b0001010 |
whismanoid | 18:83a84c5ee00f | 444 | CMD_r000_1011_dddd_dddd_MUX_CTRL0 = 0x0b, //!< 0b0001011 |
whismanoid | 18:83a84c5ee00f | 445 | CMD_r000_1100_dddd_dddd_MUX_CTRL1 = 0x0c, //!< 0b0001100 |
whismanoid | 18:83a84c5ee00f | 446 | CMD_r000_1101_dddd_dddd_MUX_CTRL2 = 0x0d, //!< 0b0001101 |
whismanoid | 23:22e7830bcccb | 447 | CMD_r000_1110_00ss_0ggg_PGA = 0x0e, //!< 0b0001110 |
whismanoid | 18:83a84c5ee00f | 448 | CMD_r000_1111_dddd_dddd_WAIT_EXT = 0x0f, //!< 0b0001111 |
whismanoid | 18:83a84c5ee00f | 449 | CMD_r001_0000_xxxx_xxxx_WAIT_START = 0x10, //!< 0b0010000 |
whismanoid | 18:83a84c5ee00f | 450 | CMD_r001_0001_xxxx_xxxx_xxxx_xxxx_xxxx_xddd_PART_ID = 0x11, //!< 0b0010001 |
whismanoid | 18:83a84c5ee00f | 451 | CMD_r001_0010_xxxx_xxxx_dddd_xxdd_dddd_dddd_SYSC_SEL = 0x12, //!< 0b0010010 |
whismanoid | 18:83a84c5ee00f | 452 | CMD_r001_0011_dddd_dddd_dddd_dddd_dddd_dddd_SYS_OFF_A = 0x13, //!< 0b0010011 |
whismanoid | 18:83a84c5ee00f | 453 | CMD_r001_0100_dddd_dddd_dddd_dddd_dddd_dddd_SYS_OFF_B = 0x14, //!< 0b0010100 |
whismanoid | 18:83a84c5ee00f | 454 | CMD_r001_0101_dddd_dddd_dddd_dddd_dddd_dddd_SYS_GAIN_A = 0x15, //!< 0b0010101 |
whismanoid | 18:83a84c5ee00f | 455 | CMD_r001_0110_dddd_dddd_dddd_dddd_dddd_dddd_SYS_GAIN_B = 0x16, //!< 0b0010110 |
whismanoid | 18:83a84c5ee00f | 456 | CMD_r001_0111_dddd_dddd_dddd_dddd_dddd_dddd_SELF_OFF = 0x17, //!< 0b0010111 |
whismanoid | 18:83a84c5ee00f | 457 | CMD_r001_1000_dddd_dddd_dddd_dddd_dddd_dddd_SELF_GAIN_1 = 0x18, //!< 0b0011000 |
whismanoid | 18:83a84c5ee00f | 458 | CMD_r001_1001_dddd_dddd_dddd_dddd_dddd_dddd_SELF_GAIN_2 = 0x19, //!< 0b0011001 |
whismanoid | 18:83a84c5ee00f | 459 | CMD_r001_1010_dddd_dddd_dddd_dddd_dddd_dddd_SELF_GAIN_4 = 0x1a, //!< 0b0011010 |
whismanoid | 18:83a84c5ee00f | 460 | CMD_r001_1011_dddd_dddd_dddd_dddd_dddd_dddd_SELF_GAIN_8 = 0x1b, //!< 0b0011011 |
whismanoid | 18:83a84c5ee00f | 461 | CMD_r001_1100_dddd_dddd_dddd_dddd_dddd_dddd_SELF_GAIN_16 = 0x1c, //!< 0b0011100 |
whismanoid | 18:83a84c5ee00f | 462 | CMD_r001_1101_dddd_dddd_dddd_dddd_dddd_dddd_SELF_GAIN_32 = 0x1d, //!< 0b0011101 |
whismanoid | 18:83a84c5ee00f | 463 | CMD_r001_1110_dddd_dddd_dddd_dddd_dddd_dddd_SELF_GAIN_64 = 0x1e, //!< 0b0011110 |
whismanoid | 18:83a84c5ee00f | 464 | CMD_r001_1111_dddd_dddd_dddd_dddd_dddd_dddd_SELF_GAIN_128 = 0x1f, //!< 0b0011111 |
whismanoid | 18:83a84c5ee00f | 465 | CMD_r010_0000_dddd_dddd_dddd_dddd_dddd_dddd_LTHRESH0 = 0x20, //!< 0b0100000 |
whismanoid | 18:83a84c5ee00f | 466 | CMD_r010_0001_dddd_dddd_dddd_dddd_dddd_dddd_LTHRESH1 = 0x21, //!< 0b0100001 |
whismanoid | 18:83a84c5ee00f | 467 | CMD_r010_0010_dddd_dddd_dddd_dddd_dddd_dddd_LTHRESH2 = 0x22, //!< 0b0100010 |
whismanoid | 18:83a84c5ee00f | 468 | CMD_r010_0011_dddd_dddd_dddd_dddd_dddd_dddd_LTHRESH3 = 0x23, //!< 0b0100011 |
whismanoid | 18:83a84c5ee00f | 469 | CMD_r010_0100_dddd_dddd_dddd_dddd_dddd_dddd_LTHRESH4 = 0x24, //!< 0b0100100 |
whismanoid | 18:83a84c5ee00f | 470 | CMD_r010_0101_dddd_dddd_dddd_dddd_dddd_dddd_LTHRESH5 = 0x25, //!< 0b0100101 |
whismanoid | 18:83a84c5ee00f | 471 | CMD_r010_0110_dddd_dddd_dddd_dddd_dddd_dddd_LTHRESH6 = 0x26, //!< 0b0100110 |
whismanoid | 18:83a84c5ee00f | 472 | CMD_r010_0111_dddd_dddd_dddd_dddd_dddd_dddd_LTHRESH7 = 0x27, //!< 0b0100111 |
whismanoid | 18:83a84c5ee00f | 473 | CMD_r010_1000_dddd_dddd_dddd_dddd_dddd_dddd_UTHRESH0 = 0x28, //!< 0b0101000 |
whismanoid | 18:83a84c5ee00f | 474 | CMD_r010_1001_dddd_dddd_dddd_dddd_dddd_dddd_UTHRESH1 = 0x29, //!< 0b0101001 |
whismanoid | 18:83a84c5ee00f | 475 | CMD_r010_1010_dddd_dddd_dddd_dddd_dddd_dddd_UTHRESH2 = 0x2a, //!< 0b0101010 |
whismanoid | 18:83a84c5ee00f | 476 | CMD_r010_1011_dddd_dddd_dddd_dddd_dddd_dddd_UTHRESH3 = 0x2b, //!< 0b0101011 |
whismanoid | 18:83a84c5ee00f | 477 | CMD_r010_1100_dddd_dddd_dddd_dddd_dddd_dddd_UTHRESH4 = 0x2c, //!< 0b0101100 |
whismanoid | 18:83a84c5ee00f | 478 | CMD_r010_1101_dddd_dddd_dddd_dddd_dddd_dddd_UTHRESH5 = 0x2d, //!< 0b0101101 |
whismanoid | 18:83a84c5ee00f | 479 | CMD_r010_1110_dddd_dddd_dddd_dddd_dddd_dddd_UTHRESH6 = 0x2e, //!< 0b0101110 |
whismanoid | 18:83a84c5ee00f | 480 | CMD_r010_1111_dddd_dddd_dddd_dddd_dddd_dddd_UTHRESH7 = 0x2f, //!< 0b0101111 |
whismanoid | 18:83a84c5ee00f | 481 | CMD_r011_0000_dddd_dddd_dddd_dddd_dddd_dddd_DATA0 = 0x30, //!< 0b0110000 |
whismanoid | 18:83a84c5ee00f | 482 | CMD_r011_0001_dddd_dddd_dddd_dddd_dddd_dddd_DATA1 = 0x31, //!< 0b0110001 |
whismanoid | 18:83a84c5ee00f | 483 | CMD_r011_0010_dddd_dddd_dddd_dddd_dddd_dddd_DATA2 = 0x32, //!< 0b0110010 |
whismanoid | 18:83a84c5ee00f | 484 | CMD_r011_0011_dddd_dddd_dddd_dddd_dddd_dddd_DATA3 = 0x33, //!< 0b0110011 |
whismanoid | 18:83a84c5ee00f | 485 | CMD_r011_0100_dddd_dddd_dddd_dddd_dddd_dddd_DATA4 = 0x34, //!< 0b0110100 |
whismanoid | 18:83a84c5ee00f | 486 | CMD_r011_0101_dddd_dddd_dddd_dddd_dddd_dddd_DATA5 = 0x35, //!< 0b0110101 |
whismanoid | 18:83a84c5ee00f | 487 | CMD_r011_0110_dddd_dddd_dddd_dddd_dddd_dddd_DATA6 = 0x36, //!< 0b0110110 |
whismanoid | 18:83a84c5ee00f | 488 | CMD_r011_0111_dddd_dddd_dddd_dddd_dddd_dddd_DATA7 = 0x37, //!< 0b0110111 |
whismanoid | 18:83a84c5ee00f | 489 | CMD_r011_1000_dddd_dddd_dddd_dddd_dxxx_dddd_STATUS = 0x38, //!< 0b0111000 |
whismanoid | 18:83a84c5ee00f | 490 | CMD_r011_1001_dddd_dddd_dddd_dddd_dxxd_dddd_STATUS_IE = 0x39, //!< 0b0111001 |
whismanoid | 18:83a84c5ee00f | 491 | CMD_r011_1010_xaaa_aaaa_dddd_dddd_UC_0 = 0x3a, //!< 0b0111010 |
whismanoid | 18:83a84c5ee00f | 492 | CMD_r011_1011_xaaa_aaaa_dddd_dddd_UC_1 = 0x3b, //!< 0b0111011 |
whismanoid | 18:83a84c5ee00f | 493 | CMD_r011_1100_xaaa_aaaa_dddd_dddd_UC_2 = 0x3c, //!< 0b0111100 |
whismanoid | 18:83a84c5ee00f | 494 | CMD_r011_1101_xaaa_aaaa_dddd_dddd_UC_3 = 0x3d, //!< 0b0111101 |
whismanoid | 18:83a84c5ee00f | 495 | CMD_r011_1110_xaaa_aaaa_dddd_dddd_UC_4 = 0x3e, //!< 0b0111110 |
whismanoid | 18:83a84c5ee00f | 496 | CMD_r011_1111_xaaa_aaaa_dddd_dddd_UC_5 = 0x3f, //!< 0b0111111 |
whismanoid | 18:83a84c5ee00f | 497 | CMD_r100_0000_xaaa_aaaa_dddd_dddd_UC_6 = 0x40, //!< 0b1000000 |
whismanoid | 18:83a84c5ee00f | 498 | CMD_r100_0001_xaaa_aaaa_dddd_dddd_UC_7 = 0x41, //!< 0b1000001 |
whismanoid | 18:83a84c5ee00f | 499 | CMD_r100_0010_xaaa_aaaa_dddd_dddd_UC_8 = 0x42, //!< 0b1000010 |
whismanoid | 18:83a84c5ee00f | 500 | CMD_r100_0011_xaaa_aaaa_dddd_dddd_UC_9 = 0x43, //!< 0b1000011 |
whismanoid | 18:83a84c5ee00f | 501 | CMD_r100_0100_xaaa_aaaa_dddd_dddd_UC_10 = 0x44, //!< 0b1000100 |
whismanoid | 18:83a84c5ee00f | 502 | CMD_r100_0101_xaaa_aaaa_dddd_dddd_UC_11 = 0x45, //!< 0b1000101 |
whismanoid | 18:83a84c5ee00f | 503 | CMD_r100_0110_xaaa_aaaa_dddd_dddd_UC_12 = 0x46, //!< 0b1000110 |
whismanoid | 18:83a84c5ee00f | 504 | CMD_r100_0111_xaaa_aaaa_dddd_dddd_UC_13 = 0x47, //!< 0b1000111 |
whismanoid | 18:83a84c5ee00f | 505 | CMD_r100_1000_xaaa_aaaa_dddd_dddd_UC_14 = 0x48, //!< 0b1001000 |
whismanoid | 18:83a84c5ee00f | 506 | CMD_r100_1001_xaaa_aaaa_dddd_dddd_UC_15 = 0x49, //!< 0b1001001 |
whismanoid | 18:83a84c5ee00f | 507 | CMD_r100_1010_xaaa_aaaa_dddd_dddd_UC_16 = 0x4a, //!< 0b1001010 |
whismanoid | 18:83a84c5ee00f | 508 | CMD_r100_1011_xaaa_aaaa_dddd_dddd_UC_17 = 0x4b, //!< 0b1001011 |
whismanoid | 18:83a84c5ee00f | 509 | CMD_r100_1100_xaaa_aaaa_dddd_dddd_UC_18 = 0x4c, //!< 0b1001100 |
whismanoid | 18:83a84c5ee00f | 510 | CMD_r100_1101_xaaa_aaaa_dddd_dddd_UC_19 = 0x4d, //!< 0b1001101 |
whismanoid | 18:83a84c5ee00f | 511 | CMD_r100_1110_xaaa_aaaa_dddd_dddd_UC_20 = 0x4e, //!< 0b1001110 |
whismanoid | 18:83a84c5ee00f | 512 | CMD_r100_1111_xaaa_aaaa_dddd_dddd_UC_21 = 0x4f, //!< 0b1001111 |
whismanoid | 18:83a84c5ee00f | 513 | CMD_r101_0000_xaaa_aaaa_dddd_dddd_UC_22 = 0x50, //!< 0b1010000 |
whismanoid | 18:83a84c5ee00f | 514 | CMD_r101_0001_xaaa_aaaa_dddd_dddd_UC_23 = 0x51, //!< 0b1010001 |
whismanoid | 18:83a84c5ee00f | 515 | CMD_r101_0010_xaaa_aaaa_dddd_dddd_UC_24 = 0x52, //!< 0b1010010 |
whismanoid | 18:83a84c5ee00f | 516 | CMD_r101_0011_xaaa_aaaa_dddd_dddd_UC_25 = 0x53, //!< 0b1010011 |
whismanoid | 18:83a84c5ee00f | 517 | CMD_r101_0100_xaaa_aaaa_dddd_dddd_UC_26 = 0x54, //!< 0b1010100 |
whismanoid | 18:83a84c5ee00f | 518 | CMD_r101_0101_xaaa_aaaa_dddd_dddd_UC_27 = 0x55, //!< 0b1010101 |
whismanoid | 18:83a84c5ee00f | 519 | CMD_r101_0110_xaaa_aaaa_dddd_dddd_UC_28 = 0x56, //!< 0b1010110 |
whismanoid | 18:83a84c5ee00f | 520 | CMD_r101_0111_xaaa_aaaa_dddd_dddd_UC_29 = 0x57, //!< 0b1010111 |
whismanoid | 18:83a84c5ee00f | 521 | CMD_r101_1000_xaaa_aaaa_dddd_dddd_UC_30 = 0x58, //!< 0b1011000 |
whismanoid | 18:83a84c5ee00f | 522 | CMD_r101_1001_xaaa_aaaa_dddd_dddd_UC_31 = 0x59, //!< 0b1011001 |
whismanoid | 18:83a84c5ee00f | 523 | CMD_r101_1010_xaaa_aaaa_dddd_dddd_UC_32 = 0x5a, //!< 0b1011010 |
whismanoid | 18:83a84c5ee00f | 524 | CMD_r101_1011_xaaa_aaaa_dddd_dddd_UC_33 = 0x5b, //!< 0b1011011 |
whismanoid | 18:83a84c5ee00f | 525 | CMD_r101_1100_xaaa_aaaa_dddd_dddd_UC_34 = 0x5c, //!< 0b1011100 |
whismanoid | 18:83a84c5ee00f | 526 | CMD_r101_1101_xaaa_aaaa_dddd_dddd_UC_35 = 0x5d, //!< 0b1011101 |
whismanoid | 18:83a84c5ee00f | 527 | CMD_r101_1110_xaaa_aaaa_dddd_dddd_UC_36 = 0x5e, //!< 0b1011110 |
whismanoid | 18:83a84c5ee00f | 528 | CMD_r101_1111_xaaa_aaaa_dddd_dddd_UC_37 = 0x5f, //!< 0b1011111 |
whismanoid | 18:83a84c5ee00f | 529 | CMD_r110_0000_xaaa_aaaa_dddd_dddd_UC_38 = 0x60, //!< 0b1100000 |
whismanoid | 18:83a84c5ee00f | 530 | CMD_r110_0001_xaaa_aaaa_dddd_dddd_UC_39 = 0x61, //!< 0b1100001 |
whismanoid | 18:83a84c5ee00f | 531 | CMD_r110_0010_xaaa_aaaa_dddd_dddd_UC_40 = 0x62, //!< 0b1100010 |
whismanoid | 18:83a84c5ee00f | 532 | CMD_r110_0011_xaaa_aaaa_dddd_dddd_UC_41 = 0x63, //!< 0b1100011 |
whismanoid | 18:83a84c5ee00f | 533 | CMD_r110_0100_xaaa_aaaa_dddd_dddd_UC_42 = 0x64, //!< 0b1100100 |
whismanoid | 18:83a84c5ee00f | 534 | CMD_r110_0101_xaaa_aaaa_dddd_dddd_UC_43 = 0x65, //!< 0b1100101 |
whismanoid | 18:83a84c5ee00f | 535 | CMD_r110_0110_xaaa_aaaa_dddd_dddd_UC_44 = 0x66, //!< 0b1100110 |
whismanoid | 18:83a84c5ee00f | 536 | CMD_r110_0111_xaaa_aaaa_dddd_dddd_UC_45 = 0x67, //!< 0b1100111 |
whismanoid | 18:83a84c5ee00f | 537 | CMD_r110_1000_xaaa_aaaa_dddd_dddd_UC_46 = 0x68, //!< 0b1101000 |
whismanoid | 18:83a84c5ee00f | 538 | CMD_r110_1001_xaaa_aaaa_dddd_dddd_UC_47 = 0x69, //!< 0b1101001 |
whismanoid | 18:83a84c5ee00f | 539 | CMD_r110_1010_xaaa_aaaa_dddd_dddd_UC_48 = 0x6a, //!< 0b1101010 |
whismanoid | 18:83a84c5ee00f | 540 | CMD_r110_1011_xaaa_aaaa_dddd_dddd_UC_49 = 0x6b, //!< 0b1101011 |
whismanoid | 18:83a84c5ee00f | 541 | CMD_r110_1100_xaaa_aaaa_dddd_dddd_UC_50 = 0x6c, //!< 0b1101100 |
whismanoid | 18:83a84c5ee00f | 542 | CMD_r110_1101_xaaa_aaaa_dddd_dddd_UC_51 = 0x6d, //!< 0b1101101 |
whismanoid | 18:83a84c5ee00f | 543 | CMD_r110_1110_xaaa_aaaa_dddd_dddd_UC_52 = 0x6e, //!< 0b1101110 |
whismanoid | 18:83a84c5ee00f | 544 | CMD_r110_1111_xxxx_xxxx_xaaa_aaaa_UCADDR = 0x6f, //!< 0b1101111 |
whismanoid | 0:68e64068330f | 545 | } MAX11410_CMD_enum_t; |
whismanoid | 0:68e64068330f | 546 | |
whismanoid | 0:68e64068330f | 547 | // CODE GENERATOR: TypedefEnum MAX11410_SEQ_ADDR_enum_t |
whismanoid | 0:68e64068330f | 548 | //---------------------------------------- |
whismanoid | 0:68e64068330f | 549 | /// Microcode Sequencer Addresses. |
whismanoid | 0:68e64068330f | 550 | /// CMD_r000_0010_xddd_dddd_SEQ_START |
whismanoid | 0:68e64068330f | 551 | /// CMD_r000_0111_xddd_dddd_GP_SEQ_ADDR |
whismanoid | 0:68e64068330f | 552 | /// |
whismanoid | 0:68e64068330f | 553 | /// Naming convention is CMD_bitstream_FUNCTION_NAME |
whismanoid | 0:68e64068330f | 554 | /// - xaaa_aaaa = 7-bit register address field |
whismanoid | 0:68e64068330f | 555 | /// - dddd_dddd = 8-bit register data field |
whismanoid | 0:68e64068330f | 556 | /// - xxxx = don't care |
whismanoid | 0:68e64068330f | 557 | typedef enum MAX11410_SEQ_ADDR_enum_t { |
whismanoid | 18:83a84c5ee00f | 558 | SEQ_ADDR_r011_1010_xaaa_aaaa_dddd_dddd_UC_0 = 0x3a, //!< 0b0111010 |
whismanoid | 18:83a84c5ee00f | 559 | SEQ_ADDR_r011_1011_xaaa_aaaa_dddd_dddd_UC_1 = 0x3b, //!< 0b0111011 |
whismanoid | 18:83a84c5ee00f | 560 | SEQ_ADDR_r011_1100_xaaa_aaaa_dddd_dddd_UC_2 = 0x3c, //!< 0b0111100 |
whismanoid | 18:83a84c5ee00f | 561 | SEQ_ADDR_r011_1101_xaaa_aaaa_dddd_dddd_UC_3 = 0x3d, //!< 0b0111101 |
whismanoid | 18:83a84c5ee00f | 562 | SEQ_ADDR_r011_1110_xaaa_aaaa_dddd_dddd_UC_4 = 0x3e, //!< 0b0111110 |
whismanoid | 18:83a84c5ee00f | 563 | SEQ_ADDR_r011_1111_xaaa_aaaa_dddd_dddd_UC_5 = 0x3f, //!< 0b0111111 |
whismanoid | 18:83a84c5ee00f | 564 | SEQ_ADDR_r100_0000_xaaa_aaaa_dddd_dddd_UC_6 = 0x40, //!< 0b1000000 |
whismanoid | 18:83a84c5ee00f | 565 | SEQ_ADDR_r100_0001_xaaa_aaaa_dddd_dddd_UC_7 = 0x41, //!< 0b1000001 |
whismanoid | 18:83a84c5ee00f | 566 | SEQ_ADDR_r100_0010_xaaa_aaaa_dddd_dddd_UC_8 = 0x42, //!< 0b1000010 |
whismanoid | 18:83a84c5ee00f | 567 | SEQ_ADDR_r100_0011_xaaa_aaaa_dddd_dddd_UC_9 = 0x43, //!< 0b1000011 |
whismanoid | 18:83a84c5ee00f | 568 | SEQ_ADDR_r100_0100_xaaa_aaaa_dddd_dddd_UC_10 = 0x44, //!< 0b1000100 |
whismanoid | 18:83a84c5ee00f | 569 | SEQ_ADDR_r100_0101_xaaa_aaaa_dddd_dddd_UC_11 = 0x45, //!< 0b1000101 |
whismanoid | 18:83a84c5ee00f | 570 | SEQ_ADDR_r100_0110_xaaa_aaaa_dddd_dddd_UC_12 = 0x46, //!< 0b1000110 |
whismanoid | 18:83a84c5ee00f | 571 | SEQ_ADDR_r100_0111_xaaa_aaaa_dddd_dddd_UC_13 = 0x47, //!< 0b1000111 |
whismanoid | 18:83a84c5ee00f | 572 | SEQ_ADDR_r100_1000_xaaa_aaaa_dddd_dddd_UC_14 = 0x48, //!< 0b1001000 |
whismanoid | 18:83a84c5ee00f | 573 | SEQ_ADDR_r100_1001_xaaa_aaaa_dddd_dddd_UC_15 = 0x49, //!< 0b1001001 |
whismanoid | 18:83a84c5ee00f | 574 | SEQ_ADDR_r100_1010_xaaa_aaaa_dddd_dddd_UC_16 = 0x4a, //!< 0b1001010 |
whismanoid | 18:83a84c5ee00f | 575 | SEQ_ADDR_r100_1011_xaaa_aaaa_dddd_dddd_UC_17 = 0x4b, //!< 0b1001011 |
whismanoid | 18:83a84c5ee00f | 576 | SEQ_ADDR_r100_1100_xaaa_aaaa_dddd_dddd_UC_18 = 0x4c, //!< 0b1001100 |
whismanoid | 18:83a84c5ee00f | 577 | SEQ_ADDR_r100_1101_xaaa_aaaa_dddd_dddd_UC_19 = 0x4d, //!< 0b1001101 |
whismanoid | 18:83a84c5ee00f | 578 | SEQ_ADDR_r100_1110_xaaa_aaaa_dddd_dddd_UC_20 = 0x4e, //!< 0b1001110 |
whismanoid | 18:83a84c5ee00f | 579 | SEQ_ADDR_r100_1111_xaaa_aaaa_dddd_dddd_UC_21 = 0x4f, //!< 0b1001111 |
whismanoid | 18:83a84c5ee00f | 580 | SEQ_ADDR_r101_0000_xaaa_aaaa_dddd_dddd_UC_22 = 0x50, //!< 0b1010000 |
whismanoid | 18:83a84c5ee00f | 581 | SEQ_ADDR_r101_0001_xaaa_aaaa_dddd_dddd_UC_23 = 0x51, //!< 0b1010001 |
whismanoid | 18:83a84c5ee00f | 582 | SEQ_ADDR_r101_0010_xaaa_aaaa_dddd_dddd_UC_24 = 0x52, //!< 0b1010010 |
whismanoid | 18:83a84c5ee00f | 583 | SEQ_ADDR_r101_0011_xaaa_aaaa_dddd_dddd_UC_25 = 0x53, //!< 0b1010011 |
whismanoid | 18:83a84c5ee00f | 584 | SEQ_ADDR_r101_0100_xaaa_aaaa_dddd_dddd_UC_26 = 0x54, //!< 0b1010100 |
whismanoid | 18:83a84c5ee00f | 585 | SEQ_ADDR_r101_0101_xaaa_aaaa_dddd_dddd_UC_27 = 0x55, //!< 0b1010101 |
whismanoid | 18:83a84c5ee00f | 586 | SEQ_ADDR_r101_0110_xaaa_aaaa_dddd_dddd_UC_28 = 0x56, //!< 0b1010110 |
whismanoid | 18:83a84c5ee00f | 587 | SEQ_ADDR_r101_0111_xaaa_aaaa_dddd_dddd_UC_29 = 0x57, //!< 0b1010111 |
whismanoid | 18:83a84c5ee00f | 588 | SEQ_ADDR_r101_1000_xaaa_aaaa_dddd_dddd_UC_30 = 0x58, //!< 0b1011000 |
whismanoid | 18:83a84c5ee00f | 589 | SEQ_ADDR_r101_1001_xaaa_aaaa_dddd_dddd_UC_31 = 0x59, //!< 0b1011001 |
whismanoid | 18:83a84c5ee00f | 590 | SEQ_ADDR_r101_1010_xaaa_aaaa_dddd_dddd_UC_32 = 0x5a, //!< 0b1011010 |
whismanoid | 18:83a84c5ee00f | 591 | SEQ_ADDR_r101_1011_xaaa_aaaa_dddd_dddd_UC_33 = 0x5b, //!< 0b1011011 |
whismanoid | 18:83a84c5ee00f | 592 | SEQ_ADDR_r101_1100_xaaa_aaaa_dddd_dddd_UC_34 = 0x5c, //!< 0b1011100 |
whismanoid | 18:83a84c5ee00f | 593 | SEQ_ADDR_r101_1101_xaaa_aaaa_dddd_dddd_UC_35 = 0x5d, //!< 0b1011101 |
whismanoid | 18:83a84c5ee00f | 594 | SEQ_ADDR_r101_1110_xaaa_aaaa_dddd_dddd_UC_36 = 0x5e, //!< 0b1011110 |
whismanoid | 18:83a84c5ee00f | 595 | SEQ_ADDR_r101_1111_xaaa_aaaa_dddd_dddd_UC_37 = 0x5f, //!< 0b1011111 |
whismanoid | 18:83a84c5ee00f | 596 | SEQ_ADDR_r110_0000_xaaa_aaaa_dddd_dddd_UC_38 = 0x60, //!< 0b1100000 |
whismanoid | 18:83a84c5ee00f | 597 | SEQ_ADDR_r110_0001_xaaa_aaaa_dddd_dddd_UC_39 = 0x61, //!< 0b1100001 |
whismanoid | 18:83a84c5ee00f | 598 | SEQ_ADDR_r110_0010_xaaa_aaaa_dddd_dddd_UC_40 = 0x62, //!< 0b1100010 |
whismanoid | 18:83a84c5ee00f | 599 | SEQ_ADDR_r110_0011_xaaa_aaaa_dddd_dddd_UC_41 = 0x63, //!< 0b1100011 |
whismanoid | 18:83a84c5ee00f | 600 | SEQ_ADDR_r110_0100_xaaa_aaaa_dddd_dddd_UC_42 = 0x64, //!< 0b1100100 |
whismanoid | 18:83a84c5ee00f | 601 | SEQ_ADDR_r110_0101_xaaa_aaaa_dddd_dddd_UC_43 = 0x65, //!< 0b1100101 |
whismanoid | 18:83a84c5ee00f | 602 | SEQ_ADDR_r110_0110_xaaa_aaaa_dddd_dddd_UC_44 = 0x66, //!< 0b1100110 |
whismanoid | 18:83a84c5ee00f | 603 | SEQ_ADDR_r110_0111_xaaa_aaaa_dddd_dddd_UC_45 = 0x67, //!< 0b1100111 |
whismanoid | 18:83a84c5ee00f | 604 | SEQ_ADDR_r110_1000_xaaa_aaaa_dddd_dddd_UC_46 = 0x68, //!< 0b1101000 |
whismanoid | 18:83a84c5ee00f | 605 | SEQ_ADDR_r110_1001_xaaa_aaaa_dddd_dddd_UC_47 = 0x69, //!< 0b1101001 |
whismanoid | 18:83a84c5ee00f | 606 | SEQ_ADDR_r110_1010_xaaa_aaaa_dddd_dddd_UC_48 = 0x6a, //!< 0b1101010 |
whismanoid | 18:83a84c5ee00f | 607 | SEQ_ADDR_r110_1011_xaaa_aaaa_dddd_dddd_UC_49 = 0x6b, //!< 0b1101011 |
whismanoid | 18:83a84c5ee00f | 608 | SEQ_ADDR_r110_1100_xaaa_aaaa_dddd_dddd_UC_50 = 0x6c, //!< 0b1101100 |
whismanoid | 18:83a84c5ee00f | 609 | SEQ_ADDR_r110_1101_xaaa_aaaa_dddd_dddd_UC_51 = 0x6d, //!< 0b1101101 |
whismanoid | 18:83a84c5ee00f | 610 | SEQ_ADDR_r110_1110_xaaa_aaaa_dddd_dddd_UC_52 = 0x6e, //!< 0b1101110 |
whismanoid | 0:68e64068330f | 611 | } MAX11410_SEQ_ADDR_enum_t; |
whismanoid | 0:68e64068330f | 612 | |
whismanoid | 9:06ca88952f1c | 613 | // CODE GENERATOR: TypedefEnum MAX11410_STATUS_enum_t |
whismanoid | 9:06ca88952f1c | 614 | //---------------------------------------- |
whismanoid | 9:06ca88952f1c | 615 | /// Status indicator bits |
whismanoid | 9:06ca88952f1c | 616 | /// CMD_r011_1000_dddd_dddd_dddd_dddd_dxxx_dddd_STATUS fields |
whismanoid | 9:06ca88952f1c | 617 | /// |
whismanoid | 9:06ca88952f1c | 618 | typedef enum MAX11410_STATUS_enum_t { |
whismanoid | 18:83a84c5ee00f | 619 | STATUS_000001_CONV_RDY = 0x00000001, //!< 0b00000000000000000000000000000001 |
whismanoid | 18:83a84c5ee00f | 620 | STATUS_000002_SEQ_RDY = 0x00000002, //!< 0b00000000000000000000000000000010 |
whismanoid | 18:83a84c5ee00f | 621 | STATUS_000004_CAL_RDY = 0x00000004, //!< 0b00000000000000000000000000000100 |
whismanoid | 18:83a84c5ee00f | 622 | STATUS_000008_WAIT_DONE = 0x00000008, //!< 0b00000000000000000000000000001000 |
whismanoid | 18:83a84c5ee00f | 623 | STATUS_000010_DATA_RDY = 0x00000010, //!< 0b00000000000000000000000000010000 |
whismanoid | 18:83a84c5ee00f | 624 | STATUS_000020_reserved = 0x00000020, //!< 0b00000000000000000000000000100000 |
whismanoid | 18:83a84c5ee00f | 625 | STATUS_000040_reserved = 0x00000040, //!< 0b00000000000000000000000001000000 |
whismanoid | 18:83a84c5ee00f | 626 | STATUS_000080_SYSGOR = 0x00000080, //!< 0b00000000000000000000000010000000 |
whismanoid | 18:83a84c5ee00f | 627 | STATUS_000100_TUR_0 = 0x00000100, //!< 0b00000000000000000000000100000000 |
whismanoid | 18:83a84c5ee00f | 628 | STATUS_000200_TUR_1 = 0x00000200, //!< 0b00000000000000000000001000000000 |
whismanoid | 18:83a84c5ee00f | 629 | STATUS_000400_TUR_2 = 0x00000400, //!< 0b00000000000000000000010000000000 |
whismanoid | 18:83a84c5ee00f | 630 | STATUS_000800_TUR_3 = 0x00000800, //!< 0b00000000000000000000100000000000 |
whismanoid | 18:83a84c5ee00f | 631 | STATUS_001000_TUR_4 = 0x00001000, //!< 0b00000000000000000001000000000000 |
whismanoid | 18:83a84c5ee00f | 632 | STATUS_002000_TUR_5 = 0x00002000, //!< 0b00000000000000000010000000000000 |
whismanoid | 18:83a84c5ee00f | 633 | STATUS_004000_TUR_6 = 0x00004000, //!< 0b00000000000000000100000000000000 |
whismanoid | 18:83a84c5ee00f | 634 | STATUS_008000_TUR_7 = 0x00008000, //!< 0b00000000000000001000000000000000 |
whismanoid | 18:83a84c5ee00f | 635 | STATUS_010000_TOR_0 = 0x00010000, //!< 0b00000000000000010000000000000000 |
whismanoid | 18:83a84c5ee00f | 636 | STATUS_020000_TOR_1 = 0x00020000, //!< 0b00000000000000100000000000000000 |
whismanoid | 18:83a84c5ee00f | 637 | STATUS_040000_TOR_2 = 0x00040000, //!< 0b00000000000001000000000000000000 |
whismanoid | 18:83a84c5ee00f | 638 | STATUS_080000_TOR_3 = 0x00080000, //!< 0b00000000000010000000000000000000 |
whismanoid | 18:83a84c5ee00f | 639 | STATUS_100000_TOR_4 = 0x00100000, //!< 0b00000000000100000000000000000000 |
whismanoid | 18:83a84c5ee00f | 640 | STATUS_200000_TOR_5 = 0x00200000, //!< 0b00000000001000000000000000000000 |
whismanoid | 18:83a84c5ee00f | 641 | STATUS_400000_TOR_6 = 0x00400000, //!< 0b00000000010000000000000000000000 |
whismanoid | 18:83a84c5ee00f | 642 | STATUS_800000_TOR_7 = 0x00800000, //!< 0b00000000100000000000000000000000 |
whismanoid | 9:06ca88952f1c | 643 | } MAX11410_STATUS_enum_t; |
whismanoid | 9:06ca88952f1c | 644 | |
whismanoid | 0:68e64068330f | 645 | // CODE GENERATOR: TypedefEnum MAX11410_PD_enum_t |
whismanoid | 0:68e64068330f | 646 | //---------------------------------------- |
whismanoid | 0:68e64068330f | 647 | /// Power-down state command |
whismanoid | 0:68e64068330f | 648 | /// CMD_r000_0000_xxxx_xxdd_PD PD[1:0] field |
whismanoid | 0:68e64068330f | 649 | /// |
whismanoid | 0:68e64068330f | 650 | /// - 00: Normal mode |
whismanoid | 0:68e64068330f | 651 | /// - 01: Standby mode -- Powers down all analog circuity, but not the internal voltage regulator |
whismanoid | 0:68e64068330f | 652 | /// - 10: Sleep mode -- Powers down all analog circuitry including the internal voltage regulator |
whismanoid | 0:68e64068330f | 653 | /// - 11: Reset -- all registers reset to POR state (Self Clearing to 01 Standby mode) |
whismanoid | 0:68e64068330f | 654 | typedef enum MAX11410_PD_enum_t { |
whismanoid | 18:83a84c5ee00f | 655 | PD_00_Normal = 0x00, //!< 0b00 |
whismanoid | 18:83a84c5ee00f | 656 | PD_01_Standby = 0x01, //!< 0b01 |
whismanoid | 18:83a84c5ee00f | 657 | PD_10_Sleep = 0x02, //!< 0b10 |
whismanoid | 18:83a84c5ee00f | 658 | PD_11_Reset = 0x03, //!< 0b11 |
whismanoid | 0:68e64068330f | 659 | } MAX11410_PD_enum_t; |
whismanoid | 0:68e64068330f | 660 | |
whismanoid | 0:68e64068330f | 661 | // CODE GENERATOR: TypedefEnum MAX11410_DEST_enum_t |
whismanoid | 0:68e64068330f | 662 | //---------------------------------------- |
whismanoid | 0:68e64068330f | 663 | /// Conversion / seqeuncer start command |
whismanoid | 0:68e64068330f | 664 | /// CMD_r000_0001_xddd_xxdd_CONV_START DEST[2:0] field. |
whismanoid | 0:68e64068330f | 665 | /// CMD_r000_0110_xddd_xxdd_GP_CONV GP_DEST[2:0] field. |
whismanoid | 0:68e64068330f | 666 | /// |
whismanoid | 0:68e64068330f | 667 | /// - 000: Store result in DATA0 |
whismanoid | 0:68e64068330f | 668 | /// - 001: Store result in DATA1 |
whismanoid | 0:68e64068330f | 669 | /// - 010: Store result in DATA2 |
whismanoid | 0:68e64068330f | 670 | /// - 011: Store result in DATA3 |
whismanoid | 0:68e64068330f | 671 | /// - 100: Store result in DATA4 |
whismanoid | 0:68e64068330f | 672 | /// - 101: Store result in DATA5 |
whismanoid | 0:68e64068330f | 673 | /// - 110: Store result in DATA6 |
whismanoid | 0:68e64068330f | 674 | /// - 111: Store result in DATA7 |
whismanoid | 0:68e64068330f | 675 | typedef enum MAX11410_DEST_enum_t { |
whismanoid | 18:83a84c5ee00f | 676 | DEST_000_DATA0 = 0x00, //!< 0b000 |
whismanoid | 18:83a84c5ee00f | 677 | DEST_001_DATA1 = 0x01, //!< 0b001 |
whismanoid | 18:83a84c5ee00f | 678 | DEST_010_DATA2 = 0x02, //!< 0b010 |
whismanoid | 18:83a84c5ee00f | 679 | DEST_011_DATA3 = 0x03, //!< 0b011 |
whismanoid | 18:83a84c5ee00f | 680 | DEST_100_DATA4 = 0x04, //!< 0b100 |
whismanoid | 18:83a84c5ee00f | 681 | DEST_101_DATA5 = 0x05, //!< 0b101 |
whismanoid | 18:83a84c5ee00f | 682 | DEST_110_DATA6 = 0x06, //!< 0b110 |
whismanoid | 18:83a84c5ee00f | 683 | DEST_111_DATA7 = 0x07, //!< 0b111 |
whismanoid | 0:68e64068330f | 684 | } MAX11410_DEST_enum_t; |
whismanoid | 0:68e64068330f | 685 | |
whismanoid | 0:68e64068330f | 686 | // CODE GENERATOR: TypedefEnum MAX11410_CONV_TYPE_enum_t |
whismanoid | 0:68e64068330f | 687 | //---------------------------------------- |
whismanoid | 0:68e64068330f | 688 | /// Conversion / seqeuncer start command |
whismanoid | 0:68e64068330f | 689 | /// CMD_r000_0001_xddd_xxdd_CONV_START CONV_TYPE[1:0] field. |
whismanoid | 0:68e64068330f | 690 | /// CMD_r000_0110_xddd_xxdd_GP_CONV GP_CONV_TYPE[2:0] field. |
whismanoid | 0:68e64068330f | 691 | /// |
whismanoid | 0:68e64068330f | 692 | /// - 00: Single conversion |
whismanoid | 0:68e64068330f | 693 | /// - 01: Continuous conversions |
whismanoid | 0:68e64068330f | 694 | /// - 10, 11: 1:4 Duty cycled conversions (modulator low-power mode) |
whismanoid | 0:68e64068330f | 695 | typedef enum MAX11410_CONV_TYPE_enum_t { |
whismanoid | 18:83a84c5ee00f | 696 | CONV_TYPE_00_Single = 0x00, //!< 0b00 |
whismanoid | 18:83a84c5ee00f | 697 | CONV_TYPE_01_Continuous = 0x01, //!< 0b01 |
whismanoid | 18:83a84c5ee00f | 698 | CONV_TYPE_10_DutyCycle_1_4 = 0x02, //!< 0b10 |
whismanoid | 18:83a84c5ee00f | 699 | CONV_TYPE_11_DutyCycle_1_4 = 0x03, //!< 0b11 |
whismanoid | 0:68e64068330f | 700 | } MAX11410_CONV_TYPE_enum_t; |
whismanoid | 0:68e64068330f | 701 | |
whismanoid | 0:68e64068330f | 702 | // CODE GENERATOR: TypedefEnum MAX11410_CAL_TYPE_enum_t |
whismanoid | 0:68e64068330f | 703 | //---------------------------------------- |
whismanoid | 0:68e64068330f | 704 | /// Calbration command |
whismanoid | 0:68e64068330f | 705 | /// CMD_r000_0011_xxxx_xddd_CAL_START CAL_TYPE[2:0] field |
whismanoid | 0:68e64068330f | 706 | /// |
whismanoid | 0:68e64068330f | 707 | /// - 000: Performs a self-calibration. Resulting offset calibration value is stored in the SELF_OFF register, and the 1x gain calibration value is stored in the SELF_GAIN_1 register. |
whismanoid | 0:68e64068330f | 708 | /// - 001: Performs a PGA gain calibration at the currently programmed PGA gain. A 'No Op' will result if PGA Gain calibration is executed with the PGA disabled via the SIG_PATH register, or with the GAIN register set to 1x.The resulting gain calibration value is stored in the SELF_GAIN_[2-128] register corresponding to the currently programmed PGA GAIN setting. |
whismanoid | 0:68e64068330f | 709 | /// - 010: Reserved |
whismanoid | 0:68e64068330f | 710 | /// - 011: Reserved |
whismanoid | 0:68e64068330f | 711 | /// - 100: Performs a system offset calibration. The resulting calibration value is stored in the SYS_OFF_A register. |
whismanoid | 0:68e64068330f | 712 | /// - 101: Performs a system gain calibration. The resulting calibration value is stored in the SYS_GAIN_A register. |
whismanoid | 0:68e64068330f | 713 | /// - 110: Performs a system offset calibration. The resulting calibration value is stored in the SYS_OFF_B register. |
whismanoid | 0:68e64068330f | 714 | /// - 111: Performs a system gain calibration. The resulting calibration value is stored in the SYS_GAIN_B register. |
whismanoid | 0:68e64068330f | 715 | typedef enum MAX11410_CAL_TYPE_enum_t { |
whismanoid | 18:83a84c5ee00f | 716 | CAL_TYPE_000_SELF_CAL = 0x00, //!< 0b000 |
whismanoid | 18:83a84c5ee00f | 717 | CAL_TYPE_001_PGA_GAIN = 0x01, //!< 0b001 |
whismanoid | 18:83a84c5ee00f | 718 | CAL_TYPE_010_reserved = 0x02, //!< 0b010 |
whismanoid | 18:83a84c5ee00f | 719 | CAL_TYPE_011_reserved = 0x03, //!< 0b011 |
whismanoid | 18:83a84c5ee00f | 720 | CAL_TYPE_100_SYS_OFF_A = 0x04, //!< 0b100 |
whismanoid | 18:83a84c5ee00f | 721 | CAL_TYPE_101_SYS_GAIN_A = 0x05, //!< 0b101 |
whismanoid | 18:83a84c5ee00f | 722 | CAL_TYPE_110_SYS_OFF_B = 0x06, //!< 0b110 |
whismanoid | 18:83a84c5ee00f | 723 | CAL_TYPE_111_SYS_GAIN_B = 0x07, //!< 0b111 |
whismanoid | 0:68e64068330f | 724 | } MAX11410_CAL_TYPE_enum_t; |
whismanoid | 0:68e64068330f | 725 | |
whismanoid | 0:68e64068330f | 726 | // CODE GENERATOR: TypedefEnum MAX11410_GP0_DIR_enum_t |
whismanoid | 0:68e64068330f | 727 | //---------------------------------------- |
whismanoid | 0:68e64068330f | 728 | /// GPIO0 pin command |
whismanoid | 14:b49eecf7e4d8 | 729 | /// CMD_r000_0100_dddd_xddd_GP0_CTRL GP0_DIR[1:0] field (bits 7:6) |
whismanoid | 0:68e64068330f | 730 | /// |
whismanoid | 0:68e64068330f | 731 | /// - 00: Input mode, reference to VDDIO (default) |
whismanoid | 0:68e64068330f | 732 | /// - 01: Reserved |
whismanoid | 0:68e64068330f | 733 | /// - 10: Output mode, open-drain output |
whismanoid | 0:68e64068330f | 734 | /// - 11: Output mode, CMOS output |
whismanoid | 0:68e64068330f | 735 | typedef enum MAX11410_GP0_DIR_enum_t { |
whismanoid | 18:83a84c5ee00f | 736 | GP0_DIR_00_Input = 0x00, //!< 0b00 |
whismanoid | 18:83a84c5ee00f | 737 | GP0_DIR_01_reserved = 0x01, //!< 0b01 |
whismanoid | 18:83a84c5ee00f | 738 | GP0_DIR_10_OutputOpenDrain = 0x02, //!< 0b10 |
whismanoid | 18:83a84c5ee00f | 739 | GP0_DIR_11_Output = 0x03, //!< 0b11 |
whismanoid | 0:68e64068330f | 740 | } MAX11410_GP0_DIR_enum_t; |
whismanoid | 0:68e64068330f | 741 | |
whismanoid | 0:68e64068330f | 742 | // CODE GENERATOR: TypedefEnum MAX11410_GP0_ISEL_enum_t |
whismanoid | 0:68e64068330f | 743 | //---------------------------------------- |
whismanoid | 0:68e64068330f | 744 | /// GPIO0 pin command |
whismanoid | 14:b49eecf7e4d8 | 745 | /// CMD_r000_0100_dddd_xddd_GP0_CTRL GP0_ISEL[1:0] field (bits 5:4) |
whismanoid | 0:68e64068330f | 746 | /// |
whismanoid | 0:68e64068330f | 747 | /// - 00: GPIO_0 input disabled (default) |
whismanoid | 0:68e64068330f | 748 | /// - 01: GPIO_0 input configured as rising-edge-triggered conversion start |
whismanoid | 0:68e64068330f | 749 | /// - 10: GPIO_0 input configured as rising-edge-triggered sequence start from GP_SEQ_ADDR |
whismanoid | 0:68e64068330f | 750 | /// - 11: Reserved |
whismanoid | 0:68e64068330f | 751 | typedef enum MAX11410_GP0_ISEL_enum_t { |
whismanoid | 18:83a84c5ee00f | 752 | GP0_ISEL_00_disabled = 0x00, //!< 0b00 |
whismanoid | 18:83a84c5ee00f | 753 | GP0_ISEL_01_TRIGGER_CONV_START = 0x01, //!< 0b01 |
whismanoid | 18:83a84c5ee00f | 754 | GP0_ISEL_10_TRIGGER_SEQ_START = 0x02, //!< 0b10 |
whismanoid | 18:83a84c5ee00f | 755 | GP0_ISEL_11_reserved = 0x03, //!< 0b11 |
whismanoid | 0:68e64068330f | 756 | } MAX11410_GP0_ISEL_enum_t; |
whismanoid | 0:68e64068330f | 757 | |
whismanoid | 0:68e64068330f | 758 | // CODE GENERATOR: TypedefEnum MAX11410_GP0_OSEL_enum_t |
whismanoid | 0:68e64068330f | 759 | //---------------------------------------- |
whismanoid | 0:68e64068330f | 760 | /// GPIO0 pin command |
whismanoid | 14:b49eecf7e4d8 | 761 | /// CMD_r000_0100_dddd_xddd_GP0_CTRL GP0_OSEL[2:0] field (bits 2:0) |
whismanoid | 0:68e64068330f | 762 | /// |
whismanoid | 0:68e64068330f | 763 | /// - 000: GPIO_0 output disabled, high Z (default) |
whismanoid | 0:68e64068330f | 764 | /// - 001: GPIO_0 output is configured as INTRB (active low) |
whismanoid | 0:68e64068330f | 765 | /// - 010: GPIO_0 output is configured as INTR (active high) |
whismanoid | 0:68e64068330f | 766 | /// - 011: GPIO_0 output is configured as state Logic 0 |
whismanoid | 0:68e64068330f | 767 | /// - 100: GPIO_0 output is configured as state Logic 1 |
whismanoid | 0:68e64068330f | 768 | /// - 101: GPIO_0 output is configured as automatic low-side switch operation (CMOS output mode overridden) |
whismanoid | 0:68e64068330f | 769 | /// - 110: GPIO_0 output is configured as modulator active status |
whismanoid | 0:68e64068330f | 770 | /// - 111: GPIO_0 output is configured as system clock (2.456Mhz Nominal) |
whismanoid | 0:68e64068330f | 771 | typedef enum MAX11410_GP0_OSEL_enum_t { |
whismanoid | 18:83a84c5ee00f | 772 | GP0_OSEL_000_disabled = 0x00, //!< 0b000 |
whismanoid | 18:83a84c5ee00f | 773 | GP0_OSEL_001_INTRB = 0x01, //!< 0b001 |
whismanoid | 18:83a84c5ee00f | 774 | GP0_OSEL_010_INTR = 0x02, //!< 0b010 |
whismanoid | 18:83a84c5ee00f | 775 | GP0_OSEL_011_LOGIC_0 = 0x03, //!< 0b011 |
whismanoid | 18:83a84c5ee00f | 776 | GP0_OSEL_100_LOGIC_1 = 0x04, //!< 0b100 |
whismanoid | 18:83a84c5ee00f | 777 | GP0_OSEL_101_AUTO_LOWSIDE_SWITCH = 0x05, //!< 0b101 |
whismanoid | 18:83a84c5ee00f | 778 | GP0_OSEL_110_MODULATOR_ACTIVE_STATUS = 0x06, //!< 0b110 |
whismanoid | 18:83a84c5ee00f | 779 | GP0_OSEL_111_CLOCK_2M456 = 0x07, //!< 0b111 |
whismanoid | 0:68e64068330f | 780 | } MAX11410_GP0_OSEL_enum_t; |
whismanoid | 0:68e64068330f | 781 | |
whismanoid | 0:68e64068330f | 782 | // CODE GENERATOR: TypedefEnum MAX11410_GP1_DIR_enum_t |
whismanoid | 0:68e64068330f | 783 | //---------------------------------------- |
whismanoid | 0:68e64068330f | 784 | /// GPIO1 pin command |
whismanoid | 14:b49eecf7e4d8 | 785 | /// CMD_r000_0101_dddd_xddd_GP1_CTRL GP1_DIR[1:0] field (bits 7:6) |
whismanoid | 0:68e64068330f | 786 | /// |
whismanoid | 0:68e64068330f | 787 | /// - 00: Input mode, reference to VDDIO (default) |
whismanoid | 0:68e64068330f | 788 | /// - 01: Reserved |
whismanoid | 0:68e64068330f | 789 | /// - 10: Output mode, open-drain output |
whismanoid | 0:68e64068330f | 790 | /// - 11: Output mode, CMOS output |
whismanoid | 0:68e64068330f | 791 | typedef enum MAX11410_GP1_DIR_enum_t { |
whismanoid | 18:83a84c5ee00f | 792 | GP1_DIR_00_Input = 0x00, //!< 0b00 |
whismanoid | 18:83a84c5ee00f | 793 | GP1_DIR_01_reserved = 0x01, //!< 0b01 |
whismanoid | 18:83a84c5ee00f | 794 | GP1_DIR_10_OutputOpenDrain = 0x02, //!< 0b10 |
whismanoid | 18:83a84c5ee00f | 795 | GP1_DIR_11_Output = 0x03, //!< 0b11 |
whismanoid | 0:68e64068330f | 796 | } MAX11410_GP1_DIR_enum_t; |
whismanoid | 0:68e64068330f | 797 | |
whismanoid | 0:68e64068330f | 798 | // CODE GENERATOR: TypedefEnum MAX11410_GP1_ISEL_enum_t |
whismanoid | 0:68e64068330f | 799 | //---------------------------------------- |
whismanoid | 0:68e64068330f | 800 | /// GPIO1 pin command |
whismanoid | 14:b49eecf7e4d8 | 801 | /// CMD_r000_0101_dddd_xddd_GP1_CTRL GP1_ISEL[1:0] field (bits 5:4) |
whismanoid | 0:68e64068330f | 802 | /// |
whismanoid | 0:68e64068330f | 803 | /// - 00: GPIO_1 input disabled (default) |
whismanoid | 0:68e64068330f | 804 | /// - 01: GPIO_1 input configured as rising-edge-triggered conversion start |
whismanoid | 0:68e64068330f | 805 | /// - 10: GPIO_1 input configured as rising-edge-triggered sequence start from GP_SEQ_ADDR |
whismanoid | 0:68e64068330f | 806 | /// - 11: Reserved |
whismanoid | 0:68e64068330f | 807 | typedef enum MAX11410_GP1_ISEL_enum_t { |
whismanoid | 18:83a84c5ee00f | 808 | GP1_ISEL_00_disabled = 0x00, //!< 0b00 |
whismanoid | 18:83a84c5ee00f | 809 | GP1_ISEL_01_TRIGGER_CONV_START = 0x01, //!< 0b01 |
whismanoid | 18:83a84c5ee00f | 810 | GP1_ISEL_10_TRIGGER_SEQ_START = 0x02, //!< 0b10 |
whismanoid | 18:83a84c5ee00f | 811 | GP1_ISEL_11_reserved = 0x03, //!< 0b11 |
whismanoid | 0:68e64068330f | 812 | } MAX11410_GP1_ISEL_enum_t; |
whismanoid | 0:68e64068330f | 813 | |
whismanoid | 0:68e64068330f | 814 | // CODE GENERATOR: TypedefEnum MAX11410_GP1_OSEL_enum_t |
whismanoid | 0:68e64068330f | 815 | //---------------------------------------- |
whismanoid | 0:68e64068330f | 816 | /// GPIO1 pin command |
whismanoid | 14:b49eecf7e4d8 | 817 | /// CMD_r000_0101_dddd_xddd_GP1_CTRL GP1_OSEL[2:0] field (bits 2:0) |
whismanoid | 0:68e64068330f | 818 | /// |
whismanoid | 0:68e64068330f | 819 | /// - 000: GPIO_1 output disabled, high Z (default) |
whismanoid | 0:68e64068330f | 820 | /// - 001: GPIO_1 output is configured as INTRB (active low) |
whismanoid | 0:68e64068330f | 821 | /// - 010: GPIO_1 output is configured as INTR (active high) |
whismanoid | 0:68e64068330f | 822 | /// - 011: GPIO_1 output is configured as state Logic 0 |
whismanoid | 0:68e64068330f | 823 | /// - 100: GPIO_1 output is configured as state Logic 1 |
whismanoid | 0:68e64068330f | 824 | /// - 101: GPIO_1 output is configured as system clock (2.456Mhz Nominal) |
whismanoid | 0:68e64068330f | 825 | /// - 110: GPIO_1 output is configured as modulator active status |
whismanoid | 0:68e64068330f | 826 | /// - 111: GPIO_1 output is configured as automatic low-side switch operation (CMOS output mode overridden) |
whismanoid | 0:68e64068330f | 827 | typedef enum MAX11410_GP1_OSEL_enum_t { |
whismanoid | 18:83a84c5ee00f | 828 | GP1_OSEL_000_disabled = 0x00, //!< 0b000 |
whismanoid | 18:83a84c5ee00f | 829 | GP1_OSEL_001_INTRB = 0x01, //!< 0b001 |
whismanoid | 18:83a84c5ee00f | 830 | GP1_OSEL_010_INTR = 0x02, //!< 0b010 |
whismanoid | 18:83a84c5ee00f | 831 | GP1_OSEL_011_LOGIC_0 = 0x03, //!< 0b011 |
whismanoid | 18:83a84c5ee00f | 832 | GP1_OSEL_100_LOGIC_1 = 0x04, //!< 0b100 |
whismanoid | 18:83a84c5ee00f | 833 | GP1_OSEL_101_AUTO_LOWSIDE_SWITCH = 0x05, //!< 0b101 |
whismanoid | 18:83a84c5ee00f | 834 | GP1_OSEL_110_MODULATOR_ACTIVE_STATUS = 0x06, //!< 0b110 |
whismanoid | 18:83a84c5ee00f | 835 | GP1_OSEL_111_CLOCK_2M456 = 0x07, //!< 0b111 |
whismanoid | 0:68e64068330f | 836 | } MAX11410_GP1_OSEL_enum_t; |
whismanoid | 0:68e64068330f | 837 | |
whismanoid | 0:68e64068330f | 838 | // CODE GENERATOR: TypedefEnum MAX11410_LINEF_enum_t |
whismanoid | 0:68e64068330f | 839 | //---------------------------------------- |
whismanoid | 0:68e64068330f | 840 | /// Filter command |
whismanoid | 0:68e64068330f | 841 | /// CMD_r000_1000_x0dd_dddd_FILTER LINEF[1:0] field |
whismanoid | 0:68e64068330f | 842 | /// |
whismanoid | 0:68e64068330f | 843 | /// - 00: Simultaneous 50/60Hz FIR rejection (default) |
whismanoid | 0:68e64068330f | 844 | /// - 01: 50Hz FIR rejection |
whismanoid | 0:68e64068330f | 845 | /// - 10: 60Hz FIR rejection |
whismanoid | 0:68e64068330f | 846 | /// - 11: SINC4 |
whismanoid | 0:68e64068330f | 847 | typedef enum MAX11410_LINEF_enum_t { |
whismanoid | 18:83a84c5ee00f | 848 | LINEF_00_50Hz_60Hz_FIR = 0x00, //!< 0b00 |
whismanoid | 18:83a84c5ee00f | 849 | LINEF_01_50Hz_FIR = 0x01, //!< 0b01 |
whismanoid | 18:83a84c5ee00f | 850 | LINEF_10_60Hz_FIR = 0x02, //!< 0b10 |
whismanoid | 18:83a84c5ee00f | 851 | LINEF_11_SINC4 = 0x03, //!< 0b11 |
whismanoid | 0:68e64068330f | 852 | } MAX11410_LINEF_enum_t; |
whismanoid | 0:68e64068330f | 853 | |
whismanoid | 0:68e64068330f | 854 | // CODE GENERATOR: TypedefEnum MAX11410_RATE_enum_t |
whismanoid | 0:68e64068330f | 855 | //---------------------------------------- |
whismanoid | 0:68e64068330f | 856 | /// Filter command |
whismanoid | 0:68e64068330f | 857 | /// CMD_r000_1000_x0dd_dddd_FILTER RATE[3:0] field |
whismanoid | 0:68e64068330f | 858 | /// |
whismanoid | 0:68e64068330f | 859 | /// Sets conversion rate based on LINEF value. See Table 9a through Table 9d for details. |
whismanoid | 0:68e64068330f | 860 | /// |
whismanoid | 0:68e64068330f | 861 | /// Table 9a. LINEF = 00 Data Rate and Filter Rejection Settings |
whismanoid | 0:68e64068330f | 862 | /// |
whismanoid | 0:68e64068330f | 863 | /// Rate | LINEF | CONV_TYPE | Rate |
whismanoid | 0:68e64068330f | 864 | /// -----------|------------------------|----------------------------|---------- |
whismanoid | 0:68e64068330f | 865 | /// RATE_0000 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_00_Single | 1.0SPS |
whismanoid | 0:68e64068330f | 866 | /// RATE_0001 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_00_Single | 2.0SPS |
whismanoid | 0:68e64068330f | 867 | /// RATE_0010 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_00_Single | 4.0SPS |
whismanoid | 0:68e64068330f | 868 | /// RATE_0011 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_00_Single | 8.0SPS |
whismanoid | 0:68e64068330f | 869 | /// RATE_0100 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_00_Single | 16.0SPS |
whismanoid | 0:68e64068330f | 870 | /// RATE_0000 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_01_Continuous | 1.1SPS |
whismanoid | 0:68e64068330f | 871 | /// RATE_0001 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_01_Continuous | 2.1SPS |
whismanoid | 0:68e64068330f | 872 | /// RATE_0010 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_01_Continuous | 4.2SPS |
whismanoid | 0:68e64068330f | 873 | /// RATE_0011 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_01_Continuous | 8.4SPS |
whismanoid | 0:68e64068330f | 874 | /// RATE_0100 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_01_Continuous | 16.8SPS |
whismanoid | 0:68e64068330f | 875 | /// RATE_0000 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 0.3SPS |
whismanoid | 0:68e64068330f | 876 | /// RATE_0001 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 0.5SPS |
whismanoid | 0:68e64068330f | 877 | /// RATE_0010 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 1.1SPS |
whismanoid | 0:68e64068330f | 878 | /// RATE_0011 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 2.1SPS |
whismanoid | 0:68e64068330f | 879 | /// RATE_0100 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 4.2SPS |
whismanoid | 0:68e64068330f | 880 | /// |
whismanoid | 0:68e64068330f | 881 | /// Table 9b. LINEF = 01 Data Rate and Filter Rejection Settings |
whismanoid | 0:68e64068330f | 882 | /// |
whismanoid | 0:68e64068330f | 883 | /// Rate | LINEF | CONV_TYPE | Rate |
whismanoid | 0:68e64068330f | 884 | /// ----------|------------------------|----------------------------|---------- |
whismanoid | 0:68e64068330f | 885 | /// RATE_0000 | LINEF_01_50Hz_FIR | CONV_TYPE_00_Single | 1.3SPS |
whismanoid | 0:68e64068330f | 886 | /// RATE_0001 | LINEF_01_50Hz_FIR | CONV_TYPE_00_Single | 2.5SPS |
whismanoid | 0:68e64068330f | 887 | /// RATE_0010 | LINEF_01_50Hz_FIR | CONV_TYPE_00_Single | 5.0SPS |
whismanoid | 0:68e64068330f | 888 | /// RATE_0011 | LINEF_01_50Hz_FIR | CONV_TYPE_00_Single | 10.0SPS |
whismanoid | 0:68e64068330f | 889 | /// RATE_0100 | LINEF_01_50Hz_FIR | CONV_TYPE_00_Single | 20.0SPS |
whismanoid | 0:68e64068330f | 890 | /// RATE_0101 | LINEF_01_50Hz_FIR | CONV_TYPE_00_Single | 35.6SPS |
whismanoid | 0:68e64068330f | 891 | /// RATE_0000 | LINEF_01_50Hz_FIR | CONV_TYPE_01_Continuous | 1.3SPS |
whismanoid | 0:68e64068330f | 892 | /// RATE_0001 | LINEF_01_50Hz_FIR | CONV_TYPE_01_Continuous | 2.7SPS |
whismanoid | 0:68e64068330f | 893 | /// RATE_0010 | LINEF_01_50Hz_FIR | CONV_TYPE_01_Continuous | 5.3SPS |
whismanoid | 0:68e64068330f | 894 | /// RATE_0011 | LINEF_01_50Hz_FIR | CONV_TYPE_01_Continuous | 10.7SPS |
whismanoid | 0:68e64068330f | 895 | /// RATE_0100 | LINEF_01_50Hz_FIR | CONV_TYPE_01_Continuous | 21.3SPS |
whismanoid | 0:68e64068330f | 896 | /// RATE_0101 | LINEF_01_50Hz_FIR | CONV_TYPE_01_Continuous | 40.0SPS |
whismanoid | 0:68e64068330f | 897 | /// RATE_0000 | LINEF_01_50Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 0.3SPS |
whismanoid | 0:68e64068330f | 898 | /// RATE_0001 | LINEF_01_50Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 0.7SPS |
whismanoid | 0:68e64068330f | 899 | /// RATE_0010 | LINEF_01_50Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 1.3SPS |
whismanoid | 0:68e64068330f | 900 | /// RATE_0011 | LINEF_01_50Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 2.7SPS |
whismanoid | 0:68e64068330f | 901 | /// RATE_0100 | LINEF_01_50Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 5.3SPS |
whismanoid | 0:68e64068330f | 902 | /// RATE_0101 | LINEF_01_50Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 10.0SPS |
whismanoid | 0:68e64068330f | 903 | /// |
whismanoid | 0:68e64068330f | 904 | /// Table 9c. LINEF = 10 Data Rate and Filter Rejection Settings |
whismanoid | 0:68e64068330f | 905 | /// |
whismanoid | 0:68e64068330f | 906 | /// Rate | LINEF | CONV_TYPE | Rate |
whismanoid | 0:68e64068330f | 907 | /// ----------|------------------------|----------------------------|---------- |
whismanoid | 0:68e64068330f | 908 | /// RATE_0000 | LINEF_10_60Hz_FIR | CONV_TYPE_00_Single | 1.3SPS |
whismanoid | 0:68e64068330f | 909 | /// RATE_0001 | LINEF_10_60Hz_FIR | CONV_TYPE_00_Single | 2.5SPS |
whismanoid | 0:68e64068330f | 910 | /// RATE_0010 | LINEF_10_60Hz_FIR | CONV_TYPE_00_Single | 5.0SPS |
whismanoid | 0:68e64068330f | 911 | /// RATE_0011 | LINEF_10_60Hz_FIR | CONV_TYPE_00_Single | 10.0SPS |
whismanoid | 0:68e64068330f | 912 | /// RATE_0100 | LINEF_10_60Hz_FIR | CONV_TYPE_00_Single | 20.0SPS |
whismanoid | 0:68e64068330f | 913 | /// RATE_0101 | LINEF_10_60Hz_FIR | CONV_TYPE_00_Single | 35.6SPS |
whismanoid | 0:68e64068330f | 914 | /// RATE_0000 | LINEF_10_60Hz_FIR | CONV_TYPE_01_Continuous | 1.3SPS |
whismanoid | 0:68e64068330f | 915 | /// RATE_0001 | LINEF_10_60Hz_FIR | CONV_TYPE_01_Continuous | 2.7SPS |
whismanoid | 0:68e64068330f | 916 | /// RATE_0010 | LINEF_10_60Hz_FIR | CONV_TYPE_01_Continuous | 5.3SPS |
whismanoid | 0:68e64068330f | 917 | /// RATE_0011 | LINEF_10_60Hz_FIR | CONV_TYPE_01_Continuous | 10.7SPS |
whismanoid | 0:68e64068330f | 918 | /// RATE_0100 | LINEF_10_60Hz_FIR | CONV_TYPE_01_Continuous | 21.3SPS |
whismanoid | 0:68e64068330f | 919 | /// RATE_0101 | LINEF_10_60Hz_FIR | CONV_TYPE_01_Continuous | 40.0SPS |
whismanoid | 0:68e64068330f | 920 | /// RATE_0000 | LINEF_10_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 0.3SPS |
whismanoid | 0:68e64068330f | 921 | /// RATE_0001 | LINEF_10_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 0.7SPS |
whismanoid | 0:68e64068330f | 922 | /// RATE_0010 | LINEF_10_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 1.3SPS |
whismanoid | 0:68e64068330f | 923 | /// RATE_0011 | LINEF_10_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 2.7SPS |
whismanoid | 0:68e64068330f | 924 | /// RATE_0100 | LINEF_10_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 5.3SPS |
whismanoid | 0:68e64068330f | 925 | /// RATE_0101 | LINEF_10_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 10.0SPS |
whismanoid | 0:68e64068330f | 926 | /// |
whismanoid | 0:68e64068330f | 927 | /// Table 9d. LINEF = 11 Data Rate and Filter Rejection Settings |
whismanoid | 0:68e64068330f | 928 | /// |
whismanoid | 0:68e64068330f | 929 | /// Rate | LINEF | CONV_TYPE | Rate |
whismanoid | 0:68e64068330f | 930 | /// ----------|------------------------|----------------------------|---------- |
whismanoid | 0:68e64068330f | 931 | /// RATE_0000 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 1SPS |
whismanoid | 0:68e64068330f | 932 | /// RATE_0001 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 2.5SPS |
whismanoid | 0:68e64068330f | 933 | /// RATE_0010 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 5SPS |
whismanoid | 0:68e64068330f | 934 | /// RATE_0011 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 10SPS |
whismanoid | 0:68e64068330f | 935 | /// RATE_0100 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 15SPS |
whismanoid | 0:68e64068330f | 936 | /// RATE_0101 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 30SPS |
whismanoid | 0:68e64068330f | 937 | /// RATE_0110 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 60SPS |
whismanoid | 0:68e64068330f | 938 | /// RATE_0111 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 120SPS |
whismanoid | 0:68e64068330f | 939 | /// RATE_1000 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 240SPS |
whismanoid | 0:68e64068330f | 940 | /// RATE_1001 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 480SPS |
whismanoid | 0:68e64068330f | 941 | /// RATE_0000 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 4SPS |
whismanoid | 0:68e64068330f | 942 | /// RATE_0001 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 10SPS |
whismanoid | 0:68e64068330f | 943 | /// RATE_0010 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 20SPS |
whismanoid | 0:68e64068330f | 944 | /// RATE_0011 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 40SPS |
whismanoid | 0:68e64068330f | 945 | /// RATE_0100 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 60SPS |
whismanoid | 0:68e64068330f | 946 | /// RATE_0101 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 120SPS |
whismanoid | 0:68e64068330f | 947 | /// RATE_0110 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 240SPS |
whismanoid | 0:68e64068330f | 948 | /// RATE_0111 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 480SPS |
whismanoid | 0:68e64068330f | 949 | /// RATE_1000 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 960SPS |
whismanoid | 0:68e64068330f | 950 | /// RATE_1001 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 1920SPS |
whismanoid | 0:68e64068330f | 951 | /// RATE_0000 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 1SPS |
whismanoid | 0:68e64068330f | 952 | /// RATE_0001 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 2.5SPS |
whismanoid | 0:68e64068330f | 953 | /// RATE_0010 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 5SPS |
whismanoid | 0:68e64068330f | 954 | /// RATE_0011 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 10SPS |
whismanoid | 0:68e64068330f | 955 | /// RATE_0100 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 15SPS |
whismanoid | 0:68e64068330f | 956 | /// RATE_0101 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 30SPS |
whismanoid | 0:68e64068330f | 957 | /// RATE_0110 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 60SPS |
whismanoid | 0:68e64068330f | 958 | /// RATE_0111 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 120SPS |
whismanoid | 0:68e64068330f | 959 | /// RATE_1000 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 240SPS |
whismanoid | 0:68e64068330f | 960 | /// RATE_1001 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 480SPS |
whismanoid | 0:68e64068330f | 961 | /// |
whismanoid | 0:68e64068330f | 962 | typedef enum MAX11410_RATE_enum_t { |
whismanoid | 18:83a84c5ee00f | 963 | RATE_0000 = 0x00, //!< 0b0000 |
whismanoid | 18:83a84c5ee00f | 964 | RATE_0001 = 0x01, //!< 0b0001 |
whismanoid | 18:83a84c5ee00f | 965 | RATE_0010 = 0x02, //!< 0b0010 |
whismanoid | 18:83a84c5ee00f | 966 | RATE_0011 = 0x03, //!< 0b0011 |
whismanoid | 18:83a84c5ee00f | 967 | RATE_0100 = 0x04, //!< 0b0100 |
whismanoid | 18:83a84c5ee00f | 968 | RATE_0101 = 0x05, //!< 0b0101 |
whismanoid | 18:83a84c5ee00f | 969 | RATE_0110 = 0x06, //!< 0b0110 |
whismanoid | 18:83a84c5ee00f | 970 | RATE_0111 = 0x07, //!< 0b0111 |
whismanoid | 18:83a84c5ee00f | 971 | RATE_1000 = 0x08, //!< 0b1000 |
whismanoid | 18:83a84c5ee00f | 972 | RATE_1001 = 0x09, //!< 0b1001 |
whismanoid | 18:83a84c5ee00f | 973 | RATE_1010 = 0x0a, //!< 0b1010 |
whismanoid | 18:83a84c5ee00f | 974 | RATE_1011 = 0x0b, //!< 0b1011 |
whismanoid | 18:83a84c5ee00f | 975 | RATE_1100 = 0x0c, //!< 0b1100 |
whismanoid | 18:83a84c5ee00f | 976 | RATE_1101 = 0x0d, //!< 0b1101 |
whismanoid | 18:83a84c5ee00f | 977 | RATE_1110 = 0x0e, //!< 0b1110 |
whismanoid | 18:83a84c5ee00f | 978 | RATE_1111 = 0x0f, //!< 0b1111 |
whismanoid | 0:68e64068330f | 979 | } MAX11410_RATE_enum_t; |
whismanoid | 0:68e64068330f | 980 | |
whismanoid | 0:68e64068330f | 981 | // CODE GENERATOR: TypedefEnum MAX11410_REF_SEL_enum_t |
whismanoid | 0:68e64068330f | 982 | //---------------------------------------- |
whismanoid | 0:68e64068330f | 983 | /// Filter command |
whismanoid | 0:68e64068330f | 984 | /// CMD_r000_1001_dddd_dddd_CTRL REF_SEL[2:0] field |
whismanoid | 0:68e64068330f | 985 | /// |
whismanoid | 0:68e64068330f | 986 | /// - 000: AIN0(REF0P)/AIN1(REF0N) |
whismanoid | 0:68e64068330f | 987 | /// - 001: REF1P/REF1N (default) |
whismanoid | 0:68e64068330f | 988 | /// - 010: REF2P/REF2N |
whismanoid | 0:68e64068330f | 989 | /// - 011: AVDD/AGND |
whismanoid | 0:68e64068330f | 990 | /// - 100: AIN0(REF0P)/AGND (single-ended mode) |
whismanoid | 0:68e64068330f | 991 | /// - 101: REF1P/AGND (single-ended mode) |
whismanoid | 0:68e64068330f | 992 | /// - 110: REF2P/AGND (single-ended mode) |
whismanoid | 0:68e64068330f | 993 | /// - 111: AVDD/AGND |
whismanoid | 0:68e64068330f | 994 | typedef enum MAX11410_REF_SEL_enum_t { |
whismanoid | 18:83a84c5ee00f | 995 | REF_SEL_000_AIN0_AIN1 = 0x00, //!< 0b000 |
whismanoid | 18:83a84c5ee00f | 996 | REF_SEL_001_REF1P_REF1N = 0x01, //!< 0b001 |
whismanoid | 18:83a84c5ee00f | 997 | REF_SEL_010_REF2P_REF2N = 0x02, //!< 0b010 |
whismanoid | 18:83a84c5ee00f | 998 | REF_SEL_011_AVDD_AGND = 0x03, //!< 0b011 |
whismanoid | 18:83a84c5ee00f | 999 | REF_SEL_100_AIN0_AGND = 0x04, //!< 0b100 |
whismanoid | 18:83a84c5ee00f | 1000 | REF_SEL_101_REF1P_AGND = 0x05, //!< 0b101 |
whismanoid | 18:83a84c5ee00f | 1001 | REF_SEL_110_REF2P_AGND = 0x06, //!< 0b110 |
whismanoid | 18:83a84c5ee00f | 1002 | REF_SEL_111_AVDD_AGND = 0x07, //!< 0b111 |
whismanoid | 0:68e64068330f | 1003 | } MAX11410_REF_SEL_enum_t; |
whismanoid | 0:68e64068330f | 1004 | |
whismanoid | 0:68e64068330f | 1005 | // CODE GENERATOR: TypedefEnum MAX11410_VBIAS_MODE_enum_t |
whismanoid | 0:68e64068330f | 1006 | //---------------------------------------- |
whismanoid | 0:68e64068330f | 1007 | /// Source command |
whismanoid | 0:68e64068330f | 1008 | /// CMD_r000_1010_dddd_dddd_SOURCE VBIAS_MODE[1:0] field |
whismanoid | 0:68e64068330f | 1009 | /// |
whismanoid | 0:68e64068330f | 1010 | /// - 00: Active mode (default) |
whismanoid | 0:68e64068330f | 1011 | /// - 01: High impedance; 125kOhm output impedance |
whismanoid | 0:68e64068330f | 1012 | /// - 10: Low impedance; 20kOhm output impedance |
whismanoid | 0:68e64068330f | 1013 | /// - 11: Low impedance; 20kOhm output impedance |
whismanoid | 0:68e64068330f | 1014 | typedef enum MAX11410_VBIAS_MODE_enum_t { |
whismanoid | 18:83a84c5ee00f | 1015 | VBIAS_MODE_00_Active = 0x00, //!< 0b00 |
whismanoid | 18:83a84c5ee00f | 1016 | VBIAS_MODE_01_125kOhm = 0x01, //!< 0b01 |
whismanoid | 18:83a84c5ee00f | 1017 | VBIAS_MODE_10_20kOhm = 0x02, //!< 0b10 |
whismanoid | 18:83a84c5ee00f | 1018 | VBIAS_MODE_11_20kOhm = 0x03, //!< 0b11 |
whismanoid | 0:68e64068330f | 1019 | } MAX11410_VBIAS_MODE_enum_t; |
whismanoid | 0:68e64068330f | 1020 | |
whismanoid | 0:68e64068330f | 1021 | // CODE GENERATOR: TypedefEnum MAX11410_BRN_MODE_enum_t |
whismanoid | 0:68e64068330f | 1022 | //---------------------------------------- |
whismanoid | 0:68e64068330f | 1023 | /// Source command |
whismanoid | 0:68e64068330f | 1024 | /// CMD_r000_1010_dddd_dddd_SOURCE BRN_MODE[1:0] field |
whismanoid | 0:68e64068330f | 1025 | /// |
whismanoid | 0:68e64068330f | 1026 | /// - 00: Powered down, burnout sources disabled (default) |
whismanoid | 0:68e64068330f | 1027 | /// - 01: 0.5uA burnout current sources enabled |
whismanoid | 0:68e64068330f | 1028 | /// - 10: 1uA burnout current sources enabled |
whismanoid | 0:68e64068330f | 1029 | /// - 11: 10uA burnout current sources enabled |
whismanoid | 0:68e64068330f | 1030 | typedef enum MAX11410_BRN_MODE_enum_t { |
whismanoid | 18:83a84c5ee00f | 1031 | BRN_MODE_00_disabled = 0x00, //!< 0b00 |
whismanoid | 18:83a84c5ee00f | 1032 | BRN_MODE_01_0u5A = 0x01, //!< 0b01 |
whismanoid | 18:83a84c5ee00f | 1033 | BRN_MODE_10_1uA = 0x02, //!< 0b10 |
whismanoid | 18:83a84c5ee00f | 1034 | BRN_MODE_11_10uA = 0x03, //!< 0b11 |
whismanoid | 0:68e64068330f | 1035 | } MAX11410_BRN_MODE_enum_t; |
whismanoid | 0:68e64068330f | 1036 | |
whismanoid | 0:68e64068330f | 1037 | // CODE GENERATOR: TypedefEnum MAX11410_IDAC_MODE_enum_t |
whismanoid | 0:68e64068330f | 1038 | //---------------------------------------- |
whismanoid | 0:68e64068330f | 1039 | /// Source command |
whismanoid | 0:68e64068330f | 1040 | /// CMD_r000_1010_dddd_dddd_SOURCE IDAC_MODE[3:0] field |
whismanoid | 0:68e64068330f | 1041 | /// |
whismanoid | 0:68e64068330f | 1042 | /// - 0000: 10uA (default) |
whismanoid | 0:68e64068330f | 1043 | /// - 0001: 50uA |
whismanoid | 0:68e64068330f | 1044 | /// - 0010: 75uA |
whismanoid | 0:68e64068330f | 1045 | /// - 0011: 100uA |
whismanoid | 0:68e64068330f | 1046 | /// - 0100: 125uA |
whismanoid | 0:68e64068330f | 1047 | /// - 0101: 150uA |
whismanoid | 0:68e64068330f | 1048 | /// - 0110: 175uA |
whismanoid | 0:68e64068330f | 1049 | /// - 0111: 200uA |
whismanoid | 0:68e64068330f | 1050 | /// - 1000: 225uA |
whismanoid | 0:68e64068330f | 1051 | /// - 1001: 250uA |
whismanoid | 0:68e64068330f | 1052 | /// - 1010: 300uA |
whismanoid | 0:68e64068330f | 1053 | /// - 1011: 400uA |
whismanoid | 0:68e64068330f | 1054 | /// - 1100: 600uA |
whismanoid | 0:68e64068330f | 1055 | /// - 1101: 800uA |
whismanoid | 0:68e64068330f | 1056 | /// - 1110: 1200uA |
whismanoid | 0:68e64068330f | 1057 | /// - 1111: 1600uA |
whismanoid | 0:68e64068330f | 1058 | typedef enum MAX11410_IDAC_MODE_enum_t { |
whismanoid | 18:83a84c5ee00f | 1059 | IDAC_MODE_0000_10uA = 0x00, //!< 0b0000 |
whismanoid | 18:83a84c5ee00f | 1060 | IDAC_MODE_0001_50uA = 0x01, //!< 0b0001 |
whismanoid | 18:83a84c5ee00f | 1061 | IDAC_MODE_0010_75uA = 0x02, //!< 0b0010 |
whismanoid | 18:83a84c5ee00f | 1062 | IDAC_MODE_0011_100uA = 0x03, //!< 0b0011 |
whismanoid | 18:83a84c5ee00f | 1063 | IDAC_MODE_0100_125uA = 0x04, //!< 0b0100 |
whismanoid | 18:83a84c5ee00f | 1064 | IDAC_MODE_0101_150uA = 0x05, //!< 0b0101 |
whismanoid | 18:83a84c5ee00f | 1065 | IDAC_MODE_0110_175uA = 0x06, //!< 0b0110 |
whismanoid | 18:83a84c5ee00f | 1066 | IDAC_MODE_0111_200uA = 0x07, //!< 0b0111 |
whismanoid | 18:83a84c5ee00f | 1067 | IDAC_MODE_1000_225uA = 0x08, //!< 0b1000 |
whismanoid | 18:83a84c5ee00f | 1068 | IDAC_MODE_1001_250uA = 0x09, //!< 0b1001 |
whismanoid | 18:83a84c5ee00f | 1069 | IDAC_MODE_1010_300uA = 0x0a, //!< 0b1010 |
whismanoid | 18:83a84c5ee00f | 1070 | IDAC_MODE_1011_400uA = 0x0b, //!< 0b1011 |
whismanoid | 18:83a84c5ee00f | 1071 | IDAC_MODE_1100_600uA = 0x0c, //!< 0b1100 |
whismanoid | 18:83a84c5ee00f | 1072 | IDAC_MODE_1101_800uA = 0x0d, //!< 0b1101 |
whismanoid | 18:83a84c5ee00f | 1073 | IDAC_MODE_1110_1200uA = 0x0e, //!< 0b1110 |
whismanoid | 18:83a84c5ee00f | 1074 | IDAC_MODE_1111_1600uA = 0x0f, //!< 0b1111 |
whismanoid | 0:68e64068330f | 1075 | } MAX11410_IDAC_MODE_enum_t; |
whismanoid | 0:68e64068330f | 1076 | |
whismanoid | 0:68e64068330f | 1077 | // CODE GENERATOR: TypedefEnum MAX11410_AINP_SEL_enum_t |
whismanoid | 0:68e64068330f | 1078 | //---------------------------------------- |
whismanoid | 0:68e64068330f | 1079 | /// Input multiplexer channel selection |
whismanoid | 0:68e64068330f | 1080 | /// CMD_r000_1011_dddd_dddd_MUX_CTRL0 field AINP_SEL[3:0] |
whismanoid | 0:68e64068330f | 1081 | /// |
whismanoid | 0:68e64068330f | 1082 | /// - 0000: AINP = AIN0 |
whismanoid | 0:68e64068330f | 1083 | /// - 0001: AINP = AIN1 |
whismanoid | 0:68e64068330f | 1084 | /// - 0010: AINP = AIN2 |
whismanoid | 0:68e64068330f | 1085 | /// - 0011: AINP = AIN3 |
whismanoid | 0:68e64068330f | 1086 | /// - 0100: AINP = AIN4 |
whismanoid | 0:68e64068330f | 1087 | /// - 0101: AINP = AIN5 |
whismanoid | 0:68e64068330f | 1088 | /// - 0110: AINP = AIN6 |
whismanoid | 0:68e64068330f | 1089 | /// - 0111: AINP = AIN7 |
whismanoid | 0:68e64068330f | 1090 | /// - 1000: AINP = AIN8 |
whismanoid | 0:68e64068330f | 1091 | /// - 1001: AINP = AIN9 |
whismanoid | 0:68e64068330f | 1092 | /// - 1010: AINP = AVDD |
whismanoid | 0:68e64068330f | 1093 | /// - 1011: AINN = Unconnected |
whismanoid | 0:68e64068330f | 1094 | /// - 1100: AINN = Unconnected |
whismanoid | 0:68e64068330f | 1095 | /// - 1101: AINN = Unconnected |
whismanoid | 0:68e64068330f | 1096 | /// - 1110: AINN = Unconnected |
whismanoid | 0:68e64068330f | 1097 | /// - 1111: AINN = Unconnected (default) |
whismanoid | 0:68e64068330f | 1098 | typedef enum MAX11410_AINP_SEL_enum_t { |
whismanoid | 18:83a84c5ee00f | 1099 | AINP_SEL_0000_AIN0 = 0x00, //!< 0b0000 |
whismanoid | 18:83a84c5ee00f | 1100 | AINP_SEL_0001_AIN1 = 0x01, //!< 0b0001 |
whismanoid | 18:83a84c5ee00f | 1101 | AINP_SEL_0010_AIN2 = 0x02, //!< 0b0010 |
whismanoid | 18:83a84c5ee00f | 1102 | AINP_SEL_0011_AIN3 = 0x03, //!< 0b0011 |
whismanoid | 18:83a84c5ee00f | 1103 | AINP_SEL_0100_AIN4 = 0x04, //!< 0b0100 |
whismanoid | 18:83a84c5ee00f | 1104 | AINP_SEL_0101_AIN5 = 0x05, //!< 0b0101 |
whismanoid | 18:83a84c5ee00f | 1105 | AINP_SEL_0110_AIN6 = 0x06, //!< 0b0110 |
whismanoid | 18:83a84c5ee00f | 1106 | AINP_SEL_0111_AIN7 = 0x07, //!< 0b0111 |
whismanoid | 18:83a84c5ee00f | 1107 | AINP_SEL_1000_AIN8 = 0x08, //!< 0b1000 |
whismanoid | 18:83a84c5ee00f | 1108 | AINP_SEL_1001_AIN9 = 0x09, //!< 0b1001 |
whismanoid | 18:83a84c5ee00f | 1109 | AINP_SEL_1010_AVDD = 0x0a, //!< 0b1010 |
whismanoid | 18:83a84c5ee00f | 1110 | AINP_SEL_1011_unconnected = 0x0b, //!< 0b1011 |
whismanoid | 18:83a84c5ee00f | 1111 | AINP_SEL_1100_unconnected = 0x0c, //!< 0b1100 |
whismanoid | 18:83a84c5ee00f | 1112 | AINP_SEL_1101_unconnected = 0x0d, //!< 0b1101 |
whismanoid | 18:83a84c5ee00f | 1113 | AINP_SEL_1110_unconnected = 0x0e, //!< 0b1110 |
whismanoid | 18:83a84c5ee00f | 1114 | AINP_SEL_1111_unconnected = 0x0f, //!< 0b1111 |
whismanoid | 0:68e64068330f | 1115 | } MAX11410_AINP_SEL_enum_t; |
whismanoid | 0:68e64068330f | 1116 | |
whismanoid | 0:68e64068330f | 1117 | // CODE GENERATOR: TypedefEnum MAX11410_AINN_SEL_enum_t |
whismanoid | 0:68e64068330f | 1118 | //---------------------------------------- |
whismanoid | 0:68e64068330f | 1119 | /// Input multiplexer channel selection |
whismanoid | 1:d57c1a2cb83c | 1120 | /// CMD_r000_1011_dddd_dddd_MUX_CTRL0 field AINN_SEL[3:0] |
whismanoid | 0:68e64068330f | 1121 | /// |
whismanoid | 0:68e64068330f | 1122 | /// - 0000: AINN = AIN0 |
whismanoid | 0:68e64068330f | 1123 | /// - 0001: AINN = AIN1 |
whismanoid | 0:68e64068330f | 1124 | /// - 0010: AINN = AIN2 |
whismanoid | 0:68e64068330f | 1125 | /// - 0011: AINN = AIN3 |
whismanoid | 0:68e64068330f | 1126 | /// - 0100: AINN = AIN4 |
whismanoid | 0:68e64068330f | 1127 | /// - 0101: AINN = AIN5 |
whismanoid | 0:68e64068330f | 1128 | /// - 0110: AINN = AIN6 |
whismanoid | 0:68e64068330f | 1129 | /// - 0111: AINN = AIN7 |
whismanoid | 0:68e64068330f | 1130 | /// - 1000: AINN = AIN8 |
whismanoid | 0:68e64068330f | 1131 | /// - 1001: AINN = AIN9 |
whismanoid | 0:68e64068330f | 1132 | /// - 1010: AINN = GND |
whismanoid | 0:68e64068330f | 1133 | /// - 1011: AINN = Unconnected |
whismanoid | 0:68e64068330f | 1134 | /// - 1100: AINN = Unconnected |
whismanoid | 0:68e64068330f | 1135 | /// - 1101: AINN = Unconnected |
whismanoid | 0:68e64068330f | 1136 | /// - 1110: AINN = Unconnected |
whismanoid | 0:68e64068330f | 1137 | /// - 1111: AINN = Unconnected (default) |
whismanoid | 0:68e64068330f | 1138 | typedef enum MAX11410_AINN_SEL_enum_t { |
whismanoid | 18:83a84c5ee00f | 1139 | AINN_SEL_0000_AIN0 = 0x00, //!< 0b0000 |
whismanoid | 18:83a84c5ee00f | 1140 | AINN_SEL_0001_AIN1 = 0x01, //!< 0b0001 |
whismanoid | 18:83a84c5ee00f | 1141 | AINN_SEL_0010_AIN2 = 0x02, //!< 0b0010 |
whismanoid | 18:83a84c5ee00f | 1142 | AINN_SEL_0011_AIN3 = 0x03, //!< 0b0011 |
whismanoid | 18:83a84c5ee00f | 1143 | AINN_SEL_0100_AIN4 = 0x04, //!< 0b0100 |
whismanoid | 18:83a84c5ee00f | 1144 | AINN_SEL_0101_AIN5 = 0x05, //!< 0b0101 |
whismanoid | 18:83a84c5ee00f | 1145 | AINN_SEL_0110_AIN6 = 0x06, //!< 0b0110 |
whismanoid | 18:83a84c5ee00f | 1146 | AINN_SEL_0111_AIN7 = 0x07, //!< 0b0111 |
whismanoid | 18:83a84c5ee00f | 1147 | AINN_SEL_1000_AIN8 = 0x08, //!< 0b1000 |
whismanoid | 18:83a84c5ee00f | 1148 | AINN_SEL_1001_AIN9 = 0x09, //!< 0b1001 |
whismanoid | 18:83a84c5ee00f | 1149 | AINN_SEL_1010_GND = 0x0a, //!< 0b1010 |
whismanoid | 18:83a84c5ee00f | 1150 | AINN_SEL_1011_unconnected = 0x0b, //!< 0b1011 |
whismanoid | 18:83a84c5ee00f | 1151 | AINN_SEL_1100_unconnected = 0x0c, //!< 0b1100 |
whismanoid | 18:83a84c5ee00f | 1152 | AINN_SEL_1101_unconnected = 0x0d, //!< 0b1101 |
whismanoid | 18:83a84c5ee00f | 1153 | AINN_SEL_1110_unconnected = 0x0e, //!< 0b1110 |
whismanoid | 18:83a84c5ee00f | 1154 | AINN_SEL_1111_unconnected = 0x0f, //!< 0b1111 |
whismanoid | 0:68e64068330f | 1155 | } MAX11410_AINN_SEL_enum_t; |
whismanoid | 0:68e64068330f | 1156 | |
whismanoid | 0:68e64068330f | 1157 | // CODE GENERATOR: TypedefEnum MAX11410_IDAC1_SEL_enum_t |
whismanoid | 0:68e64068330f | 1158 | //---------------------------------------- |
whismanoid | 0:68e64068330f | 1159 | /// Input multiplexer channel selection |
whismanoid | 0:68e64068330f | 1160 | /// CMD_r000_1100_dddd_dddd_MUX_CTRL1 field IDAC1_SEL[3:0] |
whismanoid | 0:68e64068330f | 1161 | /// |
whismanoid | 0:68e64068330f | 1162 | /// - 0000: AIN0 |
whismanoid | 0:68e64068330f | 1163 | /// - 0001: AIN1 |
whismanoid | 0:68e64068330f | 1164 | /// - 0010: AIN2 |
whismanoid | 0:68e64068330f | 1165 | /// - 0011: AIN3 |
whismanoid | 0:68e64068330f | 1166 | /// - 0100: AIN4 |
whismanoid | 0:68e64068330f | 1167 | /// - 0101: AIN5 |
whismanoid | 0:68e64068330f | 1168 | /// - 0110: AIN6 |
whismanoid | 0:68e64068330f | 1169 | /// - 0111: AIN7 |
whismanoid | 0:68e64068330f | 1170 | /// - 1000: AIN8 |
whismanoid | 0:68e64068330f | 1171 | /// - 1001: AIN9 |
whismanoid | 0:68e64068330f | 1172 | /// - 1010: Unconnected; IDAC1 powered down. |
whismanoid | 0:68e64068330f | 1173 | /// - 1011: Unconnected; IDAC1 powered down. |
whismanoid | 0:68e64068330f | 1174 | /// - 1100: Unconnected; IDAC1 powered down. |
whismanoid | 0:68e64068330f | 1175 | /// - 1101: Unconnected; IDAC1 powered down. |
whismanoid | 0:68e64068330f | 1176 | /// - 1110: Unconnected; IDAC1 powered down. |
whismanoid | 0:68e64068330f | 1177 | /// - 1111: Unconnected; IDAC1 powered down.(Default) |
whismanoid | 0:68e64068330f | 1178 | typedef enum MAX11410_IDAC1_SEL_enum_t { |
whismanoid | 18:83a84c5ee00f | 1179 | IDAC1_SEL_0000_AIN0 = 0x00, //!< 0b0000 |
whismanoid | 18:83a84c5ee00f | 1180 | IDAC1_SEL_0001_AIN1 = 0x01, //!< 0b0001 |
whismanoid | 18:83a84c5ee00f | 1181 | IDAC1_SEL_0010_AIN2 = 0x02, //!< 0b0010 |
whismanoid | 18:83a84c5ee00f | 1182 | IDAC1_SEL_0011_AIN3 = 0x03, //!< 0b0011 |
whismanoid | 18:83a84c5ee00f | 1183 | IDAC1_SEL_0100_AIN4 = 0x04, //!< 0b0100 |
whismanoid | 18:83a84c5ee00f | 1184 | IDAC1_SEL_0101_AIN5 = 0x05, //!< 0b0101 |
whismanoid | 18:83a84c5ee00f | 1185 | IDAC1_SEL_0110_AIN6 = 0x06, //!< 0b0110 |
whismanoid | 18:83a84c5ee00f | 1186 | IDAC1_SEL_0111_AIN7 = 0x07, //!< 0b0111 |
whismanoid | 18:83a84c5ee00f | 1187 | IDAC1_SEL_1000_AIN8 = 0x08, //!< 0b1000 |
whismanoid | 18:83a84c5ee00f | 1188 | IDAC1_SEL_1001_AIN9 = 0x09, //!< 0b1001 |
whismanoid | 18:83a84c5ee00f | 1189 | IDAC1_SEL_1010_unconnected = 0x0a, //!< 0b1010 |
whismanoid | 18:83a84c5ee00f | 1190 | IDAC1_SEL_1011_unconnected = 0x0b, //!< 0b1011 |
whismanoid | 18:83a84c5ee00f | 1191 | IDAC1_SEL_1100_unconnected = 0x0c, //!< 0b1100 |
whismanoid | 18:83a84c5ee00f | 1192 | IDAC1_SEL_1101_unconnected = 0x0d, //!< 0b1101 |
whismanoid | 18:83a84c5ee00f | 1193 | IDAC1_SEL_1110_unconnected = 0x0e, //!< 0b1110 |
whismanoid | 18:83a84c5ee00f | 1194 | IDAC1_SEL_1111_unconnected = 0x0f, //!< 0b1111 |
whismanoid | 0:68e64068330f | 1195 | } MAX11410_IDAC1_SEL_enum_t; |
whismanoid | 0:68e64068330f | 1196 | |
whismanoid | 0:68e64068330f | 1197 | // CODE GENERATOR: TypedefEnum MAX11410_IDAC0_SEL_enum_t |
whismanoid | 0:68e64068330f | 1198 | //---------------------------------------- |
whismanoid | 0:68e64068330f | 1199 | /// Input multiplexer channel selection |
whismanoid | 0:68e64068330f | 1200 | /// CMD_r000_1100_dddd_dddd_MUX_CTRL1 field IDAC0_SEL[3:0] |
whismanoid | 0:68e64068330f | 1201 | /// |
whismanoid | 0:68e64068330f | 1202 | /// - 0000: AIN0 |
whismanoid | 0:68e64068330f | 1203 | /// - 0001: AIN1 |
whismanoid | 0:68e64068330f | 1204 | /// - 0010: AIN2 |
whismanoid | 0:68e64068330f | 1205 | /// - 0011: AIN3 |
whismanoid | 0:68e64068330f | 1206 | /// - 0100: AIN4 |
whismanoid | 0:68e64068330f | 1207 | /// - 0101: AIN5 |
whismanoid | 0:68e64068330f | 1208 | /// - 0110: AIN6 |
whismanoid | 0:68e64068330f | 1209 | /// - 0111: AIN7 |
whismanoid | 0:68e64068330f | 1210 | /// - 1000: AIN8 |
whismanoid | 0:68e64068330f | 1211 | /// - 1001: AIN9 |
whismanoid | 0:68e64068330f | 1212 | /// - 1010: Unconnected; IDAC0 powered down. |
whismanoid | 0:68e64068330f | 1213 | /// - 1011: Unconnected; IDAC0 powered down. |
whismanoid | 0:68e64068330f | 1214 | /// - 1100: Unconnected; IDAC0 powered down. |
whismanoid | 0:68e64068330f | 1215 | /// - 1101: Unconnected; IDAC0 powered down. |
whismanoid | 0:68e64068330f | 1216 | /// - 1110: Unconnected; IDAC0 powered down. |
whismanoid | 0:68e64068330f | 1217 | /// - 1111: Unconnected; IDAC0 powered down.(Default) |
whismanoid | 0:68e64068330f | 1218 | typedef enum MAX11410_IDAC0_SEL_enum_t { |
whismanoid | 18:83a84c5ee00f | 1219 | IDAC0_SEL_0000_AIN0 = 0x00, //!< 0b0000 |
whismanoid | 18:83a84c5ee00f | 1220 | IDAC0_SEL_0001_AIN1 = 0x01, //!< 0b0001 |
whismanoid | 18:83a84c5ee00f | 1221 | IDAC0_SEL_0010_AIN2 = 0x02, //!< 0b0010 |
whismanoid | 18:83a84c5ee00f | 1222 | IDAC0_SEL_0011_AIN3 = 0x03, //!< 0b0011 |
whismanoid | 18:83a84c5ee00f | 1223 | IDAC0_SEL_0100_AIN4 = 0x04, //!< 0b0100 |
whismanoid | 18:83a84c5ee00f | 1224 | IDAC0_SEL_0101_AIN5 = 0x05, //!< 0b0101 |
whismanoid | 18:83a84c5ee00f | 1225 | IDAC0_SEL_0110_AIN6 = 0x06, //!< 0b0110 |
whismanoid | 18:83a84c5ee00f | 1226 | IDAC0_SEL_0111_AIN7 = 0x07, //!< 0b0111 |
whismanoid | 18:83a84c5ee00f | 1227 | IDAC0_SEL_1000_AIN8 = 0x08, //!< 0b1000 |
whismanoid | 18:83a84c5ee00f | 1228 | IDAC0_SEL_1001_AIN9 = 0x09, //!< 0b1001 |
whismanoid | 18:83a84c5ee00f | 1229 | IDAC0_SEL_1010_unconnected = 0x0a, //!< 0b1010 |
whismanoid | 18:83a84c5ee00f | 1230 | IDAC0_SEL_1011_unconnected = 0x0b, //!< 0b1011 |
whismanoid | 18:83a84c5ee00f | 1231 | IDAC0_SEL_1100_unconnected = 0x0c, //!< 0b1100 |
whismanoid | 18:83a84c5ee00f | 1232 | IDAC0_SEL_1101_unconnected = 0x0d, //!< 0b1101 |
whismanoid | 18:83a84c5ee00f | 1233 | IDAC0_SEL_1110_unconnected = 0x0e, //!< 0b1110 |
whismanoid | 18:83a84c5ee00f | 1234 | IDAC0_SEL_1111_unconnected = 0x0f, //!< 0b1111 |
whismanoid | 0:68e64068330f | 1235 | } MAX11410_IDAC0_SEL_enum_t; |
whismanoid | 0:68e64068330f | 1236 | |
whismanoid | 0:68e64068330f | 1237 | // CODE GENERATOR: TypedefEnum MAX11410_SIG_PATH_enum_t |
whismanoid | 0:68e64068330f | 1238 | //---------------------------------------- |
whismanoid | 0:68e64068330f | 1239 | /// Input multiplexer channel selection |
whismanoid | 23:22e7830bcccb | 1240 | /// CMD_r000_1110_00ss_0ggg_PGA field SIG_PATH[1:0] |
whismanoid | 0:68e64068330f | 1241 | /// |
whismanoid | 0:68e64068330f | 1242 | /// - 00: Buffered, low-power, unity-gain path (PGA disabled, digital gain) [default] |
whismanoid | 0:68e64068330f | 1243 | /// - 01: Bypass path (signal buffer disabled,PGA disabled, digital gain) |
whismanoid | 0:68e64068330f | 1244 | /// - 10: PGA path (signal buffer disabled, analog gain) |
whismanoid | 0:68e64068330f | 1245 | /// - 11: Reserved |
whismanoid | 0:68e64068330f | 1246 | typedef enum MAX11410_SIG_PATH_enum_t { |
whismanoid | 18:83a84c5ee00f | 1247 | SIG_PATH_00_BUFFERED = 0x00, //!< 0b00 |
whismanoid | 18:83a84c5ee00f | 1248 | SIG_PATH_01_BYPASS = 0x01, //!< 0b01 |
whismanoid | 18:83a84c5ee00f | 1249 | SIG_PATH_10_PGA = 0x02, //!< 0b10 |
whismanoid | 18:83a84c5ee00f | 1250 | SIG_PATH_11_reserved = 0x03, //!< 0b11 |
whismanoid | 0:68e64068330f | 1251 | } MAX11410_SIG_PATH_enum_t; |
whismanoid | 0:68e64068330f | 1252 | |
whismanoid | 0:68e64068330f | 1253 | // CODE GENERATOR: TypedefEnum MAX11410_GAIN_enum_t |
whismanoid | 0:68e64068330f | 1254 | //---------------------------------------- |
whismanoid | 0:68e64068330f | 1255 | /// Input multiplexer channel selection |
whismanoid | 23:22e7830bcccb | 1256 | /// CMD_r000_1110_00ss_0ggg_PGA field GAIN[2:0] |
whismanoid | 0:68e64068330f | 1257 | /// |
whismanoid | 0:68e64068330f | 1258 | /// - 000: 1 (default) |
whismanoid | 0:68e64068330f | 1259 | /// - 001: 2 |
whismanoid | 0:68e64068330f | 1260 | /// - 010: 4 |
whismanoid | 0:68e64068330f | 1261 | /// - 011: 8 |
whismanoid | 0:68e64068330f | 1262 | /// - 100: 16 |
whismanoid | 0:68e64068330f | 1263 | /// - 101: 32 |
whismanoid | 0:68e64068330f | 1264 | /// - 110: 64 |
whismanoid | 0:68e64068330f | 1265 | /// - 111: 128 |
whismanoid | 0:68e64068330f | 1266 | typedef enum MAX11410_GAIN_enum_t { |
whismanoid | 18:83a84c5ee00f | 1267 | GAIN_000_1 = 0x00, //!< 0b000 |
whismanoid | 18:83a84c5ee00f | 1268 | GAIN_001_2 = 0x01, //!< 0b001 |
whismanoid | 18:83a84c5ee00f | 1269 | GAIN_010_4 = 0x02, //!< 0b010 |
whismanoid | 18:83a84c5ee00f | 1270 | GAIN_011_8 = 0x03, //!< 0b011 |
whismanoid | 18:83a84c5ee00f | 1271 | GAIN_100_16 = 0x04, //!< 0b100 |
whismanoid | 18:83a84c5ee00f | 1272 | GAIN_101_32 = 0x05, //!< 0b101 |
whismanoid | 18:83a84c5ee00f | 1273 | GAIN_110_64 = 0x06, //!< 0b110 |
whismanoid | 18:83a84c5ee00f | 1274 | GAIN_111_128 = 0x07, //!< 0b111 |
whismanoid | 0:68e64068330f | 1275 | } MAX11410_GAIN_enum_t; |
whismanoid | 0:68e64068330f | 1276 | |
whismanoid | 0:68e64068330f | 1277 | // TODO1: CODE GENERATOR: ic_variant -- IC's supported with this driver |
whismanoid | 0:68e64068330f | 1278 | /** |
whismanoid | 0:68e64068330f | 1279 | * @brief IC's supported with this driver |
whismanoid | 0:68e64068330f | 1280 | * @details MAX11410 |
whismanoid | 0:68e64068330f | 1281 | */ |
whismanoid | 0:68e64068330f | 1282 | typedef enum |
whismanoid | 0:68e64068330f | 1283 | { |
whismanoid | 0:68e64068330f | 1284 | MAX11410_IC = 0, |
whismanoid | 0:68e64068330f | 1285 | //MAX11410_IC = 1 |
whismanoid | 0:68e64068330f | 1286 | } MAX11410_ic_t; |
whismanoid | 0:68e64068330f | 1287 | |
whismanoid | 0:68e64068330f | 1288 | // TODO1: CODE GENERATOR: class constructor declaration |
whismanoid | 0:68e64068330f | 1289 | /**********************************************************//** |
whismanoid | 0:68e64068330f | 1290 | * @brief Constructor for MAX11410 Class. |
whismanoid | 0:68e64068330f | 1291 | * |
whismanoid | 0:68e64068330f | 1292 | * @details Requires an existing SPI object as well as a DigitalOut object. |
whismanoid | 0:68e64068330f | 1293 | * The DigitalOut object is used for a chip enable signal |
whismanoid | 0:68e64068330f | 1294 | * |
whismanoid | 0:68e64068330f | 1295 | * On Entry: |
whismanoid | 0:68e64068330f | 1296 | * @param[in] spi - pointer to existing SPI object |
whismanoid | 0:68e64068330f | 1297 | * @param[in] cs_pin - pointer to a DigitalOut pin object |
whismanoid | 0:68e64068330f | 1298 | * CODE GENERATOR: class constructor docstrings gpio InputPin pins |
whismanoid | 0:68e64068330f | 1299 | * CODE GENERATOR: class constructor docstrings gpio OutputPin pins |
whismanoid | 0:68e64068330f | 1300 | * @param[in] ic_variant - which type of MAX11410 is used |
whismanoid | 0:68e64068330f | 1301 | * |
whismanoid | 0:68e64068330f | 1302 | * On Exit: |
whismanoid | 0:68e64068330f | 1303 | * |
whismanoid | 0:68e64068330f | 1304 | * @return None |
whismanoid | 0:68e64068330f | 1305 | **************************************************************/ |
whismanoid | 0:68e64068330f | 1306 | MAX11410(SPI &spi, DigitalOut &cs_pin, // SPI interface |
whismanoid | 0:68e64068330f | 1307 | // CODE GENERATOR: class constructor declaration gpio InputPin pins |
whismanoid | 0:68e64068330f | 1308 | // CODE GENERATOR: class constructor declaration gpio OutputPin pins |
whismanoid | 0:68e64068330f | 1309 | MAX11410_ic_t ic_variant); |
whismanoid | 0:68e64068330f | 1310 | |
whismanoid | 0:68e64068330f | 1311 | // CODE GENERATOR: class destructor declaration |
whismanoid | 0:68e64068330f | 1312 | /************************************************************ |
whismanoid | 0:68e64068330f | 1313 | * @brief Default destructor for MAX11410 Class. |
whismanoid | 0:68e64068330f | 1314 | * |
whismanoid | 0:68e64068330f | 1315 | * @details Destroys SPI object if owner |
whismanoid | 0:68e64068330f | 1316 | * |
whismanoid | 0:68e64068330f | 1317 | * On Entry: |
whismanoid | 0:68e64068330f | 1318 | * |
whismanoid | 0:68e64068330f | 1319 | * On Exit: |
whismanoid | 0:68e64068330f | 1320 | * |
whismanoid | 0:68e64068330f | 1321 | * @return None |
whismanoid | 0:68e64068330f | 1322 | **************************************************************/ |
whismanoid | 0:68e64068330f | 1323 | ~MAX11410(); |
whismanoid | 0:68e64068330f | 1324 | |
whismanoid | 0:68e64068330f | 1325 | // CODE GENERATOR: Declare SPI diagnostic function pointer void onSPIprint() |
whismanoid | 0:68e64068330f | 1326 | /// Function pointer void f(size_t byteCount, uint8_t mosiData[], uint8_t misoData[]) |
whismanoid | 0:68e64068330f | 1327 | Callback<void(size_t, uint8_t*, uint8_t*)> onSPIprint; //!< optional @ref onSPIprint SPI diagnostic function |
whismanoid | 0:68e64068330f | 1328 | |
whismanoid | 0:68e64068330f | 1329 | // CODE GENERATOR: spi_frequency setter declaration |
whismanoid | 0:68e64068330f | 1330 | /// set SPI SCLK frequency |
whismanoid | 0:68e64068330f | 1331 | void spi_frequency(int spi_sclk_Hz); |
whismanoid | 0:68e64068330f | 1332 | |
whismanoid | 1:d57c1a2cb83c | 1333 | // CODE GENERATOR: spi_frequency getter declaration and definition |
whismanoid | 1:d57c1a2cb83c | 1334 | /// get SPI SCLK frequency |
whismanoid | 1:d57c1a2cb83c | 1335 | int get_spi_frequency() const { return m_SPI_SCLK_Hz; } |
whismanoid | 1:d57c1a2cb83c | 1336 | |
whismanoid | 1:d57c1a2cb83c | 1337 | // CODE GENERATOR: spi_dataMode getter declaration and definition |
whismanoid | 1:d57c1a2cb83c | 1338 | /// get SPI mode |
whismanoid | 1:d57c1a2cb83c | 1339 | int get_spi_dataMode() const { return m_SPI_dataMode; } |
whismanoid | 1:d57c1a2cb83c | 1340 | |
whismanoid | 0:68e64068330f | 1341 | //---------------------------------------- |
whismanoid | 0:68e64068330f | 1342 | // CODE GENERATOR: omit typedef enum MAX11410_device_t, class members instead of global device object |
whismanoid | 0:68e64068330f | 1343 | public: |
whismanoid | 0:68e64068330f | 1344 | |
whismanoid | 1:d57c1a2cb83c | 1345 | /// AIN0-AIN1 reference voltage, in Volts |
whismanoid | 22:c6812214a933 | 1346 | double ref0_v; |
whismanoid | 1:d57c1a2cb83c | 1347 | |
whismanoid | 1:d57c1a2cb83c | 1348 | /// REF1P-REF1N reference voltage, in Volts |
whismanoid | 22:c6812214a933 | 1349 | double ref1_v; |
whismanoid | 1:d57c1a2cb83c | 1350 | |
whismanoid | 1:d57c1a2cb83c | 1351 | /// REF2P-REF2N reference voltage, in Volts |
whismanoid | 22:c6812214a933 | 1352 | double ref2_v; |
whismanoid | 1:d57c1a2cb83c | 1353 | |
whismanoid | 1:d57c1a2cb83c | 1354 | /// AVDD-AGND reference voltage, in Volts |
whismanoid | 22:c6812214a933 | 1355 | double avdd_v; |
whismanoid | 21:847b2220e96e | 1356 | |
whismanoid | 1:d57c1a2cb83c | 1357 | /// shadow of register ctrl CMD_r000_1001_dddd_dddd_CTRL |
whismanoid | 1:d57c1a2cb83c | 1358 | uint32_t ctrl; |
whismanoid | 1:d57c1a2cb83c | 1359 | |
whismanoid | 23:22e7830bcccb | 1360 | /// read-only pga gain 1, 2, 4, 8, 16, 32, 64, or 128 set by Configure_PGA gain index register pga CMD_r000_1110_00ss_0ggg_PGA |
whismanoid | 1:d57c1a2cb83c | 1361 | uint8_t pgaGain; |
whismanoid | 0:68e64068330f | 1362 | |
whismanoid | 22:c6812214a933 | 1363 | /// shadow of read-only register status CMD_r011_1000_dddd_dddd_dddd_dddd_dxxx_dddd_STATUS |
whismanoid | 0:68e64068330f | 1364 | uint32_t status; |
whismanoid | 0:68e64068330f | 1365 | |
whismanoid | 22:c6812214a933 | 1366 | /// shadow of read-only register data0 CMD_r011_0000_dddd_dddd_dddd_dddd_dddd_dddd_DATA0 |
whismanoid | 0:68e64068330f | 1367 | uint32_t data0; |
whismanoid | 0:68e64068330f | 1368 | |
whismanoid | 1:d57c1a2cb83c | 1369 | /// Each channel's most recent value in LSBs. |
whismanoid | 1:d57c1a2cb83c | 1370 | /// Updated by Measure_Voltage function. |
whismanoid | 1:d57c1a2cb83c | 1371 | /// Use VoltageOfCode function to convert LSBs to physical voltage. |
whismanoid | 14:b49eecf7e4d8 | 1372 | /// (Valid index range AINP_SEL_0000_AIN0 to AINP_SEL_1010_AVDD). |
whismanoid | 14:b49eecf7e4d8 | 1373 | /// AINP_SEL_1010_AVDD is a sentinel position. |
whismanoid | 8:3a9dfa2e8234 | 1374 | /// |
whismanoid | 8:3a9dfa2e8234 | 1375 | uint32_t AINcode[11]; |
whismanoid | 1:d57c1a2cb83c | 1376 | |
whismanoid | 21:847b2220e96e | 1377 | /// When driver polls status of a pin signal or a register status bit, |
whismanoid | 21:847b2220e96e | 1378 | /// and there is no device physically connected, the driver must |
whismanoid | 21:847b2220e96e | 1379 | /// be able to halt and report failure if too many tries. Each attempt |
whismanoid | 22:c6812214a933 | 1380 | /// counts down until loop_limit is reached or exceeded. |
whismanoid | 21:847b2220e96e | 1381 | /// |
whismanoid | 21:847b2220e96e | 1382 | /// If driver seems to hang or takes too long to decide that device |
whismanoid | 21:847b2220e96e | 1383 | /// is not connected, reduce the futility countdown limit value. |
whismanoid | 21:847b2220e96e | 1384 | /// |
whismanoid | 21:847b2220e96e | 1385 | /// If driver sometimes works but sometimes intermittently fails to |
whismanoid | 21:847b2220e96e | 1386 | /// recognize device is attached, increase the futility countdown limit. |
whismanoid | 22:c6812214a933 | 1387 | int loop_limit; |
whismanoid | 21:847b2220e96e | 1388 | |
whismanoid | 21:847b2220e96e | 1389 | /// read-only constant list of registers to be read by menu item * with no arguments |
whismanoid | 21:847b2220e96e | 1390 | MAX11410::MAX11410_CMD_enum_t* readAllStatusList; |
whismanoid | 21:847b2220e96e | 1391 | |
whismanoid | 21:847b2220e96e | 1392 | /// read-only constant number of registers to be read by menu item * with no arguments |
whismanoid | 21:847b2220e96e | 1393 | uint8_t readAllStatusListLen; |
whismanoid | 21:847b2220e96e | 1394 | |
whismanoid | 22:c6812214a933 | 1395 | /// timing delay after enable RTD bias current in Measure_RTD() |
whismanoid | 22:c6812214a933 | 1396 | int rtd_ms; |
whismanoid | 22:c6812214a933 | 1397 | |
whismanoid | 22:c6812214a933 | 1398 | /// RTD Resistance measurement; Thermocouple Cold Junction, in Ohms |
whismanoid | 22:c6812214a933 | 1399 | double rtd_ohm; |
whismanoid | 22:c6812214a933 | 1400 | |
whismanoid | 22:c6812214a933 | 1401 | /// Temperature calculated from RTD Resistance; Thermocouple Cold Junction, in degrees C |
whismanoid | 22:c6812214a933 | 1402 | double rtd_degc; |
whismanoid | 22:c6812214a933 | 1403 | |
whismanoid | 23:22e7830bcccb | 1404 | /// filter register configuration in Measure_RTD() |
whismanoid | 23:22e7830bcccb | 1405 | uint8_t rtd_filter; |
whismanoid | 23:22e7830bcccb | 1406 | |
whismanoid | 23:22e7830bcccb | 1407 | /// ctrl register configuration in Measure_RTD() |
whismanoid | 23:22e7830bcccb | 1408 | uint8_t rtd_ctrl; |
whismanoid | 23:22e7830bcccb | 1409 | |
whismanoid | 23:22e7830bcccb | 1410 | /// source register configuration in Measure_RTD() |
whismanoid | 23:22e7830bcccb | 1411 | uint8_t rtd_source; |
whismanoid | 23:22e7830bcccb | 1412 | |
whismanoid | 23:22e7830bcccb | 1413 | /// pga register configuration in Measure_RTD() |
whismanoid | 23:22e7830bcccb | 1414 | uint8_t rtd_pga; |
whismanoid | 23:22e7830bcccb | 1415 | |
whismanoid | 34:1b72865fa71f | 1416 | /// filter register configuration in Measure_Voltage() |
whismanoid | 34:1b72865fa71f | 1417 | uint8_t v_filter; |
whismanoid | 34:1b72865fa71f | 1418 | |
whismanoid | 34:1b72865fa71f | 1419 | /// ctrl register configuration in Measure_Voltage() |
whismanoid | 34:1b72865fa71f | 1420 | uint8_t v_ctrl; |
whismanoid | 34:1b72865fa71f | 1421 | |
whismanoid | 34:1b72865fa71f | 1422 | /// pga register configuration in Measure_Voltage() |
whismanoid | 34:1b72865fa71f | 1423 | uint8_t v_pga; |
whismanoid | 34:1b72865fa71f | 1424 | |
whismanoid | 22:c6812214a933 | 1425 | /// Thermocouple voltage measurement, in Volts |
whismanoid | 22:c6812214a933 | 1426 | double tc_v; |
whismanoid | 22:c6812214a933 | 1427 | |
whismanoid | 22:c6812214a933 | 1428 | /// Temperature calculated from Thermocouple voltage, in degrees C |
whismanoid | 22:c6812214a933 | 1429 | double tc_delta_degc; |
whismanoid | 22:c6812214a933 | 1430 | |
whismanoid | 22:c6812214a933 | 1431 | /// Temperature calculated from Thermocouple voltage, in degrees C |
whismanoid | 22:c6812214a933 | 1432 | double tc_degc; |
whismanoid | 22:c6812214a933 | 1433 | |
whismanoid | 0:68e64068330f | 1434 | // CODE GENERATOR: omit global g_MAX11410_device |
whismanoid | 0:68e64068330f | 1435 | |
whismanoid | 0:68e64068330f | 1436 | // CODE GENERATOR: extern function declarations |
whismanoid | 0:68e64068330f | 1437 | // CODE GENERATOR: extern function declaration SPIoutputCS |
whismanoid | 0:68e64068330f | 1438 | //---------------------------------------- |
whismanoid | 0:68e64068330f | 1439 | // Assert SPI Chip Select |
whismanoid | 0:68e64068330f | 1440 | // SPI chip-select for MAX11410 |
whismanoid | 0:68e64068330f | 1441 | // |
whismanoid | 0:68e64068330f | 1442 | void SPIoutputCS(int isLogicHigh); |
whismanoid | 0:68e64068330f | 1443 | |
whismanoid | 0:68e64068330f | 1444 | // CODE GENERATOR: extern function declaration SPIwrite16bits |
whismanoid | 0:68e64068330f | 1445 | //---------------------------------------- |
whismanoid | 0:68e64068330f | 1446 | // SPI write 16 bits |
whismanoid | 0:68e64068330f | 1447 | // SPI interface to MAX11410 shift 16 bits mosiData into MAX11410 DIN |
whismanoid | 0:68e64068330f | 1448 | // |
whismanoid | 0:68e64068330f | 1449 | void SPIwrite16bits(int16_t mosiData16); |
whismanoid | 0:68e64068330f | 1450 | |
whismanoid | 0:68e64068330f | 1451 | // CODE GENERATOR: extern function declaration SPIreadWrite16bits |
whismanoid | 0:68e64068330f | 1452 | //---------------------------------------- |
whismanoid | 0:68e64068330f | 1453 | // SPI read and write 16 bits |
whismanoid | 0:68e64068330f | 1454 | // SPI interface to MAX11410 shift 16 bits mosiData16 into MAX11410 DIN |
whismanoid | 0:68e64068330f | 1455 | // while simultaneously capturing 16 bits miso data from MAX11410 DOUT |
whismanoid | 0:68e64068330f | 1456 | // |
whismanoid | 0:68e64068330f | 1457 | int16_t SPIreadWrite16bits(int16_t mosiData16); |
whismanoid | 0:68e64068330f | 1458 | |
whismanoid | 0:68e64068330f | 1459 | // CODE GENERATOR: extern function declaration SPIreadWrite32bits |
whismanoid | 0:68e64068330f | 1460 | //---------------------------------------- |
whismanoid | 0:68e64068330f | 1461 | // SPI read and write 32 bits |
whismanoid | 0:68e64068330f | 1462 | // SPI interface to MAX11410 shift 32 bits mosiData into MAX11410 DIN |
whismanoid | 0:68e64068330f | 1463 | // while simultaneously capturing 32 bits miso data from MAX11410 DOUT |
whismanoid | 0:68e64068330f | 1464 | // |
whismanoid | 0:68e64068330f | 1465 | int32_t SPIreadWrite32bits(int32_t mosiData32); |
whismanoid | 0:68e64068330f | 1466 | |
whismanoid | 0:68e64068330f | 1467 | // CODE GENERATOR: class member data |
whismanoid | 0:68e64068330f | 1468 | private: |
whismanoid | 0:68e64068330f | 1469 | // CODE GENERATOR: class member data for SPI interface |
whismanoid | 0:68e64068330f | 1470 | // SPI object |
whismanoid | 0:68e64068330f | 1471 | SPI &m_spi; |
whismanoid | 0:68e64068330f | 1472 | int m_SPI_SCLK_Hz; |
whismanoid | 0:68e64068330f | 1473 | int m_SPI_dataMode; |
whismanoid | 0:68e64068330f | 1474 | int m_SPI_cs_state; |
whismanoid | 0:68e64068330f | 1475 | |
whismanoid | 0:68e64068330f | 1476 | // Selector pin object |
whismanoid | 0:68e64068330f | 1477 | DigitalOut &m_cs_pin; |
whismanoid | 0:68e64068330f | 1478 | |
whismanoid | 0:68e64068330f | 1479 | // CODE GENERATOR: class member data for gpio InputPin pins |
whismanoid | 0:68e64068330f | 1480 | // CODE GENERATOR: class member data for gpio OutputPin pins |
whismanoid | 0:68e64068330f | 1481 | |
whismanoid | 0:68e64068330f | 1482 | // Identifies which IC variant is being used |
whismanoid | 0:68e64068330f | 1483 | MAX11410_ic_t m_ic_variant; |
whismanoid | 0:68e64068330f | 1484 | |
whismanoid | 0:68e64068330f | 1485 | public: |
whismanoid | 0:68e64068330f | 1486 | |
whismanoid | 0:68e64068330f | 1487 | // CODE GENERATOR: class member function declarations |
whismanoid | 0:68e64068330f | 1488 | //---------------------------------------- |
whismanoid | 0:68e64068330f | 1489 | /// Menu item '!' |
whismanoid | 0:68e64068330f | 1490 | /// Initialize device |
whismanoid | 19:50cf5da53d36 | 1491 | /// |
whismanoid | 19:50cf5da53d36 | 1492 | /// @test Init() expect 1 |
whismanoid | 19:50cf5da53d36 | 1493 | /// |
whismanoid | 29:a677458ac250 | 1494 | /// @test group POR // verify initial register values |
whismanoid | 27:1cb6c42c6a93 | 1495 | /// @test group PORverbose // verify initial register values |
whismanoid | 27:1cb6c42c6a93 | 1496 | /// @test group PORverbose tinyTester.print("PART_ID value") |
whismanoid | 22:c6812214a933 | 1497 | /// @test group POR RegRead(MAX11410::CMD_r001_0001_xxxx_xxxx_xxxx_xxxx_xxxx_xddd_PART_ID, buffer) expect 1 expect-buffer 0x000F02 |
whismanoid | 20:fb7527415308 | 1498 | /// |
whismanoid | 27:1cb6c42c6a93 | 1499 | /// @test group PORverbose tinyTester.print("POR value 0x04 CMD_r000_0100_dddd_xddd_GP0_CTRL") |
whismanoid | 22:c6812214a933 | 1500 | /// @test group POR RegRead(MAX11410::CMD_r000_0100_dddd_xddd_GP0_CTRL, buffer) expect 1 expect-buffer 0x00 |
whismanoid | 20:fb7527415308 | 1501 | /// |
whismanoid | 27:1cb6c42c6a93 | 1502 | /// @test group PORverbose tinyTester.print("POR value 0x05 CMD_r000_0101_dddd_xddd_GP1_CTRL") |
whismanoid | 22:c6812214a933 | 1503 | /// @test group POR RegRead(MAX11410::CMD_r000_0101_dddd_xddd_GP1_CTRL, buffer) expect 1 expect-buffer 0x00 |
whismanoid | 20:fb7527415308 | 1504 | /// |
whismanoid | 27:1cb6c42c6a93 | 1505 | /// @test group PORverbose tinyTester.print("POR value 0x07 CMD_r000_0111_xddd_dddd_GP_SEQ_ADDR") |
whismanoid | 22:c6812214a933 | 1506 | /// @test group POR RegRead(MAX11410::CMD_r000_0111_xddd_dddd_GP_SEQ_ADDR, buffer) expect 1 expect-buffer 0x00003a |
whismanoid | 19:50cf5da53d36 | 1507 | /// |
whismanoid | 27:1cb6c42c6a93 | 1508 | /// @test group PORverbose tinyTester.print("POR value 0x08 CMD_r000_1000_x0dd_dddd_FILTER") |
whismanoid | 22:c6812214a933 | 1509 | /// @test group POR RegRead(MAX11410::CMD_r000_1000_x0dd_dddd_FILTER, buffer) expect 1 expect-buffer 0x00 |
whismanoid | 20:fb7527415308 | 1510 | /// |
whismanoid | 27:1cb6c42c6a93 | 1511 | /// @test group PORverbose tinyTester.print("POR value 0x09 CMD_r000_1001_dddd_dddd_CTRL") |
whismanoid | 22:c6812214a933 | 1512 | /// @test group POR RegRead(MAX11410::CMD_r000_1001_dddd_dddd_CTRL, buffer) expect 1 expect-buffer 0x000001 |
whismanoid | 20:fb7527415308 | 1513 | /// |
whismanoid | 27:1cb6c42c6a93 | 1514 | /// @test group PORverbose tinyTester.print("POR value 0x0a CMD_r000_1010_dddd_dddd_SOURCE") |
whismanoid | 22:c6812214a933 | 1515 | /// @test group POR RegRead(MAX11410::CMD_r000_1010_dddd_dddd_SOURCE, buffer) expect 1 expect-buffer 0x00 |
whismanoid | 20:fb7527415308 | 1516 | /// |
whismanoid | 27:1cb6c42c6a93 | 1517 | /// @test group PORverbose tinyTester.print("POR value 0x0b CMD_r000_1011_dddd_dddd_MUX_CTRL0") |
whismanoid | 22:c6812214a933 | 1518 | /// @test group POR RegRead(MAX11410::CMD_r000_1011_dddd_dddd_MUX_CTRL0, buffer) expect 1 expect-buffer 0x0000ff |
whismanoid | 20:fb7527415308 | 1519 | /// |
whismanoid | 27:1cb6c42c6a93 | 1520 | /// @test group PORverbose tinyTester.print("POR value 0x0c CMD_r000_1100_dddd_dddd_MUX_CTRL1") |
whismanoid | 22:c6812214a933 | 1521 | /// @test group POR RegRead(MAX11410::CMD_r000_1100_dddd_dddd_MUX_CTRL1, buffer) expect 1 expect-buffer 0x0000ff |
whismanoid | 20:fb7527415308 | 1522 | /// |
whismanoid | 27:1cb6c42c6a93 | 1523 | /// @test group PORverbose tinyTester.print("POR value 0x0d CMD_r000_1101_dddd_dddd_MUX_CTRL2") |
whismanoid | 22:c6812214a933 | 1524 | /// @test group POR RegRead(MAX11410::CMD_r000_1101_dddd_dddd_MUX_CTRL2, buffer) expect 1 expect-buffer 0x00 |
whismanoid | 20:fb7527415308 | 1525 | /// |
whismanoid | 27:1cb6c42c6a93 | 1526 | /// @test group PORverbose tinyTester.print("POR value 0x0e CMD_r000_1110_00ss_0ggg_PGA") |
whismanoid | 23:22e7830bcccb | 1527 | /// @test group POR RegRead(MAX11410::CMD_r000_1110_00ss_0ggg_PGA, buffer) expect 1 expect-buffer 0x00 |
whismanoid | 20:fb7527415308 | 1528 | /// |
whismanoid | 20:fb7527415308 | 1529 | /// @future test CMD_r000_1111_dddd_dddd_WAIT_EXT = 0x0f, //!< 0b0001111 |
whismanoid | 20:fb7527415308 | 1530 | /// @future test CMD_r001_0000_xxxx_xxxx_WAIT_START = 0x10, //!< 0b0010000 |
whismanoid | 20:fb7527415308 | 1531 | /// |
whismanoid | 27:1cb6c42c6a93 | 1532 | /// @test group RES1KA2A3TOGND // measure a 1kohm resistor between (AIN2,AIN3) and AGND to verify ref2_v (disabled by default) |
whismanoid | 27:1cb6c42c6a93 | 1533 | /// @test group RES1KA2A3TOGNDMORE // measure a 1kohm resistor between (AIN2,AIN3) and AGND to verify ref2_v in more detail |
whismanoid | 27:1cb6c42c6a93 | 1534 | /// @test group RES1KA2A3TOGNDMORE tinyTester.print("measure a 1kohm resistor between (AIN2,AIN3) and AGND to verify ref2_v") |
whismanoid | 27:1cb6c42c6a93 | 1535 | /// @test group RES1KA2A3TOGND tinyTester.settle_time_msec = 1000 // default 250 |
whismanoid | 27:1cb6c42c6a93 | 1536 | /// @test group RES1KA2A3TOGND RegWrite(0x0C, 0xF3) expect 1 // *mux_ctrl1=0xf3 drives current source from AIN3 |
whismanoid | 22:c6812214a933 | 1537 | /// |
whismanoid | 27:1cb6c42c6a93 | 1538 | /// @test group RES1KA2A3TOGNDMORE RegWrite(0x0A, 0x03) expect 1 // *source=0x03 idac_mode=100uA, 1k resistor 0.1V |
whismanoid | 27:1cb6c42c6a93 | 1539 | /// @test group RES1KA2A3TOGNDMORE tinyTester.print("idac_mode=100uA, 1k resistor 0.1V") |
whismanoid | 27:1cb6c42c6a93 | 1540 | /// @test group RES1KA2A3TOGNDMORE tinyTester.Wait_Output_Settling() |
whismanoid | 27:1cb6c42c6a93 | 1541 | /// @test group RES1KA2A3TOGNDMORE Measure_Voltage(2,10) expect 0.1 |
whismanoid | 27:1cb6c42c6a93 | 1542 | /// @test group RES1KA2A3TOGNDMORE AINcode[2] expect (uint32_t)337731 within 33773 // idac_mode=100uA, 1k resistor 0.1V |
whismanoid | 22:c6812214a933 | 1543 | /// |
whismanoid | 27:1cb6c42c6a93 | 1544 | /// @test group RES1KA2A3TOGNDMORE RegWrite(0x0A, 0x0D) expect 1 // *source=0x0d idac_mode=800uA, 1k resistor 0.8V |
whismanoid | 27:1cb6c42c6a93 | 1545 | /// @test group RES1KA2A3TOGNDMORE tinyTester.print("idac_mode=800uA, 1k resistor 0.8V") |
whismanoid | 27:1cb6c42c6a93 | 1546 | /// @test group RES1KA2A3TOGNDMORE tinyTester.Wait_Output_Settling() |
whismanoid | 27:1cb6c42c6a93 | 1547 | /// @test group RES1KA2A3TOGNDMORE Measure_Voltage(2,10) expect 0.8 |
whismanoid | 27:1cb6c42c6a93 | 1548 | /// @test group RES1KA2A3TOGNDMORE AINcode[2] expect (uint32_t)2724467 within 33773 // idac_mode=800uA, 1k resistor 0.8V |
whismanoid | 22:c6812214a933 | 1549 | /// |
whismanoid | 27:1cb6c42c6a93 | 1550 | /// @test group RES1KA2A3TOGND RegWrite(0x0A, 0x0B) expect 1 // *source=0x0b idac_mode=400uA, 1k resistor 0.4V |
whismanoid | 27:1cb6c42c6a93 | 1551 | /// @test group RES1KA2A3TOGNDMORE tinyTester.print("idac_mode=400uA, 1k resistor 0.4V") |
whismanoid | 27:1cb6c42c6a93 | 1552 | /// @test group RES1KA2A3TOGND tinyTester.Wait_Output_Settling() |
whismanoid | 27:1cb6c42c6a93 | 1553 | /// @test group RES1KA2A3TOGND Measure_Voltage(2,10) expect 0.4 |
whismanoid | 27:1cb6c42c6a93 | 1554 | /// @test group RES1KA2A3TOGNDMORE AINcode[2] expect (uint32_t)1343163 within 33773 // idac_mode=400uA, 1k resistor 0.4V |
whismanoid | 20:fb7527415308 | 1555 | /// |
whismanoid | 19:50cf5da53d36 | 1556 | /// @test tinyTester.print("check filter register is writeable") |
whismanoid | 19:50cf5da53d36 | 1557 | /// @future test tinyTester.print("this is a real mess dealing with the custom types") |
whismanoid | 19:50cf5da53d36 | 1558 | /// @test RegWrite(0x08, 0x34) expect 1 |
whismanoid | 19:50cf5da53d36 | 1559 | /// @future test tinyTester.print("error: no matching function for call to 'MaximTinyTester::FunctionCall_Expect(const char [18], uint8_t (&)(MAX11410::MAX11410_CMD_enum_t, uint32_t), MAX11410::MAX11410_CMD_enum_t, uint32_t, int)'") |
whismanoid | 19:50cf5da53d36 | 1560 | /// @future test RegWrite(CMD_r000_1000_x0dd_dddd_FILTER, 0x34) expect 1 |
whismanoid | 19:50cf5da53d36 | 1561 | /// @future test RegWrite(MAX11410_CMD_enum_t::CMD_r000_1000_x0dd_dddd_FILTER, 0x34) expect 1 |
whismanoid | 19:50cf5da53d36 | 1562 | /// @future test RegWrite(MAX11410::MAX11410_CMD_enum_t::CMD_r000_1000_x0dd_dddd_FILTER, 0x34) expect 1 |
whismanoid | 19:50cf5da53d36 | 1563 | /// |
whismanoid | 19:50cf5da53d36 | 1564 | /// @test tinyTester.print("check filter register is readable") |
whismanoid | 19:50cf5da53d36 | 1565 | /// @test RegRead(0x08, buffer) expect 1 expect-buffer 0x34 |
whismanoid | 19:50cf5da53d36 | 1566 | /// @future test RegRead(MAX11410::MAX11410_CMD_enum_t::CMD_r000_1000_x0dd_dddd_FILTER, &buffer) expect 1 expect-buffer 0x34 |
whismanoid | 19:50cf5da53d36 | 1567 | /// |
whismanoid | 19:50cf5da53d36 | 1568 | /// @test tinyTester.settle_time_msec = 250 // default 250 |
whismanoid | 19:50cf5da53d36 | 1569 | /// @test tinyTester.blink_time_msec = 75 // default 75 resume hardware self test |
whismanoid | 19:50cf5da53d36 | 1570 | /// @test tinyTester.input_timeout_time_msec = 250 // default 250 |
whismanoid | 19:50cf5da53d36 | 1571 | /// @test tinyTester.settle_time_msec = 20 // default 250 |
whismanoid | 19:50cf5da53d36 | 1572 | /// @test tinyTester.blink_time_msec = 20 // quickly speed through the software verification |
whismanoid | 19:50cf5da53d36 | 1573 | /// @test tinyTester.input_timeout_time_msec = 100 // default 250 |
whismanoid | 19:50cf5da53d36 | 1574 | /// |
whismanoid | 19:50cf5da53d36 | 1575 | /// @test tinyTester.Wait_Output_Settling() |
whismanoid | 19:50cf5da53d36 | 1576 | /// |
whismanoid | 19:50cf5da53d36 | 1577 | /// @future test tinyTester.DigitalIn_Read_Expect_WarnOnly(DigitalIn& digitalInPin, const char* pinName, int expect_result, const char *expect_description) |
whismanoid | 19:50cf5da53d36 | 1578 | /// |
whismanoid | 0:68e64068330f | 1579 | /// @return 1 on success; 0 on failure |
whismanoid | 0:68e64068330f | 1580 | uint8_t Init(void); |
whismanoid | 0:68e64068330f | 1581 | |
whismanoid | 0:68e64068330f | 1582 | //---------------------------------------- |
whismanoid | 1:d57c1a2cb83c | 1583 | /// Return the physical voltage corresponding to conversion result, |
whismanoid | 1:d57c1a2cb83c | 1584 | /// for unipolar mode. |
whismanoid | 0:68e64068330f | 1585 | /// Does not perform any offset or gain correction. |
whismanoid | 0:68e64068330f | 1586 | /// |
whismanoid | 1:d57c1a2cb83c | 1587 | /// @pre CTRL::U_BN = 1 -- Unipolar mode |
whismanoid | 1:d57c1a2cb83c | 1588 | /// @pre CTRL::FORMAT = x |
whismanoid | 1:d57c1a2cb83c | 1589 | /// @pre g_MAX11410_device.VRef = Voltage of REF input, in Volts |
whismanoid | 1:d57c1a2cb83c | 1590 | /// @param[in] value_u24: raw 24-bit MAX11410 code (right justified). |
whismanoid | 1:d57c1a2cb83c | 1591 | /// @return physical voltage corresponding to MAX11410 code. |
whismanoid | 14:b49eecf7e4d8 | 1592 | /// |
whismanoid | 21:847b2220e96e | 1593 | /// @test group UNIPOLAR // Verify function VoltageOfCode_Unipolar |
whismanoid | 21:847b2220e96e | 1594 | /// @test group UNIPOLAR tinyTester.blink_time_msec = 20 // quickly speed through the software verification |
whismanoid | 21:847b2220e96e | 1595 | /// @test group UNIPOLAR Configure_CTRL_REF(2) expect 1 // These tests require REF2 = 2.500V |
whismanoid | 21:847b2220e96e | 1596 | /// @test group UNIPOLAR Configure_PGA(0,0) expect 1 // These tests require PGA gain=1 |
whismanoid | 19:50cf5da53d36 | 1597 | /// @test group UNIPOLAR VoltageOfCode_Unipolar(0xFFFFFF) expect 2.500 within 0.030 // Full Scale |
whismanoid | 19:50cf5da53d36 | 1598 | /// @test group UNIPOLAR VoltageOfCode_Unipolar(0xFFFFFE) expect 2.500 // Full Scale |
whismanoid | 19:50cf5da53d36 | 1599 | /// @test group UNIPOLAR VoltageOfCode_Unipolar(0xCCCCCC) expect 2.000 // Two Volts |
whismanoid | 19:50cf5da53d36 | 1600 | /// @test group UNIPOLAR VoltageOfCode_Unipolar(0xC00000) expect 1.875 // 75% Scale |
whismanoid | 19:50cf5da53d36 | 1601 | /// @test group UNIPOLAR VoltageOfCode_Unipolar(0x800000) expect 1.250 // Mid Scale |
whismanoid | 19:50cf5da53d36 | 1602 | /// @test group UNIPOLAR VoltageOfCode_Unipolar(0x666666) expect 1.000 // One Volt |
whismanoid | 19:50cf5da53d36 | 1603 | /// @test group UNIPOLAR VoltageOfCode_Unipolar(0x400000) expect 0.625 // 25% Scale |
whismanoid | 19:50cf5da53d36 | 1604 | /// @test group UNIPOLAR VoltageOfCode_Unipolar(0x0A3D70) expect 0.100 // 100mV |
whismanoid | 19:50cf5da53d36 | 1605 | /// @test group UNIPOLAR VoltageOfCode_Unipolar(0x000064) expect 0.000014901162 // 100 LSB |
whismanoid | 19:50cf5da53d36 | 1606 | /// @test group UNIPOLAR VoltageOfCode_Unipolar(0x00000A) expect 0.0000014901162 // Ten LSB |
whismanoid | 19:50cf5da53d36 | 1607 | /// @test group UNIPOLAR VoltageOfCode_Unipolar(0x000003) expect 0.00000044703483 // Three LSB |
whismanoid | 19:50cf5da53d36 | 1608 | /// @test group UNIPOLAR VoltageOfCode_Unipolar(0x000002) expect 0.00000029802326 // Two LSB |
whismanoid | 19:50cf5da53d36 | 1609 | /// @test group UNIPOLAR VoltageOfCode_Unipolar(0x000001) expect 0.00000014901162 // One LSB |
whismanoid | 19:50cf5da53d36 | 1610 | /// @test group UNIPOLAR VoltageOfCode_Unipolar(0x000000) expect 0.0 // Zero Scale |
whismanoid | 21:847b2220e96e | 1611 | /// @test group UNIPOLAR tinyTester.blink_time_msec = 75 // default 75 resume hardware self test |
whismanoid | 1:d57c1a2cb83c | 1612 | /// |
whismanoid | 1:d57c1a2cb83c | 1613 | double VoltageOfCode_Unipolar(uint32_t value_u24); |
whismanoid | 1:d57c1a2cb83c | 1614 | |
whismanoid | 1:d57c1a2cb83c | 1615 | //---------------------------------------- |
whismanoid | 1:d57c1a2cb83c | 1616 | /// Return the physical voltage corresponding to conversion result, |
whismanoid | 1:d57c1a2cb83c | 1617 | /// when conversion format is Bipolar mode, offset binary. |
whismanoid | 1:d57c1a2cb83c | 1618 | /// Does not perform any offset or gain correction. |
whismanoid | 1:d57c1a2cb83c | 1619 | /// |
whismanoid | 1:d57c1a2cb83c | 1620 | /// @pre CTRL::U_BN = 0 -- Bipolar mode |
whismanoid | 1:d57c1a2cb83c | 1621 | /// @pre CTRL::FORMAT = 1 -- offset binary |
whismanoid | 0:68e64068330f | 1622 | /// @pre g_MAX11410_device.VRef = Voltage of REF input, in Volts |
whismanoid | 0:68e64068330f | 1623 | /// @param[in] value_u24: raw 24-bit MAX11410 code (right justified). |
whismanoid | 0:68e64068330f | 1624 | /// @return physical voltage corresponding to MAX11410 code. |
whismanoid | 14:b49eecf7e4d8 | 1625 | /// |
whismanoid | 21:847b2220e96e | 1626 | /// @test group BIPOB // Verify function VoltageOfCode_Bipolar_OffsetBinary |
whismanoid | 21:847b2220e96e | 1627 | /// @test group BIPOB tinyTester.blink_time_msec = 20 // quickly speed through the software verification |
whismanoid | 21:847b2220e96e | 1628 | /// @test group BIPOB Configure_CTRL_REF(2) expect 1 // These tests require REF2 = 2.500V |
whismanoid | 21:847b2220e96e | 1629 | /// @test group BIPOB Configure_PGA(0,0) expect 1 // These tests require PGA gain=1 |
whismanoid | 19:50cf5da53d36 | 1630 | /// @test group BIPOB VoltageOfCode_Bipolar_OffsetBinary(0xFFFFFF) expect 2.5 within 0.030 // Full Scale |
whismanoid | 19:50cf5da53d36 | 1631 | /// @test group BIPOB VoltageOfCode_Bipolar_OffsetBinary(0xFFFFFE) expect 2.5 // Full Scale |
whismanoid | 19:50cf5da53d36 | 1632 | /// @test group BIPOB VoltageOfCode_Bipolar_OffsetBinary(0xC00000) expect 1.25 // Mid Scale |
whismanoid | 19:50cf5da53d36 | 1633 | /// @test group BIPOB VoltageOfCode_Bipolar_OffsetBinary(0x800003) expect 0.00000894069671 // Three LSB |
whismanoid | 19:50cf5da53d36 | 1634 | /// @test group BIPOB VoltageOfCode_Bipolar_OffsetBinary(0x800002) expect 0.00000596046447 // Two LSB |
whismanoid | 19:50cf5da53d36 | 1635 | /// @test group BIPOB VoltageOfCode_Bipolar_OffsetBinary(0x800001) expect 0.0000029802326 // One LSB |
whismanoid | 19:50cf5da53d36 | 1636 | /// @test group BIPOB VoltageOfCode_Bipolar_OffsetBinary(0x800000) expect 0.0 // Zero Scale |
whismanoid | 19:50cf5da53d36 | 1637 | /// @test group BIPOB VoltageOfCode_Bipolar_OffsetBinary(0x7FFFFF) expect -0.0000029802326 // Negative One LSB |
whismanoid | 19:50cf5da53d36 | 1638 | /// @test group BIPOB VoltageOfCode_Bipolar_OffsetBinary(0x7FFFFE) expect -0.0000059604644 // Negative Two LSB |
whismanoid | 19:50cf5da53d36 | 1639 | /// @test group BIPOB VoltageOfCode_Bipolar_OffsetBinary(0x7FFFFD) expect -0.0000089406967 // Negative Three LSB |
whismanoid | 19:50cf5da53d36 | 1640 | /// @test group BIPOB VoltageOfCode_Bipolar_OffsetBinary(0x400000) expect -1.25 // Negative Mid Scale |
whismanoid | 19:50cf5da53d36 | 1641 | /// @test group BIPOB VoltageOfCode_Bipolar_OffsetBinary(0x000001) expect -2.5 // Negative Full Scale |
whismanoid | 19:50cf5da53d36 | 1642 | /// @test group BIPOB VoltageOfCode_Bipolar_OffsetBinary(0x000000) expect -2.5 // Negative Full Scale |
whismanoid | 21:847b2220e96e | 1643 | /// @test group BIPOB tinyTester.blink_time_msec = 75 // default 75 resume hardware self test |
whismanoid | 1:d57c1a2cb83c | 1644 | /// |
whismanoid | 1:d57c1a2cb83c | 1645 | double VoltageOfCode_Bipolar_OffsetBinary(uint32_t value_u24); |
whismanoid | 1:d57c1a2cb83c | 1646 | |
whismanoid | 1:d57c1a2cb83c | 1647 | //---------------------------------------- |
whismanoid | 1:d57c1a2cb83c | 1648 | /// Return the physical voltage corresponding to conversion result, |
whismanoid | 1:d57c1a2cb83c | 1649 | /// when conversion format is Bipolar mode, 2's complement. |
whismanoid | 1:d57c1a2cb83c | 1650 | /// Does not perform any offset or gain correction. |
whismanoid | 1:d57c1a2cb83c | 1651 | /// |
whismanoid | 1:d57c1a2cb83c | 1652 | /// @pre CTRL::U_BN = 0 -- Bipolar mode |
whismanoid | 1:d57c1a2cb83c | 1653 | /// @pre CTRL::FORMAT = 0 -- 2's complement |
whismanoid | 1:d57c1a2cb83c | 1654 | /// @pre g_MAX11410_device.VRef = Voltage of REF input, in Volts |
whismanoid | 1:d57c1a2cb83c | 1655 | /// @param[in] value_u24: raw 24-bit MAX11410 code (right justified). |
whismanoid | 1:d57c1a2cb83c | 1656 | /// @return physical voltage corresponding to MAX11410 code. |
whismanoid | 14:b49eecf7e4d8 | 1657 | /// |
whismanoid | 21:847b2220e96e | 1658 | /// @test group BIP2C // Verify function VoltageOfCode_Bipolar_2sComplement |
whismanoid | 21:847b2220e96e | 1659 | /// @test group BIP2C tinyTester.blink_time_msec = 20 // quickly speed through the software verification |
whismanoid | 21:847b2220e96e | 1660 | /// @test group BIP2C Configure_CTRL_REF(2) expect 1 // These tests require REF2 = 2.500V |
whismanoid | 21:847b2220e96e | 1661 | /// @test group BIP2C Configure_PGA(0,0) expect 1 // These tests require PGA gain=1 |
whismanoid | 19:50cf5da53d36 | 1662 | /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0x7FFFFF) expect 2.500 within 0.030 // Full Scale |
whismanoid | 19:50cf5da53d36 | 1663 | /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0x7FFFFE) expect 2.500 // Full Scale |
whismanoid | 19:50cf5da53d36 | 1664 | /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0x666666) expect 2.000 // Two Volts |
whismanoid | 19:50cf5da53d36 | 1665 | /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0x600000) expect 1.875 // 75% Scale |
whismanoid | 19:50cf5da53d36 | 1666 | /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0x400000) expect 1.250 // Mid Scale |
whismanoid | 19:50cf5da53d36 | 1667 | /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0x333333) expect 1.000 // One Volt |
whismanoid | 19:50cf5da53d36 | 1668 | /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0x200000) expect 0.625 // 25% Scale |
whismanoid | 19:50cf5da53d36 | 1669 | /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0x051eb8) expect 0.100 // 100mV |
whismanoid | 19:50cf5da53d36 | 1670 | /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0x000003) expect 0.00000894069671 // Three LSB |
whismanoid | 19:50cf5da53d36 | 1671 | /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0x000002) expect 0.00000596046447 // Two LSB |
whismanoid | 19:50cf5da53d36 | 1672 | /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0x000001) expect 0.0000029802326 // One LSB |
whismanoid | 19:50cf5da53d36 | 1673 | /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0x000000) expect 0.0 // Zero Scale |
whismanoid | 19:50cf5da53d36 | 1674 | /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0xFFFFFF) expect -0.0000029802326 // Negative One LSB |
whismanoid | 19:50cf5da53d36 | 1675 | /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0xFFFFFE) expect -0.0000059604644 // Negative Two LSB |
whismanoid | 19:50cf5da53d36 | 1676 | /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0xFFFFFD) expect -0.0000089406967 // Negative Three LSB |
whismanoid | 19:50cf5da53d36 | 1677 | /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0xFAE148) expect -0.100 // Negative 100mV |
whismanoid | 19:50cf5da53d36 | 1678 | /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0xE00000) expect -0.625 // Negative 25% Scale |
whismanoid | 19:50cf5da53d36 | 1679 | /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0xCCCCCD) expect -1.000 // Negative One Volt |
whismanoid | 19:50cf5da53d36 | 1680 | /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0xC00000) expect -1.250 // Negative Mid Scale |
whismanoid | 19:50cf5da53d36 | 1681 | /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0xA00000) expect -1.875 // Negative 75% Scale |
whismanoid | 19:50cf5da53d36 | 1682 | /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0x99999A) expect -2.000 // Negative Two Volts |
whismanoid | 19:50cf5da53d36 | 1683 | /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0x800001) expect -2.500 // Negative Full Scale |
whismanoid | 19:50cf5da53d36 | 1684 | /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0x800000) expect -2.500 // Negative Full Scale |
whismanoid | 21:847b2220e96e | 1685 | /// @test group BIP2C tinyTester.blink_time_msec = 75 // default 75 resume hardware self test |
whismanoid | 1:d57c1a2cb83c | 1686 | /// |
whismanoid | 1:d57c1a2cb83c | 1687 | double VoltageOfCode_Bipolar_2sComplement(uint32_t value_u24); |
whismanoid | 1:d57c1a2cb83c | 1688 | |
whismanoid | 1:d57c1a2cb83c | 1689 | //---------------------------------------- |
whismanoid | 1:d57c1a2cb83c | 1690 | /// Return the physical voltage corresponding to conversion result, |
whismanoid | 1:d57c1a2cb83c | 1691 | /// when conversion format is determined by the CTRL register. |
whismanoid | 1:d57c1a2cb83c | 1692 | /// Does not perform any offset or gain correction. |
whismanoid | 1:d57c1a2cb83c | 1693 | /// |
whismanoid | 1:d57c1a2cb83c | 1694 | /// @pre CTRL::U_BN and CTRL::FORMAT = 0 select offset binary, 2's complement, or straight binary |
whismanoid | 1:d57c1a2cb83c | 1695 | /// @pre g_MAX11410_device.VRef = Voltage of REF input, in Volts |
whismanoid | 1:d57c1a2cb83c | 1696 | /// @param[in] value_u24: raw 24-bit MAX11410 code (right justified). |
whismanoid | 1:d57c1a2cb83c | 1697 | /// @return physical voltage corresponding to MAX11410 code. |
whismanoid | 1:d57c1a2cb83c | 1698 | double VoltageOfCode(uint32_t value_u24); |
whismanoid | 0:68e64068330f | 1699 | |
whismanoid | 0:68e64068330f | 1700 | // CODE GENERATOR: looks like this is a register access function because 'regAdd' |
whismanoid | 0:68e64068330f | 1701 | // CODE GENERATOR: looks like this is a 'write' register access function |
whismanoid | 0:68e64068330f | 1702 | //---------------------------------------- |
whismanoid | 0:68e64068330f | 1703 | /// Write a MAX11410 register. |
whismanoid | 0:68e64068330f | 1704 | /// |
whismanoid | 11:abde565b8497 | 1705 | /// CMDOP_1aaa_aaaa_ReadRegister bit is cleared 0 indicating a write operation. |
whismanoid | 0:68e64068330f | 1706 | /// |
whismanoid | 0:68e64068330f | 1707 | /// MAX11410 register length can be determined by function RegSize. |
whismanoid | 0:68e64068330f | 1708 | /// |
whismanoid | 0:68e64068330f | 1709 | /// For 8-bit register size: |
whismanoid | 0:68e64068330f | 1710 | /// |
whismanoid | 0:68e64068330f | 1711 | /// SPI 16-bit transfer |
whismanoid | 0:68e64068330f | 1712 | /// |
whismanoid | 0:68e64068330f | 1713 | /// SPI MOSI = 0aaa_aaaa_dddd_dddd |
whismanoid | 0:68e64068330f | 1714 | /// |
whismanoid | 0:68e64068330f | 1715 | /// SPI MISO = xxxx_xxxx_xxxx_xxxx |
whismanoid | 0:68e64068330f | 1716 | /// |
whismanoid | 0:68e64068330f | 1717 | /// For 16-bit register size: |
whismanoid | 0:68e64068330f | 1718 | /// |
whismanoid | 0:68e64068330f | 1719 | /// SPI 24-bit or 32-bit transfer |
whismanoid | 0:68e64068330f | 1720 | /// |
whismanoid | 0:68e64068330f | 1721 | /// SPI MOSI = 0aaa_aaaa_dddd_dddd_dddd_dddd |
whismanoid | 0:68e64068330f | 1722 | /// |
whismanoid | 0:68e64068330f | 1723 | /// SPI MISO = xxxx_xxxx_xxxx_xxxx_xxxx_xxxx |
whismanoid | 0:68e64068330f | 1724 | /// |
whismanoid | 0:68e64068330f | 1725 | /// For 24-bit register size: |
whismanoid | 0:68e64068330f | 1726 | /// |
whismanoid | 0:68e64068330f | 1727 | /// SPI 32-bit transfer |
whismanoid | 0:68e64068330f | 1728 | /// |
whismanoid | 0:68e64068330f | 1729 | /// SPI MOSI = 0aaa_aaaa_dddd_dddd_dddd_dddd_dddd_dddd |
whismanoid | 0:68e64068330f | 1730 | /// |
whismanoid | 0:68e64068330f | 1731 | /// SPI MISO = xxxx_xxxx_xxxx_xxxx_xxxx_xxxx_xxxx_xxxx |
whismanoid | 0:68e64068330f | 1732 | /// |
whismanoid | 0:68e64068330f | 1733 | /// @return 1 on success; 0 on failure |
whismanoid | 10:7adee48a7f82 | 1734 | uint8_t RegWrite(MAX11410_CMD_enum_t commandByte, uint32_t regData); |
whismanoid | 0:68e64068330f | 1735 | |
whismanoid | 0:68e64068330f | 1736 | // CODE GENERATOR: looks like this is a register access function because 'regAdd' |
whismanoid | 0:68e64068330f | 1737 | // CODE GENERATOR: looks like this is a 'read' register access function |
whismanoid | 0:68e64068330f | 1738 | //---------------------------------------- |
whismanoid | 0:68e64068330f | 1739 | /// Read an 8-bit MAX11410 register |
whismanoid | 0:68e64068330f | 1740 | /// |
whismanoid | 11:abde565b8497 | 1741 | /// CMDOP_1aaa_aaaa_ReadRegister bit is set 1 indicating a read operation. |
whismanoid | 0:68e64068330f | 1742 | /// |
whismanoid | 0:68e64068330f | 1743 | /// MAX11410 register length can be determined by function RegSize. |
whismanoid | 0:68e64068330f | 1744 | /// |
whismanoid | 0:68e64068330f | 1745 | /// For 8-bit register size: |
whismanoid | 0:68e64068330f | 1746 | /// |
whismanoid | 0:68e64068330f | 1747 | /// SPI 16-bit transfer |
whismanoid | 0:68e64068330f | 1748 | /// |
whismanoid | 0:68e64068330f | 1749 | /// SPI MOSI = 1aaa_aaaa_0000_0000 |
whismanoid | 0:68e64068330f | 1750 | /// |
whismanoid | 0:68e64068330f | 1751 | /// SPI MISO = xxxx_xxxx_dddd_dddd |
whismanoid | 0:68e64068330f | 1752 | /// |
whismanoid | 0:68e64068330f | 1753 | /// For 16-bit register size: |
whismanoid | 0:68e64068330f | 1754 | /// |
whismanoid | 0:68e64068330f | 1755 | /// SPI 24-bit or 32-bit transfer |
whismanoid | 0:68e64068330f | 1756 | /// |
whismanoid | 0:68e64068330f | 1757 | /// SPI MOSI = 1aaa_aaaa_0000_0000_0000_0000 |
whismanoid | 0:68e64068330f | 1758 | /// |
whismanoid | 0:68e64068330f | 1759 | /// SPI MISO = xxxx_xxxx_dddd_dddd_dddd_dddd |
whismanoid | 0:68e64068330f | 1760 | /// |
whismanoid | 0:68e64068330f | 1761 | /// For 24-bit register size: |
whismanoid | 0:68e64068330f | 1762 | /// |
whismanoid | 0:68e64068330f | 1763 | /// SPI 32-bit transfer |
whismanoid | 0:68e64068330f | 1764 | /// |
whismanoid | 0:68e64068330f | 1765 | /// SPI MOSI = 1aaa_aaaa_0000_0000_0000_0000_0000_0000 |
whismanoid | 0:68e64068330f | 1766 | /// |
whismanoid | 0:68e64068330f | 1767 | /// SPI MISO = xxxx_xxxx_dddd_dddd_dddd_dddd_dddd_dddd |
whismanoid | 0:68e64068330f | 1768 | /// |
whismanoid | 0:68e64068330f | 1769 | /// |
whismanoid | 0:68e64068330f | 1770 | /// @return 1 on success; 0 on failure |
whismanoid | 10:7adee48a7f82 | 1771 | uint8_t RegRead(MAX11410_CMD_enum_t commandByte, uint32_t* ptrRegData); |
whismanoid | 0:68e64068330f | 1772 | |
whismanoid | 0:68e64068330f | 1773 | // CODE GENERATOR: looks like this is a register access function because 'regAdd' |
whismanoid | 0:68e64068330f | 1774 | // CODE GENERATOR: looks like this is a 'size' register access function |
whismanoid | 0:68e64068330f | 1775 | //---------------------------------------- |
whismanoid | 0:68e64068330f | 1776 | /// Return the size of a MAX11410 register |
whismanoid | 0:68e64068330f | 1777 | /// |
whismanoid | 0:68e64068330f | 1778 | /// @return 8 for 8-bit, 16 for 16-bit, 24 for 24-bit, else 0 for undefined register size |
whismanoid | 10:7adee48a7f82 | 1779 | uint8_t RegSize(MAX11410_CMD_enum_t commandByte); |
whismanoid | 10:7adee48a7f82 | 1780 | |
whismanoid | 10:7adee48a7f82 | 1781 | // CODE GENERATOR: looks like this is a register access function because 'regAdd' |
whismanoid | 10:7adee48a7f82 | 1782 | //---------------------------------------- |
whismanoid | 11:abde565b8497 | 1783 | /// Decode operation from commandByte |
whismanoid | 11:abde565b8497 | 1784 | /// |
whismanoid | 11:abde565b8497 | 1785 | /// @return operation such as idle, read register, write register, etc. |
whismanoid | 11:abde565b8497 | 1786 | MAX11410::MAX11410_CMDOP_enum_t DecodeCommand(MAX11410_CMD_enum_t commandByte); |
whismanoid | 11:abde565b8497 | 1787 | |
whismanoid | 11:abde565b8497 | 1788 | // CODE GENERATOR: looks like this is a register access function because 'regAdd' |
whismanoid | 11:abde565b8497 | 1789 | //---------------------------------------- |
whismanoid | 10:7adee48a7f82 | 1790 | /// Return the address field of a MAX11410 register |
whismanoid | 10:7adee48a7f82 | 1791 | /// |
whismanoid | 10:7adee48a7f82 | 1792 | /// @return register address field as given in datasheet |
whismanoid | 10:7adee48a7f82 | 1793 | uint8_t RegAddrOfCommand(MAX11410_CMD_enum_t commandByte); |
whismanoid | 10:7adee48a7f82 | 1794 | |
whismanoid | 10:7adee48a7f82 | 1795 | // CODE GENERATOR: looks like this is a register access function because 'regAdd' |
whismanoid | 10:7adee48a7f82 | 1796 | // CODE GENERATOR: looks like this is a 'read' register access function |
whismanoid | 10:7adee48a7f82 | 1797 | //---------------------------------------- |
whismanoid | 10:7adee48a7f82 | 1798 | /// Test whether a command byte is a register read command |
whismanoid | 10:7adee48a7f82 | 1799 | /// |
whismanoid | 10:7adee48a7f82 | 1800 | /// @return true if command byte is a register read command |
whismanoid | 10:7adee48a7f82 | 1801 | uint8_t IsRegReadCommand(MAX11410_CMD_enum_t commandByte); |
whismanoid | 0:68e64068330f | 1802 | |
whismanoid | 0:68e64068330f | 1803 | // CODE GENERATOR: looks like this is a register access function because 'regAdd' |
whismanoid | 32:4c183afd82f6 | 1804 | // CODE GENERATOR: looks like this is a 'write' register access function |
whismanoid | 32:4c183afd82f6 | 1805 | //---------------------------------------- |
whismanoid | 32:4c183afd82f6 | 1806 | /// Test whether a command byte is a register write command |
whismanoid | 32:4c183afd82f6 | 1807 | /// |
whismanoid | 32:4c183afd82f6 | 1808 | /// @return true if command byte is a register write command |
whismanoid | 32:4c183afd82f6 | 1809 | uint8_t IsRegWriteCommand(MAX11410_CMD_enum_t commandByte); |
whismanoid | 32:4c183afd82f6 | 1810 | |
whismanoid | 32:4c183afd82f6 | 1811 | // CODE GENERATOR: looks like this is a register access function because 'regAdd' |
whismanoid | 0:68e64068330f | 1812 | // CODE GENERATOR: looks like this is a 'name' register access function |
whismanoid | 0:68e64068330f | 1813 | //---------------------------------------- |
whismanoid | 0:68e64068330f | 1814 | /// Return the name of a MAX11410 register |
whismanoid | 0:68e64068330f | 1815 | /// |
whismanoid | 0:68e64068330f | 1816 | /// @return null-terminated constant C string containing register name or empty string |
whismanoid | 10:7adee48a7f82 | 1817 | const char* RegName(MAX11410_CMD_enum_t commandByte); |
whismanoid | 0:68e64068330f | 1818 | |
whismanoid | 0:68e64068330f | 1819 | //---------------------------------------- |
whismanoid | 1:d57c1a2cb83c | 1820 | /// Menu item 'XF' |
whismanoid | 1:d57c1a2cb83c | 1821 | /// |
whismanoid | 1:d57c1a2cb83c | 1822 | /// FILTER Select Filter and Rate. |
whismanoid | 1:d57c1a2cb83c | 1823 | /// Sets conversion rate based on RATE, LINEF, and CONV_TYPE value. See Table 9a through Table 9d for details. |
whismanoid | 1:d57c1a2cb83c | 1824 | /// For CONV_TYPE_01_Continuous, linef=LINEF_11_SINC4, rate=RATE_0100 selects output data rate 60SPS. |
whismanoid | 1:d57c1a2cb83c | 1825 | /// |
whismanoid | 1:d57c1a2cb83c | 1826 | /// @param[in] linef = filter type, default=MAX11410::MAX11410_LINEF_enum_t::LINEF_11_SINC4 |
whismanoid | 1:d57c1a2cb83c | 1827 | /// @param[in] rate = output data rate selection, default=MAX11410::MAX11410_RATE_enum_t::RATE_0100 |
whismanoid | 1:d57c1a2cb83c | 1828 | /// |
whismanoid | 1:d57c1a2cb83c | 1829 | /// @return 1 on success; 0 on failure |
whismanoid | 1:d57c1a2cb83c | 1830 | uint8_t Configure_FILTER(uint8_t linef, uint8_t rate); |
whismanoid | 1:d57c1a2cb83c | 1831 | |
whismanoid | 1:d57c1a2cb83c | 1832 | //---------------------------------------- |
whismanoid | 1:d57c1a2cb83c | 1833 | /// Menu item 'XP' |
whismanoid | 1:d57c1a2cb83c | 1834 | /// |
whismanoid | 1:d57c1a2cb83c | 1835 | /// PGA Select Gain and Signal Path. |
whismanoid | 1:d57c1a2cb83c | 1836 | /// |
whismanoid | 1:d57c1a2cb83c | 1837 | /// @param[in] sigpath = signal path, default=MAX11410::MAX11410_SIG_PATH_enum_t::SIG_PATH_00_BUFFERED |
whismanoid | 1:d57c1a2cb83c | 1838 | /// @param[in] gain = gain selection, default=MAX11410::MAX11410_GAIN_enum_t::GAIN_000_1 |
whismanoid | 1:d57c1a2cb83c | 1839 | /// |
whismanoid | 1:d57c1a2cb83c | 1840 | /// @return 1 on success; 0 on failure |
whismanoid | 1:d57c1a2cb83c | 1841 | uint8_t Configure_PGA(uint8_t sigpath, uint8_t gain); |
whismanoid | 1:d57c1a2cb83c | 1842 | |
whismanoid | 1:d57c1a2cb83c | 1843 | //---------------------------------------- |
whismanoid | 1:d57c1a2cb83c | 1844 | /// Menu item 'XC' |
whismanoid | 1:d57c1a2cb83c | 1845 | /// |
whismanoid | 1:d57c1a2cb83c | 1846 | /// CTRL Select clock, format, and reference. |
whismanoid | 1:d57c1a2cb83c | 1847 | /// |
whismanoid | 1:d57c1a2cb83c | 1848 | /// @param[in] extclk = external clock enable, default=0 |
whismanoid | 1:d57c1a2cb83c | 1849 | /// @param[in] u_bn = unipolar input range enable, default=0 |
whismanoid | 1:d57c1a2cb83c | 1850 | /// @param[in] format = offset binary format enable, default=0 |
whismanoid | 1:d57c1a2cb83c | 1851 | /// @param[in] refbufp_en = REFP reference buffer enable, default=0 |
whismanoid | 1:d57c1a2cb83c | 1852 | /// @param[in] refbufn_en = REFN reference buffer enable, default=0 |
whismanoid | 1:d57c1a2cb83c | 1853 | /// @param[in] ref_sel = reference selection, default=MAX11410::MAX11410_REF_SEL_enum_t::REF_SEL_001_REF1P_REF1N |
whismanoid | 1:d57c1a2cb83c | 1854 | /// |
whismanoid | 1:d57c1a2cb83c | 1855 | /// @return 1 on success; 0 on failure |
whismanoid | 1:d57c1a2cb83c | 1856 | uint8_t Configure_CTRL(uint8_t extclk, uint8_t u_bn, uint8_t format, uint8_t refbufp_en, uint8_t refbufn_en, uint8_t ref_sel); |
whismanoid | 1:d57c1a2cb83c | 1857 | |
whismanoid | 1:d57c1a2cb83c | 1858 | //---------------------------------------- |
whismanoid | 14:b49eecf7e4d8 | 1859 | /// Menu item 'XR' |
whismanoid | 14:b49eecf7e4d8 | 1860 | /// |
whismanoid | 14:b49eecf7e4d8 | 1861 | /// CTRL select reference, without changing the other fields. |
whismanoid | 14:b49eecf7e4d8 | 1862 | /// |
whismanoid | 14:b49eecf7e4d8 | 1863 | /// @pre ctrl = shadow of CTRL register |
whismanoid | 14:b49eecf7e4d8 | 1864 | /// @param[in] ref_sel = reference selection, default=MAX11410::MAX11410_REF_SEL_enum_t::REF_SEL_001_REF1P_REF1N |
whismanoid | 14:b49eecf7e4d8 | 1865 | /// |
whismanoid | 14:b49eecf7e4d8 | 1866 | /// @return 1 on success; 0 on failure |
whismanoid | 14:b49eecf7e4d8 | 1867 | uint8_t Configure_CTRL_REF(uint8_t ref_sel); |
whismanoid | 14:b49eecf7e4d8 | 1868 | |
whismanoid | 14:b49eecf7e4d8 | 1869 | //---------------------------------------- |
whismanoid | 1:d57c1a2cb83c | 1870 | /// Menu item 'XS' |
whismanoid | 1:d57c1a2cb83c | 1871 | /// |
whismanoid | 1:d57c1a2cb83c | 1872 | /// SOURCE Configure voltage bias source, current source, burnout mode |
whismanoid | 1:d57c1a2cb83c | 1873 | /// |
whismanoid | 32:4c183afd82f6 | 1874 | /// @param[in] vbias_mode = bias voltage mode, default=MAX11410::MAX11410_VBIAS_MODE_enum_t::VBIAS_MODE_00_Active |
whismanoid | 32:4c183afd82f6 | 1875 | /// @param[in] brn_mode = burnout source mode, default=MAX11410::MAX11410_BRN_MODE_enum_t::BRN_MODE_00_disabled |
whismanoid | 32:4c183afd82f6 | 1876 | /// @param[in] idac_mode = current source value, default=MAX11410::MAX11410_IDAC_MODE_enum_t::IDAC_MODE_0000_10uA |
whismanoid | 1:d57c1a2cb83c | 1877 | /// |
whismanoid | 1:d57c1a2cb83c | 1878 | /// @return 1 on success; 0 on failure |
whismanoid | 1:d57c1a2cb83c | 1879 | uint8_t Configure_SOURCE(uint8_t vbias_mode, uint8_t brn_mode, uint8_t idac_mode); |
whismanoid | 1:d57c1a2cb83c | 1880 | |
whismanoid | 1:d57c1a2cb83c | 1881 | //---------------------------------------- |
whismanoid | 1:d57c1a2cb83c | 1882 | /// Menu item 'XM' |
whismanoid | 1:d57c1a2cb83c | 1883 | /// |
whismanoid | 1:d57c1a2cb83c | 1884 | /// MUX_CTRL0 Select pins for analog input AINP and AINN |
whismanoid | 1:d57c1a2cb83c | 1885 | /// |
whismanoid | 1:d57c1a2cb83c | 1886 | /// @param[in] ainp = channel high side, default=MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0000_AIN0 |
whismanoid | 1:d57c1a2cb83c | 1887 | /// @param[in] ainn = channel low side, default=MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1010_GND |
whismanoid | 1:d57c1a2cb83c | 1888 | /// |
whismanoid | 1:d57c1a2cb83c | 1889 | /// @return 1 on success; 0 on failure |
whismanoid | 1:d57c1a2cb83c | 1890 | uint8_t Configure_MUX_CTRL0(uint8_t ainp, uint8_t ainn); |
whismanoid | 1:d57c1a2cb83c | 1891 | |
whismanoid | 1:d57c1a2cb83c | 1892 | //---------------------------------------- |
whismanoid | 1:d57c1a2cb83c | 1893 | /// Menu item 'XI' |
whismanoid | 1:d57c1a2cb83c | 1894 | /// |
whismanoid | 1:d57c1a2cb83c | 1895 | /// MUX_CTRL1 Select pins for current source |
whismanoid | 1:d57c1a2cb83c | 1896 | /// |
whismanoid | 1:d57c1a2cb83c | 1897 | /// @param[in] idac1_sel = channel high side, default=MAX11410::MAX11410_IDAC1_SEL_enum_t::IDAC1_SEL_1111_unconnected |
whismanoid | 1:d57c1a2cb83c | 1898 | /// @param[in] idac0_sel = channel low side, default=MAX11410::MAX11410_IDAC0_SEL_enum_t::IDAC0_SEL_1111_unconnected |
whismanoid | 1:d57c1a2cb83c | 1899 | /// |
whismanoid | 1:d57c1a2cb83c | 1900 | /// @return 1 on success; 0 on failure |
whismanoid | 1:d57c1a2cb83c | 1901 | uint8_t Configure_MUX_CTRL1(uint8_t idac1_sel, uint8_t idac0_sel); |
whismanoid | 1:d57c1a2cb83c | 1902 | |
whismanoid | 1:d57c1a2cb83c | 1903 | //---------------------------------------- |
whismanoid | 1:d57c1a2cb83c | 1904 | /// Menu item 'XV' |
whismanoid | 1:d57c1a2cb83c | 1905 | /// |
whismanoid | 1:d57c1a2cb83c | 1906 | /// MUX_CTRL2 Select pins for voltage bias source |
whismanoid | 1:d57c1a2cb83c | 1907 | /// |
whismanoid | 1:d57c1a2cb83c | 1908 | /// @param[in] vbias_ain7_ain0_bitmap = bit map of AIN7..AIN0 enables for voltage bias, default=0 |
whismanoid | 1:d57c1a2cb83c | 1909 | /// |
whismanoid | 1:d57c1a2cb83c | 1910 | /// @return 1 on success; 0 on failure |
whismanoid | 1:d57c1a2cb83c | 1911 | uint8_t Configure_MUX_CTRL2(uint8_t vbias_ain7_ain0_bitmap); |
whismanoid | 1:d57c1a2cb83c | 1912 | |
whismanoid | 1:d57c1a2cb83c | 1913 | //---------------------------------------- |
whismanoid | 1:d57c1a2cb83c | 1914 | /// Menu item 'X0' |
whismanoid | 1:d57c1a2cb83c | 1915 | /// |
whismanoid | 1:d57c1a2cb83c | 1916 | /// CAL_START Calibrate Self Offset and Gain. |
whismanoid | 1:d57c1a2cb83c | 1917 | /// |
whismanoid | 1:d57c1a2cb83c | 1918 | /// @return 1 on success; 0 on failure |
whismanoid | 1:d57c1a2cb83c | 1919 | uint8_t Calibrate_Self_Offset_Gain(void); |
whismanoid | 1:d57c1a2cb83c | 1920 | |
whismanoid | 1:d57c1a2cb83c | 1921 | //---------------------------------------- |
whismanoid | 1:d57c1a2cb83c | 1922 | /// Menu item 'X1' |
whismanoid | 1:d57c1a2cb83c | 1923 | /// |
whismanoid | 1:d57c1a2cb83c | 1924 | /// CAL_START Calibrate Selected PGA. |
whismanoid | 1:d57c1a2cb83c | 1925 | /// |
whismanoid | 1:d57c1a2cb83c | 1926 | /// @return 1 on success; 0 on failure |
whismanoid | 1:d57c1a2cb83c | 1927 | uint8_t Calibrate_PGA_Gain(void); |
whismanoid | 1:d57c1a2cb83c | 1928 | |
whismanoid | 1:d57c1a2cb83c | 1929 | //---------------------------------------- |
whismanoid | 1:d57c1a2cb83c | 1930 | /// CAL_START Calibrate System Offset A. |
whismanoid | 1:d57c1a2cb83c | 1931 | /// |
whismanoid | 1:d57c1a2cb83c | 1932 | /// @return 1 on success; 0 on failure |
whismanoid | 1:d57c1a2cb83c | 1933 | uint8_t Calibrate_System_Offset_A(void); |
whismanoid | 1:d57c1a2cb83c | 1934 | |
whismanoid | 1:d57c1a2cb83c | 1935 | //---------------------------------------- |
whismanoid | 1:d57c1a2cb83c | 1936 | /// CAL_START Calibrate System Gain A. |
whismanoid | 1:d57c1a2cb83c | 1937 | /// |
whismanoid | 1:d57c1a2cb83c | 1938 | /// @return 1 on success; 0 on failure |
whismanoid | 1:d57c1a2cb83c | 1939 | uint8_t Calibrate_System_Gain_A(void); |
whismanoid | 1:d57c1a2cb83c | 1940 | |
whismanoid | 1:d57c1a2cb83c | 1941 | //---------------------------------------- |
whismanoid | 1:d57c1a2cb83c | 1942 | /// CAL_START Calibrate System Offset B. |
whismanoid | 1:d57c1a2cb83c | 1943 | /// |
whismanoid | 1:d57c1a2cb83c | 1944 | /// @return 1 on success; 0 on failure |
whismanoid | 1:d57c1a2cb83c | 1945 | uint8_t Calibrate_System_Offset_B(void); |
whismanoid | 1:d57c1a2cb83c | 1946 | |
whismanoid | 1:d57c1a2cb83c | 1947 | //---------------------------------------- |
whismanoid | 1:d57c1a2cb83c | 1948 | /// CAL_START Calibrate System Gain B. |
whismanoid | 1:d57c1a2cb83c | 1949 | /// |
whismanoid | 1:d57c1a2cb83c | 1950 | /// @return 1 on success; 0 on failure |
whismanoid | 1:d57c1a2cb83c | 1951 | uint8_t Calibrate_System_Gain_B(void); |
whismanoid | 1:d57c1a2cb83c | 1952 | |
whismanoid | 1:d57c1a2cb83c | 1953 | //---------------------------------------- |
whismanoid | 13:df96a784cda6 | 1954 | /// Menu item '$' -> AINcode[0], AINcode[1], AINcode[2], AINcode[3], AINcode[4], AINcode[5], AINcode[6], AINcode[7], AINcode[8], AINcode[9], AINcode[10] |
whismanoid | 17:0e9f2dfc2a30 | 1955 | /// |
whismanoid | 1:d57c1a2cb83c | 1956 | /// Measure all ADC channels in sequence. |
whismanoid | 17:0e9f2dfc2a30 | 1957 | /// Diagnostic output pulse on GP0 for each channel's measurement. |
whismanoid | 17:0e9f2dfc2a30 | 1958 | /// Diagnostic output pulse on GP1 for entire loop. |
whismanoid | 17:0e9f2dfc2a30 | 1959 | /// |
whismanoid | 8:3a9dfa2e8234 | 1960 | /// @post AINcode[0..10]: measurement result LSB code |
whismanoid | 0:68e64068330f | 1961 | /// |
whismanoid | 0:68e64068330f | 1962 | /// @return 1 on success; 0 on failure |
whismanoid | 1:d57c1a2cb83c | 1963 | uint8_t Read_All_Voltages(void); |
whismanoid | 0:68e64068330f | 1964 | |
whismanoid | 0:68e64068330f | 1965 | //---------------------------------------- |
whismanoid | 1:d57c1a2cb83c | 1966 | /// Menu item 'V' |
whismanoid | 0:68e64068330f | 1967 | /// Trigger Measurement for voltage input. |
whismanoid | 0:68e64068330f | 1968 | /// |
whismanoid | 0:68e64068330f | 1969 | /// Example code for typical voltage measurement. |
whismanoid | 0:68e64068330f | 1970 | /// |
whismanoid | 1:d57c1a2cb83c | 1971 | /// @pre external connection REF2P-REF2N is a reference voltage |
whismanoid | 1:d57c1a2cb83c | 1972 | /// @pre VRef = Voltage of REF input, in Volts |
whismanoid | 34:1b72865fa71f | 1973 | /// @pre v_filter = filter register configuration, 0x34 for LINEF_11_SINC4 RATE_0100 output data rate 60SPS |
whismanoid | 34:1b72865fa71f | 1974 | /// @pre v_ctrl = ctrl register configuration, 0x02 for bipolar REF_SEL_010_REF2P_REF2N |
whismanoid | 34:1b72865fa71f | 1975 | /// @pre v_pga = pga register configuration, 0x00 for SIG_PATH_00_BUFFERED GAIN_000_1 |
whismanoid | 1:d57c1a2cb83c | 1976 | /// @param[in] ainp = channel high side, default=AINP_SEL_0000_AIN0 |
whismanoid | 1:d57c1a2cb83c | 1977 | /// @param[in] ainn = channel low side, default=AINN_SEL_1010_GND |
whismanoid | 1:d57c1a2cb83c | 1978 | /// @post AINcode[ainp]: measurement result LSB code |
whismanoid | 0:68e64068330f | 1979 | /// |
whismanoid | 34:1b72865fa71f | 1980 | /// Output data rate (sample rate) is determined by filter register. |
whismanoid | 34:1b72865fa71f | 1981 | /// filter register configuration in Measure_Voltage CONV_TYPE_01_Continuous |
whismanoid | 34:1b72865fa71f | 1982 | /// v_filter=0x00 -- LINEF_00_50Hz_60Hz_FIR RATE_0000 | 1.1SPS |
whismanoid | 34:1b72865fa71f | 1983 | /// v_filter=0x01 -- LINEF_00_50Hz_60Hz_FIR RATE_0001 | 2.1SPS |
whismanoid | 34:1b72865fa71f | 1984 | /// v_filter=0x02 -- LINEF_00_50Hz_60Hz_FIR RATE_0010 | 4.2SPS |
whismanoid | 34:1b72865fa71f | 1985 | /// v_filter=0x03 -- LINEF_00_50Hz_60Hz_FIR RATE_0011 | 8.4SPS |
whismanoid | 34:1b72865fa71f | 1986 | /// v_filter=0x04 -- LINEF_00_50Hz_60Hz_FIR RATE_0100 | 16.8SPS |
whismanoid | 34:1b72865fa71f | 1987 | /// v_filter=0x10 -- LINEF_01_50Hz_FIR RATE_0000 | 1.3SPS |
whismanoid | 34:1b72865fa71f | 1988 | /// v_filter=0x11 -- LINEF_01_50Hz_FIR RATE_0001 | 2.7SPS |
whismanoid | 34:1b72865fa71f | 1989 | /// v_filter=0x12 -- LINEF_01_50Hz_FIR RATE_0010 | 5.3SPS |
whismanoid | 34:1b72865fa71f | 1990 | /// v_filter=0x13 -- LINEF_01_50Hz_FIR RATE_0011 | 10.7SPS |
whismanoid | 34:1b72865fa71f | 1991 | /// v_filter=0x14 -- LINEF_01_50Hz_FIR RATE_0100 | 21.3SPS |
whismanoid | 34:1b72865fa71f | 1992 | /// v_filter=0x15 -- LINEF_01_50Hz_FIR RATE_0101 | 40.0SPS |
whismanoid | 34:1b72865fa71f | 1993 | /// v_filter=0x20 -- LINEF_10_60Hz_FIR RATE_0000 | 1.3SPS |
whismanoid | 34:1b72865fa71f | 1994 | /// v_filter=0x21 -- LINEF_10_60Hz_FIR RATE_0001 | 2.7SPS |
whismanoid | 34:1b72865fa71f | 1995 | /// v_filter=0x22 -- LINEF_10_60Hz_FIR RATE_0010 | 5.3SPS |
whismanoid | 34:1b72865fa71f | 1996 | /// v_filter=0x23 -- LINEF_10_60Hz_FIR RATE_0011 | 10.7SPS |
whismanoid | 34:1b72865fa71f | 1997 | /// v_filter=0x24 -- LINEF_10_60Hz_FIR RATE_0100 | 21.3SPS |
whismanoid | 34:1b72865fa71f | 1998 | /// v_filter=0x25 -- LINEF_10_60Hz_FIR RATE_0101 | 40.0SPS |
whismanoid | 34:1b72865fa71f | 1999 | /// v_filter=0x30 -- LINEF_11_SINC4 RATE_0000 | 4SPS |
whismanoid | 34:1b72865fa71f | 2000 | /// v_filter=0x31 -- LINEF_11_SINC4 RATE_0001 | 10SPS |
whismanoid | 34:1b72865fa71f | 2001 | /// v_filter=0x32 -- LINEF_11_SINC4 RATE_0010 | 20SPS |
whismanoid | 34:1b72865fa71f | 2002 | /// v_filter=0x33 -- LINEF_11_SINC4 RATE_0011 | 40SPS |
whismanoid | 34:1b72865fa71f | 2003 | /// v_filter=0x34 --*LINEF_11_SINC4 RATE_0100 | 60SPS |
whismanoid | 34:1b72865fa71f | 2004 | /// v_filter=0x35 -- LINEF_11_SINC4 RATE_0101 | 120SPS |
whismanoid | 34:1b72865fa71f | 2005 | /// v_filter=0x36 -- LINEF_11_SINC4 RATE_0110 | 240SPS |
whismanoid | 34:1b72865fa71f | 2006 | /// v_filter=0x37 -- LINEF_11_SINC4 RATE_0111 | 480SPS |
whismanoid | 34:1b72865fa71f | 2007 | /// v_filter=0x38 -- LINEF_11_SINC4 RATE_1000 | 960SPS |
whismanoid | 34:1b72865fa71f | 2008 | /// v_filter=0x39 -- LINEF_11_SINC4 RATE_1001 | 1920SPS |
whismanoid | 34:1b72865fa71f | 2009 | /// |
whismanoid | 1:d57c1a2cb83c | 2010 | /// @return ideal voltage calculated from raw LSB code and reference voltage |
whismanoid | 1:d57c1a2cb83c | 2011 | double Measure_Voltage(MAX11410_AINP_SEL_enum_t ainp, MAX11410_AINN_SEL_enum_t ainn); |
whismanoid | 0:68e64068330f | 2012 | |
whismanoid | 0:68e64068330f | 2013 | //---------------------------------------- |
whismanoid | 22:c6812214a933 | 2014 | /// Menu item 'R' -> rtd_ohm, rtd_degc |
whismanoid | 0:68e64068330f | 2015 | /// Trigger Measurement for Resistive Temperature Device (RTD). |
whismanoid | 0:68e64068330f | 2016 | /// |
whismanoid | 0:68e64068330f | 2017 | /// Example code for typical RTD measurement. |
whismanoid | 0:68e64068330f | 2018 | /// |
whismanoid | 1:d57c1a2cb83c | 2019 | /// @pre external connection REF1P-REF1N is a reference resistor |
whismanoid | 22:c6812214a933 | 2020 | /// @pre ref1_v = reference resistance in ohms, default=4999 |
whismanoid | 23:22e7830bcccb | 2021 | /// @pre rtd_filter = filter register configuration, 0x34 for LINEF_11_SINC4 RATE_0100 output data rate 60SPS |
whismanoid | 23:22e7830bcccb | 2022 | /// @pre rtd_ctrl = ctrl register configuration, 0x40 for ref0_v, 0x41 for ref1_v, 0x42 for ref2_v |
whismanoid | 34:1b72865fa71f | 2023 | /// @pre rtd_souce = souce register configuration, 0x0B for IDAC_MODE_1011_400uA |
whismanoid | 34:1b72865fa71f | 2024 | /// @pre rtd_pga = pga register configuration, 0x21 for SIG_PATH_10_PGA GAIN_001_2 |
whismanoid | 1:d57c1a2cb83c | 2025 | /// @param[in] rtd_iout = channel RTD high side force, default=AINP_SEL_0111_AIN7 |
whismanoid | 1:d57c1a2cb83c | 2026 | /// @param[in] rtd_ainp = channel RTD high side sense, default=AINP_SEL_1000_AIN8 |
whismanoid | 1:d57c1a2cb83c | 2027 | /// @param[in] rtd_ainn = channel RTD low side, default=AINN_SEL_1001_AIN9 |
whismanoid | 1:d57c1a2cb83c | 2028 | /// @post AINcode[rtd_ainp]: measurement result LSB code |
whismanoid | 22:c6812214a933 | 2029 | /// @post rtd_ohm: measurement result resistance in Ohms |
whismanoid | 22:c6812214a933 | 2030 | /// @post rtd_degc: Temperature calculated from RTD Resistance; Thermocouple Cold Junction, in degrees C |
whismanoid | 0:68e64068330f | 2031 | /// |
whismanoid | 34:1b72865fa71f | 2032 | /// Output data rate (sample rate) is determined by filter register. |
whismanoid | 34:1b72865fa71f | 2033 | /// filter register configuration in Measure_RTD CONV_TYPE_01_Continuous |
whismanoid | 34:1b72865fa71f | 2034 | /// rtd_filter=0x00 -- LINEF_00_50Hz_60Hz_FIR RATE_0000 | 1.1SPS |
whismanoid | 34:1b72865fa71f | 2035 | /// rtd_filter=0x01 -- LINEF_00_50Hz_60Hz_FIR RATE_0001 | 2.1SPS |
whismanoid | 34:1b72865fa71f | 2036 | /// rtd_filter=0x02 -- LINEF_00_50Hz_60Hz_FIR RATE_0010 | 4.2SPS |
whismanoid | 34:1b72865fa71f | 2037 | /// rtd_filter=0x03 -- LINEF_00_50Hz_60Hz_FIR RATE_0011 | 8.4SPS |
whismanoid | 34:1b72865fa71f | 2038 | /// rtd_filter=0x04 -- LINEF_00_50Hz_60Hz_FIR RATE_0100 | 16.8SPS |
whismanoid | 34:1b72865fa71f | 2039 | /// rtd_filter=0x10 -- LINEF_01_50Hz_FIR RATE_0000 | 1.3SPS |
whismanoid | 34:1b72865fa71f | 2040 | /// rtd_filter=0x11 -- LINEF_01_50Hz_FIR RATE_0001 | 2.7SPS |
whismanoid | 34:1b72865fa71f | 2041 | /// rtd_filter=0x12 -- LINEF_01_50Hz_FIR RATE_0010 | 5.3SPS |
whismanoid | 34:1b72865fa71f | 2042 | /// rtd_filter=0x13 -- LINEF_01_50Hz_FIR RATE_0011 | 10.7SPS |
whismanoid | 34:1b72865fa71f | 2043 | /// rtd_filter=0x14 -- LINEF_01_50Hz_FIR RATE_0100 | 21.3SPS |
whismanoid | 34:1b72865fa71f | 2044 | /// rtd_filter=0x15 -- LINEF_01_50Hz_FIR RATE_0101 | 40.0SPS |
whismanoid | 34:1b72865fa71f | 2045 | /// rtd_filter=0x20 -- LINEF_10_60Hz_FIR RATE_0000 | 1.3SPS |
whismanoid | 34:1b72865fa71f | 2046 | /// rtd_filter=0x21 -- LINEF_10_60Hz_FIR RATE_0001 | 2.7SPS |
whismanoid | 34:1b72865fa71f | 2047 | /// rtd_filter=0x22 -- LINEF_10_60Hz_FIR RATE_0010 | 5.3SPS |
whismanoid | 34:1b72865fa71f | 2048 | /// rtd_filter=0x23 -- LINEF_10_60Hz_FIR RATE_0011 | 10.7SPS |
whismanoid | 34:1b72865fa71f | 2049 | /// rtd_filter=0x24 -- LINEF_10_60Hz_FIR RATE_0100 | 21.3SPS |
whismanoid | 34:1b72865fa71f | 2050 | /// rtd_filter=0x25 -- LINEF_10_60Hz_FIR RATE_0101 | 40.0SPS |
whismanoid | 34:1b72865fa71f | 2051 | /// rtd_filter=0x30 -- LINEF_11_SINC4 RATE_0000 | 4SPS |
whismanoid | 34:1b72865fa71f | 2052 | /// rtd_filter=0x31 -- LINEF_11_SINC4 RATE_0001 | 10SPS |
whismanoid | 34:1b72865fa71f | 2053 | /// rtd_filter=0x32 -- LINEF_11_SINC4 RATE_0010 | 20SPS |
whismanoid | 34:1b72865fa71f | 2054 | /// rtd_filter=0x33 -- LINEF_11_SINC4 RATE_0011 | 40SPS |
whismanoid | 34:1b72865fa71f | 2055 | /// rtd_filter=0x34 --*LINEF_11_SINC4 RATE_0100 | 60SPS |
whismanoid | 34:1b72865fa71f | 2056 | /// rtd_filter=0x35 -- LINEF_11_SINC4 RATE_0101 | 120SPS |
whismanoid | 34:1b72865fa71f | 2057 | /// rtd_filter=0x36 -- LINEF_11_SINC4 RATE_0110 | 240SPS |
whismanoid | 34:1b72865fa71f | 2058 | /// rtd_filter=0x37 -- LINEF_11_SINC4 RATE_0111 | 480SPS |
whismanoid | 34:1b72865fa71f | 2059 | /// rtd_filter=0x38 -- LINEF_11_SINC4 RATE_1000 | 960SPS |
whismanoid | 34:1b72865fa71f | 2060 | /// rtd_filter=0x39 -- LINEF_11_SINC4 RATE_1001 | 1920SPS |
whismanoid | 34:1b72865fa71f | 2061 | /// |
whismanoid | 3:658a93dfb2d8 | 2062 | /// @return resistance calculated from raw LSB code and reference resistance |
whismanoid | 1:d57c1a2cb83c | 2063 | double Measure_RTD(MAX11410_AINP_SEL_enum_t rtd_iout, MAX11410_AINP_SEL_enum_t rtd_ainp, MAX11410_AINN_SEL_enum_t rtd_ainn); |
whismanoid | 0:68e64068330f | 2064 | |
whismanoid | 0:68e64068330f | 2065 | //---------------------------------------- |
whismanoid | 3:658a93dfb2d8 | 2066 | /// Return the physical temperature corresponding to measured resistance |
whismanoid | 3:658a93dfb2d8 | 2067 | /// of a PT1000 type Resistive Temperature Device (RTD). |
whismanoid | 3:658a93dfb2d8 | 2068 | /// |
whismanoid | 22:c6812214a933 | 2069 | /// @param[in] rtd_ohm = RTD resistance in ohms, default=1000 |
whismanoid | 22:c6812214a933 | 2070 | /// @post rtd_degc: Temperature calculated from RTD Resistance; Thermocouple Cold Junction, in degrees C |
whismanoid | 3:658a93dfb2d8 | 2071 | /// |
whismanoid | 3:658a93dfb2d8 | 2072 | /// @return ideal temperature in degrees C, calculated from RTD resistance in ohms |
whismanoid | 21:847b2220e96e | 2073 | /// @test group RTD_PT1000 // PT1000 type Resistive Temperature Device (RTD) |
whismanoid | 21:847b2220e96e | 2074 | /// @test group RTD_PT1000 tinyTester.blink_time_msec = 20 // quickly speed through the software verification |
whismanoid | 19:50cf5da53d36 | 2075 | /// @test group RTD_PT1000 TemperatureOfRTD_PT1000(842.94) expect -40.0 within 0.1 // PT-1000 RTD at -40C |
whismanoid | 19:50cf5da53d36 | 2076 | /// @test group RTD_PT1000 TemperatureOfRTD_PT1000(1000.0) expect 0.0 within 0.1 // PT-1000 RTD at 0C |
whismanoid | 19:50cf5da53d36 | 2077 | /// @test group RTD_PT1000 TemperatureOfRTD_PT1000(1097.3) expect 25.0 within 0.1 // PT-1000 RTD at 25C |
whismanoid | 19:50cf5da53d36 | 2078 | /// @test group RTD_PT1000 TemperatureOfRTD_PT1000(1328.1) expect 85.0 within 0.1 // PT-1000 RTD at 85C |
whismanoid | 19:50cf5da53d36 | 2079 | /// @test group RTD_PT1000 TemperatureOfRTD_PT1000(1479.5) expect 125.0 within 0.1 // PT-1000 RTD at 125C |
whismanoid | 21:847b2220e96e | 2080 | /// @test group RTD_PT1000 tinyTester.blink_time_msec = 75 // default 75 resume hardware self test |
whismanoid | 3:658a93dfb2d8 | 2081 | /// |
whismanoid | 22:c6812214a933 | 2082 | double TemperatureOfRTD_PT1000(double rtd_ohm); |
whismanoid | 3:658a93dfb2d8 | 2083 | |
whismanoid | 3:658a93dfb2d8 | 2084 | //---------------------------------------- |
whismanoid | 16:00aa1e5a6843 | 2085 | /// Return the physical temperature corresponding to measured resistance |
whismanoid | 16:00aa1e5a6843 | 2086 | /// of a PT100 type Resistive Temperature Device (RTD). |
whismanoid | 16:00aa1e5a6843 | 2087 | /// |
whismanoid | 22:c6812214a933 | 2088 | /// @param[in] rtd_ohm = RTD resistance in ohms, default=100 |
whismanoid | 22:c6812214a933 | 2089 | /// @post rtd_degc: Temperature calculated from RTD Resistance; Thermocouple Cold Junction, in degrees C |
whismanoid | 16:00aa1e5a6843 | 2090 | /// |
whismanoid | 16:00aa1e5a6843 | 2091 | /// @return ideal temperature in degrees C, calculated from RTD resistance in ohms |
whismanoid | 21:847b2220e96e | 2092 | /// @test group RTD_PT100 // PT100 type Resistive Temperature Device (RTD) |
whismanoid | 21:847b2220e96e | 2093 | /// @test group RTD_PT100 tinyTester.blink_time_msec = 20 // quickly speed through the software verification |
whismanoid | 19:50cf5da53d36 | 2094 | /// @test group RTD_PT100 TemperatureOfRTD_PT100(84.294) expect -40.0 within 0.1 // PT-100 RTD at -40C |
whismanoid | 19:50cf5da53d36 | 2095 | /// @test group RTD_PT100 TemperatureOfRTD_PT100(100.00) expect 0.0 within 0.1 // PT-100 RTD at 0C |
whismanoid | 19:50cf5da53d36 | 2096 | /// @test group RTD_PT100 TemperatureOfRTD_PT100(109.73) expect 25.0 within 0.1 // PT-100 RTD at 25C |
whismanoid | 19:50cf5da53d36 | 2097 | /// @test group RTD_PT100 TemperatureOfRTD_PT100(132.81) expect 85.0 within 0.1 // PT-100 RTD at 85C |
whismanoid | 19:50cf5da53d36 | 2098 | /// @test group RTD_PT100 TemperatureOfRTD_PT100(147.95) expect 125.0 within 0.1 // PT-100 RTD at 125C |
whismanoid | 21:847b2220e96e | 2099 | /// @test group RTD_PT100 tinyTester.blink_time_msec = 75 // default 75 resume hardware self test |
whismanoid | 16:00aa1e5a6843 | 2100 | /// |
whismanoid | 22:c6812214a933 | 2101 | double TemperatureOfRTD_PT100(double rtd_ohm); |
whismanoid | 16:00aa1e5a6843 | 2102 | |
whismanoid | 16:00aa1e5a6843 | 2103 | //---------------------------------------- |
whismanoid | 16:00aa1e5a6843 | 2104 | /// Return the physical temperature corresponding to measured resistance |
whismanoid | 16:00aa1e5a6843 | 2105 | /// of a PT100 or PT1000 type Resistive Temperature Device (RTD). |
whismanoid | 16:00aa1e5a6843 | 2106 | /// |
whismanoid | 22:c6812214a933 | 2107 | /// @param[in] rtd_ohm = RTD resistance in ohms, default=100 |
whismanoid | 22:c6812214a933 | 2108 | /// @post rtd_degc: Temperature calculated from RTD Resistance; Thermocouple Cold Junction, in degrees C |
whismanoid | 16:00aa1e5a6843 | 2109 | /// |
whismanoid | 16:00aa1e5a6843 | 2110 | /// @return ideal temperature in degrees C, calculated from RTD resistance in ohms |
whismanoid | 19:50cf5da53d36 | 2111 | /// @test group RTD // Verify function TemperatureOfRTD |
whismanoid | 19:50cf5da53d36 | 2112 | /// @test group RTD tinyTester.blink_time_msec = 20 // quickly speed through the software verification |
whismanoid | 19:50cf5da53d36 | 2113 | /// @test group RTD TemperatureOfRTD(84.294) expect -40.0 within 0.1 // PT-100 RTD at -40C |
whismanoid | 19:50cf5da53d36 | 2114 | /// @test group RTD TemperatureOfRTD(100.00) expect 0.0 within 0.1 // PT-100 RTD at 0C |
whismanoid | 19:50cf5da53d36 | 2115 | /// @test group RTD TemperatureOfRTD(109.73) expect 25.0 within 0.1 // PT-100 RTD at 25C |
whismanoid | 19:50cf5da53d36 | 2116 | /// @test group RTD TemperatureOfRTD(132.81) expect 85.0 within 0.1 // PT-100 RTD at 85C |
whismanoid | 19:50cf5da53d36 | 2117 | /// @test group RTD TemperatureOfRTD(147.95) expect 125.0 within 0.1 // PT-100 RTD at 125C |
whismanoid | 19:50cf5da53d36 | 2118 | /// @test group RTD TemperatureOfRTD(842.94) expect -40.0 within 0.1 // PT-1000 RTD at -40C |
whismanoid | 19:50cf5da53d36 | 2119 | /// @test group RTD TemperatureOfRTD(1000.0) expect 0.0 within 0.1 // PT-1000 RTD at 0C |
whismanoid | 19:50cf5da53d36 | 2120 | /// @test group RTD TemperatureOfRTD(1097.3) expect 25.0 within 0.1 // PT-1000 RTD at 25C |
whismanoid | 19:50cf5da53d36 | 2121 | /// @test group RTD TemperatureOfRTD(1328.1) expect 85.0 within 0.1 // PT-1000 RTD at 85C |
whismanoid | 19:50cf5da53d36 | 2122 | /// @test group RTD TemperatureOfRTD(1479.5) expect 125.0 within 0.1 // PT-1000 RTD at 125C |
whismanoid | 21:847b2220e96e | 2123 | /// @test group RTD tinyTester.blink_time_msec = 75 // default 75 resume hardware self test |
whismanoid | 16:00aa1e5a6843 | 2124 | /// |
whismanoid | 22:c6812214a933 | 2125 | double TemperatureOfRTD(double rtd_ohm); |
whismanoid | 16:00aa1e5a6843 | 2126 | |
whismanoid | 16:00aa1e5a6843 | 2127 | //---------------------------------------- |
whismanoid | 22:c6812214a933 | 2128 | /// Menu item 'TM' -> tc_v, tc_delta_degc, tc_degc |
whismanoid | 0:68e64068330f | 2129 | /// Trigger Measurement for Thermocouple |
whismanoid | 0:68e64068330f | 2130 | /// |
whismanoid | 0:68e64068330f | 2131 | /// Example code for typical Thermocouple measurement. |
whismanoid | 1:d57c1a2cb83c | 2132 | /// An RTD measures the "cold junction" where TC connects to the board, |
whismanoid | 1:d57c1a2cb83c | 2133 | /// and the TC measures the temperature difference above the cold junction. |
whismanoid | 0:68e64068330f | 2134 | /// |
whismanoid | 1:d57c1a2cb83c | 2135 | /// @param[in] tc_ainp = channel of Thermocouple high side, default=AINP_SEL_0101_AIN5 |
whismanoid | 1:d57c1a2cb83c | 2136 | /// @param[in] tc_ainn = channel of Thermocouple low side, default=AINN_SEL_0110_AIN6 |
whismanoid | 1:d57c1a2cb83c | 2137 | /// @param[in] rtd_iout = channel RTD high side force, default=AINP_SEL_0111_AIN7 |
whismanoid | 1:d57c1a2cb83c | 2138 | /// @param[in] rtd_ainp = channel RTD high side sense, default=AINP_SEL_1000_AIN8 |
whismanoid | 1:d57c1a2cb83c | 2139 | /// @param[in] rtd_ainn = channel RTD low side, default=AINN_SEL_1001_AIN9 |
whismanoid | 1:d57c1a2cb83c | 2140 | /// @post AINcode[tc_ainp]: measurement result LSB code |
whismanoid | 22:c6812214a933 | 2141 | /// @post tc_v: raw thermocouple voltage in Volts |
whismanoid | 22:c6812214a933 | 2142 | /// @post tc_delta_degc: temperature in degC above cold junction |
whismanoid | 22:c6812214a933 | 2143 | /// @post tc_degc: temperature in degC |
whismanoid | 0:68e64068330f | 2144 | /// |
whismanoid | 0:68e64068330f | 2145 | /// @return 1 on success; 0 on failure |
whismanoid | 1:d57c1a2cb83c | 2146 | double Measure_Thermocouple(MAX11410_AINP_SEL_enum_t tc_ainp, MAX11410_AINN_SEL_enum_t tc_ainn, MAX11410_AINP_SEL_enum_t rtd_iout, MAX11410_AINP_SEL_enum_t rtd_ainp, MAX11410_AINN_SEL_enum_t rtd_ainn); |
whismanoid | 0:68e64068330f | 2147 | |
whismanoid | 3:658a93dfb2d8 | 2148 | //---------------------------------------- |
whismanoid | 3:658a93dfb2d8 | 2149 | /// Return the physical temperature corresponding to measured voltage |
whismanoid | 3:658a93dfb2d8 | 2150 | /// of a type K Thermocouple (TC). |
whismanoid | 3:658a93dfb2d8 | 2151 | /// |
whismanoid | 22:c6812214a933 | 2152 | /// @pre {0}.rtd_degc = cold junction temperature, in degrees C |
whismanoid | 22:c6812214a933 | 2153 | /// @param[in] tc_v = Thermocouple voltage in volts, default=0.0254 |
whismanoid | 3:658a93dfb2d8 | 2154 | /// |
whismanoid | 3:658a93dfb2d8 | 2155 | /// @return ideal temperature in degrees C, calculated from RTD resistance in ohms |
whismanoid | 21:847b2220e96e | 2156 | /// @test group TC_1 // Verify Thermocouple function TemperatureOfTC_TypeK |
whismanoid | 21:847b2220e96e | 2157 | /// @test group TC_2 // Verify Thermocouple function TemperatureOfTC_TypeK in more detail |
whismanoid | 21:847b2220e96e | 2158 | /// @test group TC_1 tinyTester.blink_time_msec = 20 // quickly speed through the software verification |
whismanoid | 19:50cf5da53d36 | 2159 | /// @test group TC_1 TemperatureOfTC_TypeK(0.000e-3) expect 0.0 within 0.1 // TC_TypeK at 0C = 0.000mV |
whismanoid | 19:50cf5da53d36 | 2160 | /// @test group TC_1 TemperatureOfTC_TypeK(0.039e-3) expect 1.0 within 0.1 // TC_TypeK at 1C = 0.039mV |
whismanoid | 19:50cf5da53d36 | 2161 | /// @test group TC_1 TemperatureOfTC_TypeK(0.079e-3) expect 2.0 within 0.1 // TC_TypeK at 2C = 0.079mV |
whismanoid | 19:50cf5da53d36 | 2162 | /// @test group TC_1 TemperatureOfTC_TypeK(0.119e-3) expect 3.0 within 0.1 // TC_TypeK at 3C = 0.119mV |
whismanoid | 19:50cf5da53d36 | 2163 | /// @test group TC_2 TemperatureOfTC_TypeK(0.158e-3) expect 4.0 within 0.1 // TC_TypeK at 4C = 0.158mV |
whismanoid | 19:50cf5da53d36 | 2164 | /// @test group TC_2 TemperatureOfTC_TypeK(0.198e-3) expect 5.0 within 0.1 // TC_TypeK at 5C = 0.198mV |
whismanoid | 19:50cf5da53d36 | 2165 | /// @test group TC_2 TemperatureOfTC_TypeK(0.238e-3) expect 6.0 within 0.1 // TC_TypeK at 6C = 0.238mV |
whismanoid | 19:50cf5da53d36 | 2166 | /// @test group TC_2 TemperatureOfTC_TypeK(0.2775e-3) expect 7.0 within 0.1 // TC_TypeK at 7C = 0.2775mV |
whismanoid | 19:50cf5da53d36 | 2167 | /// @test group TC_2 TemperatureOfTC_TypeK(0.317e-3) expect 8.0 within 0.1 // TC_TypeK at 8C = 0.317mV |
whismanoid | 19:50cf5da53d36 | 2168 | /// @test group TC_2 TemperatureOfTC_TypeK(0.357e-3) expect 9.0 within 0.1 // TC_TypeK at 9C = 0.357mV |
whismanoid | 19:50cf5da53d36 | 2169 | /// @test group TC_1 TemperatureOfTC_TypeK(0.397e-3) expect 10.0 within 0.1 // TC_TypeK at 10C = 0.397mV |
whismanoid | 19:50cf5da53d36 | 2170 | /// @test group TC_1 TemperatureOfTC_TypeK(0.798e-3) expect 20.0 within 0.1 // TC_TypeK at 20C = 0.798mV |
whismanoid | 19:50cf5da53d36 | 2171 | /// @test group TC_1 TemperatureOfTC_TypeK(1.081e-3) expect 27.0 within 0.1 // TC_TypeK at 27C = 1.081mV |
whismanoid | 19:50cf5da53d36 | 2172 | /// @test group TC_1 TemperatureOfTC_TypeK(1.203e-3) expect 30.0 within 0.1 // TC_TypeK at 30C = 1.203mV |
whismanoid | 19:50cf5da53d36 | 2173 | /// @test group TC_1 TemperatureOfTC_TypeK(1.612e-3) expect 40.0 within 0.1 // TC_TypeK at 40C = 1.612mV |
whismanoid | 19:50cf5da53d36 | 2174 | /// @test group TC_1 TemperatureOfTC_TypeK(2.023e-3) expect 50.0 within 0.1 // TC_TypeK at 50C = 2.023mV |
whismanoid | 19:50cf5da53d36 | 2175 | /// @test group TC_1 TemperatureOfTC_TypeK(2.436e-3) expect 60.0 within 0.1 // TC_TypeK at 60C = 2.436mV |
whismanoid | 19:50cf5da53d36 | 2176 | /// @test group TC_1 TemperatureOfTC_TypeK(2.851e-3) expect 70.0 within 0.1 // TC_TypeK at 70C = 2.851mV |
whismanoid | 19:50cf5da53d36 | 2177 | /// @test group TC_1 TemperatureOfTC_TypeK(3.267e-3) expect 80.0 within 0.1 // TC_TypeK at 80C = 3.267mV |
whismanoid | 19:50cf5da53d36 | 2178 | /// @test group TC_1 TemperatureOfTC_TypeK(3.682e-3) expect 90.0 within 0.1 // TC_TypeK at 90C = 3.682mV |
whismanoid | 19:50cf5da53d36 | 2179 | /// @test group TC_1 TemperatureOfTC_TypeK(4.096e-3) expect 100.0 within 0.1 // TC_TypeK at 100C = 4.096mV |
whismanoid | 19:50cf5da53d36 | 2180 | /// @test group TC_2 TemperatureOfTC_TypeK(4.509e-3) expect 110.0 within 0.1 // TC_TypeK at 110C = 4.509mV |
whismanoid | 19:50cf5da53d36 | 2181 | /// @test group TC_2 TemperatureOfTC_TypeK(4.920e-3) expect 120.0 within 0.1 // TC_TypeK at 120C = 4.920mV |
whismanoid | 19:50cf5da53d36 | 2182 | /// @test group TC_2 TemperatureOfTC_TypeK(5.328e-3) expect 130.0 within 0.1 // TC_TypeK at 130C = 5.328mV |
whismanoid | 19:50cf5da53d36 | 2183 | /// @test group TC_2 TemperatureOfTC_TypeK(5.735e-3) expect 140.0 within 0.1 // TC_TypeK at 140C = 5.735mV |
whismanoid | 19:50cf5da53d36 | 2184 | /// @test group TC_2 TemperatureOfTC_TypeK(6.138e-3) expect 150.0 within 0.1 // TC_TypeK at 150C = 6.138mV |
whismanoid | 19:50cf5da53d36 | 2185 | /// @test group TC_2 TemperatureOfTC_TypeK(6.540e-3) expect 160.0 within 0.1 // TC_TypeK at 160C = 6.540mV |
whismanoid | 19:50cf5da53d36 | 2186 | /// @test group TC_2 TemperatureOfTC_TypeK(6.941e-3) expect 170.0 within 0.1 // TC_TypeK at 170C = 6.941mV |
whismanoid | 19:50cf5da53d36 | 2187 | /// @test group TC_2 TemperatureOfTC_TypeK(7.340e-3) expect 180.0 within 0.1 // TC_TypeK at 180C = 7.340mV |
whismanoid | 19:50cf5da53d36 | 2188 | /// @test group TC_1 TemperatureOfTC_TypeK(7.739e-3) expect 190.0 within 0.1 // TC_TypeK at 190C = 7.739mV |
whismanoid | 19:50cf5da53d36 | 2189 | /// @test group TC_1 TemperatureOfTC_TypeK(8.138e-3) expect 200.0 within 0.1 // TC_TypeK at 200C = 8.138mV |
whismanoid | 19:50cf5da53d36 | 2190 | /// @test group TC_1 TemperatureOfTC_TypeK(8.539e-3) expect 210.0 within 0.1 // TC_TypeK at 210C = 8.539mV |
whismanoid | 19:50cf5da53d36 | 2191 | /// @test group TC_1 TemperatureOfTC_TypeK(8.940e-3) expect 220.0 within 0.1 // TC_TypeK at 220C = 8.940mV |
whismanoid | 19:50cf5da53d36 | 2192 | /// @test group TC_2 TemperatureOfTC_TypeK(9.343e-3) expect 230.0 within 0.1 // TC_TypeK at 230C = 9.343mV |
whismanoid | 19:50cf5da53d36 | 2193 | /// @test group TC_2 TemperatureOfTC_TypeK(9.747e-3) expect 240.0 within 0.1 // TC_TypeK at 240C = 9.747mV |
whismanoid | 19:50cf5da53d36 | 2194 | /// @test group TC_2 TemperatureOfTC_TypeK(10.153e-3) expect 250.0 within 0.1 // TC_TypeK at 250C = 10.153mV |
whismanoid | 19:50cf5da53d36 | 2195 | /// @test group TC_2 TemperatureOfTC_TypeK(10.561e-3) expect 260.0 within 0.1 // TC_TypeK at 260C = 10.561mV |
whismanoid | 19:50cf5da53d36 | 2196 | /// @test group TC_2 TemperatureOfTC_TypeK(10.971e-3) expect 270.0 within 0.1 // TC_TypeK at 270C = 10.971mV |
whismanoid | 19:50cf5da53d36 | 2197 | /// @test group TC_2 TemperatureOfTC_TypeK(11.382e-3) expect 280.0 within 0.1 // TC_TypeK at 280C = 11.382mV |
whismanoid | 19:50cf5da53d36 | 2198 | /// @test group TC_2 TemperatureOfTC_TypeK(11.795e-3) expect 290.0 within 0.1 // TC_TypeK at 290C = 11.795mV |
whismanoid | 19:50cf5da53d36 | 2199 | /// @test group TC_1 TemperatureOfTC_TypeK(12.209e-3) expect 300.0 within 0.1 // TC_TypeK at 300C = 12.209mV |
whismanoid | 19:50cf5da53d36 | 2200 | /// @test group TC_2 TemperatureOfTC_TypeK(14.293e-3) expect 350.0 within 0.1 // TC_TypeK at 350C = 14.293mV |
whismanoid | 19:50cf5da53d36 | 2201 | /// @test group TC_1 TemperatureOfTC_TypeK(16.397e-3) expect 400.0 within 0.1 // TC_TypeK at 400C = 16.397mV |
whismanoid | 19:50cf5da53d36 | 2202 | /// @test group TC_1 TemperatureOfTC_TypeK(18.516e-3) expect 450.0 within 0.1 // TC_TypeK at 450C = 18.516mV |
whismanoid | 19:50cf5da53d36 | 2203 | /// @test group TC_1 TemperatureOfTC_TypeK(20.218e-3) expect 490.0 // TC_TypeK at 490C = 20.218mV |
whismanoid | 21:847b2220e96e | 2204 | /// @test group TC_1 tinyTester.blink_time_msec = 75 // default 75 resume hardware self test |
whismanoid | 3:658a93dfb2d8 | 2205 | /// |
whismanoid | 22:c6812214a933 | 2206 | double TemperatureOfTC_TypeK(double tc_v); |
whismanoid | 3:658a93dfb2d8 | 2207 | |
whismanoid | 4:c169ba85d673 | 2208 | //---------------------------------------- |
whismanoid | 4:c169ba85d673 | 2209 | /// Calculate temperature in degrees C from input voltage, |
whismanoid | 4:c169ba85d673 | 2210 | /// using a given set of polynomial coefficients. |
whismanoid | 4:c169ba85d673 | 2211 | /// For example: |
whismanoid | 4:c169ba85d673 | 2212 | /// |
whismanoid | 4:c169ba85d673 | 2213 | /// t = coefficients[0] + coefficients[1] * DMMavg + coefficients[2] * DmMMavg**2 |
whismanoid | 4:c169ba85d673 | 2214 | /// |
whismanoid | 4:c169ba85d673 | 2215 | /// @param[in] thermocouple_voltage_uV = Thermocouple voltage in microvolts |
whismanoid | 4:c169ba85d673 | 2216 | /// |
whismanoid | 4:c169ba85d673 | 2217 | /// @return ideal temperature in degrees C, calculated from polynomial coefficients |
whismanoid | 4:c169ba85d673 | 2218 | /// |
whismanoid | 4:c169ba85d673 | 2219 | double temperatureDegC_polynomial(double thermocouple_voltage_uV, int num_coefficients, double coefficients[]); |
whismanoid | 4:c169ba85d673 | 2220 | |
whismanoid | 0:68e64068330f | 2221 | }; // end of class MAX11410 |
whismanoid | 0:68e64068330f | 2222 | |
whismanoid | 0:68e64068330f | 2223 | #endif // __MAX11410_H__ |
whismanoid | 0:68e64068330f | 2224 | |
whismanoid | 0:68e64068330f | 2225 | // End of file |