Test program running on MAX32625MBED. Control through USB Serial commands using a terminal emulator such as teraterm or putty.
Dependencies: MaximTinyTester MAX11410 CmdLine USBDevice
MAX11410.h@25:a2afb91c605a, 2019-07-25 (annotated)
- Committer:
- whismanoid
- Date:
- Thu Jul 25 16:22:53 2019 -0700
- Revision:
- 25:a2afb91c605a
- Parent:
- 23:e0c36767f98b
- Child:
- 35:8aa5dffe523d
MAX11410 WIP buildable, need test
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
whismanoid | 23:e0c36767f98b | 1 | // /******************************************************************************* |
whismanoid | 23:e0c36767f98b | 2 | // * Copyright (C) 2019 Maxim Integrated Products, Inc., All Rights Reserved. |
whismanoid | 23:e0c36767f98b | 3 | // * |
whismanoid | 23:e0c36767f98b | 4 | // * Permission is hereby granted, free of charge, to any person obtaining a |
whismanoid | 23:e0c36767f98b | 5 | // * copy of this software and associated documentation files (the "Software"), |
whismanoid | 23:e0c36767f98b | 6 | // * to deal in the Software without restriction, including without limitation |
whismanoid | 23:e0c36767f98b | 7 | // * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
whismanoid | 23:e0c36767f98b | 8 | // * and/or sell copies of the Software, and to permit persons to whom the |
whismanoid | 23:e0c36767f98b | 9 | // * Software is furnished to do so, subject to the following conditions: |
whismanoid | 23:e0c36767f98b | 10 | // * |
whismanoid | 23:e0c36767f98b | 11 | // * The above copyright notice and this permission notice shall be included |
whismanoid | 23:e0c36767f98b | 12 | // * in all copies or substantial portions of the Software. |
whismanoid | 23:e0c36767f98b | 13 | // * |
whismanoid | 23:e0c36767f98b | 14 | // * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
whismanoid | 23:e0c36767f98b | 15 | // * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
whismanoid | 23:e0c36767f98b | 16 | // * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
whismanoid | 23:e0c36767f98b | 17 | // * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES |
whismanoid | 23:e0c36767f98b | 18 | // * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
whismanoid | 23:e0c36767f98b | 19 | // * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
whismanoid | 23:e0c36767f98b | 20 | // * OTHER DEALINGS IN THE SOFTWARE. |
whismanoid | 23:e0c36767f98b | 21 | // * |
whismanoid | 23:e0c36767f98b | 22 | // * Except as contained in this notice, the name of Maxim Integrated |
whismanoid | 23:e0c36767f98b | 23 | // * Products, Inc. shall not be used except as stated in the Maxim Integrated |
whismanoid | 23:e0c36767f98b | 24 | // * Products, Inc. Branding Policy. |
whismanoid | 23:e0c36767f98b | 25 | // * |
whismanoid | 23:e0c36767f98b | 26 | // * The mere transfer of this software does not imply any licenses |
whismanoid | 23:e0c36767f98b | 27 | // * of trade secrets, proprietary technology, copyrights, patents, |
whismanoid | 23:e0c36767f98b | 28 | // * trademarks, maskwork rights, or any other form of intellectual |
whismanoid | 23:e0c36767f98b | 29 | // * property whatsoever. Maxim Integrated Products, Inc. retains all |
whismanoid | 23:e0c36767f98b | 30 | // * ownership rights. |
whismanoid | 23:e0c36767f98b | 31 | // ******************************************************************************* |
whismanoid | 23:e0c36767f98b | 32 | // */ |
whismanoid | 23:e0c36767f98b | 33 | // ********************************************************************* |
whismanoid | 23:e0c36767f98b | 34 | // @file MAX11410.h |
whismanoid | 23:e0c36767f98b | 35 | // ********************************************************************* |
whismanoid | 23:e0c36767f98b | 36 | // Header file |
whismanoid | 23:e0c36767f98b | 37 | // DO NOT EDIT; except areas designated "CUSTOMIZE". Automatically generated file. |
whismanoid | 23:e0c36767f98b | 38 | // generated by XMLSystemOfDevicesToMBED.py |
whismanoid | 23:e0c36767f98b | 39 | // System Name = ExampleSystem |
whismanoid | 23:e0c36767f98b | 40 | // System Description = Device driver example |
whismanoid | 23:e0c36767f98b | 41 | // Device Name = MAX11410 |
whismanoid | 23:e0c36767f98b | 42 | // Device Description = 1.9ksps, Low-Power, Serial SPI 24-Bit, 10-Channel, Differential/Single-Ended Input, SAR ADC |
whismanoid | 23:e0c36767f98b | 43 | // Device Manufacturer = Maxim Integrated |
whismanoid | 23:e0c36767f98b | 44 | // Device PartNumber = MAX11410ATI+ |
whismanoid | 23:e0c36767f98b | 45 | // Device RegValue_Width = DataWidth16bit_HL |
whismanoid | 23:e0c36767f98b | 46 | // |
whismanoid | 23:e0c36767f98b | 47 | // SPI CS = ActiveLow |
whismanoid | 23:e0c36767f98b | 48 | // SPI FrameStart = CS |
whismanoid | 23:e0c36767f98b | 49 | // SPI CPOL = 0 |
whismanoid | 23:e0c36767f98b | 50 | // SPI CPHA = 0 |
whismanoid | 23:e0c36767f98b | 51 | // SPI MOSI and MISO Data are both stable on Rising edge of SCLK |
whismanoid | 23:e0c36767f98b | 52 | // SPI SCLK Idle Low |
whismanoid | 23:e0c36767f98b | 53 | // SPI SCLKMaxMHz = 8 |
whismanoid | 23:e0c36767f98b | 54 | // SPI SCLKMinMHz = 0 |
whismanoid | 23:e0c36767f98b | 55 | // |
whismanoid | 23:e0c36767f98b | 56 | |
whismanoid | 23:e0c36767f98b | 57 | |
whismanoid | 23:e0c36767f98b | 58 | // Prevent multiple declaration |
whismanoid | 23:e0c36767f98b | 59 | #ifndef __MAX11410_H__ |
whismanoid | 23:e0c36767f98b | 60 | #define __MAX11410_H__ |
whismanoid | 23:e0c36767f98b | 61 | |
whismanoid | 23:e0c36767f98b | 62 | // standard include for target platform |
whismanoid | 23:e0c36767f98b | 63 | #include "mbed.h" |
whismanoid | 23:e0c36767f98b | 64 | |
whismanoid | 23:e0c36767f98b | 65 | // CODE GENERATOR: conditional defines |
whismanoid | 23:e0c36767f98b | 66 | // CODE GENERATOR: class declaration and docstrings |
whismanoid | 23:e0c36767f98b | 67 | /** |
whismanoid | 23:e0c36767f98b | 68 | * @brief MAX11410 1.9ksps, Low-Power, Serial SPI 24-Bit, 10-Channel, Differential/Single-Ended Input, SAR ADC |
whismanoid | 23:e0c36767f98b | 69 | * |
whismanoid | 23:e0c36767f98b | 70 | * |
whismanoid | 23:e0c36767f98b | 71 | * |
whismanoid | 23:e0c36767f98b | 72 | * Datasheet: https://www.maximintegrated.com/MAX11410 |
whismanoid | 23:e0c36767f98b | 73 | * |
whismanoid | 23:e0c36767f98b | 74 | * |
whismanoid | 23:e0c36767f98b | 75 | * |
whismanoid | 23:e0c36767f98b | 76 | * //---------- CODE GENERATOR: helloCppCodeList |
whismanoid | 23:e0c36767f98b | 77 | * @code |
whismanoid | 23:e0c36767f98b | 78 | * // CODE GENERATOR: example code includes |
whismanoid | 23:e0c36767f98b | 79 | * // example code includes |
whismanoid | 23:e0c36767f98b | 80 | * // standard include for target platform |
whismanoid | 23:e0c36767f98b | 81 | * #include "mbed.h" |
whismanoid | 23:e0c36767f98b | 82 | * //#include "max32625.h" |
whismanoid | 23:e0c36767f98b | 83 | * #include "MAX11410.h" |
whismanoid | 23:e0c36767f98b | 84 | * |
whismanoid | 23:e0c36767f98b | 85 | * // example code board support |
whismanoid | 23:e0c36767f98b | 86 | * //MAX32630FTHR pegasus(MAX32630FTHR::VIO_3V3); |
whismanoid | 23:e0c36767f98b | 87 | * //DigitalOut rLED(LED1); |
whismanoid | 23:e0c36767f98b | 88 | * //DigitalOut gLED(LED2); |
whismanoid | 23:e0c36767f98b | 89 | * //DigitalOut bLED(LED3); |
whismanoid | 23:e0c36767f98b | 90 | * // |
whismanoid | 23:e0c36767f98b | 91 | * // Arduino "shield" connector port definitions (MAX32625MBED shown) |
whismanoid | 23:e0c36767f98b | 92 | * #if defined(TARGET_MAX32625MBED) |
whismanoid | 23:e0c36767f98b | 93 | * #define A0 AIN_0 |
whismanoid | 23:e0c36767f98b | 94 | * #define A1 AIN_1 |
whismanoid | 23:e0c36767f98b | 95 | * #define A2 AIN_2 |
whismanoid | 23:e0c36767f98b | 96 | * #define A3 AIN_3 |
whismanoid | 23:e0c36767f98b | 97 | * #define D0 P0_0 |
whismanoid | 23:e0c36767f98b | 98 | * #define D1 P0_1 |
whismanoid | 23:e0c36767f98b | 99 | * #define D2 P0_2 |
whismanoid | 23:e0c36767f98b | 100 | * #define D3 P0_3 |
whismanoid | 23:e0c36767f98b | 101 | * #define D4 P0_4 |
whismanoid | 23:e0c36767f98b | 102 | * #define D5 P0_5 |
whismanoid | 23:e0c36767f98b | 103 | * #define D6 P0_6 |
whismanoid | 23:e0c36767f98b | 104 | * #define D7 P0_7 |
whismanoid | 23:e0c36767f98b | 105 | * #define D8 P1_4 |
whismanoid | 23:e0c36767f98b | 106 | * #define D9 P1_5 |
whismanoid | 23:e0c36767f98b | 107 | * #define D10 P1_3 |
whismanoid | 23:e0c36767f98b | 108 | * #define D11 P1_1 |
whismanoid | 23:e0c36767f98b | 109 | * #define D12 P1_2 |
whismanoid | 23:e0c36767f98b | 110 | * #define D13 P1_0 |
whismanoid | 23:e0c36767f98b | 111 | * #endif |
whismanoid | 23:e0c36767f98b | 112 | * |
whismanoid | 23:e0c36767f98b | 113 | * // example code declare SPI interface |
whismanoid | 23:e0c36767f98b | 114 | * #if defined(TARGET_MAX32625MBED) |
whismanoid | 23:e0c36767f98b | 115 | * 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 | 23:e0c36767f98b | 116 | * DigitalOut spi_cs(SPI1_SS); // TARGET_MAX32625MBED: P1_3 Arduino 10-pin header D10 |
whismanoid | 23:e0c36767f98b | 117 | * #elif defined(TARGET_MAX32600MBED) |
whismanoid | 23:e0c36767f98b | 118 | * SPI spi(SPI2_MOSI, SPI2_MISO, SPI2_SCK); // mosi, miso, sclk spi1 TARGET_MAX32600MBED: Arduino 10-pin header D11 D12 D13 |
whismanoid | 23:e0c36767f98b | 119 | * DigitalOut spi_cs(SPI2_SS); // Generic: Arduino 10-pin header D10 |
whismanoid | 23:e0c36767f98b | 120 | * #else |
whismanoid | 23:e0c36767f98b | 121 | * SPI spi(D11, D12, D13); // mosi, miso, sclk spi1 TARGET_MAX32600MBED: Arduino 10-pin header D11 D12 D13 |
whismanoid | 23:e0c36767f98b | 122 | * DigitalOut spi_cs(D10); // Generic: Arduino 10-pin header D10 |
whismanoid | 23:e0c36767f98b | 123 | * #endif |
whismanoid | 23:e0c36767f98b | 124 | * |
whismanoid | 23:e0c36767f98b | 125 | * // example code declare GPIO interface pins |
whismanoid | 23:e0c36767f98b | 126 | * // example code declare device instance |
whismanoid | 23:e0c36767f98b | 127 | * MAX11410 g_MAX11410_device(spi, spi_cs, MAX11410::MAX11410_IC); |
whismanoid | 23:e0c36767f98b | 128 | * |
whismanoid | 23:e0c36767f98b | 129 | * // example code main function |
whismanoid | 23:e0c36767f98b | 130 | * int main() |
whismanoid | 23:e0c36767f98b | 131 | * { |
whismanoid | 23:e0c36767f98b | 132 | * while (1) |
whismanoid | 23:e0c36767f98b | 133 | * { |
whismanoid | 23:e0c36767f98b | 134 | * // CODE GENERATOR: example code: member function Init |
whismanoid | 23:e0c36767f98b | 135 | * g_MAX11410_device.Init(); |
whismanoid | 23:e0c36767f98b | 136 | * |
whismanoid | 23:e0c36767f98b | 137 | * // CODE GENERATOR: example code: has no member function REF |
whismanoid | 23:e0c36767f98b | 138 | * // CODE GENERATOR: example code: has no member function CODE_LOAD |
whismanoid | 23:e0c36767f98b | 139 | * // CODE GENERATOR: example code: has no member function CODEallLOADall |
whismanoid | 23:e0c36767f98b | 140 | * // CODE GENERATOR: example code: has no member function CODEnLOADn |
whismanoid | 23:e0c36767f98b | 141 | * // CODE GENERATOR: example code: has no member function ScanManual |
whismanoid | 23:e0c36767f98b | 142 | * // CODE GENERATOR: example code: has no member function ReadAINcode |
whismanoid | 23:e0c36767f98b | 143 | * wait(3.0); |
whismanoid | 23:e0c36767f98b | 144 | * } |
whismanoid | 23:e0c36767f98b | 145 | * } |
whismanoid | 23:e0c36767f98b | 146 | * @endcode |
whismanoid | 23:e0c36767f98b | 147 | * //---------- CODE GENERATOR: end helloCppCodeList |
whismanoid | 23:e0c36767f98b | 148 | */ |
whismanoid | 23:e0c36767f98b | 149 | class MAX11410 { |
whismanoid | 23:e0c36767f98b | 150 | public: |
whismanoid | 23:e0c36767f98b | 151 | // CODE GENERATOR: TypedefEnum EnumItem declarations |
whismanoid | 23:e0c36767f98b | 152 | // CODE GENERATOR: TypedefEnum MAX11410_CMD_enum_t |
whismanoid | 23:e0c36767f98b | 153 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 154 | /// Register Addresses |
whismanoid | 23:e0c36767f98b | 155 | /// |
whismanoid | 23:e0c36767f98b | 156 | /// Naming convention is CMD_bitstream_FUNCTION_NAME |
whismanoid | 23:e0c36767f98b | 157 | /// - r = read/write bit (1=read, 0=write) |
whismanoid | 23:e0c36767f98b | 158 | /// - xaaa_aaaa = 7-bit register address field |
whismanoid | 23:e0c36767f98b | 159 | /// - dddd_dddd = 8-bit register data field |
whismanoid | 23:e0c36767f98b | 160 | /// - dddd_dddd_dddd_dddd = 16-bit register data field |
whismanoid | 23:e0c36767f98b | 161 | /// - dddd_dddd_dddd_dddd_dddd_dddd = 24-bit register data field |
whismanoid | 23:e0c36767f98b | 162 | /// - xxxx = don't care |
whismanoid | 23:e0c36767f98b | 163 | typedef enum MAX11410_CMD_enum_t { |
whismanoid | 23:e0c36767f98b | 164 | CMD_r000_0000_xxxx_xxdd_PD = 0x00, //!< 8'b00000000 |
whismanoid | 23:e0c36767f98b | 165 | CMD_r000_0001_xddd_xxdd_CONV_START = 0x01, //!< 8'b00000001 |
whismanoid | 23:e0c36767f98b | 166 | CMD_r000_0010_xddd_dddd_SEQ_START = 0x02, //!< 8'b00000010 |
whismanoid | 23:e0c36767f98b | 167 | CMD_r000_0011_xxxx_xddd_CAL_START = 0x03, //!< 8'b00000011 |
whismanoid | 23:e0c36767f98b | 168 | CMD_r000_0100_dddd_xddd_GP0_CTRL = 0x04, //!< 8'b00000100 |
whismanoid | 23:e0c36767f98b | 169 | CMD_r000_0101_dddd_xddd_GP1_CTRL = 0x05, //!< 8'b00000101 |
whismanoid | 23:e0c36767f98b | 170 | CMD_r000_0110_xddd_xxdd_GP_CONV = 0x06, //!< 8'b00000110 |
whismanoid | 23:e0c36767f98b | 171 | CMD_r000_0111_xddd_dddd_GP_SEQ_ADDR = 0x07, //!< 8'b00000111 |
whismanoid | 23:e0c36767f98b | 172 | CMD_r000_1000_x0dd_dddd_FILTER = 0x08, //!< 8'b00001000 |
whismanoid | 23:e0c36767f98b | 173 | CMD_r000_1001_dddd_dddd_CTRL = 0x09, //!< 8'b00001001 |
whismanoid | 23:e0c36767f98b | 174 | CMD_r000_1010_dddd_dddd_SOURCE = 0x0a, //!< 8'b00001010 |
whismanoid | 23:e0c36767f98b | 175 | CMD_r000_1011_dddd_dddd_MUX_CTRL0 = 0x0b, //!< 8'b00001011 |
whismanoid | 23:e0c36767f98b | 176 | CMD_r000_1100_dddd_dddd_MUX_CTRL1 = 0x0c, //!< 8'b00001100 |
whismanoid | 23:e0c36767f98b | 177 | CMD_r000_1101_dddd_dddd_MUX_CTRL2 = 0x0d, //!< 8'b00001101 |
whismanoid | 23:e0c36767f98b | 178 | CMD_r000_1110_xxdd_xddd_PGA = 0x0e, //!< 8'b00001110 |
whismanoid | 23:e0c36767f98b | 179 | CMD_r000_1111_dddd_dddd_WAIT_EXT = 0x0f, //!< 8'b00001111 |
whismanoid | 23:e0c36767f98b | 180 | CMD_r001_0000_xxxx_xxxx_WAIT_START = 0x10, //!< 8'b00010000 |
whismanoid | 23:e0c36767f98b | 181 | CMD_r001_0001_xxxx_xxxx_xxxx_xxxx_xxxx_xddd_PART_ID = 0x11, //!< 8'b00010001 |
whismanoid | 23:e0c36767f98b | 182 | CMD_r001_0010_xxxx_xxxx_dddd_xxdd_dddd_dddd_SYSC_SEL = 0x12, //!< 8'b00010010 |
whismanoid | 23:e0c36767f98b | 183 | CMD_r001_0011_dddd_dddd_dddd_dddd_dddd_dddd_SYS_OFF_A = 0x13, //!< 8'b00010011 |
whismanoid | 23:e0c36767f98b | 184 | CMD_r001_0100_dddd_dddd_dddd_dddd_dddd_dddd_SYS_OFF_B = 0x14, //!< 8'b00010100 |
whismanoid | 23:e0c36767f98b | 185 | CMD_r001_0101_dddd_dddd_dddd_dddd_dddd_dddd_SYS_GAIN_A = 0x15, //!< 8'b00010101 |
whismanoid | 23:e0c36767f98b | 186 | CMD_r001_0110_dddd_dddd_dddd_dddd_dddd_dddd_SYS_GAIN_B = 0x16, //!< 8'b00010110 |
whismanoid | 23:e0c36767f98b | 187 | CMD_r001_0111_dddd_dddd_dddd_dddd_dddd_dddd_SELF_OFF = 0x17, //!< 8'b00010111 |
whismanoid | 23:e0c36767f98b | 188 | CMD_r001_1000_dddd_dddd_dddd_dddd_dddd_dddd_SELF_GAIN_1 = 0x18, //!< 8'b00011000 |
whismanoid | 23:e0c36767f98b | 189 | CMD_r001_1001_dddd_dddd_dddd_dddd_dddd_dddd_SELF_GAIN_2 = 0x19, //!< 8'b00011001 |
whismanoid | 23:e0c36767f98b | 190 | CMD_r001_1010_dddd_dddd_dddd_dddd_dddd_dddd_SELF_GAIN_4 = 0x1a, //!< 8'b00011010 |
whismanoid | 23:e0c36767f98b | 191 | CMD_r001_1011_dddd_dddd_dddd_dddd_dddd_dddd_SELF_GAIN_8 = 0x1b, //!< 8'b00011011 |
whismanoid | 23:e0c36767f98b | 192 | CMD_r001_1100_dddd_dddd_dddd_dddd_dddd_dddd_SELF_GAIN_16 = 0x1c, //!< 8'b00011100 |
whismanoid | 23:e0c36767f98b | 193 | CMD_r001_1101_dddd_dddd_dddd_dddd_dddd_dddd_SELF_GAIN_32 = 0x1d, //!< 8'b00011101 |
whismanoid | 23:e0c36767f98b | 194 | CMD_r001_1110_dddd_dddd_dddd_dddd_dddd_dddd_SELF_GAIN_64 = 0x1e, //!< 8'b00011110 |
whismanoid | 23:e0c36767f98b | 195 | CMD_r001_1111_dddd_dddd_dddd_dddd_dddd_dddd_SELF_GAIN_128 = 0x1f, //!< 8'b00011111 |
whismanoid | 23:e0c36767f98b | 196 | CMD_r010_0000_dddd_dddd_dddd_dddd_dddd_dddd_LTHRESH0 = 0x20, //!< 8'b00100000 |
whismanoid | 23:e0c36767f98b | 197 | CMD_r010_0001_dddd_dddd_dddd_dddd_dddd_dddd_LTHRESH1 = 0x21, //!< 8'b00100001 |
whismanoid | 23:e0c36767f98b | 198 | CMD_r010_0010_dddd_dddd_dddd_dddd_dddd_dddd_LTHRESH2 = 0x22, //!< 8'b00100010 |
whismanoid | 23:e0c36767f98b | 199 | CMD_r010_0011_dddd_dddd_dddd_dddd_dddd_dddd_LTHRESH3 = 0x23, //!< 8'b00100011 |
whismanoid | 23:e0c36767f98b | 200 | CMD_r010_0100_dddd_dddd_dddd_dddd_dddd_dddd_LTHRESH4 = 0x24, //!< 8'b00100100 |
whismanoid | 23:e0c36767f98b | 201 | CMD_r010_0101_dddd_dddd_dddd_dddd_dddd_dddd_LTHRESH5 = 0x25, //!< 8'b00100101 |
whismanoid | 23:e0c36767f98b | 202 | CMD_r010_0110_dddd_dddd_dddd_dddd_dddd_dddd_LTHRESH6 = 0x26, //!< 8'b00100110 |
whismanoid | 23:e0c36767f98b | 203 | CMD_r010_0111_dddd_dddd_dddd_dddd_dddd_dddd_LTHRESH7 = 0x27, //!< 8'b00100111 |
whismanoid | 23:e0c36767f98b | 204 | CMD_r010_1000_dddd_dddd_dddd_dddd_dddd_dddd_UTHRESH0 = 0x28, //!< 8'b00101000 |
whismanoid | 23:e0c36767f98b | 205 | CMD_r010_1001_dddd_dddd_dddd_dddd_dddd_dddd_UTHRESH1 = 0x29, //!< 8'b00101001 |
whismanoid | 23:e0c36767f98b | 206 | CMD_r010_1010_dddd_dddd_dddd_dddd_dddd_dddd_UTHRESH2 = 0x2a, //!< 8'b00101010 |
whismanoid | 23:e0c36767f98b | 207 | CMD_r010_1011_dddd_dddd_dddd_dddd_dddd_dddd_UTHRESH3 = 0x2b, //!< 8'b00101011 |
whismanoid | 23:e0c36767f98b | 208 | CMD_r010_1100_dddd_dddd_dddd_dddd_dddd_dddd_UTHRESH4 = 0x2c, //!< 8'b00101100 |
whismanoid | 23:e0c36767f98b | 209 | CMD_r010_1101_dddd_dddd_dddd_dddd_dddd_dddd_UTHRESH5 = 0x2d, //!< 8'b00101101 |
whismanoid | 23:e0c36767f98b | 210 | CMD_r010_1110_dddd_dddd_dddd_dddd_dddd_dddd_UTHRESH6 = 0x2e, //!< 8'b00101110 |
whismanoid | 23:e0c36767f98b | 211 | CMD_r010_1111_dddd_dddd_dddd_dddd_dddd_dddd_UTHRESH7 = 0x2f, //!< 8'b00101111 |
whismanoid | 23:e0c36767f98b | 212 | CMD_r011_0000_dddd_dddd_dddd_dddd_dddd_dddd_DATA0 = 0x30, //!< 8'b00110000 |
whismanoid | 23:e0c36767f98b | 213 | CMD_r011_0001_dddd_dddd_dddd_dddd_dddd_dddd_DATA1 = 0x31, //!< 8'b00110001 |
whismanoid | 23:e0c36767f98b | 214 | CMD_r011_0010_dddd_dddd_dddd_dddd_dddd_dddd_DATA2 = 0x32, //!< 8'b00110010 |
whismanoid | 23:e0c36767f98b | 215 | CMD_r011_0011_dddd_dddd_dddd_dddd_dddd_dddd_DATA3 = 0x33, //!< 8'b00110011 |
whismanoid | 23:e0c36767f98b | 216 | CMD_r011_0100_dddd_dddd_dddd_dddd_dddd_dddd_DATA4 = 0x34, //!< 8'b00110100 |
whismanoid | 23:e0c36767f98b | 217 | CMD_r011_0101_dddd_dddd_dddd_dddd_dddd_dddd_DATA5 = 0x35, //!< 8'b00110101 |
whismanoid | 23:e0c36767f98b | 218 | CMD_r011_0110_dddd_dddd_dddd_dddd_dddd_dddd_DATA6 = 0x36, //!< 8'b00110110 |
whismanoid | 23:e0c36767f98b | 219 | CMD_r011_0111_dddd_dddd_dddd_dddd_dddd_dddd_DATA7 = 0x37, //!< 8'b00110111 |
whismanoid | 23:e0c36767f98b | 220 | CMD_r011_1000_dddd_dddd_dddd_dddd_dxxx_dddd_STATUS = 0x38, //!< 8'b00111000 |
whismanoid | 23:e0c36767f98b | 221 | CMD_r011_1001_dddd_dddd_dddd_dddd_dxxd_dddd_STATUS_IE = 0x39, //!< 8'b00111001 |
whismanoid | 23:e0c36767f98b | 222 | CMD_r011_1010_xaaa_aaaa_dddd_dddd_UC_0 = 0x3a, //!< 8'b00111010 |
whismanoid | 23:e0c36767f98b | 223 | CMD_r011_1011_xaaa_aaaa_dddd_dddd_UC_1 = 0x3b, //!< 8'b00111011 |
whismanoid | 23:e0c36767f98b | 224 | CMD_r011_1100_xaaa_aaaa_dddd_dddd_UC_2 = 0x3c, //!< 8'b00111100 |
whismanoid | 23:e0c36767f98b | 225 | CMD_r011_1101_xaaa_aaaa_dddd_dddd_UC_3 = 0x3d, //!< 8'b00111101 |
whismanoid | 23:e0c36767f98b | 226 | CMD_r011_1110_xaaa_aaaa_dddd_dddd_UC_4 = 0x3e, //!< 8'b00111110 |
whismanoid | 23:e0c36767f98b | 227 | CMD_r011_1111_xaaa_aaaa_dddd_dddd_UC_5 = 0x3f, //!< 8'b00111111 |
whismanoid | 23:e0c36767f98b | 228 | CMD_r100_0000_xaaa_aaaa_dddd_dddd_UC_6 = 0x40, //!< 8'b01000000 |
whismanoid | 23:e0c36767f98b | 229 | CMD_r100_0001_xaaa_aaaa_dddd_dddd_UC_7 = 0x41, //!< 8'b01000001 |
whismanoid | 23:e0c36767f98b | 230 | CMD_r100_0010_xaaa_aaaa_dddd_dddd_UC_8 = 0x42, //!< 8'b01000010 |
whismanoid | 23:e0c36767f98b | 231 | CMD_r100_0011_xaaa_aaaa_dddd_dddd_UC_9 = 0x43, //!< 8'b01000011 |
whismanoid | 23:e0c36767f98b | 232 | CMD_r100_0100_xaaa_aaaa_dddd_dddd_UC_10 = 0x44, //!< 8'b01000100 |
whismanoid | 23:e0c36767f98b | 233 | CMD_r100_0101_xaaa_aaaa_dddd_dddd_UC_11 = 0x45, //!< 8'b01000101 |
whismanoid | 23:e0c36767f98b | 234 | CMD_r100_0110_xaaa_aaaa_dddd_dddd_UC_12 = 0x46, //!< 8'b01000110 |
whismanoid | 23:e0c36767f98b | 235 | CMD_r100_0111_xaaa_aaaa_dddd_dddd_UC_13 = 0x47, //!< 8'b01000111 |
whismanoid | 23:e0c36767f98b | 236 | CMD_r100_1000_xaaa_aaaa_dddd_dddd_UC_14 = 0x48, //!< 8'b01001000 |
whismanoid | 23:e0c36767f98b | 237 | CMD_r100_1001_xaaa_aaaa_dddd_dddd_UC_15 = 0x49, //!< 8'b01001001 |
whismanoid | 23:e0c36767f98b | 238 | CMD_r100_1010_xaaa_aaaa_dddd_dddd_UC_16 = 0x4a, //!< 8'b01001010 |
whismanoid | 23:e0c36767f98b | 239 | CMD_r100_1011_xaaa_aaaa_dddd_dddd_UC_17 = 0x4b, //!< 8'b01001011 |
whismanoid | 23:e0c36767f98b | 240 | CMD_r100_1100_xaaa_aaaa_dddd_dddd_UC_18 = 0x4c, //!< 8'b01001100 |
whismanoid | 23:e0c36767f98b | 241 | CMD_r100_1101_xaaa_aaaa_dddd_dddd_UC_19 = 0x4d, //!< 8'b01001101 |
whismanoid | 23:e0c36767f98b | 242 | CMD_r100_1110_xaaa_aaaa_dddd_dddd_UC_20 = 0x4e, //!< 8'b01001110 |
whismanoid | 23:e0c36767f98b | 243 | CMD_r100_1111_xaaa_aaaa_dddd_dddd_UC_21 = 0x4f, //!< 8'b01001111 |
whismanoid | 23:e0c36767f98b | 244 | CMD_r101_0000_xaaa_aaaa_dddd_dddd_UC_22 = 0x50, //!< 8'b01010000 |
whismanoid | 23:e0c36767f98b | 245 | CMD_r101_0001_xaaa_aaaa_dddd_dddd_UC_23 = 0x51, //!< 8'b01010001 |
whismanoid | 23:e0c36767f98b | 246 | CMD_r101_0010_xaaa_aaaa_dddd_dddd_UC_24 = 0x52, //!< 8'b01010010 |
whismanoid | 23:e0c36767f98b | 247 | CMD_r101_0011_xaaa_aaaa_dddd_dddd_UC_25 = 0x53, //!< 8'b01010011 |
whismanoid | 23:e0c36767f98b | 248 | CMD_r101_0100_xaaa_aaaa_dddd_dddd_UC_26 = 0x54, //!< 8'b01010100 |
whismanoid | 23:e0c36767f98b | 249 | CMD_r101_0101_xaaa_aaaa_dddd_dddd_UC_27 = 0x55, //!< 8'b01010101 |
whismanoid | 23:e0c36767f98b | 250 | CMD_r101_0110_xaaa_aaaa_dddd_dddd_UC_28 = 0x56, //!< 8'b01010110 |
whismanoid | 23:e0c36767f98b | 251 | CMD_r101_0111_xaaa_aaaa_dddd_dddd_UC_29 = 0x57, //!< 8'b01010111 |
whismanoid | 23:e0c36767f98b | 252 | CMD_r101_1000_xaaa_aaaa_dddd_dddd_UC_30 = 0x58, //!< 8'b01011000 |
whismanoid | 23:e0c36767f98b | 253 | CMD_r101_1001_xaaa_aaaa_dddd_dddd_UC_31 = 0x59, //!< 8'b01011001 |
whismanoid | 23:e0c36767f98b | 254 | CMD_r101_1010_xaaa_aaaa_dddd_dddd_UC_32 = 0x5a, //!< 8'b01011010 |
whismanoid | 23:e0c36767f98b | 255 | CMD_r101_1011_xaaa_aaaa_dddd_dddd_UC_33 = 0x5b, //!< 8'b01011011 |
whismanoid | 23:e0c36767f98b | 256 | CMD_r101_1100_xaaa_aaaa_dddd_dddd_UC_34 = 0x5c, //!< 8'b01011100 |
whismanoid | 23:e0c36767f98b | 257 | CMD_r101_1101_xaaa_aaaa_dddd_dddd_UC_35 = 0x5d, //!< 8'b01011101 |
whismanoid | 23:e0c36767f98b | 258 | CMD_r101_1110_xaaa_aaaa_dddd_dddd_UC_36 = 0x5e, //!< 8'b01011110 |
whismanoid | 23:e0c36767f98b | 259 | CMD_r101_1111_xaaa_aaaa_dddd_dddd_UC_37 = 0x5f, //!< 8'b01011111 |
whismanoid | 23:e0c36767f98b | 260 | CMD_r110_0000_xaaa_aaaa_dddd_dddd_UC_38 = 0x60, //!< 8'b01100000 |
whismanoid | 23:e0c36767f98b | 261 | CMD_r110_0001_xaaa_aaaa_dddd_dddd_UC_39 = 0x61, //!< 8'b01100001 |
whismanoid | 23:e0c36767f98b | 262 | CMD_r110_0010_xaaa_aaaa_dddd_dddd_UC_40 = 0x62, //!< 8'b01100010 |
whismanoid | 23:e0c36767f98b | 263 | CMD_r110_0011_xaaa_aaaa_dddd_dddd_UC_41 = 0x63, //!< 8'b01100011 |
whismanoid | 23:e0c36767f98b | 264 | CMD_r110_0100_xaaa_aaaa_dddd_dddd_UC_42 = 0x64, //!< 8'b01100100 |
whismanoid | 23:e0c36767f98b | 265 | CMD_r110_0101_xaaa_aaaa_dddd_dddd_UC_43 = 0x65, //!< 8'b01100101 |
whismanoid | 23:e0c36767f98b | 266 | CMD_r110_0110_xaaa_aaaa_dddd_dddd_UC_44 = 0x66, //!< 8'b01100110 |
whismanoid | 23:e0c36767f98b | 267 | CMD_r110_0111_xaaa_aaaa_dddd_dddd_UC_45 = 0x67, //!< 8'b01100111 |
whismanoid | 23:e0c36767f98b | 268 | CMD_r110_1000_xaaa_aaaa_dddd_dddd_UC_46 = 0x68, //!< 8'b01101000 |
whismanoid | 23:e0c36767f98b | 269 | CMD_r110_1001_xaaa_aaaa_dddd_dddd_UC_47 = 0x69, //!< 8'b01101001 |
whismanoid | 23:e0c36767f98b | 270 | CMD_r110_1010_xaaa_aaaa_dddd_dddd_UC_48 = 0x6a, //!< 8'b01101010 |
whismanoid | 23:e0c36767f98b | 271 | CMD_r110_1011_xaaa_aaaa_dddd_dddd_UC_49 = 0x6b, //!< 8'b01101011 |
whismanoid | 23:e0c36767f98b | 272 | CMD_r110_1100_xaaa_aaaa_dddd_dddd_UC_50 = 0x6c, //!< 8'b01101100 |
whismanoid | 23:e0c36767f98b | 273 | CMD_r110_1101_xaaa_aaaa_dddd_dddd_UC_51 = 0x6d, //!< 8'b01101101 |
whismanoid | 23:e0c36767f98b | 274 | CMD_r110_1110_xaaa_aaaa_dddd_dddd_UC_52 = 0x6e, //!< 8'b01101110 |
whismanoid | 23:e0c36767f98b | 275 | CMD_r110_1111_xxxx_xxxx_xaaa_aaaa_UCADDR = 0x6f, //!< 8'b01101111 |
whismanoid | 23:e0c36767f98b | 276 | CMD_1aaa_aaaa_REGISTER_READ = 0x80, //!< 8'b10000000 |
whismanoid | 23:e0c36767f98b | 277 | } MAX11410_CMD_enum_t; |
whismanoid | 23:e0c36767f98b | 278 | |
whismanoid | 23:e0c36767f98b | 279 | // CODE GENERATOR: TypedefEnum MAX11410_SEQ_ADDR_enum_t |
whismanoid | 23:e0c36767f98b | 280 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 281 | /// Microcode Sequencer Addresses. |
whismanoid | 23:e0c36767f98b | 282 | /// CMD_r000_0010_xddd_dddd_SEQ_START |
whismanoid | 23:e0c36767f98b | 283 | /// CMD_r000_0111_xddd_dddd_GP_SEQ_ADDR |
whismanoid | 23:e0c36767f98b | 284 | /// |
whismanoid | 23:e0c36767f98b | 285 | /// Naming convention is CMD_bitstream_FUNCTION_NAME |
whismanoid | 23:e0c36767f98b | 286 | /// - xaaa_aaaa = 7-bit register address field |
whismanoid | 23:e0c36767f98b | 287 | /// - dddd_dddd = 8-bit register data field |
whismanoid | 23:e0c36767f98b | 288 | /// - xxxx = don't care |
whismanoid | 23:e0c36767f98b | 289 | typedef enum MAX11410_SEQ_ADDR_enum_t { |
whismanoid | 23:e0c36767f98b | 290 | SEQ_ADDR_r011_1010_xaaa_aaaa_dddd_dddd_UC_0 = 0x3a, //!< 8'b00111010 |
whismanoid | 23:e0c36767f98b | 291 | SEQ_ADDR_r011_1011_xaaa_aaaa_dddd_dddd_UC_1 = 0x3b, //!< 8'b00111011 |
whismanoid | 23:e0c36767f98b | 292 | SEQ_ADDR_r011_1100_xaaa_aaaa_dddd_dddd_UC_2 = 0x3c, //!< 8'b00111100 |
whismanoid | 23:e0c36767f98b | 293 | SEQ_ADDR_r011_1101_xaaa_aaaa_dddd_dddd_UC_3 = 0x3d, //!< 8'b00111101 |
whismanoid | 23:e0c36767f98b | 294 | SEQ_ADDR_r011_1110_xaaa_aaaa_dddd_dddd_UC_4 = 0x3e, //!< 8'b00111110 |
whismanoid | 23:e0c36767f98b | 295 | SEQ_ADDR_r011_1111_xaaa_aaaa_dddd_dddd_UC_5 = 0x3f, //!< 8'b00111111 |
whismanoid | 23:e0c36767f98b | 296 | SEQ_ADDR_r100_0000_xaaa_aaaa_dddd_dddd_UC_6 = 0x40, //!< 8'b01000000 |
whismanoid | 23:e0c36767f98b | 297 | SEQ_ADDR_r100_0001_xaaa_aaaa_dddd_dddd_UC_7 = 0x41, //!< 8'b01000001 |
whismanoid | 23:e0c36767f98b | 298 | SEQ_ADDR_r100_0010_xaaa_aaaa_dddd_dddd_UC_8 = 0x42, //!< 8'b01000010 |
whismanoid | 23:e0c36767f98b | 299 | SEQ_ADDR_r100_0011_xaaa_aaaa_dddd_dddd_UC_9 = 0x43, //!< 8'b01000011 |
whismanoid | 23:e0c36767f98b | 300 | SEQ_ADDR_r100_0100_xaaa_aaaa_dddd_dddd_UC_10 = 0x44, //!< 8'b01000100 |
whismanoid | 23:e0c36767f98b | 301 | SEQ_ADDR_r100_0101_xaaa_aaaa_dddd_dddd_UC_11 = 0x45, //!< 8'b01000101 |
whismanoid | 23:e0c36767f98b | 302 | SEQ_ADDR_r100_0110_xaaa_aaaa_dddd_dddd_UC_12 = 0x46, //!< 8'b01000110 |
whismanoid | 23:e0c36767f98b | 303 | SEQ_ADDR_r100_0111_xaaa_aaaa_dddd_dddd_UC_13 = 0x47, //!< 8'b01000111 |
whismanoid | 23:e0c36767f98b | 304 | SEQ_ADDR_r100_1000_xaaa_aaaa_dddd_dddd_UC_14 = 0x48, //!< 8'b01001000 |
whismanoid | 23:e0c36767f98b | 305 | SEQ_ADDR_r100_1001_xaaa_aaaa_dddd_dddd_UC_15 = 0x49, //!< 8'b01001001 |
whismanoid | 23:e0c36767f98b | 306 | SEQ_ADDR_r100_1010_xaaa_aaaa_dddd_dddd_UC_16 = 0x4a, //!< 8'b01001010 |
whismanoid | 23:e0c36767f98b | 307 | SEQ_ADDR_r100_1011_xaaa_aaaa_dddd_dddd_UC_17 = 0x4b, //!< 8'b01001011 |
whismanoid | 23:e0c36767f98b | 308 | SEQ_ADDR_r100_1100_xaaa_aaaa_dddd_dddd_UC_18 = 0x4c, //!< 8'b01001100 |
whismanoid | 23:e0c36767f98b | 309 | SEQ_ADDR_r100_1101_xaaa_aaaa_dddd_dddd_UC_19 = 0x4d, //!< 8'b01001101 |
whismanoid | 23:e0c36767f98b | 310 | SEQ_ADDR_r100_1110_xaaa_aaaa_dddd_dddd_UC_20 = 0x4e, //!< 8'b01001110 |
whismanoid | 23:e0c36767f98b | 311 | SEQ_ADDR_r100_1111_xaaa_aaaa_dddd_dddd_UC_21 = 0x4f, //!< 8'b01001111 |
whismanoid | 23:e0c36767f98b | 312 | SEQ_ADDR_r101_0000_xaaa_aaaa_dddd_dddd_UC_22 = 0x50, //!< 8'b01010000 |
whismanoid | 23:e0c36767f98b | 313 | SEQ_ADDR_r101_0001_xaaa_aaaa_dddd_dddd_UC_23 = 0x51, //!< 8'b01010001 |
whismanoid | 23:e0c36767f98b | 314 | SEQ_ADDR_r101_0010_xaaa_aaaa_dddd_dddd_UC_24 = 0x52, //!< 8'b01010010 |
whismanoid | 23:e0c36767f98b | 315 | SEQ_ADDR_r101_0011_xaaa_aaaa_dddd_dddd_UC_25 = 0x53, //!< 8'b01010011 |
whismanoid | 23:e0c36767f98b | 316 | SEQ_ADDR_r101_0100_xaaa_aaaa_dddd_dddd_UC_26 = 0x54, //!< 8'b01010100 |
whismanoid | 23:e0c36767f98b | 317 | SEQ_ADDR_r101_0101_xaaa_aaaa_dddd_dddd_UC_27 = 0x55, //!< 8'b01010101 |
whismanoid | 23:e0c36767f98b | 318 | SEQ_ADDR_r101_0110_xaaa_aaaa_dddd_dddd_UC_28 = 0x56, //!< 8'b01010110 |
whismanoid | 23:e0c36767f98b | 319 | SEQ_ADDR_r101_0111_xaaa_aaaa_dddd_dddd_UC_29 = 0x57, //!< 8'b01010111 |
whismanoid | 23:e0c36767f98b | 320 | SEQ_ADDR_r101_1000_xaaa_aaaa_dddd_dddd_UC_30 = 0x58, //!< 8'b01011000 |
whismanoid | 23:e0c36767f98b | 321 | SEQ_ADDR_r101_1001_xaaa_aaaa_dddd_dddd_UC_31 = 0x59, //!< 8'b01011001 |
whismanoid | 23:e0c36767f98b | 322 | SEQ_ADDR_r101_1010_xaaa_aaaa_dddd_dddd_UC_32 = 0x5a, //!< 8'b01011010 |
whismanoid | 23:e0c36767f98b | 323 | SEQ_ADDR_r101_1011_xaaa_aaaa_dddd_dddd_UC_33 = 0x5b, //!< 8'b01011011 |
whismanoid | 23:e0c36767f98b | 324 | SEQ_ADDR_r101_1100_xaaa_aaaa_dddd_dddd_UC_34 = 0x5c, //!< 8'b01011100 |
whismanoid | 23:e0c36767f98b | 325 | SEQ_ADDR_r101_1101_xaaa_aaaa_dddd_dddd_UC_35 = 0x5d, //!< 8'b01011101 |
whismanoid | 23:e0c36767f98b | 326 | SEQ_ADDR_r101_1110_xaaa_aaaa_dddd_dddd_UC_36 = 0x5e, //!< 8'b01011110 |
whismanoid | 23:e0c36767f98b | 327 | SEQ_ADDR_r101_1111_xaaa_aaaa_dddd_dddd_UC_37 = 0x5f, //!< 8'b01011111 |
whismanoid | 23:e0c36767f98b | 328 | SEQ_ADDR_r110_0000_xaaa_aaaa_dddd_dddd_UC_38 = 0x60, //!< 8'b01100000 |
whismanoid | 23:e0c36767f98b | 329 | SEQ_ADDR_r110_0001_xaaa_aaaa_dddd_dddd_UC_39 = 0x61, //!< 8'b01100001 |
whismanoid | 23:e0c36767f98b | 330 | SEQ_ADDR_r110_0010_xaaa_aaaa_dddd_dddd_UC_40 = 0x62, //!< 8'b01100010 |
whismanoid | 23:e0c36767f98b | 331 | SEQ_ADDR_r110_0011_xaaa_aaaa_dddd_dddd_UC_41 = 0x63, //!< 8'b01100011 |
whismanoid | 23:e0c36767f98b | 332 | SEQ_ADDR_r110_0100_xaaa_aaaa_dddd_dddd_UC_42 = 0x64, //!< 8'b01100100 |
whismanoid | 23:e0c36767f98b | 333 | SEQ_ADDR_r110_0101_xaaa_aaaa_dddd_dddd_UC_43 = 0x65, //!< 8'b01100101 |
whismanoid | 23:e0c36767f98b | 334 | SEQ_ADDR_r110_0110_xaaa_aaaa_dddd_dddd_UC_44 = 0x66, //!< 8'b01100110 |
whismanoid | 23:e0c36767f98b | 335 | SEQ_ADDR_r110_0111_xaaa_aaaa_dddd_dddd_UC_45 = 0x67, //!< 8'b01100111 |
whismanoid | 23:e0c36767f98b | 336 | SEQ_ADDR_r110_1000_xaaa_aaaa_dddd_dddd_UC_46 = 0x68, //!< 8'b01101000 |
whismanoid | 23:e0c36767f98b | 337 | SEQ_ADDR_r110_1001_xaaa_aaaa_dddd_dddd_UC_47 = 0x69, //!< 8'b01101001 |
whismanoid | 23:e0c36767f98b | 338 | SEQ_ADDR_r110_1010_xaaa_aaaa_dddd_dddd_UC_48 = 0x6a, //!< 8'b01101010 |
whismanoid | 23:e0c36767f98b | 339 | SEQ_ADDR_r110_1011_xaaa_aaaa_dddd_dddd_UC_49 = 0x6b, //!< 8'b01101011 |
whismanoid | 23:e0c36767f98b | 340 | SEQ_ADDR_r110_1100_xaaa_aaaa_dddd_dddd_UC_50 = 0x6c, //!< 8'b01101100 |
whismanoid | 23:e0c36767f98b | 341 | SEQ_ADDR_r110_1101_xaaa_aaaa_dddd_dddd_UC_51 = 0x6d, //!< 8'b01101101 |
whismanoid | 23:e0c36767f98b | 342 | SEQ_ADDR_r110_1110_xaaa_aaaa_dddd_dddd_UC_52 = 0x6e, //!< 8'b01101110 |
whismanoid | 23:e0c36767f98b | 343 | } MAX11410_SEQ_ADDR_enum_t; |
whismanoid | 23:e0c36767f98b | 344 | |
whismanoid | 23:e0c36767f98b | 345 | // CODE GENERATOR: TypedefEnum MAX11410_PD_enum_t |
whismanoid | 23:e0c36767f98b | 346 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 347 | /// Power-down state command |
whismanoid | 23:e0c36767f98b | 348 | /// CMD_r000_0000_xxxx_xxdd_PD PD[1:0] field |
whismanoid | 23:e0c36767f98b | 349 | /// |
whismanoid | 23:e0c36767f98b | 350 | /// - 00: Normal mode |
whismanoid | 23:e0c36767f98b | 351 | /// - 01: Standby mode -- Powers down all analog circuity, but not the internal voltage regulator |
whismanoid | 23:e0c36767f98b | 352 | /// - 10: Sleep mode -- Powers down all analog circuitry including the internal voltage regulator |
whismanoid | 23:e0c36767f98b | 353 | /// - 11: Reset -- all registers reset to POR state (Self Clearing to 01 Standby mode) |
whismanoid | 23:e0c36767f98b | 354 | typedef enum MAX11410_PD_enum_t { |
whismanoid | 23:e0c36767f98b | 355 | PD_00_Normal = 0x00, //!< 8'b00000000 |
whismanoid | 23:e0c36767f98b | 356 | PD_01_Standby = 0x01, //!< 8'b00000001 |
whismanoid | 23:e0c36767f98b | 357 | PD_10_Sleep = 0x02, //!< 8'b00000010 |
whismanoid | 23:e0c36767f98b | 358 | PD_11_Reset = 0x03, //!< 8'b00000011 |
whismanoid | 23:e0c36767f98b | 359 | } MAX11410_PD_enum_t; |
whismanoid | 23:e0c36767f98b | 360 | |
whismanoid | 23:e0c36767f98b | 361 | // CODE GENERATOR: TypedefEnum MAX11410_DEST_enum_t |
whismanoid | 23:e0c36767f98b | 362 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 363 | /// Conversion / seqeuncer start command |
whismanoid | 23:e0c36767f98b | 364 | /// CMD_r000_0001_xddd_xxdd_CONV_START DEST[2:0] field. |
whismanoid | 23:e0c36767f98b | 365 | /// CMD_r000_0110_xddd_xxdd_GP_CONV GP_DEST[2:0] field. |
whismanoid | 23:e0c36767f98b | 366 | /// |
whismanoid | 23:e0c36767f98b | 367 | /// - 000: Store result in DATA0 |
whismanoid | 23:e0c36767f98b | 368 | /// - 001: Store result in DATA1 |
whismanoid | 23:e0c36767f98b | 369 | /// - 010: Store result in DATA2 |
whismanoid | 23:e0c36767f98b | 370 | /// - 011: Store result in DATA3 |
whismanoid | 23:e0c36767f98b | 371 | /// - 100: Store result in DATA4 |
whismanoid | 23:e0c36767f98b | 372 | /// - 101: Store result in DATA5 |
whismanoid | 23:e0c36767f98b | 373 | /// - 110: Store result in DATA6 |
whismanoid | 23:e0c36767f98b | 374 | /// - 111: Store result in DATA7 |
whismanoid | 23:e0c36767f98b | 375 | typedef enum MAX11410_DEST_enum_t { |
whismanoid | 23:e0c36767f98b | 376 | DEST_000_DATA0 = 0x00, //!< 8'b00000000 |
whismanoid | 23:e0c36767f98b | 377 | DEST_001_DATA1 = 0x01, //!< 8'b00000001 |
whismanoid | 23:e0c36767f98b | 378 | DEST_010_DATA2 = 0x02, //!< 8'b00000010 |
whismanoid | 23:e0c36767f98b | 379 | DEST_011_DATA3 = 0x03, //!< 8'b00000011 |
whismanoid | 23:e0c36767f98b | 380 | DEST_100_DATA4 = 0x04, //!< 8'b00000100 |
whismanoid | 23:e0c36767f98b | 381 | DEST_101_DATA5 = 0x05, //!< 8'b00000101 |
whismanoid | 23:e0c36767f98b | 382 | DEST_110_DATA6 = 0x06, //!< 8'b00000110 |
whismanoid | 23:e0c36767f98b | 383 | DEST_111_DATA7 = 0x07, //!< 8'b00000111 |
whismanoid | 23:e0c36767f98b | 384 | } MAX11410_DEST_enum_t; |
whismanoid | 23:e0c36767f98b | 385 | |
whismanoid | 23:e0c36767f98b | 386 | // CODE GENERATOR: TypedefEnum MAX11410_CONV_TYPE_enum_t |
whismanoid | 23:e0c36767f98b | 387 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 388 | /// Conversion / seqeuncer start command |
whismanoid | 23:e0c36767f98b | 389 | /// CMD_r000_0001_xddd_xxdd_CONV_START CONV_TYPE[1:0] field. |
whismanoid | 23:e0c36767f98b | 390 | /// CMD_r000_0110_xddd_xxdd_GP_CONV GP_CONV_TYPE[2:0] field. |
whismanoid | 23:e0c36767f98b | 391 | /// |
whismanoid | 23:e0c36767f98b | 392 | /// - 00: Single conversion |
whismanoid | 23:e0c36767f98b | 393 | /// - 01: Continuous conversions |
whismanoid | 23:e0c36767f98b | 394 | /// - 10, 11: 1:4 Duty cycled conversions (modulator low-power mode) |
whismanoid | 23:e0c36767f98b | 395 | typedef enum MAX11410_CONV_TYPE_enum_t { |
whismanoid | 23:e0c36767f98b | 396 | CONV_TYPE_00_Single = 0x00, //!< 8'b00000000 |
whismanoid | 23:e0c36767f98b | 397 | CONV_TYPE_01_Continuous = 0x01, //!< 8'b00000001 |
whismanoid | 23:e0c36767f98b | 398 | CONV_TYPE_10_DutyCycle_1_4 = 0x02, //!< 8'b00000010 |
whismanoid | 23:e0c36767f98b | 399 | CONV_TYPE_11_DutyCycle_1_4 = 0x03, //!< 8'b00000011 |
whismanoid | 23:e0c36767f98b | 400 | } MAX11410_CONV_TYPE_enum_t; |
whismanoid | 23:e0c36767f98b | 401 | |
whismanoid | 23:e0c36767f98b | 402 | // CODE GENERATOR: TypedefEnum MAX11410_CAL_TYPE_enum_t |
whismanoid | 23:e0c36767f98b | 403 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 404 | /// Calbration command |
whismanoid | 23:e0c36767f98b | 405 | /// CMD_r000_0011_xxxx_xddd_CAL_START CAL_TYPE[2:0] field |
whismanoid | 23:e0c36767f98b | 406 | /// |
whismanoid | 23:e0c36767f98b | 407 | /// - 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 | 23:e0c36767f98b | 408 | /// - 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 | 23:e0c36767f98b | 409 | /// - 010: Reserved |
whismanoid | 23:e0c36767f98b | 410 | /// - 011: Reserved |
whismanoid | 23:e0c36767f98b | 411 | /// - 100: Performs a system offset calibration. The resulting calibration value is stored in the SYS_OFF_A register. |
whismanoid | 23:e0c36767f98b | 412 | /// - 101: Performs a system gain calibration. The resulting calibration value is stored in the SYS_GAIN_A register. |
whismanoid | 23:e0c36767f98b | 413 | /// - 110: Performs a system offset calibration. The resulting calibration value is stored in the SYS_OFF_B register. |
whismanoid | 23:e0c36767f98b | 414 | /// - 111: Performs a system gain calibration. The resulting calibration value is stored in the SYS_GAIN_B register. |
whismanoid | 23:e0c36767f98b | 415 | typedef enum MAX11410_CAL_TYPE_enum_t { |
whismanoid | 23:e0c36767f98b | 416 | CAL_TYPE_000_SELF_CAL = 0x00, //!< 8'b00000000 |
whismanoid | 23:e0c36767f98b | 417 | CAL_TYPE_001_PGA_GAIN = 0x01, //!< 8'b00000001 |
whismanoid | 23:e0c36767f98b | 418 | CAL_TYPE_010_reserved = 0x02, //!< 8'b00000010 |
whismanoid | 23:e0c36767f98b | 419 | CAL_TYPE_011_reserved = 0x03, //!< 8'b00000011 |
whismanoid | 23:e0c36767f98b | 420 | CAL_TYPE_100_SYS_OFF_A = 0x04, //!< 8'b00000100 |
whismanoid | 23:e0c36767f98b | 421 | CAL_TYPE_101_SYS_GAIN_A = 0x05, //!< 8'b00000101 |
whismanoid | 23:e0c36767f98b | 422 | CAL_TYPE_110_SYS_OFF_B = 0x06, //!< 8'b00000110 |
whismanoid | 23:e0c36767f98b | 423 | CAL_TYPE_111_SYS_GAIN_B = 0x07, //!< 8'b00000111 |
whismanoid | 23:e0c36767f98b | 424 | } MAX11410_CAL_TYPE_enum_t; |
whismanoid | 23:e0c36767f98b | 425 | |
whismanoid | 23:e0c36767f98b | 426 | // CODE GENERATOR: TypedefEnum MAX11410_GP0_DIR_enum_t |
whismanoid | 23:e0c36767f98b | 427 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 428 | /// GPIO0 pin command |
whismanoid | 23:e0c36767f98b | 429 | /// CMD_r000_0100_dddd_xddd_GP0_CTRL GP0_DIR[1:0] field |
whismanoid | 23:e0c36767f98b | 430 | /// |
whismanoid | 23:e0c36767f98b | 431 | /// - 00: Input mode, reference to VDDIO (default) |
whismanoid | 23:e0c36767f98b | 432 | /// - 01: Reserved |
whismanoid | 23:e0c36767f98b | 433 | /// - 10: Output mode, open-drain output |
whismanoid | 23:e0c36767f98b | 434 | /// - 11: Output mode, CMOS output |
whismanoid | 23:e0c36767f98b | 435 | typedef enum MAX11410_GP0_DIR_enum_t { |
whismanoid | 23:e0c36767f98b | 436 | GP0_DIR_000_Input = 0x00, //!< 8'b00000000 |
whismanoid | 23:e0c36767f98b | 437 | GP0_DIR_001_reserved = 0x01, //!< 8'b00000001 |
whismanoid | 23:e0c36767f98b | 438 | GP0_DIR_010_OutputOpenDrain = 0x02, //!< 8'b00000010 |
whismanoid | 23:e0c36767f98b | 439 | GP0_DIR_011_Output = 0x03, //!< 8'b00000011 |
whismanoid | 23:e0c36767f98b | 440 | } MAX11410_GP0_DIR_enum_t; |
whismanoid | 23:e0c36767f98b | 441 | |
whismanoid | 23:e0c36767f98b | 442 | // CODE GENERATOR: TypedefEnum MAX11410_GP0_ISEL_enum_t |
whismanoid | 23:e0c36767f98b | 443 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 444 | /// GPIO0 pin command |
whismanoid | 23:e0c36767f98b | 445 | /// CMD_r000_0100_dddd_xddd_GP0_CTRL GP0_ISEL[1:0] field |
whismanoid | 23:e0c36767f98b | 446 | /// |
whismanoid | 23:e0c36767f98b | 447 | /// - 00: GPIO_0 input disabled (default) |
whismanoid | 23:e0c36767f98b | 448 | /// - 01: GPIO_0 input configured as rising-edge-triggered conversion start |
whismanoid | 23:e0c36767f98b | 449 | /// - 10: GPIO_0 input configured as rising-edge-triggered sequence start from GP_SEQ_ADDR |
whismanoid | 23:e0c36767f98b | 450 | /// - 11: Reserved |
whismanoid | 23:e0c36767f98b | 451 | typedef enum MAX11410_GP0_ISEL_enum_t { |
whismanoid | 23:e0c36767f98b | 452 | GP0_ISEL_000_disabled = 0x00, //!< 8'b00000000 |
whismanoid | 23:e0c36767f98b | 453 | GP0_ISEL_001_TRIGGER_CONV_START = 0x01, //!< 8'b00000001 |
whismanoid | 23:e0c36767f98b | 454 | GP0_ISEL_010_TRIGGER_SEQ_START = 0x02, //!< 8'b00000010 |
whismanoid | 23:e0c36767f98b | 455 | GP0_ISEL_011_reserved = 0x03, //!< 8'b00000011 |
whismanoid | 23:e0c36767f98b | 456 | } MAX11410_GP0_ISEL_enum_t; |
whismanoid | 23:e0c36767f98b | 457 | |
whismanoid | 23:e0c36767f98b | 458 | // CODE GENERATOR: TypedefEnum MAX11410_GP0_OSEL_enum_t |
whismanoid | 23:e0c36767f98b | 459 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 460 | /// GPIO0 pin command |
whismanoid | 23:e0c36767f98b | 461 | /// CMD_r000_0100_dddd_xddd_GP0_CTRL GP0_OSEL[2:0] field |
whismanoid | 23:e0c36767f98b | 462 | /// |
whismanoid | 23:e0c36767f98b | 463 | /// - 000: GPIO_0 output disabled, high Z (default) |
whismanoid | 23:e0c36767f98b | 464 | /// - 001: GPIO_0 output is configured as INTRB (active low) |
whismanoid | 23:e0c36767f98b | 465 | /// - 010: GPIO_0 output is configured as INTR (active high) |
whismanoid | 23:e0c36767f98b | 466 | /// - 011: GPIO_0 output is configured as state Logic 0 |
whismanoid | 23:e0c36767f98b | 467 | /// - 100: GPIO_0 output is configured as state Logic 1 |
whismanoid | 23:e0c36767f98b | 468 | /// - 101: GPIO_0 output is configured as automatic low-side switch operation (CMOS output mode overridden) |
whismanoid | 23:e0c36767f98b | 469 | /// - 110: GPIO_0 output is configured as modulator active status |
whismanoid | 23:e0c36767f98b | 470 | /// - 111: GPIO_0 output is configured as system clock (2.456Mhz Nominal) |
whismanoid | 23:e0c36767f98b | 471 | typedef enum MAX11410_GP0_OSEL_enum_t { |
whismanoid | 23:e0c36767f98b | 472 | GP0_OSEL_000_disabled = 0x00, //!< 8'b00000000 |
whismanoid | 23:e0c36767f98b | 473 | GP0_OSEL_001_INTRB = 0x01, //!< 8'b00000001 |
whismanoid | 23:e0c36767f98b | 474 | GP0_OSEL_010_INTR = 0x02, //!< 8'b00000010 |
whismanoid | 23:e0c36767f98b | 475 | GP0_OSEL_011_LOGIC_0 = 0x03, //!< 8'b00000011 |
whismanoid | 23:e0c36767f98b | 476 | GP0_OSEL_100_LOGIC_1 = 0x04, //!< 8'b00000100 |
whismanoid | 23:e0c36767f98b | 477 | GP0_OSEL_101_AUTO_LOWSIDE_SWITCH = 0x05, //!< 8'b00000101 |
whismanoid | 23:e0c36767f98b | 478 | GP0_OSEL_110_MODULATOR_ACTIVE_STATUS = 0x06, //!< 8'b00000110 |
whismanoid | 23:e0c36767f98b | 479 | GP0_OSEL_111_CLOCK_2M456 = 0x07, //!< 8'b00000111 |
whismanoid | 23:e0c36767f98b | 480 | } MAX11410_GP0_OSEL_enum_t; |
whismanoid | 23:e0c36767f98b | 481 | |
whismanoid | 23:e0c36767f98b | 482 | // CODE GENERATOR: TypedefEnum MAX11410_GP1_DIR_enum_t |
whismanoid | 23:e0c36767f98b | 483 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 484 | /// GPIO1 pin command |
whismanoid | 23:e0c36767f98b | 485 | /// CMD_r000_0101_dddd_xddd_GP1_CTRL GP1_DIR[1:0] field |
whismanoid | 23:e0c36767f98b | 486 | /// |
whismanoid | 23:e0c36767f98b | 487 | /// - 00: Input mode, reference to VDDIO (default) |
whismanoid | 23:e0c36767f98b | 488 | /// - 01: Reserved |
whismanoid | 23:e0c36767f98b | 489 | /// - 10: Output mode, open-drain output |
whismanoid | 23:e0c36767f98b | 490 | /// - 11: Output mode, CMOS output |
whismanoid | 23:e0c36767f98b | 491 | typedef enum MAX11410_GP1_DIR_enum_t { |
whismanoid | 23:e0c36767f98b | 492 | GP1_DIR_000_Input = 0x00, //!< 8'b00000000 |
whismanoid | 23:e0c36767f98b | 493 | GP1_DIR_001_reserved = 0x01, //!< 8'b00000001 |
whismanoid | 23:e0c36767f98b | 494 | GP1_DIR_010_OutputOpenDrain = 0x02, //!< 8'b00000010 |
whismanoid | 23:e0c36767f98b | 495 | GP1_DIR_011_Output = 0x03, //!< 8'b00000011 |
whismanoid | 23:e0c36767f98b | 496 | } MAX11410_GP1_DIR_enum_t; |
whismanoid | 23:e0c36767f98b | 497 | |
whismanoid | 23:e0c36767f98b | 498 | // CODE GENERATOR: TypedefEnum MAX11410_GP1_ISEL_enum_t |
whismanoid | 23:e0c36767f98b | 499 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 500 | /// GPIO1 pin command |
whismanoid | 23:e0c36767f98b | 501 | /// CMD_r000_0101_dddd_xddd_GP1_CTRL GP1_ISEL[1:0] field |
whismanoid | 23:e0c36767f98b | 502 | /// |
whismanoid | 23:e0c36767f98b | 503 | /// - 00: GPIO_1 input disabled (default) |
whismanoid | 23:e0c36767f98b | 504 | /// - 01: GPIO_1 input configured as rising-edge-triggered conversion start |
whismanoid | 23:e0c36767f98b | 505 | /// - 10: GPIO_1 input configured as rising-edge-triggered sequence start from GP_SEQ_ADDR |
whismanoid | 23:e0c36767f98b | 506 | /// - 11: Reserved |
whismanoid | 23:e0c36767f98b | 507 | typedef enum MAX11410_GP1_ISEL_enum_t { |
whismanoid | 23:e0c36767f98b | 508 | GP1_ISEL_000_disabled = 0x00, //!< 8'b00000000 |
whismanoid | 23:e0c36767f98b | 509 | GP1_ISEL_001_TRIGGER_CONV_START = 0x01, //!< 8'b00000001 |
whismanoid | 23:e0c36767f98b | 510 | GP1_ISEL_010_TRIGGER_SEQ_START = 0x02, //!< 8'b00000010 |
whismanoid | 23:e0c36767f98b | 511 | GP1_ISEL_011_reserved = 0x03, //!< 8'b00000011 |
whismanoid | 23:e0c36767f98b | 512 | } MAX11410_GP1_ISEL_enum_t; |
whismanoid | 23:e0c36767f98b | 513 | |
whismanoid | 23:e0c36767f98b | 514 | // CODE GENERATOR: TypedefEnum MAX11410_GP1_OSEL_enum_t |
whismanoid | 23:e0c36767f98b | 515 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 516 | /// GPIO1 pin command |
whismanoid | 23:e0c36767f98b | 517 | /// CMD_r000_0101_dddd_xddd_GP1_CTRL GP1_OSEL[2:0] field |
whismanoid | 23:e0c36767f98b | 518 | /// |
whismanoid | 23:e0c36767f98b | 519 | /// - 000: GPIO_1 output disabled, high Z (default) |
whismanoid | 23:e0c36767f98b | 520 | /// - 001: GPIO_1 output is configured as INTRB (active low) |
whismanoid | 23:e0c36767f98b | 521 | /// - 010: GPIO_1 output is configured as INTR (active high) |
whismanoid | 23:e0c36767f98b | 522 | /// - 011: GPIO_1 output is configured as state Logic 0 |
whismanoid | 23:e0c36767f98b | 523 | /// - 100: GPIO_1 output is configured as state Logic 1 |
whismanoid | 23:e0c36767f98b | 524 | /// - 101: GPIO_1 output is configured as system clock (2.456Mhz Nominal) |
whismanoid | 23:e0c36767f98b | 525 | /// - 110: GPIO_1 output is configured as modulator active status |
whismanoid | 23:e0c36767f98b | 526 | /// - 111: GPIO_1 output is configured as automatic low-side switch operation (CMOS output mode overridden) |
whismanoid | 23:e0c36767f98b | 527 | typedef enum MAX11410_GP1_OSEL_enum_t { |
whismanoid | 23:e0c36767f98b | 528 | GP1_OSEL_000_disabled = 0x00, //!< 8'b00000000 |
whismanoid | 23:e0c36767f98b | 529 | GP1_OSEL_001_INTRB = 0x01, //!< 8'b00000001 |
whismanoid | 23:e0c36767f98b | 530 | GP1_OSEL_010_INTR = 0x02, //!< 8'b00000010 |
whismanoid | 23:e0c36767f98b | 531 | GP1_OSEL_011_LOGIC_0 = 0x03, //!< 8'b00000011 |
whismanoid | 23:e0c36767f98b | 532 | GP1_OSEL_100_LOGIC_1 = 0x04, //!< 8'b00000100 |
whismanoid | 23:e0c36767f98b | 533 | GP1_OSEL_101_AUTO_LOWSIDE_SWITCH = 0x05, //!< 8'b00000101 |
whismanoid | 23:e0c36767f98b | 534 | GP1_OSEL_110_MODULATOR_ACTIVE_STATUS = 0x06, //!< 8'b00000110 |
whismanoid | 23:e0c36767f98b | 535 | GP1_OSEL_111_CLOCK_2M456 = 0x07, //!< 8'b00000111 |
whismanoid | 23:e0c36767f98b | 536 | } MAX11410_GP1_OSEL_enum_t; |
whismanoid | 23:e0c36767f98b | 537 | |
whismanoid | 23:e0c36767f98b | 538 | // CODE GENERATOR: TypedefEnum MAX11410_LINEF_enum_t |
whismanoid | 23:e0c36767f98b | 539 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 540 | /// Filter command |
whismanoid | 23:e0c36767f98b | 541 | /// CMD_r000_1000_x0dd_dddd_FILTER LINEF[1:0] field |
whismanoid | 23:e0c36767f98b | 542 | /// |
whismanoid | 23:e0c36767f98b | 543 | /// - 00: Simultaneous 50/60Hz FIR rejection (default) |
whismanoid | 23:e0c36767f98b | 544 | /// - 01: 50Hz FIR rejection |
whismanoid | 23:e0c36767f98b | 545 | /// - 10: 60Hz FIR rejection |
whismanoid | 23:e0c36767f98b | 546 | /// - 11: SINC4 |
whismanoid | 23:e0c36767f98b | 547 | typedef enum MAX11410_LINEF_enum_t { |
whismanoid | 23:e0c36767f98b | 548 | LINEF_00_50Hz_60Hz_FIR = 0x00, //!< 8'b00000000 |
whismanoid | 23:e0c36767f98b | 549 | LINEF_01_50Hz_FIR = 0x01, //!< 8'b00000001 |
whismanoid | 23:e0c36767f98b | 550 | LINEF_10_60Hz_FIR = 0x02, //!< 8'b00000010 |
whismanoid | 23:e0c36767f98b | 551 | LINEF_11_SINC4 = 0x03, //!< 8'b00000011 |
whismanoid | 23:e0c36767f98b | 552 | } MAX11410_LINEF_enum_t; |
whismanoid | 23:e0c36767f98b | 553 | |
whismanoid | 23:e0c36767f98b | 554 | // CODE GENERATOR: TypedefEnum MAX11410_RATE_enum_t |
whismanoid | 23:e0c36767f98b | 555 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 556 | /// Filter command |
whismanoid | 23:e0c36767f98b | 557 | /// CMD_r000_1000_x0dd_dddd_FILTER RATE[3:0] field |
whismanoid | 23:e0c36767f98b | 558 | /// |
whismanoid | 23:e0c36767f98b | 559 | /// Sets conversion rate based on LINEF value. See Table 9a through Table 9d for details. |
whismanoid | 23:e0c36767f98b | 560 | /// |
whismanoid | 23:e0c36767f98b | 561 | /// Table 9a. LINEF = 00 Data Rate and Filter Rejection Settings |
whismanoid | 23:e0c36767f98b | 562 | /// |
whismanoid | 23:e0c36767f98b | 563 | /// Rate | LINEF | CONV_TYPE | Rate |
whismanoid | 23:e0c36767f98b | 564 | /// -----------|------------------------|----------------------------|---------- |
whismanoid | 23:e0c36767f98b | 565 | /// RATE_0000 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_00_Single | 1.0SPS |
whismanoid | 23:e0c36767f98b | 566 | /// RATE_0001 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_00_Single | 2.0SPS |
whismanoid | 23:e0c36767f98b | 567 | /// RATE_0010 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_00_Single | 4.0SPS |
whismanoid | 23:e0c36767f98b | 568 | /// RATE_0011 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_00_Single | 8.0SPS |
whismanoid | 23:e0c36767f98b | 569 | /// RATE_0100 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_00_Single | 16.0SPS |
whismanoid | 23:e0c36767f98b | 570 | /// RATE_0000 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_01_Continuous | 1.1SPS |
whismanoid | 23:e0c36767f98b | 571 | /// RATE_0001 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_01_Continuous | 2.1SPS |
whismanoid | 23:e0c36767f98b | 572 | /// RATE_0010 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_01_Continuous | 4.2SPS |
whismanoid | 23:e0c36767f98b | 573 | /// RATE_0011 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_01_Continuous | 8.4SPS |
whismanoid | 23:e0c36767f98b | 574 | /// RATE_0100 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_01_Continuous | 16.8SPS |
whismanoid | 23:e0c36767f98b | 575 | /// RATE_0000 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 0.3SPS |
whismanoid | 23:e0c36767f98b | 576 | /// RATE_0001 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 0.5SPS |
whismanoid | 23:e0c36767f98b | 577 | /// RATE_0010 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 1.1SPS |
whismanoid | 23:e0c36767f98b | 578 | /// RATE_0011 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 2.1SPS |
whismanoid | 23:e0c36767f98b | 579 | /// RATE_0100 | LINEF_00_50Hz_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 4.2SPS |
whismanoid | 23:e0c36767f98b | 580 | /// |
whismanoid | 23:e0c36767f98b | 581 | /// Table 9b. LINEF = 01 Data Rate and Filter Rejection Settings |
whismanoid | 23:e0c36767f98b | 582 | /// |
whismanoid | 23:e0c36767f98b | 583 | /// Rate | LINEF | CONV_TYPE | Rate |
whismanoid | 23:e0c36767f98b | 584 | /// ----------|------------------------|----------------------------|---------- |
whismanoid | 23:e0c36767f98b | 585 | /// RATE_0000 | LINEF_01_50Hz_FIR | CONV_TYPE_00_Single | 1.3SPS |
whismanoid | 23:e0c36767f98b | 586 | /// RATE_0001 | LINEF_01_50Hz_FIR | CONV_TYPE_00_Single | 2.5SPS |
whismanoid | 23:e0c36767f98b | 587 | /// RATE_0010 | LINEF_01_50Hz_FIR | CONV_TYPE_00_Single | 5.0SPS |
whismanoid | 23:e0c36767f98b | 588 | /// RATE_0011 | LINEF_01_50Hz_FIR | CONV_TYPE_00_Single | 10.0SPS |
whismanoid | 23:e0c36767f98b | 589 | /// RATE_0100 | LINEF_01_50Hz_FIR | CONV_TYPE_00_Single | 20.0SPS |
whismanoid | 23:e0c36767f98b | 590 | /// RATE_0101 | LINEF_01_50Hz_FIR | CONV_TYPE_00_Single | 35.6SPS |
whismanoid | 23:e0c36767f98b | 591 | /// RATE_0000 | LINEF_01_50Hz_FIR | CONV_TYPE_01_Continuous | 1.3SPS |
whismanoid | 23:e0c36767f98b | 592 | /// RATE_0001 | LINEF_01_50Hz_FIR | CONV_TYPE_01_Continuous | 2.7SPS |
whismanoid | 23:e0c36767f98b | 593 | /// RATE_0010 | LINEF_01_50Hz_FIR | CONV_TYPE_01_Continuous | 5.3SPS |
whismanoid | 23:e0c36767f98b | 594 | /// RATE_0011 | LINEF_01_50Hz_FIR | CONV_TYPE_01_Continuous | 10.7SPS |
whismanoid | 23:e0c36767f98b | 595 | /// RATE_0100 | LINEF_01_50Hz_FIR | CONV_TYPE_01_Continuous | 21.3SPS |
whismanoid | 23:e0c36767f98b | 596 | /// RATE_0101 | LINEF_01_50Hz_FIR | CONV_TYPE_01_Continuous | 40.0SPS |
whismanoid | 23:e0c36767f98b | 597 | /// RATE_0000 | LINEF_01_50Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 0.3SPS |
whismanoid | 23:e0c36767f98b | 598 | /// RATE_0001 | LINEF_01_50Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 0.7SPS |
whismanoid | 23:e0c36767f98b | 599 | /// RATE_0010 | LINEF_01_50Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 1.3SPS |
whismanoid | 23:e0c36767f98b | 600 | /// RATE_0011 | LINEF_01_50Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 2.7SPS |
whismanoid | 23:e0c36767f98b | 601 | /// RATE_0100 | LINEF_01_50Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 5.3SPS |
whismanoid | 23:e0c36767f98b | 602 | /// RATE_0101 | LINEF_01_50Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 10.0SPS |
whismanoid | 23:e0c36767f98b | 603 | /// |
whismanoid | 23:e0c36767f98b | 604 | /// Table 9c. LINEF = 10 Data Rate and Filter Rejection Settings |
whismanoid | 23:e0c36767f98b | 605 | /// |
whismanoid | 23:e0c36767f98b | 606 | /// Rate | LINEF | CONV_TYPE | Rate |
whismanoid | 23:e0c36767f98b | 607 | /// ----------|------------------------|----------------------------|---------- |
whismanoid | 23:e0c36767f98b | 608 | /// RATE_0000 | LINEF_10_60Hz_FIR | CONV_TYPE_00_Single | 1.3SPS |
whismanoid | 23:e0c36767f98b | 609 | /// RATE_0001 | LINEF_10_60Hz_FIR | CONV_TYPE_00_Single | 2.5SPS |
whismanoid | 23:e0c36767f98b | 610 | /// RATE_0010 | LINEF_10_60Hz_FIR | CONV_TYPE_00_Single | 5.0SPS |
whismanoid | 23:e0c36767f98b | 611 | /// RATE_0011 | LINEF_10_60Hz_FIR | CONV_TYPE_00_Single | 10.0SPS |
whismanoid | 23:e0c36767f98b | 612 | /// RATE_0100 | LINEF_10_60Hz_FIR | CONV_TYPE_00_Single | 20.0SPS |
whismanoid | 23:e0c36767f98b | 613 | /// RATE_0101 | LINEF_10_60Hz_FIR | CONV_TYPE_00_Single | 35.6SPS |
whismanoid | 23:e0c36767f98b | 614 | /// RATE_0000 | LINEF_10_60Hz_FIR | CONV_TYPE_01_Continuous | 1.3SPS |
whismanoid | 23:e0c36767f98b | 615 | /// RATE_0001 | LINEF_10_60Hz_FIR | CONV_TYPE_01_Continuous | 2.7SPS |
whismanoid | 23:e0c36767f98b | 616 | /// RATE_0010 | LINEF_10_60Hz_FIR | CONV_TYPE_01_Continuous | 5.3SPS |
whismanoid | 23:e0c36767f98b | 617 | /// RATE_0011 | LINEF_10_60Hz_FIR | CONV_TYPE_01_Continuous | 10.7SPS |
whismanoid | 23:e0c36767f98b | 618 | /// RATE_0100 | LINEF_10_60Hz_FIR | CONV_TYPE_01_Continuous | 21.3SPS |
whismanoid | 23:e0c36767f98b | 619 | /// RATE_0101 | LINEF_10_60Hz_FIR | CONV_TYPE_01_Continuous | 40.0SPS |
whismanoid | 23:e0c36767f98b | 620 | /// RATE_0000 | LINEF_10_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 0.3SPS |
whismanoid | 23:e0c36767f98b | 621 | /// RATE_0001 | LINEF_10_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 0.7SPS |
whismanoid | 23:e0c36767f98b | 622 | /// RATE_0010 | LINEF_10_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 1.3SPS |
whismanoid | 23:e0c36767f98b | 623 | /// RATE_0011 | LINEF_10_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 2.7SPS |
whismanoid | 23:e0c36767f98b | 624 | /// RATE_0100 | LINEF_10_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 5.3SPS |
whismanoid | 23:e0c36767f98b | 625 | /// RATE_0101 | LINEF_10_60Hz_FIR | CONV_TYPE_10_DutyCycle_1_4 | 10.0SPS |
whismanoid | 23:e0c36767f98b | 626 | /// |
whismanoid | 23:e0c36767f98b | 627 | /// Table 9d. LINEF = 11 Data Rate and Filter Rejection Settings |
whismanoid | 23:e0c36767f98b | 628 | /// |
whismanoid | 23:e0c36767f98b | 629 | /// Rate | LINEF | CONV_TYPE | Rate |
whismanoid | 23:e0c36767f98b | 630 | /// ----------|------------------------|----------------------------|---------- |
whismanoid | 23:e0c36767f98b | 631 | /// RATE_0000 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 1SPS |
whismanoid | 23:e0c36767f98b | 632 | /// RATE_0001 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 2.5SPS |
whismanoid | 23:e0c36767f98b | 633 | /// RATE_0010 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 5SPS |
whismanoid | 23:e0c36767f98b | 634 | /// RATE_0011 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 10SPS |
whismanoid | 23:e0c36767f98b | 635 | /// RATE_0100 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 15SPS |
whismanoid | 23:e0c36767f98b | 636 | /// RATE_0101 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 30SPS |
whismanoid | 23:e0c36767f98b | 637 | /// RATE_0110 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 60SPS |
whismanoid | 23:e0c36767f98b | 638 | /// RATE_0111 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 120SPS |
whismanoid | 23:e0c36767f98b | 639 | /// RATE_1000 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 240SPS |
whismanoid | 23:e0c36767f98b | 640 | /// RATE_1001 | LINEF_11_SINC4 | CONV_TYPE_00_Single | 480SPS |
whismanoid | 23:e0c36767f98b | 641 | /// RATE_0000 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 4SPS |
whismanoid | 23:e0c36767f98b | 642 | /// RATE_0001 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 10SPS |
whismanoid | 23:e0c36767f98b | 643 | /// RATE_0010 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 20SPS |
whismanoid | 23:e0c36767f98b | 644 | /// RATE_0011 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 40SPS |
whismanoid | 23:e0c36767f98b | 645 | /// RATE_0100 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 60SPS |
whismanoid | 23:e0c36767f98b | 646 | /// RATE_0101 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 120SPS |
whismanoid | 23:e0c36767f98b | 647 | /// RATE_0110 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 240SPS |
whismanoid | 23:e0c36767f98b | 648 | /// RATE_0111 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 480SPS |
whismanoid | 23:e0c36767f98b | 649 | /// RATE_1000 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 960SPS |
whismanoid | 23:e0c36767f98b | 650 | /// RATE_1001 | LINEF_11_SINC4 | CONV_TYPE_01_Continuous | 1920SPS |
whismanoid | 23:e0c36767f98b | 651 | /// RATE_0000 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 1SPS |
whismanoid | 23:e0c36767f98b | 652 | /// RATE_0001 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 2.5SPS |
whismanoid | 23:e0c36767f98b | 653 | /// RATE_0010 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 5SPS |
whismanoid | 23:e0c36767f98b | 654 | /// RATE_0011 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 10SPS |
whismanoid | 23:e0c36767f98b | 655 | /// RATE_0100 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 15SPS |
whismanoid | 23:e0c36767f98b | 656 | /// RATE_0101 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 30SPS |
whismanoid | 23:e0c36767f98b | 657 | /// RATE_0110 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 60SPS |
whismanoid | 23:e0c36767f98b | 658 | /// RATE_0111 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 120SPS |
whismanoid | 23:e0c36767f98b | 659 | /// RATE_1000 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 240SPS |
whismanoid | 23:e0c36767f98b | 660 | /// RATE_1001 | LINEF_11_SINC4 | CONV_TYPE_10_DutyCycle_1_4 | 480SPS |
whismanoid | 23:e0c36767f98b | 661 | /// |
whismanoid | 23:e0c36767f98b | 662 | typedef enum MAX11410_RATE_enum_t { |
whismanoid | 23:e0c36767f98b | 663 | RATE_0000 = 0x00, //!< 8'b00000000 |
whismanoid | 23:e0c36767f98b | 664 | RATE_0001 = 0x01, //!< 8'b00000001 |
whismanoid | 23:e0c36767f98b | 665 | RATE_0010 = 0x02, //!< 8'b00000010 |
whismanoid | 23:e0c36767f98b | 666 | RATE_0011 = 0x03, //!< 8'b00000011 |
whismanoid | 23:e0c36767f98b | 667 | RATE_0100 = 0x04, //!< 8'b00000100 |
whismanoid | 23:e0c36767f98b | 668 | RATE_0101 = 0x05, //!< 8'b00000101 |
whismanoid | 23:e0c36767f98b | 669 | RATE_0110 = 0x06, //!< 8'b00000110 |
whismanoid | 23:e0c36767f98b | 670 | RATE_0111 = 0x07, //!< 8'b00000111 |
whismanoid | 23:e0c36767f98b | 671 | RATE_1000 = 0x08, //!< 8'b00001000 |
whismanoid | 23:e0c36767f98b | 672 | RATE_1001 = 0x09, //!< 8'b00001001 |
whismanoid | 23:e0c36767f98b | 673 | RATE_1010 = 0x0a, //!< 8'b00001010 |
whismanoid | 23:e0c36767f98b | 674 | RATE_1011 = 0x0b, //!< 8'b00001011 |
whismanoid | 23:e0c36767f98b | 675 | RATE_1100 = 0x0c, //!< 8'b00001100 |
whismanoid | 23:e0c36767f98b | 676 | RATE_1101 = 0x0d, //!< 8'b00001101 |
whismanoid | 23:e0c36767f98b | 677 | RATE_1110 = 0x0e, //!< 8'b00001110 |
whismanoid | 23:e0c36767f98b | 678 | RATE_1111 = 0x0f, //!< 8'b00001111 |
whismanoid | 23:e0c36767f98b | 679 | } MAX11410_RATE_enum_t; |
whismanoid | 23:e0c36767f98b | 680 | |
whismanoid | 23:e0c36767f98b | 681 | // CODE GENERATOR: TypedefEnum MAX11410_REF_SEL_enum_t |
whismanoid | 23:e0c36767f98b | 682 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 683 | /// Filter command |
whismanoid | 23:e0c36767f98b | 684 | /// CMD_r000_1001_dddd_dddd_CTRL REF_SEL[2:0] field |
whismanoid | 23:e0c36767f98b | 685 | /// |
whismanoid | 23:e0c36767f98b | 686 | /// - 000: AIN0(REF0P)/AIN1(REF0N) |
whismanoid | 23:e0c36767f98b | 687 | /// - 001: REF1P/REF1N (default) |
whismanoid | 23:e0c36767f98b | 688 | /// - 010: REF2P/REF2N |
whismanoid | 23:e0c36767f98b | 689 | /// - 011: AVDD/AGND |
whismanoid | 23:e0c36767f98b | 690 | /// - 100: AIN0(REF0P)/AGND (single-ended mode) |
whismanoid | 23:e0c36767f98b | 691 | /// - 101: REF1P/AGND (single-ended mode) |
whismanoid | 23:e0c36767f98b | 692 | /// - 110: REF2P/AGND (single-ended mode) |
whismanoid | 23:e0c36767f98b | 693 | /// - 111: AVDD/AGND |
whismanoid | 23:e0c36767f98b | 694 | typedef enum MAX11410_REF_SEL_enum_t { |
whismanoid | 23:e0c36767f98b | 695 | REF_SEL_000_AIN0_AIN1 = 0x00, //!< 8'b00000000 |
whismanoid | 23:e0c36767f98b | 696 | REF_SEL_001_REF1P_REF1N = 0x01, //!< 8'b00000001 |
whismanoid | 23:e0c36767f98b | 697 | REF_SEL_010_REF2P_REF2N = 0x02, //!< 8'b00000010 |
whismanoid | 23:e0c36767f98b | 698 | REF_SEL_011_AVDD_AGND = 0x03, //!< 8'b00000011 |
whismanoid | 23:e0c36767f98b | 699 | REF_SEL_100_AIN0_AGND = 0x04, //!< 8'b00000100 |
whismanoid | 23:e0c36767f98b | 700 | REF_SEL_101_REF1P_AGND = 0x05, //!< 8'b00000101 |
whismanoid | 23:e0c36767f98b | 701 | REF_SEL_110_REF2P_AGND = 0x06, //!< 8'b00000110 |
whismanoid | 23:e0c36767f98b | 702 | REF_SEL_111_AVDD_AGND = 0x07, //!< 8'b00000111 |
whismanoid | 23:e0c36767f98b | 703 | } MAX11410_REF_SEL_enum_t; |
whismanoid | 23:e0c36767f98b | 704 | |
whismanoid | 23:e0c36767f98b | 705 | // CODE GENERATOR: TypedefEnum MAX11410_VBIAS_MODE_enum_t |
whismanoid | 23:e0c36767f98b | 706 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 707 | /// Source command |
whismanoid | 23:e0c36767f98b | 708 | /// CMD_r000_1010_dddd_dddd_SOURCE VBIAS_MODE[1:0] field |
whismanoid | 23:e0c36767f98b | 709 | /// |
whismanoid | 23:e0c36767f98b | 710 | /// - 00: Active mode (default) |
whismanoid | 23:e0c36767f98b | 711 | /// - 01: High impedance; 125kOhm output impedance |
whismanoid | 23:e0c36767f98b | 712 | /// - 10: Low impedance; 20kOhm output impedance |
whismanoid | 23:e0c36767f98b | 713 | /// - 11: Low impedance; 20kOhm output impedance |
whismanoid | 23:e0c36767f98b | 714 | typedef enum MAX11410_VBIAS_MODE_enum_t { |
whismanoid | 23:e0c36767f98b | 715 | VBIAS_MODE_00_Active = 0x00, //!< 8'b00000000 |
whismanoid | 23:e0c36767f98b | 716 | VBIAS_MODE_01_125kOhm = 0x01, //!< 8'b00000001 |
whismanoid | 23:e0c36767f98b | 717 | VBIAS_MODE_10_20kOhm = 0x02, //!< 8'b00000010 |
whismanoid | 23:e0c36767f98b | 718 | VBIAS_MODE_11_20kOhm = 0x03, //!< 8'b00000011 |
whismanoid | 23:e0c36767f98b | 719 | } MAX11410_VBIAS_MODE_enum_t; |
whismanoid | 23:e0c36767f98b | 720 | |
whismanoid | 23:e0c36767f98b | 721 | // CODE GENERATOR: TypedefEnum MAX11410_BRN_MODE_enum_t |
whismanoid | 23:e0c36767f98b | 722 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 723 | /// Source command |
whismanoid | 23:e0c36767f98b | 724 | /// CMD_r000_1010_dddd_dddd_SOURCE BRN_MODE[1:0] field |
whismanoid | 23:e0c36767f98b | 725 | /// |
whismanoid | 23:e0c36767f98b | 726 | /// - 00: Powered down, burnout sources disabled (default) |
whismanoid | 23:e0c36767f98b | 727 | /// - 01: 0.5uA burnout current sources enabled |
whismanoid | 23:e0c36767f98b | 728 | /// - 10: 1uA burnout current sources enabled |
whismanoid | 23:e0c36767f98b | 729 | /// - 11: 10uA burnout current sources enabled |
whismanoid | 23:e0c36767f98b | 730 | typedef enum MAX11410_BRN_MODE_enum_t { |
whismanoid | 23:e0c36767f98b | 731 | BRN_MODE_00_disabled = 0x00, //!< 8'b00000000 |
whismanoid | 23:e0c36767f98b | 732 | BRN_MODE_01_0u5A = 0x01, //!< 8'b00000001 |
whismanoid | 23:e0c36767f98b | 733 | BRN_MODE_10_1uA = 0x02, //!< 8'b00000010 |
whismanoid | 23:e0c36767f98b | 734 | BRN_MODE_11_10uA = 0x03, //!< 8'b00000011 |
whismanoid | 23:e0c36767f98b | 735 | } MAX11410_BRN_MODE_enum_t; |
whismanoid | 23:e0c36767f98b | 736 | |
whismanoid | 23:e0c36767f98b | 737 | // CODE GENERATOR: TypedefEnum MAX11410_IDAC_MODE_enum_t |
whismanoid | 23:e0c36767f98b | 738 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 739 | /// Source command |
whismanoid | 23:e0c36767f98b | 740 | /// CMD_r000_1010_dddd_dddd_SOURCE IDAC_MODE[3:0] field |
whismanoid | 23:e0c36767f98b | 741 | /// |
whismanoid | 23:e0c36767f98b | 742 | /// - 0000: 10uA (default) |
whismanoid | 23:e0c36767f98b | 743 | /// - 0001: 50uA |
whismanoid | 23:e0c36767f98b | 744 | /// - 0010: 75uA |
whismanoid | 23:e0c36767f98b | 745 | /// - 0011: 100uA |
whismanoid | 23:e0c36767f98b | 746 | /// - 0100: 125uA |
whismanoid | 23:e0c36767f98b | 747 | /// - 0101: 150uA |
whismanoid | 23:e0c36767f98b | 748 | /// - 0110: 175uA |
whismanoid | 23:e0c36767f98b | 749 | /// - 0111: 200uA |
whismanoid | 23:e0c36767f98b | 750 | /// - 1000: 225uA |
whismanoid | 23:e0c36767f98b | 751 | /// - 1001: 250uA |
whismanoid | 23:e0c36767f98b | 752 | /// - 1010: 300uA |
whismanoid | 23:e0c36767f98b | 753 | /// - 1011: 400uA |
whismanoid | 23:e0c36767f98b | 754 | /// - 1100: 600uA |
whismanoid | 23:e0c36767f98b | 755 | /// - 1101: 800uA |
whismanoid | 23:e0c36767f98b | 756 | /// - 1110: 1200uA |
whismanoid | 23:e0c36767f98b | 757 | /// - 1111: 1600uA |
whismanoid | 23:e0c36767f98b | 758 | typedef enum MAX11410_IDAC_MODE_enum_t { |
whismanoid | 23:e0c36767f98b | 759 | IDAC_MODE_0000_10uA = 0x00, //!< 8'b00000000 |
whismanoid | 23:e0c36767f98b | 760 | IDAC_MODE_0001_50uA = 0x01, //!< 8'b00000001 |
whismanoid | 23:e0c36767f98b | 761 | IDAC_MODE_0010_75uA = 0x02, //!< 8'b00000010 |
whismanoid | 23:e0c36767f98b | 762 | IDAC_MODE_0011_100uA = 0x03, //!< 8'b00000011 |
whismanoid | 23:e0c36767f98b | 763 | IDAC_MODE_0100_125uA = 0x04, //!< 8'b00000100 |
whismanoid | 23:e0c36767f98b | 764 | IDAC_MODE_0101_150uA = 0x05, //!< 8'b00000101 |
whismanoid | 23:e0c36767f98b | 765 | IDAC_MODE_0110_175uA = 0x06, //!< 8'b00000110 |
whismanoid | 23:e0c36767f98b | 766 | IDAC_MODE_0111_200uA = 0x07, //!< 8'b00000111 |
whismanoid | 23:e0c36767f98b | 767 | IDAC_MODE_1000_225uA = 0x08, //!< 8'b00001000 |
whismanoid | 23:e0c36767f98b | 768 | IDAC_MODE_1001_250uA = 0x09, //!< 8'b00001001 |
whismanoid | 23:e0c36767f98b | 769 | IDAC_MODE_1010_300uA = 0x0a, //!< 8'b00001010 |
whismanoid | 23:e0c36767f98b | 770 | IDAC_MODE_1011_400uA = 0x0b, //!< 8'b00001011 |
whismanoid | 23:e0c36767f98b | 771 | IDAC_MODE_1100_600uA = 0x0c, //!< 8'b00001100 |
whismanoid | 23:e0c36767f98b | 772 | IDAC_MODE_1101_800uA = 0x0d, //!< 8'b00001101 |
whismanoid | 23:e0c36767f98b | 773 | IDAC_MODE_1110_1200uA = 0x0e, //!< 8'b00001110 |
whismanoid | 23:e0c36767f98b | 774 | IDAC_MODE_1111_1600uA = 0x0f, //!< 8'b00001111 |
whismanoid | 23:e0c36767f98b | 775 | } MAX11410_IDAC_MODE_enum_t; |
whismanoid | 23:e0c36767f98b | 776 | |
whismanoid | 23:e0c36767f98b | 777 | // CODE GENERATOR: TypedefEnum MAX11410_AINP_SEL_enum_t |
whismanoid | 23:e0c36767f98b | 778 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 779 | /// Input multiplexer channel selection |
whismanoid | 23:e0c36767f98b | 780 | /// CMD_r000_1011_dddd_dddd_MUX_CTRL0 field AINP_SEL[3:0] |
whismanoid | 23:e0c36767f98b | 781 | /// |
whismanoid | 23:e0c36767f98b | 782 | /// - 0000: AINP = AIN0 |
whismanoid | 23:e0c36767f98b | 783 | /// - 0001: AINP = AIN1 |
whismanoid | 23:e0c36767f98b | 784 | /// - 0010: AINP = AIN2 |
whismanoid | 23:e0c36767f98b | 785 | /// - 0011: AINP = AIN3 |
whismanoid | 23:e0c36767f98b | 786 | /// - 0100: AINP = AIN4 |
whismanoid | 23:e0c36767f98b | 787 | /// - 0101: AINP = AIN5 |
whismanoid | 23:e0c36767f98b | 788 | /// - 0110: AINP = AIN6 |
whismanoid | 23:e0c36767f98b | 789 | /// - 0111: AINP = AIN7 |
whismanoid | 23:e0c36767f98b | 790 | /// - 1000: AINP = AIN8 |
whismanoid | 23:e0c36767f98b | 791 | /// - 1001: AINP = AIN9 |
whismanoid | 23:e0c36767f98b | 792 | /// - 1010: AINP = AVDD |
whismanoid | 23:e0c36767f98b | 793 | /// - 1011: AINN = Unconnected |
whismanoid | 23:e0c36767f98b | 794 | /// - 1100: AINN = Unconnected |
whismanoid | 23:e0c36767f98b | 795 | /// - 1101: AINN = Unconnected |
whismanoid | 23:e0c36767f98b | 796 | /// - 1110: AINN = Unconnected |
whismanoid | 23:e0c36767f98b | 797 | /// - 1111: AINN = Unconnected (default) |
whismanoid | 23:e0c36767f98b | 798 | typedef enum MAX11410_AINP_SEL_enum_t { |
whismanoid | 23:e0c36767f98b | 799 | AINP_SEL_0000_AIN0 = 0x00, //!< 8'b00000000 |
whismanoid | 23:e0c36767f98b | 800 | AINP_SEL_0001_AIN1 = 0x01, //!< 8'b00000001 |
whismanoid | 23:e0c36767f98b | 801 | AINP_SEL_0010_AIN2 = 0x02, //!< 8'b00000010 |
whismanoid | 23:e0c36767f98b | 802 | AINP_SEL_0011_AIN3 = 0x03, //!< 8'b00000011 |
whismanoid | 23:e0c36767f98b | 803 | AINP_SEL_0100_AIN4 = 0x04, //!< 8'b00000100 |
whismanoid | 23:e0c36767f98b | 804 | AINP_SEL_0101_AIN5 = 0x05, //!< 8'b00000101 |
whismanoid | 23:e0c36767f98b | 805 | AINP_SEL_0110_AIN6 = 0x06, //!< 8'b00000110 |
whismanoid | 23:e0c36767f98b | 806 | AINP_SEL_0111_AIN7 = 0x07, //!< 8'b00000111 |
whismanoid | 23:e0c36767f98b | 807 | AINP_SEL_1000_AIN8 = 0x08, //!< 8'b00001000 |
whismanoid | 23:e0c36767f98b | 808 | AINP_SEL_1001_AIN9 = 0x09, //!< 8'b00001001 |
whismanoid | 23:e0c36767f98b | 809 | AINP_SEL_1010_AVDD = 0x0a, //!< 8'b00001010 |
whismanoid | 23:e0c36767f98b | 810 | AINP_SEL_1011_unconnected = 0x0b, //!< 8'b00001011 |
whismanoid | 23:e0c36767f98b | 811 | AINP_SEL_1100_unconnected = 0x0c, //!< 8'b00001100 |
whismanoid | 23:e0c36767f98b | 812 | AINP_SEL_1101_unconnected = 0x0d, //!< 8'b00001101 |
whismanoid | 23:e0c36767f98b | 813 | AINP_SEL_1110_unconnected = 0x0e, //!< 8'b00001110 |
whismanoid | 23:e0c36767f98b | 814 | AINP_SEL_1111_unconnected = 0x0f, //!< 8'b00001111 |
whismanoid | 23:e0c36767f98b | 815 | } MAX11410_AINP_SEL_enum_t; |
whismanoid | 23:e0c36767f98b | 816 | |
whismanoid | 23:e0c36767f98b | 817 | // CODE GENERATOR: TypedefEnum MAX11410_AINN_SEL_enum_t |
whismanoid | 23:e0c36767f98b | 818 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 819 | /// Input multiplexer channel selection |
whismanoid | 23:e0c36767f98b | 820 | /// CMD_r000_1011_dddd_dddd_MUX_CTRL0 field AINP_SEL[3:0] |
whismanoid | 23:e0c36767f98b | 821 | /// |
whismanoid | 23:e0c36767f98b | 822 | /// - 0000: AINN = AIN0 |
whismanoid | 23:e0c36767f98b | 823 | /// - 0001: AINN = AIN1 |
whismanoid | 23:e0c36767f98b | 824 | /// - 0010: AINN = AIN2 |
whismanoid | 23:e0c36767f98b | 825 | /// - 0011: AINN = AIN3 |
whismanoid | 23:e0c36767f98b | 826 | /// - 0100: AINN = AIN4 |
whismanoid | 23:e0c36767f98b | 827 | /// - 0101: AINN = AIN5 |
whismanoid | 23:e0c36767f98b | 828 | /// - 0110: AINN = AIN6 |
whismanoid | 23:e0c36767f98b | 829 | /// - 0111: AINN = AIN7 |
whismanoid | 23:e0c36767f98b | 830 | /// - 1000: AINN = AIN8 |
whismanoid | 23:e0c36767f98b | 831 | /// - 1001: AINN = AIN9 |
whismanoid | 23:e0c36767f98b | 832 | /// - 1010: AINN = GND |
whismanoid | 23:e0c36767f98b | 833 | /// - 1011: AINN = Unconnected |
whismanoid | 23:e0c36767f98b | 834 | /// - 1100: AINN = Unconnected |
whismanoid | 23:e0c36767f98b | 835 | /// - 1101: AINN = Unconnected |
whismanoid | 23:e0c36767f98b | 836 | /// - 1110: AINN = Unconnected |
whismanoid | 23:e0c36767f98b | 837 | /// - 1111: AINN = Unconnected (default) |
whismanoid | 23:e0c36767f98b | 838 | typedef enum MAX11410_AINN_SEL_enum_t { |
whismanoid | 23:e0c36767f98b | 839 | AINN_SEL_0000_AIN0 = 0x00, //!< 8'b00000000 |
whismanoid | 23:e0c36767f98b | 840 | AINN_SEL_0001_AIN1 = 0x01, //!< 8'b00000001 |
whismanoid | 23:e0c36767f98b | 841 | AINN_SEL_0010_AIN2 = 0x02, //!< 8'b00000010 |
whismanoid | 23:e0c36767f98b | 842 | AINN_SEL_0011_AIN3 = 0x03, //!< 8'b00000011 |
whismanoid | 23:e0c36767f98b | 843 | AINN_SEL_0100_AIN4 = 0x04, //!< 8'b00000100 |
whismanoid | 23:e0c36767f98b | 844 | AINN_SEL_0101_AIN5 = 0x05, //!< 8'b00000101 |
whismanoid | 23:e0c36767f98b | 845 | AINN_SEL_0110_AIN6 = 0x06, //!< 8'b00000110 |
whismanoid | 23:e0c36767f98b | 846 | AINN_SEL_0111_AIN7 = 0x07, //!< 8'b00000111 |
whismanoid | 23:e0c36767f98b | 847 | AINN_SEL_1000_AIN8 = 0x08, //!< 8'b00001000 |
whismanoid | 23:e0c36767f98b | 848 | AINN_SEL_1001_AIN9 = 0x09, //!< 8'b00001001 |
whismanoid | 23:e0c36767f98b | 849 | AINN_SEL_1010_GND = 0x0a, //!< 8'b00001010 |
whismanoid | 23:e0c36767f98b | 850 | AINN_SEL_1011_unconnected = 0x0b, //!< 8'b00001011 |
whismanoid | 23:e0c36767f98b | 851 | AINN_SEL_1100_unconnected = 0x0c, //!< 8'b00001100 |
whismanoid | 23:e0c36767f98b | 852 | AINN_SEL_1101_unconnected = 0x0d, //!< 8'b00001101 |
whismanoid | 23:e0c36767f98b | 853 | AINN_SEL_1110_unconnected = 0x0e, //!< 8'b00001110 |
whismanoid | 23:e0c36767f98b | 854 | AINN_SEL_1111_unconnected = 0x0f, //!< 8'b00001111 |
whismanoid | 23:e0c36767f98b | 855 | } MAX11410_AINN_SEL_enum_t; |
whismanoid | 23:e0c36767f98b | 856 | |
whismanoid | 23:e0c36767f98b | 857 | // CODE GENERATOR: TypedefEnum MAX11410_IDAC1_SEL_enum_t |
whismanoid | 23:e0c36767f98b | 858 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 859 | /// Input multiplexer channel selection |
whismanoid | 23:e0c36767f98b | 860 | /// CMD_r000_1100_dddd_dddd_MUX_CTRL1 field IDAC1_SEL[3:0] |
whismanoid | 23:e0c36767f98b | 861 | /// |
whismanoid | 23:e0c36767f98b | 862 | /// - 0000: AIN0 |
whismanoid | 23:e0c36767f98b | 863 | /// - 0001: AIN1 |
whismanoid | 23:e0c36767f98b | 864 | /// - 0010: AIN2 |
whismanoid | 23:e0c36767f98b | 865 | /// - 0011: AIN3 |
whismanoid | 23:e0c36767f98b | 866 | /// - 0100: AIN4 |
whismanoid | 23:e0c36767f98b | 867 | /// - 0101: AIN5 |
whismanoid | 23:e0c36767f98b | 868 | /// - 0110: AIN6 |
whismanoid | 23:e0c36767f98b | 869 | /// - 0111: AIN7 |
whismanoid | 23:e0c36767f98b | 870 | /// - 1000: AIN8 |
whismanoid | 23:e0c36767f98b | 871 | /// - 1001: AIN9 |
whismanoid | 23:e0c36767f98b | 872 | /// - 1010: Unconnected; IDAC1 powered down. |
whismanoid | 23:e0c36767f98b | 873 | /// - 1011: Unconnected; IDAC1 powered down. |
whismanoid | 23:e0c36767f98b | 874 | /// - 1100: Unconnected; IDAC1 powered down. |
whismanoid | 23:e0c36767f98b | 875 | /// - 1101: Unconnected; IDAC1 powered down. |
whismanoid | 23:e0c36767f98b | 876 | /// - 1110: Unconnected; IDAC1 powered down. |
whismanoid | 23:e0c36767f98b | 877 | /// - 1111: Unconnected; IDAC1 powered down.(Default) |
whismanoid | 23:e0c36767f98b | 878 | typedef enum MAX11410_IDAC1_SEL_enum_t { |
whismanoid | 23:e0c36767f98b | 879 | IDAC1_SEL_0000_AIN0 = 0x00, //!< 8'b00000000 |
whismanoid | 23:e0c36767f98b | 880 | IDAC1_SEL_0001_AIN1 = 0x01, //!< 8'b00000001 |
whismanoid | 23:e0c36767f98b | 881 | IDAC1_SEL_0010_AIN2 = 0x02, //!< 8'b00000010 |
whismanoid | 23:e0c36767f98b | 882 | IDAC1_SEL_0011_AIN3 = 0x03, //!< 8'b00000011 |
whismanoid | 23:e0c36767f98b | 883 | IDAC1_SEL_0100_AIN4 = 0x04, //!< 8'b00000100 |
whismanoid | 23:e0c36767f98b | 884 | IDAC1_SEL_0101_AIN5 = 0x05, //!< 8'b00000101 |
whismanoid | 23:e0c36767f98b | 885 | IDAC1_SEL_0110_AIN6 = 0x06, //!< 8'b00000110 |
whismanoid | 23:e0c36767f98b | 886 | IDAC1_SEL_0111_AIN7 = 0x07, //!< 8'b00000111 |
whismanoid | 23:e0c36767f98b | 887 | IDAC1_SEL_1000_AIN8 = 0x08, //!< 8'b00001000 |
whismanoid | 23:e0c36767f98b | 888 | IDAC1_SEL_1001_AIN9 = 0x09, //!< 8'b00001001 |
whismanoid | 23:e0c36767f98b | 889 | IDAC1_SEL_1010_unconnected = 0x0a, //!< 8'b00001010 |
whismanoid | 23:e0c36767f98b | 890 | IDAC1_SEL_1011_unconnected = 0x0b, //!< 8'b00001011 |
whismanoid | 23:e0c36767f98b | 891 | IDAC1_SEL_1100_unconnected = 0x0c, //!< 8'b00001100 |
whismanoid | 23:e0c36767f98b | 892 | IDAC1_SEL_1101_unconnected = 0x0d, //!< 8'b00001101 |
whismanoid | 23:e0c36767f98b | 893 | IDAC1_SEL_1110_unconnected = 0x0e, //!< 8'b00001110 |
whismanoid | 23:e0c36767f98b | 894 | IDAC1_SEL_1111_unconnected = 0x0f, //!< 8'b00001111 |
whismanoid | 23:e0c36767f98b | 895 | } MAX11410_IDAC1_SEL_enum_t; |
whismanoid | 23:e0c36767f98b | 896 | |
whismanoid | 23:e0c36767f98b | 897 | // CODE GENERATOR: TypedefEnum MAX11410_IDAC0_SEL_enum_t |
whismanoid | 23:e0c36767f98b | 898 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 899 | /// Input multiplexer channel selection |
whismanoid | 23:e0c36767f98b | 900 | /// CMD_r000_1100_dddd_dddd_MUX_CTRL1 field IDAC0_SEL[3:0] |
whismanoid | 23:e0c36767f98b | 901 | /// |
whismanoid | 23:e0c36767f98b | 902 | /// - 0000: AIN0 |
whismanoid | 23:e0c36767f98b | 903 | /// - 0001: AIN1 |
whismanoid | 23:e0c36767f98b | 904 | /// - 0010: AIN2 |
whismanoid | 23:e0c36767f98b | 905 | /// - 0011: AIN3 |
whismanoid | 23:e0c36767f98b | 906 | /// - 0100: AIN4 |
whismanoid | 23:e0c36767f98b | 907 | /// - 0101: AIN5 |
whismanoid | 23:e0c36767f98b | 908 | /// - 0110: AIN6 |
whismanoid | 23:e0c36767f98b | 909 | /// - 0111: AIN7 |
whismanoid | 23:e0c36767f98b | 910 | /// - 1000: AIN8 |
whismanoid | 23:e0c36767f98b | 911 | /// - 1001: AIN9 |
whismanoid | 23:e0c36767f98b | 912 | /// - 1010: Unconnected; IDAC0 powered down. |
whismanoid | 23:e0c36767f98b | 913 | /// - 1011: Unconnected; IDAC0 powered down. |
whismanoid | 23:e0c36767f98b | 914 | /// - 1100: Unconnected; IDAC0 powered down. |
whismanoid | 23:e0c36767f98b | 915 | /// - 1101: Unconnected; IDAC0 powered down. |
whismanoid | 23:e0c36767f98b | 916 | /// - 1110: Unconnected; IDAC0 powered down. |
whismanoid | 23:e0c36767f98b | 917 | /// - 1111: Unconnected; IDAC0 powered down.(Default) |
whismanoid | 23:e0c36767f98b | 918 | typedef enum MAX11410_IDAC0_SEL_enum_t { |
whismanoid | 23:e0c36767f98b | 919 | IDAC0_SEL_0000_AIN0 = 0x00, //!< 8'b00000000 |
whismanoid | 23:e0c36767f98b | 920 | IDAC0_SEL_0001_AIN1 = 0x01, //!< 8'b00000001 |
whismanoid | 23:e0c36767f98b | 921 | IDAC0_SEL_0010_AIN2 = 0x02, //!< 8'b00000010 |
whismanoid | 23:e0c36767f98b | 922 | IDAC0_SEL_0011_AIN3 = 0x03, //!< 8'b00000011 |
whismanoid | 23:e0c36767f98b | 923 | IDAC0_SEL_0100_AIN4 = 0x04, //!< 8'b00000100 |
whismanoid | 23:e0c36767f98b | 924 | IDAC0_SEL_0101_AIN5 = 0x05, //!< 8'b00000101 |
whismanoid | 23:e0c36767f98b | 925 | IDAC0_SEL_0110_AIN6 = 0x06, //!< 8'b00000110 |
whismanoid | 23:e0c36767f98b | 926 | IDAC0_SEL_0111_AIN7 = 0x07, //!< 8'b00000111 |
whismanoid | 23:e0c36767f98b | 927 | IDAC0_SEL_1000_AIN8 = 0x08, //!< 8'b00001000 |
whismanoid | 23:e0c36767f98b | 928 | IDAC0_SEL_1001_AIN9 = 0x09, //!< 8'b00001001 |
whismanoid | 23:e0c36767f98b | 929 | IDAC0_SEL_1010_unconnected = 0x0a, //!< 8'b00001010 |
whismanoid | 23:e0c36767f98b | 930 | IDAC0_SEL_1011_unconnected = 0x0b, //!< 8'b00001011 |
whismanoid | 23:e0c36767f98b | 931 | IDAC0_SEL_1100_unconnected = 0x0c, //!< 8'b00001100 |
whismanoid | 23:e0c36767f98b | 932 | IDAC0_SEL_1101_unconnected = 0x0d, //!< 8'b00001101 |
whismanoid | 23:e0c36767f98b | 933 | IDAC0_SEL_1110_unconnected = 0x0e, //!< 8'b00001110 |
whismanoid | 23:e0c36767f98b | 934 | IDAC0_SEL_1111_unconnected = 0x0f, //!< 8'b00001111 |
whismanoid | 23:e0c36767f98b | 935 | } MAX11410_IDAC0_SEL_enum_t; |
whismanoid | 23:e0c36767f98b | 936 | |
whismanoid | 23:e0c36767f98b | 937 | // CODE GENERATOR: TypedefEnum MAX11410_SIG_PATH_enum_t |
whismanoid | 23:e0c36767f98b | 938 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 939 | /// Input multiplexer channel selection |
whismanoid | 23:e0c36767f98b | 940 | /// CMD_r000_1110_xxdd_xddd_PGA field SIG_PATH[1:0] |
whismanoid | 23:e0c36767f98b | 941 | /// |
whismanoid | 23:e0c36767f98b | 942 | /// - 00: Buffered, low-power, unity-gain path (PGA disabled, digital gain) [default] |
whismanoid | 23:e0c36767f98b | 943 | /// - 01: Bypass path (signal buffer disabled,PGA disabled, digital gain) |
whismanoid | 23:e0c36767f98b | 944 | /// - 10: PGA path (signal buffer disabled, analog gain) |
whismanoid | 23:e0c36767f98b | 945 | /// - 11: Reserved |
whismanoid | 23:e0c36767f98b | 946 | typedef enum MAX11410_SIG_PATH_enum_t { |
whismanoid | 23:e0c36767f98b | 947 | SIG_PATH_00_BUFFERED = 0x00, //!< 8'b00000000 |
whismanoid | 23:e0c36767f98b | 948 | SIG_PATH_01_BYPASS = 0x01, //!< 8'b00000001 |
whismanoid | 23:e0c36767f98b | 949 | SIG_PATH_10_PGA = 0x02, //!< 8'b00000010 |
whismanoid | 23:e0c36767f98b | 950 | SIG_PATH_11_reserved = 0x03, //!< 8'b00000011 |
whismanoid | 23:e0c36767f98b | 951 | } MAX11410_SIG_PATH_enum_t; |
whismanoid | 23:e0c36767f98b | 952 | |
whismanoid | 23:e0c36767f98b | 953 | // CODE GENERATOR: TypedefEnum MAX11410_GAIN_enum_t |
whismanoid | 23:e0c36767f98b | 954 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 955 | /// Input multiplexer channel selection |
whismanoid | 23:e0c36767f98b | 956 | /// CMD_r000_1110_xxdd_xddd_PGA field GAIN[2:0] |
whismanoid | 23:e0c36767f98b | 957 | /// |
whismanoid | 23:e0c36767f98b | 958 | /// - 000: 1 (default) |
whismanoid | 23:e0c36767f98b | 959 | /// - 001: 2 |
whismanoid | 23:e0c36767f98b | 960 | /// - 010: 4 |
whismanoid | 23:e0c36767f98b | 961 | /// - 011: 8 |
whismanoid | 23:e0c36767f98b | 962 | /// - 100: 16 |
whismanoid | 23:e0c36767f98b | 963 | /// - 101: 32 |
whismanoid | 23:e0c36767f98b | 964 | /// - 110: 64 |
whismanoid | 23:e0c36767f98b | 965 | /// - 111: 128 |
whismanoid | 23:e0c36767f98b | 966 | typedef enum MAX11410_GAIN_enum_t { |
whismanoid | 23:e0c36767f98b | 967 | GAIN_000_1 = 0x00, //!< 8'b00000000 |
whismanoid | 23:e0c36767f98b | 968 | GAIN_001_2 = 0x01, //!< 8'b00000001 |
whismanoid | 23:e0c36767f98b | 969 | GAIN_010_4 = 0x02, //!< 8'b00000010 |
whismanoid | 23:e0c36767f98b | 970 | GAIN_011_8 = 0x03, //!< 8'b00000011 |
whismanoid | 23:e0c36767f98b | 971 | GAIN_100_16 = 0x04, //!< 8'b00000100 |
whismanoid | 23:e0c36767f98b | 972 | GAIN_101_32 = 0x05, //!< 8'b00000101 |
whismanoid | 23:e0c36767f98b | 973 | GAIN_110_64 = 0x06, //!< 8'b00000110 |
whismanoid | 23:e0c36767f98b | 974 | GAIN_111_128 = 0x07, //!< 8'b00000111 |
whismanoid | 23:e0c36767f98b | 975 | } MAX11410_GAIN_enum_t; |
whismanoid | 23:e0c36767f98b | 976 | |
whismanoid | 23:e0c36767f98b | 977 | // TODO1: CODE GENERATOR: ic_variant -- IC's supported with this driver |
whismanoid | 23:e0c36767f98b | 978 | /** |
whismanoid | 23:e0c36767f98b | 979 | * @brief IC's supported with this driver |
whismanoid | 23:e0c36767f98b | 980 | * @details MAX11410 |
whismanoid | 23:e0c36767f98b | 981 | */ |
whismanoid | 23:e0c36767f98b | 982 | typedef enum |
whismanoid | 23:e0c36767f98b | 983 | { |
whismanoid | 23:e0c36767f98b | 984 | MAX11410_IC = 0, |
whismanoid | 23:e0c36767f98b | 985 | //MAX11410_IC = 1 |
whismanoid | 23:e0c36767f98b | 986 | } MAX11410_ic_t; |
whismanoid | 23:e0c36767f98b | 987 | |
whismanoid | 23:e0c36767f98b | 988 | // TODO1: CODE GENERATOR: class constructor declaration |
whismanoid | 23:e0c36767f98b | 989 | /**********************************************************//** |
whismanoid | 23:e0c36767f98b | 990 | * @brief Constructor for MAX11410 Class. |
whismanoid | 23:e0c36767f98b | 991 | * |
whismanoid | 23:e0c36767f98b | 992 | * @details Requires an existing SPI object as well as a DigitalOut object. |
whismanoid | 23:e0c36767f98b | 993 | * The DigitalOut object is used for a chip enable signal |
whismanoid | 23:e0c36767f98b | 994 | * |
whismanoid | 23:e0c36767f98b | 995 | * On Entry: |
whismanoid | 23:e0c36767f98b | 996 | * @param[in] spi - pointer to existing SPI object |
whismanoid | 23:e0c36767f98b | 997 | * @param[in] cs_pin - pointer to a DigitalOut pin object |
whismanoid | 23:e0c36767f98b | 998 | * CODE GENERATOR: class constructor docstrings gpio InputPin pins |
whismanoid | 23:e0c36767f98b | 999 | * CODE GENERATOR: class constructor docstrings gpio OutputPin pins |
whismanoid | 23:e0c36767f98b | 1000 | * @param[in] ic_variant - which type of MAX11410 is used |
whismanoid | 23:e0c36767f98b | 1001 | * |
whismanoid | 23:e0c36767f98b | 1002 | * On Exit: |
whismanoid | 23:e0c36767f98b | 1003 | * |
whismanoid | 23:e0c36767f98b | 1004 | * @return None |
whismanoid | 23:e0c36767f98b | 1005 | **************************************************************/ |
whismanoid | 23:e0c36767f98b | 1006 | MAX11410(SPI &spi, DigitalOut &cs_pin, // SPI interface |
whismanoid | 23:e0c36767f98b | 1007 | // CODE GENERATOR: class constructor declaration gpio InputPin pins |
whismanoid | 23:e0c36767f98b | 1008 | // CODE GENERATOR: class constructor declaration gpio OutputPin pins |
whismanoid | 23:e0c36767f98b | 1009 | MAX11410_ic_t ic_variant); |
whismanoid | 23:e0c36767f98b | 1010 | |
whismanoid | 23:e0c36767f98b | 1011 | // CODE GENERATOR: class destructor declaration |
whismanoid | 23:e0c36767f98b | 1012 | /************************************************************ |
whismanoid | 23:e0c36767f98b | 1013 | * @brief Default destructor for MAX11410 Class. |
whismanoid | 23:e0c36767f98b | 1014 | * |
whismanoid | 23:e0c36767f98b | 1015 | * @details Destroys SPI object if owner |
whismanoid | 23:e0c36767f98b | 1016 | * |
whismanoid | 23:e0c36767f98b | 1017 | * On Entry: |
whismanoid | 23:e0c36767f98b | 1018 | * |
whismanoid | 23:e0c36767f98b | 1019 | * On Exit: |
whismanoid | 23:e0c36767f98b | 1020 | * |
whismanoid | 23:e0c36767f98b | 1021 | * @return None |
whismanoid | 23:e0c36767f98b | 1022 | **************************************************************/ |
whismanoid | 23:e0c36767f98b | 1023 | ~MAX11410(); |
whismanoid | 23:e0c36767f98b | 1024 | |
whismanoid | 23:e0c36767f98b | 1025 | // CODE GENERATOR: spi_frequency setter declaration |
whismanoid | 23:e0c36767f98b | 1026 | /// set SPI SCLK frequency |
whismanoid | 23:e0c36767f98b | 1027 | void spi_frequency(int spi_sclk_Hz); |
whismanoid | 23:e0c36767f98b | 1028 | |
whismanoid | 23:e0c36767f98b | 1029 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 1030 | // CODE GENERATOR: omit typedef enum MAX11410_device_t, class members instead of global device object |
whismanoid | 23:e0c36767f98b | 1031 | public: |
whismanoid | 23:e0c36767f98b | 1032 | |
whismanoid | 23:e0c36767f98b | 1033 | /// reference voltage, in Volts |
whismanoid | 23:e0c36767f98b | 1034 | double VRef; |
whismanoid | 23:e0c36767f98b | 1035 | |
whismanoid | 25:a2afb91c605a | 1036 | /// shadow of register CMD_r011_1000_dddd_dddd_dddd_dddd_dxxx_dddd_STATUS |
whismanoid | 25:a2afb91c605a | 1037 | uint32_t status; |
whismanoid | 25:a2afb91c605a | 1038 | |
whismanoid | 25:a2afb91c605a | 1039 | /// shadow of register CMD_r011_0000_dddd_dddd_dddd_dddd_dddd_dddd_DATA0 |
whismanoid | 25:a2afb91c605a | 1040 | uint32_t data0; |
whismanoid | 25:a2afb91c605a | 1041 | |
whismanoid | 23:e0c36767f98b | 1042 | // CODE GENERATOR: omit global g_MAX11410_device |
whismanoid | 23:e0c36767f98b | 1043 | |
whismanoid | 23:e0c36767f98b | 1044 | // CODE GENERATOR: extern function declarations |
whismanoid | 23:e0c36767f98b | 1045 | // CODE GENERATOR: extern function declaration SPIoutputCS |
whismanoid | 23:e0c36767f98b | 1046 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 1047 | // Assert SPI Chip Select |
whismanoid | 23:e0c36767f98b | 1048 | // SPI chip-select for MAX11410 |
whismanoid | 23:e0c36767f98b | 1049 | // |
whismanoid | 23:e0c36767f98b | 1050 | void SPIoutputCS(int isLogicHigh); |
whismanoid | 23:e0c36767f98b | 1051 | |
whismanoid | 23:e0c36767f98b | 1052 | // CODE GENERATOR: extern function declaration SPIwrite16bits |
whismanoid | 23:e0c36767f98b | 1053 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 1054 | // SPI write 16 bits |
whismanoid | 23:e0c36767f98b | 1055 | // SPI interface to MAX11410 shift 16 bits mosiData into MAX11410 DIN |
whismanoid | 23:e0c36767f98b | 1056 | // |
whismanoid | 23:e0c36767f98b | 1057 | void SPIwrite16bits(int16_t mosiData16); |
whismanoid | 23:e0c36767f98b | 1058 | |
whismanoid | 25:a2afb91c605a | 1059 | // CODE GENERATOR: extern function declaration SPIreadWrite16bits |
whismanoid | 25:a2afb91c605a | 1060 | //---------------------------------------- |
whismanoid | 25:a2afb91c605a | 1061 | // SPI read and write 16 bits |
whismanoid | 25:a2afb91c605a | 1062 | // SPI interface to MAX11410 shift 16 bits mosiData16 into MAX11410 DIN |
whismanoid | 25:a2afb91c605a | 1063 | // while simultaneously capturing 16 bits miso data from MAX11410 DOUT |
whismanoid | 25:a2afb91c605a | 1064 | // |
whismanoid | 25:a2afb91c605a | 1065 | int16_t SPIreadWrite16bits(int16_t mosiData16); |
whismanoid | 25:a2afb91c605a | 1066 | |
whismanoid | 25:a2afb91c605a | 1067 | // CODE GENERATOR: extern function declaration SPIreadWrite32bits |
whismanoid | 25:a2afb91c605a | 1068 | //---------------------------------------- |
whismanoid | 25:a2afb91c605a | 1069 | // SPI read and write 32 bits |
whismanoid | 25:a2afb91c605a | 1070 | // SPI interface to MAX11410 shift 32 bits mosiData into MAX11410 DIN |
whismanoid | 25:a2afb91c605a | 1071 | // while simultaneously capturing 32 bits miso data from MAX11410 DOUT |
whismanoid | 25:a2afb91c605a | 1072 | // |
whismanoid | 25:a2afb91c605a | 1073 | int32_t SPIreadWrite32bits(int32_t mosiData32); |
whismanoid | 25:a2afb91c605a | 1074 | |
whismanoid | 23:e0c36767f98b | 1075 | // CODE GENERATOR: class member data |
whismanoid | 23:e0c36767f98b | 1076 | private: |
whismanoid | 23:e0c36767f98b | 1077 | // CODE GENERATOR: class member data for SPI interface |
whismanoid | 23:e0c36767f98b | 1078 | // SPI object |
whismanoid | 23:e0c36767f98b | 1079 | SPI &m_spi; |
whismanoid | 23:e0c36767f98b | 1080 | int m_SPI_SCLK_Hz; |
whismanoid | 23:e0c36767f98b | 1081 | int m_SPI_dataMode; |
whismanoid | 23:e0c36767f98b | 1082 | int m_SPI_cs_state; |
whismanoid | 23:e0c36767f98b | 1083 | |
whismanoid | 23:e0c36767f98b | 1084 | // Selector pin object |
whismanoid | 23:e0c36767f98b | 1085 | DigitalOut &m_cs_pin; |
whismanoid | 23:e0c36767f98b | 1086 | |
whismanoid | 23:e0c36767f98b | 1087 | // CODE GENERATOR: class member data for gpio InputPin pins |
whismanoid | 23:e0c36767f98b | 1088 | // CODE GENERATOR: class member data for gpio OutputPin pins |
whismanoid | 23:e0c36767f98b | 1089 | |
whismanoid | 23:e0c36767f98b | 1090 | // Identifies which IC variant is being used |
whismanoid | 23:e0c36767f98b | 1091 | MAX11410_ic_t m_ic_variant; |
whismanoid | 23:e0c36767f98b | 1092 | |
whismanoid | 23:e0c36767f98b | 1093 | public: |
whismanoid | 23:e0c36767f98b | 1094 | |
whismanoid | 23:e0c36767f98b | 1095 | // CODE GENERATOR: class member function declarations |
whismanoid | 23:e0c36767f98b | 1096 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 1097 | /// Initialize device |
whismanoid | 23:e0c36767f98b | 1098 | /// @return 1 on success; 0 on failure |
whismanoid | 23:e0c36767f98b | 1099 | uint8_t Init(void); |
whismanoid | 23:e0c36767f98b | 1100 | |
whismanoid | 23:e0c36767f98b | 1101 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 1102 | /// Return the physical voltage corresponding to DAC register. |
whismanoid | 23:e0c36767f98b | 1103 | /// Does not perform any offset or gain correction. |
whismanoid | 23:e0c36767f98b | 1104 | /// |
whismanoid | 23:e0c36767f98b | 1105 | /// @pre g_MAX11410_device.VRef = Voltage of REF input, in Volts |
whismanoid | 23:e0c36767f98b | 1106 | /// @param[in] value_u24: raw 24-bit MAX11410 code (right justified). |
whismanoid | 23:e0c36767f98b | 1107 | /// @return physical voltage corresponding to MAX11410 code. |
whismanoid | 23:e0c36767f98b | 1108 | double VoltageOfCode(uint16_t value_u24); |
whismanoid | 23:e0c36767f98b | 1109 | |
whismanoid | 23:e0c36767f98b | 1110 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 1111 | /// Write an 8-bit MAX11410 register |
whismanoid | 23:e0c36767f98b | 1112 | /// |
whismanoid | 22:3e03687b7e95 | 1113 | /// CMD_1aaa_aaaa_REGISTER_READ bit is cleared 0. |
whismanoid | 23:e0c36767f98b | 1114 | /// |
whismanoid | 23:e0c36767f98b | 1115 | /// SPI 16-bit transfer |
whismanoid | 23:e0c36767f98b | 1116 | /// |
whismanoid | 23:e0c36767f98b | 1117 | /// SPI MOSI = 0aaa_aaaa_dddd_dddd |
whismanoid | 23:e0c36767f98b | 1118 | /// |
whismanoid | 23:e0c36767f98b | 1119 | /// SPI MISO = xxxx_xxxx_xxxx_xxxx |
whismanoid | 23:e0c36767f98b | 1120 | /// |
whismanoid | 23:e0c36767f98b | 1121 | /// @return 1 on success; 0 on failure |
whismanoid | 23:e0c36767f98b | 1122 | uint8_t Write_8bit(MAX11410_CMD_enum_t regAddress, uint8_t regData); |
whismanoid | 23:e0c36767f98b | 1123 | |
whismanoid | 23:e0c36767f98b | 1124 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 1125 | /// Read an 8-bit MAX11410 register |
whismanoid | 23:e0c36767f98b | 1126 | /// |
whismanoid | 22:3e03687b7e95 | 1127 | /// CMD_1aaa_aaaa_REGISTER_READ bit is set 1. |
whismanoid | 23:e0c36767f98b | 1128 | /// |
whismanoid | 23:e0c36767f98b | 1129 | /// SPI 16-bit transfer |
whismanoid | 23:e0c36767f98b | 1130 | /// |
whismanoid | 23:e0c36767f98b | 1131 | /// SPI MOSI = 1aaa_aaaa_0000_0000 |
whismanoid | 23:e0c36767f98b | 1132 | /// |
whismanoid | 23:e0c36767f98b | 1133 | /// SPI MISO = xxxx_xxxx_dddd_dddd |
whismanoid | 23:e0c36767f98b | 1134 | /// |
whismanoid | 23:e0c36767f98b | 1135 | /// @return 1 on success; 0 on failure |
whismanoid | 23:e0c36767f98b | 1136 | uint8_t Read_8bit(MAX11410_CMD_enum_t regAddress, uint8_t* ptrRegData); |
whismanoid | 23:e0c36767f98b | 1137 | |
whismanoid | 23:e0c36767f98b | 1138 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 1139 | /// Write a 16-bit MAX11410 register |
whismanoid | 23:e0c36767f98b | 1140 | /// |
whismanoid | 22:3e03687b7e95 | 1141 | /// CMD_1aaa_aaaa_REGISTER_READ bit is cleared 0. |
whismanoid | 23:e0c36767f98b | 1142 | /// |
whismanoid | 23:e0c36767f98b | 1143 | /// SPI 24-bit transfer |
whismanoid | 23:e0c36767f98b | 1144 | /// |
whismanoid | 23:e0c36767f98b | 1145 | /// SPI MOSI = 0aaa_aaaa_dddd_dddd_dddd_dddd |
whismanoid | 23:e0c36767f98b | 1146 | /// |
whismanoid | 23:e0c36767f98b | 1147 | /// SPI MISO = xxxx_xxxx_xxxx_xxxx_xxxx_xxxx |
whismanoid | 23:e0c36767f98b | 1148 | /// |
whismanoid | 23:e0c36767f98b | 1149 | /// @return 1 on success; 0 on failure |
whismanoid | 23:e0c36767f98b | 1150 | uint8_t Write_16bit(MAX11410_CMD_enum_t regAddress, uint16_t regData); |
whismanoid | 23:e0c36767f98b | 1151 | |
whismanoid | 23:e0c36767f98b | 1152 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 1153 | /// Read a 16-bit MAX11410 register |
whismanoid | 23:e0c36767f98b | 1154 | /// |
whismanoid | 22:3e03687b7e95 | 1155 | /// CMD_1aaa_aaaa_REGISTER_READ bit is set 1. |
whismanoid | 23:e0c36767f98b | 1156 | /// |
whismanoid | 23:e0c36767f98b | 1157 | /// SPI 24-bit transfer |
whismanoid | 23:e0c36767f98b | 1158 | /// |
whismanoid | 23:e0c36767f98b | 1159 | /// SPI MOSI = 1aaa_aaaa_0000_0000_0000_0000 |
whismanoid | 23:e0c36767f98b | 1160 | /// |
whismanoid | 23:e0c36767f98b | 1161 | /// SPI MISO = xxxx_xxxx_dddd_dddd_dddd_dddd |
whismanoid | 23:e0c36767f98b | 1162 | /// |
whismanoid | 23:e0c36767f98b | 1163 | /// @return 1 on success; 0 on failure |
whismanoid | 23:e0c36767f98b | 1164 | uint8_t Read_16bit(MAX11410_CMD_enum_t regAddress, uint16_t* ptrRegData); |
whismanoid | 23:e0c36767f98b | 1165 | |
whismanoid | 23:e0c36767f98b | 1166 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 1167 | /// Write a 24-bit MAX11410 register |
whismanoid | 23:e0c36767f98b | 1168 | /// |
whismanoid | 22:3e03687b7e95 | 1169 | /// CMD_1aaa_aaaa_REGISTER_READ bit is cleared 0. |
whismanoid | 23:e0c36767f98b | 1170 | /// |
whismanoid | 23:e0c36767f98b | 1171 | /// SPI 32-bit transfer |
whismanoid | 23:e0c36767f98b | 1172 | /// |
whismanoid | 23:e0c36767f98b | 1173 | /// SPI MOSI = 0aaa_aaaa_dddd_dddd_dddd_dddd_dddd_dddd |
whismanoid | 23:e0c36767f98b | 1174 | /// |
whismanoid | 23:e0c36767f98b | 1175 | /// SPI MISO = xxxx_xxxx_xxxx_xxxx_xxxx_xxxx_xxxx_xxxx |
whismanoid | 23:e0c36767f98b | 1176 | /// |
whismanoid | 23:e0c36767f98b | 1177 | /// @return 1 on success; 0 on failure |
whismanoid | 23:e0c36767f98b | 1178 | uint8_t Write_24bit(MAX11410_CMD_enum_t regAddress, uint32_t regData); |
whismanoid | 23:e0c36767f98b | 1179 | |
whismanoid | 23:e0c36767f98b | 1180 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 1181 | /// Read a 24-bit MAX11410 register |
whismanoid | 23:e0c36767f98b | 1182 | /// |
whismanoid | 22:3e03687b7e95 | 1183 | /// CMD_1aaa_aaaa_REGISTER_READ bit is set 1. |
whismanoid | 23:e0c36767f98b | 1184 | /// |
whismanoid | 23:e0c36767f98b | 1185 | /// SPI 32-bit transfer |
whismanoid | 23:e0c36767f98b | 1186 | /// |
whismanoid | 23:e0c36767f98b | 1187 | /// SPI MOSI = 1aaa_aaaa_0000_0000_0000_0000_0000_0000 |
whismanoid | 23:e0c36767f98b | 1188 | /// |
whismanoid | 23:e0c36767f98b | 1189 | /// SPI MISO = xxxx_xxxx_dddd_dddd_dddd_dddd_dddd_dddd |
whismanoid | 23:e0c36767f98b | 1190 | /// |
whismanoid | 23:e0c36767f98b | 1191 | /// @return 1 on success; 0 on failure |
whismanoid | 23:e0c36767f98b | 1192 | uint8_t Read_24bit(MAX11410_CMD_enum_t regAddress, uint32_t* ptrRegData); |
whismanoid | 23:e0c36767f98b | 1193 | |
whismanoid | 23:e0c36767f98b | 1194 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 1195 | /// Configure Measurement for voltage input. |
whismanoid | 23:e0c36767f98b | 1196 | /// |
whismanoid | 23:e0c36767f98b | 1197 | /// Example code for typical voltage measurement. |
whismanoid | 23:e0c36767f98b | 1198 | /// |
whismanoid | 23:e0c36767f98b | 1199 | /// SPI register write sequence test AIN0-AGND voltage input using REF2=2.5V |
whismanoid | 23:e0c36767f98b | 1200 | /// write8 0x00 PD = 0x03 (Reset Registers; enter Standby mode) |
whismanoid | 23:e0c36767f98b | 1201 | /// write8 0x00 PD = 0x00 (NOP) |
whismanoid | 23:e0c36767f98b | 1202 | /// write8 0x08 FILTER = 0x34 to select RATE_0100, LINEF_11_SINC4 60SPS (given CONV_TYPE_01_Continuous ) |
whismanoid | 23:e0c36767f98b | 1203 | /// write8 0x0B MUX_CTRL0 = 0x0A to select AINP=AIN0 and AINN=GND |
whismanoid | 23:e0c36767f98b | 1204 | /// 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 | 23:e0c36767f98b | 1205 | /// write8 0x0E PGA = 0x00 to select input path = Buffers, digital gain = 1V/V |
whismanoid | 23:e0c36767f98b | 1206 | /// write8 0x01 CONV_START = 0x01 to set Conversion Mode = Continuous |
whismanoid | 23:e0c36767f98b | 1207 | /// read24 0x80|0x38 STATUS (%SW 0xB8 0 0 0) |
whismanoid | 23:e0c36767f98b | 1208 | /// read24 0x80|0x30 DATA0 (%SW 0xB0 0 0 0) |
whismanoid | 23:e0c36767f98b | 1209 | /// |
whismanoid | 23:e0c36767f98b | 1210 | /// @param[in] channel_hi = channel high side |
whismanoid | 23:e0c36767f98b | 1211 | /// @param[in] channel_lo = channel low side |
whismanoid | 23:e0c36767f98b | 1212 | /// |
whismanoid | 23:e0c36767f98b | 1213 | /// @return 1 on success; 0 on failure |
whismanoid | 23:e0c36767f98b | 1214 | uint8_t Configure_Voltage(MAX11410_AINP_SEL_enum_t channel_hi, MAX11410_AINN_SEL_enum_t channel_lo); |
whismanoid | 23:e0c36767f98b | 1215 | |
whismanoid | 23:e0c36767f98b | 1216 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 1217 | /// Trigger Measurement for voltage input. |
whismanoid | 23:e0c36767f98b | 1218 | /// |
whismanoid | 23:e0c36767f98b | 1219 | /// Example code for typical voltage measurement. |
whismanoid | 23:e0c36767f98b | 1220 | /// |
whismanoid | 23:e0c36767f98b | 1221 | /// @param[in] channel_hi = channel high side |
whismanoid | 23:e0c36767f98b | 1222 | /// @param[in] channel_lo = channel low side |
whismanoid | 23:e0c36767f98b | 1223 | /// @post TODO: where does the measurement go? struct member? |
whismanoid | 23:e0c36767f98b | 1224 | /// |
whismanoid | 23:e0c36767f98b | 1225 | /// @return 1 on success; 0 on failure |
whismanoid | 23:e0c36767f98b | 1226 | uint8_t Measure_Voltage(MAX11410_AINP_SEL_enum_t channel_hi, MAX11410_AINN_SEL_enum_t channel_lo); |
whismanoid | 23:e0c36767f98b | 1227 | |
whismanoid | 23:e0c36767f98b | 1228 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 1229 | /// Configure Measurement for Resistive Temperature Device (RTD). |
whismanoid | 23:e0c36767f98b | 1230 | /// |
whismanoid | 23:e0c36767f98b | 1231 | /// Example code for typical RTD measurement. |
whismanoid | 23:e0c36767f98b | 1232 | /// |
whismanoid | 23:e0c36767f98b | 1233 | /// @param[in] channel_RTD_Force = channel RTD high side force |
whismanoid | 23:e0c36767f98b | 1234 | /// @param[in] channel_RTD_Hi = channel RTD high side sense |
whismanoid | 23:e0c36767f98b | 1235 | /// @param[in] channel_RTD_Lo = channel RTD low side |
whismanoid | 23:e0c36767f98b | 1236 | /// |
whismanoid | 23:e0c36767f98b | 1237 | /// @return 1 on success; 0 on failure |
whismanoid | 23:e0c36767f98b | 1238 | uint8_t Configure_RTD(MAX11410_AINP_SEL_enum_t channel_RTD_Force, MAX11410_AINP_SEL_enum_t channel_RTD_Hi, MAX11410_AINN_SEL_enum_t channel_RTD_Lo); |
whismanoid | 23:e0c36767f98b | 1239 | |
whismanoid | 23:e0c36767f98b | 1240 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 1241 | /// Trigger Measurement for Resistive Temperature Device (RTD). |
whismanoid | 23:e0c36767f98b | 1242 | /// |
whismanoid | 23:e0c36767f98b | 1243 | /// Example code for typical RTD measurement. |
whismanoid | 23:e0c36767f98b | 1244 | /// |
whismanoid | 23:e0c36767f98b | 1245 | /// @param[in] channel_RTD_Force = channel RTD high side force |
whismanoid | 23:e0c36767f98b | 1246 | /// @param[in] channel_RTD_Hi = channel RTD high side sense |
whismanoid | 23:e0c36767f98b | 1247 | /// @param[in] channel_RTD_Lo = channel RTD low side |
whismanoid | 23:e0c36767f98b | 1248 | /// @post TODO: where does the measurement go? struct member? |
whismanoid | 23:e0c36767f98b | 1249 | /// |
whismanoid | 23:e0c36767f98b | 1250 | /// @return 1 on success; 0 on failure |
whismanoid | 23:e0c36767f98b | 1251 | uint8_t Measure_RTD(MAX11410_AINP_SEL_enum_t channel_RTD_Force, MAX11410_AINP_SEL_enum_t channel_RTD_Hi, MAX11410_AINN_SEL_enum_t channel_RTD_Lo); |
whismanoid | 23:e0c36767f98b | 1252 | |
whismanoid | 23:e0c36767f98b | 1253 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 1254 | /// Configure Measurement for Thermocouple |
whismanoid | 23:e0c36767f98b | 1255 | /// |
whismanoid | 23:e0c36767f98b | 1256 | /// Example code for typical Thermocouple measurement. |
whismanoid | 23:e0c36767f98b | 1257 | /// |
whismanoid | 23:e0c36767f98b | 1258 | /// @param[in] channel_TC_Hi = channel of Thermocouple high side |
whismanoid | 23:e0c36767f98b | 1259 | /// @param[in] channel_TC_Lo = channel of Thermocouple low side |
whismanoid | 23:e0c36767f98b | 1260 | /// @param[in] channel_RTD_Hi = channel of cold junction RTD high side |
whismanoid | 23:e0c36767f98b | 1261 | /// @param[in] channel_RTD_Lo = channel of cold junction RTD low side |
whismanoid | 23:e0c36767f98b | 1262 | /// |
whismanoid | 23:e0c36767f98b | 1263 | /// @return 1 on success; 0 on failure |
whismanoid | 23:e0c36767f98b | 1264 | uint8_t Configure_Thermocouple(MAX11410_AINP_SEL_enum_t channel_TC_Hi, MAX11410_AINN_SEL_enum_t channel_TC_Lo, MAX11410_AINP_SEL_enum_t channel_RTD_Hi, MAX11410_AINP_SEL_enum_t channel_RTD_Lo); |
whismanoid | 23:e0c36767f98b | 1265 | |
whismanoid | 23:e0c36767f98b | 1266 | //---------------------------------------- |
whismanoid | 23:e0c36767f98b | 1267 | /// Trigger Measurement for Thermocouple |
whismanoid | 23:e0c36767f98b | 1268 | /// |
whismanoid | 23:e0c36767f98b | 1269 | /// Example code for typical Thermocouple measurement. |
whismanoid | 23:e0c36767f98b | 1270 | /// |
whismanoid | 23:e0c36767f98b | 1271 | /// @param[in] channel_TC_Hi = channel of Thermocouple high side |
whismanoid | 23:e0c36767f98b | 1272 | /// @param[in] channel_TC_Lo = channel of Thermocouple low side |
whismanoid | 23:e0c36767f98b | 1273 | /// @param[in] channel_RTD_Hi = channel of cold junction RTD high side |
whismanoid | 23:e0c36767f98b | 1274 | /// @param[in] channel_RTD_Lo = channel of cold junction RTD low side |
whismanoid | 23:e0c36767f98b | 1275 | /// @post TODO: where does the measurement go? struct member? |
whismanoid | 23:e0c36767f98b | 1276 | /// |
whismanoid | 23:e0c36767f98b | 1277 | /// @return 1 on success; 0 on failure |
whismanoid | 23:e0c36767f98b | 1278 | uint8_t Measure_Thermocouple(MAX11410_AINP_SEL_enum_t channel_TC_Hi, MAX11410_AINN_SEL_enum_t channel_TC_Lo, MAX11410_AINP_SEL_enum_t channel_RTD_Hi, MAX11410_AINP_SEL_enum_t channel_RTD_Lo); |
whismanoid | 23:e0c36767f98b | 1279 | |
whismanoid | 23:e0c36767f98b | 1280 | }; // end of class MAX11410 |
whismanoid | 23:e0c36767f98b | 1281 | |
whismanoid | 23:e0c36767f98b | 1282 | #endif // __MAX11410_H__ |
whismanoid | 23:e0c36767f98b | 1283 | |
whismanoid | 23:e0c36767f98b | 1284 | // End of file |