PX4 Firmware
PX4 Autopilot Software http://px4.io
|
Local functions in support of the shell command. More...
Functions | |
int | reset () |
Reset the driver. More... | |
int | set_address (const uint8_t address=MB12XX_BASE_ADDR) |
int | start () |
Attempt to start driver on all available I2C busses. More... | |
int | start_bus (const int i2c_bus) |
Start the driver on a specific bus. More... | |
int | status () |
Print the driver status. More... | |
int | stop () |
Stop the driver. More... | |
int | test () |
Perform some basic functional tests on the driver; make sure we can collect data from the sensor in polled and automatic modes. More... | |
int | usage () |
Print information about the driver usage. More... | |
Variables | |
MB12XX * | g_dev |
Local functions in support of the shell command.
int mb12xx::reset | ( | ) |
Reset the driver.
Definition at line 435 of file mb12xx.cpp.
References MB12XX::start(), and MB12XX::stop().
Referenced by mb12xx_main(), and set_address().
int mb12xx::set_address | ( | const uint8_t | address = MB12XX_BASE_ADDR | ) |
Definition at line 444 of file mb12xx.cpp.
References reset(), and MB12XX::set_address().
Referenced by mb12xx_main().
int mb12xx::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 465 of file mb12xx.cpp.
References i2c_bus_options, NUM_I2C_BUS_OPTIONS, and start_bus().
Referenced by mb12xx_main().
int mb12xx::start_bus | ( | const int | i2c_bus | ) |
Start the driver on a specific bus.
This function only returns if the sensor is up and running or could not be detected successfully.
Definition at line 488 of file mb12xx.cpp.
References g_dev, MB12XX::init(), MB12XX::MB12XX(), and MB12XX::start().
Referenced by mb12xx_main(), and start().
int mb12xx::status | ( | ) |
Print the driver status.
Definition at line 521 of file mb12xx.cpp.
References MB12XX::print_info().
Referenced by mb12xx_main().
int mb12xx::stop | ( | ) |
Stop the driver.
Stop the driver.
Definition at line 537 of file mb12xx.cpp.
References g_dev.
Referenced by mb12xx_main().
int mb12xx::test | ( | ) |
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 554 of file mb12xx.cpp.
Referenced by mb12xx_main().
int mb12xx::usage | ( | void | ) |
Print information about the driver usage.
Prints info about the driver argument usage.
Definition at line 582 of file mb12xx.cpp.
References MB12XX_BUS_DEFAULT.
Referenced by mb12xx_main().
MB12XX* mb12xx::g_dev |
Definition at line 420 of file mb12xx.cpp.
Referenced by start_bus(), and stop().