Lines Matching +full:0 +full:- +full:128
4 * SPDX-License-Identifier: Apache-2.0
43 #define MMC56X3_REG_TEMP 0x09
44 #define MMC56X3_CHIP_ID 0x10
45 #define MMC56X3_REG_STATUS 0x18
46 #define MMC56X3_REG_INTERNAL_ODR 0x1a
47 #define MMC56X3_REG_INTERNAL_CTRL_0 0x1b
48 #define MMC56X3_REG_INTERNAL_CTRL_1 0x1c
49 #define MMC56X3_REG_INTERNAL_CTRL_2 0x1d
50 #define MMC56X3_REG_ID 0x39
52 #define MMC56X3_CMD_RESET 0x10
53 #define MMC56X3_CMD_SET 0x08
54 #define MMC56X3_CMD_SW_RESET 0x80
55 #define MMC56X3_CMD_TAKE_MEAS_M 0x01
56 #define MMC56X3_CMD_TAKE_MEAS_T 0x02
57 #define MMC56X3_CMD_AUTO_SELF_RESET_EN 0x20
58 #define MMC56X3_CMD_CMM_FREQ_EN 0x80
59 #define MMC56X3_CMD_CMM_EN 0x10
60 #define MMC56X3_CMD_HPOWER 0x80
62 #define MMC56X3_STATUS_MEAS_M_DONE 0x80
63 #define MMC56X3_STATUS_MEAS_T_DONE 0x40
65 #define MMC56X3_REG_MAGN_X_OUT_0 0x00
66 /* Range is -30 to 30, sensitivity of raw 20-bit reading is
68 * Q5.26 with range -32 to 32,
75 /* To convert reading to Q7.24 with range -128, 128,
76 * (BASE + reading * RES) * pow(2, 31)/128
77 * = BASE * pow(2, 31)/128 + reading * RES * pow(2, 31)/128
78 * CONV_BASE = BASE * pow(2, 31)/128
79 * CONV_RES = RES * pow(2, 31)/128
82 #define MMC56X3_TEMP_BASE -75
84 #define MMC56X3_TEMP_CONV_Q7_24_BASE -1258291200