Browse Source

AP_InertialSensor: dummy implementation of register_periodic_callback()

for AuxiliaryBus
mission-4.1.18
Andrew Tridgell 8 years ago
parent
commit
90dc9e3327
  1. 9
      libraries/AP_InertialSensor/AuxiliaryBus.cpp
  2. 4
      libraries/AP_InertialSensor/AuxiliaryBus.h

9
libraries/AP_InertialSensor/AuxiliaryBus.cpp

@ -99,3 +99,12 @@ int AuxiliaryBus::register_periodic_read(AuxiliaryBusSlave *slave, uint8_t reg, @@ -99,3 +99,12 @@ int AuxiliaryBus::register_periodic_read(AuxiliaryBusSlave *slave, uint8_t reg,
return 0;
}
/*
add a periodic callback. This is added to a list which the backend needs to then process
*/
AP_HAL::Device::PeriodicHandle AuxiliaryBus::register_periodic_callback(uint32_t period_usec, AP_HAL::Device::PeriodicCb cb)
{
// not implemented yet
return nullptr;
}

4
libraries/AP_InertialSensor/AuxiliaryBus.h

@ -18,6 +18,7 @@ @@ -18,6 +18,7 @@
#pragma once
#include <inttypes.h>
#include <AP_HAL/Device.h>
class AuxiliaryBus;
class AP_InertialSensor_Backend;
@ -101,6 +102,9 @@ public: @@ -101,6 +102,9 @@ public:
AuxiliaryBusSlave *request_next_slave(uint8_t addr);
int register_periodic_read(AuxiliaryBusSlave *slave, uint8_t reg, uint8_t size);
/* See AP_HAL::Device::register_periodic_callback() */
AP_HAL::Device::PeriodicHandle register_periodic_callback(uint32_t, AP_HAL::Device::PeriodicCb);
/*
* Get the semaphore needed to call methods on the bus this sensor is on.
* Internally no locks are taken and it's the caller's duty to lock and

Loading…
Cancel
Save