31 , _dev(
std::move(dev)) {}
80 bool ret =
_dev->
read((uint8_t *) &val,
sizeof(val));
virtual Device::PeriodicHandle register_periodic_callback(uint32_t period_usec, Device::PeriodicCb) override=0
bool get_reading(uint16_t &reading_cm)
AP_RangeFinder_LightWareI2C(RangeFinder::RangeFinder_State &_state, AP_HAL::OwnPtr< AP_HAL::I2CDevice > dev)
virtual Semaphore * get_semaphore() override=0
#define HAL_SEMAPHORE_BLOCK_FOREVER
virtual bool take(uint32_t timeout_ms) WARN_IF_UNUSED=0
static uint16_t be16toh(be16_t value)
static AP_HAL::OwnPtr< AP_HAL::Device > dev
AP_HAL::OwnPtr< AP_HAL::I2CDevice > _dev
const AP_HAL::HAL & hal
-*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
static AP_RangeFinder_Backend * detect(RangeFinder::RangeFinder_State &_state, AP_HAL::OwnPtr< AP_HAL::I2CDevice > dev)
#define FUNCTOR_BIND_MEMBER(func, rettype,...)
bool read(uint8_t *recv, uint32_t recv_len)
void set_status(RangeFinder::RangeFinder_Status status)
RangeFinder::RangeFinder_State & state
uint16_t __ap_bitwise be16_t