PX4 Firmware
PX4 Autopilot Software http://px4.io
|
Shared defines for the RM3100 driver. More...
#include <float.h>
#include <drivers/device/i2c.h>
#include <drivers/device/ringbuffer.h>
#include <drivers/drv_hrt.h>
#include <drivers/drv_mag.h>
#include <lib/conversion/rotation.h>
#include <perf/perf_counter.h>
#include <px4_platform_common/defines.h>
#include <systemlib/err.h>
#include <px4_platform_common/px4_work_queue/ScheduledWorkItem.hpp>
Go to the source code of this file.
Classes | |
class | RM3100 |
struct | RM3100::_last_report |
used for info() More... | |
Macros | |
#define | RM3100_CONVERSION_INTERVAL 10000 |
RM3100 internal constants and data structures. More... | |
#define | UTESLA_TO_GAUSS 100.0f |
#define | RM3100_SENSITIVITY 75.0f |
#define | ADDR_POLL 0x00 |
#define | ADDR_CMM 0x01 |
#define | ADDR_CCX 0x04 |
#define | ADDR_CCY 0x06 |
#define | ADDR_CCZ 0x08 |
#define | ADDR_TMRC 0x0B |
#define | ADDR_MX 0x24 |
#define | ADDR_MY 0x27 |
#define | ADDR_MZ 0x2A |
#define | ADDR_BIST 0x33 |
#define | ADDR_STATUS 0x34 |
#define | ADDR_HSHAKE 0x35 |
#define | ADDR_REVID 0x36 |
#define | CCX_DEFAULT_MSB 0x00 |
#define | CCX_DEFAULT_LSB 0xC8 |
#define | CCY_DEFAULT_MSB CCX_DEFAULT_MSB |
#define | CCY_DEFAULT_LSB CCX_DEFAULT_LSB |
#define | CCZ_DEFAULT_MSB CCX_DEFAULT_MSB |
#define | CCZ_DEFAULT_LSB CCX_DEFAULT_LSB |
#define | CMM_DEFAULT 0x70 |
#define | CONTINUOUS_MODE (1 << 0) |
#define | POLLING_MODE (0 << 0) |
#define | TMRC_DEFAULT 0x94 |
#define | BIST_SELFTEST 0x8F |
#define | BIST_DEFAULT 0x00 |
#define | BIST_XYZ_OK ((1 << 4) | (1 << 5) | (1 << 6)) |
#define | STATUS_DRDY (1 << 7) |
#define | POLL_XYZ 0x70 |
#define | RM3100_REVID 0x22 |
#define | NUM_BUS_OPTIONS (sizeof(bus_options)/sizeof(bus_options[0])) |
Typedefs | |
typedef device::Device *(* | RM3100_constructor) (int) |
Enumerations | |
enum | RM3100_BUS { RM3100_BUS_ALL = 0, RM3100_BUS_I2C_INTERNAL, RM3100_BUS_I2C_EXTERNAL, RM3100_BUS_SPI_INTERNAL, RM3100_BUS_SPI_EXTERNAL } |
enum | OPERATING_MODE { CONTINUOUS = 0, SINGLE, CONTINUOUS = 0, SINGLE } |
Functions | |
device::Device * | RM3100_SPI_interface (int bus) |
device::Device * | RM3100_I2C_interface (int bus) |
#define ADDR_BIST 0x33 |
Definition at line 75 of file rm3100.h.
Referenced by RM3100::self_test(), and RM3100::set_default_register_values().
#define ADDR_CCX 0x04 |
Definition at line 68 of file rm3100.h.
Referenced by RM3100::set_default_register_values().
#define ADDR_CCY 0x06 |
Definition at line 69 of file rm3100.h.
Referenced by RM3100::set_default_register_values().
#define ADDR_CCZ 0x08 |
Definition at line 70 of file rm3100.h.
Referenced by RM3100::set_default_register_values().
#define ADDR_CMM 0x01 |
Definition at line 67 of file rm3100.h.
Referenced by RM3100::measure(), and RM3100::set_default_register_values().
#define ADDR_MX 0x24 |
Definition at line 72 of file rm3100.h.
Referenced by RM3100::collect().
#define ADDR_POLL 0x00 |
Definition at line 66 of file rm3100.h.
Referenced by RM3100::measure(), and RM3100::self_test().
#define ADDR_TMRC 0x0B |
Definition at line 71 of file rm3100.h.
Referenced by RM3100::set_default_register_values().
#define BIST_DEFAULT 0x00 |
Definition at line 91 of file rm3100.h.
Referenced by RM3100::set_default_register_values().
#define BIST_SELFTEST 0x8F |
Definition at line 90 of file rm3100.h.
Referenced by RM3100::self_test().
#define BIST_XYZ_OK ((1 << 4) | (1 << 5) | (1 << 6)) |
Definition at line 92 of file rm3100.h.
Referenced by RM3100::self_test().
#define CCX_DEFAULT_LSB 0xC8 |
Definition at line 81 of file rm3100.h.
Referenced by RM3100::set_default_register_values().
#define CCX_DEFAULT_MSB 0x00 |
Definition at line 80 of file rm3100.h.
Referenced by RM3100::set_default_register_values().
#define CCY_DEFAULT_LSB CCX_DEFAULT_LSB |
Definition at line 83 of file rm3100.h.
Referenced by RM3100::set_default_register_values().
#define CCY_DEFAULT_MSB CCX_DEFAULT_MSB |
Definition at line 82 of file rm3100.h.
Referenced by RM3100::set_default_register_values().
#define CCZ_DEFAULT_LSB CCX_DEFAULT_LSB |
Definition at line 85 of file rm3100.h.
Referenced by RM3100::set_default_register_values().
#define CCZ_DEFAULT_MSB CCX_DEFAULT_MSB |
Definition at line 84 of file rm3100.h.
Referenced by RM3100::set_default_register_values().
#define CMM_DEFAULT 0x70 |
Definition at line 86 of file rm3100.h.
Referenced by RM3100::measure(), and RM3100::set_default_register_values().
#define CONTINUOUS_MODE (1 << 0) |
Definition at line 87 of file rm3100.h.
Referenced by RM3100::measure().
#define NUM_BUS_OPTIONS (sizeof(bus_options)/sizeof(bus_options[0])) |
#define POLL_XYZ 0x70 |
Definition at line 94 of file rm3100.h.
Referenced by RM3100::measure(), and RM3100::self_test().
#define POLLING_MODE (0 << 0) |
Definition at line 88 of file rm3100.h.
Referenced by RM3100::measure().
#define RM3100_CONVERSION_INTERVAL 10000 |
RM3100 internal constants and data structures.
Definition at line 62 of file rm3100.h.
Referenced by RM3100::ioctl(), RM3100::read(), RM3100::self_test(), and RM3100::start().
#define RM3100_SENSITIVITY 75.0f |
Definition at line 64 of file rm3100.h.
Referenced by RM3100::RM3100().
#define STATUS_DRDY (1 << 7) |
Definition at line 93 of file rm3100.h.
Referenced by RM3100::check_measurement().
#define TMRC_DEFAULT 0x94 |
Definition at line 89 of file rm3100.h.
Referenced by RM3100::set_default_register_values().
#define UTESLA_TO_GAUSS 100.0f |
Definition at line 63 of file rm3100.h.
Referenced by RM3100::RM3100().
typedef device::Device*(* RM3100_constructor) (int) |
enum OPERATING_MODE |
enum RM3100_BUS |
device::Device* RM3100_I2C_interface | ( | int | bus | ) |
device::Device* RM3100_SPI_interface | ( | int | bus | ) |