Merged in andreasBihlmaier/nuttx/fix-as5048b (pull request #255)
fix as5048b by adding missing frequency parameter Approved-by: Gregory Nutt
This commit is contained in:
commit
c0769c9988
@ -63,6 +63,7 @@ struct as5048b_dev_s
|
||||
struct qe_lowerhalf_s lower; /* AS5048B quadrature encoder lower half */
|
||||
FAR struct i2c_master_s *i2c; /* I2C interface */
|
||||
uint8_t addr; /* I2C address */
|
||||
uint32_t frequency; /* I2C frequency */
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
@ -595,7 +596,7 @@ static int as5048b_ioctl(FAR struct qe_lowerhalf_s *lower, int cmd,
|
||||
****************************************************************************/
|
||||
|
||||
FAR struct qe_lowerhalf_s *as5048b_initialize(FAR struct i2c_master_s *i2c,
|
||||
uint8_t addr)
|
||||
uint8_t addr, uint32_t frequency)
|
||||
{
|
||||
FAR struct as5048b_dev_s *priv;
|
||||
|
||||
@ -613,6 +614,7 @@ FAR struct qe_lowerhalf_s *as5048b_initialize(FAR struct i2c_master_s *i2c,
|
||||
priv->lower.ops = &g_qeops;
|
||||
priv->i2c = i2c;
|
||||
priv->addr = addr;
|
||||
priv->frequency = frequency;
|
||||
|
||||
return &priv->lower;
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ extern "C"
|
||||
****************************************************************************/
|
||||
|
||||
FAR struct qe_lowerhalf_s *as5048b_initialize(FAR struct i2c_master_s *i2c,
|
||||
uint8_t addr);
|
||||
uint8_t addr, uint32_t frequency);
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
|
Loading…
Reference in New Issue
Block a user