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

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

Classes

struct  mpu6000_bus_option
 

Functions

void start (enum MPU6000_BUS busid, enum Rotation rotation, int device_type)
 Start the driver. More...
 
bool start_bus (struct mpu6000_bus_option &bus, enum Rotation rotation, int device_type)
 start driver for a specific bus option More...
 
void stop (enum MPU6000_BUS busid)
 
static struct mpu6000_bus_optionfind_bus (enum MPU6000_BUS busid)
 find a bus structure for a busid More...
 
void reset (enum MPU6000_BUS busid)
 Reset the driver. More...
 
void info (enum MPU6000_BUS busid)
 Print a little info about the driver. More...
 
void regdump (enum MPU6000_BUS busid)
 Dump the register information. More...
 
void testerror (enum MPU6000_BUS busid)
 deliberately produce an error to test recovery More...
 
void factorytest (enum MPU6000_BUS busid)
 Dump the register information. More...
 
void usage ()
 Prints info about the driver argument usage. More...
 

Variables

struct mpu6000::mpu6000_bus_option bus_options []
 

Detailed Description

Local functions in support of the shell command.

Function Documentation

◆ factorytest()

void mpu6000::factorytest ( enum MPU6000_BUS  busid)

Dump the register information.

Definition at line 302 of file mpu6000_main.cpp.

References mpu6000::mpu6000_bus_option::dev, errx, MPU6000::factory_self_test(), and find_bus().

Referenced by mpu6000_main().

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

◆ find_bus()

struct mpu6000_bus_option & mpu6000::find_bus ( enum MPU6000_BUS  busid)
static

find a bus structure for a busid

Definition at line 114 of file mpu6000_main.cpp.

References bus_options, mpu6000::mpu6000_bus_option::dev, errx, MPU6000_BUS_ALL, and NUM_BUS_OPTIONS.

Referenced by factorytest(), info(), regdump(), reset(), stop(), and testerror().

Here is the caller graph for this function:

◆ info()

void mpu6000::info ( enum MPU6000_BUS  busid)

Print a little info about the driver.

Definition at line 248 of file mpu6000_main.cpp.

References mpu6000::mpu6000_bus_option::dev, errx, find_bus(), and MPU6000::print_info().

Referenced by mpu6000_main().

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

◆ regdump()

void mpu6000::regdump ( enum MPU6000_BUS  busid)

Dump the register information.

Definition at line 265 of file mpu6000_main.cpp.

References mpu6000::mpu6000_bus_option::dev, errx, find_bus(), and MPU6000::print_registers().

Referenced by mpu6000_main().

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

◆ reset()

void mpu6000::reset ( enum MPU6000_BUS  busid)

Reset the driver.

Definition at line 231 of file mpu6000_main.cpp.

References mpu6000::mpu6000_bus_option::dev, errx, find_bus(), and MPU6000::reset().

Referenced by mpu6000_main().

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

◆ start()

void mpu6000::start ( enum MPU6000_BUS  busid,
enum Rotation  rotation,
int  device_type 
)

Start the driver.

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

Definition at line 184 of file mpu6000_main.cpp.

References bus_options, mpu6000::mpu6000_bus_option::dev, MPU6000_BUS_ALL, NUM_BUS_OPTIONS, and start_bus().

Referenced by mpu6000_main().

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

◆ start_bus()

bool mpu6000::start_bus ( struct mpu6000_bus_option bus,
enum Rotation  rotation,
int  device_type 
)

start driver for a specific bus option

Definition at line 130 of file mpu6000_main.cpp.

References mpu6000::mpu6000_bus_option::dev, mpu6000::mpu6000_bus_option::external, OK, and warnx.

Referenced by start().

Here is the caller graph for this function:

◆ stop()

void mpu6000::stop ( enum MPU6000_BUS  busid)

Definition at line 211 of file mpu6000_main.cpp.

References mpu6000::mpu6000_bus_option::dev, find_bus(), and warnx.

Referenced by mpu6000_main().

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

◆ testerror()

void mpu6000::testerror ( enum MPU6000_BUS  busid)

deliberately produce an error to test recovery

Definition at line 283 of file mpu6000_main.cpp.

References mpu6000::mpu6000_bus_option::dev, errx, find_bus(), and MPU6000::test_error().

Referenced by mpu6000_main().

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

◆ usage()

void mpu6000::usage ( void  )

Prints info about the driver argument usage.

Prints info about the driver argument usage.

Definition at line 318 of file mpu6000_main.cpp.

References mpu6000_main(), and warnx.

Referenced by mpu6000_main().

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

Variable Documentation

◆ bus_options

struct mpu6000::mpu6000_bus_option mpu6000::bus_options[]

Referenced by find_bus(), and start().