### Adafruit TMAG5273 Begin Function Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md Initializes the TMAG5273 sensor via I2C. It verifies the manufacturer ID, determines the sensor variant, sets default ranges, clears the power-on reset flag, and configures basic operation including axes, temperature, averaging, and conversion mode. Ensure the I2C bus is not busy before calling. ```cpp bool Adafruit_TMAG5273::begin(uint8_t addr, TwoWire *wire) { i2c_dev = new Adafruit_I2CDevice(addr, wire); if (!i2c_dev->begin()) { return false; } // Wait for power-up (270µs) delayMicroseconds(300); // Verify manufacturer ID if (getManufacturerID() != 0x5449) { return false; } // Determine variant from DEVICE_ID uint8_t ver = getDeviceID() & 0x03; _is_x1_variant = (ver == 1); // Set default ranges _range_xy = _is_x1_variant ? 40.0f : 133.0f; _range_z = _is_x1_variant ? 40.0f : 133.0f; // Clear POR flag clearPowerOnReset(); // Configure for basic operation: // - Enable all three axes // - Enable temperature // - 32x averaging for low noise // - Continuous conversion mode setMagneticChannels(TMAG5273_MAG_CH_XYZ); enableTemperature(true); setConversionAverage(TMAG5273_CONV_AVG_32X); setOperatingMode(TMAG5273_MODE_CONTINUOUS); return true; } ``` -------------------------------- ### Convert 16-bit Raw Temperature to Celsius Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md Converts a 16-bit signed raw temperature reading to degrees Celsius (°C) using predefined constants from the datasheet. ```cpp // Constants from datasheet const int16_t TADC_T0 = 17508; // ADC code at 25°C const float TSENS_T0 = 25.0f; // Reference temperature const float TADC_RES = 60.1f; // LSB per °C // 16-bit conversion float rawToTemperature(int16_t raw) { return TSENS_T0 + ((raw - TADC_T0) / TADC_RES); } ``` -------------------------------- ### RegisterBits for I2C_ADDRESS and I2C_ADDRESS_UPDATE_EN Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md Defines the I2C_ADDRESS and I2C_ADDRESS_UPDATE_EN fields for the I2C_ADDRESS register. ```cpp I2C_ADDRESS: Adafruit_BusIO_RegisterBits(®_i2c_address, 7, 1) I2C_ADDRESS_UPDATE_EN: Adafruit_BusIO_RegisterBits(®_i2c_address, 1, 0) ``` -------------------------------- ### RegisterBits for DEVICE_STATUS Fields Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md Defines the INTB_RB, OSC_ER, INT_ER, OTP_CRC_ER, and VCC_UV_ER fields for the DEVICE_STATUS register. ```cpp INTB_RB: Adafruit_BusIO_RegisterBits(®_device_status, 1, 4) OSC_ER: Adafruit_BusIO_RegisterBits(®_device_status, 1, 3) INT_ER: Adafruit_BusIO_RegisterBits(®_device_status, 1, 2) OTP_CRC_ER: Adafruit_BusIO_RegisterBits(®_device_status, 1, 1) VCC_UV_ER: Adafruit_BusIO_RegisterBits(®_device_status, 1, 0) ``` -------------------------------- ### Configure X_THR_CONFIG Register Bits Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md Defines the bit field for the X_THR_CONFIG register, setting the threshold for the X-axis. ```cpp X_THR_CONFIG: Adafruit_BusIO_RegisterBits(®_x_thr_config, 8, 0) ``` -------------------------------- ### Configure T_CONFIG Register Bits Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md Defines bit fields for the T_CONFIG register, setting the temperature threshold and enabling the temperature channel. ```cpp T_THR_CONFIG: Adafruit_BusIO_RegisterBits(®_t_config, 7, 1) T_CH_EN: Adafruit_BusIO_RegisterBits(®_t_config, 1, 0) ``` -------------------------------- ### RegisterBits for CONV_STATUS Fields Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md Defines the SET_COUNT, POR, DIAG_STATUS, and RESULT_STATUS fields for the CONV_STATUS register. ```cpp SET_COUNT: Adafruit_BusIO_RegisterBits(®_conv_status, 3, 5) POR: Adafruit_BusIO_RegisterBits(®_conv_status, 1, 4) DIAG_STATUS: Adafruit_BusIO_RegisterBits(®_conv_status, 1, 1) RESULT_STATUS: Adafruit_BusIO_RegisterBits(®_conv_status, 1, 0) ``` -------------------------------- ### RegisterBits for VER Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md Defines the VER field for the DEVICE_ID register, indicating the device version. ```cpp VER: Adafruit_BusIO_RegisterBits(®_device_id, 2, 0) ``` -------------------------------- ### TMAG5273 Magnetic Channel Enable Options Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md Defines the possible configurations for enabling magnetic channels (X, Y, Z) on the TMAG5273 sensor. ```cpp typedef enum { TMAG5273_MAG_CH_OFF = 0x00, // All channels off TMAG5273_MAG_CH_X = 0x01, // X only TMAG5273_MAG_CH_Y = 0x02, // Y only TMAG5273_MAG_CH_XY = 0x03, // X and Y TMAG5273_MAG_CH_Z = 0x04, // Z only TMAG5273_MAG_CH_ZX = 0x05, // Z and X TMAG5273_MAG_CH_YZ = 0x06, // Y and Z TMAG5273_MAG_CH_XYZ = 0x07, // X, Y, and Z TMAG5273_MAG_CH_XYX = 0x08, // X, Y, X (pseudo-simultaneous) TMAG5273_MAG_CH_YXY = 0x09, // Y, X, Y (pseudo-simultaneous) TMAG5273_MAG_CH_YZY = 0x0A, // Y, Z, Y (pseudo-simultaneous) TMAG5273_MAG_CH_XZX = 0x0B, // X, Z, X (pseudo-simultaneous) } tmag5273_mag_ch_en_t; ``` -------------------------------- ### Convert 8-bit MSB Raw Temperature to Celsius Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md Converts an 8-bit signed raw temperature reading (MSB only) to degrees Celsius (°C). The 8-bit value is first extended to 16 bits. ```cpp // 8-bit conversion (MSB only) float rawToTemperature8bit(int8_t raw_msb) { int16_t raw16 = (int16_t)raw_msb << 8; return TSENS_T0 + ((raw16 - TADC_T0) / TADC_RES); } ``` -------------------------------- ### RegisterBits for MAG_OFFSET_CONFIG_1 Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md Defines the OFFSET_VALUE_1ST field for the MAG_OFFSET_CONFIG_1 register. ```cpp OFFSET_VALUE_1ST: Adafruit_BusIO_RegisterBits(®_mag_offset_config_1, 8, 0) ``` -------------------------------- ### RegisterBits for MAG_OFFSET_CONFIG_2 Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md Defines the OFFSET_VALUE_2ND field for the MAG_OFFSET_CONFIG_2 register. ```cpp OFFSET_VALUE_2ND: Adafruit_BusIO_RegisterBits(®_mag_offset_config_2, 8, 0) ``` -------------------------------- ### Configure INT_CONFIG_1 Register Bits Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md Defines bit fields for the INT_CONFIG_1 register, controlling interrupt on conversion complete, threshold cross, interrupt state, mode, and masking the INT pin. ```cpp RSLT_INT: Adafruit_BusIO_RegisterBits(®_int_config_1, 1, 7) THRSLD_INT: Adafruit_BusIO_RegisterBits(®_int_config_1, 1, 6) INT_STATE: Adafruit_BusIO_RegisterBits(®_int_config_1, 1, 5) INT_MODE: Adafruit_BusIO_RegisterBits(®_int_config_1, 3, 2) MASK_INTB: Adafruit_BusIO_RegisterBits(®_int_config_1, 1, 0) ``` -------------------------------- ### Configure Z_THR_CONFIG Register Bits Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md Defines the bit field for the Z_THR_CONFIG register, setting the threshold for the Z-axis. ```cpp Z_THR_CONFIG: Adafruit_BusIO_RegisterBits(®_z_thr_config, 8, 0) ``` -------------------------------- ### Adafruit_TMAG5273 Class Definition Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md This C++ class defines the interface for interacting with the TMAG5273 sensor, including methods for initialization, data reading, configuration, and diagnostics. ```cpp class Adafruit_TMAG5273 { public: // Initialization bool begin(uint8_t addr = TMAG5273_DEFAULT_ADDRESS, TwoWire *wire = &Wire); // ID verification uint16_t getManufacturerID(); // Returns 0x5449 ("TI") uint8_t getDeviceID(); // Returns version: 1=x1, 2=x2 bool isConnected(); // Operating mode void setOperatingMode(tmag5273_operating_mode_t mode); tmag5273_operating_mode_t getOperatingMode(); // Channel enable void setMagneticChannels(tmag5273_mag_ch_en_t channels); tmag5273_mag_ch_en_t getMagneticChannels(); void enableTemperature(bool enable); bool isTemperatureEnabled(); // Raw data reading (16-bit signed) int16_t readRawX(); int16_t readRawY(); int16_t readRawZ(); int16_t readRawTemperature(); // Converted data reading float readMagneticX(); // Returns mT float readMagneticY(); // Returns mT float readMagneticZ(); // Returns mT float readTemperature(); // Returns °C // Angle measurement void setAngleCalculation(tmag5273_angle_en_t axis_pair); tmag5273_angle_en_t getAngleCalculation(); float readAngle(); // Returns degrees (0-360) uint8_t readMagnitude(); // Returns raw magnitude // Range configuration void setXYRange(bool high_range); // false=±40/133mT, true=±80/266mT void setZRange(bool high_range); bool getXYRange(); bool getZRange(); // Averaging/noise reduction void setConversionAverage(tmag5273_conv_avg_t avg); tmag5273_conv_avg_t getConversionAverage(); // Sleep time for W&S mode void setSleepTime(tmag5273_sleeptime_t time); tmag5273_sleeptime_t getSleepTime(); // Temperature compensation for magnets void setMagTempCompensation(tmag5273_mag_tempco_t tempco); tmag5273_mag_tempco_t getMagTempCompensation(); // Low power vs low noise void setLowNoiseMode(bool enable); // false=low power, true=low noise bool getLowNoiseMode(); // Gain correction (for angle measurement) void setGainChannel(bool second_channel); // 0=1st, 1=2nd void setGainValue(uint8_t value); // 0-255, 0 means 1.0 uint8_t getGainValue(); // Offset correction void setOffset1(int8_t offset); // 1st axis void setOffset2(int8_t offset); // 2nd axis int8_t getOffset1(); int8_t getOffset2(); // Threshold configuration void setXThreshold(int8_t threshold); void setYThreshold(int8_t threshold); void setZThreshold(int8_t threshold); void setTemperatureThreshold(uint8_t threshold); // 8°C/LSB void setThresholdDirection(bool below); // false=above, true=below void setThresholdHysteresis(tmag5273_thr_hyst_t mode); void setThresholdCount(bool four_crossings); // false=1, true=4 // Interrupt configuration void setInterruptMode(tmag5273_int_mode_t mode); void enableResultInterrupt(bool enable); void enableThresholdInterrupt(bool enable); void setInterruptLatched(bool latched); // false=pulsed 10µs, true=latched void maskInterruptPin(bool mask); // Trigger conversion (in standby mode) void triggerConversion(); void setTriggerMode(bool use_int_pin); // false=I2C, true=INT pin // Status bool isConversionReady(); bool isPowerOnReset(); void clearPowerOnReset(); bool isDiagnosticFail(); uint8_t getConversionCount(); // Rolling 3-bit count // Device diagnostics bool hasOscillatorError(); bool hasIntPinError(); bool hasOtpCrcError(); bool hasUndervoltage(); void clearErrors(); // I2C address change void setI2CAddress(uint8_t new_addr); // CRC enable void enableCRC(bool enable); private: Adafruit_I2CDevice *i2c_dev; float _range_xy; // Current range in mT float _range_z; bool _is_x1_variant; // true for x1, false for x2 }; ``` -------------------------------- ### Configure SENSOR_CONFIG_1 Register Bits Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md Defines bit fields for the SENSOR_CONFIG_1 register, enabling magnetic channels and setting sleep time for W&S mode. ```cpp MAG_CH_EN: Adafruit_BusIO_RegisterBits(®_sensor_config_1, 4, 4) SLEEPTIME: Adafruit_BusIO_RegisterBits(®_sensor_config_1, 4, 0) ``` -------------------------------- ### RegisterBits Notation for DEVICE_CONFIG_1 Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md This snippet shows the RegisterBits notation used to define bit fields within the DEVICE_CONFIG_1 register. It specifies the bit positions and lengths for CRC_EN, MAG_TEMPCO, CONV_AVG, and I2C_RD fields. ```cpp CRC_EN: Adafruit_BusIO_RegisterBits(®_device_config_1, 1, 7) MAG_TEMPCO: Adafruit_BusIO_RegisterBits(®_device_config_1, 2, 5) CONV_AVG: Adafruit_BusIO_RegisterBits(®_device_config_1, 3, 2) I2C_RD: Adafruit_BusIO_RegisterBits(®_device_config_1, 2, 0) ``` -------------------------------- ### Configure MAG_GAIN_CONFIG Register Bits Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md Defines the bit field for the MAG_GAIN_CONFIG register, setting the gain value for magnetic measurements. ```cpp GAIN_VALUE: Adafruit_BusIO_RegisterBits(®_mag_gain_config, 8, 0) ``` -------------------------------- ### Configure DEVICE_CONFIG_2 Register Bits Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md Defines bit fields for the DEVICE_CONFIG_2 register, controlling threshold hysteresis, power/noise mode, I2C glitch filter, trigger mode, and operating mode. ```cpp THR_HYST: Adafruit_BusIO_RegisterBits(®_device_config_2, 3, 5) LP_LN: Adafruit_BusIO_RegisterBits(®_device_config_2, 1, 4) I2C_GLITCH_FILTER: Adafruit_BusIO_RegisterBits(®_device_config_2, 1, 3) TRIGGER_MODE: Adafruit_BusIO_RegisterBits(®_device_config_2, 1, 2) OPERATING_MODE: Adafruit_BusIO_RegisterBits(®_device_config_2, 2, 0) ``` -------------------------------- ### Convert 16-bit Raw Magnetic Field to mT Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md Converts a 16-bit signed raw magnetic field reading to millitesla (mT) using the specified range. The range depends on the sensor variant and configuration. ```cpp float rawToMilliTesla(int16_t raw, float range) { return (raw / 32768.0f) * range; } ``` -------------------------------- ### Convert Threshold to mT for X/Y Axes Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md Converts a threshold value to magnetic flux density (mT) for the X and Y axes. Requires specifying the sensor variant and range setting. ```cpp float thresholdToMT_XY(int8_t threshold, bool x1_variant, bool high_range) { float base_range = x1_variant ? 40.0f : 133.0f; float multiplier = high_range ? 2.0f : 1.0f; return (base_range * multiplier / 128.0f) * threshold; } ``` -------------------------------- ### Convert Desired Offset in mT to Register Value Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md Calculates the register value needed to represent a desired magnetic flux density (mT) offset, given the sensor's configured range. ```cpp // Calculate register value from desired offset in mT int8_t mtToOffset(float offset_mT, float range_mT) { return (int8_t)((offset_mT * 2048.0f) / range_mT); } ``` -------------------------------- ### Configure Y_THR_CONFIG Register Bits Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md Defines the bit field for the Y_THR_CONFIG register, setting the threshold for the Y-axis. ```cpp Y_THR_CONFIG: Adafruit_BusIO_RegisterBits(®_y_thr_config, 8, 0) ``` -------------------------------- ### TMAG5273 Sleep Time Configurations Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md Enumerates the available sleep durations for the TMAG5273 sensor, ranging from 1ms to 20000ms. ```cpp typedef enum { TMAG5273_SLEEP_1MS = 0x00, // 1ms TMAG5273_SLEEP_5MS = 0x01, // 5ms TMAG5273_SLEEP_10MS = 0x02, // 10ms TMAG5273_SLEEP_15MS = 0x03, // 15ms TMAG5273_SLEEP_20MS = 0x04, // 20ms TMAG5273_SLEEP_30MS = 0x05, // 30ms TMAG5273_SLEEP_50MS = 0x06, // 50ms TMAG5273_SLEEP_100MS = 0x07, // 100ms TMAG5273_SLEEP_500MS = 0x08, // 500ms TMAG5273_SLEEP_1000MS = 0x09, // 1000ms TMAG5273_SLEEP_2000MS = 0x0A, // 2000ms TMAG5273_SLEEP_5000MS = 0x0B, // 5000ms TMAG5273_SLEEP_20000MS = 0x0C, // 20000ms } tmag5273_sleeptime_t; ``` -------------------------------- ### Convert Threshold to mT for Z Axis Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md Converts a threshold value to magnetic flux density (mT) for the Z axis. Requires specifying the sensor variant and range setting. ```cpp float thresholdToMT_Z(int8_t threshold, bool x1_variant, bool high_range) { float base_range = x1_variant ? 40.0f : 133.0f; float multiplier = high_range ? 2.0f : 1.0f; return (base_range * multiplier / 128.0f) * threshold; } ``` -------------------------------- ### Configure SENSOR_CONFIG_2 Register Bits Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md Defines bit fields for the SENSOR_CONFIG_2 register, controlling threshold crossing count, magnetic threshold direction, gain channel, angle calculation, and axis ranges. ```cpp THRX_COUNT: Adafruit_BusIO_RegisterBits(®_sensor_config_2, 1, 6) MAG_THR_DIR: Adafruit_BusIO_RegisterBits(®_sensor_config_2, 1, 5) MAG_GAIN_CH: Adafruit_BusIO_RegisterBits(®_sensor_config_2, 1, 4) ANGLE_EN: Adafruit_BusIO_RegisterBits(®_sensor_config_2, 2, 2) X_Y_RANGE: Adafruit_BusIO_RegisterBits(®_sensor_config_2, 1, 1) Z_RANGE: Adafruit_BusIO_RegisterBits(®_sensor_config_2, 1, 0) ``` -------------------------------- ### TMAG5273 Threshold Hysteresis Modes Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md Configures the threshold hysteresis for the TMAG5273 sensor, supporting single or dual symmetric thresholds. ```cpp typedef enum { TMAG5273_THR_HYST_SINGLE = 0x00, // Single threshold (2's complement) TMAG5273_THR_HYST_DUAL = 0x01, // Dual thresholds (±symmetric) } tmag5273_thr_hyst_t; ``` -------------------------------- ### Convert Offset Register Value to mT Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md Calculates the magnetic flux density (mT) offset from a given register value and the sensor's configured range. Assumes `range_mT` is known. ```cpp // Calculate offset in mT from register value float offsetToMT(int8_t offset_reg, float range_mT) { return (offset_reg / 2048.0f) * range_mT; // 2048 = 2^12 / 2 } ``` -------------------------------- ### TMAG5273 Magnetic Temperature Compensation Options Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md Specifies the temperature compensation coefficients for magnetic field measurements, suitable for different magnet types. ```cpp typedef enum { TMAG5273_TEMPCO_NONE = 0x00, // 0% (no compensation) TMAG5273_TEMPCO_NDBFE = 0x01, // 0.12%/°C (NdFeB magnets) TMAG5273_TEMPCO_RESERVED = 0x02, // Reserved TMAG5273_TEMPCO_CERAMIC = 0x03, // 0.2%/°C (Ceramic/Ferrite magnets) } tmag5273_mag_tempco_t; ``` -------------------------------- ### TMAG5273 Angle Calculation Enable Options Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md Enables or disables angle calculation based on pairs of magnetic axes (XY, YZ, XZ). ```cpp typedef enum { TMAG5273_ANGLE_OFF = 0x00, // No angle calculation TMAG5273_ANGLE_XY = 0x01, // X 1st, Y 2nd TMAG5273_ANGLE_YZ = 0x02, // Y 1st, Z 2nd TMAG5273_ANGLE_XZ = 0x03, // X 1st, Z 2nd } tmag5273_angle_en_t; ``` -------------------------------- ### Read Angle from TMAG5273 Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md Reads the 13-bit angle value from the sensor's registers and converts it to degrees. Assumes `readRegister` function is available. ```cpp float readAngle() { uint8_t msb = readRegister(0x19); uint8_t lsb = readRegister(0x1A); // Combine into 13-bit value (ignore top 3 bits of MSB which are always 0) uint16_t raw = ((uint16_t)(msb & 0x1F) << 8) | lsb; // Integer part (bits 12:4) + fractional part (bits 3:0) float angle = (raw >> 4) + ((raw & 0x0F) / 16.0f); return angle; // Returns 0.0 to 360.0 degrees } ``` -------------------------------- ### TMAG5273 I2C Read Modes Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md Configures the I2C read operation for retrieving data from the TMAG5273 sensor, supporting different data formats and lengths. ```cpp typedef enum { TMAG5273_I2C_RD_STANDARD = 0x00, // Standard 3-byte read TMAG5273_I2C_RD_1BYTE_16BIT = 0x01, // 1-byte read for 16-bit data TMAG5273_I2C_RD_1BYTE_8BIT = 0x02, // 1-byte read for 8-bit MSB data } tmag5273_i2c_rd_t; ``` -------------------------------- ### TMAG5273 Operating Modes Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md Defines the different operating modes for the TMAG5273 sensor, including standby, sleep, continuous, and wake-up sleep. ```cpp typedef enum { TMAG5273_MODE_STANDBY = 0x00, // Standby (trigger) mode TMAG5273_MODE_SLEEP = 0x01, // Sleep mode (ultra-low power) TMAG5273_MODE_CONTINUOUS = 0x02, // Continuous measure mode TMAG5273_MODE_WAKEUP_SLEEP = 0x03, // Wake-up and sleep mode } tmag5273_operating_mode_t; ``` -------------------------------- ### TMAG5273 Interrupt Modes Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md Defines how interrupts are signaled by the TMAG5273 sensor, including options for INT pin, SCL line, and I2C bus activity. ```cpp typedef enum { TMAG5273_INT_NONE = 0x00, // No interrupt TMAG5273_INT_THROUGH_INT = 0x01, // Interrupt through INT pin TMAG5273_INT_INT_EXCEPT_I2C = 0x02, // INT except when I2C busy TMAG5273_INT_THROUGH_SCL = 0x03, // Interrupt through SCL TMAG5273_INT_SCL_EXCEPT_I2C = 0x04, // SCL except when I2C busy } tmag5273_int_mode_t; ``` -------------------------------- ### TMAG5273_ConvAvg_t Enum Source: https://github.com/adafruit/adafruit_tmag5273/blob/main/DESIGN.md Typed enum for conversion averaging options, affecting sample rate and data resolution. ```cpp typedef enum { TMAG5273_CONV_AVG_1X = 0x00, // 1x average, 20kSPS (1-axis) TMAG5273_CONV_AVG_2X = 0x01, // 2x average, 13.3kSPS (1-axis) TMAG5273_CONV_AVG_4X = 0x02, // 4x average, 8.0kSPS (1-axis) TMAG5273_CONV_AVG_8X = 0x03, // 8x average, 4.4kSPS (1-axis) TMAG5273_CONV_AVG_16X = 0x04, // 16x average, 2.4kSPS (1-axis) TMAG5273_CONV_AVG_32X = 0x05, // 32x average, 1.2kSPS (1-axis) } tmag5273_conv_avg_t; ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.