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

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

Functions

int start ()
 Attempt to start driver on all available I2C busses. More...
 
int start_bus (int i2c_bus, int address)
 Start the driver on a specific bus. More...
 
int stop ()
 Stop the driver. More...
 
int reset ()
 Reset the driver. More...
 

Variables

MEASAirspeedg_dev = nullptr
 

Detailed Description

Local functions in support of the shell command.

Function Documentation

◆ reset()

int meas_airspeed::reset ( )

Reset the driver.

Definition at line 449 of file ms4525_airspeed.cpp.

References fd, PATH_MS4525, px4_ioctl(), px4_open(), SENSOR_POLLRATE_DEFAULT, SENSORIOCRESET, and SENSORIOCSPOLLRATE.

Referenced by ms4525_airspeed_main().

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

◆ start()

int meas_airspeed::start ( )

Attempt to start driver on all available I2C busses.

This function will return as soon as the first sensor is detected on one of the available busses or if no sensors are detected.

Definition at line 364 of file ms4525_airspeed.cpp.

References I2C_ADDRESS_MS4525DO, i2c_bus_options, NUM_I2C_BUS_OPTIONS, and start_bus().

Referenced by ms4525_airspeed_main().

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

◆ start_bus()

int meas_airspeed::start_bus ( int  i2c_bus,
int  address 
)

Start the driver on a specific bus.

This function call only returns once the driver is up and running or failed to detect the sensor.

Definition at line 383 of file ms4525_airspeed.cpp.

References fd, g_dev, Airspeed::init(), MEASAirspeed::MEASAirspeed(), OK, PATH_MS4525, px4_ioctl(), px4_open(), SENSOR_POLLRATE_DEFAULT, and SENSORIOCSPOLLRATE.

Referenced by ms4525_airspeed_main(), and start().

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

◆ stop()

int meas_airspeed::stop ( )

Stop the driver.

Definition at line 431 of file ms4525_airspeed.cpp.

References g_dev.

Referenced by ms4525_airspeed_main().

Here is the caller graph for this function:

Variable Documentation

◆ g_dev

MEASAirspeed* meas_airspeed::g_dev = nullptr

Definition at line 348 of file ms4525_airspeed.cpp.

Referenced by start_bus(), and stop().