mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-29 20:53:33 +08:00
feat(voxl2): Added i2cdetect system command to voxl2-slpi build. Needed to implement the required i2c API for it.
Also, changed the printf into PX4_INFO so the output can be seen for Qurt platforms.
This commit is contained in:
committed by
Eric Katzfey
parent
c0633d89ff
commit
4917b17116
@@ -31,4 +31,33 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
// Placeholder
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <board_config.h>
|
||||
|
||||
#if defined(CONFIG_I2C)
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
struct i2c_master_s;
|
||||
|
||||
struct i2c_msg_s {
|
||||
uint32_t frequency;
|
||||
uint16_t addr;
|
||||
uint16_t flags;
|
||||
uint8_t *buffer;
|
||||
int length;
|
||||
};
|
||||
|
||||
#define I2C_M_READ 0x0001
|
||||
|
||||
#define I2C_TRANSFER(dev, msgs, count) px4_qurt_i2c_transfer(dev, msgs, count)
|
||||
|
||||
struct i2c_master_s *px4_i2cbus_initialize(int bus);
|
||||
int px4_i2cbus_uninitialize(struct i2c_master_s *dev);
|
||||
int px4_qurt_i2c_transfer(struct i2c_master_s *dev, struct i2c_msg_s *msgs, unsigned count);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* CONFIG_I2C */
|
||||
|
||||
Reference in New Issue
Block a user