TLx493D 3D Hall Sensor Generic Library  1.3
Generic library for the TLx493D 3D Hall sensor family
TLV_A1B6_defines.h
Go to the documentation of this file.
1 /*
2 *****************************************************************************
3 * Copyright (C) 2019 Infineon Technologies AG. All rights reserved.
4 *
5 * Infineon Technologies AG (INFINEON) is supplying this file for use
6 * exclusively with Infineon's products. This file can be freely
7 * distributed within development tools and software supporting such microcontroller
8 * products.
9 *
10 * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
11 * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
13 * INFINEON SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR DIRECT, INDIRECT, INCIDENTAL,
14 * ASPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
15 *
16 ******************************************************************************
17 */
18 
19 
30 #ifndef SRC_TLX493D_TLV_A1B6_DRIVER_TLV_A1B6_DEFINES_H_
31 #define SRC_TLX493D_TLV_A1B6_DRIVER_TLV_A1B6_DEFINES_H_
32 
33 #include <stdint.h>
34 
35 
37 #define TLV493D_A1B6_I2C_RESET_ADDR (0x00U)
38 #define TLV493D_A1B6_I2C_RECOV_ADDR (0xFFU)
39 #define TLV493D_A1B6_I2C_DEFAULT_ADDR_HIGH (0xBCU)
40 #define TLV493D_A1B6_I2C_DEFAULT_ADDR_LOW (0x3EU)
41 
43 
44 // the number of readable registers of the TLV493D-A1B6 sensor
45 #define TLV493D_A1B6_READ_REGS_COUNT (0x0AU)
46 
47 // ----- { Bx } -----
48 #define TLV493D_A1B6_Bx_REG (0x0U)
49 
50 // ----- { By } -----
51 #define TLV493D_A1B6_By_REG (0x1U)
52 
53 // ----- { Bz } -----
54 #define TLV493D_A1B6_Bz_REG (0x2U)
55 
56 // ----- { Temp Register } -----
57 #define TLV493D_A1B6_Temp_REG (0x3U)
58 #define TLV493D_A1B6_Temp_Temp_POS (0x4U)
59 #define TLV493D_A1B6_Temp_Temp_MSK (0xFU << 4)
60 #define TLV493D_A1B6_Temp_FRM_POS (0x2U)
61 #define TLV493D_A1B6_Temp_FRM_MSK (0x3U << 2)
62 #define TLV493D_A1B6_Temp_CH_POS (0x0U)
63 #define TLV493D_A1B6_Temp_CH_MSK (0x3U)
64 
65 // ----- { Bx2 Register } -----
66 #define TLV493D_A1B6_Bx2_REG (0x4U)
67 
68 #define TLV493D_A1B6_Bx2_Bx_POS (0x4U)
69 #define TLV493D_A1B6_Bx2_Bx_MSK (0xFU << 4)
70 
71 #define TLV493D_A1B6_Bx2_By_POS (0x0U)
72 #define TLV493D_A1B6_Bx2_By_MSK (0xFU)
73 
74 // ----- { Bz2 Register } -----
75 #define TLV493D_A1B6_Bz2_REG (0x5U)
76 
77 #define TLV493D_A1B6_Bz2_Reserved_POS (0x7U)
78 #define TLV493D_A1B6_Bz2_Reserved_MSK (0x1U << 7)
79 
80 #define TLV493D_A1B6_Bz2_T_POS (0x6U)
81 #define TLV493D_A1B6_Bz2_T_MSK (0x1U << 6)
82 #define TLV493D_A1B6_Bz2_F_POS (0x5U)
83 #define TLV493D_A1B6_Bz2_F_MSK (0x1U << 5)
84 
85 #define TLV493D_A1B6_Bz2_PD_POS (0x4U)
86 #define TLV493D_A1B6_Bz2_PD_MSK (0x1U << 4)
87 
88 #define TLV493D_A1B6_Bz2_Bz_POS (0x0U)
89 #define TLV493D_A1B6_Bz2_Bz_MSK (0xFU)
90 
91 // ----- { Temp2 Register } -----
92 #define TLV493D_A1B6_Temp2_REG (0x6U)
93 #define TLV493D_A1B6_Temp2_Temp_POS (0x0U)
94 #define TLV493D_A1B6_Temp2_Temp_MSK (0xFF)
95 
96 // ----- { FactSet1 Register } -----
97 #define TLV493D_A1B6_FactSet1_REG (0x7U)
98 #define TLV493D_A1B6_FaceSet1_Reserved_POS (0x0U)
99 #define TLV493D_A1B6_FaceSet1_Reserved_MSK (0xFF)
100 
101 // ----- { FactSet2 Register } -----
102 #define TLV493D_A1B6_FactSet2_REG (0x8U)
103 #define TLV493D_A1B6_FaceSet2_Reserved_POS (0x0U)
104 #define TLV493D_A1B6_FaceSet2_Reserved_MSK (0xFF)
105 
106 // ----- { FactSet3 Register } -----
107 #define TLV493D_A1B6_FactSet3_REG (0x9U)
108 #define TLV493D_A1B6_FaceSet3_Reserved_POS (0x0U)
109 #define TLV493D_A1B6_FaceSet3_Reserved_MSK (0xFF)
110 
112 
113 // the number of writable registers of the TLV493D-A1B6 sensor
114 #define TLV493D_A1B6_WRITE_REGS_COUNT (0x04U)
115 
116 // ----- { Res Register } -----
117 #define TLV493D_A1B6_Res_REG (0x0U)
118 #define TLV493D_A1B6_Res_Reserved_POS (0x0U)
119 #define TLV493D_A1B6_Res_Reserved_MSK (0xFF)
120 
121 // ----- { MOD1 Register } -----
122 #define TLV493D_A1B6_MOD1_REG (0x1U)
123 
124 #define TLV493D_A1B6_MOD1_P_POS (0x7U)
125 #define TLV493D_A1B6_MOD1_P_MSK (0x1U << 7)
126 
127 #define TLV493D_A1B6_MOD1_IICAddr_POS (0x5U)
128 #define TLV493D_A1B6_MOD1_IICAddr_MSK (0x3U << 5)
129 #define TLV493D_A1B6_MOD1_IICAddr_16_94 (0x3U << 5)
130 #define TLV493D_A1B6_MOD1_IICAddr_1E_9C (0x2U << 5)
131 #define TLV493D_A1B6_MOD1_IICAddr_36_B4 (0x1U << 5)
132 #define TLV493D_A1B6_MOD1_IICAddr_3E_BC (0x0U << 5)
133 
134 #define TLV493D_A1B6_MOD1_Reserved_POS (0x3U)
135 #define TLV493D_A1B6_MOD1_Reserved_MSK (0x3U << 3)
136 
137 #define TLV493D_A1B6_MOD1_INT_POS (0x2U)
138 #define TLV493D_A1B6_MOD1_INT_MSK (0x1U << 2)
139 #define TLV493D_A1B6_MOD1_INT_ENABLE (0x1U << 2)
140 #define TLV493D_A1B6_MOD1_INT_DISABLE (0x0U << 2)
141 
142 #define TLV493D_A1B6_MOD1_FAST_POS (0x1U)
143 #define TLV493D_A1B6_MOD1_FAST_MSK (0x1U << 1)
144 #define TLV493D_A1B6_MOD1_FAST_ENABLE (0x1U << 1)
145 #define TLV493D_A1B6_MOD1_FAST_DISABLE (0x0U << 1)
146 
147 #define TLV493D_A1B6_MOD1_LOW_POS (0x0U)
148 #define TLV493D_A1B6_MOD1_LOW_MSK (0x1U)
149 #define TLV493D_A1B6_MOD1_LOW_ENABLE (0x1U)
150 #define TLV493D_A1B6_MOD1_LOW_DISABLE (0x0U)
151 
152 // ----- { Res2 Register } -----
153 #define TLV493D_A1B6_Res2_REG (0x2U)
154 #define TLV493D_A1B6_Res2_Reserved_POS (0x0U)
155 #define TLV493D_A1B6_Res2_Reserved_MSK (0xFF)
156 
157 // ----- { MOD2 Register } -----
158 #define TLV493D_A1B6_MOD2_REG (0x3U)
159 
160 #define TLV493D_A1B6_MOD2_T_POS (0x7U)
161 #define TLV493D_A1B6_MOD2_T_MSK (0x1U << 7)
162 #define TLV493D_A1B6_MOD2_T_DISABLE (0x1U << 7)
163 #define TLV493D_A1B6_MOD2_T_ENABLE (0x0U << 7)
164 
165 #define TLV493D_A1B6_MOD2_LP_POS (0x6U)
166 #define TLV493D_A1B6_MOD2_LP_MSK (0x1U << 6)
167 #define TLV493D_A1B6_MOD2_LP_ULTRA_LOW_POWER (0x0U << 6)
168 #define TLV493D_A1B6_MOD2_LP_LOW_POWER (0x1U << 6)
169 
170 #define TLV493D_A1B6_MOD2_PT_POS (0x5U)
171 #define TLV493D_A1B6_MOD2_PT_MSK (0x1U << 5)
172 #define TLV493D_A1B6_MOD2_PT_DISABLE (0x0U << 5)
173 #define TLV493D_A1B6_MOD2_PT_ENABLE (0x1U << 5)
174 
175 #define TLV493D_A1B6_MOD2_Reserved_POS (0x0U)
176 #define TLV493D_A1B6_MOD2_Reserved_MSK (0x1FU)
177 
178 #endif /* SRC_TLX493D_TLV_A1B6_DRIVER_TLV_A1B6_DEFINES_H_ */