Skip to content

Commit 45ae08a

Browse files
aviscontifabiobaltieri
authored andcommitted
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 zephyrproject-rtos/hal_st#21 Signed-off-by: Armando Visconti <[email protected]>
1 parent 42da38b commit 45ae08a

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

drivers/sensor/st/iis328dq/iis328dq.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,7 @@ static int iis328dq_set_odr(const struct device *dev, uint16_t odr)
7777
} else if (odr <= 1) {
7878
odr_reg = IIS328DQ_ODR_1Hz;
7979
} else if (odr <= 2) {
80-
/* not sure what "5Hz2" is about, datasheet says PM=0b100 is 2Hz
81-
* https://github.com/STMicroelectronics/STMems_Standard_C_drivers/issues/162
82-
*/
83-
odr_reg = IIS328DQ_ODR_5Hz2;
80+
odr_reg = IIS328DQ_ODR_2Hz;
8481
} else if (odr <= 5) {
8582
odr_reg = IIS328DQ_ODR_5Hz;
8683
} else if (odr <= 10) {

drivers/sensor/st/lis2dux12/lis2dux12.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,9 @@ static int lis2dux12_sample_fetch_temp(const struct device *dev)
213213
stmdev_ctx_t *ctx = (stmdev_ctx_t *)&cfg->ctx;
214214

215215
/* fetch raw data sample */
216-
lis2dux12_md_t mode;
217216
lis2dux12_outt_data_t temp_data = {0};
218217

219-
if (lis2dux12_outt_data_get(ctx, &mode, &temp_data) < 0) {
218+
if (lis2dux12_outt_data_get(ctx, &temp_data) < 0) {
220219
LOG_ERR("Failed to fetch raw temperature data sample");
221220
return -EIO;
222221
}

west.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ manifest:
228228
groups:
229229
- hal
230230
- name: hal_st
231-
revision: b77157f6bc4395e398d90ab02a7d2cbc01ab2ce7
231+
revision: b2f548fe672f24122c7f92027b2c9eeea8a0483a
232232
path: modules/hal/st
233233
groups:
234234
- hal

0 commit comments

Comments
 (0)