PX4 Firmware
PX4 Autopilot Software http://px4.io
hmc5883_main.cpp File Reference
#include <px4_platform_common/getopt.h>
#include "HMC5883.hpp"
#include "hmc5883.h"
Include dependency graph for hmc5883_main.cpp:

Go to the source code of this file.

Classes

struct  hmc5883::hmc5883_bus_option
 

Namespaces

 hmc5883
 Local functions in support of the shell command.
 

Macros

#define NUM_BUS_OPTIONS   (sizeof(bus_options)/sizeof(bus_options[0]))
 

Enumerations

enum  HMC5883_BUS { HMC5883_BUS_ALL = 0, HMC5883_BUS_I2C_INTERNAL, HMC5883_BUS_I2C_EXTERNAL, HMC5883_BUS_SPI }
 

Functions

__EXPORT int hmc5883_main (int argc, char *argv[])
 
static bool hmc5883::start_bus (struct hmc5883_bus_option &bus, enum Rotation rotation)
 start driver for a specific bus option More...
 
static int hmc5883::start (enum HMC5883_BUS busid, enum Rotation rotation)
 Start the driver. More...
 
static int hmc5883::stop ()
 
static struct hmc5883_bus_option * hmc5883::find_bus (enum HMC5883_BUS busid)
 find a bus structure for a busid More...
 
static int hmc5883::calibrate (enum HMC5883_BUS busid)
 Automatic scale calibration. More...
 
static int hmc5883::temp_enable (enum HMC5883_BUS busid, bool enable)
 enable/disable temperature compensation More...
 
static int hmc5883::info (enum HMC5883_BUS busid)
 Print a little info about the driver. More...
 
static int hmc5883::usage ()
 

Variables

struct hmc5883::hmc5883_bus_option hmc5883::bus_options []
 

Macro Definition Documentation

◆ NUM_BUS_OPTIONS

#define NUM_BUS_OPTIONS   (sizeof(bus_options)/sizeof(bus_options[0]))

Definition at line 87 of file hmc5883_main.cpp.

Referenced by hmc5883::find_bus(), hmc5883::start(), and hmc5883::stop().

Enumeration Type Documentation

◆ HMC5883_BUS

Enumerator
HMC5883_BUS_ALL 
HMC5883_BUS_I2C_INTERNAL 
HMC5883_BUS_I2C_EXTERNAL 
HMC5883_BUS_SPI 

Definition at line 50 of file hmc5883_main.cpp.

Function Documentation

◆ hmc5883_main()

int hmc5883_main ( int  argc,
char *  argv[] 
)

Definition at line 334 of file hmc5883_main.cpp.

References hmc5883::hmc5883_bus_option::busid, hmc5883::calibrate(), HMC5883_BUS_ALL, HMC5883_BUS_I2C_EXTERNAL, HMC5883_BUS_I2C_INTERNAL, HMC5883_BUS_SPI, hmc5883::info(), ROTATION_NONE, hmc5883::start(), hmc5883::stop(), hmc5883::temp_enable(), and hmc5883::usage().

Here is the call graph for this function: