Skip to content

Commit

Permalink
sensor/stmemsc: Align stmemsc i/f to v2.01
Browse files Browse the repository at this point in the history
Align stmemsc HAL i/f to v2.01

Signed-off-by: Armando Visconti <[email protected]>
  • Loading branch information
avisconti authored and carlescufi committed May 2, 2022
1 parent 575de9d commit 52a522c
Show file tree
Hide file tree
Showing 33 changed files with 21,556 additions and 317 deletions.
5 changes: 5 additions & 0 deletions sensor/stmemsc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ set(stmems_pids
ais328dq
ais3624dq
asm330lhh
asm330lhhx
h3lis100dl
h3lis331dl
hts221
Expand All @@ -22,13 +23,15 @@ set(stmems_pids
iis328dq
iis3dhhc
iis3dwb
ilps22qs
ism303dac
ism330dhcx
ism330dlc
l20g20is
l3gd20h
lis25ba
lis2de12
lis2dh
lis2dh12
lis2ds12
lis2dtw12
Expand All @@ -42,11 +45,13 @@ set(stmems_pids
lis3dsh
lis3mdl
lps22ch
lps22df
lps22hb
lps22hh
lps25hb
lps27hhtw
lps27hhw
lps28dfw
lps33hw
lps33k
lps33w
Expand Down
4 changes: 2 additions & 2 deletions sensor/stmemsc/README
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Origin:
https://www.st.com/en/embedded-software/c-driver-mems.html

Status:
version v2.00
version v2.01

Purpose:
ST Microelectronics standard C platform-independent drivers for MEMS
Expand Down Expand Up @@ -46,7 +46,7 @@ URL:
https://www.st.com/en/embedded-software/c-driver-mems.html

commit:
version v2.00
version v2.01

Maintained-by:
ST Microelectronics
Expand Down
12 changes: 4 additions & 8 deletions sensor/stmemsc/asm330lhh_STdC/driver/asm330lhh_reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,8 @@ int32_t asm330lhh_xl_data_rate_get(stmdev_ctx_t *ctx,
*val = ASM330LHH_XL_ODR_208Hz;
break;

case ASM330LHH_XL_ODR_417Hz:
*val = ASM330LHH_XL_ODR_417Hz;
case ASM330LHH_XL_ODR_416Hz:
*val = ASM330LHH_XL_ODR_416Hz;
break;

case ASM330LHH_XL_ODR_833Hz:
Expand All @@ -323,10 +323,6 @@ int32_t asm330lhh_xl_data_rate_get(stmdev_ctx_t *ctx,
*val = ASM330LHH_XL_ODR_6667Hz;
break;

case ASM330LHH_XL_ODR_6Hz5:
*val = ASM330LHH_XL_ODR_6Hz5;
break;

default:
*val = ASM330LHH_XL_ODR_OFF;
break;
Expand Down Expand Up @@ -477,8 +473,8 @@ int32_t asm330lhh_gy_data_rate_get(stmdev_ctx_t *ctx,
*val = ASM330LHH_GY_ODR_208Hz;
break;

case ASM330LHH_GY_ODR_417Hz:
*val = ASM330LHH_GY_ODR_417Hz;
case ASM330LHH_GY_ODR_416Hz:
*val = ASM330LHH_GY_ODR_416Hz;
break;

case ASM330LHH_GY_ODR_833Hz:
Expand Down
5 changes: 2 additions & 3 deletions sensor/stmemsc/asm330lhh_STdC/driver/asm330lhh_reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -940,12 +940,11 @@ typedef enum
ASM330LHH_XL_ODR_52Hz = 3,
ASM330LHH_XL_ODR_104Hz = 4,
ASM330LHH_XL_ODR_208Hz = 5,
ASM330LHH_XL_ODR_417Hz = 6,
ASM330LHH_XL_ODR_416Hz = 6,
ASM330LHH_XL_ODR_833Hz = 7,
ASM330LHH_XL_ODR_1667Hz = 8,
ASM330LHH_XL_ODR_3333Hz = 9,
ASM330LHH_XL_ODR_6667Hz = 10,
ASM330LHH_XL_ODR_6Hz5 = 11, /* (low power only) */
} asm330lhh_odr_xl_t;
int32_t asm330lhh_xl_data_rate_set(stmdev_ctx_t *ctx,
asm330lhh_odr_xl_t val);
Expand Down Expand Up @@ -974,7 +973,7 @@ typedef enum
ASM330LHH_GY_ODR_52Hz = 3,
ASM330LHH_GY_ODR_104Hz = 4,
ASM330LHH_GY_ODR_208Hz = 5,
ASM330LHH_GY_ODR_417Hz = 6,
ASM330LHH_GY_ODR_416Hz = 6,
ASM330LHH_GY_ODR_833Hz = 7,
ASM330LHH_GY_ODR_1667Hz = 8,
ASM330LHH_GY_ODR_3333Hz = 9,
Expand Down
Loading

0 comments on commit 52a522c

Please sign in to comment.