mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 10:26:52 +08:00
fxos8701cq + fxas21002c: add support for I2C
This commit is contained in:
@@ -114,6 +114,23 @@ public:
|
||||
*/
|
||||
virtual int write(unsigned address, void *data, unsigned count) { return -ENODEV; }
|
||||
|
||||
/**
|
||||
* Read a register from the device.
|
||||
*
|
||||
* @param The register to read.
|
||||
* @return The value that was read.
|
||||
*/
|
||||
virtual uint8_t read_reg(unsigned reg) { return -ENODEV; }
|
||||
|
||||
/**
|
||||
* Write a register in the device.
|
||||
*
|
||||
* @param reg The register to write.
|
||||
* @param value The new value to write.
|
||||
* @return OK on success, negative errno otherwise.
|
||||
*/
|
||||
virtual int write_reg(unsigned reg, uint8_t value) { return -ENODEV; }
|
||||
|
||||
/**
|
||||
* Perform a device-specific operation.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user