AP_InertialSensor: dummy implementation of register_periodic_callback()

for AuxiliaryBus
This commit is contained in:
Andrew Tridgell 2016-11-01 12:21:07 +11:00
parent 96adfccae3
commit 90dc9e3327
2 changed files with 13 additions and 0 deletions

View File

@ -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;
}

View File

@ -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:
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