PX4 Firmware
PX4 Autopilot Software http://px4.io
|
Driver for the NXP FXOS8701CQ 6-axis sensor with integrated linear accelerometer and magnetometer connected via SPI. More...
#include <drivers/device/spi.h>
#include <lib/drivers/accelerometer/PX4Accelerometer.hpp>
#include <lib/ecl/geo/geo.h>
#include <lib/perf/perf_counter.h>
#include <px4_platform_common/px4_work_queue/ScheduledWorkItem.hpp>
#include <lib/drivers/magnetometer/PX4Magnetometer.hpp>
Go to the source code of this file.
Classes | |
class | FXOS8701CQ |
Driver for the NXP FXOS8701CQ 6-axis sensor with integrated linear accelerometer and magnetometer connected via SPI.
Definition in file FXOS8701CQ.hpp.
#define ADDR_7 | ( | a | ) | ((a) & (1 << 7)) |
Definition at line 55 of file FXOS8701CQ.hpp.
Referenced by FXOS8701CQ::read_reg(), FXOS8701CQ::Run(), and FXOS8701CQ::write_reg().
#define CTRL_REG1_ACTIVE (1 << 0) |
Definition at line 76 of file FXOS8701CQ.hpp.
#define CTRL_REG1_DR | ( | n | ) | (((n) & 7) << CTRL_REG1_DR_SHIFTS) |
Definition at line 79 of file FXOS8701CQ.hpp.
Referenced by FXOS8701CQ::accel_set_samplerate(), and FXOS8701CQ::reset().
#define CTRL_REG1_DR_MASK (7 << CTRL_REG1_DR_SHIFTS) |
Definition at line 78 of file FXOS8701CQ.hpp.
#define CTRL_REG1_DR_SHIFTS 3 |
Definition at line 77 of file FXOS8701CQ.hpp.
#define CTRL_REG2_AUTO_INC (1 << 5) |
Definition at line 81 of file FXOS8701CQ.hpp.
Referenced by FXOS8701CQ::reset().
#define DEF_REG | ( | r | ) | {r, #r} |
Definition at line 100 of file FXOS8701CQ.hpp.
#define DIR_READ | ( | a | ) | ((a) & 0x7f) |
Definition at line 53 of file FXOS8701CQ.hpp.
#define DIR_WRITE | ( | a | ) | ((a) | (1 << 7)) |
Definition at line 54 of file FXOS8701CQ.hpp.
#define DR_STATUS_ZYXDR (1 << 3) |
Definition at line 60 of file FXOS8701CQ.hpp.
#define FXOS8700CQ_WHOAMI_VAL 0xC7 |
Definition at line 72 of file FXOS8701CQ.hpp.
Referenced by FXOS8701CQ::probe().
#define FXOS8701C_ACCEL_DEFAULT_RANGE_G 8 |
Definition at line 103 of file FXOS8701CQ.hpp.
Referenced by FXOS8701CQ::reset().
#define FXOS8701C_ACCEL_DEFAULT_RATE 400 /* ODR is 400 in Hybird mode (accel + mag) */ |
Definition at line 104 of file FXOS8701CQ.hpp.
Referenced by FXOS8701CQ::accel_set_samplerate(), FXOS8701CQ::reset(), and FXOS8701CQ::start().
#define FXOS8701C_TIMER_REDUCTION 240 |
Definition at line 112 of file FXOS8701CQ.hpp.
Referenced by FXOS8701CQ::start().
#define FXOS8701CQ_CTRL_REG1 0x2a |
Definition at line 75 of file FXOS8701CQ.hpp.
Referenced by FXOS8701CQ::accel_set_samplerate(), FXOS8701CQ::print_registers(), FXOS8701CQ::reset(), and FXOS8701CQ::test_error().
#define FXOS8701CQ_CTRL_REG2 0x2b |
Definition at line 80 of file FXOS8701CQ.hpp.
Referenced by FXOS8701CQ::print_registers().
#define FXOS8701CQ_DR_STATUS 0x00 |
Definition at line 59 of file FXOS8701CQ.hpp.
Referenced by FXOS8701CQ::print_registers(), and FXOS8701CQ::Run().
#define FXOS8701CQ_M_CTRL_REG1 0x5b |
Definition at line 87 of file FXOS8701CQ.hpp.
Referenced by FXOS8701CQ::print_registers(), and FXOS8701CQ::reset().
#define FXOS8701CQ_M_CTRL_REG2 0x5c |
Definition at line 97 of file FXOS8701CQ.hpp.
Referenced by FXOS8701CQ::print_registers(), and FXOS8701CQ::reset().
#define FXOS8701CQ_M_CTRL_REG3 0x5d |
Definition at line 98 of file FXOS8701CQ.hpp.
Referenced by FXOS8701CQ::print_registers().
#define FXOS8701CQ_M_DR_STATUS 0x32 |
Definition at line 83 of file FXOS8701CQ.hpp.
Referenced by FXOS8701CQ::print_registers().
#define FXOS8701CQ_M_OUT_X_MSB 0x33 |
Definition at line 85 of file FXOS8701CQ.hpp.
Referenced by FXOS8701CQ::print_registers().
#define FXOS8701CQ_OUT_X_MSB 0x01 |
Definition at line 62 of file FXOS8701CQ.hpp.
Referenced by FXOS8701CQ::print_registers().
#define FXOS8701CQ_TEMP 0x51 |
Definition at line 86 of file FXOS8701CQ.hpp.
Referenced by FXOS8701CQ::Run().
#define FXOS8701CQ_WHOAMI 0x0d |
Definition at line 71 of file FXOS8701CQ.hpp.
Referenced by FXOS8701CQ::print_registers(), and FXOS8701CQ::probe().
#define FXOS8701CQ_WHOAMI_VAL 0xCA |
Definition at line 73 of file FXOS8701CQ.hpp.
Referenced by FXOS8701CQ::probe().
#define FXOS8701CQ_XYZ_DATA_CFG 0x0e |
Definition at line 64 of file FXOS8701CQ.hpp.
Referenced by FXOS8701CQ::accel_set_range(), FXOS8701CQ::print_registers(), and FXOS8701CQ::reset().
#define M_CTRL_REG1_HMS_A (0 << M_CTRL_REG1_HMS_SHIFTS) |
Definition at line 90 of file FXOS8701CQ.hpp.
#define M_CTRL_REG1_HMS_AM (3 << M_CTRL_REG1_HMS_SHIFTS) |
Definition at line 92 of file FXOS8701CQ.hpp.
Referenced by FXOS8701CQ::reset().
#define M_CTRL_REG1_HMS_M (1 << M_CTRL_REG1_HMS_SHIFTS) |
Definition at line 91 of file FXOS8701CQ.hpp.
#define M_CTRL_REG1_HMS_MASK (3 << M_CTRL_REG1_HMS_SHIFTS) |
Definition at line 89 of file FXOS8701CQ.hpp.
#define M_CTRL_REG1_HMS_SHIFTS 0 |
Definition at line 88 of file FXOS8701CQ.hpp.
#define M_CTRL_REG1_OS | ( | n | ) | (((n) & 7) << M_CTRL_REG1_OS_SHIFTS) |
Definition at line 95 of file FXOS8701CQ.hpp.
Referenced by FXOS8701CQ::reset().
#define M_CTRL_REG1_OS_MASK (7 << M_CTRL_REG1_HMS_SHIFTS) |
Definition at line 94 of file FXOS8701CQ.hpp.
#define M_CTRL_REG1_OS_SHIFTS 2 |
Definition at line 93 of file FXOS8701CQ.hpp.
#define M_DR_STATUS_ZYXDR (1 << 3) |
Definition at line 84 of file FXOS8701CQ.hpp.
#define swap16 | ( | w | ) | __builtin_bswap16((w)) |
Definition at line 56 of file FXOS8701CQ.hpp.
#define swap16RightJustify14 | ( | w | ) | (((int16_t)swap16(w)) >> 2) |
Definition at line 57 of file FXOS8701CQ.hpp.
Referenced by FXOS8701CQ::Run().
#define XYZ_DATA_CFG_FS_2G (0 << XYZ_DATA_CFG_FS_SHIFTS) |
Definition at line 67 of file FXOS8701CQ.hpp.
Referenced by FXOS8701CQ::accel_set_range().
#define XYZ_DATA_CFG_FS_4G (1 << XYZ_DATA_CFG_FS_SHIFTS) |
Definition at line 68 of file FXOS8701CQ.hpp.
Referenced by FXOS8701CQ::accel_set_range().
#define XYZ_DATA_CFG_FS_8G (2 << XYZ_DATA_CFG_FS_SHIFTS) |
Definition at line 69 of file FXOS8701CQ.hpp.
Referenced by FXOS8701CQ::accel_set_range().
#define XYZ_DATA_CFG_FS_MASK (3 << XYZ_DATA_CFG_FS_SHIFTS) |
Definition at line 66 of file FXOS8701CQ.hpp.
Referenced by FXOS8701CQ::accel_set_range().
#define XYZ_DATA_CFG_FS_SHIFTS 0 |
Definition at line 65 of file FXOS8701CQ.hpp.