mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
sensors: add uorb support for lsm9ds1
This commit is contained in:
@@ -57,6 +57,14 @@
|
||||
|
||||
struct i2c_master_s;
|
||||
|
||||
struct lsm9ds1_config_s
|
||||
{
|
||||
FAR struct i2c_master_s *i2c;
|
||||
int addr_acc;
|
||||
int addr_gyro;
|
||||
int addr_mag;
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
@@ -66,6 +74,8 @@ extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_SENSORS_LSM9DS1_UORB
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lsm9ds1accel_register
|
||||
*
|
||||
@@ -126,6 +136,26 @@ int lsm9ds1mag_register(FAR const char *devpath,
|
||||
FAR struct i2c_master_s *i2c,
|
||||
uint8_t addr);
|
||||
|
||||
#else
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lsm9ds1_register_uorb
|
||||
*
|
||||
* Description:
|
||||
* Register the LSM9DS1 IMU as sensor device
|
||||
*
|
||||
* Input Parameters:
|
||||
* devno - Instance number for driver
|
||||
* config - configuratio
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero (OK) on success; a negated errno value on failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int lsm9ds1_register_uorb(int devno, FAR struct lsm9ds1_config_s *config);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -966,7 +966,7 @@ struct sensor_ops_s
|
||||
FAR struct file *filep,
|
||||
unsigned long arg);
|
||||
|
||||
/****************************************************************************
|
||||
/**************************************************************************
|
||||
* Name: calibrate
|
||||
*
|
||||
* This operation can trigger the calibration operation, and if the
|
||||
|
||||
Reference in New Issue
Block a user