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

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

Classes

struct  lps22hb_bus_option
 

Functions

int start (enum LPS22HB_BUS busid)
 Start the driver. More...
 
bool start_bus (struct lps22hb_bus_option &bus)
 start driver for a specific bus option More...
 
struct lps22hb_bus_optionfind_bus (enum LPS22HB_BUS busid)
 find a bus structure for a busid More...
 
int reset (enum LPS22HB_BUS busid)
 Reset the driver. More...
 
int info ()
 Print a little info about the driver. More...
 
void usage ()
 Prints info about the driver argument usage. More...
 

Variables

struct lps22hb::lps22hb_bus_option bus_options []
 

Detailed Description

Local functions in support of the shell command.

Function Documentation

◆ find_bus()

struct lps22hb_bus_option & lps22hb::find_bus ( enum LPS22HB_BUS  busid)

find a bus structure for a busid

Definition at line 166 of file lps22hb_main.cpp.

References bus_options, lps22hb::lps22hb_bus_option::dev, errx, LPS22HB_BUS_ALL, and NUM_BUS_OPTIONS.

Referenced by reset().

Here is the caller graph for this function:

◆ info()

int lps22hb::info ( )

Print a little info about the driver.

Definition at line 211 of file lps22hb_main.cpp.

Referenced by hardfault_dowrite(), lps22hb_main(), and Commander::run().

Here is the caller graph for this function:

◆ reset()

int lps22hb::reset ( enum LPS22HB_BUS  busid)

Reset the driver.

Definition at line 182 of file lps22hb_main.cpp.

References lps22hb::lps22hb_bus_option::devpath, fd, find_bus(), px4_ioctl(), SENSOR_POLLRATE_DEFAULT, SENSORIOCRESET, and SENSORIOCSPOLLRATE.

Referenced by runwaytakeoff::RunwayTakeoff::climbout(), Integrator::get_and_filtered(), math::LowPassFilter2p::get_cutoff_freq(), lps22hb_main(), uORB::DeviceNode::mark_as_advertised(), uavcan_stm32::CanIface::RxQueue::RxQueue(), and uavcan_kinetis::CanIface::RxQueue::RxQueue().

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

◆ start()

int lps22hb::start ( enum LPS22HB_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 138 of file lps22hb_main.cpp.

References bus_options, lps22hb::lps22hb_bus_option::dev, LPS22HB_BUS_ALL, NUM_BUS_OPTIONS, and start_bus().

Referenced by lps22hb_main().

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

◆ start_bus()

bool lps22hb::start_bus ( struct lps22hb_bus_option bus)

start driver for a specific bus option

Definition at line 85 of file lps22hb_main.cpp.

References lps22hb::lps22hb_bus_option::dev, lps22hb::lps22hb_bus_option::devpath, fd, OK, px4_close(), px4_ioctl(), px4_open(), SENSOR_POLLRATE_DEFAULT, and SENSORIOCSPOLLRATE.

Referenced by start().

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

◆ usage()

void lps22hb::usage ( void  )

Prints info about the driver argument usage.

Definition at line 226 of file lps22hb_main.cpp.

Referenced by lps22hb_main().

Here is the caller graph for this function:

Variable Documentation

◆ bus_options

struct lps22hb::lps22hb_bus_option lps22hb::bus_options[]
Initial value:
= {
{ LPS22HB_BUS_I2C_EXTERNAL, "/dev/lps22hb_ext", &LPS22HB_I2C_interface, PX4_I2C_BUS_EXPANSION, NULL },
}
device::Device * LPS22HB_I2C_interface(int bus)
Definition: LPS22HB_I2C.cpp:61

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