PX4 Firmware
PX4 Autopilot Software http://px4.io
icm20948_main.cpp File Reference
#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/getopt.h>
#include <lib/perf/perf_counter.h>
#include <lib/systemlib/conversions.h>
#include <board_config.h>
#include <drivers/drv_hrt.h>
#include <drivers/device/spi.h>
#include <lib/conversion/rotation.h>
#include "icm20948.h"
Include dependency graph for icm20948_main.cpp:

Go to the source code of this file.

Classes

struct  icm20948::icm20948_bus_option
 

Namespaces

 icm20948
 Local functions in support of the shell command.
 

Macros

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

Enumerations

enum  ICM20948_BUS {
  ICM20948_BUS_ALL = 0, ICM20948_BUS_I2C_INTERNAL, ICM20948_BUS_I2C_EXTERNAL, ICM20948_BUS_SPI_INTERNAL,
  ICM20948_BUS_SPI_EXTERNAL
}
 

Functions

__EXPORT int icm20948_main (int argc, char *argv[])
 driver 'main' command More...
 
bool icm20948::start_bus (icm20948_bus_option &bus, enum Rotation rotation)
 start driver for a specific bus option More...
 
icm20948_bus_option * icm20948::find_bus (enum ICM20948_BUS busid)
 find a bus structure for a busid More...
 
int icm20948::start (enum ICM20948_BUS busid, enum Rotation rotation)
 Start the driver. More...
 
int icm20948::stop (enum ICM20948_BUS busid)
 
int icm20948::info (enum ICM20948_BUS busid)
 Print a little info about the driver. More...
 
int icm20948::usage ()
 Prints info about the driver argument usage. More...
 

Variables

struct icm20948::icm20948_bus_option icm20948::bus_options []
 

Macro Definition Documentation

◆ NUM_BUS_OPTIONS

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

Definition at line 91 of file icm20948_main.cpp.

Referenced by icm20948::find_bus(), and icm20948::start().

Enumeration Type Documentation

◆ ICM20948_BUS

Enumerator
ICM20948_BUS_ALL 
ICM20948_BUS_I2C_INTERNAL 
ICM20948_BUS_I2C_EXTERNAL 
ICM20948_BUS_SPI_INTERNAL 
ICM20948_BUS_SPI_EXTERNAL 

Definition at line 56 of file icm20948_main.cpp.

Function Documentation

◆ icm20948_main()

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

driver 'main' command

Definition at line 269 of file icm20948_main.cpp.

References icm20948::icm20948_bus_option::busid, ICM20948_BUS_ALL, ICM20948_BUS_I2C_EXTERNAL, icm20948::info(), ROTATION_NONE, icm20948::start(), icm20948::stop(), and icm20948::usage().

Here is the call graph for this function: