ardupilot/libraries/AP_InertialSensor
Lucas De Marchi caae933c28 AP_InertialSensor: Add support for auxiliary buses
Add an AuxiliaryBus class that can be derived for specific
implementations in inertial sensor backends. It's an abstract
implementation so other libraries can use the auxiliary bus exported. In
order for this to succeed the backend implementation must split the
initialization of the sensor from the actual sample collecting, like is
done in MPU6000.

When AP_InertialSensor::get_auxiliary_bus() is called it will execute
following steps:
	a) Force the backends to be detected if it's the first time it's
	   being called
	b) Find the backend identified by the id
	c) call get_auxiliary_bus() on the backend so other libraries can
	   that AuxiliaryBus to initialize a slave device

Slave devices can be used by calling AuxiliaryBus::request_next_slave()
and are owned by the caller until AuxiliaryBus::register_periodic_read()
is called. From that time on the AuxiliaryBus object takes its ownership.
This way it's possible to do the necessary cleanup later without
introducing refcounts, that we don't have support to.

Between these 2 functions the caller can configure the slave device by
doing its specific initializations by calling the passthrough_*
functions. After the initial configuration and register_periodic_read()
is called only read() can be called.
2015-08-28 12:39:08 +10:00
..
examples AP_InertialSensor: removed AVR1280 specific ifdef 2015-08-11 16:47:56 +10:00
AP_InertialSensor_Backend.cpp AP_InertialSensor: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
AP_InertialSensor_Backend.h AP_InertialSensor: Add support for auxiliary buses 2015-08-28 12:39:08 +10:00
AP_InertialSensor_Flymaple.cpp AP_InertialSensor: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
AP_InertialSensor_Flymaple.h AP_InertialSensor: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
AP_InertialSensor_HIL.cpp AP_InertialSensor: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
AP_InertialSensor_HIL.h AP_InertialSensor: moved default filter and sample_rate to frontend 2014-10-24 12:10:40 +11:00
AP_InertialSensor_L3G4200D.cpp AP_InertialSensor: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
AP_InertialSensor_L3G4200D.h AP_InertialSensor: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
AP_InertialSensor_LSM9DS0.cpp AP_HAL_InertialSensor: standardize inclusion of libaries headers 2015-08-18 17:12:52 +10:00
AP_InertialSensor_LSM9DS0.h AP_InertialSensor: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
AP_InertialSensor_MPU6000.cpp AP_InertialSensor: MPU6000: split detection and initialization 2015-08-28 12:39:08 +10:00
AP_InertialSensor_MPU6000.h AP_InertialSensor: MPU6000: split detection and initialization 2015-08-28 12:39:08 +10:00
AP_InertialSensor_MPU9150.cpp AP_InertialSensor: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
AP_InertialSensor_MPU9150.h AP_InertialSensor: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
AP_InertialSensor_MPU9250.cpp AP_InertialSensor: fix typos 2015-08-28 12:39:07 +10:00
AP_InertialSensor_MPU9250.h AP_InertialSensor: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
AP_InertialSensor_Oilpan.cpp AP_InertialSensor: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
AP_InertialSensor_Oilpan.h AP_InertialSensor: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
AP_InertialSensor_PX4.cpp AP_InertialSensor: setup for MPU9250 support on PX4 2015-08-17 09:33:15 +10:00
AP_InertialSensor_PX4.h AP_InertialSensor: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
AP_InertialSensor_UserInteract_MAVLink.cpp AP_InertialSensor: update severities 2015-08-28 10:04:35 +10:00
AP_InertialSensor_UserInteract_MAVLink.h AP_InertialSensor: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
AP_InertialSensor_UserInteract_Stream.cpp AP_InertialSensor: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
AP_InertialSensor_UserInteract_Stream.h AP_InertialSensor: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
AP_InertialSensor_UserInteract.h AP_InertialSensor: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
AP_InertialSensor.cpp AP_InertialSensor: Add support for auxiliary buses 2015-08-28 12:39:08 +10:00
AP_InertialSensor.h AP_InertialSensor: Add support for auxiliary buses 2015-08-28 12:39:08 +10:00
AuxiliaryBus.cpp AP_InertialSensor: Add support for auxiliary buses 2015-08-28 12:39:08 +10:00
AuxiliaryBus.h AP_InertialSensor: Add support for auxiliary buses 2015-08-28 12:39:08 +10:00