PX4 Firmware
PX4 Autopilot Software http://px4.io
|
Local functions in support of the shell command. More...
Classes | |
struct | qmc5883_bus_option |
Functions | |
void | start (enum QMC5883_BUS busid, enum Rotation rotation) |
Start the driver. More... | |
int | stop () |
Stop the driver. More... | |
bool | start_bus (struct qmc5883_bus_option &bus, enum Rotation rotation) |
start driver for a specific bus option More... | |
struct qmc5883_bus_option & | find_bus (enum QMC5883_BUS busid) |
find a bus structure for a busid More... | |
void | test (enum QMC5883_BUS busid) |
Perform some basic functional tests on the driver; make sure we can collect data from the sensor in polled and automatic modes. More... | |
void | reset (enum QMC5883_BUS busid) |
Reset the driver. More... | |
int | info (enum QMC5883_BUS busid) |
Print a little info about the driver. More... | |
int | temp_enable (QMC5883_BUS busid, bool enable) |
void | usage () |
Prints info about the driver argument usage. More... | |
Variables | |
struct qmc5883::qmc5883_bus_option | bus_options [] |
Local functions in support of the shell command.
struct qmc5883_bus_option & qmc5883::find_bus | ( | enum QMC5883_BUS | busid | ) |
find a bus structure for a busid
Definition at line 934 of file qmc5883.cpp.
References bus_options, errx, NUM_BUS_OPTIONS, and QMC5883_BUS_ALL.
Referenced by info(), reset(), and test().
int qmc5883::info | ( | enum QMC5883_BUS | busid | ) |
Print a little info about the driver.
Definition at line 1041 of file qmc5883.cpp.
References qmc5883::qmc5883_bus_option::busid, qmc5883::qmc5883_bus_option::dev, qmc5883::qmc5883_bus_option::devpath, find_bus(), QMC5883::print_info(), and warnx.
Referenced by qmc5883_main().
void qmc5883::reset | ( | enum QMC5883_BUS | busid | ) |
Reset the driver.
Definition at line 1014 of file qmc5883.cpp.
References qmc5883::qmc5883_bus_option::devpath, err, fd, find_bus(), QMC5883::ioctl(), cdev::CDev::open(), SENSOR_POLLRATE_DEFAULT, SENSORIOCRESET, and SENSORIOCSPOLLRATE.
Referenced by qmc5883_main().
void qmc5883::start | ( | enum QMC5883_BUS | busid, |
enum Rotation | rotation | ||
) |
Start the driver.
This function call only returns once the driver is either successfully up and running or failed to start.
Definition at line 891 of file qmc5883.cpp.
References bus_options, NUM_BUS_OPTIONS, QMC5883_BUS_ALL, and start_bus().
Referenced by qmc5883_main().
bool qmc5883::start_bus | ( | struct qmc5883_bus_option & | bus, |
enum Rotation | rotation | ||
) |
start driver for a specific bus option
Definition at line 846 of file qmc5883.cpp.
References cdev::CDev::close(), qmc5883::qmc5883_bus_option::dev, errx, fd, QMC5883::ioctl(), OK, cdev::CDev::open(), QMC5883::QMC5883(), SENSOR_POLLRATE_DEFAULT, SENSORIOCSPOLLRATE, and warnx.
Referenced by start().
int qmc5883::stop | ( | ) |
Stop the driver.
Stop the driver.
Definition at line 915 of file qmc5883.cpp.
References bus_options, qmc5883::qmc5883_bus_option::dev, NUM_BUS_OPTIONS, and QMC5883::stop().
Referenced by qmc5883_main().
int qmc5883::temp_enable | ( | QMC5883_BUS | busid, |
bool | enable | ||
) |
void qmc5883::test | ( | enum QMC5883_BUS | busid | ) |
Perform some basic functional tests on the driver; make sure we can collect data from the sensor in polled and automatic modes.
Definition at line 953 of file qmc5883.cpp.
References qmc5883::qmc5883_bus_option::devpath, err, errx, fd, find_bus(), QMC5883::ioctl(), mag_report, MAGIOCGEXTERNAL, cdev::CDev::open(), cdev::CDev::poll(), QMC5883::read(), and warnx.
Referenced by qmc5883_main().
void qmc5883::usage | ( | void | ) |
Prints info about the driver argument usage.
Prints info about the driver argument usage.
Definition at line 1051 of file qmc5883.cpp.
References warnx.
Referenced by qmc5883_main().
struct qmc5883::qmc5883_bus_option qmc5883::bus_options[] |
Referenced by find_bus(), start(), and stop().