Paparazzi UAS
v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
dps310_regs.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2026 OpenUAS
3
*
4
* This file is part of paparazzi.
5
*
6
* paparazzi is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2, or (at your option)
9
* any later version.
10
*
11
* paparazzi is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with paparazzi; see the file COPYING. If not, see
18
* <http://www.gnu.org/licenses/>.
19
*
20
*/
21
22
#ifndef DPS310_REGS_H
23
#define DPS310_REGS_H
24
31
#include "
std.h
"
32
33
/* Default I2C address */
34
#define DPS310_I2C_ADDR 0xEE
// 0x77 << 1
35
#define DPS310_I2C_ADDR_ALT 0xEC
// 0x76 << 1
36
37
#define DPS310_CHIP_ID 0x10
38
39
/* Registers */
40
#define DPS310_REG_PSR_B2 0x00
41
#define DPS310_REG_PSR_B1 0x01
42
#define DPS310_REG_PSR_B0 0x02
43
#define DPS310_REG_TMP_B2 0x03
44
#define DPS310_REG_TMP_B1 0x04
45
#define DPS310_REG_TMP_B0 0x05
46
#define DPS310_REG_PRS_CFG 0x06
47
#define DPS310_REG_TMP_CFG 0x07
48
#define DPS310_REG_MEAS_CFG 0x08
49
#define DPS310_REG_CFG_REG 0x09
50
#define DPS310_REG_INT_STS 0x0A
51
#define DPS310_REG_FIFO_STS 0x0B
52
#define DPS310_REG_RESET 0x0C
53
#define DPS310_REG_ID 0x0D
54
55
#define DPS310_REG_COEF 0x10
56
#define DPS310_REG_COEF_SRCE 0x28
57
58
#define DPS310_RESET_CMD 0x09
59
60
#define DPS310_MEAS_CFG_COEF_RDY (1 << 7)
61
#define DPS310_MEAS_CFG_SENSOR_RDY (1 << 6)
62
#define DPS310_MEAS_CFG_TMP_RDY (1 << 5)
63
#define DPS310_MEAS_CFG_PRS_RDY (1 << 4)
64
65
/* Measurement rates and oversampling */
66
#define DPS310_PRS_CFG_PM_RATE_32HZ (5 << 4)
67
#define DPS310_PRS_CFG_PM_RATE_16HZ (4 << 4)
68
#define DPS310_PRS_CFG_PM_RATE_8HZ (3 << 4)
69
#define DPS310_PRS_CFG_PM_PRC_16 (4 << 0)
70
#define DPS310_TMP_CFG_TMP_EXT (1 << 7)
71
#define DPS310_TMP_CFG_TMP_RATE_32HZ (5 << 4)
72
#define DPS310_TMP_CFG_TMP_RATE_16HZ (4 << 4)
73
#define DPS310_TMP_CFG_TMP_RATE_8HZ (3 << 4)
74
#define DPS310_TMP_CFG_TMP_PRC_16 (4 << 0)
75
76
#define DPS310_CFG_REG_P_SHIFT (1 << 2)
77
#define DPS310_CFG_REG_T_SHIFT (1 << 3)
78
79
#define DPS310_MEAS_CTRL_CONT 0x07
80
#define DPS310_COEF_SRCE_BIT_TMP_COEF_SRCE 0x80
81
82
struct
dps310_reg_calib_data
{
83
int16_t
c0
;
// 12bit
84
int16_t
c1
;
// 12bit
85
86
int32_t
c00
;
// 20bit
87
int32_t
c10
;
// 20bit
88
89
int16_t
c01
;
// 16bit
90
int16_t
c11
;
// 16bit
91
int16_t
c20
;
// 16bit
92
int16_t
c21
;
// 16bit
93
int16_t
c30
;
// 16bit
94
95
int16_t
c31
;
// 12bit
96
int16_t
c40
;
// 12bit
97
};
98
99
#endif
/* DPS310_REGS_H */
dps310_reg_calib_data::c1
int16_t c1
Definition
dps310_regs.h:84
dps310_reg_calib_data::c40
int16_t c40
Definition
dps310_regs.h:96
dps310_reg_calib_data::c00
int32_t c00
Definition
dps310_regs.h:86
dps310_reg_calib_data::c01
int16_t c01
Definition
dps310_regs.h:89
dps310_reg_calib_data::c30
int16_t c30
Definition
dps310_regs.h:93
dps310_reg_calib_data::c20
int16_t c20
Definition
dps310_regs.h:91
dps310_reg_calib_data::c11
int16_t c11
Definition
dps310_regs.h:90
dps310_reg_calib_data::c31
int16_t c31
Definition
dps310_regs.h:95
dps310_reg_calib_data::c0
int16_t c0
Definition
dps310_regs.h:83
dps310_reg_calib_data::c10
int32_t c10
Definition
dps310_regs.h:87
dps310_reg_calib_data::c21
int16_t c21
Definition
dps310_regs.h:92
dps310_reg_calib_data
Definition
dps310_regs.h:82
std.h
int32_t
int int32_t
Typedef defining 32 bit int type.
Definition
vl53l1_types.h:83
int16_t
short int16_t
Typedef defining 16 bit short type.
Definition
vl53l1_types.h:93
sw
airborne
peripherals
dps310_regs.h
Generated on Mon Jul 20 2026 17:27:21 for Paparazzi UAS by
1.9.8