ISSDK  1.7
IoT Sensing Software Development Kit
diff_p.h
Go to the documentation of this file.
1 /*
2  * The Clear BSD License
3  * Copyright 2017 NXP
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without modification,
7  * are permitted (subject to the limitations in the disclaimer below) provided
8  * that the following conditions are met:
9  *
10  * o Redistributions of source code must retain the above copyright notice, this list
11  * of conditions and the following disclaimer.
12  *
13  * o Redistributions in binary form must reproduce the above copyright notice, this
14  * list of conditions and the following disclaimer in the documentation and/or
15  * other materials provided with the distribution.
16  *
17  * o Neither the name of the copyright holder nor the names of its
18  * contributors may be used to endorse or promote products derived from this
19  * software without specific prior written permission.
20  *
21  * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE.
22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
23  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
24  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
26  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
27  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
29  * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32  */
33 /**
34  * @file diff_p.h
35  * @brief The diff_p.h contains the DIFF_P Pressure sensor register definitions, access macros, and
36  * its bit mask.
37  */
38 #ifndef DIFF_P_H_
39 #define DIFF_P_H_
40 
41 /**
42  **
43  ** DIFF_P Sensor Internal Registers
44  */
45 enum {
50  DIFF_P_OUT_T = 0x04,
53  DIFF_P_T_MIN = 0x07,
56  DIFF_P_T_MAX = 0x0A,
59  /* Reserved: 0x0D - 0x11 */
60  DIFF_P_STATUS = 0x12,
66  DIFF_P_OFF_T = 0x18,
73  DIFF_P_T_TGT = 0x1F,
79  /* Reserved: 0x25 - 0x5F */
93  /* Reserved: 0x6E - 0x7F */
94 };
95 
96 #define DIFF_P_NPS3000VV_WHOAMI_VALUE (0xD0) /* DIFF_P Who_Am_I Value of Part Number NPS3000VV. */
97 #define DIFF_P_NPS3001DV_WHOAMI_VALUE (0xD1) /* DIFF_P Who_Am_I Value of Part Number NPS3001DV. */
98 #define DIFF_P_NPS3002VV_WHOAMI_VALUE (0xD2) /* DIFF_P Who_Am_I Value of Part Number NPS3000VV. */
99 #define DIFF_P_NPS3005DV_WHOAMI_VALUE (0xD3) /* DIFF_P Who_Am_I Value of Part Number NPS3000VV. */
100 
101 
102 /*--------------------------------
103 ** Register: INT_STATUS_0
104 ** Enum: DIFF_P_INT_STATUS_0
105 ** --
106 ** Offset : 0x00 - Sensor Status Information Register 1.
107 ** ------------------------------*/
108 typedef union {
109  struct {
110  uint8_t pdu : 1; /* Pressure data underflow. Pressure exceeded lower limit of operating */
111  /* range.. */
112 
113  uint8_t pdo : 1; /* Pressure data overflow. Pressure exceeded upper limit of operating range. */
114 
115  uint8_t _reserved_ : 1;
116  uint8_t verra : 1; /* Analog voltage brown-out error status bit. This bit is only set when */
117  /* BRWNOUT_EN bit in CTRL_REG2 is set to 1 enabling brownout detection. */
118 
119  uint8_t tdr : 1; /* Temperature new Data Ready. TDR is set to logic 1 whenever a Temperature */
120  /* data acquisition is completed. */
121 
122  uint8_t pdr : 1; /* Pressure new Data Ready. PDR is set to logic 1 whenever a new Pressure */
123  /* data acquisition is completed.. */
124 
125  uint8_t tow : 1; /* Temperature Data Overwrite. TOW is set to logic 1 whenever a new */
126  /* Temperature acquisition is completed before the TDR flag is cleared. */
127 
128  uint8_t pow : 1; /* Pressure Data Overwrite. POW is set to logic 1 whenever a new Pressure */
129  /* acquisition is completed before the PDR flag has been cleared. */
130 
131  } b;
132  uint8_t w;
134 
135 
136 /*
137 ** INT_STATUS_0 - Bit field mask definitions
138 */
139 #define DIFF_P_INT_STATUS_0_PDU_MASK ((uint8_t) 0x01)
140 #define DIFF_P_INT_STATUS_0_PDU_SHIFT ((uint8_t) 0)
141 
142 #define DIFF_P_INT_STATUS_0_PDO_MASK ((uint8_t) 0x02)
143 #define DIFF_P_INT_STATUS_0_PDO_SHIFT ((uint8_t) 1)
144 
145 #define DIFF_P_INT_STATUS_0_VERRA_MASK ((uint8_t) 0x08)
146 #define DIFF_P_INT_STATUS_0_VERRA_SHIFT ((uint8_t) 3)
147 
148 #define DIFF_P_INT_STATUS_0_TDR_MASK ((uint8_t) 0x10)
149 #define DIFF_P_INT_STATUS_0_TDR_SHIFT ((uint8_t) 4)
150 
151 #define DIFF_P_INT_STATUS_0_PDR_MASK ((uint8_t) 0x20)
152 #define DIFF_P_INT_STATUS_0_PDR_SHIFT ((uint8_t) 5)
153 
154 #define DIFF_P_INT_STATUS_0_TOW_MASK ((uint8_t) 0x40)
155 #define DIFF_P_INT_STATUS_0_TOW_SHIFT ((uint8_t) 6)
156 
157 #define DIFF_P_INT_STATUS_0_POW_MASK ((uint8_t) 0x80)
158 #define DIFF_P_INT_STATUS_0_POW_SHIFT ((uint8_t) 7)
159 
160 
161 /*
162 ** INT_STATUS_0 - Bit field value definitions
163 */
164 #define DIFF_P_INT_STATUS_0_PDU_UNDERFLOW ((uint8_t) 0x01) /* Underflow occurred. */
165 #define DIFF_P_INT_STATUS_0_PDU_NO_UNDERFLOW ((uint8_t) 0x00) /* No Underflow occurred. */
166 #define DIFF_P_INT_STATUS_0_PDO_OVERFLOW ((uint8_t) 0x02) /* Overflow occurred. */
167 #define DIFF_P_INT_STATUS_0_PDO_NO_OVERFLOW ((uint8_t) 0x00) /* No overflow occurred. */
168 #define DIFF_P_INT_STATUS_0_VERRA_BRWNOUT ((uint8_t) 0x08) /* Analog voltage brownout occurred. */
169 #define DIFF_P_INT_STATUS_0_VERRA_NO_BRWNOUT ((uint8_t) 0x00) /* No brownout occurred. */
170 #define DIFF_P_INT_STATUS_0_TDR_DRDY ((uint8_t) 0x10) /* A new Temperature data is ready. */
171 #define DIFF_P_INT_STATUS_0_PDR_DRDY ((uint8_t) 0x20) /* A new set of Pressure data is ready. */
172 #define DIFF_P_INT_STATUS_0_TOW_OWR ((uint8_t) 0x40) /* Previous Temperature data was overwritten by new */
173  /* Temperature data before it was read. */
174 #define DIFF_P_INT_STATUS_0_POW_OWR ((uint8_t) 0x80) /* Previous Pressure data was overwritten by new */
175  /* Pressure data before it was read. */
176 /*------------------------------*/
177 
178 
179 
180 /*--------------------------------
181 ** Register: INT_STATUS_1
182 ** Enum: DIFF_P_INT_STATUS_1
183 ** --
184 ** Offset : 0x01 - Sensor Status Information Register 2.
185 ** ------------------------------*/
186 typedef union {
187  struct {
188  uint8_t _reserved_ : 1;
189  uint8_t p_wchg : 1; /* Window threshold interrupt. */
190 
191  uint8_t p_tgt2 : 1; /* Pressure target value 2. */
192 
193  uint8_t p_tgt1 : 1; /* Pressure target value 1. */
194 
195  uint8_t p_tgt0 : 1; /* Pressure target value 0. */
196 
197  uint8_t t_tgt : 1; /* Temperature target value. */
198 
199  uint8_t tdu : 1; /* Temperature data underflow. Temperature exceeded lower limit of operating */
200  /* range. */
201 
202  uint8_t tdo : 1; /* Temperature data overflow. Temperature exceeded upper limit of operating */
203  /* range. */
204 
205  } b;
206  uint8_t w;
208 
209 
210 /*
211 ** INT_STATUS_1 - Bit field mask definitions
212 */
213 #define DIFF_P_INT_STATUS_1_P_WCHG_MASK ((uint8_t) 0x02)
214 #define DIFF_P_INT_STATUS_1_P_WCHG_SHIFT ((uint8_t) 1)
215 
216 #define DIFF_P_INT_STATUS_1_P_TGT2_MASK ((uint8_t) 0x04)
217 #define DIFF_P_INT_STATUS_1_P_TGT2_SHIFT ((uint8_t) 2)
218 
219 #define DIFF_P_INT_STATUS_1_P_TGT1_MASK ((uint8_t) 0x08)
220 #define DIFF_P_INT_STATUS_1_P_TGT1_SHIFT ((uint8_t) 3)
221 
222 #define DIFF_P_INT_STATUS_1_P_TGT0_MASK ((uint8_t) 0x10)
223 #define DIFF_P_INT_STATUS_1_P_TGT0_SHIFT ((uint8_t) 4)
224 
225 #define DIFF_P_INT_STATUS_1_T_TGT_MASK ((uint8_t) 0x20)
226 #define DIFF_P_INT_STATUS_1_T_TGT_SHIFT ((uint8_t) 5)
227 
228 #define DIFF_P_INT_STATUS_1_TDU_MASK ((uint8_t) 0x40)
229 #define DIFF_P_INT_STATUS_1_TDU_SHIFT ((uint8_t) 6)
230 
231 #define DIFF_P_INT_STATUS_1_TDO_MASK ((uint8_t) 0x80)
232 #define DIFF_P_INT_STATUS_1_TDO_SHIFT ((uint8_t) 7)
233 
234 
235 /*
236 ** INT_STATUS_1 - Bit field value definitions
237 */
238 #define DIFF_P_INT_STATUS_1_P_WCHG_TH_CROSSED ((uint8_t) 0x02) /* pressure has crossed the window threshold defined */
239  /* by P_TGT1 and P_TGT2. */
240 #define DIFF_P_INT_STATUS_1_P_TGT2_REACHED ((uint8_t) 0x04) /* Temperature target reached. */
241 #define DIFF_P_INT_STATUS_1_P_TGT1_REACHED ((uint8_t) 0x08) /* Temperature target reached. */
242 #define DIFF_P_INT_STATUS_1_P_TGT0_REACHED ((uint8_t) 0x10) /* Temperature target reached. */
243 #define DIFF_P_INT_STATUS_1_T_TGT_REACHED ((uint8_t) 0x20) /* Temperature target reached. */
244 #define DIFF_P_INT_STATUS_1_TDU_UNDERFLOW ((uint8_t) 0x40) /* Underflow occurred. */
245 #define DIFF_P_INT_STATUS_1_TDU_NO_UNDERFLOW ((uint8_t) 0x00) /* No Underflow occurred. */
246 #define DIFF_P_INT_STATUS_1_TDO_OVERFLOW ((uint8_t) 0x80) /* Overflow occurred. */
247 #define DIFF_P_INT_STATUS_1_TDO_NO_OVERFLOW ((uint8_t) 0x00) /* No overflow occurred. */
248 /*------------------------------*/
249 
250 
251 
252 /*--------------------------------
253 ** Register: OUT_P_LSB
254 ** Enum: DIFF_P_OUT_P_LSB
255 ** --
256 ** Offset : 0x02 - 8 LSBs of 16 bit Pressure Data LSB.
257 ** ------------------------------*/
258 typedef uint8_t DIFF_P_OUT_P_LSB_t;
259 
260 
261 /*--------------------------------
262 ** Register: OUT_P_MSB
263 ** Enum: DIFF_P_OUT_P_MSB
264 ** --
265 ** Offset : 0x03 - 8 MSBs of 16 bit Pressure Data MSB.
266 ** ------------------------------*/
267 typedef uint8_t DIFF_P_OUT_P_MSB_t;
268 
269 
270 /*--------------------------------
271 ** Register: OUT_T
272 ** Enum: DIFF_P_OUT_T
273 ** --
274 ** Offset : 0x04 - Temperature Data.
275 ** ------------------------------*/
276 typedef uint8_t DIFF_P_OUT_T_t;
277 
278 
279 
280 /*--------------------------------
281 ** Register: P_MIN_LSB
282 ** Enum: DIFF_P_P_MIN_LSB
283 ** --
284 ** Offset : 0x05 - 8 LSBs of 16 bit Minimum Pressure Data LSB.
285 ** ------------------------------*/
286 typedef uint8_t DIFF_P_P_MIN_LSB_t;
287 
288 
289 /*--------------------------------
290 ** Register: P_MIN_MSB
291 ** Enum: DIFF_P_P_MIN_MSB
292 ** --
293 ** Offset : 0x06 - 8 MSBs of 16 bit Minimum Pressure Data MSB.
294 ** ------------------------------*/
295 typedef uint8_t DIFF_P_P_MIN_MSB_t;
296 
297 
298 /*--------------------------------
299 ** Register: T_MIN
300 ** Enum: DIFF_P_T_MIN
301 ** --
302 ** Offset : 0x07 - Minimum Temperature Data.
303 ** ------------------------------*/
304 typedef uint8_t DIFF_P_T_MIN_t;
305 
306 
307 
308 /*--------------------------------
309 ** Register: P_MAX_LSB
310 ** Enum: DIFF_P_P_MAX_LSB
311 ** --
312 ** Offset : 0x08 - 8 LSBs of 16 bit Maximum Pressure Data LSB.
313 ** ------------------------------*/
314 typedef uint8_t DIFF_P_P_MAX_LSB_t;
315 
316 
317 /*--------------------------------
318 ** Register: P_MAX_MSB
319 ** Enum: DIFF_P_P_MAX_MSB
320 ** --
321 ** Offset : 0x09 - 8 MSBs of 16 bit Maximum Pressure Data MSB.
322 ** ------------------------------*/
323 typedef uint8_t DIFF_P_P_MAX_MSB_t;
324 
325 
326 /*--------------------------------
327 ** Register: T_MAX
328 ** Enum: DIFF_P_T_MAX
329 ** --
330 ** Offset : 0x0A - Maximum Temperature Data.
331 ** ------------------------------*/
332 typedef uint8_t DIFF_P_T_MAX_t;
333 
334 
335 
336 /*--------------------------------
337 ** Register: INT_MASK0
338 ** Enum: DIFF_P_INT_MASK0
339 ** --
340 ** Offset : 0x0B - Interrupt Mask Register 1.
341 ** ------------------------------*/
342 typedef union {
343  struct {
344  uint8_t pdu : 1; /* Interrupt Mask for PDU interrupt. */
345 
346  uint8_t pdo : 1; /* Interrupt Mask for PDO interrupt. */
347 
348  uint8_t _reserved_ : 1;
349  uint8_t verra : 1; /* Interrupt Mask for VERRA interrupt. */
350 
351  uint8_t tdr : 1; /* Interrupt Mask for TDR interrupt. */
352 
353  uint8_t pdr : 1; /* Interrupt Mask for PDR interrupt. */
354 
355  uint8_t tow : 1; /* Interrupt Mask for TOW interrupt. */
356 
357  uint8_t pow : 1; /* Interrupt Mask for POW interrupt. */
358 
359  } b;
360  uint8_t w;
362 
363 
364 /*
365 ** INT_MASK0 - Bit field mask definitions
366 */
367 #define DIFF_P_INT_MASK0_PDU_MASK ((uint8_t) 0x01)
368 #define DIFF_P_INT_MASK0_PDU_SHIFT ((uint8_t) 0)
369 
370 #define DIFF_P_INT_MASK0_PDO_MASK ((uint8_t) 0x02)
371 #define DIFF_P_INT_MASK0_PDO_SHIFT ((uint8_t) 1)
372 
373 #define DIFF_P_INT_MASK0_VERRA_MASK ((uint8_t) 0x08)
374 #define DIFF_P_INT_MASK0_VERRA_SHIFT ((uint8_t) 3)
375 
376 #define DIFF_P_INT_MASK0_TDR_MASK ((uint8_t) 0x10)
377 #define DIFF_P_INT_MASK0_TDR_SHIFT ((uint8_t) 4)
378 
379 #define DIFF_P_INT_MASK0_PDR_MASK ((uint8_t) 0x20)
380 #define DIFF_P_INT_MASK0_PDR_SHIFT ((uint8_t) 5)
381 
382 #define DIFF_P_INT_MASK0_TOW_MASK ((uint8_t) 0x40)
383 #define DIFF_P_INT_MASK0_TOW_SHIFT ((uint8_t) 6)
384 
385 #define DIFF_P_INT_MASK0_POW_MASK ((uint8_t) 0x80)
386 #define DIFF_P_INT_MASK0_POW_SHIFT ((uint8_t) 7)
387 
388 
389 /*
390 ** INT_MASK0 - Bit field value definitions
391 */
392 #define DIFF_P_INT_MASK0_PDU_INT_EN ((uint8_t) 0x01) /* Interrupt Enabled. */
393 #define DIFF_P_INT_MASK0_PDO_INT_EN ((uint8_t) 0x02) /* Interrupt Enabled. */
394 #define DIFF_P_INT_MASK0_VERRA_INT_EN ((uint8_t) 0x08) /* Interrupt Enabled. */
395 #define DIFF_P_INT_MASK0_TDR_INT_EN ((uint8_t) 0x10) /* Interrupt Enabled. */
396 #define DIFF_P_INT_MASK0_PDR_INT_EN ((uint8_t) 0x20) /* Interrupt Enabled. */
397 #define DIFF_P_INT_MASK0_TOW_INT_EN ((uint8_t) 0x40) /* Interrupt Enabled. */
398 #define DIFF_P_INT_MASK0_POW_INT_EN ((uint8_t) 0x80) /* Interrupt Enabled. */
399 /*------------------------------*/
400 
401 
402 
403 /*--------------------------------
404 ** Register: INT_MASK1
405 ** Enum: DIFF_P_INT_MASK1
406 ** --
407 ** Offset : 0x0C - Interrupt Mask Register 2.
408 ** ------------------------------*/
409 typedef union {
410  struct {
411  uint8_t _reserved_ : 1;
412  uint8_t p_wchg : 1; /* Interrupt Mask for P_WCHG interrupt. */
413 
414  uint8_t p_tgt2 : 1; /* Interrupt Mask for P_TGT2 interrupt. */
415 
416  uint8_t p_tgt1 : 1; /* Interrupt Mask for P_TGT1 interrupt. */
417 
418  uint8_t p_tgt0 : 1; /* Interrupt Mask for P_TGT0 interrupt. */
419 
420  uint8_t t_tgt : 1; /* Interrupt Mask for T_TGT interrupt. */
421 
422  uint8_t tdu : 1; /* Interrupt Mask for TDU interrupt. */
423 
424  uint8_t tdo : 1; /* Interrupt Mask for TDO interrupt. */
425 
426  } b;
427  uint8_t w;
429 
430 
431 /*
432 ** INT_MASK1 - Bit field mask definitions
433 */
434 #define DIFF_P_INT_MASK1_P_WCHG_MASK ((uint8_t) 0x02)
435 #define DIFF_P_INT_MASK1_P_WCHG_SHIFT ((uint8_t) 1)
436 
437 #define DIFF_P_INT_MASK1_P_TGT2_MASK ((uint8_t) 0x04)
438 #define DIFF_P_INT_MASK1_P_TGT2_SHIFT ((uint8_t) 2)
439 
440 #define DIFF_P_INT_MASK1_P_TGT1_MASK ((uint8_t) 0x08)
441 #define DIFF_P_INT_MASK1_P_TGT1_SHIFT ((uint8_t) 3)
442 
443 #define DIFF_P_INT_MASK1_P_TGT0_MASK ((uint8_t) 0x10)
444 #define DIFF_P_INT_MASK1_P_TGT0_SHIFT ((uint8_t) 4)
445 
446 #define DIFF_P_INT_MASK1_T_TGT_MASK ((uint8_t) 0x20)
447 #define DIFF_P_INT_MASK1_T_TGT_SHIFT ((uint8_t) 5)
448 
449 #define DIFF_P_INT_MASK1_TDU_MASK ((uint8_t) 0x40)
450 #define DIFF_P_INT_MASK1_TDU_SHIFT ((uint8_t) 6)
451 
452 #define DIFF_P_INT_MASK1_TDO_MASK ((uint8_t) 0x80)
453 #define DIFF_P_INT_MASK1_TDO_SHIFT ((uint8_t) 7)
454 
455 
456 /*
457 ** INT_MASK1 - Bit field value definitions
458 */
459 #define DIFF_P_INT_MASK1_P_WCHG_INT_EN ((uint8_t) 0x02) /* Interrupt Enabled. */
460 #define DIFF_P_INT_MASK1_P_TGT2_INT_EN ((uint8_t) 0x04) /* Interrupt Enabled. */
461 #define DIFF_P_INT_MASK1_P_TGT1_INT_EN ((uint8_t) 0x08) /* Interrupt Enabled. */
462 #define DIFF_P_INT_MASK1_P_TGT0_INT_EN ((uint8_t) 0x10) /* Interrupt Enabled. */
463 #define DIFF_P_INT_MASK1_T_TGT_INT_EN ((uint8_t) 0x20) /* Interrupt Enabled. */
464 #define DIFF_P_INT_MASK1_TDU_INT_EN ((uint8_t) 0x40) /* Interrupt Enabled. */
465 #define DIFF_P_INT_MASK1_TDO_INT_EN ((uint8_t) 0x80) /* Interrupt Enabled. */
466 /*------------------------------*/
467 
468 
469 
470 /*--------------------------------
471 ** Register: STATUS
472 ** Enum: DIFF_P_STATUS
473 ** --
474 ** Offset : 0x12 - Calibration and I2C reprogram status.
475 ** ------------------------------*/
476 typedef union {
477  struct {
478  uint8_t rst_status : 1; /* This bit is set whenever the part comes out of POR. */
479 
480  uint8_t osr_err : 1; /* OSR Error. Bit is set on illegal combination of OSR and ODR.. */
481 
482  uint8_t stat_cplt : 1; /* Completion Status. STAT_CPLT notifies the user when the calibration */
483  /* routine has successfully completed. */
484 
485  uint8_t stat_ep : 1; /* Existing Pressure Status. STAT_EP is set to logic 1 when the calibration */
486  /* routine detects an existing pressure condition in the system. */
487 
488  uint8_t i2c_rpg_status : 1; /* I2C Address Reprograming status bit. Bit is set to logic 1 at the */
489  /* beginning of the reprograming cycle. */
490 
491  uint8_t i2c_rpg : 1; /* Completion Status of I2C Address Reprograming. This notifies the user that */
492  /* the I2C reprograming has been completed successfully. */
493 
494  uint8_t i2c_rpg_cnt : 1; /* I2C Reprograming count status bit. */
495 
496  uint8_t active_mode : 1; /* Active mode status bit. */
497 
498  } b;
499  uint8_t w;
501 
502 
503 /*
504 ** STATUS - Bit field mask definitions
505 */
506 #define DIFF_P_STATUS_RST_STATUS_MASK ((uint8_t) 0x01)
507 #define DIFF_P_STATUS_RST_STATUS_SHIFT ((uint8_t) 0)
508 
509 #define DIFF_P_STATUS_OSR_ERR_MASK ((uint8_t) 0x02)
510 #define DIFF_P_STATUS_OSR_ERR_SHIFT ((uint8_t) 1)
511 
512 #define DIFF_P_STATUS_STAT_CPLT_MASK ((uint8_t) 0x04)
513 #define DIFF_P_STATUS_STAT_CPLT_SHIFT ((uint8_t) 2)
514 
515 #define DIFF_P_STATUS_STAT_EP_MASK ((uint8_t) 0x08)
516 #define DIFF_P_STATUS_STAT_EP_SHIFT ((uint8_t) 3)
517 
518 #define DIFF_P_STATUS_I2C_RPG_STATUS_MASK ((uint8_t) 0x10)
519 #define DIFF_P_STATUS_I2C_RPG_STATUS_SHIFT ((uint8_t) 4)
520 
521 #define DIFF_P_STATUS_I2C_RPG_MASK ((uint8_t) 0x20)
522 #define DIFF_P_STATUS_I2C_RPG_SHIFT ((uint8_t) 5)
523 
524 #define DIFF_P_STATUS_I2C_RPG_CNT_MASK ((uint8_t) 0x40)
525 #define DIFF_P_STATUS_I2C_RPG_CNT_SHIFT ((uint8_t) 6)
526 
527 #define DIFF_P_STATUS_ACTIVE_MODE_MASK ((uint8_t) 0x80)
528 #define DIFF_P_STATUS_ACTIVE_MODE_SHIFT ((uint8_t) 7)
529 
530 
531 /*
532 ** STATUS - Bit field value definitions
533 */
534 #define DIFF_P_STATUS_RST_STATUS_RST ((uint8_t) 0x01) /* Part has come out of POR, brownout or soft reset. */
535 #define DIFF_P_STATUS_RST_STATUS_NO_RST ((uint8_t) 0x00) /* No POR, brownout or soft reset has occurred. */
536 #define DIFF_P_STATUS_OSR_ERR_ERR ((uint8_t) 0x02) /* Illegal ODR/OSR combination. */
537 #define DIFF_P_STATUS_OSR_ERR_NO_ERR ((uint8_t) 0x00) /* No Error. */
538 #define DIFF_P_STATUS_STAT_CPLT_SUCCESS ((uint8_t) 0x04) /* Calibration routine was successful. */
539 #define DIFF_P_STATUS_STAT_CPLT_NO_SUCCESS ((uint8_t) 0x00) /* Calibration routine was not successful. */
540 #define DIFF_P_STATUS_STAT_EP_DETECTED ((uint8_t) 0x08) /* Existing pressure has been detected. */
541 #define DIFF_P_STATUS_STAT_EP_NOTDETECTED ((uint8_t) 0x00) /* No existing pressure detected. */
542 #define DIFF_P_STATUS_I2C_RPG_STATUS_RPG_INIT ((uint8_t) 0x10) /* Reprograming cycle initiated. */
543 #define DIFF_P_STATUS_I2C_RPG_STATUS_RPG_CPLT ((uint8_t) 0x00) /* Reprograming cycle completed. */
544 #define DIFF_P_STATUS_I2C_RPG_RPG_SUCCESS ((uint8_t) 0x20) /* I2C Reprograming successful. */
545 #define DIFF_P_STATUS_I2C_RPG_NO_RPG ((uint8_t) 0x00) /* No Reprograming has taken place. */
546 #define DIFF_P_STATUS_I2C_RPG_CNT_CANT_RPG ((uint8_t) 0x40) /* I2C address cannot be reprogrammed. */
547 #define DIFF_P_STATUS_I2C_RPG_CNT_CAN_RPG ((uint8_t) 0x00) /* I2C address can be reprogrammed. */
548 #define DIFF_P_STATUS_ACTIVE_MODE_ACTIVE ((uint8_t) 0x80) /* Sensor is in active mode. */
549 #define DIFF_P_STATUS_ACTIVE_MODE_STANDBY ((uint8_t) 0x00) /* Sensor is in standby mode. */
550 /*------------------------------*/
551 
552 
553 
554 /*--------------------------------
555 ** Register: WHO_AM_I
556 ** Enum: DIFF_P_WHO_AM_I
557 ** --
558 ** Offset : 0x13 - This register contains the device identifier.
559 ** ------------------------------*/
560 typedef uint8_t DIFF_P_WHO_AM_I_t;
561 
562 
563 
564 /*--------------------------------
565 ** Register: OFF_P_LSB
566 ** Enum: DIFF_P_OFF_P_LSB
567 ** --
568 ** Offset : 0x14 - 8 LSBs of 16 bit Pressure Data Offset LSB.
569 ** ------------------------------*/
570 typedef uint8_t DIFF_P_OFF_P_LSB_t;
571 
572 
573 /*--------------------------------
574 ** Register: OFF_P_MSB
575 ** Enum: DIFF_P_OFF_P_MSB
576 ** --
577 ** Offset : 0x15 - 8 MSBs of 16 bit Pressure Data Offset MSB.
578 ** ------------------------------*/
579 typedef uint8_t DIFF_P_OFF_P_MSB_t;
580 
581 
582 /*--------------------------------
583 ** Register: OFF_CAL_P_LSB
584 ** Enum: DIFF_P_OFF_CAL_P_LSB
585 ** --
586 ** Offset : 0x16 - 8 LSBs of 16 bit Existing Pressure Offset LSB.
587 ** ------------------------------*/
588 typedef uint8_t DIFF_P_OFF_CAL_P_LSB_t;
589 
590 
591 /*--------------------------------
592 ** Register: OFF_CAL_P_MSB
593 ** Enum: DIFF_P_OFF_CAL_P_MSB
594 ** --
595 ** Offset : 0x17 - 8 MSBs of 16 bit Existing Pressure Offset MSB.
596 ** ------------------------------*/
597 typedef uint8_t DIFF_P_OFF_CAL_P_MSB_t;
598 
599 
600 /*--------------------------------
601 ** Register: OFF_T
602 ** Enum: DIFF_P_OFF_T
603 ** --
604 ** Offset : 0x18 - Temperature Data Offset.
605 ** ------------------------------*/
606 typedef uint8_t DIFF_P_OFF_T_t;
607 
608 
609 
610 /*--------------------------------
611 ** Register: P_TGT0_LSB
612 ** Enum: DIFF_P_P_TGT0_LSB
613 ** --
614 ** Offset : 0x19 - 8 LSBs of 16 bit Pressure Data Offset LSB.
615 ** ------------------------------*/
616 typedef uint8_t DIFF_P_P_TGT0_LSB_t;
617 
618 
619 /*--------------------------------
620 ** Register: P_TGT0_MSB
621 ** Enum: DIFF_P_P_TGT0_MSB
622 ** --
623 ** Offset : 0x1A - 8 MSBs of 16 bit Pressure Data Offset MSB.
624 ** ------------------------------*/
625 typedef uint8_t DIFF_P_P_TGT0_MSB_t;
626 
627 
628 /*--------------------------------
629 ** Register: P_TGT1_LSB
630 ** Enum: DIFF_P_P_TGT1_LSB
631 ** --
632 ** Offset : 0x1B - 8 LSBs of 16 bit Pressure Data Offset LSB.
633 ** ------------------------------*/
634 typedef uint8_t DIFF_P_P_TGT1_LSB_t;
635 
636 
637 /*--------------------------------
638 ** Register: P_TGT1_MSB
639 ** Enum: DIFF_P_P_TGT1_MSB
640 ** --
641 ** Offset : 0x1C - 8 MSBs of 16 bit Pressure Data Offset MSB.
642 ** ------------------------------*/
643 typedef uint8_t DIFF_P_P_TGT1_MSB_t;
644 
645 
646 /*--------------------------------
647 ** Register: P_TGT2_LSB
648 ** Enum: DIFF_P_P_TGT2_LSB
649 ** --
650 ** Offset : 0x1D - 8 LSBs of 16 bit Pressure Data Offset LSB.
651 ** ------------------------------*/
652 typedef uint8_t DIFF_P_P_TGT2_LSB_t;
653 
654 
655 /*--------------------------------
656 ** Register: P_TGT2_MSB
657 ** Enum: DIFF_P_P_TGT2_MSB
658 ** --
659 ** Offset : 0x1E - 8 MSBs of 16 bit Pressure Data Offset MSB.
660 ** ------------------------------*/
661 typedef uint8_t DIFF_P_P_TGT2_MSB_t;
662 
663 
664 /*--------------------------------
665 ** Register: T_TGT
666 ** Enum: DIFF_P_T_TGT
667 ** --
668 ** Offset : 0x1F - Temperature Target Value.
669 ** ------------------------------*/
670 typedef uint8_t DIFF_P_T_TGT_t;
671 
672 
673 
674 /*--------------------------------
675 ** Register: CTRL_REG1
676 ** Enum: DIFF_P_CTRL_REG1
677 ** --
678 ** Offset : 0x20 - Control Register 1.
679 ** ------------------------------*/
680 typedef union {
681  struct {
682 /* osr >= 21 will select OSR8192 */
683  uint8_t sbyb : 1; /* This bit sets the mode to ACTIVE. */
684 
685  uint8_t ost : 1; /* One Shot Mode. The OST bit, when set, will initiate a measurement */
686  /* immediately and take the samples indicated by the OSR[4:0] bits. */
687 
688  uint8_t rst : 1; /* Software Reset. This bit is used to activate the software reset. */
689 
690  uint8_t osr : 5; /* Interrupt Mask for P_TGT1 interrupt. */
691 
692  } b;
693  uint8_t w;
695 
696 
697 /*
698 ** CTRL_REG1 - Bit field mask definitions
699 */
700 #define DIFF_P_CTRL_REG1_SBYB_MASK ((uint8_t) 0x01)
701 #define DIFF_P_CTRL_REG1_SBYB_SHIFT ((uint8_t) 0)
702 
703 #define DIFF_P_CTRL_REG1_OST_MASK ((uint8_t) 0x02)
704 #define DIFF_P_CTRL_REG1_OST_SHIFT ((uint8_t) 1)
705 
706 #define DIFF_P_CTRL_REG1_RST_MASK ((uint8_t) 0x04)
707 #define DIFF_P_CTRL_REG1_RST_SHIFT ((uint8_t) 2)
708 
709 #define DIFF_P_CTRL_REG1_OSR_MASK ((uint8_t) 0xF8)
710 #define DIFF_P_CTRL_REG1_OSR_SHIFT ((uint8_t) 3)
711 
712 
713 /*
714 ** CTRL_REG1 - Bit field value definitions
715 */
716 #define DIFF_P_CTRL_REG1_SBYB_ACTIVE ((uint8_t) 0x01) /* Part is ACTIVE. */
717 #define DIFF_P_CTRL_REG1_SBYB_STANDBY ((uint8_t) 0x00) /* Part is in STANDBY mode. */
718 #define DIFF_P_CTRL_REG1_OST_ONESHOT ((uint8_t) 0x02) /* One Shot Mode. */
719 #define DIFF_P_CTRL_REG1_OST_NORMAL ((uint8_t) 0x00) /* Normal operating mode. */
720 #define DIFF_P_CTRL_REG1_RST_RESET ((uint8_t) 0x04) /* Device will be reset. */
721 #define DIFF_P_CTRL_REG1_RST_NORMAL ((uint8_t) 0x00) /* Normal operating mode. */
722 #define DIFF_P_CTRL_REG1_OSR_OSR1 ((uint8_t) 0x00) /* Oversampling Rate#1. */
723 #define DIFF_P_CTRL_REG1_OSR_OSR2 ((uint8_t) 0x08) /* Oversampling Rate#2. */
724 #define DIFF_P_CTRL_REG1_OSR_OSR4 ((uint8_t) 0x10) /* Oversampling Rate#4. */
725 #define DIFF_P_CTRL_REG1_OSR_OSR8 ((uint8_t) 0x18) /* Oversampling Rate#8. */
726 #define DIFF_P_CTRL_REG1_OSR_OSR16 ((uint8_t) 0x20) /* Oversampling Rate#16. */
727 #define DIFF_P_CTRL_REG1_OSR_OSR32 ((uint8_t) 0x28) /* Oversampling Rate#32. */
728 #define DIFF_P_CTRL_REG1_OSR_OSR64 ((uint8_t) 0x30) /* Oversampling Rate#64. */
729 #define DIFF_P_CTRL_REG1_OSR_OSR128 ((uint8_t) 0x38) /* Oversampling Rate#128. */
730 #define DIFF_P_CTRL_REG1_OSR_OSR256 ((uint8_t) 0x40) /* Oversampling Rate#256. */
731 #define DIFF_P_CTRL_REG1_OSR_OSR512 ((uint8_t) 0x48) /* Oversampling Rate#512. */
732 #define DIFF_P_CTRL_REG1_OSR_OSR768 ((uint8_t) 0x50) /* Oversampling Rate#768. */
733 #define DIFF_P_CTRL_REG1_OSR_OSR1024 ((uint8_t) 0x58) /* Oversampling Rate#1024. */
734 #define DIFF_P_CTRL_REG1_OSR_OSR1280 ((uint8_t) 0x60) /* Oversampling Rate#1280. */
735 #define DIFF_P_CTRL_REG1_OSR_OSR1536 ((uint8_t) 0x68) /* Oversampling Rate#1536. */
736 #define DIFF_P_CTRL_REG1_OSR_OSR2048 ((uint8_t) 0x70) /* Oversampling Rate#2048. */
737 #define DIFF_P_CTRL_REG1_OSR_OSR2560 ((uint8_t) 0x78) /* Oversampling Rate#2560. */
738 #define DIFF_P_CTRL_REG1_OSR_OSR3072 ((uint8_t) 0x80) /* Oversampling Rate#3072. */
739 #define DIFF_P_CTRL_REG1_OSR_OSR4096 ((uint8_t) 0x88) /* Oversampling Rate#4096. */
740 #define DIFF_P_CTRL_REG1_OSR_OSR5120 ((uint8_t) 0x90) /* Oversampling Rate#5120. */
741 #define DIFF_P_CTRL_REG1_OSR_OSR6144 ((uint8_t) 0x98) /* Oversampling Rate#6144. */
742 #define DIFF_P_CTRL_REG1_OSR_OSR7168 ((uint8_t) 0xa0) /* Oversampling Rate#7168. */
743 #define DIFF_P_CTRL_REG1_OSR_OSR8192 ((uint8_t) 0xa8) /* Oversampling Rate#8192. */
744 /*------------------------------*/
745 
746 
747 
748 /*--------------------------------
749 ** Register: CTRL_REG2
750 ** Enum: DIFF_P_CTRL_REG2
751 ** --
752 ** Offset : 0x21 - Control Register 2.
753 ** ------------------------------*/
754 typedef union {
755  struct {
756 /* odr >= 12 will select ODR0P781 */
757  uint8_t odr : 4; /* Output Data Rate. Sets the output data rate. */
758 
759  uint8_t _reserved_ : 1;
760  uint8_t f_read : 1; /* Fast Read Mode. Selects the auto-increment address methodology. */
761 
762  uint8_t brwnout_en : 1; /* Enables or disables internal brown out circuit.. */
763 
764  uint8_t ctrl_ac : 1; /* This bit controls when the Calibration Algorithm is to be run.. */
765 
766  } b;
767  uint8_t w;
769 
770 
771 /*
772 ** CTRL_REG2 - Bit field mask definitions
773 */
774 #define DIFF_P_CTRL_REG2_ODR_MASK ((uint8_t) 0x0F)
775 #define DIFF_P_CTRL_REG2_ODR_SHIFT ((uint8_t) 0)
776 
777 #define DIFF_P_CTRL_REG2_F_READ_MASK ((uint8_t) 0x20)
778 #define DIFF_P_CTRL_REG2_F_READ_SHIFT ((uint8_t) 5)
779 
780 #define DIFF_P_CTRL_REG2_BRWNOUT_EN_MASK ((uint8_t) 0x40)
781 #define DIFF_P_CTRL_REG2_BRWNOUT_EN_SHIFT ((uint8_t) 6)
782 
783 #define DIFF_P_CTRL_REG2_CTRL_AC_MASK ((uint8_t) 0x80)
784 #define DIFF_P_CTRL_REG2_CTRL_AC_SHIFT ((uint8_t) 7)
785 
786 
787 /*
788 ** CTRL_REG2 - Bit field value definitions
789 */
790 #define DIFF_P_CTRL_REG2_ODR_ODR3200 ((uint8_t) 0x00) /* Output Data Rate#3200. */
791 #define DIFF_P_CTRL_REG2_ODR_ODR1600 ((uint8_t) 0x01) /* Output Data Rate#1600. */
792 #define DIFF_P_CTRL_REG2_ODR_ODR800 ((uint8_t) 0x02) /* Output Data Rate#800. */
793 #define DIFF_P_CTRL_REG2_ODR_ODR400 ((uint8_t) 0x03) /* Output Data Rate#400. */
794 #define DIFF_P_CTRL_REG2_ODR_ODR200 ((uint8_t) 0x04) /* Output Data Rate#200. */
795 #define DIFF_P_CTRL_REG2_ODR_ODR100 ((uint8_t) 0x05) /* Output Data Rate#100. */
796 #define DIFF_P_CTRL_REG2_ODR_ODR50 ((uint8_t) 0x06) /* Output Data Rate#50. */
797 #define DIFF_P_CTRL_REG2_ODR_ODR25 ((uint8_t) 0x07) /* Output Data Rate#25. */
798 #define DIFF_P_CTRL_REG2_ODR_ODR12P5 ((uint8_t) 0x08) /* Output Data Rate#12.5. */
799 #define DIFF_P_CTRL_REG2_ODR_ODR6P25 ((uint8_t) 0x09) /* Output Data Rate#6.25. */
800 #define DIFF_P_CTRL_REG2_ODR_ODR3P125 ((uint8_t) 0x0a) /* Output Data Rate#3.125. */
801 #define DIFF_P_CTRL_REG2_ODR_ODR1P563 ((uint8_t) 0x0b) /* Output Data Rate#1.563. */
802 #define DIFF_P_CTRL_REG2_ODR_ODR0P781 ((uint8_t) 0x0c) /* Output Data Rate#0.781. */
803 #define DIFF_P_CTRL_REG2_F_READ_NORMAL ((uint8_t) 0x20) /* Loops between all register addresses. */
804 #define DIFF_P_CTRL_REG2_F_READ_FASTREAD ((uint8_t) 0x00) /* Loops between register address 0x00 and 0x04. */
805 #define DIFF_P_CTRL_REG2_BRWNOUT_EN_ENABLED ((uint8_t) 0x40) /* Internal brown out circuit is enabled. */
806 #define DIFF_P_CTRL_REG2_BRWNOUT_EN_DISABLED ((uint8_t) 0x00) /* Internal brown out circuit is disabled. */
807 #define DIFF_P_CTRL_REG2_CTRL_AC_CALRUN ((uint8_t) 0x80) /* Run Calibration Algorithm. */
808 #define DIFF_P_CTRL_REG2_CTRL_AC_NOCALRUN ((uint8_t) 0x00) /* Calibration Algorithm not run. */
809 /*------------------------------*/
810 
811 
812 
813 /*--------------------------------
814 ** Register: CTRL_REG3
815 ** Enum: DIFF_P_CTRL_REG3
816 ** --
817 ** Offset : 0x22 - Control Register 3.
818 ** ------------------------------*/
819 typedef union {
820  struct {
821  uint8_t pp_od2 : 1; /* This bit configures the interrupt pin to Push-Pull or in Open Drain */
822  /* mode.Push-Pull/Open Drain selection on interrupt pad INT2. */
823 
824  uint8_t ipol2 : 1; /* The IPOL bit selects the polarity of the interrupt signal on pin INT2. */
825 
826  uint8_t _reserved_ : 2;
827  uint8_t pp_od1 : 1; /* This bit configures the interrupt pin to Push-Pull or in Open Drain */
828  /* mode.Push-Pull/Open Drain selection on interrupt pad INT1. */
829 
830  uint8_t ipol1 : 1; /* The IPOL bit selects the polarity of the interrupt signal on pin INT1. */
831 
832  } b;
833  uint8_t w;
835 
836 
837 /*
838 ** CTRL_REG3 - Bit field mask definitions
839 */
840 #define DIFF_P_CTRL_REG3_PP_OD2_MASK ((uint8_t) 0x01)
841 #define DIFF_P_CTRL_REG3_PP_OD2_SHIFT ((uint8_t) 0)
842 
843 #define DIFF_P_CTRL_REG3_IPOL2_MASK ((uint8_t) 0x02)
844 #define DIFF_P_CTRL_REG3_IPOL2_SHIFT ((uint8_t) 1)
845 
846 #define DIFF_P_CTRL_REG3_PP_OD1_MASK ((uint8_t) 0x10)
847 #define DIFF_P_CTRL_REG3_PP_OD1_SHIFT ((uint8_t) 4)
848 
849 #define DIFF_P_CTRL_REG3_IPOL1_MASK ((uint8_t) 0x20)
850 #define DIFF_P_CTRL_REG3_IPOL1_SHIFT ((uint8_t) 5)
851 
852 
853 /*
854 ** CTRL_REG3 - Bit field value definitions
855 */
856 #define DIFF_P_CTRL_REG3_PP_OD2_OPENDRAIN ((uint8_t) 0x01) /* Open drain. */
857 #define DIFF_P_CTRL_REG3_PP_OD2_PUSHPULL ((uint8_t) 0x00) /* Push-pull. */
858 #define DIFF_P_CTRL_REG3_IPOL2_ACTIVE_HIGH ((uint8_t) 0x02) /* Active High. */
859 #define DIFF_P_CTRL_REG3_IPOL2_ACTIVE_LOW ((uint8_t) 0x00) /* Active Low. */
860 #define DIFF_P_CTRL_REG3_PP_OD1_OPENDRAIN ((uint8_t) 0x10) /* Open drain. */
861 #define DIFF_P_CTRL_REG3_PP_OD1_PUSHPULL ((uint8_t) 0x00) /* Push-pull. */
862 #define DIFF_P_CTRL_REG3_IPOL1_ACTIVE_HIGH ((uint8_t) 0x20) /* Active High. */
863 #define DIFF_P_CTRL_REG3_IPOL1_ACTIVE_LOW ((uint8_t) 0x00) /* Active Low. */
864 /*------------------------------*/
865 
866 
867 
868 /*--------------------------------
869 ** Register: INT_ROUTE0
870 ** Enum: DIFF_P_INT_ROUTE0
871 ** --
872 ** Offset : 0x23 - Interrupt Route Register 0.
873 ** ------------------------------*/
874 typedef union {
875  struct {
876  uint8_t pdu : 1; /* Pressure data underflow. */
877 
878  uint8_t pdo : 1; /* Pressure data overflow. */
879 
880  uint8_t _reserved_ : 1;
881  uint8_t verra : 1; /* Analog voltage brown-out error status bit. */
882 
883  uint8_t tdr : 1; /* Temperature new Data Ready. */
884 
885  uint8_t pdr : 1; /* Pressure new Data Ready. */
886 
887  uint8_t tow : 1; /* Temperature Data Overwrite. */
888 
889  uint8_t pow : 1; /* Pressure Data Overwrite. */
890 
891  } b;
892  uint8_t w;
894 
895 
896 /*
897 ** INT_ROUTE0 - Bit field mask definitions
898 */
899 #define DIFF_P_INT_ROUTE0_PDU_MASK ((uint8_t) 0x01)
900 #define DIFF_P_INT_ROUTE0_PDU_SHIFT ((uint8_t) 0)
901 
902 #define DIFF_P_INT_ROUTE0_PDO_MASK ((uint8_t) 0x02)
903 #define DIFF_P_INT_ROUTE0_PDO_SHIFT ((uint8_t) 1)
904 
905 #define DIFF_P_INT_ROUTE0_VERRA_MASK ((uint8_t) 0x08)
906 #define DIFF_P_INT_ROUTE0_VERRA_SHIFT ((uint8_t) 3)
907 
908 #define DIFF_P_INT_ROUTE0_TDR_MASK ((uint8_t) 0x10)
909 #define DIFF_P_INT_ROUTE0_TDR_SHIFT ((uint8_t) 4)
910 
911 #define DIFF_P_INT_ROUTE0_PDR_MASK ((uint8_t) 0x20)
912 #define DIFF_P_INT_ROUTE0_PDR_SHIFT ((uint8_t) 5)
913 
914 #define DIFF_P_INT_ROUTE0_TOW_MASK ((uint8_t) 0x40)
915 #define DIFF_P_INT_ROUTE0_TOW_SHIFT ((uint8_t) 6)
916 
917 #define DIFF_P_INT_ROUTE0_POW_MASK ((uint8_t) 0x80)
918 #define DIFF_P_INT_ROUTE0_POW_SHIFT ((uint8_t) 7)
919 
920 
921 /*
922 ** INT_ROUTE0 - Bit field value definitions
923 */
924 #define DIFF_P_INT_ROUTE0_PDU_INT2 ((uint8_t) 0x01) /* Interrupt routed to INT2 pin. */
925 #define DIFF_P_INT_ROUTE0_PDU_INT1 ((uint8_t) 0x00) /* Interrupt routed to INT1 pin. */
926 #define DIFF_P_INT_ROUTE0_PDO_INT2 ((uint8_t) 0x02) /* Interrupt routed to INT2 pin. */
927 #define DIFF_P_INT_ROUTE0_PDO_INT1 ((uint8_t) 0x00) /* Interrupt routed to INT1 pin. */
928 #define DIFF_P_INT_ROUTE0_VERRA_INT2 ((uint8_t) 0x08) /* Interrupt routed to INT2 pin. */
929 #define DIFF_P_INT_ROUTE0_VERRA_INT1 ((uint8_t) 0x00) /* Interrupt routed to INT1 pin. */
930 #define DIFF_P_INT_ROUTE0_TDR_INT2 ((uint8_t) 0x10) /* Interrupt routed to INT2 pin. */
931 #define DIFF_P_INT_ROUTE0_TDR_INT1 ((uint8_t) 0x00) /* Interrupt routed to INT1 pin. */
932 #define DIFF_P_INT_ROUTE0_PDR_INT2 ((uint8_t) 0x20) /* Interrupt routed to INT2 pin. */
933 #define DIFF_P_INT_ROUTE0_PDR_INT1 ((uint8_t) 0x00) /* Interrupt routed to INT1 pin. */
934 #define DIFF_P_INT_ROUTE0_TOW_INT2 ((uint8_t) 0x40) /* Interrupt routed to INT2 pin. */
935 #define DIFF_P_INT_ROUTE0_TOW_INT1 ((uint8_t) 0x00) /* Interrupt routed to INT1 pin. */
936 #define DIFF_P_INT_ROUTE0_POW_INT2 ((uint8_t) 0x80) /* Interrupt routed to INT2 pin. */
937 #define DIFF_P_INT_ROUTE0_POW_INT1 ((uint8_t) 0x00) /* Interrupt routed to INT1 pin. */
938 /*------------------------------*/
939 
940 
941 
942 /*--------------------------------
943 ** Register: INT_ROUTE1
944 ** Enum: DIFF_P_INT_ROUTE1
945 ** --
946 ** Offset : 0x24 - Interrupt Route Register 1.
947 ** ------------------------------*/
948 typedef union {
949  struct {
950  uint8_t _reserved_ : 1;
951  uint8_t p_wchg : 1; /* Window threshold interrupt. */
952 
953  uint8_t p_tgt2 : 1; /* Pressure target value 2. */
954 
955  uint8_t p_tgt1 : 1; /* Pressure target value 1. */
956 
957  uint8_t p_tgt0 : 1; /* Pressure target value 0. */
958 
959  uint8_t t_tgt : 1; /* Temperature target value. */
960 
961  uint8_t tdu : 1; /* Temperature data underflow. */
962 
963  uint8_t tdo : 1; /* Temperature data overflow. */
964 
965  } b;
966  uint8_t w;
968 
969 
970 /*
971 ** INT_ROUTE1 - Bit field mask definitions
972 */
973 #define DIFF_P_INT_ROUTE1_P_WCHG_MASK ((uint8_t) 0x02)
974 #define DIFF_P_INT_ROUTE1_P_WCHG_SHIFT ((uint8_t) 1)
975 
976 #define DIFF_P_INT_ROUTE1_P_TGT2_MASK ((uint8_t) 0x04)
977 #define DIFF_P_INT_ROUTE1_P_TGT2_SHIFT ((uint8_t) 2)
978 
979 #define DIFF_P_INT_ROUTE1_P_TGT1_MASK ((uint8_t) 0x08)
980 #define DIFF_P_INT_ROUTE1_P_TGT1_SHIFT ((uint8_t) 3)
981 
982 #define DIFF_P_INT_ROUTE1_P_TGT0_MASK ((uint8_t) 0x10)
983 #define DIFF_P_INT_ROUTE1_P_TGT0_SHIFT ((uint8_t) 4)
984 
985 #define DIFF_P_INT_ROUTE1_T_TGT_MASK ((uint8_t) 0x20)
986 #define DIFF_P_INT_ROUTE1_T_TGT_SHIFT ((uint8_t) 5)
987 
988 #define DIFF_P_INT_ROUTE1_TDU_MASK ((uint8_t) 0x40)
989 #define DIFF_P_INT_ROUTE1_TDU_SHIFT ((uint8_t) 6)
990 
991 #define DIFF_P_INT_ROUTE1_TDO_MASK ((uint8_t) 0x80)
992 #define DIFF_P_INT_ROUTE1_TDO_SHIFT ((uint8_t) 7)
993 
994 
995 /*
996 ** INT_ROUTE1 - Bit field value definitions
997 */
998 #define DIFF_P_INT_ROUTE1_P_WCHG_INT2 ((uint8_t) 0x02) /* Interrupt routed to INT2 pin. */
999 #define DIFF_P_INT_ROUTE1_P_WCHG_INT1 ((uint8_t) 0x00) /* Interrupt routed to INT1 pin. */
1000 #define DIFF_P_INT_ROUTE1_P_TGT2_INT2 ((uint8_t) 0x04) /* Interrupt routed to INT2 pin. */
1001 #define DIFF_P_INT_ROUTE1_P_TGT2_INT1 ((uint8_t) 0x00) /* Interrupt routed to INT1 pin. */
1002 #define DIFF_P_INT_ROUTE1_P_TGT1_INT2 ((uint8_t) 0x08) /* Interrupt routed to INT2 pin. */
1003 #define DIFF_P_INT_ROUTE1_P_TGT1_INT1 ((uint8_t) 0x00) /* Interrupt routed to INT1 pin. */
1004 #define DIFF_P_INT_ROUTE1_P_TGT0_INT2 ((uint8_t) 0x10) /* Interrupt routed to INT2 pin. */
1005 #define DIFF_P_INT_ROUTE1_P_TGT0_INT1 ((uint8_t) 0x00) /* Interrupt routed to INT1 pin. */
1006 #define DIFF_P_INT_ROUTE1_T_TGT_INT2 ((uint8_t) 0x20) /* Interrupt routed to INT2 pin. */
1007 #define DIFF_P_INT_ROUTE1_T_TGT_INT1 ((uint8_t) 0x00) /* Interrupt routed to INT1 pin. */
1008 #define DIFF_P_INT_ROUTE1_TDU_INT2 ((uint8_t) 0x40) /* Interrupt routed to INT2 pin. */
1009 #define DIFF_P_INT_ROUTE1_TDU_INT1 ((uint8_t) 0x00) /* Interrupt routed to INT1 pin. */
1010 #define DIFF_P_INT_ROUTE1_TDO_INT2 ((uint8_t) 0x80) /* Interrupt routed to INT2 pin. */
1011 #define DIFF_P_INT_ROUTE1_TDO_INT1 ((uint8_t) 0x00) /* Interrupt routed to INT1 pin. */
1012 /*------------------------------*/
1013 
1014 
1015 
1016 /*--------------------------------
1017 ** Register: I2C_ADDRESS
1018 ** Enum: DIFF_P_I2C_ADDRESS
1019 ** --
1020 ** Offset : 0x61 - This register configures the I2C address of the device.
1021 ** ------------------------------*/
1022 typedef uint8_t DIFF_P_I2C_ADDRESS_t;
1023 
1024 
1025 /*--------------------------------
1026 ** Register: PROD_REV
1027 ** Enum: DIFF_P_PROD_REV
1028 ** --
1029 ** Offset : 0x63 - This register keeps track of ASIC and MEMS die revisions.
1030 ** ------------------------------*/
1031 typedef uint8_t DIFF_P_PROD_REV_t;
1032 
1033 
1034 
1035 /*--------------------------------
1036 ** Register: OFF_MOP_LSB
1037 ** Enum: DIFF_P_OFF_MOP_LSB
1038 ** --
1039 ** Offset : 0x64 - 8 LSBs of 16 bit Maximum Offset Pressure LSB.
1040 ** ------------------------------*/
1041 typedef uint8_t DIFF_P_OFF_MOP_LSB_t;
1042 
1043 
1044 /*--------------------------------
1045 ** Register: OFF_MOP_MSB
1046 ** Enum: DIFF_P_OFF_MOP_MSB
1047 ** --
1048 ** Offset : 0x65 - 8 MSBs of 16 bit Maximum Offset Pressure MSB.
1049 ** ------------------------------*/
1050 typedef uint8_t DIFF_P_OFF_MOP_MSB_t;
1051 
1052 
1053 
1054 /*--------------------------------
1055 ** Register: SERIALNUMBER_BYTE7
1056 ** Enum: DIFF_P_SERIALNUMBER_BYTE7
1057 ** --
1058 ** Offset :0x66 - SerialNumber byte 7 stored in NVM memory and will be programmed at final test.
1059 ** ------------------------------*/
1061 
1062 
1063 /*--------------------------------
1064 ** Register: SERIALNUMBER_BYTE6
1065 ** Enum: DIFF_P_SERIALNUMBER_BYTE6
1066 ** --
1067 ** Offset :0x67 - SerialNumber byte 6 stored in NVM memory and will be programmed at final test.
1068 ** ------------------------------*/
1070 
1071 
1072 /*--------------------------------
1073 ** Register: SERIALNUMBER_BYTE5
1074 ** Enum: DIFF_P_SERIALNUMBER_BYTE5
1075 ** --
1076 ** Offset :0x68 - SerialNumber byte 5 stored in NVM memory and will be programmed at final test.
1077 ** ------------------------------*/
1079 
1080 
1081 /*--------------------------------
1082 ** Register: SERIALNUMBER_BYTE4
1083 ** Enum: DIFF_P_SERIALNUMBER_BYTE4
1084 ** --
1085 ** Offset :0x69 - SerialNumber byte 4 stored in NVM memory and will be programmed at final test.
1086 ** ------------------------------*/
1088 
1089 
1090 /*--------------------------------
1091 ** Register: SERIALNUMBER_BYTE3
1092 ** Enum: DIFF_P_SERIALNUMBER_BYTE3
1093 ** --
1094 ** Offset :0x6A - SerialNumber byte 3 stored in NVM memory and will be programmed at final test.
1095 ** ------------------------------*/
1097 
1098 
1099 /*--------------------------------
1100 ** Register: SERIALNUMBER_BYTE2
1101 ** Enum: DIFF_P_SERIALNUMBER_BYTE2
1102 ** --
1103 ** Offset :0x6B - SerialNumber byte 2 stored in NVM memory and will be programmed at final test.
1104 ** ------------------------------*/
1106 
1107 
1108 /*--------------------------------
1109 ** Register: SERIALNUMBER_BYTE1
1110 ** Enum: DIFF_P_SERIALNUMBER_BYTE1
1111 ** --
1112 ** Offset :0x6C - SerialNumber byte 1 stored in NVM memory and will be programmed at final test.
1113 ** ------------------------------*/
1115 
1116 
1117 /*--------------------------------
1118 ** Register: SERIALNUMBER_BYTE0
1119 ** Enum: DIFF_P_SERIALNUMBER_BYTE0
1120 ** --
1121 ** Offset :0x6D - SerialNumber byte 0 stored in NVM memory and will be programmed at final test.
1122 ** ------------------------------*/
1124 
1125 
1126 #endif /* DIFF_P_H_ */
uint8_t _reserved_
Definition: diff_p.h:826
uint8_t DIFF_P_OFF_P_MSB_t
Definition: diff_p.h:579
uint8_t DIFF_P_OFF_CAL_P_MSB_t
Definition: diff_p.h:597
uint8_t DIFF_P_P_MIN_LSB_t
Definition: diff_p.h:286
uint8_t DIFF_P_PROD_REV_t
Definition: diff_p.h:1031
uint8_t DIFF_P_SERIALNUMBER_BYTE4_t
Definition: diff_p.h:1087
uint8_t p_wchg
Definition: diff_p.h:412
uint8_t p_tgt2
Definition: diff_p.h:414
uint8_t DIFF_P_SERIALNUMBER_BYTE7_t
Definition: diff_p.h:1060
uint8_t ipol2
Definition: diff_p.h:824
uint8_t _reserved_
Definition: diff_p.h:188
uint8_t ctrl_ac
Definition: diff_p.h:764
uint8_t i2c_rpg_cnt
Definition: diff_p.h:494
uint8_t DIFF_P_P_TGT1_LSB_t
Definition: diff_p.h:634
uint8_t DIFF_P_T_MAX_t
Definition: diff_p.h:332
uint8_t DIFF_P_P_MAX_MSB_t
Definition: diff_p.h:323
uint8_t DIFF_P_WHO_AM_I_t
Definition: diff_p.h:560
uint8_t DIFF_P_SERIALNUMBER_BYTE6_t
Definition: diff_p.h:1069
uint8_t DIFF_P_P_MAX_LSB_t
Definition: diff_p.h:314
uint8_t DIFF_P_OFF_MOP_LSB_t
Definition: diff_p.h:1041
uint8_t DIFF_P_OFF_MOP_MSB_t
Definition: diff_p.h:1050
uint8_t stat_ep
Definition: diff_p.h:485
uint8_t DIFF_P_P_TGT0_MSB_t
Definition: diff_p.h:625
uint8_t DIFF_P_SERIALNUMBER_BYTE3_t
Definition: diff_p.h:1096
uint8_t DIFF_P_OFF_P_LSB_t
Definition: diff_p.h:570
uint8_t pp_od2
Definition: diff_p.h:821
uint8_t i2c_rpg_status
Definition: diff_p.h:488
uint8_t _reserved_
Definition: diff_p.h:950
uint8_t w
Definition: diff_p.h:499
uint8_t DIFF_P_P_TGT2_MSB_t
Definition: diff_p.h:661
uint8_t p_tgt0
Definition: diff_p.h:957
uint8_t DIFF_P_SERIALNUMBER_BYTE5_t
Definition: diff_p.h:1078
uint8_t ipol1
Definition: diff_p.h:830
uint8_t pp_od1
Definition: diff_p.h:827
uint8_t DIFF_P_OUT_P_LSB_t
Definition: diff_p.h:258
uint8_t t_tgt
Definition: diff_p.h:420
uint8_t p_wchg
Definition: diff_p.h:951
uint8_t active_mode
Definition: diff_p.h:496
uint8_t _reserved_
Definition: diff_p.h:348
uint8_t stat_cplt
Definition: diff_p.h:482
uint8_t i2c_rpg
Definition: diff_p.h:491
uint8_t DIFF_P_SERIALNUMBER_BYTE0_t
Definition: diff_p.h:1123
uint8_t DIFF_P_T_TGT_t
Definition: diff_p.h:670
uint8_t verra
Definition: diff_p.h:349
uint8_t DIFF_P_T_MIN_t
Definition: diff_p.h:304
uint8_t sbyb
Definition: diff_p.h:683
uint8_t DIFF_P_P_TGT1_MSB_t
Definition: diff_p.h:643
uint8_t DIFF_P_OUT_T_t
Definition: diff_p.h:276
uint8_t osr_err
Definition: diff_p.h:480
uint8_t DIFF_P_SERIALNUMBER_BYTE2_t
Definition: diff_p.h:1105
uint8_t DIFF_P_P_TGT2_LSB_t
Definition: diff_p.h:652
uint8_t _reserved_
Definition: diff_p.h:759
uint8_t p_tgt0
Definition: diff_p.h:418
uint8_t _reserved_
Definition: diff_p.h:115
uint8_t DIFF_P_OFF_CAL_P_LSB_t
Definition: diff_p.h:588
uint8_t _reserved_
Definition: diff_p.h:411
uint8_t brwnout_en
Definition: diff_p.h:762
uint8_t DIFF_P_OFF_T_t
Definition: diff_p.h:606
uint8_t f_read
Definition: diff_p.h:760
uint8_t DIFF_P_I2C_ADDRESS_t
Definition: diff_p.h:1022
uint8_t p_tgt2
Definition: diff_p.h:953
uint8_t rst_status
Definition: diff_p.h:478
uint8_t DIFF_P_P_MIN_MSB_t
Definition: diff_p.h:295
uint8_t DIFF_P_SERIALNUMBER_BYTE1_t
Definition: diff_p.h:1114
uint8_t p_tgt1
Definition: diff_p.h:955
uint8_t DIFF_P_P_TGT0_LSB_t
Definition: diff_p.h:616
uint8_t _reserved_
Definition: diff_p.h:880
uint8_t p_tgt1
Definition: diff_p.h:416
uint8_t DIFF_P_OUT_P_MSB_t
Definition: diff_p.h:267