PX4 Firmware
PX4 Autopilot Software http://px4.io
ina226 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)
 Start the driver on a specific bus. More...
 
int stop ()
 Stop the driver. More...
 
int info ()
 Print a little info about the driver. More...
 

Variables

INA226g_dev
 

Detailed Description

Local functions in support of the shell command.

Function Documentation

◆ info()

int ina226::info ( )

Print a little info about the driver.

Definition at line 596 of file ina226.cpp.

References INA226::print_info().

Referenced by ina226_main().

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

◆ start()

int ina226::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 521 of file ina226.cpp.

References i2c_bus_options, NUM_I2C_BUS_OPTIONS, and start_bus().

Referenced by ina226_main().

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

◆ start_bus()

int ina226::start_bus ( 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 544 of file ina226.cpp.

References g_dev, INA226::INA226(), INA226::init(), and OK.

Referenced by ina226_main(), and start().

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

◆ stop()

int ina226::stop ( )

Stop the driver.

Stop the driver.

Definition at line 578 of file ina226.cpp.

References g_dev.

Referenced by ina226_main().

Here is the caller graph for this function:

Variable Documentation

◆ g_dev

INA226* ina226::g_dev

Definition at line 504 of file ina226.cpp.

Referenced by start_bus(), and stop().