1- /******************************************************************************
2- SparkFun_TMAG5273_Arduino_Library_Defs.h
3- SparkFunTMAG5273 Library Definitions Header File
4- Madison Chodikov @ SparkFun Electronics
5- Original Creation Date: May 1st, 2023
6- https://github.com/sparkfun/SparkFun_TMAG5273_Arduino_Library
7-
8- This file defines all of the constants used in the device library,
9- along with defining the registers used.
10-
11- Development environment specifics:
12- IDE: Arduino 2.1.0
13- Hardware Platform: Arduino Uno
14- TMAG5273 Breakout Version: 1.0.1
15- Distributed as-is; no warranty is given.
16- ******************************************************************************/
171
2+ /**
3+ * @file SparkFun_TMAG5273_Arduino_Library_Defs.h
4+ * @brief Arduino library definition header for the SparkFun TMAG5273 Magnetic Sensor.
5+ *
6+ * Library repository: https://github.com/sparkfun/SparkFun_TMAG5273_Arduino_Library
7+ *
8+ * @author SparkFun Electronics
9+ * @date 2025
10+ * @copyright Copyright (c) 2023-2025 SparkFun Electronics Inc.
11+ *
12+ * SPDX-License-Identifier: MIT
13+ *
14+ */
1815/*
1916Features as per datasheet
2017 - ±40mT on the X, Y linear magnetic range
@@ -25,14 +22,13 @@ Features as per datasheet
2522 - ±3 µT Offset Drift
2623*/
2724
28- #ifndef __SparkFun_TMAG5273_Arduino_Library_Defs_H__
29- #define __SparkFun_TMAG5273_Arduino_Library_Defs_H__
25+ #pragma once
3026
3127/********************************** Constant Variable Definitions **********************************/
3228#define TMAG5273_DEVICE_ID_VALUE 0x5449 // Value found in the device ID register
3329#define TMAG5273_I2C_ADDRESS_INITIAL 0x22 // Initial I2C address value - can be changed using functions as seen below
3430#define TMAG5273_TSENSE_T0 25.0f // Reference temperature for TADC_T0
35- #define TMAG5273_TADC_T0 17508 // Temp result in decimal value (from 16-buit format)
31+ #define TMAG5273_TADC_T0 17508 // Temp result in decimal value (from 16-bit format)
3632#define TMAG5273_TADC_RES 60.1f // Temperature sensing resolution (in 16-bit format)
3733
3834#define TMAG5273_CRC_MODE_BITS 0x80 // Bit 7
@@ -84,7 +80,7 @@ Features as per datasheet
8480
8581#define TMAG5273_OPERATING_MODE_BITS 0x03 // Bits 1-0
8682#define TMAG5273_OPERATING_MODE_LSB 0
87- #define TMAG5273_STANDY_BY_MODE 0x0 // Stand-by mode
83+ #define TMAG5273_STANDBY_BY_MODE 0x0 // Stand-by mode
8884#define TMAG5273_SLEEP_MODE 0x1 // Sleep mode
8985#define TMAG5273_CONTINUOUS_MEASURE_MODE 0x2 // Continuous measure mode
9086#define TMAG5273_WAKE_UP_AND_SLEEP_MODE 0x3 // Wake-up and sleep mode
@@ -271,5 +267,3 @@ const uint8_t TMAG5273_REG_ANGLE_RESULT_MSB = 0x19;
271267const uint8_t TMAG5273_REG_ANGLE_RESULT_LSB = 0x1A ;
272268const uint8_t TMAG5273_REG_MAGNITUDE_RESULT = 0x1B ;
273269const uint8_t TMAG5273_REG_DEVICE_STATUS = 0x1C ;
274-
275- #endif
0 commit comments