PX4 Firmware
PX4 Autopilot Software http://px4.io
FXAS21002C.cpp File Reference
#include "FXAS21002C.hpp"
Include dependency graph for FXAS21002C.cpp:

Go to the source code of this file.

Macros

#define DIR_READ(a)   ((a) | (1 << 7))
 
#define DIR_WRITE(a)   ((a) & 0x7f)
 
#define swap16(w)   __builtin_bswap16((w))
 
#define FXAS21002C_STATUS   0x00
 
#define FXAS21002C_OUT_X_MSB   0x01
 
#define FXAS21002C_OUT_X_LSB   0x02
 
#define FXAS21002C_OUT_Y_MSB   0x03
 
#define FXAS21002C_OUT_Y_LSB   0x04
 
#define FXAS21002C_OUT_Z_MSB   0x05
 
#define FXAS21002C_OUT_Z_LSB   0x06
 
#define FXAS21002C_DR_STATUS   0x07
 
#define DR_STATUS_ZYXOW   (1 << 7)
 
#define DR_STATUS_ZOW   (1 << 6)
 
#define DR_STATUS_YOW   (1 << 5)
 
#define DR_STATUS_XOW   (1 << 4)
 
#define DR_STATUS_ZYXDR   (1 << 3)
 
#define DR_STATUS_ZDR   (1 << 2)
 
#define DR_STATUS_YDR   (1 << 1)
 
#define DR_STATUS_XDR   (1 << 0)
 
#define FXAS21002C_F_STATUS   0x08
 
#define F_STATUS_F_OVF   (1 << 7)
 
#define F_STATUS_F_WMKF   (1 << 6)
 
#define F_STATUS_F_CNT_SHIFTS   0
 
#define F_STATUS_F_CNT_MASK   (0x3f << F_STATUS_F_CNT_SHIFTS)
 
#define FXAS21002C_F_SETUP   0x09
 
#define F_SETUP_F_MODE_SHIFTS   6
 
#define F_SETUP_F_MODE_MASK   (0x3 << F_SETUP_F_MODE_SHIFTS)
 
#define F_SETUP_F_WMRK_SHIFTS   0
 
#define F_SETUP_F_WMRK_MASK   (0x3f << F_SETUP_F_WMRK_SHIFTS)
 
#define FXAS21002C_F_EVENT   0x0a
 
#define F_EVENT_F_EVENT   (1 << 5)
 
#define F_EVENT_FE_TIME_SHIFTS   0
 
#define F_EVENT_FE_TIME_MASK   (0x1f << F_EVENT_FE_TIME_SHIFTS)
 
#define FXAS21002C_INT_SRC_FLAG   0x0b
 
#define INT_SRC_FLAG_BOOTEND   (1 << 3)
 
#define INT_SRC_FLAG_SRC_FIFO   (1 << 2)
 
#define INT_SRC_FLAG_SRC_RT   (1 << 1)
 
#define INT_SRC_FLAG_SRC_DRDY   (1 << 0)
 
#define FXAS21002C_WHO_AM_I   0x0c
 
#define WHO_AM_I   0xd7
 
#define FXAS21002C_CTRL_REG0   0x0d
 
#define CTRL_REG0_BW_SHIFTS   6
 
#define CTRL_REG0_BW_MASK   (0x3 << CTRL_REG0_BW_SHIFTS)
 
#define CTRL_REG0_BW(n)   (((n) & 0x3) << CTRL_REG0_BW_SHIFTS)
 
#define CTRL_REG0_BW_HIGH   CTRL_REG0_BW(0)
 
#define CTRL_REG0_BW_MED   CTRL_REG0_BW(1)
 
#define CTRL_REG0_BW_LOW   CTRL_REG0_BW(2)
 
#define CTRL_REG0_SPIW   (1 << 6)
 
#define CTRL_REG0_SEL_SHIFTS   3
 
#define CTRL_REG0_SEL_MASK   (0x2 << CTRL_REG0_SEL_SHIFTS)
 
#define CTRL_REG0_HPF_EN   (1 << 2)
 
#define CTRL_REG0_FS_SHIFTS   0
 
#define CTRL_REG0_FS_MASK   (0x3 << CTRL_REG0_FS_SHIFTS)
 
#define CTRL_REG0_FS_2000_DPS   (0 << CTRL_REG0_FS_SHIFTS)
 
#define CTRL_REG0_FS_1000_DPS   (1 << CTRL_REG0_FS_SHIFTS)
 
#define CTRL_REG0_FS_500_DPS   (2 << CTRL_REG0_FS_SHIFTS)
 
#define CTRL_REG0_FS_250_DPS   (3 << CTRL_REG0_FS_SHIFTS)
 
#define FXAS21002C_RT_CFG   0x0e
 
#define RT_CFG_ELE   (1 << 3)
 
#define RT_CFG_ZTEFE   (1 << 2)
 
#define RT_CFG_YTEFE   (1 << 1)
 
#define RT_CFG_XTEFE   (1 << 0)
 
#define FXAS21002C_RT_SRC   0x0f
 
#define RT_SRC_EA   (1 << 6)
 
#define RT_SRC_ZRT   (1 << 5)
 
#define RT_SRC_Z_RT_POL   (1 << 4)
 
#define RT_SRC_YRT   (1 << 3)
 
#define RT_SRC_Y_RT_POL   (1 << 2)
 
#define RT_SRC_XRT   (1 << 1)
 
#define RT_SRC_X_RT_POL   (1 << 0)
 
#define FXAS21002C_RT_THS   0x10
 
#define RT_THS_DBCNTM   (1 << 7)
 
#define RT_THS_THS_SHIFTS   0
 
#define RT_THS_THS_MASK   (0x7f << RT_THS_THS_SHIFTS)
 
#define FXAS21002C_RT_COUNT   0x11
 
#define FXAS21002C_TEMP   0x12
 
#define FXAS21002C_CTRL_REG1   0x13
 
#define CTRL_REG1_RST   (1 << 6)
 
#define CTRL_REG1_ST   (1 << 5)
 
#define CTRL_REG1_DR_SHIFTS   2
 
#define CTRL_REG1_DR_MASK   (0x07 << CTRL_REG1_DR_SHIFTS)
 
#define CTRL_REG1_DR_12_5   (7 << CTRL_REG1_DR_SHIFTS)
 
#define CTRL_REG1_DR_12_5_1   (6 << CTRL_REG1_DR_SHIFTS)
 
#define CTRL_REG1_DR_25HZ   (5 << CTRL_REG1_DR_SHIFTS)
 
#define CTRL_REG1_DR_50HZ   (4 << CTRL_REG1_DR_SHIFTS)
 
#define CTRL_REG1_DR_100HZ   (3 << CTRL_REG1_DR_SHIFTS)
 
#define CTRL_REG1_DR_200HZ   (2 << CTRL_REG1_DR_SHIFTS)
 
#define CTRL_REG1_DR_400HZ   (1 << CTRL_REG1_DR_SHIFTS)
 
#define CTRL_REG1_DR_800HZ   (0 << CTRL_REG1_DR_SHIFTS)
 
#define CTRL_REG1_ACTIVE   (1 << 1)
 
#define CTRL_REG1_READY   (1 << 0)
 
#define FXAS21002C_CTRL_REG2   0x14
 
#define CTRL_REG2_INT_CFG_FIFO   (1 << 7)
 
#define CTRL_REG2_INT_EN_FIFO   (1 << 6)
 
#define CTRL_REG2_INT_CFG_RT   (1 << 5)
 
#define CTRL_REG2_INT_EN_RT   (1 << 4)
 
#define CTRL_REG2_INT_CFG_DRDY   (1 << 3)
 
#define CTRL_REG2_INT_EN_DRDY   (1 << 2)
 
#define CTRL_REG2_IPOL   (1 << 1)
 
#define CTRL_REG2_PP_OD   (1 << 0)
 
#define FXAS21002C_CTRL_REG3   0x15
 
#define CTRL_REG3_WRAPTOONE   (1 << 3)
 
#define CTRL_REG3_EXTCTRLEN   (1 << 2)
 
#define CTRL_REG3_FS_DOUBLE   (1 << 0)
 
#define DEF_REG(r)   {r, #r}
 
#define FXAS21002C_MAX_RATE   800
 
#define FXAS21002C_DEFAULT_RATE   FXAS21002C_MAX_RATE
 
#define FXAS21002C_DEFAULT_RANGE_DPS   2000
 
#define FXAS21002C_DEFAULT_ONCHIP_FILTER_FREQ   64
 
#define FXAS21002C_TIMER_REDUCTION   250
 

Variables

static constexpr uint8_t _checked_registers []
 

Macro Definition Documentation

◆ CTRL_REG0_BW

#define CTRL_REG0_BW (   n)    (((n) & 0x3) << CTRL_REG0_BW_SHIFTS)

Definition at line 88 of file FXAS21002C.cpp.

◆ CTRL_REG0_BW_HIGH

#define CTRL_REG0_BW_HIGH   CTRL_REG0_BW(0)

Definition at line 89 of file FXAS21002C.cpp.

Referenced by FXAS21002C::set_onchip_lowpass_filter().

◆ CTRL_REG0_BW_LOW

#define CTRL_REG0_BW_LOW   CTRL_REG0_BW(2)

Definition at line 91 of file FXAS21002C.cpp.

Referenced by FXAS21002C::reset(), and FXAS21002C::set_onchip_lowpass_filter().

◆ CTRL_REG0_BW_MASK

#define CTRL_REG0_BW_MASK   (0x3 << CTRL_REG0_BW_SHIFTS)

Definition at line 87 of file FXAS21002C.cpp.

Referenced by FXAS21002C::set_onchip_lowpass_filter().

◆ CTRL_REG0_BW_MED

#define CTRL_REG0_BW_MED   CTRL_REG0_BW(1)

Definition at line 90 of file FXAS21002C.cpp.

Referenced by FXAS21002C::set_onchip_lowpass_filter().

◆ CTRL_REG0_BW_SHIFTS

#define CTRL_REG0_BW_SHIFTS   6

Definition at line 86 of file FXAS21002C.cpp.

◆ CTRL_REG0_FS_1000_DPS

#define CTRL_REG0_FS_1000_DPS   (1 << CTRL_REG0_FS_SHIFTS)

Definition at line 99 of file FXAS21002C.cpp.

Referenced by FXAS21002C::set_range().

◆ CTRL_REG0_FS_2000_DPS

#define CTRL_REG0_FS_2000_DPS   (0 << CTRL_REG0_FS_SHIFTS)

Definition at line 98 of file FXAS21002C.cpp.

Referenced by FXAS21002C::reset(), and FXAS21002C::set_range().

◆ CTRL_REG0_FS_250_DPS

#define CTRL_REG0_FS_250_DPS   (3 << CTRL_REG0_FS_SHIFTS)

Definition at line 101 of file FXAS21002C.cpp.

Referenced by FXAS21002C::set_range().

◆ CTRL_REG0_FS_500_DPS

#define CTRL_REG0_FS_500_DPS   (2 << CTRL_REG0_FS_SHIFTS)

Definition at line 100 of file FXAS21002C.cpp.

Referenced by FXAS21002C::set_range().

◆ CTRL_REG0_FS_MASK

#define CTRL_REG0_FS_MASK   (0x3 << CTRL_REG0_FS_SHIFTS)

Definition at line 97 of file FXAS21002C.cpp.

Referenced by FXAS21002C::set_range().

◆ CTRL_REG0_FS_SHIFTS

#define CTRL_REG0_FS_SHIFTS   0

Definition at line 96 of file FXAS21002C.cpp.

◆ CTRL_REG0_HPF_EN

#define CTRL_REG0_HPF_EN   (1 << 2)

Definition at line 95 of file FXAS21002C.cpp.

◆ CTRL_REG0_SEL_MASK

#define CTRL_REG0_SEL_MASK   (0x2 << CTRL_REG0_SEL_SHIFTS)

Definition at line 94 of file FXAS21002C.cpp.

◆ CTRL_REG0_SEL_SHIFTS

#define CTRL_REG0_SEL_SHIFTS   3

Definition at line 93 of file FXAS21002C.cpp.

◆ CTRL_REG0_SPIW

#define CTRL_REG0_SPIW   (1 << 6)

Definition at line 92 of file FXAS21002C.cpp.

◆ CTRL_REG1_ACTIVE

#define CTRL_REG1_ACTIVE   (1 << 1)

◆ CTRL_REG1_DR_100HZ

#define CTRL_REG1_DR_100HZ   (3 << CTRL_REG1_DR_SHIFTS)

Definition at line 135 of file FXAS21002C.cpp.

Referenced by FXAS21002C::set_samplerate().

◆ CTRL_REG1_DR_12_5

#define CTRL_REG1_DR_12_5   (7 << CTRL_REG1_DR_SHIFTS)

Definition at line 131 of file FXAS21002C.cpp.

Referenced by FXAS21002C::set_samplerate().

◆ CTRL_REG1_DR_12_5_1

#define CTRL_REG1_DR_12_5_1   (6 << CTRL_REG1_DR_SHIFTS)

Definition at line 132 of file FXAS21002C.cpp.

◆ CTRL_REG1_DR_200HZ

#define CTRL_REG1_DR_200HZ   (2 << CTRL_REG1_DR_SHIFTS)

Definition at line 136 of file FXAS21002C.cpp.

Referenced by FXAS21002C::set_samplerate().

◆ CTRL_REG1_DR_25HZ

#define CTRL_REG1_DR_25HZ   (5 << CTRL_REG1_DR_SHIFTS)

Definition at line 133 of file FXAS21002C.cpp.

Referenced by FXAS21002C::set_samplerate().

◆ CTRL_REG1_DR_400HZ

#define CTRL_REG1_DR_400HZ   (1 << CTRL_REG1_DR_SHIFTS)

Definition at line 137 of file FXAS21002C.cpp.

Referenced by FXAS21002C::set_samplerate().

◆ CTRL_REG1_DR_50HZ

#define CTRL_REG1_DR_50HZ   (4 << CTRL_REG1_DR_SHIFTS)

Definition at line 134 of file FXAS21002C.cpp.

Referenced by FXAS21002C::set_samplerate().

◆ CTRL_REG1_DR_800HZ

#define CTRL_REG1_DR_800HZ   (0 << CTRL_REG1_DR_SHIFTS)

Definition at line 138 of file FXAS21002C.cpp.

Referenced by FXAS21002C::reset(), and FXAS21002C::set_samplerate().

◆ CTRL_REG1_DR_MASK

#define CTRL_REG1_DR_MASK   (0x07 << CTRL_REG1_DR_SHIFTS)

Definition at line 130 of file FXAS21002C.cpp.

Referenced by FXOS8701CQ::accel_set_samplerate(), and FXAS21002C::set_samplerate().

◆ CTRL_REG1_DR_SHIFTS

#define CTRL_REG1_DR_SHIFTS   2

Definition at line 129 of file FXAS21002C.cpp.

◆ CTRL_REG1_READY

#define CTRL_REG1_READY   (1 << 0)

Definition at line 140 of file FXAS21002C.cpp.

Referenced by FXAS21002C::set_standby().

◆ CTRL_REG1_RST

#define CTRL_REG1_RST   (1 << 6)

Definition at line 127 of file FXAS21002C.cpp.

◆ CTRL_REG1_ST

#define CTRL_REG1_ST   (1 << 5)

Definition at line 128 of file FXAS21002C.cpp.

◆ CTRL_REG2_INT_CFG_DRDY

#define CTRL_REG2_INT_CFG_DRDY   (1 << 3)

Definition at line 147 of file FXAS21002C.cpp.

◆ CTRL_REG2_INT_CFG_FIFO

#define CTRL_REG2_INT_CFG_FIFO   (1 << 7)

Definition at line 143 of file FXAS21002C.cpp.

◆ CTRL_REG2_INT_CFG_RT

#define CTRL_REG2_INT_CFG_RT   (1 << 5)

Definition at line 145 of file FXAS21002C.cpp.

◆ CTRL_REG2_INT_EN_DRDY

#define CTRL_REG2_INT_EN_DRDY   (1 << 2)

Definition at line 148 of file FXAS21002C.cpp.

◆ CTRL_REG2_INT_EN_FIFO

#define CTRL_REG2_INT_EN_FIFO   (1 << 6)

Definition at line 144 of file FXAS21002C.cpp.

◆ CTRL_REG2_INT_EN_RT

#define CTRL_REG2_INT_EN_RT   (1 << 4)

Definition at line 146 of file FXAS21002C.cpp.

◆ CTRL_REG2_IPOL

#define CTRL_REG2_IPOL   (1 << 1)

Definition at line 149 of file FXAS21002C.cpp.

◆ CTRL_REG2_PP_OD

#define CTRL_REG2_PP_OD   (1 << 0)

Definition at line 150 of file FXAS21002C.cpp.

◆ CTRL_REG3_EXTCTRLEN

#define CTRL_REG3_EXTCTRLEN   (1 << 2)

Definition at line 154 of file FXAS21002C.cpp.

◆ CTRL_REG3_FS_DOUBLE

#define CTRL_REG3_FS_DOUBLE   (1 << 0)

Definition at line 155 of file FXAS21002C.cpp.

◆ CTRL_REG3_WRAPTOONE

#define CTRL_REG3_WRAPTOONE   (1 << 3)

Definition at line 153 of file FXAS21002C.cpp.

◆ DEF_REG

#define DEF_REG (   r)    {r, #r}

Definition at line 157 of file FXAS21002C.cpp.

Referenced by FXAS21002C::print_registers(), and FXOS8701CQ::print_registers().

◆ DIR_READ

#define DIR_READ (   a)    ((a) | (1 << 7))

Definition at line 37 of file FXAS21002C.cpp.

Referenced by FXAS21002C::measure(), and FXAS21002C::read_reg().

◆ DIR_WRITE

#define DIR_WRITE (   a)    ((a) & 0x7f)

Definition at line 38 of file FXAS21002C.cpp.

Referenced by FXAS21002C::write_reg().

◆ DR_STATUS_XDR

#define DR_STATUS_XDR   (1 << 0)

Definition at line 57 of file FXAS21002C.cpp.

◆ DR_STATUS_XOW

#define DR_STATUS_XOW   (1 << 4)

Definition at line 53 of file FXAS21002C.cpp.

◆ DR_STATUS_YDR

#define DR_STATUS_YDR   (1 << 1)

Definition at line 56 of file FXAS21002C.cpp.

◆ DR_STATUS_YOW

#define DR_STATUS_YOW   (1 << 5)

Definition at line 52 of file FXAS21002C.cpp.

◆ DR_STATUS_ZDR

#define DR_STATUS_ZDR   (1 << 2)

Definition at line 55 of file FXAS21002C.cpp.

◆ DR_STATUS_ZOW

#define DR_STATUS_ZOW   (1 << 6)

Definition at line 51 of file FXAS21002C.cpp.

◆ DR_STATUS_ZYXDR

#define DR_STATUS_ZYXDR   (1 << 3)

Definition at line 54 of file FXAS21002C.cpp.

Referenced by FXAS21002C::measure(), and FXOS8701CQ::Run().

◆ DR_STATUS_ZYXOW

#define DR_STATUS_ZYXOW   (1 << 7)

Definition at line 50 of file FXAS21002C.cpp.

◆ F_EVENT_F_EVENT

#define F_EVENT_F_EVENT   (1 << 5)

Definition at line 72 of file FXAS21002C.cpp.

◆ F_EVENT_FE_TIME_MASK

#define F_EVENT_FE_TIME_MASK   (0x1f << F_EVENT_FE_TIME_SHIFTS)

Definition at line 74 of file FXAS21002C.cpp.

◆ F_EVENT_FE_TIME_SHIFTS

#define F_EVENT_FE_TIME_SHIFTS   0

Definition at line 73 of file FXAS21002C.cpp.

◆ F_SETUP_F_MODE_MASK

#define F_SETUP_F_MODE_MASK   (0x3 << F_SETUP_F_MODE_SHIFTS)

Definition at line 67 of file FXAS21002C.cpp.

◆ F_SETUP_F_MODE_SHIFTS

#define F_SETUP_F_MODE_SHIFTS   6

Definition at line 66 of file FXAS21002C.cpp.

◆ F_SETUP_F_WMRK_MASK

#define F_SETUP_F_WMRK_MASK   (0x3f << F_SETUP_F_WMRK_SHIFTS)

Definition at line 69 of file FXAS21002C.cpp.

◆ F_SETUP_F_WMRK_SHIFTS

#define F_SETUP_F_WMRK_SHIFTS   0

Definition at line 68 of file FXAS21002C.cpp.

◆ F_STATUS_F_CNT_MASK

#define F_STATUS_F_CNT_MASK   (0x3f << F_STATUS_F_CNT_SHIFTS)

Definition at line 63 of file FXAS21002C.cpp.

◆ F_STATUS_F_CNT_SHIFTS

#define F_STATUS_F_CNT_SHIFTS   0

Definition at line 62 of file FXAS21002C.cpp.

◆ F_STATUS_F_OVF

#define F_STATUS_F_OVF   (1 << 7)

Definition at line 60 of file FXAS21002C.cpp.

◆ F_STATUS_F_WMKF

#define F_STATUS_F_WMKF   (1 << 6)

Definition at line 61 of file FXAS21002C.cpp.

◆ FXAS21002C_CTRL_REG0

#define FXAS21002C_CTRL_REG0   0x0d

◆ FXAS21002C_CTRL_REG1

◆ FXAS21002C_CTRL_REG2

#define FXAS21002C_CTRL_REG2   0x14

Definition at line 142 of file FXAS21002C.cpp.

Referenced by FXAS21002C::print_registers().

◆ FXAS21002C_CTRL_REG3

#define FXAS21002C_CTRL_REG3   0x15

Definition at line 152 of file FXAS21002C.cpp.

Referenced by FXAS21002C::print_registers().

◆ FXAS21002C_DEFAULT_ONCHIP_FILTER_FREQ

#define FXAS21002C_DEFAULT_ONCHIP_FILTER_FREQ   64

Definition at line 163 of file FXAS21002C.cpp.

Referenced by FXAS21002C::reset().

◆ FXAS21002C_DEFAULT_RANGE_DPS

#define FXAS21002C_DEFAULT_RANGE_DPS   2000

Definition at line 162 of file FXAS21002C.cpp.

Referenced by FXAS21002C::reset().

◆ FXAS21002C_DEFAULT_RATE

#define FXAS21002C_DEFAULT_RATE   FXAS21002C_MAX_RATE

◆ FXAS21002C_DR_STATUS

#define FXAS21002C_DR_STATUS   0x07

Definition at line 49 of file FXAS21002C.cpp.

Referenced by FXAS21002C::print_registers().

◆ FXAS21002C_F_EVENT

#define FXAS21002C_F_EVENT   0x0a

Definition at line 71 of file FXAS21002C.cpp.

Referenced by FXAS21002C::print_registers().

◆ FXAS21002C_F_SETUP

#define FXAS21002C_F_SETUP   0x09

Definition at line 65 of file FXAS21002C.cpp.

Referenced by FXAS21002C::print_registers().

◆ FXAS21002C_F_STATUS

#define FXAS21002C_F_STATUS   0x08

Definition at line 59 of file FXAS21002C.cpp.

Referenced by FXAS21002C::print_registers().

◆ FXAS21002C_INT_SRC_FLAG

#define FXAS21002C_INT_SRC_FLAG   0x0b

Definition at line 76 of file FXAS21002C.cpp.

Referenced by FXAS21002C::print_registers().

◆ FXAS21002C_MAX_RATE

#define FXAS21002C_MAX_RATE   800

Definition at line 160 of file FXAS21002C.cpp.

◆ FXAS21002C_OUT_X_LSB

#define FXAS21002C_OUT_X_LSB   0x02

Definition at line 43 of file FXAS21002C.cpp.

Referenced by FXAS21002C::print_registers().

◆ FXAS21002C_OUT_X_MSB

#define FXAS21002C_OUT_X_MSB   0x01

Definition at line 42 of file FXAS21002C.cpp.

Referenced by FXAS21002C::print_registers().

◆ FXAS21002C_OUT_Y_LSB

#define FXAS21002C_OUT_Y_LSB   0x04

Definition at line 45 of file FXAS21002C.cpp.

Referenced by FXAS21002C::print_registers().

◆ FXAS21002C_OUT_Y_MSB

#define FXAS21002C_OUT_Y_MSB   0x03

Definition at line 44 of file FXAS21002C.cpp.

Referenced by FXAS21002C::print_registers().

◆ FXAS21002C_OUT_Z_LSB

#define FXAS21002C_OUT_Z_LSB   0x06

Definition at line 47 of file FXAS21002C.cpp.

Referenced by FXAS21002C::print_registers().

◆ FXAS21002C_OUT_Z_MSB

#define FXAS21002C_OUT_Z_MSB   0x05

Definition at line 46 of file FXAS21002C.cpp.

Referenced by FXAS21002C::print_registers().

◆ FXAS21002C_RT_CFG

#define FXAS21002C_RT_CFG   0x0e

Definition at line 103 of file FXAS21002C.cpp.

Referenced by FXAS21002C::print_registers().

◆ FXAS21002C_RT_COUNT

#define FXAS21002C_RT_COUNT   0x11

Definition at line 123 of file FXAS21002C.cpp.

Referenced by FXAS21002C::print_registers().

◆ FXAS21002C_RT_SRC

#define FXAS21002C_RT_SRC   0x0f

Definition at line 109 of file FXAS21002C.cpp.

Referenced by FXAS21002C::print_registers().

◆ FXAS21002C_RT_THS

#define FXAS21002C_RT_THS   0x10

Definition at line 118 of file FXAS21002C.cpp.

Referenced by FXAS21002C::print_registers().

◆ FXAS21002C_STATUS

#define FXAS21002C_STATUS   0x00

Definition at line 41 of file FXAS21002C.cpp.

Referenced by FXAS21002C::measure(), and FXAS21002C::print_registers().

◆ FXAS21002C_TEMP

#define FXAS21002C_TEMP   0x12

Definition at line 124 of file FXAS21002C.cpp.

Referenced by FXAS21002C::measure(), and FXAS21002C::print_registers().

◆ FXAS21002C_TIMER_REDUCTION

#define FXAS21002C_TIMER_REDUCTION   250

Definition at line 172 of file FXAS21002C.cpp.

Referenced by FXAS21002C::start().

◆ FXAS21002C_WHO_AM_I

#define FXAS21002C_WHO_AM_I   0x0c

Definition at line 82 of file FXAS21002C.cpp.

Referenced by FXAS21002C::print_registers(), and FXAS21002C::probe().

◆ INT_SRC_FLAG_BOOTEND

#define INT_SRC_FLAG_BOOTEND   (1 << 3)

Definition at line 77 of file FXAS21002C.cpp.

◆ INT_SRC_FLAG_SRC_DRDY

#define INT_SRC_FLAG_SRC_DRDY   (1 << 0)

Definition at line 80 of file FXAS21002C.cpp.

◆ INT_SRC_FLAG_SRC_FIFO

#define INT_SRC_FLAG_SRC_FIFO   (1 << 2)

Definition at line 78 of file FXAS21002C.cpp.

◆ INT_SRC_FLAG_SRC_RT

#define INT_SRC_FLAG_SRC_RT   (1 << 1)

Definition at line 79 of file FXAS21002C.cpp.

◆ RT_CFG_ELE

#define RT_CFG_ELE   (1 << 3)

Definition at line 104 of file FXAS21002C.cpp.

◆ RT_CFG_XTEFE

#define RT_CFG_XTEFE   (1 << 0)

Definition at line 107 of file FXAS21002C.cpp.

◆ RT_CFG_YTEFE

#define RT_CFG_YTEFE   (1 << 1)

Definition at line 106 of file FXAS21002C.cpp.

◆ RT_CFG_ZTEFE

#define RT_CFG_ZTEFE   (1 << 2)

Definition at line 105 of file FXAS21002C.cpp.

◆ RT_SRC_EA

#define RT_SRC_EA   (1 << 6)

Definition at line 110 of file FXAS21002C.cpp.

◆ RT_SRC_X_RT_POL

#define RT_SRC_X_RT_POL   (1 << 0)

Definition at line 116 of file FXAS21002C.cpp.

◆ RT_SRC_XRT

#define RT_SRC_XRT   (1 << 1)

Definition at line 115 of file FXAS21002C.cpp.

◆ RT_SRC_Y_RT_POL

#define RT_SRC_Y_RT_POL   (1 << 2)

Definition at line 114 of file FXAS21002C.cpp.

◆ RT_SRC_YRT

#define RT_SRC_YRT   (1 << 3)

Definition at line 113 of file FXAS21002C.cpp.

◆ RT_SRC_Z_RT_POL

#define RT_SRC_Z_RT_POL   (1 << 4)

Definition at line 112 of file FXAS21002C.cpp.

◆ RT_SRC_ZRT

#define RT_SRC_ZRT   (1 << 5)

Definition at line 111 of file FXAS21002C.cpp.

◆ RT_THS_DBCNTM

#define RT_THS_DBCNTM   (1 << 7)

Definition at line 119 of file FXAS21002C.cpp.

◆ RT_THS_THS_MASK

#define RT_THS_THS_MASK   (0x7f << RT_THS_THS_SHIFTS)

Definition at line 121 of file FXAS21002C.cpp.

◆ RT_THS_THS_SHIFTS

#define RT_THS_THS_SHIFTS   0

Definition at line 120 of file FXAS21002C.cpp.

◆ swap16

#define swap16 (   w)    __builtin_bswap16((w))

Definition at line 39 of file FXAS21002C.cpp.

Referenced by FXAS21002C::measure(), and FXOS8701CQ::Run().

◆ WHO_AM_I

#define WHO_AM_I   0xd7

Definition at line 83 of file FXAS21002C.cpp.

Referenced by LPS22HB_I2C::probe(), and FXAS21002C::probe().

Variable Documentation

◆ _checked_registers

constexpr uint8_t _checked_registers[]
static
Initial value:
{
}
#define FXAS21002C_CTRL_REG0
Definition: FXAS21002C.cpp:85
#define FXAS21002C_F_SETUP
Definition: FXAS21002C.cpp:65
#define FXAS21002C_CTRL_REG2
Definition: FXAS21002C.cpp:142
#define FXAS21002C_WHO_AM_I
Definition: FXAS21002C.cpp:82
#define FXAS21002C_CTRL_REG3
Definition: FXAS21002C.cpp:152
#define FXAS21002C_CTRL_REG1
Definition: FXAS21002C.cpp:126

Definition at line 178 of file FXAS21002C.cpp.

Referenced by FXAS21002C::check_registers(), FXAS21002C::print_info(), and FXAS21002C::write_checked_reg().