Maxim Integrated / MAX11410

Dependents:   MAX11410BOB_24bit_ADC MAX11410BOB_Serial_Tester

Committer:
whismanoid
Date:
Fri Jan 31 00:15:25 2020 +0000
Revision:
9:06ca88952f1c
Parent:
8:3a9dfa2e8234
Child:
10:7adee48a7f82
init pgaGain=1, test part_id, test status, drop unused configure_ functions

Who changed what in which revision?

UserRevisionLine numberNew 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 0:68e64068330f 97 // - remove max32630fthr library (if present)
whismanoid 0:68e64068330f 98 // - remove MAX32620FTHR library (if present)
whismanoid 0:68e64068330f 99 // - not tested yet
whismanoid 0:68e64068330f 100 //
whismanoid 0:68e64068330f 101 // end Platform_Include_Boilerplate
whismanoid 0:68e64068330f 102
whismanoid 0:68e64068330f 103 // CODE GENERATOR: conditional defines
whismanoid 0:68e64068330f 104 // CODE GENERATOR: class declaration and docstrings
whismanoid 0:68e64068330f 105 /**
whismanoid 0:68e64068330f 106 * @brief MAX11410 1.9ksps, Low-Power, Serial SPI 24-Bit, 10-Channel, Differential/Single-Ended Input, SAR ADC
whismanoid 0:68e64068330f 107 *
whismanoid 0:68e64068330f 108 *
whismanoid 0:68e64068330f 109 *
whismanoid 0:68e64068330f 110 * Datasheet: https://www.maximintegrated.com/MAX11410
whismanoid 0:68e64068330f 111 *
whismanoid 0:68e64068330f 112 *
whismanoid 0:68e64068330f 113 *
whismanoid 0:68e64068330f 114 * //---------- CODE GENERATOR: helloCppCodeList
whismanoid 0:68e64068330f 115 * @code
whismanoid 0:68e64068330f 116 * // CODE GENERATOR: example code includes
whismanoid 0:68e64068330f 117 *
whismanoid 0:68e64068330f 118 * // example code includes
whismanoid 0:68e64068330f 119 * // standard include for target platform -- Platform_Include_Boilerplate
whismanoid 0:68e64068330f 120 * #include "mbed.h"
whismanoid 0:68e64068330f 121 * // Platforms:
whismanoid 0:68e64068330f 122 * // - MAX32625MBED
whismanoid 0:68e64068330f 123 * // - supports mbed-os-5.11, requires USBDevice library
whismanoid 0:68e64068330f 124 * // - add https://developer.mbed.org/teams/MaximIntegrated/code/USBDevice/
whismanoid 0:68e64068330f 125 * // - remove max32630fthr library (if present)
whismanoid 0:68e64068330f 126 * // - remove MAX32620FTHR library (if present)
whismanoid 0:68e64068330f 127 * // - MAX32600MBED
whismanoid 0:68e64068330f 128 * // - remove max32630fthr library (if present)
whismanoid 0:68e64068330f 129 * // - remove MAX32620FTHR library (if present)
whismanoid 0:68e64068330f 130 * // - Windows 10 note: Don't connect HDK until you are ready to load new firmware into the board.
whismanoid 0:68e64068330f 131 * // - NUCLEO_F446RE
whismanoid 0:68e64068330f 132 * // - remove USBDevice library
whismanoid 0:68e64068330f 133 * // - remove max32630fthr library (if present)
whismanoid 0:68e64068330f 134 * // - remove MAX32620FTHR library (if present)
whismanoid 0:68e64068330f 135 * // - NUCLEO_F401RE
whismanoid 0:68e64068330f 136 * // - remove USBDevice library
whismanoid 0:68e64068330f 137 * // - remove max32630fthr library (if present)
whismanoid 0:68e64068330f 138 * // - remove MAX32620FTHR library (if present)
whismanoid 0:68e64068330f 139 * // - MAX32630FTHR
whismanoid 0:68e64068330f 140 * // - #include "max32630fthr.h"
whismanoid 0:68e64068330f 141 * // - add http://os.mbed.org/teams/MaximIntegrated/code/max32630fthr/
whismanoid 0:68e64068330f 142 * // - remove MAX32620FTHR library (if present)
whismanoid 0:68e64068330f 143 * // - MAX32620FTHR
whismanoid 0:68e64068330f 144 * // - #include "MAX32620FTHR.h"
whismanoid 0:68e64068330f 145 * // - remove max32630fthr library (if present)
whismanoid 0:68e64068330f 146 * // - add https://os.mbed.com/teams/MaximIntegrated/code/MAX32620FTHR/
whismanoid 0:68e64068330f 147 * // - not tested yet
whismanoid 0:68e64068330f 148 * // - MAX32625PICO
whismanoid 0:68e64068330f 149 * // - remove max32630fthr library (if present)
whismanoid 0:68e64068330f 150 * // - remove MAX32620FTHR library (if present)
whismanoid 0:68e64068330f 151 * // - not tested yet
whismanoid 0:68e64068330f 152 * //
whismanoid 0:68e64068330f 153 * // end Platform_Include_Boilerplate
whismanoid 0:68e64068330f 154 * #include "MAX11410.h"
whismanoid 0:68e64068330f 155 *
whismanoid 0:68e64068330f 156 * // example code board support
whismanoid 0:68e64068330f 157 * //MAX32630FTHR pegasus(MAX32630FTHR::VIO_3V3);
whismanoid 0:68e64068330f 158 * //DigitalOut rLED(LED1);
whismanoid 0:68e64068330f 159 * //DigitalOut gLED(LED2);
whismanoid 0:68e64068330f 160 * //DigitalOut bLED(LED3);
whismanoid 0:68e64068330f 161 * //
whismanoid 0:68e64068330f 162 * // Arduino "shield" connector port definitions (MAX32625MBED shown)
whismanoid 0:68e64068330f 163 * #if defined(TARGET_MAX32625MBED)
whismanoid 0:68e64068330f 164 * #define A0 AIN_0
whismanoid 0:68e64068330f 165 * #define A1 AIN_1
whismanoid 0:68e64068330f 166 * #define A2 AIN_2
whismanoid 0:68e64068330f 167 * #define A3 AIN_3
whismanoid 0:68e64068330f 168 * #define D0 P0_0
whismanoid 0:68e64068330f 169 * #define D1 P0_1
whismanoid 0:68e64068330f 170 * #define D2 P0_2
whismanoid 0:68e64068330f 171 * #define D3 P0_3
whismanoid 0:68e64068330f 172 * #define D4 P0_4
whismanoid 0:68e64068330f 173 * #define D5 P0_5
whismanoid 0:68e64068330f 174 * #define D6 P0_6
whismanoid 0:68e64068330f 175 * #define D7 P0_7
whismanoid 0:68e64068330f 176 * #define D8 P1_4
whismanoid 0:68e64068330f 177 * #define D9 P1_5
whismanoid 0:68e64068330f 178 * #define D10 P1_3
whismanoid 0:68e64068330f 179 * #define D11 P1_1
whismanoid 0:68e64068330f 180 * #define D12 P1_2
whismanoid 0:68e64068330f 181 * #define D13 P1_0
whismanoid 0:68e64068330f 182 * #endif
whismanoid 0:68e64068330f 183 *
whismanoid 0:68e64068330f 184 * // example code declare SPI interface
whismanoid 0:68e64068330f 185 * #if defined(TARGET_MAX32625MBED)
whismanoid 0:68e64068330f 186 * 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 187 * DigitalOut spi_cs(SPI1_SS); // TARGET_MAX32625MBED: P1_3 Arduino 10-pin header D10
whismanoid 0:68e64068330f 188 * #elif defined(TARGET_MAX32600MBED)
whismanoid 0:68e64068330f 189 * SPI spi(SPI2_MOSI, SPI2_MISO, SPI2_SCK); // mosi, miso, sclk spi1 TARGET_MAX32600MBED: Arduino 10-pin header D11 D12 D13
whismanoid 0:68e64068330f 190 * DigitalOut spi_cs(SPI2_SS); // Generic: Arduino 10-pin header D10
whismanoid 0:68e64068330f 191 * #else
whismanoid 0:68e64068330f 192 * SPI spi(D11, D12, D13); // mosi, miso, sclk spi1 TARGET_MAX32600MBED: Arduino 10-pin header D11 D12 D13
whismanoid 0:68e64068330f 193 * DigitalOut spi_cs(D10); // Generic: Arduino 10-pin header D10
whismanoid 0:68e64068330f 194 * #endif
whismanoid 0:68e64068330f 195 *
whismanoid 0:68e64068330f 196 * // example code declare GPIO interface pins
whismanoid 0:68e64068330f 197 * // example code declare device instance
whismanoid 0:68e64068330f 198 * MAX11410 g_MAX11410_device(spi, spi_cs, MAX11410::MAX11410_IC);
whismanoid 0:68e64068330f 199 *
whismanoid 0:68e64068330f 200 * // CODE GENERATOR: example code for ADC: serial port declaration
whismanoid 0:68e64068330f 201 * //--------------------------------------------------
whismanoid 0:68e64068330f 202 * // Declare the Serial driver
whismanoid 0:68e64068330f 203 * // default baud rate settings are 9600 8N1
whismanoid 0:68e64068330f 204 * // install device driver from http://developer.mbed.org/media/downloads/drivers/mbedWinSerial_16466.exe
whismanoid 0:68e64068330f 205 * // see docs https://docs.mbed.com/docs/mbed-os-handbook/en/5.5/getting_started/what_need/
whismanoid 0:68e64068330f 206 * #if defined(TARGET_MAX32630)
whismanoid 0:68e64068330f 207 * #include "USBSerial.h"
whismanoid 0:68e64068330f 208 * // Hardware serial port over DAPLink
whismanoid 0:68e64068330f 209 * // The default baud rate for the DapLink UART is 9600
whismanoid 0:68e64068330f 210 * //Serial DAPLINKserial(P2_1, P2_0); // tx, rx
whismanoid 0:68e64068330f 211 * // #define HAS_DAPLINK_SERIAL 1
whismanoid 0:68e64068330f 212 * // Virtual serial port over USB
whismanoid 0:68e64068330f 213 * // The baud rate does not affect the virtual USBSerial UART.
whismanoid 0:68e64068330f 214 * USBSerial serial;
whismanoid 0:68e64068330f 215 * //--------------------------------------------------
whismanoid 0:68e64068330f 216 * #elif defined(TARGET_MAX32625MBED)
whismanoid 0:68e64068330f 217 * #include "USBSerial.h"
whismanoid 0:68e64068330f 218 * // Hardware serial port over DAPLink
whismanoid 0:68e64068330f 219 * // The default baud rate for the DapLink UART is 9600
whismanoid 0:68e64068330f 220 * //Serial DAPLINKserial(P2_1, P2_0); // tx, rx
whismanoid 0:68e64068330f 221 * // #define HAS_DAPLINK_SERIAL 1
whismanoid 0:68e64068330f 222 * // Virtual serial port over USB
whismanoid 0:68e64068330f 223 * // The baud rate does not affect the virtual USBSerial UART.
whismanoid 0:68e64068330f 224 * USBSerial serial;
whismanoid 0:68e64068330f 225 * //--------------------------------------------------
whismanoid 0:68e64068330f 226 * #elif defined(TARGET_MAX32600)
whismanoid 0:68e64068330f 227 * #include "USBSerial.h"
whismanoid 0:68e64068330f 228 * // Hardware serial port over DAPLink
whismanoid 0:68e64068330f 229 * // The default baud rate for the DapLink UART is 9600
whismanoid 0:68e64068330f 230 * Serial DAPLINKserial(P1_1, P1_0); // tx, rx
whismanoid 0:68e64068330f 231 * #define HAS_DAPLINK_SERIAL 1
whismanoid 0:68e64068330f 232 * // Virtual serial port over USB
whismanoid 0:68e64068330f 233 * // The baud rate does not affect the virtual USBSerial UART.
whismanoid 0:68e64068330f 234 * USBSerial serial;
whismanoid 0:68e64068330f 235 * //--------------------------------------------------
whismanoid 0:68e64068330f 236 * #elif defined(TARGET_NUCLEO_F446RE) || defined(TARGET_NUCLEO_F401RE)
whismanoid 0:68e64068330f 237 * Serial serial(SERIAL_TX, SERIAL_RX); // tx, rx
whismanoid 0:68e64068330f 238 * //--------------------------------------------------
whismanoid 0:68e64068330f 239 * #else
whismanoid 0:68e64068330f 240 * #if defined(SERIAL_TX)
whismanoid 0:68e64068330f 241 * #warning "target not previously tested; guess serial pins are SERIAL_TX, SERIAL_RX..."
whismanoid 0:68e64068330f 242 * Serial serial(SERIAL_TX, SERIAL_RX); // tx, rx
whismanoid 0:68e64068330f 243 * #elif defined(USBTX)
whismanoid 0:68e64068330f 244 * #warning "target not previously tested; guess serial pins are USBTX, USBRX..."
whismanoid 0:68e64068330f 245 * Serial serial(USBTX, USBRX); // tx, rx
whismanoid 0:68e64068330f 246 * #elif defined(UART_TX)
whismanoid 0:68e64068330f 247 * #warning "target not previously tested; guess serial pins are UART_TX, UART_RX..."
whismanoid 0:68e64068330f 248 * Serial serial(UART_TX, UART_RX); // tx, rx
whismanoid 0:68e64068330f 249 * #else
whismanoid 0:68e64068330f 250 * #warning "target not previously tested; need to define serial pins..."
whismanoid 0:68e64068330f 251 * #endif
whismanoid 0:68e64068330f 252 * #endif
whismanoid 0:68e64068330f 253 * //
whismanoid 0:68e64068330f 254 * #include "CmdLine.h"
whismanoid 0:68e64068330f 255 * CmdLine cmdLine(serial, "serial");
whismanoid 0:68e64068330f 256 *
whismanoid 0:68e64068330f 257 * // example code main function
whismanoid 0:68e64068330f 258 * int main()
whismanoid 0:68e64068330f 259 * {
whismanoid 0:68e64068330f 260 * // CODE GENERATOR: example code: member function Init
whismanoid 0:68e64068330f 261 * g_MAX11410_device.Init();
whismanoid 0:68e64068330f 262 *
whismanoid 0:68e64068330f 263 * while (1)
whismanoid 0:68e64068330f 264 * {
whismanoid 0:68e64068330f 265 * // CODE GENERATOR: example code: has no member function REF
whismanoid 0:68e64068330f 266 * // CODE GENERATOR: example code for ADC: repeat-forever convert and print conversion result, one record per line
whismanoid 0:68e64068330f 267 * // CODE GENERATOR: ResolutionBits = 24
whismanoid 0:68e64068330f 268 * // CODE GENERATOR: FScode = None
whismanoid 0:68e64068330f 269 * // CODE GENERATOR: NumChannels = 10
whismanoid 0:68e64068330f 270 * while(1) { // this code repeats forever
whismanoid 0:68e64068330f 271 * // this code repeats forever
whismanoid 0:68e64068330f 272 * // CODE GENERATOR: example code: has no member function ScanStandardExternalClock
whismanoid 0:68e64068330f 273 * // CODE GENERATOR: example code: has no member function ReadAINcode
whismanoid 1:d57c1a2cb83c 274 * // CODE GENERATOR: example code: member function Read_All_Voltages
whismanoid 0:68e64068330f 275 * // Measure ADC channels in sequence from AIN0 to channelNumber_0_9.
whismanoid 0:68e64068330f 276 * // @param[in] g_MAX11410_device.channelNumber_0_15: AIN Channel Number
whismanoid 0:68e64068330f 277 * // @param[in] g_MAX11410_device.PowerManagement_0_2: 0=Normal, 1=AutoShutdown, 2=AutoStandby
whismanoid 0:68e64068330f 278 * // @param[in] g_MAX11410_device.chan_id_0_1: ADC_MODE_CONTROL.CHAN_ID
whismanoid 0:68e64068330f 279 * int channelId_0_9 = 9;
whismanoid 0:68e64068330f 280 * //g_MAX11410_device.channelNumber_0_15 = channelId_0_9;
whismanoid 0:68e64068330f 281 * //g_MAX11410_device.PowerManagement_0_2 = 0;
whismanoid 0:68e64068330f 282 * //g_MAX11410_device.chan_id_0_1 = 1;
whismanoid 6:2d39fd70692c 283 * g_MAX11410_device.Read_All_Voltages();
whismanoid 0:68e64068330f 284 *
whismanoid 0:68e64068330f 285 * // wait(3.0);
whismanoid 0:68e64068330f 286 * // CODE GENERATOR: print conversion result
whismanoid 0:68e64068330f 287 * // Use Arduino Serial Plotter to view output: Tools | Serial Plotter
whismanoid 0:68e64068330f 288 * cmdLine.serial().printf("%d", g_MAX11410_device.AINcode[0]);
whismanoid 0:68e64068330f 289 * for (int index = 1; index <= channelId_0_9; index++) {
whismanoid 0:68e64068330f 290 * cmdLine.serial().printf(",%d", g_MAX11410_device.AINcode[index]);
whismanoid 0:68e64068330f 291 * }
whismanoid 0:68e64068330f 292 * cmdLine.serial().printf("\r\n");
whismanoid 0:68e64068330f 293 *
whismanoid 0:68e64068330f 294 * } // this code repeats forever
whismanoid 0:68e64068330f 295 * }
whismanoid 0:68e64068330f 296 * }
whismanoid 0:68e64068330f 297 * @endcode
whismanoid 0:68e64068330f 298 * //---------- CODE GENERATOR: end helloCppCodeList
whismanoid 0:68e64068330f 299 */
whismanoid 0:68e64068330f 300 class MAX11410 {
whismanoid 0:68e64068330f 301 public:
whismanoid 0:68e64068330f 302 // CODE GENERATOR: TypedefEnum EnumItem declarations
whismanoid 0:68e64068330f 303 // CODE GENERATOR: TypedefEnum MAX11410_CMD_enum_t
whismanoid 0:68e64068330f 304 //----------------------------------------
whismanoid 0:68e64068330f 305 /// Register Addresses
whismanoid 0:68e64068330f 306 ///
whismanoid 0:68e64068330f 307 /// Naming convention is CMD_bitstream_FUNCTION_NAME
whismanoid 0:68e64068330f 308 /// - r = read/write bit (1=read, 0=write)
whismanoid 0:68e64068330f 309 /// - xaaa_aaaa = 7-bit register address field
whismanoid 0:68e64068330f 310 /// - dddd_dddd = 8-bit register data field
whismanoid 0:68e64068330f 311 /// - dddd_dddd_dddd_dddd = 16-bit register data field
whismanoid 0:68e64068330f 312 /// - dddd_dddd_dddd_dddd_dddd_dddd = 24-bit register data field
whismanoid 0:68e64068330f 313 /// - xxxx = don't care
whismanoid 0:68e64068330f 314 typedef enum MAX11410_CMD_enum_t {
whismanoid 0:68e64068330f 315 CMD_r000_0000_xxxx_xxdd_PD = 0x00, //!< 8'b00000000
whismanoid 0:68e64068330f 316 CMD_r000_0001_xddd_xxdd_CONV_START = 0x01, //!< 8'b00000001
whismanoid 0:68e64068330f 317 CMD_r000_0010_xddd_dddd_SEQ_START = 0x02, //!< 8'b00000010
whismanoid 0:68e64068330f 318 CMD_r000_0011_xxxx_xddd_CAL_START = 0x03, //!< 8'b00000011
whismanoid 0:68e64068330f 319 CMD_r000_0100_dddd_xddd_GP0_CTRL = 0x04, //!< 8'b00000100
whismanoid 0:68e64068330f 320 CMD_r000_0101_dddd_xddd_GP1_CTRL = 0x05, //!< 8'b00000101
whismanoid 0:68e64068330f 321 CMD_r000_0110_xddd_xxdd_GP_CONV = 0x06, //!< 8'b00000110
whismanoid 0:68e64068330f 322 CMD_r000_0111_xddd_dddd_GP_SEQ_ADDR = 0x07, //!< 8'b00000111
whismanoid 0:68e64068330f 323 CMD_r000_1000_x0dd_dddd_FILTER = 0x08, //!< 8'b00001000
whismanoid 0:68e64068330f 324 CMD_r000_1001_dddd_dddd_CTRL = 0x09, //!< 8'b00001001
whismanoid 0:68e64068330f 325 CMD_r000_1010_dddd_dddd_SOURCE = 0x0a, //!< 8'b00001010
whismanoid 0:68e64068330f 326 CMD_r000_1011_dddd_dddd_MUX_CTRL0 = 0x0b, //!< 8'b00001011
whismanoid 0:68e64068330f 327 CMD_r000_1100_dddd_dddd_MUX_CTRL1 = 0x0c, //!< 8'b00001100
whismanoid 0:68e64068330f 328 CMD_r000_1101_dddd_dddd_MUX_CTRL2 = 0x0d, //!< 8'b00001101
whismanoid 0:68e64068330f 329 CMD_r000_1110_xxdd_xddd_PGA = 0x0e, //!< 8'b00001110
whismanoid 0:68e64068330f 330 CMD_r000_1111_dddd_dddd_WAIT_EXT = 0x0f, //!< 8'b00001111
whismanoid 0:68e64068330f 331 CMD_r001_0000_xxxx_xxxx_WAIT_START = 0x10, //!< 8'b00010000
whismanoid 0:68e64068330f 332 CMD_r001_0001_xxxx_xxxx_xxxx_xxxx_xxxx_xddd_PART_ID = 0x11, //!< 8'b00010001
whismanoid 0:68e64068330f 333 CMD_r001_0010_xxxx_xxxx_dddd_xxdd_dddd_dddd_SYSC_SEL = 0x12, //!< 8'b00010010
whismanoid 0:68e64068330f 334 CMD_r001_0011_dddd_dddd_dddd_dddd_dddd_dddd_SYS_OFF_A = 0x13, //!< 8'b00010011
whismanoid 0:68e64068330f 335 CMD_r001_0100_dddd_dddd_dddd_dddd_dddd_dddd_SYS_OFF_B = 0x14, //!< 8'b00010100
whismanoid 0:68e64068330f 336 CMD_r001_0101_dddd_dddd_dddd_dddd_dddd_dddd_SYS_GAIN_A = 0x15, //!< 8'b00010101
whismanoid 0:68e64068330f 337 CMD_r001_0110_dddd_dddd_dddd_dddd_dddd_dddd_SYS_GAIN_B = 0x16, //!< 8'b00010110
whismanoid 0:68e64068330f 338 CMD_r001_0111_dddd_dddd_dddd_dddd_dddd_dddd_SELF_OFF = 0x17, //!< 8'b00010111
whismanoid 0:68e64068330f 339 CMD_r001_1000_dddd_dddd_dddd_dddd_dddd_dddd_SELF_GAIN_1 = 0x18, //!< 8'b00011000
whismanoid 0:68e64068330f 340 CMD_r001_1001_dddd_dddd_dddd_dddd_dddd_dddd_SELF_GAIN_2 = 0x19, //!< 8'b00011001
whismanoid 0:68e64068330f 341 CMD_r001_1010_dddd_dddd_dddd_dddd_dddd_dddd_SELF_GAIN_4 = 0x1a, //!< 8'b00011010
whismanoid 0:68e64068330f 342 CMD_r001_1011_dddd_dddd_dddd_dddd_dddd_dddd_SELF_GAIN_8 = 0x1b, //!< 8'b00011011
whismanoid 0:68e64068330f 343 CMD_r001_1100_dddd_dddd_dddd_dddd_dddd_dddd_SELF_GAIN_16 = 0x1c, //!< 8'b00011100
whismanoid 0:68e64068330f 344 CMD_r001_1101_dddd_dddd_dddd_dddd_dddd_dddd_SELF_GAIN_32 = 0x1d, //!< 8'b00011101
whismanoid 0:68e64068330f 345 CMD_r001_1110_dddd_dddd_dddd_dddd_dddd_dddd_SELF_GAIN_64 = 0x1e, //!< 8'b00011110
whismanoid 0:68e64068330f 346 CMD_r001_1111_dddd_dddd_dddd_dddd_dddd_dddd_SELF_GAIN_128 = 0x1f, //!< 8'b00011111
whismanoid 0:68e64068330f 347 CMD_r010_0000_dddd_dddd_dddd_dddd_dddd_dddd_LTHRESH0 = 0x20, //!< 8'b00100000
whismanoid 0:68e64068330f 348 CMD_r010_0001_dddd_dddd_dddd_dddd_dddd_dddd_LTHRESH1 = 0x21, //!< 8'b00100001
whismanoid 0:68e64068330f 349 CMD_r010_0010_dddd_dddd_dddd_dddd_dddd_dddd_LTHRESH2 = 0x22, //!< 8'b00100010
whismanoid 0:68e64068330f 350 CMD_r010_0011_dddd_dddd_dddd_dddd_dddd_dddd_LTHRESH3 = 0x23, //!< 8'b00100011
whismanoid 0:68e64068330f 351 CMD_r010_0100_dddd_dddd_dddd_dddd_dddd_dddd_LTHRESH4 = 0x24, //!< 8'b00100100
whismanoid 0:68e64068330f 352 CMD_r010_0101_dddd_dddd_dddd_dddd_dddd_dddd_LTHRESH5 = 0x25, //!< 8'b00100101
whismanoid 0:68e64068330f 353 CMD_r010_0110_dddd_dddd_dddd_dddd_dddd_dddd_LTHRESH6 = 0x26, //!< 8'b00100110
whismanoid 0:68e64068330f 354 CMD_r010_0111_dddd_dddd_dddd_dddd_dddd_dddd_LTHRESH7 = 0x27, //!< 8'b00100111
whismanoid 0:68e64068330f 355 CMD_r010_1000_dddd_dddd_dddd_dddd_dddd_dddd_UTHRESH0 = 0x28, //!< 8'b00101000
whismanoid 0:68e64068330f 356 CMD_r010_1001_dddd_dddd_dddd_dddd_dddd_dddd_UTHRESH1 = 0x29, //!< 8'b00101001
whismanoid 0:68e64068330f 357 CMD_r010_1010_dddd_dddd_dddd_dddd_dddd_dddd_UTHRESH2 = 0x2a, //!< 8'b00101010
whismanoid 0:68e64068330f 358 CMD_r010_1011_dddd_dddd_dddd_dddd_dddd_dddd_UTHRESH3 = 0x2b, //!< 8'b00101011
whismanoid 0:68e64068330f 359 CMD_r010_1100_dddd_dddd_dddd_dddd_dddd_dddd_UTHRESH4 = 0x2c, //!< 8'b00101100
whismanoid 0:68e64068330f 360 CMD_r010_1101_dddd_dddd_dddd_dddd_dddd_dddd_UTHRESH5 = 0x2d, //!< 8'b00101101
whismanoid 0:68e64068330f 361 CMD_r010_1110_dddd_dddd_dddd_dddd_dddd_dddd_UTHRESH6 = 0x2e, //!< 8'b00101110
whismanoid 0:68e64068330f 362 CMD_r010_1111_dddd_dddd_dddd_dddd_dddd_dddd_UTHRESH7 = 0x2f, //!< 8'b00101111
whismanoid 0:68e64068330f 363 CMD_r011_0000_dddd_dddd_dddd_dddd_dddd_dddd_DATA0 = 0x30, //!< 8'b00110000
whismanoid 0:68e64068330f 364 CMD_r011_0001_dddd_dddd_dddd_dddd_dddd_dddd_DATA1 = 0x31, //!< 8'b00110001
whismanoid 0:68e64068330f 365 CMD_r011_0010_dddd_dddd_dddd_dddd_dddd_dddd_DATA2 = 0x32, //!< 8'b00110010
whismanoid 0:68e64068330f 366 CMD_r011_0011_dddd_dddd_dddd_dddd_dddd_dddd_DATA3 = 0x33, //!< 8'b00110011
whismanoid 0:68e64068330f 367 CMD_r011_0100_dddd_dddd_dddd_dddd_dddd_dddd_DATA4 = 0x34, //!< 8'b00110100
whismanoid 0:68e64068330f 368 CMD_r011_0101_dddd_dddd_dddd_dddd_dddd_dddd_DATA5 = 0x35, //!< 8'b00110101
whismanoid 0:68e64068330f 369 CMD_r011_0110_dddd_dddd_dddd_dddd_dddd_dddd_DATA6 = 0x36, //!< 8'b00110110
whismanoid 0:68e64068330f 370 CMD_r011_0111_dddd_dddd_dddd_dddd_dddd_dddd_DATA7 = 0x37, //!< 8'b00110111
whismanoid 0:68e64068330f 371 CMD_r011_1000_dddd_dddd_dddd_dddd_dxxx_dddd_STATUS = 0x38, //!< 8'b00111000
whismanoid 0:68e64068330f 372 CMD_r011_1001_dddd_dddd_dddd_dddd_dxxd_dddd_STATUS_IE = 0x39, //!< 8'b00111001
whismanoid 0:68e64068330f 373 CMD_r011_1010_xaaa_aaaa_dddd_dddd_UC_0 = 0x3a, //!< 8'b00111010
whismanoid 0:68e64068330f 374 CMD_r011_1011_xaaa_aaaa_dddd_dddd_UC_1 = 0x3b, //!< 8'b00111011
whismanoid 0:68e64068330f 375 CMD_r011_1100_xaaa_aaaa_dddd_dddd_UC_2 = 0x3c, //!< 8'b00111100
whismanoid 0:68e64068330f 376 CMD_r011_1101_xaaa_aaaa_dddd_dddd_UC_3 = 0x3d, //!< 8'b00111101
whismanoid 0:68e64068330f 377 CMD_r011_1110_xaaa_aaaa_dddd_dddd_UC_4 = 0x3e, //!< 8'b00111110
whismanoid 0:68e64068330f 378 CMD_r011_1111_xaaa_aaaa_dddd_dddd_UC_5 = 0x3f, //!< 8'b00111111
whismanoid 0:68e64068330f 379 CMD_r100_0000_xaaa_aaaa_dddd_dddd_UC_6 = 0x40, //!< 8'b01000000
whismanoid 0:68e64068330f 380 CMD_r100_0001_xaaa_aaaa_dddd_dddd_UC_7 = 0x41, //!< 8'b01000001
whismanoid 0:68e64068330f 381 CMD_r100_0010_xaaa_aaaa_dddd_dddd_UC_8 = 0x42, //!< 8'b01000010
whismanoid 0:68e64068330f 382 CMD_r100_0011_xaaa_aaaa_dddd_dddd_UC_9 = 0x43, //!< 8'b01000011
whismanoid 0:68e64068330f 383 CMD_r100_0100_xaaa_aaaa_dddd_dddd_UC_10 = 0x44, //!< 8'b01000100
whismanoid 0:68e64068330f 384 CMD_r100_0101_xaaa_aaaa_dddd_dddd_UC_11 = 0x45, //!< 8'b01000101
whismanoid 0:68e64068330f 385 CMD_r100_0110_xaaa_aaaa_dddd_dddd_UC_12 = 0x46, //!< 8'b01000110
whismanoid 0:68e64068330f 386 CMD_r100_0111_xaaa_aaaa_dddd_dddd_UC_13 = 0x47, //!< 8'b01000111
whismanoid 0:68e64068330f 387 CMD_r100_1000_xaaa_aaaa_dddd_dddd_UC_14 = 0x48, //!< 8'b01001000
whismanoid 0:68e64068330f 388 CMD_r100_1001_xaaa_aaaa_dddd_dddd_UC_15 = 0x49, //!< 8'b01001001
whismanoid 0:68e64068330f 389 CMD_r100_1010_xaaa_aaaa_dddd_dddd_UC_16 = 0x4a, //!< 8'b01001010
whismanoid 0:68e64068330f 390 CMD_r100_1011_xaaa_aaaa_dddd_dddd_UC_17 = 0x4b, //!< 8'b01001011
whismanoid 0:68e64068330f 391 CMD_r100_1100_xaaa_aaaa_dddd_dddd_UC_18 = 0x4c, //!< 8'b01001100
whismanoid 0:68e64068330f 392 CMD_r100_1101_xaaa_aaaa_dddd_dddd_UC_19 = 0x4d, //!< 8'b01001101
whismanoid 0:68e64068330f 393 CMD_r100_1110_xaaa_aaaa_dddd_dddd_UC_20 = 0x4e, //!< 8'b01001110
whismanoid 0:68e64068330f 394 CMD_r100_1111_xaaa_aaaa_dddd_dddd_UC_21 = 0x4f, //!< 8'b01001111
whismanoid 0:68e64068330f 395 CMD_r101_0000_xaaa_aaaa_dddd_dddd_UC_22 = 0x50, //!< 8'b01010000
whismanoid 0:68e64068330f 396 CMD_r101_0001_xaaa_aaaa_dddd_dddd_UC_23 = 0x51, //!< 8'b01010001
whismanoid 0:68e64068330f 397 CMD_r101_0010_xaaa_aaaa_dddd_dddd_UC_24 = 0x52, //!< 8'b01010010
whismanoid 0:68e64068330f 398 CMD_r101_0011_xaaa_aaaa_dddd_dddd_UC_25 = 0x53, //!< 8'b01010011
whismanoid 0:68e64068330f 399 CMD_r101_0100_xaaa_aaaa_dddd_dddd_UC_26 = 0x54, //!< 8'b01010100
whismanoid 0:68e64068330f 400 CMD_r101_0101_xaaa_aaaa_dddd_dddd_UC_27 = 0x55, //!< 8'b01010101
whismanoid 0:68e64068330f 401 CMD_r101_0110_xaaa_aaaa_dddd_dddd_UC_28 = 0x56, //!< 8'b01010110
whismanoid 0:68e64068330f 402 CMD_r101_0111_xaaa_aaaa_dddd_dddd_UC_29 = 0x57, //!< 8'b01010111
whismanoid 0:68e64068330f 403 CMD_r101_1000_xaaa_aaaa_dddd_dddd_UC_30 = 0x58, //!< 8'b01011000
whismanoid 0:68e64068330f 404 CMD_r101_1001_xaaa_aaaa_dddd_dddd_UC_31 = 0x59, //!< 8'b01011001
whismanoid 0:68e64068330f 405 CMD_r101_1010_xaaa_aaaa_dddd_dddd_UC_32 = 0x5a, //!< 8'b01011010
whismanoid 0:68e64068330f 406 CMD_r101_1011_xaaa_aaaa_dddd_dddd_UC_33 = 0x5b, //!< 8'b01011011
whismanoid 0:68e64068330f 407 CMD_r101_1100_xaaa_aaaa_dddd_dddd_UC_34 = 0x5c, //!< 8'b01011100
whismanoid 0:68e64068330f 408 CMD_r101_1101_xaaa_aaaa_dddd_dddd_UC_35 = 0x5d, //!< 8'b01011101
whismanoid 0:68e64068330f 409 CMD_r101_1110_xaaa_aaaa_dddd_dddd_UC_36 = 0x5e, //!< 8'b01011110
whismanoid 0:68e64068330f 410 CMD_r101_1111_xaaa_aaaa_dddd_dddd_UC_37 = 0x5f, //!< 8'b01011111
whismanoid 0:68e64068330f 411 CMD_r110_0000_xaaa_aaaa_dddd_dddd_UC_38 = 0x60, //!< 8'b01100000
whismanoid 0:68e64068330f 412 CMD_r110_0001_xaaa_aaaa_dddd_dddd_UC_39 = 0x61, //!< 8'b01100001
whismanoid 0:68e64068330f 413 CMD_r110_0010_xaaa_aaaa_dddd_dddd_UC_40 = 0x62, //!< 8'b01100010
whismanoid 0:68e64068330f 414 CMD_r110_0011_xaaa_aaaa_dddd_dddd_UC_41 = 0x63, //!< 8'b01100011
whismanoid 0:68e64068330f 415 CMD_r110_0100_xaaa_aaaa_dddd_dddd_UC_42 = 0x64, //!< 8'b01100100
whismanoid 0:68e64068330f 416 CMD_r110_0101_xaaa_aaaa_dddd_dddd_UC_43 = 0x65, //!< 8'b01100101
whismanoid 0:68e64068330f 417 CMD_r110_0110_xaaa_aaaa_dddd_dddd_UC_44 = 0x66, //!< 8'b01100110
whismanoid 0:68e64068330f 418 CMD_r110_0111_xaaa_aaaa_dddd_dddd_UC_45 = 0x67, //!< 8'b01100111
whismanoid 0:68e64068330f 419 CMD_r110_1000_xaaa_aaaa_dddd_dddd_UC_46 = 0x68, //!< 8'b01101000
whismanoid 0:68e64068330f 420 CMD_r110_1001_xaaa_aaaa_dddd_dddd_UC_47 = 0x69, //!< 8'b01101001
whismanoid 0:68e64068330f 421 CMD_r110_1010_xaaa_aaaa_dddd_dddd_UC_48 = 0x6a, //!< 8'b01101010
whismanoid 0:68e64068330f 422 CMD_r110_1011_xaaa_aaaa_dddd_dddd_UC_49 = 0x6b, //!< 8'b01101011
whismanoid 0:68e64068330f 423 CMD_r110_1100_xaaa_aaaa_dddd_dddd_UC_50 = 0x6c, //!< 8'b01101100
whismanoid 0:68e64068330f 424 CMD_r110_1101_xaaa_aaaa_dddd_dddd_UC_51 = 0x6d, //!< 8'b01101101
whismanoid 0:68e64068330f 425 CMD_r110_1110_xaaa_aaaa_dddd_dddd_UC_52 = 0x6e, //!< 8'b01101110
whismanoid 0:68e64068330f 426 CMD_r110_1111_xxxx_xxxx_xaaa_aaaa_UCADDR = 0x6f, //!< 8'b01101111
whismanoid 0:68e64068330f 427 CMD_1aaa_aaaa_REGISTER_READ = 0x80, //!< 8'b10000000
whismanoid 0:68e64068330f 428 } MAX11410_CMD_enum_t;
whismanoid 0:68e64068330f 429
whismanoid 0:68e64068330f 430 // CODE GENERATOR: TypedefEnum MAX11410_SEQ_ADDR_enum_t
whismanoid 0:68e64068330f 431 //----------------------------------------
whismanoid 0:68e64068330f 432 /// Microcode Sequencer Addresses.
whismanoid 0:68e64068330f 433 /// CMD_r000_0010_xddd_dddd_SEQ_START
whismanoid 0:68e64068330f 434 /// CMD_r000_0111_xddd_dddd_GP_SEQ_ADDR
whismanoid 0:68e64068330f 435 ///
whismanoid 0:68e64068330f 436 /// Naming convention is CMD_bitstream_FUNCTION_NAME
whismanoid 0:68e64068330f 437 /// - xaaa_aaaa = 7-bit register address field
whismanoid 0:68e64068330f 438 /// - dddd_dddd = 8-bit register data field
whismanoid 0:68e64068330f 439 /// - xxxx = don't care
whismanoid 0:68e64068330f 440 typedef enum MAX11410_SEQ_ADDR_enum_t {
whismanoid 0:68e64068330f 441 SEQ_ADDR_r011_1010_xaaa_aaaa_dddd_dddd_UC_0 = 0x3a, //!< 8'b00111010
whismanoid 0:68e64068330f 442 SEQ_ADDR_r011_1011_xaaa_aaaa_dddd_dddd_UC_1 = 0x3b, //!< 8'b00111011
whismanoid 0:68e64068330f 443 SEQ_ADDR_r011_1100_xaaa_aaaa_dddd_dddd_UC_2 = 0x3c, //!< 8'b00111100
whismanoid 0:68e64068330f 444 SEQ_ADDR_r011_1101_xaaa_aaaa_dddd_dddd_UC_3 = 0x3d, //!< 8'b00111101
whismanoid 0:68e64068330f 445 SEQ_ADDR_r011_1110_xaaa_aaaa_dddd_dddd_UC_4 = 0x3e, //!< 8'b00111110
whismanoid 0:68e64068330f 446 SEQ_ADDR_r011_1111_xaaa_aaaa_dddd_dddd_UC_5 = 0x3f, //!< 8'b00111111
whismanoid 0:68e64068330f 447 SEQ_ADDR_r100_0000_xaaa_aaaa_dddd_dddd_UC_6 = 0x40, //!< 8'b01000000
whismanoid 0:68e64068330f 448 SEQ_ADDR_r100_0001_xaaa_aaaa_dddd_dddd_UC_7 = 0x41, //!< 8'b01000001
whismanoid 0:68e64068330f 449 SEQ_ADDR_r100_0010_xaaa_aaaa_dddd_dddd_UC_8 = 0x42, //!< 8'b01000010
whismanoid 0:68e64068330f 450 SEQ_ADDR_r100_0011_xaaa_aaaa_dddd_dddd_UC_9 = 0x43, //!< 8'b01000011
whismanoid 0:68e64068330f 451 SEQ_ADDR_r100_0100_xaaa_aaaa_dddd_dddd_UC_10 = 0x44, //!< 8'b01000100
whismanoid 0:68e64068330f 452 SEQ_ADDR_r100_0101_xaaa_aaaa_dddd_dddd_UC_11 = 0x45, //!< 8'b01000101
whismanoid 0:68e64068330f 453 SEQ_ADDR_r100_0110_xaaa_aaaa_dddd_dddd_UC_12 = 0x46, //!< 8'b01000110
whismanoid 0:68e64068330f 454 SEQ_ADDR_r100_0111_xaaa_aaaa_dddd_dddd_UC_13 = 0x47, //!< 8'b01000111
whismanoid 0:68e64068330f 455 SEQ_ADDR_r100_1000_xaaa_aaaa_dddd_dddd_UC_14 = 0x48, //!< 8'b01001000
whismanoid 0:68e64068330f 456 SEQ_ADDR_r100_1001_xaaa_aaaa_dddd_dddd_UC_15 = 0x49, //!< 8'b01001001
whismanoid 0:68e64068330f 457 SEQ_ADDR_r100_1010_xaaa_aaaa_dddd_dddd_UC_16 = 0x4a, //!< 8'b01001010
whismanoid 0:68e64068330f 458 SEQ_ADDR_r100_1011_xaaa_aaaa_dddd_dddd_UC_17 = 0x4b, //!< 8'b01001011
whismanoid 0:68e64068330f 459 SEQ_ADDR_r100_1100_xaaa_aaaa_dddd_dddd_UC_18 = 0x4c, //!< 8'b01001100
whismanoid 0:68e64068330f 460 SEQ_ADDR_r100_1101_xaaa_aaaa_dddd_dddd_UC_19 = 0x4d, //!< 8'b01001101
whismanoid 0:68e64068330f 461 SEQ_ADDR_r100_1110_xaaa_aaaa_dddd_dddd_UC_20 = 0x4e, //!< 8'b01001110
whismanoid 0:68e64068330f 462 SEQ_ADDR_r100_1111_xaaa_aaaa_dddd_dddd_UC_21 = 0x4f, //!< 8'b01001111
whismanoid 0:68e64068330f 463 SEQ_ADDR_r101_0000_xaaa_aaaa_dddd_dddd_UC_22 = 0x50, //!< 8'b01010000
whismanoid 0:68e64068330f 464 SEQ_ADDR_r101_0001_xaaa_aaaa_dddd_dddd_UC_23 = 0x51, //!< 8'b01010001
whismanoid 0:68e64068330f 465 SEQ_ADDR_r101_0010_xaaa_aaaa_dddd_dddd_UC_24 = 0x52, //!< 8'b01010010
whismanoid 0:68e64068330f 466 SEQ_ADDR_r101_0011_xaaa_aaaa_dddd_dddd_UC_25 = 0x53, //!< 8'b01010011
whismanoid 0:68e64068330f 467 SEQ_ADDR_r101_0100_xaaa_aaaa_dddd_dddd_UC_26 = 0x54, //!< 8'b01010100
whismanoid 0:68e64068330f 468 SEQ_ADDR_r101_0101_xaaa_aaaa_dddd_dddd_UC_27 = 0x55, //!< 8'b01010101
whismanoid 0:68e64068330f 469 SEQ_ADDR_r101_0110_xaaa_aaaa_dddd_dddd_UC_28 = 0x56, //!< 8'b01010110
whismanoid 0:68e64068330f 470 SEQ_ADDR_r101_0111_xaaa_aaaa_dddd_dddd_UC_29 = 0x57, //!< 8'b01010111
whismanoid 0:68e64068330f 471 SEQ_ADDR_r101_1000_xaaa_aaaa_dddd_dddd_UC_30 = 0x58, //!< 8'b01011000
whismanoid 0:68e64068330f 472 SEQ_ADDR_r101_1001_xaaa_aaaa_dddd_dddd_UC_31 = 0x59, //!< 8'b01011001
whismanoid 0:68e64068330f 473 SEQ_ADDR_r101_1010_xaaa_aaaa_dddd_dddd_UC_32 = 0x5a, //!< 8'b01011010
whismanoid 0:68e64068330f 474 SEQ_ADDR_r101_1011_xaaa_aaaa_dddd_dddd_UC_33 = 0x5b, //!< 8'b01011011
whismanoid 0:68e64068330f 475 SEQ_ADDR_r101_1100_xaaa_aaaa_dddd_dddd_UC_34 = 0x5c, //!< 8'b01011100
whismanoid 0:68e64068330f 476 SEQ_ADDR_r101_1101_xaaa_aaaa_dddd_dddd_UC_35 = 0x5d, //!< 8'b01011101
whismanoid 0:68e64068330f 477 SEQ_ADDR_r101_1110_xaaa_aaaa_dddd_dddd_UC_36 = 0x5e, //!< 8'b01011110
whismanoid 0:68e64068330f 478 SEQ_ADDR_r101_1111_xaaa_aaaa_dddd_dddd_UC_37 = 0x5f, //!< 8'b01011111
whismanoid 0:68e64068330f 479 SEQ_ADDR_r110_0000_xaaa_aaaa_dddd_dddd_UC_38 = 0x60, //!< 8'b01100000
whismanoid 0:68e64068330f 480 SEQ_ADDR_r110_0001_xaaa_aaaa_dddd_dddd_UC_39 = 0x61, //!< 8'b01100001
whismanoid 0:68e64068330f 481 SEQ_ADDR_r110_0010_xaaa_aaaa_dddd_dddd_UC_40 = 0x62, //!< 8'b01100010
whismanoid 0:68e64068330f 482 SEQ_ADDR_r110_0011_xaaa_aaaa_dddd_dddd_UC_41 = 0x63, //!< 8'b01100011
whismanoid 0:68e64068330f 483 SEQ_ADDR_r110_0100_xaaa_aaaa_dddd_dddd_UC_42 = 0x64, //!< 8'b01100100
whismanoid 0:68e64068330f 484 SEQ_ADDR_r110_0101_xaaa_aaaa_dddd_dddd_UC_43 = 0x65, //!< 8'b01100101
whismanoid 0:68e64068330f 485 SEQ_ADDR_r110_0110_xaaa_aaaa_dddd_dddd_UC_44 = 0x66, //!< 8'b01100110
whismanoid 0:68e64068330f 486 SEQ_ADDR_r110_0111_xaaa_aaaa_dddd_dddd_UC_45 = 0x67, //!< 8'b01100111
whismanoid 0:68e64068330f 487 SEQ_ADDR_r110_1000_xaaa_aaaa_dddd_dddd_UC_46 = 0x68, //!< 8'b01101000
whismanoid 0:68e64068330f 488 SEQ_ADDR_r110_1001_xaaa_aaaa_dddd_dddd_UC_47 = 0x69, //!< 8'b01101001
whismanoid 0:68e64068330f 489 SEQ_ADDR_r110_1010_xaaa_aaaa_dddd_dddd_UC_48 = 0x6a, //!< 8'b01101010
whismanoid 0:68e64068330f 490 SEQ_ADDR_r110_1011_xaaa_aaaa_dddd_dddd_UC_49 = 0x6b, //!< 8'b01101011
whismanoid 0:68e64068330f 491 SEQ_ADDR_r110_1100_xaaa_aaaa_dddd_dddd_UC_50 = 0x6c, //!< 8'b01101100
whismanoid 0:68e64068330f 492 SEQ_ADDR_r110_1101_xaaa_aaaa_dddd_dddd_UC_51 = 0x6d, //!< 8'b01101101
whismanoid 0:68e64068330f 493 SEQ_ADDR_r110_1110_xaaa_aaaa_dddd_dddd_UC_52 = 0x6e, //!< 8'b01101110
whismanoid 0:68e64068330f 494 } MAX11410_SEQ_ADDR_enum_t;
whismanoid 0:68e64068330f 495
whismanoid 9:06ca88952f1c 496 // CODE GENERATOR: TypedefEnum MAX11410_STATUS_enum_t
whismanoid 9:06ca88952f1c 497 //----------------------------------------
whismanoid 9:06ca88952f1c 498 /// Status indicator bits
whismanoid 9:06ca88952f1c 499 /// CMD_r011_1000_dddd_dddd_dddd_dddd_dxxx_dddd_STATUS fields
whismanoid 9:06ca88952f1c 500 ///
whismanoid 9:06ca88952f1c 501 typedef enum MAX11410_STATUS_enum_t {
whismanoid 9:06ca88952f1c 502 STATUS_000001_CONV_RDY = 0x00000001, //!< 32'b00000000000000000000000000000001
whismanoid 9:06ca88952f1c 503 STATUS_000002_SEQ_RDY = 0x00000002, //!< 32'b00000000000000000000000000000010
whismanoid 9:06ca88952f1c 504 STATUS_000004_CAL_RDY = 0x00000004, //!< 32'b00000000000000000000000000000100
whismanoid 9:06ca88952f1c 505 STATUS_000008_WAIT_DONE = 0x00000008, //!< 32'b00000000000000000000000000001000
whismanoid 9:06ca88952f1c 506 STATUS_000010_DATA_RDY = 0x00000010, //!< 32'b00000000000000000000000000010000
whismanoid 9:06ca88952f1c 507 STATUS_000020_reserved = 0x00000020, //!< 32'b00000000000000000000000000100000
whismanoid 9:06ca88952f1c 508 STATUS_000040_reserved = 0x00000040, //!< 32'b00000000000000000000000001000000
whismanoid 9:06ca88952f1c 509 STATUS_000080_SYSGOR = 0x00000080, //!< 32'b00000000000000000000000010000000
whismanoid 9:06ca88952f1c 510 STATUS_000100_TUR_0 = 0x00000100, //!< 32'b00000000000000000000000100000000
whismanoid 9:06ca88952f1c 511 STATUS_000200_TUR_1 = 0x00000200, //!< 32'b00000000000000000000001000000000
whismanoid 9:06ca88952f1c 512 STATUS_000400_TUR_2 = 0x00000400, //!< 32'b00000000000000000000010000000000
whismanoid 9:06ca88952f1c 513 STATUS_000800_TUR_3 = 0x00000800, //!< 32'b00000000000000000000100000000000
whismanoid 9:06ca88952f1c 514 STATUS_001000_TUR_4 = 0x00001000, //!< 32'b00000000000000000001000000000000
whismanoid 9:06ca88952f1c 515 STATUS_002000_TUR_5 = 0x00002000, //!< 32'b00000000000000000010000000000000
whismanoid 9:06ca88952f1c 516 STATUS_004000_TUR_6 = 0x00004000, //!< 32'b00000000000000000100000000000000
whismanoid 9:06ca88952f1c 517 STATUS_008000_TUR_7 = 0x00008000, //!< 32'b00000000000000001000000000000000
whismanoid 9:06ca88952f1c 518 STATUS_010000_TOR_0 = 0x00010000, //!< 32'b00000000000000010000000000000000
whismanoid 9:06ca88952f1c 519 STATUS_020000_TOR_1 = 0x00020000, //!< 32'b00000000000000100000000000000000
whismanoid 9:06ca88952f1c 520 STATUS_040000_TOR_2 = 0x00040000, //!< 32'b00000000000001000000000000000000
whismanoid 9:06ca88952f1c 521 STATUS_080000_TOR_3 = 0x00080000, //!< 32'b00000000000010000000000000000000
whismanoid 9:06ca88952f1c 522 STATUS_100000_TOR_4 = 0x00100000, //!< 32'b00000000000100000000000000000000
whismanoid 9:06ca88952f1c 523 STATUS_200000_TOR_5 = 0x00200000, //!< 32'b00000000001000000000000000000000
whismanoid 9:06ca88952f1c 524 STATUS_400000_TOR_6 = 0x00400000, //!< 32'b00000000010000000000000000000000
whismanoid 9:06ca88952f1c 525 STATUS_800000_TOR_7 = 0x00800000, //!< 32'b00000000100000000000000000000000
whismanoid 9:06ca88952f1c 526 } MAX11410_STATUS_enum_t;
whismanoid 9:06ca88952f1c 527
whismanoid 0:68e64068330f 528 // CODE GENERATOR: TypedefEnum MAX11410_PD_enum_t
whismanoid 0:68e64068330f 529 //----------------------------------------
whismanoid 0:68e64068330f 530 /// Power-down state command
whismanoid 0:68e64068330f 531 /// CMD_r000_0000_xxxx_xxdd_PD PD[1:0] field
whismanoid 0:68e64068330f 532 ///
whismanoid 0:68e64068330f 533 /// - 00: Normal mode
whismanoid 0:68e64068330f 534 /// - 01: Standby mode -- Powers down all analog circuity, but not the internal voltage regulator
whismanoid 0:68e64068330f 535 /// - 10: Sleep mode -- Powers down all analog circuitry including the internal voltage regulator
whismanoid 0:68e64068330f 536 /// - 11: Reset -- all registers reset to POR state (Self Clearing to 01 Standby mode)
whismanoid 0:68e64068330f 537 typedef enum MAX11410_PD_enum_t {
whismanoid 0:68e64068330f 538 PD_00_Normal = 0x00, //!< 8'b00000000
whismanoid 0:68e64068330f 539 PD_01_Standby = 0x01, //!< 8'b00000001
whismanoid 0:68e64068330f 540 PD_10_Sleep = 0x02, //!< 8'b00000010
whismanoid 0:68e64068330f 541 PD_11_Reset = 0x03, //!< 8'b00000011
whismanoid 0:68e64068330f 542 } MAX11410_PD_enum_t;
whismanoid 0:68e64068330f 543
whismanoid 0:68e64068330f 544 // CODE GENERATOR: TypedefEnum MAX11410_DEST_enum_t
whismanoid 0:68e64068330f 545 //----------------------------------------
whismanoid 0:68e64068330f 546 /// Conversion / seqeuncer start command
whismanoid 0:68e64068330f 547 /// CMD_r000_0001_xddd_xxdd_CONV_START DEST[2:0] field.
whismanoid 0:68e64068330f 548 /// CMD_r000_0110_xddd_xxdd_GP_CONV GP_DEST[2:0] field.
whismanoid 0:68e64068330f 549 ///
whismanoid 0:68e64068330f 550 /// - 000: Store result in DATA0
whismanoid 0:68e64068330f 551 /// - 001: Store result in DATA1
whismanoid 0:68e64068330f 552 /// - 010: Store result in DATA2
whismanoid 0:68e64068330f 553 /// - 011: Store result in DATA3
whismanoid 0:68e64068330f 554 /// - 100: Store result in DATA4
whismanoid 0:68e64068330f 555 /// - 101: Store result in DATA5
whismanoid 0:68e64068330f 556 /// - 110: Store result in DATA6
whismanoid 0:68e64068330f 557 /// - 111: Store result in DATA7
whismanoid 0:68e64068330f 558 typedef enum MAX11410_DEST_enum_t {
whismanoid 0:68e64068330f 559 DEST_000_DATA0 = 0x00, //!< 8'b00000000
whismanoid 0:68e64068330f 560 DEST_001_DATA1 = 0x01, //!< 8'b00000001
whismanoid 0:68e64068330f 561 DEST_010_DATA2 = 0x02, //!< 8'b00000010
whismanoid 0:68e64068330f 562 DEST_011_DATA3 = 0x03, //!< 8'b00000011
whismanoid 0:68e64068330f 563 DEST_100_DATA4 = 0x04, //!< 8'b00000100
whismanoid 0:68e64068330f 564 DEST_101_DATA5 = 0x05, //!< 8'b00000101
whismanoid 0:68e64068330f 565 DEST_110_DATA6 = 0x06, //!< 8'b00000110
whismanoid 0:68e64068330f 566 DEST_111_DATA7 = 0x07, //!< 8'b00000111
whismanoid 0:68e64068330f 567 } MAX11410_DEST_enum_t;
whismanoid 0:68e64068330f 568
whismanoid 0:68e64068330f 569 // CODE GENERATOR: TypedefEnum MAX11410_CONV_TYPE_enum_t
whismanoid 0:68e64068330f 570 //----------------------------------------
whismanoid 0:68e64068330f 571 /// Conversion / seqeuncer start command
whismanoid 0:68e64068330f 572 /// CMD_r000_0001_xddd_xxdd_CONV_START CONV_TYPE[1:0] field.
whismanoid 0:68e64068330f 573 /// CMD_r000_0110_xddd_xxdd_GP_CONV GP_CONV_TYPE[2:0] field.
whismanoid 0:68e64068330f 574 ///
whismanoid 0:68e64068330f 575 /// - 00: Single conversion
whismanoid 0:68e64068330f 576 /// - 01: Continuous conversions
whismanoid 0:68e64068330f 577 /// - 10, 11: 1:4 Duty cycled conversions (modulator low-power mode)
whismanoid 0:68e64068330f 578 typedef enum MAX11410_CONV_TYPE_enum_t {
whismanoid 0:68e64068330f 579 CONV_TYPE_00_Single = 0x00, //!< 8'b00000000
whismanoid 0:68e64068330f 580 CONV_TYPE_01_Continuous = 0x01, //!< 8'b00000001
whismanoid 0:68e64068330f 581 CONV_TYPE_10_DutyCycle_1_4 = 0x02, //!< 8'b00000010
whismanoid 0:68e64068330f 582 CONV_TYPE_11_DutyCycle_1_4 = 0x03, //!< 8'b00000011
whismanoid 0:68e64068330f 583 } MAX11410_CONV_TYPE_enum_t;
whismanoid 0:68e64068330f 584
whismanoid 0:68e64068330f 585 // CODE GENERATOR: TypedefEnum MAX11410_CAL_TYPE_enum_t
whismanoid 0:68e64068330f 586 //----------------------------------------
whismanoid 0:68e64068330f 587 /// Calbration command
whismanoid 0:68e64068330f 588 /// CMD_r000_0011_xxxx_xddd_CAL_START CAL_TYPE[2:0] field
whismanoid 0:68e64068330f 589 ///
whismanoid 0:68e64068330f 590 /// - 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 591 /// - 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 592 /// - 010: Reserved
whismanoid 0:68e64068330f 593 /// - 011: Reserved
whismanoid 0:68e64068330f 594 /// - 100: Performs a system offset calibration. The resulting calibration value is stored in the SYS_OFF_A register.
whismanoid 0:68e64068330f 595 /// - 101: Performs a system gain calibration. The resulting calibration value is stored in the SYS_GAIN_A register.
whismanoid 0:68e64068330f 596 /// - 110: Performs a system offset calibration. The resulting calibration value is stored in the SYS_OFF_B register.
whismanoid 0:68e64068330f 597 /// - 111: Performs a system gain calibration. The resulting calibration value is stored in the SYS_GAIN_B register.
whismanoid 0:68e64068330f 598 typedef enum MAX11410_CAL_TYPE_enum_t {
whismanoid 0:68e64068330f 599 CAL_TYPE_000_SELF_CAL = 0x00, //!< 8'b00000000
whismanoid 0:68e64068330f 600 CAL_TYPE_001_PGA_GAIN = 0x01, //!< 8'b00000001
whismanoid 0:68e64068330f 601 CAL_TYPE_010_reserved = 0x02, //!< 8'b00000010
whismanoid 0:68e64068330f 602 CAL_TYPE_011_reserved = 0x03, //!< 8'b00000011
whismanoid 0:68e64068330f 603 CAL_TYPE_100_SYS_OFF_A = 0x04, //!< 8'b00000100
whismanoid 0:68e64068330f 604 CAL_TYPE_101_SYS_GAIN_A = 0x05, //!< 8'b00000101
whismanoid 0:68e64068330f 605 CAL_TYPE_110_SYS_OFF_B = 0x06, //!< 8'b00000110
whismanoid 0:68e64068330f 606 CAL_TYPE_111_SYS_GAIN_B = 0x07, //!< 8'b00000111
whismanoid 0:68e64068330f 607 } MAX11410_CAL_TYPE_enum_t;
whismanoid 0:68e64068330f 608
whismanoid 0:68e64068330f 609 // CODE GENERATOR: TypedefEnum MAX11410_GP0_DIR_enum_t
whismanoid 0:68e64068330f 610 //----------------------------------------
whismanoid 0:68e64068330f 611 /// GPIO0 pin command
whismanoid 0:68e64068330f 612 /// CMD_r000_0100_dddd_xddd_GP0_CTRL GP0_DIR[1:0] field
whismanoid 0:68e64068330f 613 ///
whismanoid 0:68e64068330f 614 /// - 00: Input mode, reference to VDDIO (default)
whismanoid 0:68e64068330f 615 /// - 01: Reserved
whismanoid 0:68e64068330f 616 /// - 10: Output mode, open-drain output
whismanoid 0:68e64068330f 617 /// - 11: Output mode, CMOS output
whismanoid 0:68e64068330f 618 typedef enum MAX11410_GP0_DIR_enum_t {
whismanoid 0:68e64068330f 619 GP0_DIR_000_Input = 0x00, //!< 8'b00000000
whismanoid 0:68e64068330f 620 GP0_DIR_001_reserved = 0x01, //!< 8'b00000001
whismanoid 0:68e64068330f 621 GP0_DIR_010_OutputOpenDrain = 0x02, //!< 8'b00000010
whismanoid 0:68e64068330f 622 GP0_DIR_011_Output = 0x03, //!< 8'b00000011
whismanoid 0:68e64068330f 623 } MAX11410_GP0_DIR_enum_t;
whismanoid 0:68e64068330f 624
whismanoid 0:68e64068330f 625 // CODE GENERATOR: TypedefEnum MAX11410_GP0_ISEL_enum_t
whismanoid 0:68e64068330f 626 //----------------------------------------
whismanoid 0:68e64068330f 627 /// GPIO0 pin command
whismanoid 0:68e64068330f 628 /// CMD_r000_0100_dddd_xddd_GP0_CTRL GP0_ISEL[1:0] field
whismanoid 0:68e64068330f 629 ///
whismanoid 0:68e64068330f 630 /// - 00: GPIO_0 input disabled (default)
whismanoid 0:68e64068330f 631 /// - 01: GPIO_0 input configured as rising-edge-triggered conversion start
whismanoid 0:68e64068330f 632 /// - 10: GPIO_0 input configured as rising-edge-triggered sequence start from GP_SEQ_ADDR
whismanoid 0:68e64068330f 633 /// - 11: Reserved
whismanoid 0:68e64068330f 634 typedef enum MAX11410_GP0_ISEL_enum_t {
whismanoid 0:68e64068330f 635 GP0_ISEL_000_disabled = 0x00, //!< 8'b00000000
whismanoid 0:68e64068330f 636 GP0_ISEL_001_TRIGGER_CONV_START = 0x01, //!< 8'b00000001
whismanoid 0:68e64068330f 637 GP0_ISEL_010_TRIGGER_SEQ_START = 0x02, //!< 8'b00000010
whismanoid 0:68e64068330f 638 GP0_ISEL_011_reserved = 0x03, //!< 8'b00000011
whismanoid 0:68e64068330f 639 } MAX11410_GP0_ISEL_enum_t;
whismanoid 0:68e64068330f 640
whismanoid 0:68e64068330f 641 // CODE GENERATOR: TypedefEnum MAX11410_GP0_OSEL_enum_t
whismanoid 0:68e64068330f 642 //----------------------------------------
whismanoid 0:68e64068330f 643 /// GPIO0 pin command
whismanoid 0:68e64068330f 644 /// CMD_r000_0100_dddd_xddd_GP0_CTRL GP0_OSEL[2:0] field
whismanoid 0:68e64068330f 645 ///
whismanoid 0:68e64068330f 646 /// - 000: GPIO_0 output disabled, high Z (default)
whismanoid 0:68e64068330f 647 /// - 001: GPIO_0 output is configured as INTRB (active low)
whismanoid 0:68e64068330f 648 /// - 010: GPIO_0 output is configured as INTR (active high)
whismanoid 0:68e64068330f 649 /// - 011: GPIO_0 output is configured as state Logic 0
whismanoid 0:68e64068330f 650 /// - 100: GPIO_0 output is configured as state Logic 1
whismanoid 0:68e64068330f 651 /// - 101: GPIO_0 output is configured as automatic low-side switch operation (CMOS output mode overridden)
whismanoid 0:68e64068330f 652 /// - 110: GPIO_0 output is configured as modulator active status
whismanoid 0:68e64068330f 653 /// - 111: GPIO_0 output is configured as system clock (2.456Mhz Nominal)
whismanoid 0:68e64068330f 654 typedef enum MAX11410_GP0_OSEL_enum_t {
whismanoid 0:68e64068330f 655 GP0_OSEL_000_disabled = 0x00, //!< 8'b00000000
whismanoid 0:68e64068330f 656 GP0_OSEL_001_INTRB = 0x01, //!< 8'b00000001
whismanoid 0:68e64068330f 657 GP0_OSEL_010_INTR = 0x02, //!< 8'b00000010
whismanoid 0:68e64068330f 658 GP0_OSEL_011_LOGIC_0 = 0x03, //!< 8'b00000011
whismanoid 0:68e64068330f 659 GP0_OSEL_100_LOGIC_1 = 0x04, //!< 8'b00000100
whismanoid 0:68e64068330f 660 GP0_OSEL_101_AUTO_LOWSIDE_SWITCH = 0x05, //!< 8'b00000101
whismanoid 0:68e64068330f 661 GP0_OSEL_110_MODULATOR_ACTIVE_STATUS = 0x06, //!< 8'b00000110
whismanoid 0:68e64068330f 662 GP0_OSEL_111_CLOCK_2M456 = 0x07, //!< 8'b00000111
whismanoid 0:68e64068330f 663 } MAX11410_GP0_OSEL_enum_t;
whismanoid 0:68e64068330f 664
whismanoid 0:68e64068330f 665 // CODE GENERATOR: TypedefEnum MAX11410_GP1_DIR_enum_t
whismanoid 0:68e64068330f 666 //----------------------------------------
whismanoid 0:68e64068330f 667 /// GPIO1 pin command
whismanoid 0:68e64068330f 668 /// CMD_r000_0101_dddd_xddd_GP1_CTRL GP1_DIR[1:0] field
whismanoid 0:68e64068330f 669 ///
whismanoid 0:68e64068330f 670 /// - 00: Input mode, reference to VDDIO (default)
whismanoid 0:68e64068330f 671 /// - 01: Reserved
whismanoid 0:68e64068330f 672 /// - 10: Output mode, open-drain output
whismanoid 0:68e64068330f 673 /// - 11: Output mode, CMOS output
whismanoid 0:68e64068330f 674 typedef enum MAX11410_GP1_DIR_enum_t {
whismanoid 0:68e64068330f 675 GP1_DIR_000_Input = 0x00, //!< 8'b00000000
whismanoid 0:68e64068330f 676 GP1_DIR_001_reserved = 0x01, //!< 8'b00000001
whismanoid 0:68e64068330f 677 GP1_DIR_010_OutputOpenDrain = 0x02, //!< 8'b00000010
whismanoid 0:68e64068330f 678 GP1_DIR_011_Output = 0x03, //!< 8'b00000011
whismanoid 0:68e64068330f 679 } MAX11410_GP1_DIR_enum_t;
whismanoid 0:68e64068330f 680
whismanoid 0:68e64068330f 681 // CODE GENERATOR: TypedefEnum MAX11410_GP1_ISEL_enum_t
whismanoid 0:68e64068330f 682 //----------------------------------------
whismanoid 0:68e64068330f 683 /// GPIO1 pin command
whismanoid 0:68e64068330f 684 /// CMD_r000_0101_dddd_xddd_GP1_CTRL GP1_ISEL[1:0] field
whismanoid 0:68e64068330f 685 ///
whismanoid 0:68e64068330f 686 /// - 00: GPIO_1 input disabled (default)
whismanoid 0:68e64068330f 687 /// - 01: GPIO_1 input configured as rising-edge-triggered conversion start
whismanoid 0:68e64068330f 688 /// - 10: GPIO_1 input configured as rising-edge-triggered sequence start from GP_SEQ_ADDR
whismanoid 0:68e64068330f 689 /// - 11: Reserved
whismanoid 0:68e64068330f 690 typedef enum MAX11410_GP1_ISEL_enum_t {
whismanoid 0:68e64068330f 691 GP1_ISEL_000_disabled = 0x00, //!< 8'b00000000
whismanoid 0:68e64068330f 692 GP1_ISEL_001_TRIGGER_CONV_START = 0x01, //!< 8'b00000001
whismanoid 0:68e64068330f 693 GP1_ISEL_010_TRIGGER_SEQ_START = 0x02, //!< 8'b00000010
whismanoid 0:68e64068330f 694 GP1_ISEL_011_reserved = 0x03, //!< 8'b00000011
whismanoid 0:68e64068330f 695 } MAX11410_GP1_ISEL_enum_t;
whismanoid 0:68e64068330f 696
whismanoid 0:68e64068330f 697 // CODE GENERATOR: TypedefEnum MAX11410_GP1_OSEL_enum_t
whismanoid 0:68e64068330f 698 //----------------------------------------
whismanoid 0:68e64068330f 699 /// GPIO1 pin command
whismanoid 0:68e64068330f 700 /// CMD_r000_0101_dddd_xddd_GP1_CTRL GP1_OSEL[2:0] field
whismanoid 0:68e64068330f 701 ///
whismanoid 0:68e64068330f 702 /// - 000: GPIO_1 output disabled, high Z (default)
whismanoid 0:68e64068330f 703 /// - 001: GPIO_1 output is configured as INTRB (active low)
whismanoid 0:68e64068330f 704 /// - 010: GPIO_1 output is configured as INTR (active high)
whismanoid 0:68e64068330f 705 /// - 011: GPIO_1 output is configured as state Logic 0
whismanoid 0:68e64068330f 706 /// - 100: GPIO_1 output is configured as state Logic 1
whismanoid 0:68e64068330f 707 /// - 101: GPIO_1 output is configured as system clock (2.456Mhz Nominal)
whismanoid 0:68e64068330f 708 /// - 110: GPIO_1 output is configured as modulator active status
whismanoid 0:68e64068330f 709 /// - 111: GPIO_1 output is configured as automatic low-side switch operation (CMOS output mode overridden)
whismanoid 0:68e64068330f 710 typedef enum MAX11410_GP1_OSEL_enum_t {
whismanoid 0:68e64068330f 711 GP1_OSEL_000_disabled = 0x00, //!< 8'b00000000
whismanoid 0:68e64068330f 712 GP1_OSEL_001_INTRB = 0x01, //!< 8'b00000001
whismanoid 0:68e64068330f 713 GP1_OSEL_010_INTR = 0x02, //!< 8'b00000010
whismanoid 0:68e64068330f 714 GP1_OSEL_011_LOGIC_0 = 0x03, //!< 8'b00000011
whismanoid 0:68e64068330f 715 GP1_OSEL_100_LOGIC_1 = 0x04, //!< 8'b00000100
whismanoid 0:68e64068330f 716 GP1_OSEL_101_AUTO_LOWSIDE_SWITCH = 0x05, //!< 8'b00000101
whismanoid 0:68e64068330f 717 GP1_OSEL_110_MODULATOR_ACTIVE_STATUS = 0x06, //!< 8'b00000110
whismanoid 0:68e64068330f 718 GP1_OSEL_111_CLOCK_2M456 = 0x07, //!< 8'b00000111
whismanoid 0:68e64068330f 719 } MAX11410_GP1_OSEL_enum_t;
whismanoid 0:68e64068330f 720
whismanoid 0:68e64068330f 721 // CODE GENERATOR: TypedefEnum MAX11410_LINEF_enum_t
whismanoid 0:68e64068330f 722 //----------------------------------------
whismanoid 0:68e64068330f 723 /// Filter command
whismanoid 0:68e64068330f 724 /// CMD_r000_1000_x0dd_dddd_FILTER LINEF[1:0] field
whismanoid 0:68e64068330f 725 ///
whismanoid 0:68e64068330f 726 /// - 00: Simultaneous 50/60Hz FIR rejection (default)
whismanoid 0:68e64068330f 727 /// - 01: 50Hz FIR rejection
whismanoid 0:68e64068330f 728 /// - 10: 60Hz FIR rejection
whismanoid 0:68e64068330f 729 /// - 11: SINC4
whismanoid 0:68e64068330f 730 typedef enum MAX11410_LINEF_enum_t {
whismanoid 0:68e64068330f 731 LINEF_00_50Hz_60Hz_FIR = 0x00, //!< 8'b00000000
whismanoid 0:68e64068330f 732 LINEF_01_50Hz_FIR = 0x01, //!< 8'b00000001
whismanoid 0:68e64068330f 733 LINEF_10_60Hz_FIR = 0x02, //!< 8'b00000010
whismanoid 0:68e64068330f 734 LINEF_11_SINC4 = 0x03, //!< 8'b00000011
whismanoid 0:68e64068330f 735 } MAX11410_LINEF_enum_t;
whismanoid 0:68e64068330f 736
whismanoid 0:68e64068330f 737 // CODE GENERATOR: TypedefEnum MAX11410_RATE_enum_t
whismanoid 0:68e64068330f 738 //----------------------------------------
whismanoid 0:68e64068330f 739 /// Filter command
whismanoid 0:68e64068330f 740 /// CMD_r000_1000_x0dd_dddd_FILTER RATE[3:0] field
whismanoid 0:68e64068330f 741 ///
whismanoid 0:68e64068330f 742 /// Sets conversion rate based on LINEF value. See Table 9a through Table 9d for details.
whismanoid 0:68e64068330f 743 ///
whismanoid 0:68e64068330f 744 /// Table 9a. LINEF = 00 Data Rate and Filter Rejection Settings
whismanoid 0:68e64068330f 745 ///
whismanoid 0:68e64068330f 746 /// Rate | LINEF | CONV_TYPE | Rate
whismanoid 0:68e64068330f 747 /// -----------|------------------------|----------------------------|----------
whismanoid 0:68e64068330f 748 /// RATE_0000 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_00_Single | 1.0SPS
whismanoid 0:68e64068330f 749 /// RATE_0001 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_00_Single | 2.0SPS
whismanoid 0:68e64068330f 750 /// RATE_0010 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_00_Single | 4.0SPS
whismanoid 0:68e64068330f 751 /// RATE_0011 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_00_Single | 8.0SPS
whismanoid 0:68e64068330f 752 /// RATE_0100 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_00_Single | 16.0SPS
whismanoid 0:68e64068330f 753 /// RATE_0000 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_01_Continuous | 1.1SPS
whismanoid 0:68e64068330f 754 /// RATE_0001 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_01_Continuous | 2.1SPS
whismanoid 0:68e64068330f 755 /// RATE_0010 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_01_Continuous | 4.2SPS
whismanoid 0:68e64068330f 756 /// RATE_0011 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_01_Continuous | 8.4SPS
whismanoid 0:68e64068330f 757 /// RATE_0100 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_01_Continuous | 16.8SPS
whismanoid 0:68e64068330f 758 /// RATE_0000 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 0.3SPS
whismanoid 0:68e64068330f 759 /// RATE_0001 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 0.5SPS
whismanoid 0:68e64068330f 760 /// RATE_0010 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 1.1SPS
whismanoid 0:68e64068330f 761 /// RATE_0011 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 2.1SPS
whismanoid 0:68e64068330f 762 /// RATE_0100 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 4.2SPS
whismanoid 0:68e64068330f 763 ///
whismanoid 0:68e64068330f 764 /// Table 9b. LINEF = 01 Data Rate and Filter Rejection Settings
whismanoid 0:68e64068330f 765 ///
whismanoid 0:68e64068330f 766 /// Rate | LINEF | CONV_TYPE | Rate
whismanoid 0:68e64068330f 767 /// ----------|------------------------|----------------------------|----------
whismanoid 0:68e64068330f 768 /// RATE_0000 | LINEF_01_50Hz_FIR | CONV_TYPE_00_Single | 1.3SPS
whismanoid 0:68e64068330f 769 /// RATE_0001 | LINEF_01_50Hz_FIR | CONV_TYPE_00_Single | 2.5SPS
whismanoid 0:68e64068330f 770 /// RATE_0010 | LINEF_01_50Hz_FIR | CONV_TYPE_00_Single | 5.0SPS
whismanoid 0:68e64068330f 771 /// RATE_0011 | LINEF_01_50Hz_FIR | CONV_TYPE_00_Single | 10.0SPS
whismanoid 0:68e64068330f 772 /// RATE_0100 | LINEF_01_50Hz_FIR | CONV_TYPE_00_Single | 20.0SPS
whismanoid 0:68e64068330f 773 /// RATE_0101 | LINEF_01_50Hz_FIR | CONV_TYPE_00_Single | 35.6SPS
whismanoid 0:68e64068330f 774 /// RATE_0000 | LINEF_01_50Hz_FIR | CONV_TYPE_01_Continuous | 1.3SPS
whismanoid 0:68e64068330f 775 /// RATE_0001 | LINEF_01_50Hz_FIR | CONV_TYPE_01_Continuous | 2.7SPS
whismanoid 0:68e64068330f 776 /// RATE_0010 | LINEF_01_50Hz_FIR | CONV_TYPE_01_Continuous | 5.3SPS
whismanoid 0:68e64068330f 777 /// RATE_0011 | LINEF_01_50Hz_FIR | CONV_TYPE_01_Continuous | 10.7SPS
whismanoid 0:68e64068330f 778 /// RATE_0100 | LINEF_01_50Hz_FIR | CONV_TYPE_01_Continuous | 21.3SPS
whismanoid 0:68e64068330f 779 /// RATE_0101 | LINEF_01_50Hz_FIR | CONV_TYPE_01_Continuous | 40.0SPS
whismanoid 0:68e64068330f 780 /// RATE_0000 | LINEF_01_50Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 0.3SPS
whismanoid 0:68e64068330f 781 /// RATE_0001 | LINEF_01_50Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 0.7SPS
whismanoid 0:68e64068330f 782 /// RATE_0010 | LINEF_01_50Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 1.3SPS
whismanoid 0:68e64068330f 783 /// RATE_0011 | LINEF_01_50Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 2.7SPS
whismanoid 0:68e64068330f 784 /// RATE_0100 | LINEF_01_50Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 5.3SPS
whismanoid 0:68e64068330f 785 /// RATE_0101 | LINEF_01_50Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 10.0SPS
whismanoid 0:68e64068330f 786 ///
whismanoid 0:68e64068330f 787 /// Table 9c. LINEF = 10 Data Rate and Filter Rejection Settings
whismanoid 0:68e64068330f 788 ///
whismanoid 0:68e64068330f 789 /// Rate | LINEF | CONV_TYPE | Rate
whismanoid 0:68e64068330f 790 /// ----------|------------------------|----------------------------|----------
whismanoid 0:68e64068330f 791 /// RATE_0000 | LINEF_10_60Hz_FIR | CONV_TYPE_00_Single | 1.3SPS
whismanoid 0:68e64068330f 792 /// RATE_0001 | LINEF_10_60Hz_FIR | CONV_TYPE_00_Single | 2.5SPS
whismanoid 0:68e64068330f 793 /// RATE_0010 | LINEF_10_60Hz_FIR | CONV_TYPE_00_Single | 5.0SPS
whismanoid 0:68e64068330f 794 /// RATE_0011 | LINEF_10_60Hz_FIR | CONV_TYPE_00_Single | 10.0SPS
whismanoid 0:68e64068330f 795 /// RATE_0100 | LINEF_10_60Hz_FIR | CONV_TYPE_00_Single | 20.0SPS
whismanoid 0:68e64068330f 796 /// RATE_0101 | LINEF_10_60Hz_FIR | CONV_TYPE_00_Single | 35.6SPS
whismanoid 0:68e64068330f 797 /// RATE_0000 | LINEF_10_60Hz_FIR | CONV_TYPE_01_Continuous | 1.3SPS
whismanoid 0:68e64068330f 798 /// RATE_0001 | LINEF_10_60Hz_FIR | CONV_TYPE_01_Continuous | 2.7SPS
whismanoid 0:68e64068330f 799 /// RATE_0010 | LINEF_10_60Hz_FIR | CONV_TYPE_01_Continuous | 5.3SPS
whismanoid 0:68e64068330f 800 /// RATE_0011 | LINEF_10_60Hz_FIR | CONV_TYPE_01_Continuous | 10.7SPS
whismanoid 0:68e64068330f 801 /// RATE_0100 | LINEF_10_60Hz_FIR | CONV_TYPE_01_Continuous | 21.3SPS
whismanoid 0:68e64068330f 802 /// RATE_0101 | LINEF_10_60Hz_FIR | CONV_TYPE_01_Continuous | 40.0SPS
whismanoid 0:68e64068330f 803 /// RATE_0000 | LINEF_10_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 0.3SPS
whismanoid 0:68e64068330f 804 /// RATE_0001 | LINEF_10_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 0.7SPS
whismanoid 0:68e64068330f 805 /// RATE_0010 | LINEF_10_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 1.3SPS
whismanoid 0:68e64068330f 806 /// RATE_0011 | LINEF_10_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 2.7SPS
whismanoid 0:68e64068330f 807 /// RATE_0100 | LINEF_10_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 5.3SPS
whismanoid 0:68e64068330f 808 /// RATE_0101 | LINEF_10_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 10.0SPS
whismanoid 0:68e64068330f 809 ///
whismanoid 0:68e64068330f 810 /// Table 9d. LINEF = 11 Data Rate and Filter Rejection Settings
whismanoid 0:68e64068330f 811 ///
whismanoid 0:68e64068330f 812 /// Rate | LINEF | CONV_TYPE | Rate
whismanoid 0:68e64068330f 813 /// ----------|------------------------|----------------------------|----------
whismanoid 0:68e64068330f 814 /// RATE_0000 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 1SPS
whismanoid 0:68e64068330f 815 /// RATE_0001 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 2.5SPS
whismanoid 0:68e64068330f 816 /// RATE_0010 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 5SPS
whismanoid 0:68e64068330f 817 /// RATE_0011 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 10SPS
whismanoid 0:68e64068330f 818 /// RATE_0100 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 15SPS
whismanoid 0:68e64068330f 819 /// RATE_0101 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 30SPS
whismanoid 0:68e64068330f 820 /// RATE_0110 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 60SPS
whismanoid 0:68e64068330f 821 /// RATE_0111 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 120SPS
whismanoid 0:68e64068330f 822 /// RATE_1000 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 240SPS
whismanoid 0:68e64068330f 823 /// RATE_1001 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 480SPS
whismanoid 0:68e64068330f 824 /// RATE_0000 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 4SPS
whismanoid 0:68e64068330f 825 /// RATE_0001 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 10SPS
whismanoid 0:68e64068330f 826 /// RATE_0010 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 20SPS
whismanoid 0:68e64068330f 827 /// RATE_0011 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 40SPS
whismanoid 0:68e64068330f 828 /// RATE_0100 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 60SPS
whismanoid 0:68e64068330f 829 /// RATE_0101 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 120SPS
whismanoid 0:68e64068330f 830 /// RATE_0110 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 240SPS
whismanoid 0:68e64068330f 831 /// RATE_0111 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 480SPS
whismanoid 0:68e64068330f 832 /// RATE_1000 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 960SPS
whismanoid 0:68e64068330f 833 /// RATE_1001 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 1920SPS
whismanoid 0:68e64068330f 834 /// RATE_0000 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 1SPS
whismanoid 0:68e64068330f 835 /// RATE_0001 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 2.5SPS
whismanoid 0:68e64068330f 836 /// RATE_0010 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 5SPS
whismanoid 0:68e64068330f 837 /// RATE_0011 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 10SPS
whismanoid 0:68e64068330f 838 /// RATE_0100 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 15SPS
whismanoid 0:68e64068330f 839 /// RATE_0101 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 30SPS
whismanoid 0:68e64068330f 840 /// RATE_0110 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 60SPS
whismanoid 0:68e64068330f 841 /// RATE_0111 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 120SPS
whismanoid 0:68e64068330f 842 /// RATE_1000 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 240SPS
whismanoid 0:68e64068330f 843 /// RATE_1001 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 480SPS
whismanoid 0:68e64068330f 844 ///
whismanoid 0:68e64068330f 845 typedef enum MAX11410_RATE_enum_t {
whismanoid 0:68e64068330f 846 RATE_0000 = 0x00, //!< 8'b00000000
whismanoid 0:68e64068330f 847 RATE_0001 = 0x01, //!< 8'b00000001
whismanoid 0:68e64068330f 848 RATE_0010 = 0x02, //!< 8'b00000010
whismanoid 0:68e64068330f 849 RATE_0011 = 0x03, //!< 8'b00000011
whismanoid 0:68e64068330f 850 RATE_0100 = 0x04, //!< 8'b00000100
whismanoid 0:68e64068330f 851 RATE_0101 = 0x05, //!< 8'b00000101
whismanoid 0:68e64068330f 852 RATE_0110 = 0x06, //!< 8'b00000110
whismanoid 0:68e64068330f 853 RATE_0111 = 0x07, //!< 8'b00000111
whismanoid 0:68e64068330f 854 RATE_1000 = 0x08, //!< 8'b00001000
whismanoid 0:68e64068330f 855 RATE_1001 = 0x09, //!< 8'b00001001
whismanoid 0:68e64068330f 856 RATE_1010 = 0x0a, //!< 8'b00001010
whismanoid 0:68e64068330f 857 RATE_1011 = 0x0b, //!< 8'b00001011
whismanoid 0:68e64068330f 858 RATE_1100 = 0x0c, //!< 8'b00001100
whismanoid 0:68e64068330f 859 RATE_1101 = 0x0d, //!< 8'b00001101
whismanoid 0:68e64068330f 860 RATE_1110 = 0x0e, //!< 8'b00001110
whismanoid 0:68e64068330f 861 RATE_1111 = 0x0f, //!< 8'b00001111
whismanoid 0:68e64068330f 862 } MAX11410_RATE_enum_t;
whismanoid 0:68e64068330f 863
whismanoid 0:68e64068330f 864 // CODE GENERATOR: TypedefEnum MAX11410_REF_SEL_enum_t
whismanoid 0:68e64068330f 865 //----------------------------------------
whismanoid 0:68e64068330f 866 /// Filter command
whismanoid 0:68e64068330f 867 /// CMD_r000_1001_dddd_dddd_CTRL REF_SEL[2:0] field
whismanoid 0:68e64068330f 868 ///
whismanoid 0:68e64068330f 869 /// - 000: AIN0(REF0P)/AIN1(REF0N)
whismanoid 0:68e64068330f 870 /// - 001: REF1P/REF1N (default)
whismanoid 0:68e64068330f 871 /// - 010: REF2P/REF2N
whismanoid 0:68e64068330f 872 /// - 011: AVDD/AGND
whismanoid 0:68e64068330f 873 /// - 100: AIN0(REF0P)/AGND (single-ended mode)
whismanoid 0:68e64068330f 874 /// - 101: REF1P/AGND (single-ended mode)
whismanoid 0:68e64068330f 875 /// - 110: REF2P/AGND (single-ended mode)
whismanoid 0:68e64068330f 876 /// - 111: AVDD/AGND
whismanoid 0:68e64068330f 877 typedef enum MAX11410_REF_SEL_enum_t {
whismanoid 0:68e64068330f 878 REF_SEL_000_AIN0_AIN1 = 0x00, //!< 8'b00000000
whismanoid 0:68e64068330f 879 REF_SEL_001_REF1P_REF1N = 0x01, //!< 8'b00000001
whismanoid 0:68e64068330f 880 REF_SEL_010_REF2P_REF2N = 0x02, //!< 8'b00000010
whismanoid 0:68e64068330f 881 REF_SEL_011_AVDD_AGND = 0x03, //!< 8'b00000011
whismanoid 0:68e64068330f 882 REF_SEL_100_AIN0_AGND = 0x04, //!< 8'b00000100
whismanoid 0:68e64068330f 883 REF_SEL_101_REF1P_AGND = 0x05, //!< 8'b00000101
whismanoid 0:68e64068330f 884 REF_SEL_110_REF2P_AGND = 0x06, //!< 8'b00000110
whismanoid 0:68e64068330f 885 REF_SEL_111_AVDD_AGND = 0x07, //!< 8'b00000111
whismanoid 0:68e64068330f 886 } MAX11410_REF_SEL_enum_t;
whismanoid 0:68e64068330f 887
whismanoid 0:68e64068330f 888 // CODE GENERATOR: TypedefEnum MAX11410_VBIAS_MODE_enum_t
whismanoid 0:68e64068330f 889 //----------------------------------------
whismanoid 0:68e64068330f 890 /// Source command
whismanoid 0:68e64068330f 891 /// CMD_r000_1010_dddd_dddd_SOURCE VBIAS_MODE[1:0] field
whismanoid 0:68e64068330f 892 ///
whismanoid 0:68e64068330f 893 /// - 00: Active mode (default)
whismanoid 0:68e64068330f 894 /// - 01: High impedance; 125kOhm output impedance
whismanoid 0:68e64068330f 895 /// - 10: Low impedance; 20kOhm output impedance
whismanoid 0:68e64068330f 896 /// - 11: Low impedance; 20kOhm output impedance
whismanoid 0:68e64068330f 897 typedef enum MAX11410_VBIAS_MODE_enum_t {
whismanoid 0:68e64068330f 898 VBIAS_MODE_00_Active = 0x00, //!< 8'b00000000
whismanoid 0:68e64068330f 899 VBIAS_MODE_01_125kOhm = 0x01, //!< 8'b00000001
whismanoid 0:68e64068330f 900 VBIAS_MODE_10_20kOhm = 0x02, //!< 8'b00000010
whismanoid 0:68e64068330f 901 VBIAS_MODE_11_20kOhm = 0x03, //!< 8'b00000011
whismanoid 0:68e64068330f 902 } MAX11410_VBIAS_MODE_enum_t;
whismanoid 0:68e64068330f 903
whismanoid 0:68e64068330f 904 // CODE GENERATOR: TypedefEnum MAX11410_BRN_MODE_enum_t
whismanoid 0:68e64068330f 905 //----------------------------------------
whismanoid 0:68e64068330f 906 /// Source command
whismanoid 0:68e64068330f 907 /// CMD_r000_1010_dddd_dddd_SOURCE BRN_MODE[1:0] field
whismanoid 0:68e64068330f 908 ///
whismanoid 0:68e64068330f 909 /// - 00: Powered down, burnout sources disabled (default)
whismanoid 0:68e64068330f 910 /// - 01: 0.5uA burnout current sources enabled
whismanoid 0:68e64068330f 911 /// - 10: 1uA burnout current sources enabled
whismanoid 0:68e64068330f 912 /// - 11: 10uA burnout current sources enabled
whismanoid 0:68e64068330f 913 typedef enum MAX11410_BRN_MODE_enum_t {
whismanoid 0:68e64068330f 914 BRN_MODE_00_disabled = 0x00, //!< 8'b00000000
whismanoid 0:68e64068330f 915 BRN_MODE_01_0u5A = 0x01, //!< 8'b00000001
whismanoid 0:68e64068330f 916 BRN_MODE_10_1uA = 0x02, //!< 8'b00000010
whismanoid 0:68e64068330f 917 BRN_MODE_11_10uA = 0x03, //!< 8'b00000011
whismanoid 0:68e64068330f 918 } MAX11410_BRN_MODE_enum_t;
whismanoid 0:68e64068330f 919
whismanoid 0:68e64068330f 920 // CODE GENERATOR: TypedefEnum MAX11410_IDAC_MODE_enum_t
whismanoid 0:68e64068330f 921 //----------------------------------------
whismanoid 0:68e64068330f 922 /// Source command
whismanoid 0:68e64068330f 923 /// CMD_r000_1010_dddd_dddd_SOURCE IDAC_MODE[3:0] field
whismanoid 0:68e64068330f 924 ///
whismanoid 0:68e64068330f 925 /// - 0000: 10uA (default)
whismanoid 0:68e64068330f 926 /// - 0001: 50uA
whismanoid 0:68e64068330f 927 /// - 0010: 75uA
whismanoid 0:68e64068330f 928 /// - 0011: 100uA
whismanoid 0:68e64068330f 929 /// - 0100: 125uA
whismanoid 0:68e64068330f 930 /// - 0101: 150uA
whismanoid 0:68e64068330f 931 /// - 0110: 175uA
whismanoid 0:68e64068330f 932 /// - 0111: 200uA
whismanoid 0:68e64068330f 933 /// - 1000: 225uA
whismanoid 0:68e64068330f 934 /// - 1001: 250uA
whismanoid 0:68e64068330f 935 /// - 1010: 300uA
whismanoid 0:68e64068330f 936 /// - 1011: 400uA
whismanoid 0:68e64068330f 937 /// - 1100: 600uA
whismanoid 0:68e64068330f 938 /// - 1101: 800uA
whismanoid 0:68e64068330f 939 /// - 1110: 1200uA
whismanoid 0:68e64068330f 940 /// - 1111: 1600uA
whismanoid 0:68e64068330f 941 typedef enum MAX11410_IDAC_MODE_enum_t {
whismanoid 0:68e64068330f 942 IDAC_MODE_0000_10uA = 0x00, //!< 8'b00000000
whismanoid 0:68e64068330f 943 IDAC_MODE_0001_50uA = 0x01, //!< 8'b00000001
whismanoid 0:68e64068330f 944 IDAC_MODE_0010_75uA = 0x02, //!< 8'b00000010
whismanoid 0:68e64068330f 945 IDAC_MODE_0011_100uA = 0x03, //!< 8'b00000011
whismanoid 0:68e64068330f 946 IDAC_MODE_0100_125uA = 0x04, //!< 8'b00000100
whismanoid 0:68e64068330f 947 IDAC_MODE_0101_150uA = 0x05, //!< 8'b00000101
whismanoid 0:68e64068330f 948 IDAC_MODE_0110_175uA = 0x06, //!< 8'b00000110
whismanoid 0:68e64068330f 949 IDAC_MODE_0111_200uA = 0x07, //!< 8'b00000111
whismanoid 0:68e64068330f 950 IDAC_MODE_1000_225uA = 0x08, //!< 8'b00001000
whismanoid 0:68e64068330f 951 IDAC_MODE_1001_250uA = 0x09, //!< 8'b00001001
whismanoid 0:68e64068330f 952 IDAC_MODE_1010_300uA = 0x0a, //!< 8'b00001010
whismanoid 0:68e64068330f 953 IDAC_MODE_1011_400uA = 0x0b, //!< 8'b00001011
whismanoid 0:68e64068330f 954 IDAC_MODE_1100_600uA = 0x0c, //!< 8'b00001100
whismanoid 0:68e64068330f 955 IDAC_MODE_1101_800uA = 0x0d, //!< 8'b00001101
whismanoid 0:68e64068330f 956 IDAC_MODE_1110_1200uA = 0x0e, //!< 8'b00001110
whismanoid 0:68e64068330f 957 IDAC_MODE_1111_1600uA = 0x0f, //!< 8'b00001111
whismanoid 0:68e64068330f 958 } MAX11410_IDAC_MODE_enum_t;
whismanoid 0:68e64068330f 959
whismanoid 0:68e64068330f 960 // CODE GENERATOR: TypedefEnum MAX11410_AINP_SEL_enum_t
whismanoid 0:68e64068330f 961 //----------------------------------------
whismanoid 0:68e64068330f 962 /// Input multiplexer channel selection
whismanoid 0:68e64068330f 963 /// CMD_r000_1011_dddd_dddd_MUX_CTRL0 field AINP_SEL[3:0]
whismanoid 0:68e64068330f 964 ///
whismanoid 0:68e64068330f 965 /// - 0000: AINP = AIN0
whismanoid 0:68e64068330f 966 /// - 0001: AINP = AIN1
whismanoid 0:68e64068330f 967 /// - 0010: AINP = AIN2
whismanoid 0:68e64068330f 968 /// - 0011: AINP = AIN3
whismanoid 0:68e64068330f 969 /// - 0100: AINP = AIN4
whismanoid 0:68e64068330f 970 /// - 0101: AINP = AIN5
whismanoid 0:68e64068330f 971 /// - 0110: AINP = AIN6
whismanoid 0:68e64068330f 972 /// - 0111: AINP = AIN7
whismanoid 0:68e64068330f 973 /// - 1000: AINP = AIN8
whismanoid 0:68e64068330f 974 /// - 1001: AINP = AIN9
whismanoid 0:68e64068330f 975 /// - 1010: AINP = AVDD
whismanoid 0:68e64068330f 976 /// - 1011: AINN = Unconnected
whismanoid 0:68e64068330f 977 /// - 1100: AINN = Unconnected
whismanoid 0:68e64068330f 978 /// - 1101: AINN = Unconnected
whismanoid 0:68e64068330f 979 /// - 1110: AINN = Unconnected
whismanoid 0:68e64068330f 980 /// - 1111: AINN = Unconnected (default)
whismanoid 0:68e64068330f 981 typedef enum MAX11410_AINP_SEL_enum_t {
whismanoid 0:68e64068330f 982 AINP_SEL_0000_AIN0 = 0x00, //!< 8'b00000000
whismanoid 0:68e64068330f 983 AINP_SEL_0001_AIN1 = 0x01, //!< 8'b00000001
whismanoid 0:68e64068330f 984 AINP_SEL_0010_AIN2 = 0x02, //!< 8'b00000010
whismanoid 0:68e64068330f 985 AINP_SEL_0011_AIN3 = 0x03, //!< 8'b00000011
whismanoid 0:68e64068330f 986 AINP_SEL_0100_AIN4 = 0x04, //!< 8'b00000100
whismanoid 0:68e64068330f 987 AINP_SEL_0101_AIN5 = 0x05, //!< 8'b00000101
whismanoid 0:68e64068330f 988 AINP_SEL_0110_AIN6 = 0x06, //!< 8'b00000110
whismanoid 0:68e64068330f 989 AINP_SEL_0111_AIN7 = 0x07, //!< 8'b00000111
whismanoid 0:68e64068330f 990 AINP_SEL_1000_AIN8 = 0x08, //!< 8'b00001000
whismanoid 0:68e64068330f 991 AINP_SEL_1001_AIN9 = 0x09, //!< 8'b00001001
whismanoid 0:68e64068330f 992 AINP_SEL_1010_AVDD = 0x0a, //!< 8'b00001010
whismanoid 0:68e64068330f 993 AINP_SEL_1011_unconnected = 0x0b, //!< 8'b00001011
whismanoid 0:68e64068330f 994 AINP_SEL_1100_unconnected = 0x0c, //!< 8'b00001100
whismanoid 0:68e64068330f 995 AINP_SEL_1101_unconnected = 0x0d, //!< 8'b00001101
whismanoid 0:68e64068330f 996 AINP_SEL_1110_unconnected = 0x0e, //!< 8'b00001110
whismanoid 0:68e64068330f 997 AINP_SEL_1111_unconnected = 0x0f, //!< 8'b00001111
whismanoid 0:68e64068330f 998 } MAX11410_AINP_SEL_enum_t;
whismanoid 0:68e64068330f 999
whismanoid 0:68e64068330f 1000 // CODE GENERATOR: TypedefEnum MAX11410_AINN_SEL_enum_t
whismanoid 0:68e64068330f 1001 //----------------------------------------
whismanoid 0:68e64068330f 1002 /// Input multiplexer channel selection
whismanoid 1:d57c1a2cb83c 1003 /// CMD_r000_1011_dddd_dddd_MUX_CTRL0 field AINN_SEL[3:0]
whismanoid 0:68e64068330f 1004 ///
whismanoid 0:68e64068330f 1005 /// - 0000: AINN = AIN0
whismanoid 0:68e64068330f 1006 /// - 0001: AINN = AIN1
whismanoid 0:68e64068330f 1007 /// - 0010: AINN = AIN2
whismanoid 0:68e64068330f 1008 /// - 0011: AINN = AIN3
whismanoid 0:68e64068330f 1009 /// - 0100: AINN = AIN4
whismanoid 0:68e64068330f 1010 /// - 0101: AINN = AIN5
whismanoid 0:68e64068330f 1011 /// - 0110: AINN = AIN6
whismanoid 0:68e64068330f 1012 /// - 0111: AINN = AIN7
whismanoid 0:68e64068330f 1013 /// - 1000: AINN = AIN8
whismanoid 0:68e64068330f 1014 /// - 1001: AINN = AIN9
whismanoid 0:68e64068330f 1015 /// - 1010: AINN = GND
whismanoid 0:68e64068330f 1016 /// - 1011: AINN = Unconnected
whismanoid 0:68e64068330f 1017 /// - 1100: AINN = Unconnected
whismanoid 0:68e64068330f 1018 /// - 1101: AINN = Unconnected
whismanoid 0:68e64068330f 1019 /// - 1110: AINN = Unconnected
whismanoid 0:68e64068330f 1020 /// - 1111: AINN = Unconnected (default)
whismanoid 0:68e64068330f 1021 typedef enum MAX11410_AINN_SEL_enum_t {
whismanoid 0:68e64068330f 1022 AINN_SEL_0000_AIN0 = 0x00, //!< 8'b00000000
whismanoid 0:68e64068330f 1023 AINN_SEL_0001_AIN1 = 0x01, //!< 8'b00000001
whismanoid 0:68e64068330f 1024 AINN_SEL_0010_AIN2 = 0x02, //!< 8'b00000010
whismanoid 0:68e64068330f 1025 AINN_SEL_0011_AIN3 = 0x03, //!< 8'b00000011
whismanoid 0:68e64068330f 1026 AINN_SEL_0100_AIN4 = 0x04, //!< 8'b00000100
whismanoid 0:68e64068330f 1027 AINN_SEL_0101_AIN5 = 0x05, //!< 8'b00000101
whismanoid 0:68e64068330f 1028 AINN_SEL_0110_AIN6 = 0x06, //!< 8'b00000110
whismanoid 0:68e64068330f 1029 AINN_SEL_0111_AIN7 = 0x07, //!< 8'b00000111
whismanoid 0:68e64068330f 1030 AINN_SEL_1000_AIN8 = 0x08, //!< 8'b00001000
whismanoid 0:68e64068330f 1031 AINN_SEL_1001_AIN9 = 0x09, //!< 8'b00001001
whismanoid 0:68e64068330f 1032 AINN_SEL_1010_GND = 0x0a, //!< 8'b00001010
whismanoid 0:68e64068330f 1033 AINN_SEL_1011_unconnected = 0x0b, //!< 8'b00001011
whismanoid 0:68e64068330f 1034 AINN_SEL_1100_unconnected = 0x0c, //!< 8'b00001100
whismanoid 0:68e64068330f 1035 AINN_SEL_1101_unconnected = 0x0d, //!< 8'b00001101
whismanoid 0:68e64068330f 1036 AINN_SEL_1110_unconnected = 0x0e, //!< 8'b00001110
whismanoid 0:68e64068330f 1037 AINN_SEL_1111_unconnected = 0x0f, //!< 8'b00001111
whismanoid 0:68e64068330f 1038 } MAX11410_AINN_SEL_enum_t;
whismanoid 0:68e64068330f 1039
whismanoid 0:68e64068330f 1040 // CODE GENERATOR: TypedefEnum MAX11410_IDAC1_SEL_enum_t
whismanoid 0:68e64068330f 1041 //----------------------------------------
whismanoid 0:68e64068330f 1042 /// Input multiplexer channel selection
whismanoid 0:68e64068330f 1043 /// CMD_r000_1100_dddd_dddd_MUX_CTRL1 field IDAC1_SEL[3:0]
whismanoid 0:68e64068330f 1044 ///
whismanoid 0:68e64068330f 1045 /// - 0000: AIN0
whismanoid 0:68e64068330f 1046 /// - 0001: AIN1
whismanoid 0:68e64068330f 1047 /// - 0010: AIN2
whismanoid 0:68e64068330f 1048 /// - 0011: AIN3
whismanoid 0:68e64068330f 1049 /// - 0100: AIN4
whismanoid 0:68e64068330f 1050 /// - 0101: AIN5
whismanoid 0:68e64068330f 1051 /// - 0110: AIN6
whismanoid 0:68e64068330f 1052 /// - 0111: AIN7
whismanoid 0:68e64068330f 1053 /// - 1000: AIN8
whismanoid 0:68e64068330f 1054 /// - 1001: AIN9
whismanoid 0:68e64068330f 1055 /// - 1010: Unconnected; IDAC1 powered down.
whismanoid 0:68e64068330f 1056 /// - 1011: Unconnected; IDAC1 powered down.
whismanoid 0:68e64068330f 1057 /// - 1100: Unconnected; IDAC1 powered down.
whismanoid 0:68e64068330f 1058 /// - 1101: Unconnected; IDAC1 powered down.
whismanoid 0:68e64068330f 1059 /// - 1110: Unconnected; IDAC1 powered down.
whismanoid 0:68e64068330f 1060 /// - 1111: Unconnected; IDAC1 powered down.(Default)
whismanoid 0:68e64068330f 1061 typedef enum MAX11410_IDAC1_SEL_enum_t {
whismanoid 0:68e64068330f 1062 IDAC1_SEL_0000_AIN0 = 0x00, //!< 8'b00000000
whismanoid 0:68e64068330f 1063 IDAC1_SEL_0001_AIN1 = 0x01, //!< 8'b00000001
whismanoid 0:68e64068330f 1064 IDAC1_SEL_0010_AIN2 = 0x02, //!< 8'b00000010
whismanoid 0:68e64068330f 1065 IDAC1_SEL_0011_AIN3 = 0x03, //!< 8'b00000011
whismanoid 0:68e64068330f 1066 IDAC1_SEL_0100_AIN4 = 0x04, //!< 8'b00000100
whismanoid 0:68e64068330f 1067 IDAC1_SEL_0101_AIN5 = 0x05, //!< 8'b00000101
whismanoid 0:68e64068330f 1068 IDAC1_SEL_0110_AIN6 = 0x06, //!< 8'b00000110
whismanoid 0:68e64068330f 1069 IDAC1_SEL_0111_AIN7 = 0x07, //!< 8'b00000111
whismanoid 0:68e64068330f 1070 IDAC1_SEL_1000_AIN8 = 0x08, //!< 8'b00001000
whismanoid 0:68e64068330f 1071 IDAC1_SEL_1001_AIN9 = 0x09, //!< 8'b00001001
whismanoid 0:68e64068330f 1072 IDAC1_SEL_1010_unconnected = 0x0a, //!< 8'b00001010
whismanoid 0:68e64068330f 1073 IDAC1_SEL_1011_unconnected = 0x0b, //!< 8'b00001011
whismanoid 0:68e64068330f 1074 IDAC1_SEL_1100_unconnected = 0x0c, //!< 8'b00001100
whismanoid 0:68e64068330f 1075 IDAC1_SEL_1101_unconnected = 0x0d, //!< 8'b00001101
whismanoid 0:68e64068330f 1076 IDAC1_SEL_1110_unconnected = 0x0e, //!< 8'b00001110
whismanoid 0:68e64068330f 1077 IDAC1_SEL_1111_unconnected = 0x0f, //!< 8'b00001111
whismanoid 0:68e64068330f 1078 } MAX11410_IDAC1_SEL_enum_t;
whismanoid 0:68e64068330f 1079
whismanoid 0:68e64068330f 1080 // CODE GENERATOR: TypedefEnum MAX11410_IDAC0_SEL_enum_t
whismanoid 0:68e64068330f 1081 //----------------------------------------
whismanoid 0:68e64068330f 1082 /// Input multiplexer channel selection
whismanoid 0:68e64068330f 1083 /// CMD_r000_1100_dddd_dddd_MUX_CTRL1 field IDAC0_SEL[3:0]
whismanoid 0:68e64068330f 1084 ///
whismanoid 0:68e64068330f 1085 /// - 0000: AIN0
whismanoid 0:68e64068330f 1086 /// - 0001: AIN1
whismanoid 0:68e64068330f 1087 /// - 0010: AIN2
whismanoid 0:68e64068330f 1088 /// - 0011: AIN3
whismanoid 0:68e64068330f 1089 /// - 0100: AIN4
whismanoid 0:68e64068330f 1090 /// - 0101: AIN5
whismanoid 0:68e64068330f 1091 /// - 0110: AIN6
whismanoid 0:68e64068330f 1092 /// - 0111: AIN7
whismanoid 0:68e64068330f 1093 /// - 1000: AIN8
whismanoid 0:68e64068330f 1094 /// - 1001: AIN9
whismanoid 0:68e64068330f 1095 /// - 1010: Unconnected; IDAC0 powered down.
whismanoid 0:68e64068330f 1096 /// - 1011: Unconnected; IDAC0 powered down.
whismanoid 0:68e64068330f 1097 /// - 1100: Unconnected; IDAC0 powered down.
whismanoid 0:68e64068330f 1098 /// - 1101: Unconnected; IDAC0 powered down.
whismanoid 0:68e64068330f 1099 /// - 1110: Unconnected; IDAC0 powered down.
whismanoid 0:68e64068330f 1100 /// - 1111: Unconnected; IDAC0 powered down.(Default)
whismanoid 0:68e64068330f 1101 typedef enum MAX11410_IDAC0_SEL_enum_t {
whismanoid 0:68e64068330f 1102 IDAC0_SEL_0000_AIN0 = 0x00, //!< 8'b00000000
whismanoid 0:68e64068330f 1103 IDAC0_SEL_0001_AIN1 = 0x01, //!< 8'b00000001
whismanoid 0:68e64068330f 1104 IDAC0_SEL_0010_AIN2 = 0x02, //!< 8'b00000010
whismanoid 0:68e64068330f 1105 IDAC0_SEL_0011_AIN3 = 0x03, //!< 8'b00000011
whismanoid 0:68e64068330f 1106 IDAC0_SEL_0100_AIN4 = 0x04, //!< 8'b00000100
whismanoid 0:68e64068330f 1107 IDAC0_SEL_0101_AIN5 = 0x05, //!< 8'b00000101
whismanoid 0:68e64068330f 1108 IDAC0_SEL_0110_AIN6 = 0x06, //!< 8'b00000110
whismanoid 0:68e64068330f 1109 IDAC0_SEL_0111_AIN7 = 0x07, //!< 8'b00000111
whismanoid 0:68e64068330f 1110 IDAC0_SEL_1000_AIN8 = 0x08, //!< 8'b00001000
whismanoid 0:68e64068330f 1111 IDAC0_SEL_1001_AIN9 = 0x09, //!< 8'b00001001
whismanoid 0:68e64068330f 1112 IDAC0_SEL_1010_unconnected = 0x0a, //!< 8'b00001010
whismanoid 0:68e64068330f 1113 IDAC0_SEL_1011_unconnected = 0x0b, //!< 8'b00001011
whismanoid 0:68e64068330f 1114 IDAC0_SEL_1100_unconnected = 0x0c, //!< 8'b00001100
whismanoid 0:68e64068330f 1115 IDAC0_SEL_1101_unconnected = 0x0d, //!< 8'b00001101
whismanoid 0:68e64068330f 1116 IDAC0_SEL_1110_unconnected = 0x0e, //!< 8'b00001110
whismanoid 0:68e64068330f 1117 IDAC0_SEL_1111_unconnected = 0x0f, //!< 8'b00001111
whismanoid 0:68e64068330f 1118 } MAX11410_IDAC0_SEL_enum_t;
whismanoid 0:68e64068330f 1119
whismanoid 0:68e64068330f 1120 // CODE GENERATOR: TypedefEnum MAX11410_SIG_PATH_enum_t
whismanoid 0:68e64068330f 1121 //----------------------------------------
whismanoid 0:68e64068330f 1122 /// Input multiplexer channel selection
whismanoid 0:68e64068330f 1123 /// CMD_r000_1110_xxdd_xddd_PGA field SIG_PATH[1:0]
whismanoid 0:68e64068330f 1124 ///
whismanoid 0:68e64068330f 1125 /// - 00: Buffered, low-power, unity-gain path (PGA disabled, digital gain) [default]
whismanoid 0:68e64068330f 1126 /// - 01: Bypass path (signal buffer disabled,PGA disabled, digital gain)
whismanoid 0:68e64068330f 1127 /// - 10: PGA path (signal buffer disabled, analog gain)
whismanoid 0:68e64068330f 1128 /// - 11: Reserved
whismanoid 0:68e64068330f 1129 typedef enum MAX11410_SIG_PATH_enum_t {
whismanoid 0:68e64068330f 1130 SIG_PATH_00_BUFFERED = 0x00, //!< 8'b00000000
whismanoid 0:68e64068330f 1131 SIG_PATH_01_BYPASS = 0x01, //!< 8'b00000001
whismanoid 0:68e64068330f 1132 SIG_PATH_10_PGA = 0x02, //!< 8'b00000010
whismanoid 0:68e64068330f 1133 SIG_PATH_11_reserved = 0x03, //!< 8'b00000011
whismanoid 0:68e64068330f 1134 } MAX11410_SIG_PATH_enum_t;
whismanoid 0:68e64068330f 1135
whismanoid 0:68e64068330f 1136 // CODE GENERATOR: TypedefEnum MAX11410_GAIN_enum_t
whismanoid 0:68e64068330f 1137 //----------------------------------------
whismanoid 0:68e64068330f 1138 /// Input multiplexer channel selection
whismanoid 0:68e64068330f 1139 /// CMD_r000_1110_xxdd_xddd_PGA field GAIN[2:0]
whismanoid 0:68e64068330f 1140 ///
whismanoid 0:68e64068330f 1141 /// - 000: 1 (default)
whismanoid 0:68e64068330f 1142 /// - 001: 2
whismanoid 0:68e64068330f 1143 /// - 010: 4
whismanoid 0:68e64068330f 1144 /// - 011: 8
whismanoid 0:68e64068330f 1145 /// - 100: 16
whismanoid 0:68e64068330f 1146 /// - 101: 32
whismanoid 0:68e64068330f 1147 /// - 110: 64
whismanoid 0:68e64068330f 1148 /// - 111: 128
whismanoid 0:68e64068330f 1149 typedef enum MAX11410_GAIN_enum_t {
whismanoid 0:68e64068330f 1150 GAIN_000_1 = 0x00, //!< 8'b00000000
whismanoid 0:68e64068330f 1151 GAIN_001_2 = 0x01, //!< 8'b00000001
whismanoid 0:68e64068330f 1152 GAIN_010_4 = 0x02, //!< 8'b00000010
whismanoid 0:68e64068330f 1153 GAIN_011_8 = 0x03, //!< 8'b00000011
whismanoid 0:68e64068330f 1154 GAIN_100_16 = 0x04, //!< 8'b00000100
whismanoid 0:68e64068330f 1155 GAIN_101_32 = 0x05, //!< 8'b00000101
whismanoid 0:68e64068330f 1156 GAIN_110_64 = 0x06, //!< 8'b00000110
whismanoid 0:68e64068330f 1157 GAIN_111_128 = 0x07, //!< 8'b00000111
whismanoid 0:68e64068330f 1158 } MAX11410_GAIN_enum_t;
whismanoid 0:68e64068330f 1159
whismanoid 0:68e64068330f 1160 // TODO1: CODE GENERATOR: ic_variant -- IC's supported with this driver
whismanoid 0:68e64068330f 1161 /**
whismanoid 0:68e64068330f 1162 * @brief IC's supported with this driver
whismanoid 0:68e64068330f 1163 * @details MAX11410
whismanoid 0:68e64068330f 1164 */
whismanoid 0:68e64068330f 1165 typedef enum
whismanoid 0:68e64068330f 1166 {
whismanoid 0:68e64068330f 1167 MAX11410_IC = 0,
whismanoid 0:68e64068330f 1168 //MAX11410_IC = 1
whismanoid 0:68e64068330f 1169 } MAX11410_ic_t;
whismanoid 0:68e64068330f 1170
whismanoid 0:68e64068330f 1171 // TODO1: CODE GENERATOR: class constructor declaration
whismanoid 0:68e64068330f 1172 /**********************************************************//**
whismanoid 0:68e64068330f 1173 * @brief Constructor for MAX11410 Class.
whismanoid 0:68e64068330f 1174 *
whismanoid 0:68e64068330f 1175 * @details Requires an existing SPI object as well as a DigitalOut object.
whismanoid 0:68e64068330f 1176 * The DigitalOut object is used for a chip enable signal
whismanoid 0:68e64068330f 1177 *
whismanoid 0:68e64068330f 1178 * On Entry:
whismanoid 0:68e64068330f 1179 * @param[in] spi - pointer to existing SPI object
whismanoid 0:68e64068330f 1180 * @param[in] cs_pin - pointer to a DigitalOut pin object
whismanoid 0:68e64068330f 1181 * CODE GENERATOR: class constructor docstrings gpio InputPin pins
whismanoid 0:68e64068330f 1182 * CODE GENERATOR: class constructor docstrings gpio OutputPin pins
whismanoid 0:68e64068330f 1183 * @param[in] ic_variant - which type of MAX11410 is used
whismanoid 0:68e64068330f 1184 *
whismanoid 0:68e64068330f 1185 * On Exit:
whismanoid 0:68e64068330f 1186 *
whismanoid 0:68e64068330f 1187 * @return None
whismanoid 0:68e64068330f 1188 **************************************************************/
whismanoid 0:68e64068330f 1189 MAX11410(SPI &spi, DigitalOut &cs_pin, // SPI interface
whismanoid 0:68e64068330f 1190 // CODE GENERATOR: class constructor declaration gpio InputPin pins
whismanoid 0:68e64068330f 1191 // CODE GENERATOR: class constructor declaration gpio OutputPin pins
whismanoid 0:68e64068330f 1192 MAX11410_ic_t ic_variant);
whismanoid 0:68e64068330f 1193
whismanoid 0:68e64068330f 1194 // CODE GENERATOR: class destructor declaration
whismanoid 0:68e64068330f 1195 /************************************************************
whismanoid 0:68e64068330f 1196 * @brief Default destructor for MAX11410 Class.
whismanoid 0:68e64068330f 1197 *
whismanoid 0:68e64068330f 1198 * @details Destroys SPI object if owner
whismanoid 0:68e64068330f 1199 *
whismanoid 0:68e64068330f 1200 * On Entry:
whismanoid 0:68e64068330f 1201 *
whismanoid 0:68e64068330f 1202 * On Exit:
whismanoid 0:68e64068330f 1203 *
whismanoid 0:68e64068330f 1204 * @return None
whismanoid 0:68e64068330f 1205 **************************************************************/
whismanoid 0:68e64068330f 1206 ~MAX11410();
whismanoid 0:68e64068330f 1207
whismanoid 0:68e64068330f 1208 // CODE GENERATOR: Declare SPI diagnostic function pointer void onSPIprint()
whismanoid 0:68e64068330f 1209 /// Function pointer void f(size_t byteCount, uint8_t mosiData[], uint8_t misoData[])
whismanoid 0:68e64068330f 1210 Callback<void(size_t, uint8_t*, uint8_t*)> onSPIprint; //!< optional @ref onSPIprint SPI diagnostic function
whismanoid 0:68e64068330f 1211
whismanoid 0:68e64068330f 1212 // CODE GENERATOR: spi_frequency setter declaration
whismanoid 0:68e64068330f 1213 /// set SPI SCLK frequency
whismanoid 0:68e64068330f 1214 void spi_frequency(int spi_sclk_Hz);
whismanoid 0:68e64068330f 1215
whismanoid 1:d57c1a2cb83c 1216 // CODE GENERATOR: spi_frequency getter declaration and definition
whismanoid 1:d57c1a2cb83c 1217 /// get SPI SCLK frequency
whismanoid 1:d57c1a2cb83c 1218 int get_spi_frequency() const { return m_SPI_SCLK_Hz; }
whismanoid 1:d57c1a2cb83c 1219
whismanoid 1:d57c1a2cb83c 1220 // CODE GENERATOR: spi_dataMode getter declaration and definition
whismanoid 1:d57c1a2cb83c 1221 /// get SPI mode
whismanoid 1:d57c1a2cb83c 1222 int get_spi_dataMode() const { return m_SPI_dataMode; }
whismanoid 1:d57c1a2cb83c 1223
whismanoid 0:68e64068330f 1224 //----------------------------------------
whismanoid 0:68e64068330f 1225 // CODE GENERATOR: omit typedef enum MAX11410_device_t, class members instead of global device object
whismanoid 0:68e64068330f 1226 public:
whismanoid 0:68e64068330f 1227
whismanoid 1:d57c1a2cb83c 1228 /// AIN0-AIN1 reference voltage, in Volts
whismanoid 1:d57c1a2cb83c 1229 double VRef_REF0;
whismanoid 1:d57c1a2cb83c 1230
whismanoid 1:d57c1a2cb83c 1231 /// REF1P-REF1N reference voltage, in Volts
whismanoid 1:d57c1a2cb83c 1232 double VRef_REF1;
whismanoid 1:d57c1a2cb83c 1233
whismanoid 1:d57c1a2cb83c 1234 /// REF2P-REF2N reference voltage, in Volts
whismanoid 1:d57c1a2cb83c 1235 double VRef_REF2;
whismanoid 1:d57c1a2cb83c 1236
whismanoid 1:d57c1a2cb83c 1237 /// AVDD-AGND reference voltage, in Volts
whismanoid 1:d57c1a2cb83c 1238 double VRef_AVDD;
whismanoid 1:d57c1a2cb83c 1239
whismanoid 5:a2e74357cfc0 1240 /// RTD Resistance measurement; Thermocouple Cold Junction, in Ohms
whismanoid 5:a2e74357cfc0 1241 double rtd_resistance;
whismanoid 5:a2e74357cfc0 1242
whismanoid 5:a2e74357cfc0 1243 /// Temperature calculated from RTD Resistance; Thermocouple Cold Junction, in degrees C
whismanoid 3:658a93dfb2d8 1244 double RTD_Temperature;
whismanoid 3:658a93dfb2d8 1245
whismanoid 1:d57c1a2cb83c 1246 /// shadow of register ctrl CMD_r000_1001_dddd_dddd_CTRL
whismanoid 1:d57c1a2cb83c 1247 uint32_t ctrl;
whismanoid 1:d57c1a2cb83c 1248
whismanoid 1:d57c1a2cb83c 1249 /// read-only pga gain 1, 2, 4, 8, 16, 32, 64, or 128 set by Configure_PGA gain index register pga CMD_r000_1110_xxdd_xddd_PGA
whismanoid 1:d57c1a2cb83c 1250 uint8_t pgaGain;
whismanoid 0:68e64068330f 1251
whismanoid 0:68e64068330f 1252 /// shadow of register status CMD_r011_1000_dddd_dddd_dddd_dddd_dxxx_dddd_STATUS
whismanoid 0:68e64068330f 1253 uint32_t status;
whismanoid 0:68e64068330f 1254
whismanoid 0:68e64068330f 1255 /// shadow of register data0 CMD_r011_0000_dddd_dddd_dddd_dddd_dddd_dddd_DATA0
whismanoid 0:68e64068330f 1256 uint32_t data0;
whismanoid 0:68e64068330f 1257
whismanoid 1:d57c1a2cb83c 1258 /// Each channel's most recent value in LSBs.
whismanoid 1:d57c1a2cb83c 1259 /// Updated by Measure_Voltage function.
whismanoid 1:d57c1a2cb83c 1260 /// Use VoltageOfCode function to convert LSBs to physical voltage.
whismanoid 8:3a9dfa2e8234 1261 /// (Valid index range AINP_SEL_0000_AIN0 to AINP_SEL_1010_AVDD)
whismanoid 8:3a9dfa2e8234 1262 ///
whismanoid 8:3a9dfa2e8234 1263 uint32_t AINcode[11];
whismanoid 1:d57c1a2cb83c 1264
whismanoid 0:68e64068330f 1265 // CODE GENERATOR: omit global g_MAX11410_device
whismanoid 0:68e64068330f 1266
whismanoid 0:68e64068330f 1267 // CODE GENERATOR: extern function declarations
whismanoid 0:68e64068330f 1268 // CODE GENERATOR: extern function declaration SPIoutputCS
whismanoid 0:68e64068330f 1269 //----------------------------------------
whismanoid 0:68e64068330f 1270 // Assert SPI Chip Select
whismanoid 0:68e64068330f 1271 // SPI chip-select for MAX11410
whismanoid 0:68e64068330f 1272 //
whismanoid 0:68e64068330f 1273 void SPIoutputCS(int isLogicHigh);
whismanoid 0:68e64068330f 1274
whismanoid 0:68e64068330f 1275 // CODE GENERATOR: extern function declaration SPIwrite16bits
whismanoid 0:68e64068330f 1276 //----------------------------------------
whismanoid 0:68e64068330f 1277 // SPI write 16 bits
whismanoid 0:68e64068330f 1278 // SPI interface to MAX11410 shift 16 bits mosiData into MAX11410 DIN
whismanoid 0:68e64068330f 1279 //
whismanoid 0:68e64068330f 1280 void SPIwrite16bits(int16_t mosiData16);
whismanoid 0:68e64068330f 1281
whismanoid 0:68e64068330f 1282 // CODE GENERATOR: extern function declaration SPIreadWrite16bits
whismanoid 0:68e64068330f 1283 //----------------------------------------
whismanoid 0:68e64068330f 1284 // SPI read and write 16 bits
whismanoid 0:68e64068330f 1285 // SPI interface to MAX11410 shift 16 bits mosiData16 into MAX11410 DIN
whismanoid 0:68e64068330f 1286 // while simultaneously capturing 16 bits miso data from MAX11410 DOUT
whismanoid 0:68e64068330f 1287 //
whismanoid 0:68e64068330f 1288 int16_t SPIreadWrite16bits(int16_t mosiData16);
whismanoid 0:68e64068330f 1289
whismanoid 0:68e64068330f 1290 // CODE GENERATOR: extern function declaration SPIreadWrite32bits
whismanoid 0:68e64068330f 1291 //----------------------------------------
whismanoid 0:68e64068330f 1292 // SPI read and write 32 bits
whismanoid 0:68e64068330f 1293 // SPI interface to MAX11410 shift 32 bits mosiData into MAX11410 DIN
whismanoid 0:68e64068330f 1294 // while simultaneously capturing 32 bits miso data from MAX11410 DOUT
whismanoid 0:68e64068330f 1295 //
whismanoid 0:68e64068330f 1296 int32_t SPIreadWrite32bits(int32_t mosiData32);
whismanoid 0:68e64068330f 1297
whismanoid 0:68e64068330f 1298 // CODE GENERATOR: class member data
whismanoid 0:68e64068330f 1299 private:
whismanoid 0:68e64068330f 1300 // CODE GENERATOR: class member data for SPI interface
whismanoid 0:68e64068330f 1301 // SPI object
whismanoid 0:68e64068330f 1302 SPI &m_spi;
whismanoid 0:68e64068330f 1303 int m_SPI_SCLK_Hz;
whismanoid 0:68e64068330f 1304 int m_SPI_dataMode;
whismanoid 0:68e64068330f 1305 int m_SPI_cs_state;
whismanoid 0:68e64068330f 1306
whismanoid 0:68e64068330f 1307 // Selector pin object
whismanoid 0:68e64068330f 1308 DigitalOut &m_cs_pin;
whismanoid 0:68e64068330f 1309
whismanoid 0:68e64068330f 1310 // CODE GENERATOR: class member data for gpio InputPin pins
whismanoid 0:68e64068330f 1311 // CODE GENERATOR: class member data for gpio OutputPin pins
whismanoid 0:68e64068330f 1312
whismanoid 0:68e64068330f 1313 // Identifies which IC variant is being used
whismanoid 0:68e64068330f 1314 MAX11410_ic_t m_ic_variant;
whismanoid 0:68e64068330f 1315
whismanoid 0:68e64068330f 1316 public:
whismanoid 0:68e64068330f 1317
whismanoid 0:68e64068330f 1318 // CODE GENERATOR: class member function declarations
whismanoid 0:68e64068330f 1319 //----------------------------------------
whismanoid 0:68e64068330f 1320 /// Menu item '!'
whismanoid 0:68e64068330f 1321 /// Initialize device
whismanoid 0:68e64068330f 1322 /// @return 1 on success; 0 on failure
whismanoid 0:68e64068330f 1323 uint8_t Init(void);
whismanoid 0:68e64068330f 1324
whismanoid 0:68e64068330f 1325 //----------------------------------------
whismanoid 1:d57c1a2cb83c 1326 /// Return the physical voltage corresponding to conversion result,
whismanoid 1:d57c1a2cb83c 1327 /// for unipolar mode.
whismanoid 0:68e64068330f 1328 /// Does not perform any offset or gain correction.
whismanoid 0:68e64068330f 1329 ///
whismanoid 1:d57c1a2cb83c 1330 /// @pre CTRL::U_BN = 1 -- Unipolar mode
whismanoid 1:d57c1a2cb83c 1331 /// @pre CTRL::FORMAT = x
whismanoid 1:d57c1a2cb83c 1332 /// @pre g_MAX11410_device.VRef = Voltage of REF input, in Volts
whismanoid 1:d57c1a2cb83c 1333 /// @param[in] value_u24: raw 24-bit MAX11410 code (right justified).
whismanoid 1:d57c1a2cb83c 1334 /// @return physical voltage corresponding to MAX11410 code.
whismanoid 4:c169ba85d673 1335 /// @test group UNIPOLAR VoltageOfCode_Unipolar(0xFFFFFF) expect 2.500 within 0.030 Full Scale
whismanoid 4:c169ba85d673 1336 /// @test group UNIPOLAR VoltageOfCode_Unipolar(0xFFFFFE) expect 2.500 Full Scale
whismanoid 4:c169ba85d673 1337 /// @test group UNIPOLAR VoltageOfCode_Unipolar(0xCCCCCC) expect 2.000 Two Volts
whismanoid 4:c169ba85d673 1338 /// @test group UNIPOLAR VoltageOfCode_Unipolar(0xC00000) expect 1.875 75% Scale
whismanoid 4:c169ba85d673 1339 /// @test group UNIPOLAR VoltageOfCode_Unipolar(0x800000) expect 1.250 Mid Scale
whismanoid 4:c169ba85d673 1340 /// @test group UNIPOLAR VoltageOfCode_Unipolar(0x666666) expect 1.000 One Volt
whismanoid 4:c169ba85d673 1341 /// @test group UNIPOLAR VoltageOfCode_Unipolar(0x400000) expect 0.625 25% Scale
whismanoid 4:c169ba85d673 1342 /// @test group UNIPOLAR VoltageOfCode_Unipolar(0x0A3D70) expect 0.100 100mV
whismanoid 4:c169ba85d673 1343 /// @test group UNIPOLAR VoltageOfCode_Unipolar(0x000064) expect 0.000014901162 100 LSB
whismanoid 4:c169ba85d673 1344 /// @test group UNIPOLAR VoltageOfCode_Unipolar(0x00000A) expect 0.0000014901162 Ten LSB
whismanoid 4:c169ba85d673 1345 /// @test group UNIPOLAR VoltageOfCode_Unipolar(0x000003) expect 0.00000044703483 Three LSB
whismanoid 4:c169ba85d673 1346 /// @test group UNIPOLAR VoltageOfCode_Unipolar(0x000002) expect 0.00000029802326 Two LSB
whismanoid 4:c169ba85d673 1347 /// @test group UNIPOLAR VoltageOfCode_Unipolar(0x000001) expect 0.00000014901162 One LSB
whismanoid 4:c169ba85d673 1348 /// @test group UNIPOLAR VoltageOfCode_Unipolar(0x000000) expect 0.0 Zero Scale
whismanoid 1:d57c1a2cb83c 1349 ///
whismanoid 1:d57c1a2cb83c 1350 double VoltageOfCode_Unipolar(uint32_t value_u24);
whismanoid 1:d57c1a2cb83c 1351
whismanoid 1:d57c1a2cb83c 1352 //----------------------------------------
whismanoid 1:d57c1a2cb83c 1353 /// Return the physical voltage corresponding to conversion result,
whismanoid 1:d57c1a2cb83c 1354 /// when conversion format is Bipolar mode, offset binary.
whismanoid 1:d57c1a2cb83c 1355 /// Does not perform any offset or gain correction.
whismanoid 1:d57c1a2cb83c 1356 ///
whismanoid 1:d57c1a2cb83c 1357 /// @pre CTRL::U_BN = 0 -- Bipolar mode
whismanoid 1:d57c1a2cb83c 1358 /// @pre CTRL::FORMAT = 1 -- offset binary
whismanoid 0:68e64068330f 1359 /// @pre g_MAX11410_device.VRef = Voltage of REF input, in Volts
whismanoid 0:68e64068330f 1360 /// @param[in] value_u24: raw 24-bit MAX11410 code (right justified).
whismanoid 0:68e64068330f 1361 /// @return physical voltage corresponding to MAX11410 code.
whismanoid 4:c169ba85d673 1362 /// @test group BIPOB VoltageOfCode_Bipolar_OffsetBinary(0xFFFFFF) expect 2.5 within 0.030 Full Scale
whismanoid 4:c169ba85d673 1363 /// @test group BIPOB VoltageOfCode_Bipolar_OffsetBinary(0xFFFFFE) expect 2.5 Full Scale
whismanoid 4:c169ba85d673 1364 /// @test group BIPOB VoltageOfCode_Bipolar_OffsetBinary(0xC00000) expect 1.25 Mid Scale
whismanoid 4:c169ba85d673 1365 /// @test group BIPOB VoltageOfCode_Bipolar_OffsetBinary(0x800003) expect 0.00000894069671 Three LSB
whismanoid 4:c169ba85d673 1366 /// @test group BIPOB VoltageOfCode_Bipolar_OffsetBinary(0x800002) expect 0.00000596046447 Two LSB
whismanoid 4:c169ba85d673 1367 /// @test group BIPOB VoltageOfCode_Bipolar_OffsetBinary(0x800001) expect 0.0000029802326 One LSB
whismanoid 4:c169ba85d673 1368 /// @test group BIPOB VoltageOfCode_Bipolar_OffsetBinary(0x800000) expect 0.0 Zero Scale
whismanoid 4:c169ba85d673 1369 /// @test group BIPOB VoltageOfCode_Bipolar_OffsetBinary(0x7FFFFF) expect -0.0000029802326 Negative One LSB
whismanoid 4:c169ba85d673 1370 /// @test group BIPOB VoltageOfCode_Bipolar_OffsetBinary(0x7FFFFE) expect -0.0000059604644 Negative Two LSB
whismanoid 4:c169ba85d673 1371 /// @test group BIPOB VoltageOfCode_Bipolar_OffsetBinary(0x7FFFFD) expect -0.0000089406967 Negative Three LSB
whismanoid 4:c169ba85d673 1372 /// @test group BIPOB VoltageOfCode_Bipolar_OffsetBinary(0x400000) expect -1.25 Negative Mid Scale
whismanoid 4:c169ba85d673 1373 /// @test group BIPOB VoltageOfCode_Bipolar_OffsetBinary(0x000001) expect -2.5 Negative Full Scale
whismanoid 4:c169ba85d673 1374 /// @test group BIPOB VoltageOfCode_Bipolar_OffsetBinary(0x000000) expect -2.5 Negative Full Scale
whismanoid 1:d57c1a2cb83c 1375 ///
whismanoid 1:d57c1a2cb83c 1376 double VoltageOfCode_Bipolar_OffsetBinary(uint32_t value_u24);
whismanoid 1:d57c1a2cb83c 1377
whismanoid 1:d57c1a2cb83c 1378 //----------------------------------------
whismanoid 1:d57c1a2cb83c 1379 /// Return the physical voltage corresponding to conversion result,
whismanoid 1:d57c1a2cb83c 1380 /// when conversion format is Bipolar mode, 2's complement.
whismanoid 1:d57c1a2cb83c 1381 /// Does not perform any offset or gain correction.
whismanoid 1:d57c1a2cb83c 1382 ///
whismanoid 1:d57c1a2cb83c 1383 /// @pre CTRL::U_BN = 0 -- Bipolar mode
whismanoid 1:d57c1a2cb83c 1384 /// @pre CTRL::FORMAT = 0 -- 2's complement
whismanoid 1:d57c1a2cb83c 1385 /// @pre g_MAX11410_device.VRef = Voltage of REF input, in Volts
whismanoid 1:d57c1a2cb83c 1386 /// @param[in] value_u24: raw 24-bit MAX11410 code (right justified).
whismanoid 1:d57c1a2cb83c 1387 /// @return physical voltage corresponding to MAX11410 code.
whismanoid 4:c169ba85d673 1388 /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0x7FFFFF) expect 2.500 within 0.030 Full Scale
whismanoid 4:c169ba85d673 1389 /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0x7FFFFE) expect 2.500 Full Scale
whismanoid 4:c169ba85d673 1390 /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0x666666) expect 2.000 Two Volts
whismanoid 4:c169ba85d673 1391 /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0x600000) expect 1.875 75% Scale
whismanoid 4:c169ba85d673 1392 /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0x400000) expect 1.250 Mid Scale
whismanoid 4:c169ba85d673 1393 /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0x333333) expect 1.000 One Volt
whismanoid 4:c169ba85d673 1394 /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0x200000) expect 0.625 25% Scale
whismanoid 4:c169ba85d673 1395 /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0x051eb8) expect 0.100 100mV
whismanoid 4:c169ba85d673 1396 /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0x000003) expect 0.00000894069671 Three LSB
whismanoid 4:c169ba85d673 1397 /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0x000002) expect 0.00000596046447 Two LSB
whismanoid 4:c169ba85d673 1398 /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0x000001) expect 0.0000029802326 One LSB
whismanoid 4:c169ba85d673 1399 /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0x000000) expect 0.0 Zero Scale
whismanoid 4:c169ba85d673 1400 /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0xFFFFFF) expect -0.0000029802326 Negative One LSB
whismanoid 4:c169ba85d673 1401 /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0xFFFFFE) expect -0.0000059604644 Negative Two LSB
whismanoid 4:c169ba85d673 1402 /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0xFFFFFD) expect -0.0000089406967 Negative Three LSB
whismanoid 4:c169ba85d673 1403 /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0xFAE148) expect -0.100 Negative 100mV
whismanoid 4:c169ba85d673 1404 /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0xE00000) expect -0.625 Negative 25% Scale
whismanoid 4:c169ba85d673 1405 /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0xCCCCCD) expect -1.000 Negative One Volt
whismanoid 4:c169ba85d673 1406 /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0xC00000) expect -1.250 Negative Mid Scale
whismanoid 4:c169ba85d673 1407 /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0xA00000) expect -1.875 Negative 75% Scale
whismanoid 4:c169ba85d673 1408 /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0x99999A) expect -2.000 Negative Two Volts
whismanoid 4:c169ba85d673 1409 /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0x800001) expect -2.500 Negative Full Scale
whismanoid 4:c169ba85d673 1410 /// @test group BIP2C VoltageOfCode_Bipolar_2sComplement(0x800000) expect -2.500 Negative Full Scale
whismanoid 1:d57c1a2cb83c 1411 ///
whismanoid 1:d57c1a2cb83c 1412 double VoltageOfCode_Bipolar_2sComplement(uint32_t value_u24);
whismanoid 1:d57c1a2cb83c 1413
whismanoid 1:d57c1a2cb83c 1414 //----------------------------------------
whismanoid 1:d57c1a2cb83c 1415 /// Return the physical voltage corresponding to conversion result,
whismanoid 1:d57c1a2cb83c 1416 /// when conversion format is determined by the CTRL register.
whismanoid 1:d57c1a2cb83c 1417 /// Does not perform any offset or gain correction.
whismanoid 1:d57c1a2cb83c 1418 ///
whismanoid 1:d57c1a2cb83c 1419 /// @pre CTRL::U_BN and CTRL::FORMAT = 0 select offset binary, 2's complement, or straight binary
whismanoid 1:d57c1a2cb83c 1420 /// @pre g_MAX11410_device.VRef = Voltage of REF input, in Volts
whismanoid 1:d57c1a2cb83c 1421 /// @param[in] value_u24: raw 24-bit MAX11410 code (right justified).
whismanoid 1:d57c1a2cb83c 1422 /// @return physical voltage corresponding to MAX11410 code.
whismanoid 1:d57c1a2cb83c 1423 double VoltageOfCode(uint32_t value_u24);
whismanoid 0:68e64068330f 1424
whismanoid 0:68e64068330f 1425 // CODE GENERATOR: looks like this is a register access function because 'regAdd'
whismanoid 0:68e64068330f 1426 // CODE GENERATOR: looks like this is a 'write' register access function
whismanoid 0:68e64068330f 1427 // CODE GENERATOR: looks like this is a register access function because 'regAdd'
whismanoid 0:68e64068330f 1428 // CODE GENERATOR: looks like this is a 'write' register access function: omit this function from test menu
whismanoid 0:68e64068330f 1429 //----------------------------------------
whismanoid 0:68e64068330f 1430 /// Write a MAX11410 register.
whismanoid 0:68e64068330f 1431 ///
whismanoid 0:68e64068330f 1432 /// CMD_1aaa_aaaa_REGISTER_READ bit is cleared 0 indicating a write operation.
whismanoid 0:68e64068330f 1433 ///
whismanoid 0:68e64068330f 1434 /// MAX11410 register length can be determined by function RegSize.
whismanoid 0:68e64068330f 1435 ///
whismanoid 0:68e64068330f 1436 /// For 8-bit register size:
whismanoid 0:68e64068330f 1437 ///
whismanoid 0:68e64068330f 1438 /// SPI 16-bit transfer
whismanoid 0:68e64068330f 1439 ///
whismanoid 0:68e64068330f 1440 /// SPI MOSI = 0aaa_aaaa_dddd_dddd
whismanoid 0:68e64068330f 1441 ///
whismanoid 0:68e64068330f 1442 /// SPI MISO = xxxx_xxxx_xxxx_xxxx
whismanoid 0:68e64068330f 1443 ///
whismanoid 0:68e64068330f 1444 /// For 16-bit register size:
whismanoid 0:68e64068330f 1445 ///
whismanoid 0:68e64068330f 1446 /// SPI 24-bit or 32-bit transfer
whismanoid 0:68e64068330f 1447 ///
whismanoid 0:68e64068330f 1448 /// SPI MOSI = 0aaa_aaaa_dddd_dddd_dddd_dddd
whismanoid 0:68e64068330f 1449 ///
whismanoid 0:68e64068330f 1450 /// SPI MISO = xxxx_xxxx_xxxx_xxxx_xxxx_xxxx
whismanoid 0:68e64068330f 1451 ///
whismanoid 0:68e64068330f 1452 /// For 24-bit register size:
whismanoid 0:68e64068330f 1453 ///
whismanoid 0:68e64068330f 1454 /// SPI 32-bit transfer
whismanoid 0:68e64068330f 1455 ///
whismanoid 0:68e64068330f 1456 /// SPI MOSI = 0aaa_aaaa_dddd_dddd_dddd_dddd_dddd_dddd
whismanoid 0:68e64068330f 1457 ///
whismanoid 0:68e64068330f 1458 /// SPI MISO = xxxx_xxxx_xxxx_xxxx_xxxx_xxxx_xxxx_xxxx
whismanoid 0:68e64068330f 1459 ///
whismanoid 0:68e64068330f 1460 /// @return 1 on success; 0 on failure
whismanoid 0:68e64068330f 1461 uint8_t RegWrite(MAX11410_CMD_enum_t regAddress, uint32_t regData);
whismanoid 0:68e64068330f 1462
whismanoid 0:68e64068330f 1463 // CODE GENERATOR: looks like this is a register access function because 'regAdd'
whismanoid 0:68e64068330f 1464 // CODE GENERATOR: looks like this is a 'read' register access function
whismanoid 0:68e64068330f 1465 // CODE GENERATOR: looks like this is a register access function because 'regAdd'
whismanoid 0:68e64068330f 1466 // CODE GENERATOR: looks like this is a 'read' register access function: omit this function from test menu
whismanoid 0:68e64068330f 1467 //----------------------------------------
whismanoid 0:68e64068330f 1468 /// Read an 8-bit MAX11410 register
whismanoid 0:68e64068330f 1469 ///
whismanoid 0:68e64068330f 1470 /// CMD_1aaa_aaaa_REGISTER_READ bit is set 1 indicating a read operation.
whismanoid 0:68e64068330f 1471 ///
whismanoid 0:68e64068330f 1472 /// MAX11410 register length can be determined by function RegSize.
whismanoid 0:68e64068330f 1473 ///
whismanoid 0:68e64068330f 1474 /// For 8-bit register size:
whismanoid 0:68e64068330f 1475 ///
whismanoid 0:68e64068330f 1476 /// SPI 16-bit transfer
whismanoid 0:68e64068330f 1477 ///
whismanoid 0:68e64068330f 1478 /// SPI MOSI = 1aaa_aaaa_0000_0000
whismanoid 0:68e64068330f 1479 ///
whismanoid 0:68e64068330f 1480 /// SPI MISO = xxxx_xxxx_dddd_dddd
whismanoid 0:68e64068330f 1481 ///
whismanoid 0:68e64068330f 1482 /// For 16-bit register size:
whismanoid 0:68e64068330f 1483 ///
whismanoid 0:68e64068330f 1484 /// SPI 24-bit or 32-bit transfer
whismanoid 0:68e64068330f 1485 ///
whismanoid 0:68e64068330f 1486 /// SPI MOSI = 1aaa_aaaa_0000_0000_0000_0000
whismanoid 0:68e64068330f 1487 ///
whismanoid 0:68e64068330f 1488 /// SPI MISO = xxxx_xxxx_dddd_dddd_dddd_dddd
whismanoid 0:68e64068330f 1489 ///
whismanoid 0:68e64068330f 1490 /// For 24-bit register size:
whismanoid 0:68e64068330f 1491 ///
whismanoid 0:68e64068330f 1492 /// SPI 32-bit transfer
whismanoid 0:68e64068330f 1493 ///
whismanoid 0:68e64068330f 1494 /// SPI MOSI = 1aaa_aaaa_0000_0000_0000_0000_0000_0000
whismanoid 0:68e64068330f 1495 ///
whismanoid 0:68e64068330f 1496 /// SPI MISO = xxxx_xxxx_dddd_dddd_dddd_dddd_dddd_dddd
whismanoid 0:68e64068330f 1497 ///
whismanoid 0:68e64068330f 1498 ///
whismanoid 0:68e64068330f 1499 /// @return 1 on success; 0 on failure
whismanoid 0:68e64068330f 1500 uint8_t RegRead(MAX11410_CMD_enum_t regAddress, uint32_t* ptrRegData);
whismanoid 0:68e64068330f 1501
whismanoid 0:68e64068330f 1502 // CODE GENERATOR: looks like this is a register access function because 'regAdd'
whismanoid 0:68e64068330f 1503 // CODE GENERATOR: looks like this is a 'size' register access function
whismanoid 0:68e64068330f 1504 //----------------------------------------
whismanoid 0:68e64068330f 1505 /// Return the size of a MAX11410 register
whismanoid 0:68e64068330f 1506 ///
whismanoid 0:68e64068330f 1507 /// @return 8 for 8-bit, 16 for 16-bit, 24 for 24-bit, else 0 for undefined register size
whismanoid 0:68e64068330f 1508 uint8_t RegSize(MAX11410_CMD_enum_t regAddress);
whismanoid 0:68e64068330f 1509
whismanoid 0:68e64068330f 1510 // CODE GENERATOR: looks like this is a register access function because 'regAdd'
whismanoid 0:68e64068330f 1511 // CODE GENERATOR: looks like this is a 'name' register access function
whismanoid 0:68e64068330f 1512 //----------------------------------------
whismanoid 0:68e64068330f 1513 /// Return the name of a MAX11410 register
whismanoid 0:68e64068330f 1514 ///
whismanoid 0:68e64068330f 1515 /// @return null-terminated constant C string containing register name or empty string
whismanoid 0:68e64068330f 1516 const char* RegName(MAX11410_CMD_enum_t regAddress);
whismanoid 0:68e64068330f 1517
whismanoid 0:68e64068330f 1518 //----------------------------------------
whismanoid 1:d57c1a2cb83c 1519 /// Menu item 'XF'
whismanoid 1:d57c1a2cb83c 1520 ///
whismanoid 1:d57c1a2cb83c 1521 /// FILTER Select Filter and Rate.
whismanoid 1:d57c1a2cb83c 1522 /// Sets conversion rate based on RATE, LINEF, and CONV_TYPE value. See Table 9a through Table 9d for details.
whismanoid 1:d57c1a2cb83c 1523 /// For CONV_TYPE_01_Continuous, linef=LINEF_11_SINC4, rate=RATE_0100 selects output data rate 60SPS.
whismanoid 1:d57c1a2cb83c 1524 ///
whismanoid 1:d57c1a2cb83c 1525 /// @param[in] linef = filter type, default=MAX11410::MAX11410_LINEF_enum_t::LINEF_11_SINC4
whismanoid 1:d57c1a2cb83c 1526 /// @param[in] rate = output data rate selection, default=MAX11410::MAX11410_RATE_enum_t::RATE_0100
whismanoid 1:d57c1a2cb83c 1527 ///
whismanoid 1:d57c1a2cb83c 1528 /// @return 1 on success; 0 on failure
whismanoid 1:d57c1a2cb83c 1529 uint8_t Configure_FILTER(uint8_t linef, uint8_t rate);
whismanoid 1:d57c1a2cb83c 1530
whismanoid 1:d57c1a2cb83c 1531 //----------------------------------------
whismanoid 1:d57c1a2cb83c 1532 /// Menu item 'XP'
whismanoid 1:d57c1a2cb83c 1533 ///
whismanoid 1:d57c1a2cb83c 1534 /// PGA Select Gain and Signal Path.
whismanoid 1:d57c1a2cb83c 1535 ///
whismanoid 1:d57c1a2cb83c 1536 /// @param[in] sigpath = signal path, default=MAX11410::MAX11410_SIG_PATH_enum_t::SIG_PATH_00_BUFFERED
whismanoid 1:d57c1a2cb83c 1537 /// @param[in] gain = gain selection, default=MAX11410::MAX11410_GAIN_enum_t::GAIN_000_1
whismanoid 1:d57c1a2cb83c 1538 ///
whismanoid 1:d57c1a2cb83c 1539 /// @return 1 on success; 0 on failure
whismanoid 1:d57c1a2cb83c 1540 uint8_t Configure_PGA(uint8_t sigpath, uint8_t gain);
whismanoid 1:d57c1a2cb83c 1541
whismanoid 1:d57c1a2cb83c 1542 //----------------------------------------
whismanoid 1:d57c1a2cb83c 1543 /// Menu item 'XC'
whismanoid 1:d57c1a2cb83c 1544 ///
whismanoid 1:d57c1a2cb83c 1545 /// CTRL Select clock, format, and reference.
whismanoid 1:d57c1a2cb83c 1546 ///
whismanoid 1:d57c1a2cb83c 1547 /// @param[in] extclk = external clock enable, default=0
whismanoid 1:d57c1a2cb83c 1548 /// @param[in] u_bn = unipolar input range enable, default=0
whismanoid 1:d57c1a2cb83c 1549 /// @param[in] format = offset binary format enable, default=0
whismanoid 1:d57c1a2cb83c 1550 /// @param[in] refbufp_en = REFP reference buffer enable, default=0
whismanoid 1:d57c1a2cb83c 1551 /// @param[in] refbufn_en = REFN reference buffer enable, default=0
whismanoid 1:d57c1a2cb83c 1552 /// @param[in] ref_sel = reference selection, default=MAX11410::MAX11410_REF_SEL_enum_t::REF_SEL_001_REF1P_REF1N
whismanoid 1:d57c1a2cb83c 1553 ///
whismanoid 1:d57c1a2cb83c 1554 /// @return 1 on success; 0 on failure
whismanoid 1:d57c1a2cb83c 1555 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 1556
whismanoid 1:d57c1a2cb83c 1557 //----------------------------------------
whismanoid 1:d57c1a2cb83c 1558 /// Menu item 'XS'
whismanoid 1:d57c1a2cb83c 1559 ///
whismanoid 1:d57c1a2cb83c 1560 /// SOURCE Configure voltage bias source, current source, burnout mode
whismanoid 1:d57c1a2cb83c 1561 ///
whismanoid 1:d57c1a2cb83c 1562 /// @param[in] vbias_mode = _______, default=MAX11410::MAX11410_VBIAS_MODE_enum_t::VBIAS_MODE_00_Active
whismanoid 1:d57c1a2cb83c 1563 /// @param[in] brn_mode = _______, default=MAX11410::MAX11410_BRN_MODE_enum_t::BRN_MODE_00_disabled
whismanoid 1:d57c1a2cb83c 1564 /// @param[in] idac_mode = _______, default=MAX11410::MAX11410_IDAC_MODE_enum_t::IDAC_MODE_0000_10uA
whismanoid 1:d57c1a2cb83c 1565 ///
whismanoid 1:d57c1a2cb83c 1566 /// @return 1 on success; 0 on failure
whismanoid 1:d57c1a2cb83c 1567 uint8_t Configure_SOURCE(uint8_t vbias_mode, uint8_t brn_mode, uint8_t idac_mode);
whismanoid 1:d57c1a2cb83c 1568
whismanoid 1:d57c1a2cb83c 1569 //----------------------------------------
whismanoid 1:d57c1a2cb83c 1570 /// Menu item 'XM'
whismanoid 1:d57c1a2cb83c 1571 ///
whismanoid 1:d57c1a2cb83c 1572 /// MUX_CTRL0 Select pins for analog input AINP and AINN
whismanoid 1:d57c1a2cb83c 1573 ///
whismanoid 1:d57c1a2cb83c 1574 /// @param[in] ainp = channel high side, default=MAX11410::MAX11410_AINP_SEL_enum_t::AINP_SEL_0000_AIN0
whismanoid 1:d57c1a2cb83c 1575 /// @param[in] ainn = channel low side, default=MAX11410::MAX11410_AINN_SEL_enum_t::AINN_SEL_1010_GND
whismanoid 1:d57c1a2cb83c 1576 ///
whismanoid 1:d57c1a2cb83c 1577 /// @return 1 on success; 0 on failure
whismanoid 1:d57c1a2cb83c 1578 uint8_t Configure_MUX_CTRL0(uint8_t ainp, uint8_t ainn);
whismanoid 1:d57c1a2cb83c 1579
whismanoid 1:d57c1a2cb83c 1580 //----------------------------------------
whismanoid 1:d57c1a2cb83c 1581 /// Menu item 'XI'
whismanoid 1:d57c1a2cb83c 1582 ///
whismanoid 1:d57c1a2cb83c 1583 /// MUX_CTRL1 Select pins for current source
whismanoid 1:d57c1a2cb83c 1584 ///
whismanoid 1:d57c1a2cb83c 1585 /// @param[in] idac1_sel = channel high side, default=MAX11410::MAX11410_IDAC1_SEL_enum_t::IDAC1_SEL_1111_unconnected
whismanoid 1:d57c1a2cb83c 1586 /// @param[in] idac0_sel = channel low side, default=MAX11410::MAX11410_IDAC0_SEL_enum_t::IDAC0_SEL_1111_unconnected
whismanoid 1:d57c1a2cb83c 1587 ///
whismanoid 1:d57c1a2cb83c 1588 /// @return 1 on success; 0 on failure
whismanoid 1:d57c1a2cb83c 1589 uint8_t Configure_MUX_CTRL1(uint8_t idac1_sel, uint8_t idac0_sel);
whismanoid 1:d57c1a2cb83c 1590
whismanoid 1:d57c1a2cb83c 1591 //----------------------------------------
whismanoid 1:d57c1a2cb83c 1592 /// Menu item 'XV'
whismanoid 1:d57c1a2cb83c 1593 ///
whismanoid 1:d57c1a2cb83c 1594 /// MUX_CTRL2 Select pins for voltage bias source
whismanoid 1:d57c1a2cb83c 1595 ///
whismanoid 1:d57c1a2cb83c 1596 /// @param[in] vbias_ain7_ain0_bitmap = bit map of AIN7..AIN0 enables for voltage bias, default=0
whismanoid 1:d57c1a2cb83c 1597 ///
whismanoid 1:d57c1a2cb83c 1598 /// @return 1 on success; 0 on failure
whismanoid 1:d57c1a2cb83c 1599 uint8_t Configure_MUX_CTRL2(uint8_t vbias_ain7_ain0_bitmap);
whismanoid 1:d57c1a2cb83c 1600
whismanoid 1:d57c1a2cb83c 1601 //----------------------------------------
whismanoid 1:d57c1a2cb83c 1602 /// Menu item 'X0'
whismanoid 1:d57c1a2cb83c 1603 ///
whismanoid 1:d57c1a2cb83c 1604 /// CAL_START Calibrate Self Offset and Gain.
whismanoid 1:d57c1a2cb83c 1605 ///
whismanoid 1:d57c1a2cb83c 1606 /// @return 1 on success; 0 on failure
whismanoid 1:d57c1a2cb83c 1607 uint8_t Calibrate_Self_Offset_Gain(void);
whismanoid 1:d57c1a2cb83c 1608
whismanoid 1:d57c1a2cb83c 1609 //----------------------------------------
whismanoid 1:d57c1a2cb83c 1610 /// Menu item 'X1'
whismanoid 1:d57c1a2cb83c 1611 ///
whismanoid 1:d57c1a2cb83c 1612 /// CAL_START Calibrate Selected PGA.
whismanoid 1:d57c1a2cb83c 1613 ///
whismanoid 1:d57c1a2cb83c 1614 /// @return 1 on success; 0 on failure
whismanoid 1:d57c1a2cb83c 1615 uint8_t Calibrate_PGA_Gain(void);
whismanoid 1:d57c1a2cb83c 1616
whismanoid 1:d57c1a2cb83c 1617 //----------------------------------------
whismanoid 1:d57c1a2cb83c 1618 /// Menu item 'X4'
whismanoid 1:d57c1a2cb83c 1619 ///
whismanoid 1:d57c1a2cb83c 1620 /// CAL_START Calibrate System Offset A.
whismanoid 1:d57c1a2cb83c 1621 ///
whismanoid 1:d57c1a2cb83c 1622 /// @return 1 on success; 0 on failure
whismanoid 1:d57c1a2cb83c 1623 uint8_t Calibrate_System_Offset_A(void);
whismanoid 1:d57c1a2cb83c 1624
whismanoid 1:d57c1a2cb83c 1625 //----------------------------------------
whismanoid 1:d57c1a2cb83c 1626 /// Menu item 'X5'
whismanoid 1:d57c1a2cb83c 1627 ///
whismanoid 1:d57c1a2cb83c 1628 /// X6 0x03 CAL_START 0x06 Calibrate System Offset B
whismanoid 1:d57c1a2cb83c 1629 /// X7 0x03 CAL_START 0x07 Calibrate System Gain B
whismanoid 1:d57c1a2cb83c 1630 /// CAL_START Calibrate System Gain A.
whismanoid 1:d57c1a2cb83c 1631 ///
whismanoid 1:d57c1a2cb83c 1632 /// @return 1 on success; 0 on failure
whismanoid 1:d57c1a2cb83c 1633 uint8_t Calibrate_System_Gain_A(void);
whismanoid 1:d57c1a2cb83c 1634
whismanoid 1:d57c1a2cb83c 1635 //----------------------------------------
whismanoid 1:d57c1a2cb83c 1636 /// Menu item 'X6'
whismanoid 1:d57c1a2cb83c 1637 ///
whismanoid 1:d57c1a2cb83c 1638 /// CAL_START Calibrate System Offset B.
whismanoid 1:d57c1a2cb83c 1639 ///
whismanoid 1:d57c1a2cb83c 1640 /// @return 1 on success; 0 on failure
whismanoid 1:d57c1a2cb83c 1641 uint8_t Calibrate_System_Offset_B(void);
whismanoid 1:d57c1a2cb83c 1642
whismanoid 1:d57c1a2cb83c 1643 //----------------------------------------
whismanoid 1:d57c1a2cb83c 1644 /// Menu item 'X7'
whismanoid 1:d57c1a2cb83c 1645 ///
whismanoid 1:d57c1a2cb83c 1646 /// CAL_START Calibrate System Gain B.
whismanoid 1:d57c1a2cb83c 1647 ///
whismanoid 1:d57c1a2cb83c 1648 /// @return 1 on success; 0 on failure
whismanoid 1:d57c1a2cb83c 1649 uint8_t Calibrate_System_Gain_B(void);
whismanoid 1:d57c1a2cb83c 1650
whismanoid 1:d57c1a2cb83c 1651 //----------------------------------------
whismanoid 0:68e64068330f 1652 /// Configure Measurement for voltage input.
whismanoid 0:68e64068330f 1653 ///
whismanoid 0:68e64068330f 1654 /// Example code for typical voltage measurement.
whismanoid 0:68e64068330f 1655 ///
whismanoid 0:68e64068330f 1656 /// SPI register write sequence test AIN0-AGND voltage input using REF2=2.5V
whismanoid 0:68e64068330f 1657 /// write8 0x00 PD = 0x03 (Reset Registers; enter Standby mode)
whismanoid 0:68e64068330f 1658 /// write8 0x00 PD = 0x00 (NOP)
whismanoid 0:68e64068330f 1659 /// write8 0x08 FILTER = 0x34 to select RATE_0100, LINEF_11_SINC4 60SPS (given CONV_TYPE_01_Continuous )
whismanoid 0:68e64068330f 1660 /// write8 0x0B MUX_CTRL0 = 0x0A to select AINP=AIN0 and AINN=GND
whismanoid 0:68e64068330f 1661 /// write8 0x09 CTRL = 0x02 to select reference REF2P/REF2N; or CTRL = 0x1A to select reference REF2P/REF2N with reference input buffers enabled; Data Format = Bipolar 2's Complement
whismanoid 0:68e64068330f 1662 /// write8 0x0E PGA = 0x00 to select input path = Buffers, digital gain = 1V/V
whismanoid 0:68e64068330f 1663 /// write8 0x01 CONV_START = 0x01 to set Conversion Mode = Continuous
whismanoid 0:68e64068330f 1664 /// read24 0x80|0x38 STATUS (%SW 0xB8 0 0 0)
whismanoid 0:68e64068330f 1665 /// read24 0x80|0x30 DATA0 (%SW 0xB0 0 0 0)
whismanoid 0:68e64068330f 1666 ///
whismanoid 1:d57c1a2cb83c 1667 /// @param[in] ainp = channel high side, default=MAX11410_AINP_SEL_enum_t::AINP_SEL_0000_AIN0
whismanoid 1:d57c1a2cb83c 1668 /// @param[in] ainn = channel low side, default=MAX11410_AINN_SEL_enum_t::AINN_SEL_1010_GND
whismanoid 0:68e64068330f 1669 ///
whismanoid 0:68e64068330f 1670 /// @return 1 on success; 0 on failure
whismanoid 1:d57c1a2cb83c 1671 uint8_t Configure_Voltage(MAX11410_AINP_SEL_enum_t ainp, MAX11410_AINN_SEL_enum_t ainn);
whismanoid 0:68e64068330f 1672
whismanoid 0:68e64068330f 1673 //----------------------------------------
whismanoid 1:d57c1a2cb83c 1674 /// Menu item '$'
whismanoid 1:d57c1a2cb83c 1675 /// Measure all ADC channels in sequence.
whismanoid 8:3a9dfa2e8234 1676 /// @post AINcode[0..10]: measurement result LSB code
whismanoid 0:68e64068330f 1677 ///
whismanoid 0:68e64068330f 1678 /// @return 1 on success; 0 on failure
whismanoid 1:d57c1a2cb83c 1679 uint8_t Read_All_Voltages(void);
whismanoid 0:68e64068330f 1680
whismanoid 0:68e64068330f 1681 //----------------------------------------
whismanoid 1:d57c1a2cb83c 1682 /// Menu item 'V'
whismanoid 0:68e64068330f 1683 /// Trigger Measurement for voltage input.
whismanoid 0:68e64068330f 1684 ///
whismanoid 0:68e64068330f 1685 /// Example code for typical voltage measurement.
whismanoid 0:68e64068330f 1686 ///
whismanoid 1:d57c1a2cb83c 1687 /// @pre external connection REF2P-REF2N is a reference voltage
whismanoid 1:d57c1a2cb83c 1688 /// @pre VRef = Voltage of REF input, in Volts
whismanoid 1:d57c1a2cb83c 1689 /// @param[in] ainp = channel high side, default=AINP_SEL_0000_AIN0
whismanoid 1:d57c1a2cb83c 1690 /// @param[in] ainn = channel low side, default=AINN_SEL_1010_GND
whismanoid 1:d57c1a2cb83c 1691 /// @post AINcode[ainp]: measurement result LSB code
whismanoid 0:68e64068330f 1692 ///
whismanoid 1:d57c1a2cb83c 1693 /// @return ideal voltage calculated from raw LSB code and reference voltage
whismanoid 1:d57c1a2cb83c 1694 double Measure_Voltage(MAX11410_AINP_SEL_enum_t ainp, MAX11410_AINN_SEL_enum_t ainn);
whismanoid 0:68e64068330f 1695
whismanoid 0:68e64068330f 1696 //----------------------------------------
whismanoid 5:a2e74357cfc0 1697 /// Menu item 'R' -> rtd_resistance, RTD_Temperature
whismanoid 0:68e64068330f 1698 /// Trigger Measurement for Resistive Temperature Device (RTD).
whismanoid 0:68e64068330f 1699 ///
whismanoid 0:68e64068330f 1700 /// Example code for typical RTD measurement.
whismanoid 0:68e64068330f 1701 ///
whismanoid 1:d57c1a2cb83c 1702 /// @pre external connection REF1P-REF1N is a reference resistor
whismanoid 1:d57c1a2cb83c 1703 /// @pre VRef_REF1 = reference resistance in ohms, default=4999
whismanoid 1:d57c1a2cb83c 1704 /// @param[in] rtd_iout = channel RTD high side force, default=AINP_SEL_0111_AIN7
whismanoid 1:d57c1a2cb83c 1705 /// @param[in] rtd_ainp = channel RTD high side sense, default=AINP_SEL_1000_AIN8
whismanoid 1:d57c1a2cb83c 1706 /// @param[in] rtd_ainn = channel RTD low side, default=AINN_SEL_1001_AIN9
whismanoid 1:d57c1a2cb83c 1707 /// @post AINcode[rtd_ainp]: measurement result LSB code
whismanoid 5:a2e74357cfc0 1708 /// @post rtd_resistance: measurement result resistance in Ohms
whismanoid 5:a2e74357cfc0 1709 /// @post RTD_Temperature: Temperature calculated from RTD Resistance; Thermocouple Cold Junction, in degrees C
whismanoid 0:68e64068330f 1710 ///
whismanoid 3:658a93dfb2d8 1711 /// @return resistance calculated from raw LSB code and reference resistance
whismanoid 1:d57c1a2cb83c 1712 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 1713
whismanoid 0:68e64068330f 1714 //----------------------------------------
whismanoid 3:658a93dfb2d8 1715 /// Return the physical temperature corresponding to measured resistance
whismanoid 3:658a93dfb2d8 1716 /// of a PT1000 type Resistive Temperature Device (RTD).
whismanoid 3:658a93dfb2d8 1717 ///
whismanoid 3:658a93dfb2d8 1718 /// @param[in] rtd_resistance = RTD resistance in ohms, default=1000
whismanoid 5:a2e74357cfc0 1719 /// @post RTD_Temperature: Temperature calculated from RTD Resistance; Thermocouple Cold Junction, in degrees C
whismanoid 3:658a93dfb2d8 1720 ///
whismanoid 3:658a93dfb2d8 1721 /// @return ideal temperature in degrees C, calculated from RTD resistance in ohms
whismanoid 5:a2e74357cfc0 1722 /// @test group RTD_PT1000 TemperatureOfRTD_PT1000(842.94) expect -40.0 within 0.1 PT-1000 RTD at -40C
whismanoid 5:a2e74357cfc0 1723 /// @test group RTD_PT1000 TemperatureOfRTD_PT1000(1000.0) expect 0.0 within 0.1 PT-1000 RTD at 0C
whismanoid 5:a2e74357cfc0 1724 /// @test group RTD_PT1000 TemperatureOfRTD_PT1000(1097.3) expect 25.0 within 0.1 PT-1000 RTD at 25C
whismanoid 5:a2e74357cfc0 1725 /// @test group RTD_PT1000 TemperatureOfRTD_PT1000(1328.1) expect 85.0 within 0.1 PT-1000 RTD at 85C
whismanoid 5:a2e74357cfc0 1726 /// @test group RTD_PT1000 TemperatureOfRTD_PT1000(1479.5) expect 125.0 within 0.1 PT-1000 RTD at 125C
whismanoid 3:658a93dfb2d8 1727 ///
whismanoid 3:658a93dfb2d8 1728 double TemperatureOfRTD_PT1000(double rtd_resistance);
whismanoid 3:658a93dfb2d8 1729
whismanoid 3:658a93dfb2d8 1730 //----------------------------------------
whismanoid 3:658a93dfb2d8 1731 /// Menu item 'TM'
whismanoid 0:68e64068330f 1732 /// Trigger Measurement for Thermocouple
whismanoid 0:68e64068330f 1733 ///
whismanoid 0:68e64068330f 1734 /// Example code for typical Thermocouple measurement.
whismanoid 1:d57c1a2cb83c 1735 /// An RTD measures the "cold junction" where TC connects to the board,
whismanoid 1:d57c1a2cb83c 1736 /// and the TC measures the temperature difference above the cold junction.
whismanoid 0:68e64068330f 1737 ///
whismanoid 1:d57c1a2cb83c 1738 /// @param[in] tc_ainp = channel of Thermocouple high side, default=AINP_SEL_0101_AIN5
whismanoid 1:d57c1a2cb83c 1739 /// @param[in] tc_ainn = channel of Thermocouple low side, default=AINN_SEL_0110_AIN6
whismanoid 1:d57c1a2cb83c 1740 /// @param[in] rtd_iout = channel RTD high side force, default=AINP_SEL_0111_AIN7
whismanoid 1:d57c1a2cb83c 1741 /// @param[in] rtd_ainp = channel RTD high side sense, default=AINP_SEL_1000_AIN8
whismanoid 1:d57c1a2cb83c 1742 /// @param[in] rtd_ainn = channel RTD low side, default=AINN_SEL_1001_AIN9
whismanoid 1:d57c1a2cb83c 1743 /// @post AINcode[tc_ainp]: measurement result LSB code
whismanoid 0:68e64068330f 1744 ///
whismanoid 0:68e64068330f 1745 /// @return 1 on success; 0 on failure
whismanoid 1:d57c1a2cb83c 1746 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 1747
whismanoid 3:658a93dfb2d8 1748 //----------------------------------------
whismanoid 3:658a93dfb2d8 1749 /// Menu item 'TK'
whismanoid 3:658a93dfb2d8 1750 /// Return the physical temperature corresponding to measured voltage
whismanoid 3:658a93dfb2d8 1751 /// of a type K Thermocouple (TC).
whismanoid 3:658a93dfb2d8 1752 ///
whismanoid 3:658a93dfb2d8 1753 /// @pre {0}.RTD_Temperature = cold junction temperature, in degrees C
whismanoid 3:658a93dfb2d8 1754 /// @param[in] tc_voltage = Thermocouple voltage in volts, default=0.0254
whismanoid 3:658a93dfb2d8 1755 ///
whismanoid 3:658a93dfb2d8 1756 /// @return ideal temperature in degrees C, calculated from RTD resistance in ohms
whismanoid 4:c169ba85d673 1757 /// @test group TC_1 TemperatureOfTC_TypeK(0.000e-3) expect 0.0 within 0.1 TC_TypeK at 0C = 0.000mV
whismanoid 4:c169ba85d673 1758 /// @test group TC_1 TemperatureOfTC_TypeK(0.039e-3) expect 1.0 within 0.1 TC_TypeK at 1C = 0.039mV
whismanoid 4:c169ba85d673 1759 /// @test group TC_1 TemperatureOfTC_TypeK(0.079e-3) expect 2.0 within 0.1 TC_TypeK at 2C = 0.079mV
whismanoid 4:c169ba85d673 1760 /// @test group TC_1 TemperatureOfTC_TypeK(0.119e-3) expect 3.0 within 0.1 TC_TypeK at 3C = 0.119mV
whismanoid 4:c169ba85d673 1761 /// @test group TC_2 TemperatureOfTC_TypeK(0.158e-3) expect 4.0 within 0.1 TC_TypeK at 4C = 0.158mV
whismanoid 4:c169ba85d673 1762 /// @test group TC_2 TemperatureOfTC_TypeK(0.198e-3) expect 5.0 within 0.1 TC_TypeK at 5C = 0.198mV
whismanoid 4:c169ba85d673 1763 /// @test group TC_2 TemperatureOfTC_TypeK(0.238e-3) expect 6.0 within 0.1 TC_TypeK at 6C = 0.238mV
whismanoid 4:c169ba85d673 1764 /// @test group TC_2 TemperatureOfTC_TypeK(0.2775e-3) expect 7.0 within 0.1 TC_TypeK at 7C = 0.2775mV
whismanoid 4:c169ba85d673 1765 /// @test group TC_2 TemperatureOfTC_TypeK(0.317e-3) expect 8.0 within 0.1 TC_TypeK at 8C = 0.317mV
whismanoid 4:c169ba85d673 1766 /// @test group TC_2 TemperatureOfTC_TypeK(0.357e-3) expect 9.0 within 0.1 TC_TypeK at 9C = 0.357mV
whismanoid 4:c169ba85d673 1767 /// @test group TC_1 TemperatureOfTC_TypeK(0.397e-3) expect 10.0 within 0.1 TC_TypeK at 10C = 0.397mV
whismanoid 4:c169ba85d673 1768 /// @test group TC_1 TemperatureOfTC_TypeK(0.798e-3) expect 20.0 within 0.1 TC_TypeK at 20C = 0.798mV
whismanoid 4:c169ba85d673 1769 /// @test group TC_1 TemperatureOfTC_TypeK(1.081e-3) expect 27.0 within 0.1 TC_TypeK at 27C = 1.081mV
whismanoid 4:c169ba85d673 1770 /// @test group TC_1 TemperatureOfTC_TypeK(1.203e-3) expect 30.0 within 0.1 TC_TypeK at 30C = 1.203mV
whismanoid 4:c169ba85d673 1771 /// @test group TC_1 TemperatureOfTC_TypeK(1.612e-3) expect 40.0 within 0.1 TC_TypeK at 40C = 1.612mV
whismanoid 4:c169ba85d673 1772 /// @test group TC_1 TemperatureOfTC_TypeK(2.023e-3) expect 50.0 within 0.1 TC_TypeK at 50C = 2.023mV
whismanoid 4:c169ba85d673 1773 /// @test group TC_1 TemperatureOfTC_TypeK(2.436e-3) expect 60.0 within 0.1 TC_TypeK at 60C = 2.436mV
whismanoid 4:c169ba85d673 1774 /// @test group TC_1 TemperatureOfTC_TypeK(2.851e-3) expect 70.0 within 0.1 TC_TypeK at 70C = 2.851mV
whismanoid 4:c169ba85d673 1775 /// @test group TC_1 TemperatureOfTC_TypeK(3.267e-3) expect 80.0 within 0.1 TC_TypeK at 80C = 3.267mV
whismanoid 4:c169ba85d673 1776 /// @test group TC_1 TemperatureOfTC_TypeK(3.682e-3) expect 90.0 within 0.1 TC_TypeK at 90C = 3.682mV
whismanoid 4:c169ba85d673 1777 /// @test group TC_1 TemperatureOfTC_TypeK(4.096e-3) expect 100.0 within 0.1 TC_TypeK at 100C = 4.096mV
whismanoid 4:c169ba85d673 1778 /// @test group TC_2 TemperatureOfTC_TypeK(4.509e-3) expect 110.0 within 0.1 TC_TypeK at 110C = 4.509mV
whismanoid 4:c169ba85d673 1779 /// @test group TC_2 TemperatureOfTC_TypeK(4.920e-3) expect 120.0 within 0.1 TC_TypeK at 120C = 4.920mV
whismanoid 4:c169ba85d673 1780 /// @test group TC_2 TemperatureOfTC_TypeK(5.328e-3) expect 130.0 within 0.1 TC_TypeK at 130C = 5.328mV
whismanoid 4:c169ba85d673 1781 /// @test group TC_2 TemperatureOfTC_TypeK(5.735e-3) expect 140.0 within 0.1 TC_TypeK at 140C = 5.735mV
whismanoid 4:c169ba85d673 1782 /// @test group TC_2 TemperatureOfTC_TypeK(6.138e-3) expect 150.0 within 0.1 TC_TypeK at 150C = 6.138mV
whismanoid 4:c169ba85d673 1783 /// @test group TC_2 TemperatureOfTC_TypeK(6.540e-3) expect 160.0 within 0.1 TC_TypeK at 160C = 6.540mV
whismanoid 4:c169ba85d673 1784 /// @test group TC_2 TemperatureOfTC_TypeK(6.941e-3) expect 170.0 within 0.1 TC_TypeK at 170C = 6.941mV
whismanoid 4:c169ba85d673 1785 /// @test group TC_2 TemperatureOfTC_TypeK(7.340e-3) expect 180.0 within 0.1 TC_TypeK at 180C = 7.340mV
whismanoid 4:c169ba85d673 1786 /// @test group TC_1 TemperatureOfTC_TypeK(7.739e-3) expect 190.0 within 0.1 TC_TypeK at 190C = 7.739mV
whismanoid 4:c169ba85d673 1787 /// @test group TC_1 TemperatureOfTC_TypeK(8.138e-3) expect 200.0 within 0.1 TC_TypeK at 200C = 8.138mV
whismanoid 4:c169ba85d673 1788 /// @test group TC_1 TemperatureOfTC_TypeK(8.539e-3) expect 210.0 within 0.1 TC_TypeK at 210C = 8.539mV
whismanoid 4:c169ba85d673 1789 /// @test group TC_1 TemperatureOfTC_TypeK(8.940e-3) expect 220.0 within 0.1 TC_TypeK at 220C = 8.940mV
whismanoid 4:c169ba85d673 1790 /// @test group TC_2 TemperatureOfTC_TypeK(9.343e-3) expect 230.0 within 0.1 TC_TypeK at 230C = 9.343mV
whismanoid 4:c169ba85d673 1791 /// @test group TC_2 TemperatureOfTC_TypeK(9.747e-3) expect 240.0 within 0.1 TC_TypeK at 240C = 9.747mV
whismanoid 4:c169ba85d673 1792 /// @test group TC_2 TemperatureOfTC_TypeK(10.153e-3) expect 250.0 within 0.1 TC_TypeK at 250C = 10.153mV
whismanoid 4:c169ba85d673 1793 /// @test group TC_2 TemperatureOfTC_TypeK(10.561e-3) expect 260.0 within 0.1 TC_TypeK at 260C = 10.561mV
whismanoid 4:c169ba85d673 1794 /// @test group TC_2 TemperatureOfTC_TypeK(10.971e-3) expect 270.0 within 0.1 TC_TypeK at 270C = 10.971mV
whismanoid 4:c169ba85d673 1795 /// @test group TC_2 TemperatureOfTC_TypeK(11.382e-3) expect 280.0 within 0.1 TC_TypeK at 280C = 11.382mV
whismanoid 4:c169ba85d673 1796 /// @test group TC_2 TemperatureOfTC_TypeK(11.795e-3) expect 290.0 within 0.1 TC_TypeK at 290C = 11.795mV
whismanoid 4:c169ba85d673 1797 /// @test group TC_1 TemperatureOfTC_TypeK(12.209e-3) expect 300.0 within 0.1 TC_TypeK at 300C = 12.209mV
whismanoid 4:c169ba85d673 1798 /// @test group TC_2 TemperatureOfTC_TypeK(14.293e-3) expect 350.0 within 0.1 TC_TypeK at 350C = 14.293mV
whismanoid 4:c169ba85d673 1799 /// @test group TC_1 TemperatureOfTC_TypeK(16.397e-3) expect 400.0 within 0.1 TC_TypeK at 400C = 16.397mV
whismanoid 4:c169ba85d673 1800 /// @test group TC_1 TemperatureOfTC_TypeK(18.516e-3) expect 450.0 within 0.1 TC_TypeK at 450C = 18.516mV
whismanoid 4:c169ba85d673 1801 /// @test group TC_1 TemperatureOfTC_TypeK(20.218e-3) expect 490.0 TC_TypeK at 490C = 20.218mV
whismanoid 3:658a93dfb2d8 1802 ///
whismanoid 3:658a93dfb2d8 1803 double TemperatureOfTC_TypeK(double tc_voltage);
whismanoid 3:658a93dfb2d8 1804
whismanoid 4:c169ba85d673 1805 //----------------------------------------
whismanoid 4:c169ba85d673 1806 /// Calculate temperature in degrees C from input voltage,
whismanoid 4:c169ba85d673 1807 /// using a given set of polynomial coefficients.
whismanoid 4:c169ba85d673 1808 /// For example:
whismanoid 4:c169ba85d673 1809 ///
whismanoid 4:c169ba85d673 1810 /// t = coefficients[0] + coefficients[1] * DMMavg + coefficients[2] * DmMMavg**2
whismanoid 4:c169ba85d673 1811 ///
whismanoid 4:c169ba85d673 1812 /// @param[in] thermocouple_voltage_uV = Thermocouple voltage in microvolts
whismanoid 4:c169ba85d673 1813 ///
whismanoid 4:c169ba85d673 1814 /// @return ideal temperature in degrees C, calculated from polynomial coefficients
whismanoid 4:c169ba85d673 1815 ///
whismanoid 4:c169ba85d673 1816 double temperatureDegC_polynomial(double thermocouple_voltage_uV, int num_coefficients, double coefficients[]);
whismanoid 4:c169ba85d673 1817
whismanoid 0:68e64068330f 1818 }; // end of class MAX11410
whismanoid 0:68e64068330f 1819
whismanoid 0:68e64068330f 1820 #endif // __MAX11410_H__
whismanoid 0:68e64068330f 1821
whismanoid 0:68e64068330f 1822 // End of file