42 #define LPS25H_ADDRESS 0x5D 52 virtual int read(
unsigned address,
void *
data,
unsigned count);
53 virtual int write(
unsigned address,
void *data,
unsigned count);
55 virtual int ioctl(
unsigned operation,
unsigned &arg);
81 return CDev::ioctl(
nullptr, operation, arg);
117 if (
sizeof(buf) < (count + 1)) {
122 memcpy(&buf[1], data, count);
124 return transfer(&buf[0], count + 1,
nullptr, 0);
130 uint8_t cmd = address;
131 return transfer(&cmd, 1, (uint8_t *)data, count);
Shared defines for the lps25h driver.
device::Device * LPS25H_I2C_interface(int bus)
virtual int write(unsigned address, void *data, unsigned count)
virtual int read(unsigned address, void *data, unsigned count)
virtual int ioctl(unsigned operation, unsigned &arg)
virtual ~LPS25H_I2C()=default
Fundamental base class for all physical drivers (I2C, SPI).
#define DEVICE_DEBUG(FMT,...)