PX4 Firmware
PX4 Autopilot Software http://px4.io
mpl3115a2 Namespace Reference

Local functions in support of the shell command. More...

Classes

struct  mpl3115a2_bus_option
 

Functions

bool start_bus (struct mpl3115a2_bus_option &bus)
 Start the driver. More...
 
struct mpl3115a2_bus_optionfind_bus (enum MPL3115A2_BUS busid)
 find a bus structure for a busid More...
 
void start (enum MPL3115A2_BUS busid)
 Start the driver. More...
 
void test (enum MPL3115A2_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 MPL3115A2_BUS busid)
 Reset the driver. More...
 
void info ()
 Print a little info about the driver. More...
 
void usage ()
 Prints info about the driver argument usage. More...
 

Variables

struct mpl3115a2::mpl3115a2_bus_option bus_options []
 

Detailed Description

Local functions in support of the shell command.

Function Documentation

◆ find_bus()

struct mpl3115a2_bus_option & mpl3115a2::find_bus ( enum MPL3115A2_BUS  busid)

find a bus structure for a busid

Definition at line 702 of file mpl3115a2.cpp.

References bus_options, errx, MPL3115A2_BUS_ALL, and NUM_BUS_OPTIONS.

Referenced by reset(), and test().

Here is the caller graph for this function:

◆ info()

void mpl3115a2::info ( )

Print a little info about the driver.

Definition at line 801 of file mpl3115a2.cpp.

References bus_options, mpl3115a2::mpl3115a2_bus_option::dev, mpl3115a2::mpl3115a2_bus_option::devpath, NUM_BUS_OPTIONS, MPL3115A2::print_info(), and warnx.

Referenced by mpl3115a2_main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset()

void mpl3115a2::reset ( enum MPL3115A2_BUS  busid)

Reset the driver.

Definition at line 775 of file mpl3115a2.cpp.

References mpl3115a2::mpl3115a2_bus_option::devpath, err, fd, find_bus(), MPL3115A2::ioctl(), cdev::CDev::open(), SENSOR_POLLRATE_DEFAULT, SENSORIOCRESET, and SENSORIOCSPOLLRATE.

Referenced by mpl3115a2_main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ start()

void mpl3115a2::start ( enum MPL3115A2_BUS  busid)

Start the driver.

This function call only returns once the driver is either successfully up and running or failed to start.

Definition at line 671 of file mpl3115a2.cpp.

References bus_options, MPL3115A2_BUS_ALL, NUM_BUS_OPTIONS, and start_bus().

Referenced by mpl3115a2_main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ start_bus()

bool mpl3115a2::start_bus ( struct mpl3115a2_bus_option bus)

Start the driver.

Definition at line 625 of file mpl3115a2.cpp.

References cdev::CDev::close(), mpl3115a2::mpl3115a2_bus_option::dev, errx, fd, MPL3115A2::ioctl(), MPL3115A2::MPL3115A2(), OK, cdev::CDev::open(), SENSOR_POLLRATE_DEFAULT, SENSORIOCSPOLLRATE, and warnx.

Referenced by start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test()

void mpl3115a2::test ( enum MPL3115A2_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 720 of file mpl3115a2.cpp.

References cdev::CDev::close(), mpl3115a2::mpl3115a2_bus_option::devpath, err, errx, fd, find_bus(), cdev::CDev::open(), cdev::CDev::poll(), and MPL3115A2::read().

Referenced by mpl3115a2_main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ usage()

void mpl3115a2::usage ( void  )

Prints info about the driver argument usage.

Definition at line 816 of file mpl3115a2.cpp.

References warnx.

Referenced by mpl3115a2_main().

Here is the caller graph for this function:

Variable Documentation

◆ bus_options

struct mpl3115a2::mpl3115a2_bus_option mpl3115a2::bus_options[]
Initial value:
= {
}

Referenced by find_bus(), info(), and start().