drivers/sensors/hts221: power-on sensor for loading calibration data
This commit is contained in:
parent
09cee19cee
commit
fe9be72bec
@ -1153,6 +1153,8 @@ int hts221_register(FAR const char *devpath, FAR struct i2c_master_s *i2c,
|
|||||||
priv->config = config;
|
priv->config = config;
|
||||||
nxsem_init(&priv->devsem, 0, 1);
|
nxsem_init(&priv->devsem, 0, 1);
|
||||||
|
|
||||||
|
priv->config->set_power(priv->config, true);
|
||||||
|
|
||||||
ret = hts221_load_calibration_data(priv);
|
ret = hts221_load_calibration_data(priv);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
@ -1179,5 +1181,6 @@ int hts221_register(FAR const char *devpath, FAR struct i2c_master_s *i2c,
|
|||||||
|
|
||||||
priv->config->irq_attach(priv->config, hts221_int_handler, priv);
|
priv->config->irq_attach(priv->config, hts221_int_handler, priv);
|
||||||
priv->config->irq_enable(priv->config, false);
|
priv->config->irq_enable(priv->config, false);
|
||||||
|
priv->config->set_power(priv->config, false);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user