|
PX4 Firmware
PX4 Autopilot Software http://px4.io
|
Shared defines for the mpl3115a2 driver. More...
#include <assert.h>#include <errno.h>#include <fcntl.h>#include <poll.h>#include <semaphore.h>#include <stdbool.h>#include <stdint.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/types.h>#include <math.h>#include <unistd.h>#include <arch/board/board.h>#include <board_config.h>#include <drivers/device/device.h>#include <drivers/device/Device.hpp>#include <drivers/device/i2c.h>#include <drivers/device/ringbuffer.h>#include <drivers/drv_baro.h>#include <drivers/drv_hrt.h>#include <lib/cdev/CDev.hpp>#include <nuttx/arch.h>#include <nuttx/clock.h>#include <perf/perf_counter.h>#include <px4_platform_common/px4_config.h>#include <px4_platform_common/defines.h>#include <px4_platform_common/getopt.h>#include <px4_platform_common/log.h>#include <px4_platform_common/px4_work_queue/ScheduledWorkItem.hpp>#include <systemlib/err.h>Go to the source code of this file.
Classes | |
| struct | MPL3115A2_data_t |
Macros | |
| #define | MPL3115A2_REG_WHO_AM_I 0x0c |
| #define | MPL3115A2_WHO_AM_I 0xC4 |
| #define | OUT_P_MSB 0x01 |
| #define | MPL3115A2_CTRL_REG1 0x26 |
| #define | CTRL_REG1_ALT (1 << 7) |
| #define | CTRL_REG1_RAW (1 << 6) |
| #define | CTRL_REG1_OS_SHIFTS (3) |
| #define | CTRL_REG1_OS_MASK (0x7 << CTRL_REG1_OS_SHIFTS) |
| #define | CTRL_REG1_OS(n) (((n)& 0x7) << CTRL_REG1_OS_SHIFTS) |
| #define | CTRL_REG1_RST (1 << 2) |
| #define | CTRL_REG1_OST (1 << 1) |
| #define | CTRL_REG1_SBYB (1 << 0) |
| #define | IOCTL_RESET 1 |
| #define | IOCTL_MEASURE 2 |
Typedefs | |
| typedef begin_packed_struct struct MPL3115A2_data_t | MPL3115A2_data_t |
| typedef device::Device *(* | MPL3115A2_constructor) (uint8_t busnum) |
Functions | |
| device::Device * | MPL3115A2_i2c_interface (uint8_t busnum) |
| device::Device * | MPL3115A2_sim_interface (uint8_t busnum) |
Shared defines for the mpl3115a2 driver.
Definition in file mpl3115a2.h.
| #define CTRL_REG1_ALT (1 << 7) |
Definition at line 82 of file mpl3115a2.h.
| #define CTRL_REG1_OS | ( | n | ) | (((n)& 0x7) << CTRL_REG1_OS_SHIFTS) |
Definition at line 86 of file mpl3115a2.h.
| #define CTRL_REG1_OS_MASK (0x7 << CTRL_REG1_OS_SHIFTS) |
Definition at line 85 of file mpl3115a2.h.
| #define CTRL_REG1_OS_SHIFTS (3) |
Definition at line 84 of file mpl3115a2.h.
| #define CTRL_REG1_OST (1 << 1) |
Definition at line 88 of file mpl3115a2.h.
Referenced by MPL3115A2::collect().
| #define CTRL_REG1_RAW (1 << 6) |
Definition at line 83 of file mpl3115a2.h.
| #define CTRL_REG1_RST (1 << 2) |
Definition at line 87 of file mpl3115a2.h.
Referenced by MPL3115A2_I2C::reset().
| #define CTRL_REG1_SBYB (1 << 0) |
Definition at line 89 of file mpl3115a2.h.
| #define IOCTL_MEASURE 2 |
Definition at line 93 of file mpl3115a2.h.
Referenced by MPL3115A2_I2C::ioctl(), MS5611_I2C::ioctl(), MPL3115A2::measure(), and MS5611::measure().
| #define IOCTL_RESET 1 |
Definition at line 92 of file mpl3115a2.h.
Referenced by MPL3115A2_I2C::ioctl(), MS5611_I2C::ioctl(), MPL3115A2::ioctl(), MPL3115A2::Run(), and MS5611::Run().
| #define MPL3115A2_CTRL_REG1 0x26 |
Definition at line 81 of file mpl3115a2.h.
Referenced by MPL3115A2::collect(), MPL3115A2::measure(), MPL3115A2_I2C::read(), and MPL3115A2_I2C::reset().
| #define MPL3115A2_REG_WHO_AM_I 0x0c |
Definition at line 76 of file mpl3115a2.h.
Referenced by MPL3115A2_I2C::probe().
| #define MPL3115A2_WHO_AM_I 0xC4 |
Definition at line 77 of file mpl3115a2.h.
Referenced by MPL3115A2_I2C::probe().
| #define OUT_P_MSB 0x01 |
Definition at line 79 of file mpl3115a2.h.
Referenced by MPL3115A2::collect(), and MPL3115A2_I2C::read().
| typedef device::Device*(* MPL3115A2_constructor) (uint8_t busnum) |
Definition at line 111 of file mpl3115a2.h.
| typedef begin_packed_struct struct MPL3115A2_data_t MPL3115A2_data_t |
| device::Device * MPL3115A2_i2c_interface | ( | uint8_t | busnum | ) |
Definition at line 75 of file mpl3115a2_i2c.cpp.
References MPL3115A2_I2C::MPL3115A2_I2C().
| device::Device* MPL3115A2_sim_interface | ( | uint8_t | busnum | ) |