board support add px4_i2c_bus_external/px4_spi_bus_external

This commit is contained in:
Daniel Agar
2017-11-20 23:44:31 +01:00
committed by Lorenz Meier
parent 2aeb4aa55f
commit 53595bac0e
54 changed files with 232 additions and 312 deletions
+1 -8
View File
@@ -174,13 +174,6 @@ protected:
*/
void cycle();
/**
* Get the internal / external state
*
* @return true if the sensor is not on the main MCU board
*/
bool is_external() { return (_orb_class_instance == 0); /* XXX put this into the interface class */ }
/**
* Static trampoline from the workq context; because we don't have a
* generic workq wrapper yet.
@@ -324,7 +317,7 @@ MPL3115A2::init()
ret = OK;
_baro_topic = orb_advertise_multi(ORB_ID(sensor_baro), &brp,
&_orb_class_instance, (is_external()) ? ORB_PRIO_HIGH : ORB_PRIO_DEFAULT);
&_orb_class_instance, (external()) ? ORB_PRIO_HIGH : ORB_PRIO_DEFAULT);
if (_baro_topic == nullptr) {
warnx("failed to create sensor_baro publication");
+1 -1
View File
@@ -107,7 +107,7 @@ int
MPL3115A2_I2C::init()
{
/* this will call probe() */
set_address(MPL3115A2_ADDRESS);
set_device_address(MPL3115A2_ADDRESS);
return I2C::init();
}