mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 03:03:34 +08:00
[DO NOT MERGE] px4_i2c_device_external hacks
This commit is contained in:
@@ -108,7 +108,7 @@ protected:
|
||||
*/
|
||||
int transfer(const uint8_t *send, const unsigned send_len, uint8_t *recv, const unsigned recv_len);
|
||||
|
||||
bool external() const override { return px4_i2c_bus_external(_device_id.devid_s.bus); }
|
||||
bool external() const override { return px4_i2c_device_external(_device_id.devid); }
|
||||
|
||||
private:
|
||||
static unsigned int _bus_clocks[PX4_NUMBER_I2C_BUSES];
|
||||
|
||||
@@ -104,7 +104,7 @@ protected:
|
||||
*/
|
||||
int transfer(const uint8_t *send, const unsigned send_len, uint8_t *recv, const unsigned recv_len);
|
||||
|
||||
virtual bool external() const override { return px4_i2c_bus_external(_device_id.devid_s.bus); }
|
||||
virtual bool external() const override { return px4_i2c_device_external(_device_id.devid); }
|
||||
|
||||
private:
|
||||
int _fd{-1};
|
||||
|
||||
@@ -250,7 +250,7 @@ bool DeviceExternal(uint32_t device_id)
|
||||
switch (bus_type) {
|
||||
case device::Device::DeviceBusType_I2C:
|
||||
#if defined(CONFIG_I2C)
|
||||
external = px4_i2c_bus_external(id.devid_s.bus);
|
||||
external = px4_i2c_device_external(device_id);
|
||||
#endif // CONFIG_I2C
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user