43 #include "../CDev.hpp" 45 #include <px4_platform_common/i2c.h> 48 #include <linux/i2c.h> 49 #include <linux/i2c-dev.h> 64 I2C(
const I2C &) =
delete;
65 I2C &operator=(
const I2C &) =
delete;
67 I2C &operator=(I2C &&) =
delete;
69 virtual int init()
override;
87 I2C(
const char *
name,
const char *devname,
const int bus,
const uint16_t address,
const uint32_t frequency);
93 virtual int probe() {
return PX4_OK; }
107 int transfer(
const uint8_t *
send,
const unsigned send_len, uint8_t *recv,
const unsigned recv_len);
109 virtual bool external()
const override {
return px4_i2c_bus_external(_device_id.devid_s.bus); }
virtual bool external() const override
Namespace encapsulating all device framework classes, functions and data.
virtual int probe()
Check for the presence of the device on the bus.
void init()
Activates/configures the hardware registers.