modules/hal_st: Align sensor drivers to stmemsc HAL i/f v2.6

Align all sensor drivers that are using stmemsc (STdC) HAL i/f
to new APIs of stmemsc v2.6

Requires https://github.com/zephyrproject-rtos/hal_st/pull/21

Signed-off-by: Armando Visconti <armando.visconti@st.com>
This commit is contained in:
Armando Visconti 2024-08-19 11:43:40 +02:00 committed by Fabio Baltieri
commit 45ae08a379
3 changed files with 3 additions and 7 deletions

View file

@ -77,10 +77,7 @@ static int iis328dq_set_odr(const struct device *dev, uint16_t odr)
} else if (odr <= 1) { } else if (odr <= 1) {
odr_reg = IIS328DQ_ODR_1Hz; odr_reg = IIS328DQ_ODR_1Hz;
} else if (odr <= 2) { } else if (odr <= 2) {
/* not sure what "5Hz2" is about, datasheet says PM=0b100 is 2Hz odr_reg = IIS328DQ_ODR_2Hz;
* https://github.com/STMicroelectronics/STMems_Standard_C_drivers/issues/162
*/
odr_reg = IIS328DQ_ODR_5Hz2;
} else if (odr <= 5) { } else if (odr <= 5) {
odr_reg = IIS328DQ_ODR_5Hz; odr_reg = IIS328DQ_ODR_5Hz;
} else if (odr <= 10) { } else if (odr <= 10) {

View file

@ -213,10 +213,9 @@ static int lis2dux12_sample_fetch_temp(const struct device *dev)
stmdev_ctx_t *ctx = (stmdev_ctx_t *)&cfg->ctx; stmdev_ctx_t *ctx = (stmdev_ctx_t *)&cfg->ctx;
/* fetch raw data sample */ /* fetch raw data sample */
lis2dux12_md_t mode;
lis2dux12_outt_data_t temp_data = {0}; lis2dux12_outt_data_t temp_data = {0};
if (lis2dux12_outt_data_get(ctx, &mode, &temp_data) < 0) { if (lis2dux12_outt_data_get(ctx, &temp_data) < 0) {
LOG_ERR("Failed to fetch raw temperature data sample"); LOG_ERR("Failed to fetch raw temperature data sample");
return -EIO; return -EIO;
} }

View file

@ -228,7 +228,7 @@ manifest:
groups: groups:
- hal - hal
- name: hal_st - name: hal_st
revision: b77157f6bc4395e398d90ab02a7d2cbc01ab2ce7 revision: b2f548fe672f24122c7f92027b2c9eeea8a0483a
path: modules/hal/st path: modules/hal/st
groups: groups:
- hal - hal