PX4 Firmware
PX4 Autopilot Software http://px4.io
|
#include "FXAS21002C.hpp"
Go to the source code of this file.
Variables | |
static constexpr uint8_t | _checked_registers [] |
#define CTRL_REG0_BW | ( | n | ) | (((n) & 0x3) << CTRL_REG0_BW_SHIFTS) |
Definition at line 88 of file FXAS21002C.cpp.
#define CTRL_REG0_BW_HIGH CTRL_REG0_BW(0) |
Definition at line 89 of file FXAS21002C.cpp.
Referenced by FXAS21002C::set_onchip_lowpass_filter().
#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().
#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().
#define CTRL_REG0_BW_MED CTRL_REG0_BW(1) |
Definition at line 90 of file FXAS21002C.cpp.
Referenced by FXAS21002C::set_onchip_lowpass_filter().
#define CTRL_REG0_BW_SHIFTS 6 |
Definition at line 86 of file FXAS21002C.cpp.
#define CTRL_REG0_FS_1000_DPS (1 << CTRL_REG0_FS_SHIFTS) |
Definition at line 99 of file FXAS21002C.cpp.
Referenced by FXAS21002C::set_range().
#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().
#define CTRL_REG0_FS_250_DPS (3 << CTRL_REG0_FS_SHIFTS) |
Definition at line 101 of file FXAS21002C.cpp.
Referenced by FXAS21002C::set_range().
#define CTRL_REG0_FS_500_DPS (2 << CTRL_REG0_FS_SHIFTS) |
Definition at line 100 of file FXAS21002C.cpp.
Referenced by FXAS21002C::set_range().
#define CTRL_REG0_FS_MASK (0x3 << CTRL_REG0_FS_SHIFTS) |
Definition at line 97 of file FXAS21002C.cpp.
Referenced by FXAS21002C::set_range().
#define CTRL_REG0_FS_SHIFTS 0 |
Definition at line 96 of file FXAS21002C.cpp.
#define CTRL_REG0_HPF_EN (1 << 2) |
Definition at line 95 of file FXAS21002C.cpp.
#define CTRL_REG0_SEL_MASK (0x2 << CTRL_REG0_SEL_SHIFTS) |
Definition at line 94 of file FXAS21002C.cpp.
#define CTRL_REG0_SEL_SHIFTS 3 |
Definition at line 93 of file FXAS21002C.cpp.
#define CTRL_REG0_SPIW (1 << 6) |
Definition at line 92 of file FXAS21002C.cpp.
#define CTRL_REG1_ACTIVE (1 << 1) |
Definition at line 139 of file FXAS21002C.cpp.
Referenced by FXOS8701CQ::accel_set_samplerate(), FXAS21002C::reset(), FXOS8701CQ::reset(), and FXAS21002C::set_standby().
#define CTRL_REG1_DR_100HZ (3 << CTRL_REG1_DR_SHIFTS) |
Definition at line 135 of file FXAS21002C.cpp.
Referenced by FXAS21002C::set_samplerate().
#define CTRL_REG1_DR_12_5 (7 << CTRL_REG1_DR_SHIFTS) |
Definition at line 131 of file FXAS21002C.cpp.
Referenced by FXAS21002C::set_samplerate().
#define CTRL_REG1_DR_12_5_1 (6 << CTRL_REG1_DR_SHIFTS) |
Definition at line 132 of file FXAS21002C.cpp.
#define CTRL_REG1_DR_200HZ (2 << CTRL_REG1_DR_SHIFTS) |
Definition at line 136 of file FXAS21002C.cpp.
Referenced by FXAS21002C::set_samplerate().
#define CTRL_REG1_DR_25HZ (5 << CTRL_REG1_DR_SHIFTS) |
Definition at line 133 of file FXAS21002C.cpp.
Referenced by FXAS21002C::set_samplerate().
#define CTRL_REG1_DR_400HZ (1 << CTRL_REG1_DR_SHIFTS) |
Definition at line 137 of file FXAS21002C.cpp.
Referenced by FXAS21002C::set_samplerate().
#define CTRL_REG1_DR_50HZ (4 << CTRL_REG1_DR_SHIFTS) |
Definition at line 134 of file FXAS21002C.cpp.
Referenced by FXAS21002C::set_samplerate().
#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().
#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().
#define CTRL_REG1_DR_SHIFTS 2 |
Definition at line 129 of file FXAS21002C.cpp.
#define CTRL_REG1_READY (1 << 0) |
Definition at line 140 of file FXAS21002C.cpp.
Referenced by FXAS21002C::set_standby().
#define CTRL_REG1_RST (1 << 6) |
Definition at line 127 of file FXAS21002C.cpp.
#define CTRL_REG1_ST (1 << 5) |
Definition at line 128 of file FXAS21002C.cpp.
#define CTRL_REG2_INT_CFG_DRDY (1 << 3) |
Definition at line 147 of file FXAS21002C.cpp.
#define CTRL_REG2_INT_CFG_FIFO (1 << 7) |
Definition at line 143 of file FXAS21002C.cpp.
#define CTRL_REG2_INT_CFG_RT (1 << 5) |
Definition at line 145 of file FXAS21002C.cpp.
#define CTRL_REG2_INT_EN_DRDY (1 << 2) |
Definition at line 148 of file FXAS21002C.cpp.
#define CTRL_REG2_INT_EN_FIFO (1 << 6) |
Definition at line 144 of file FXAS21002C.cpp.
#define CTRL_REG2_INT_EN_RT (1 << 4) |
Definition at line 146 of file FXAS21002C.cpp.
#define CTRL_REG2_IPOL (1 << 1) |
Definition at line 149 of file FXAS21002C.cpp.
#define CTRL_REG2_PP_OD (1 << 0) |
Definition at line 150 of file FXAS21002C.cpp.
#define CTRL_REG3_EXTCTRLEN (1 << 2) |
Definition at line 154 of file FXAS21002C.cpp.
#define CTRL_REG3_FS_DOUBLE (1 << 0) |
Definition at line 155 of file FXAS21002C.cpp.
#define CTRL_REG3_WRAPTOONE (1 << 3) |
Definition at line 153 of file FXAS21002C.cpp.
#define DEF_REG | ( | r | ) | {r, #r} |
Definition at line 157 of file FXAS21002C.cpp.
Referenced by FXAS21002C::print_registers(), and FXOS8701CQ::print_registers().
#define DIR_READ | ( | a | ) | ((a) | (1 << 7)) |
Definition at line 37 of file FXAS21002C.cpp.
Referenced by FXAS21002C::measure(), and FXAS21002C::read_reg().
#define DIR_WRITE | ( | a | ) | ((a) & 0x7f) |
Definition at line 38 of file FXAS21002C.cpp.
Referenced by FXAS21002C::write_reg().
#define DR_STATUS_XDR (1 << 0) |
Definition at line 57 of file FXAS21002C.cpp.
#define DR_STATUS_XOW (1 << 4) |
Definition at line 53 of file FXAS21002C.cpp.
#define DR_STATUS_YDR (1 << 1) |
Definition at line 56 of file FXAS21002C.cpp.
#define DR_STATUS_YOW (1 << 5) |
Definition at line 52 of file FXAS21002C.cpp.
#define DR_STATUS_ZDR (1 << 2) |
Definition at line 55 of file FXAS21002C.cpp.
#define DR_STATUS_ZOW (1 << 6) |
Definition at line 51 of file FXAS21002C.cpp.
#define DR_STATUS_ZYXDR (1 << 3) |
Definition at line 54 of file FXAS21002C.cpp.
Referenced by FXAS21002C::measure(), and FXOS8701CQ::Run().
#define DR_STATUS_ZYXOW (1 << 7) |
Definition at line 50 of file FXAS21002C.cpp.
#define F_EVENT_F_EVENT (1 << 5) |
Definition at line 72 of file FXAS21002C.cpp.
#define F_EVENT_FE_TIME_MASK (0x1f << F_EVENT_FE_TIME_SHIFTS) |
Definition at line 74 of file FXAS21002C.cpp.
#define F_EVENT_FE_TIME_SHIFTS 0 |
Definition at line 73 of file FXAS21002C.cpp.
#define F_SETUP_F_MODE_MASK (0x3 << F_SETUP_F_MODE_SHIFTS) |
Definition at line 67 of file FXAS21002C.cpp.
#define F_SETUP_F_MODE_SHIFTS 6 |
Definition at line 66 of file FXAS21002C.cpp.
#define F_SETUP_F_WMRK_MASK (0x3f << F_SETUP_F_WMRK_SHIFTS) |
Definition at line 69 of file FXAS21002C.cpp.
#define F_SETUP_F_WMRK_SHIFTS 0 |
Definition at line 68 of file FXAS21002C.cpp.
#define F_STATUS_F_CNT_MASK (0x3f << F_STATUS_F_CNT_SHIFTS) |
Definition at line 63 of file FXAS21002C.cpp.
#define F_STATUS_F_CNT_SHIFTS 0 |
Definition at line 62 of file FXAS21002C.cpp.
#define F_STATUS_F_OVF (1 << 7) |
Definition at line 60 of file FXAS21002C.cpp.
#define F_STATUS_F_WMKF (1 << 6) |
Definition at line 61 of file FXAS21002C.cpp.
#define FXAS21002C_CTRL_REG0 0x0d |
Definition at line 85 of file FXAS21002C.cpp.
Referenced by FXAS21002C::print_registers(), FXAS21002C::reset(), and FXAS21002C::set_range().
#define FXAS21002C_CTRL_REG1 0x13 |
Definition at line 126 of file FXAS21002C.cpp.
Referenced by FXAS21002C::print_registers(), FXAS21002C::reset(), FXAS21002C::set_onchip_lowpass_filter(), FXAS21002C::set_samplerate(), FXAS21002C::set_standby(), and FXAS21002C::test_error().
#define FXAS21002C_CTRL_REG2 0x14 |
Definition at line 142 of file FXAS21002C.cpp.
Referenced by FXAS21002C::print_registers().
#define FXAS21002C_CTRL_REG3 0x15 |
Definition at line 152 of file FXAS21002C.cpp.
Referenced by FXAS21002C::print_registers().
#define FXAS21002C_DEFAULT_ONCHIP_FILTER_FREQ 64 |
Definition at line 163 of file FXAS21002C.cpp.
Referenced by FXAS21002C::reset().
#define FXAS21002C_DEFAULT_RANGE_DPS 2000 |
Definition at line 162 of file FXAS21002C.cpp.
Referenced by FXAS21002C::reset().
#define FXAS21002C_DEFAULT_RATE FXAS21002C_MAX_RATE |
Definition at line 161 of file FXAS21002C.cpp.
Referenced by FXAS21002C::reset(), FXAS21002C::set_samplerate(), and FXAS21002C::start().
#define FXAS21002C_DR_STATUS 0x07 |
Definition at line 49 of file FXAS21002C.cpp.
Referenced by FXAS21002C::print_registers().
#define FXAS21002C_F_EVENT 0x0a |
Definition at line 71 of file FXAS21002C.cpp.
Referenced by FXAS21002C::print_registers().
#define FXAS21002C_F_SETUP 0x09 |
Definition at line 65 of file FXAS21002C.cpp.
Referenced by FXAS21002C::print_registers().
#define FXAS21002C_F_STATUS 0x08 |
Definition at line 59 of file FXAS21002C.cpp.
Referenced by FXAS21002C::print_registers().
#define FXAS21002C_INT_SRC_FLAG 0x0b |
Definition at line 76 of file FXAS21002C.cpp.
Referenced by FXAS21002C::print_registers().
#define FXAS21002C_MAX_RATE 800 |
Definition at line 160 of file FXAS21002C.cpp.
#define FXAS21002C_OUT_X_LSB 0x02 |
Definition at line 43 of file FXAS21002C.cpp.
Referenced by FXAS21002C::print_registers().
#define FXAS21002C_OUT_X_MSB 0x01 |
Definition at line 42 of file FXAS21002C.cpp.
Referenced by FXAS21002C::print_registers().
#define FXAS21002C_OUT_Y_LSB 0x04 |
Definition at line 45 of file FXAS21002C.cpp.
Referenced by FXAS21002C::print_registers().
#define FXAS21002C_OUT_Y_MSB 0x03 |
Definition at line 44 of file FXAS21002C.cpp.
Referenced by FXAS21002C::print_registers().
#define FXAS21002C_OUT_Z_LSB 0x06 |
Definition at line 47 of file FXAS21002C.cpp.
Referenced by FXAS21002C::print_registers().
#define FXAS21002C_OUT_Z_MSB 0x05 |
Definition at line 46 of file FXAS21002C.cpp.
Referenced by FXAS21002C::print_registers().
#define FXAS21002C_RT_CFG 0x0e |
Definition at line 103 of file FXAS21002C.cpp.
Referenced by FXAS21002C::print_registers().
#define FXAS21002C_RT_COUNT 0x11 |
Definition at line 123 of file FXAS21002C.cpp.
Referenced by FXAS21002C::print_registers().
#define FXAS21002C_RT_SRC 0x0f |
Definition at line 109 of file FXAS21002C.cpp.
Referenced by FXAS21002C::print_registers().
#define FXAS21002C_RT_THS 0x10 |
Definition at line 118 of file FXAS21002C.cpp.
Referenced by FXAS21002C::print_registers().
#define FXAS21002C_STATUS 0x00 |
Definition at line 41 of file FXAS21002C.cpp.
Referenced by FXAS21002C::measure(), and FXAS21002C::print_registers().
#define FXAS21002C_TEMP 0x12 |
Definition at line 124 of file FXAS21002C.cpp.
Referenced by FXAS21002C::measure(), and FXAS21002C::print_registers().
#define FXAS21002C_TIMER_REDUCTION 250 |
Definition at line 172 of file FXAS21002C.cpp.
Referenced by FXAS21002C::start().
#define FXAS21002C_WHO_AM_I 0x0c |
Definition at line 82 of file FXAS21002C.cpp.
Referenced by FXAS21002C::print_registers(), and FXAS21002C::probe().
#define INT_SRC_FLAG_BOOTEND (1 << 3) |
Definition at line 77 of file FXAS21002C.cpp.
#define INT_SRC_FLAG_SRC_DRDY (1 << 0) |
Definition at line 80 of file FXAS21002C.cpp.
#define INT_SRC_FLAG_SRC_FIFO (1 << 2) |
Definition at line 78 of file FXAS21002C.cpp.
#define INT_SRC_FLAG_SRC_RT (1 << 1) |
Definition at line 79 of file FXAS21002C.cpp.
#define RT_CFG_ELE (1 << 3) |
Definition at line 104 of file FXAS21002C.cpp.
#define RT_CFG_XTEFE (1 << 0) |
Definition at line 107 of file FXAS21002C.cpp.
#define RT_CFG_YTEFE (1 << 1) |
Definition at line 106 of file FXAS21002C.cpp.
#define RT_CFG_ZTEFE (1 << 2) |
Definition at line 105 of file FXAS21002C.cpp.
#define RT_SRC_EA (1 << 6) |
Definition at line 110 of file FXAS21002C.cpp.
#define RT_SRC_X_RT_POL (1 << 0) |
Definition at line 116 of file FXAS21002C.cpp.
#define RT_SRC_XRT (1 << 1) |
Definition at line 115 of file FXAS21002C.cpp.
#define RT_SRC_Y_RT_POL (1 << 2) |
Definition at line 114 of file FXAS21002C.cpp.
#define RT_SRC_YRT (1 << 3) |
Definition at line 113 of file FXAS21002C.cpp.
#define RT_SRC_Z_RT_POL (1 << 4) |
Definition at line 112 of file FXAS21002C.cpp.
#define RT_SRC_ZRT (1 << 5) |
Definition at line 111 of file FXAS21002C.cpp.
#define RT_THS_DBCNTM (1 << 7) |
Definition at line 119 of file FXAS21002C.cpp.
#define RT_THS_THS_MASK (0x7f << RT_THS_THS_SHIFTS) |
Definition at line 121 of file FXAS21002C.cpp.
#define RT_THS_THS_SHIFTS 0 |
Definition at line 120 of file FXAS21002C.cpp.
#define swap16 | ( | w | ) | __builtin_bswap16((w)) |
Definition at line 39 of file FXAS21002C.cpp.
Referenced by FXAS21002C::measure(), and FXOS8701CQ::Run().
#define WHO_AM_I 0xd7 |
Definition at line 83 of file FXAS21002C.cpp.
Referenced by LPS22HB_I2C::probe(), and FXAS21002C::probe().
|
static |
Definition at line 178 of file FXAS21002C.cpp.
Referenced by FXAS21002C::check_registers(), FXAS21002C::print_info(), and FXAS21002C::write_checked_reg().