From 9293ae6a6863fee9261d2a0cf443d4be649e8eff Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Wed, 17 Jul 2024 11:11:35 +0200 Subject: [PATCH] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20(CoreIMU):=20Upgrade=20ST'?= =?UTF-8?q?s=20lsm6dsox=20driver=20to=20v3.0.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- drivers/CoreIMU/extern/include/lsm6dsox_reg.h | 1108 ++++++++--------- drivers/CoreIMU/extern/source/lsm6dsox_reg.c | 801 ++++++------ 2 files changed, 951 insertions(+), 958 deletions(-) diff --git a/drivers/CoreIMU/extern/include/lsm6dsox_reg.h b/drivers/CoreIMU/extern/include/lsm6dsox_reg.h index 537aa74842..c0d9d7dc5b 100644 --- a/drivers/CoreIMU/extern/include/lsm6dsox_reg.h +++ b/drivers/CoreIMU/extern/include/lsm6dsox_reg.h @@ -20,7 +20,6 @@ ****************************************************************************** */ - /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef LSM6DSOX_REGS_H #define LSM6DSOX_REGS_H @@ -114,12 +113,15 @@ typedef struct typedef int32_t (*stmdev_write_ptr)(void *, uint8_t, const uint8_t *, uint16_t); typedef int32_t (*stmdev_read_ptr)(void *, uint8_t, uint8_t *, uint16_t); +typedef void (*stmdev_mdelay_ptr)(uint32_t millisec); typedef struct { /** Component mandatory fields **/ stmdev_write_ptr write_reg; stmdev_read_ptr read_reg; + /** Component optional fields **/ + stmdev_mdelay_ptr mdelay; /** Customizable optional pointer **/ void *handle; } stmdev_ctx_t; @@ -186,11 +188,9 @@ typedef struct #if DRV_BYTE_ORDER == DRV_LITTLE_ENDIAN uint8_t ois_ctrl_from_ui : 1; uint8_t not_used_01 : 5; -uint8_t reg_access : - 2; /* shub_reg_access + func_cfg_access */ + uint8_t reg_access : 2; /* shub_reg_access + func_cfg_access */ #elif DRV_BYTE_ORDER == DRV_BIG_ENDIAN -uint8_t reg_access : - 2; /* shub_reg_access + func_cfg_access */ + uint8_t reg_access : 2; /* shub_reg_access + func_cfg_access */ uint8_t not_used_01 : 5; uint8_t ois_ctrl_from_ui : 1; #endif /* DRV_BYTE_ORDER */ @@ -472,11 +472,9 @@ typedef struct uint8_t ftype : 3; uint8_t usr_off_w : 1; uint8_t xl_hm_mode : 1; -uint8_t den_mode : - 3; /* trig_en + lvl1_en + lvl2_en */ + uint8_t den_mode : 3; /* trig_en + lvl1_en + lvl2_en */ #elif DRV_BYTE_ORDER == DRV_BIG_ENDIAN -uint8_t den_mode : - 3; /* trig_en + lvl1_en + lvl2_en */ + uint8_t den_mode : 3; /* trig_en + lvl1_en + lvl2_en */ uint8_t xl_hm_mode : 1; uint8_t usr_off_w : 1; uint8_t ftype : 3; @@ -1673,13 +1671,11 @@ typedef struct typedef struct { #if DRV_BYTE_ORDER == DRV_LITTLE_ENDIAN -uint8_t fsm_lc_clr : - 2; /* fsm_lc_cleared + fsm_lc_clear */ + uint8_t fsm_lc_clr : 2; /* fsm_lc_cleared + fsm_lc_clear */ uint8_t not_used_01 : 6; #elif DRV_BYTE_ORDER == DRV_BIG_ENDIAN uint8_t not_used_01 : 6; -uint8_t fsm_lc_clr : - 2; /* fsm_lc_cleared + fsm_lc_clear */ + uint8_t fsm_lc_clr : 2; /* fsm_lc_cleared + fsm_lc_clear */ #endif /* DRV_BYTE_ORDER */ } lsm6dsox_fsm_long_counter_clear_t; @@ -3009,10 +3005,23 @@ typedef union * */ -int32_t lsm6dsox_read_reg(stmdev_ctx_t *ctx, uint8_t reg, +#ifndef __weak +#define __weak __attribute__((weak)) +#endif /* __weak */ + +/* + * These are the basic platform dependent I/O routines to read + * and write device registers connected on a standard bus. + * The driver keeps offering a default implementation based on function + * pointers to read/write routines for backward compatibility. + * The __weak directive allows the final application to overwrite + * them with a custom implementation. + */ + +int32_t lsm6dsox_read_reg(const stmdev_ctx_t *ctx, uint8_t reg, uint8_t *data, uint16_t len); -int32_t lsm6dsox_write_reg(stmdev_ctx_t *ctx, uint8_t reg, +int32_t lsm6dsox_write_reg(const stmdev_ctx_t *ctx, uint8_t reg, uint8_t *data, uint16_t len); @@ -3038,9 +3047,9 @@ typedef enum LSM6DSOX_4g = 2, LSM6DSOX_8g = 3, } lsm6dsox_fs_xl_t; -int32_t lsm6dsox_xl_full_scale_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_full_scale_set(const stmdev_ctx_t *ctx, lsm6dsox_fs_xl_t val); -int32_t lsm6dsox_xl_full_scale_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_full_scale_get(const stmdev_ctx_t *ctx, lsm6dsox_fs_xl_t *val); typedef enum @@ -3058,9 +3067,9 @@ typedef enum LSM6DSOX_XL_ODR_6667Hz = 10, LSM6DSOX_XL_ODR_1Hz6 = 11, /* (low power only) */ } lsm6dsox_odr_xl_t; -int32_t lsm6dsox_xl_data_rate_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_data_rate_set(const stmdev_ctx_t *ctx, lsm6dsox_odr_xl_t val); -int32_t lsm6dsox_xl_data_rate_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_data_rate_get(const stmdev_ctx_t *ctx, lsm6dsox_odr_xl_t *val); typedef enum @@ -3071,9 +3080,9 @@ typedef enum LSM6DSOX_1000dps = 4, LSM6DSOX_2000dps = 6, } lsm6dsox_fs_g_t; -int32_t lsm6dsox_gy_full_scale_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_gy_full_scale_set(const stmdev_ctx_t *ctx, lsm6dsox_fs_g_t val); -int32_t lsm6dsox_gy_full_scale_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_gy_full_scale_get(const stmdev_ctx_t *ctx, lsm6dsox_fs_g_t *val); typedef enum @@ -3090,14 +3099,14 @@ typedef enum LSM6DSOX_GY_ODR_3333Hz = 9, LSM6DSOX_GY_ODR_6667Hz = 10, } lsm6dsox_odr_g_t; -int32_t lsm6dsox_gy_data_rate_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_gy_data_rate_set(const stmdev_ctx_t *ctx, lsm6dsox_odr_g_t val); -int32_t lsm6dsox_gy_data_rate_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_gy_data_rate_get(const stmdev_ctx_t *ctx, lsm6dsox_odr_g_t *val); -int32_t lsm6dsox_block_data_update_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_block_data_update_set(const stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_block_data_update_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_block_data_update_get(const stmdev_ctx_t *ctx, uint8_t *val); typedef enum @@ -3105,9 +3114,9 @@ typedef enum LSM6DSOX_LSb_1mg = 0, LSM6DSOX_LSb_16mg = 1, } lsm6dsox_usr_off_w_t; -int32_t lsm6dsox_xl_offset_weight_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_offset_weight_set(const stmdev_ctx_t *ctx, lsm6dsox_usr_off_w_t val); -int32_t lsm6dsox_xl_offset_weight_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_offset_weight_get(const stmdev_ctx_t *ctx, lsm6dsox_usr_off_w_t *val); typedef enum @@ -3116,9 +3125,9 @@ typedef enum LSM6DSOX_LOW_NORMAL_POWER_MD = 1, LSM6DSOX_ULTRA_LOW_POWER_MD = 2, } lsm6dsox_xl_hm_mode_t; -int32_t lsm6dsox_xl_power_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_power_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_xl_hm_mode_t val); -int32_t lsm6dsox_xl_power_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_power_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_xl_hm_mode_t *val); typedef enum @@ -3126,47 +3135,47 @@ typedef enum LSM6DSOX_GY_HIGH_PERFORMANCE = 0, LSM6DSOX_GY_NORMAL = 1, } lsm6dsox_g_hm_mode_t; -int32_t lsm6dsox_gy_power_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_gy_power_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_g_hm_mode_t val); -int32_t lsm6dsox_gy_power_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_gy_power_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_g_hm_mode_t *val); -int32_t lsm6dsox_status_reg_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_status_reg_get(const stmdev_ctx_t *ctx, lsm6dsox_status_reg_t *val); -int32_t lsm6dsox_xl_flag_data_ready_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_flag_data_ready_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_gy_flag_data_ready_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_gy_flag_data_ready_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_temp_flag_data_ready_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_temp_flag_data_ready_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_xl_usr_offset_x_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_usr_offset_x_set(const stmdev_ctx_t *ctx, uint8_t *buff); -int32_t lsm6dsox_xl_usr_offset_x_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_usr_offset_x_get(const stmdev_ctx_t *ctx, uint8_t *buff); -int32_t lsm6dsox_xl_usr_offset_y_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_usr_offset_y_set(const stmdev_ctx_t *ctx, uint8_t *buff); -int32_t lsm6dsox_xl_usr_offset_y_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_usr_offset_y_get(const stmdev_ctx_t *ctx, uint8_t *buff); -int32_t lsm6dsox_xl_usr_offset_z_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_usr_offset_z_set(const stmdev_ctx_t *ctx, uint8_t *buff); -int32_t lsm6dsox_xl_usr_offset_z_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_usr_offset_z_get(const stmdev_ctx_t *ctx, uint8_t *buff); -int32_t lsm6dsox_xl_usr_offset_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_xl_usr_offset_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_xl_usr_offset_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_xl_usr_offset_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_timestamp_rst(stmdev_ctx_t *ctx); +int32_t lsm6dsox_timestamp_rst(const stmdev_ctx_t *ctx); -int32_t lsm6dsox_timestamp_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_timestamp_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_timestamp_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_timestamp_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_timestamp_raw_get(stmdev_ctx_t *ctx, uint32_t *val); +int32_t lsm6dsox_timestamp_raw_get(const stmdev_ctx_t *ctx, uint32_t *val); typedef enum { @@ -3175,9 +3184,9 @@ typedef enum LSM6DSOX_ROUND_GY = 2, LSM6DSOX_ROUND_GY_XL = 3, } lsm6dsox_rounding_t; -int32_t lsm6dsox_rounding_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_rounding_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_rounding_t val); -int32_t lsm6dsox_rounding_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_rounding_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_rounding_t *val); typedef enum @@ -3185,45 +3194,45 @@ typedef enum LSM6DSOX_STAT_RND_DISABLE = 0, LSM6DSOX_STAT_RND_ENABLE = 1, } lsm6dsox_rounding_status_t; -int32_t lsm6dsox_rounding_on_status_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_rounding_on_status_set(const stmdev_ctx_t *ctx, lsm6dsox_rounding_status_t val); -int32_t lsm6dsox_rounding_on_status_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_rounding_on_status_get(const stmdev_ctx_t *ctx, lsm6dsox_rounding_status_t *val); -int32_t lsm6dsox_temperature_raw_get(stmdev_ctx_t *ctx, int16_t *val); +int32_t lsm6dsox_temperature_raw_get(const stmdev_ctx_t *ctx, int16_t *val); -int32_t lsm6dsox_angular_rate_raw_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_angular_rate_raw_get(const stmdev_ctx_t *ctx, int16_t *val); -int32_t lsm6dsox_acceleration_raw_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_acceleration_raw_get(const stmdev_ctx_t *ctx, int16_t *val); -int32_t lsm6dsox_fifo_out_raw_get(stmdev_ctx_t *ctx, uint8_t *buff); +int32_t lsm6dsox_fifo_out_raw_get(const stmdev_ctx_t *ctx, uint8_t *buff); -int32_t lsm6dsox_ois_angular_rate_raw_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_ois_angular_rate_raw_get(const stmdev_ctx_t *ctx, int16_t *val); -int32_t lsm6dsox_ois_acceleration_raw_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_ois_acceleration_raw_get(const stmdev_ctx_t *ctx, int16_t *val); -int32_t lsm6dsox_aux_temperature_raw_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_temperature_raw_get(const stmdev_ctx_t *ctx, int16_t *val); -int32_t lsm6dsox_aux_ois_angular_rate_raw_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_ois_angular_rate_raw_get(const stmdev_ctx_t *ctx, int16_t *val); -int32_t lsm6dsox_aux_ois_acceleration_raw_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_ois_acceleration_raw_get(const stmdev_ctx_t *ctx, int16_t *val); -int32_t lsm6dsox_number_of_steps_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_number_of_steps_get(const stmdev_ctx_t *ctx, uint16_t *val); -int32_t lsm6dsox_steps_reset(stmdev_ctx_t *ctx); +int32_t lsm6dsox_steps_reset(const stmdev_ctx_t *ctx); -int32_t lsm6dsox_mlc_out_get(stmdev_ctx_t *ctx, uint8_t *buff); +int32_t lsm6dsox_mlc_out_get(const stmdev_ctx_t *ctx, uint8_t *buff); -int32_t lsm6dsox_odr_cal_reg_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_odr_cal_reg_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_odr_cal_reg_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_odr_cal_reg_get(const stmdev_ctx_t *ctx, uint8_t *val); typedef enum { @@ -3231,19 +3240,19 @@ typedef enum LSM6DSOX_SENSOR_HUB_BANK = 1, LSM6DSOX_EMBEDDED_FUNC_BANK = 2, } lsm6dsox_reg_access_t; -int32_t lsm6dsox_mem_bank_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_mem_bank_set(const stmdev_ctx_t *ctx, lsm6dsox_reg_access_t val); -int32_t lsm6dsox_mem_bank_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_mem_bank_get(const stmdev_ctx_t *ctx, lsm6dsox_reg_access_t *val); -int32_t lsm6dsox_ln_pg_write_byte(stmdev_ctx_t *ctx, uint16_t address, +int32_t lsm6dsox_ln_pg_write_byte(const stmdev_ctx_t *ctx, uint16_t address, uint8_t *val); -int32_t lsm6dsox_ln_pg_read_byte(stmdev_ctx_t *ctx, uint16_t address, +int32_t lsm6dsox_ln_pg_read_byte(const stmdev_ctx_t *ctx, uint16_t address, uint8_t *val); -int32_t lsm6dsox_ln_pg_write(stmdev_ctx_t *ctx, uint16_t address, +int32_t lsm6dsox_ln_pg_write(const stmdev_ctx_t *ctx, uint16_t address, uint8_t *buf, uint8_t len); -int32_t lsm6dsox_ln_pg_read(stmdev_ctx_t *ctx, uint16_t address, +int32_t lsm6dsox_ln_pg_read(const stmdev_ctx_t *ctx, uint16_t address, uint8_t *val); typedef enum @@ -3251,21 +3260,21 @@ typedef enum LSM6DSOX_DRDY_LATCHED = 0, LSM6DSOX_DRDY_PULSED = 1, } lsm6dsox_dataready_pulsed_t; -int32_t lsm6dsox_data_ready_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_data_ready_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_dataready_pulsed_t val); -int32_t lsm6dsox_data_ready_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_data_ready_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_dataready_pulsed_t *val); -int32_t lsm6dsox_device_id_get(stmdev_ctx_t *ctx, uint8_t *buff); +int32_t lsm6dsox_device_id_get(const stmdev_ctx_t *ctx, uint8_t *buff); -int32_t lsm6dsox_reset_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_reset_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_reset_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_reset_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_auto_increment_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_auto_increment_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_auto_increment_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_auto_increment_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_boot_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_boot_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_boot_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_boot_get(const stmdev_ctx_t *ctx, uint8_t *val); typedef enum { @@ -3273,9 +3282,9 @@ typedef enum LSM6DSOX_XL_ST_POSITIVE = 1, LSM6DSOX_XL_ST_NEGATIVE = 2, } lsm6dsox_st_xl_t; -int32_t lsm6dsox_xl_self_test_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_self_test_set(const stmdev_ctx_t *ctx, lsm6dsox_st_xl_t val); -int32_t lsm6dsox_xl_self_test_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_self_test_get(const stmdev_ctx_t *ctx, lsm6dsox_st_xl_t *val); typedef enum @@ -3284,20 +3293,20 @@ typedef enum LSM6DSOX_GY_ST_POSITIVE = 1, LSM6DSOX_GY_ST_NEGATIVE = 3, } lsm6dsox_st_g_t; -int32_t lsm6dsox_gy_self_test_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_gy_self_test_set(const stmdev_ctx_t *ctx, lsm6dsox_st_g_t val); -int32_t lsm6dsox_gy_self_test_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_gy_self_test_get(const stmdev_ctx_t *ctx, lsm6dsox_st_g_t *val); -int32_t lsm6dsox_xl_filter_lp2_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_xl_filter_lp2_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_xl_filter_lp2_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_xl_filter_lp2_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_gy_filter_lp1_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_gy_filter_lp1_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_gy_filter_lp1_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_gy_filter_lp1_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_filter_settling_mask_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_filter_settling_mask_set(const stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_filter_settling_mask_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_filter_settling_mask_get(const stmdev_ctx_t *ctx, uint8_t *val); typedef enum @@ -3311,13 +3320,13 @@ typedef enum LSM6DSOX_AGGRESSIVE = 6, LSM6DSOX_XTREME = 7, } lsm6dsox_ftype_t; -int32_t lsm6dsox_gy_lp1_bandwidth_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_gy_lp1_bandwidth_set(const stmdev_ctx_t *ctx, lsm6dsox_ftype_t val); -int32_t lsm6dsox_gy_lp1_bandwidth_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_gy_lp1_bandwidth_get(const stmdev_ctx_t *ctx, lsm6dsox_ftype_t *val); -int32_t lsm6dsox_xl_lp2_on_6d_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_xl_lp2_on_6d_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_xl_lp2_on_6d_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_xl_lp2_on_6d_get(const stmdev_ctx_t *ctx, uint8_t *val); typedef enum { @@ -3345,13 +3354,13 @@ typedef enum LSM6DSOX_LP_ODR_DIV_400 = 0x06, LSM6DSOX_LP_ODR_DIV_800 = 0x07, } lsm6dsox_hp_slope_xl_en_t; -int32_t lsm6dsox_xl_hp_path_on_out_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_hp_path_on_out_set(const stmdev_ctx_t *ctx, lsm6dsox_hp_slope_xl_en_t val); -int32_t lsm6dsox_xl_hp_path_on_out_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_hp_path_on_out_get(const stmdev_ctx_t *ctx, lsm6dsox_hp_slope_xl_en_t *val); -int32_t lsm6dsox_xl_fast_settling_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_xl_fast_settling_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_fast_settling_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_xl_fast_settling_get(const stmdev_ctx_t *ctx, uint8_t *val); typedef enum @@ -3359,9 +3368,9 @@ typedef enum LSM6DSOX_USE_SLOPE = 0, LSM6DSOX_USE_HPF = 1, } lsm6dsox_slope_fds_t; -int32_t lsm6dsox_xl_hp_path_internal_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_hp_path_internal_set(const stmdev_ctx_t *ctx, lsm6dsox_slope_fds_t val); -int32_t lsm6dsox_xl_hp_path_internal_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_hp_path_internal_get(const stmdev_ctx_t *ctx, lsm6dsox_slope_fds_t *val); typedef enum @@ -3372,9 +3381,9 @@ typedef enum LSM6DSOX_HP_FILTER_260mHz = 0x82, LSM6DSOX_HP_FILTER_1Hz04 = 0x83, } lsm6dsox_hpm_g_t; -int32_t lsm6dsox_gy_hp_path_internal_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_gy_hp_path_internal_set(const stmdev_ctx_t *ctx, lsm6dsox_hpm_g_t val); -int32_t lsm6dsox_gy_hp_path_internal_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_gy_hp_path_internal_get(const stmdev_ctx_t *ctx, lsm6dsox_hpm_g_t *val); typedef enum @@ -3384,9 +3393,9 @@ typedef enum LSM6DSOX_OIS_CTRL_UI_AUX_DATA_UI = 0x02, LSM6DSOX_OIS_CTRL_UI_AUX_DATA_UI_AUX = 0x03, } lsm6dsox_spi2_read_en_t; -int32_t lsm6dsox_ois_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_ois_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_spi2_read_en_t val); -int32_t lsm6dsox_ois_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_ois_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_spi2_read_en_t *val); typedef enum @@ -3394,9 +3403,9 @@ typedef enum LSM6DSOX_AUX_PULL_UP_DISC = 0, LSM6DSOX_AUX_PULL_UP_CONNECT = 1, } lsm6dsox_ois_pu_dis_t; -int32_t lsm6dsox_aux_sdo_ocs_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_sdo_ocs_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_ois_pu_dis_t val); -int32_t lsm6dsox_aux_sdo_ocs_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_sdo_ocs_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_ois_pu_dis_t *val); typedef enum @@ -3404,9 +3413,9 @@ typedef enum LSM6DSOX_AUX_ON = 1, LSM6DSOX_AUX_ON_BY_AUX_INTERFACE = 0, } lsm6dsox_ois_on_t; -int32_t lsm6dsox_aux_pw_on_ctrl_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_pw_on_ctrl_set(const stmdev_ctx_t *ctx, lsm6dsox_ois_on_t val); -int32_t lsm6dsox_aux_pw_on_ctrl_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_pw_on_ctrl_get(const stmdev_ctx_t *ctx, lsm6dsox_ois_on_t *val); typedef enum @@ -3414,21 +3423,21 @@ typedef enum LSM6DSOX_USE_SAME_XL_FS = 0, LSM6DSOX_USE_DIFFERENT_XL_FS = 1, } lsm6dsox_xl_fs_mode_t; -int32_t lsm6dsox_aux_xl_fs_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_xl_fs_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_xl_fs_mode_t val); -int32_t lsm6dsox_aux_xl_fs_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_xl_fs_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_xl_fs_mode_t *val); -int32_t lsm6dsox_aux_status_reg_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_status_reg_get(const stmdev_ctx_t *ctx, lsm6dsox_spi2_status_reg_ois_t *val); -int32_t lsm6dsox_aux_xl_flag_data_ready_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_xl_flag_data_ready_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_aux_gy_flag_data_ready_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_gy_flag_data_ready_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_aux_gy_flag_settling_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_gy_flag_settling_get(const stmdev_ctx_t *ctx, uint8_t *val); typedef enum @@ -3436,9 +3445,9 @@ typedef enum LSM6DSOX_AUX_DEN_ACTIVE_LOW = 0, LSM6DSOX_AUX_DEN_ACTIVE_HIGH = 1, } lsm6dsox_den_lh_ois_t; -int32_t lsm6dsox_aux_den_polarity_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_den_polarity_set(const stmdev_ctx_t *ctx, lsm6dsox_den_lh_ois_t val); -int32_t lsm6dsox_aux_den_polarity_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_den_polarity_get(const stmdev_ctx_t *ctx, lsm6dsox_den_lh_ois_t *val); typedef enum @@ -3447,13 +3456,13 @@ typedef enum LSM6DSOX_AUX_DEN_LEVEL_LATCH = 3, LSM6DSOX_AUX_DEN_LEVEL_TRIG = 2, } lsm6dsox_lvl2_ois_t; -int32_t lsm6dsox_aux_den_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_den_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_lvl2_ois_t val); -int32_t lsm6dsox_aux_den_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_den_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_lvl2_ois_t *val); -int32_t lsm6dsox_aux_drdy_on_int2_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_aux_drdy_on_int2_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_drdy_on_int2_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_aux_drdy_on_int2_get(const stmdev_ctx_t *ctx, uint8_t *val); typedef enum @@ -3462,9 +3471,9 @@ typedef enum LSM6DSOX_MODE_3_GY = 1, LSM6DSOX_MODE_4_GY_XL = 3, } lsm6dsox_ois_en_spi2_t; -int32_t lsm6dsox_aux_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_ois_en_spi2_t val); -int32_t lsm6dsox_aux_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_ois_en_spi2_t *val); typedef enum @@ -3475,9 +3484,9 @@ typedef enum LSM6DSOX_1000dps_AUX = 4, LSM6DSOX_2000dps_AUX = 6, } lsm6dsox_fs_g_ois_t; -int32_t lsm6dsox_aux_gy_full_scale_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_gy_full_scale_set(const stmdev_ctx_t *ctx, lsm6dsox_fs_g_ois_t val); -int32_t lsm6dsox_aux_gy_full_scale_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_gy_full_scale_get(const stmdev_ctx_t *ctx, lsm6dsox_fs_g_ois_t *val); typedef enum @@ -3485,9 +3494,9 @@ typedef enum LSM6DSOX_AUX_SPI_4_WIRE = 0, LSM6DSOX_AUX_SPI_3_WIRE = 1, } lsm6dsox_sim_ois_t; -int32_t lsm6dsox_aux_spi_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_spi_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_sim_ois_t val); -int32_t lsm6dsox_aux_spi_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_spi_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_sim_ois_t *val); typedef enum @@ -3497,9 +3506,9 @@ typedef enum LSM6DSOX_172Hz70 = 2, LSM6DSOX_937Hz91 = 3, } lsm6dsox_ftype_ois_t; -int32_t lsm6dsox_aux_gy_lp1_bandwidth_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_gy_lp1_bandwidth_set(const stmdev_ctx_t *ctx, lsm6dsox_ftype_ois_t val); -int32_t lsm6dsox_aux_gy_lp1_bandwidth_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_gy_lp1_bandwidth_get(const stmdev_ctx_t *ctx, lsm6dsox_ftype_ois_t *val); typedef enum @@ -3510,9 +3519,9 @@ typedef enum LSM6DSOX_AUX_HP_Hz260 = 0x12, LSM6DSOX_AUX_HP_1Hz040 = 0x13, } lsm6dsox_hpm_ois_t; -int32_t lsm6dsox_aux_gy_hp_bandwidth_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_gy_hp_bandwidth_set(const stmdev_ctx_t *ctx, lsm6dsox_hpm_ois_t val); -int32_t lsm6dsox_aux_gy_hp_bandwidth_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_gy_hp_bandwidth_get(const stmdev_ctx_t *ctx, lsm6dsox_hpm_ois_t *val); typedef enum @@ -3520,9 +3529,9 @@ typedef enum LSM6DSOX_ENABLE_CLAMP = 0, LSM6DSOX_DISABLE_CLAMP = 1, } lsm6dsox_st_ois_clampdis_t; -int32_t lsm6dsox_aux_gy_clamp_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_gy_clamp_set(const stmdev_ctx_t *ctx, lsm6dsox_st_ois_clampdis_t val); -int32_t lsm6dsox_aux_gy_clamp_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_gy_clamp_get(const stmdev_ctx_t *ctx, lsm6dsox_st_ois_clampdis_t *val); typedef enum @@ -3536,9 +3545,9 @@ typedef enum LSM6DSOX_8Hz30 = 6, LSM6DSOX_4Hz15 = 7, } lsm6dsox_filter_xl_conf_ois_t; -int32_t lsm6dsox_aux_xl_bandwidth_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_xl_bandwidth_set(const stmdev_ctx_t *ctx, lsm6dsox_filter_xl_conf_ois_t val); -int32_t lsm6dsox_aux_xl_bandwidth_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_xl_bandwidth_get(const stmdev_ctx_t *ctx, lsm6dsox_filter_xl_conf_ois_t *val); typedef enum @@ -3548,9 +3557,9 @@ typedef enum LSM6DSOX_AUX_4g = 2, LSM6DSOX_AUX_8g = 3, } lsm6dsox_fs_xl_ois_t; -int32_t lsm6dsox_aux_xl_full_scale_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_xl_full_scale_set(const stmdev_ctx_t *ctx, lsm6dsox_fs_xl_ois_t val); -int32_t lsm6dsox_aux_xl_full_scale_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_xl_full_scale_get(const stmdev_ctx_t *ctx, lsm6dsox_fs_xl_ois_t *val); typedef enum @@ -3558,9 +3567,9 @@ typedef enum LSM6DSOX_PULL_UP_DISC = 0, LSM6DSOX_PULL_UP_CONNECT = 1, } lsm6dsox_sdo_pu_en_t; -int32_t lsm6dsox_sdo_sa0_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sdo_sa0_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_sdo_pu_en_t val); -int32_t lsm6dsox_sdo_sa0_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sdo_sa0_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_sdo_pu_en_t *val); typedef enum @@ -3568,17 +3577,17 @@ typedef enum LSM6DSOX_SPI_4_WIRE = 0, LSM6DSOX_SPI_3_WIRE = 1, } lsm6dsox_sim_t; -int32_t lsm6dsox_spi_mode_set(stmdev_ctx_t *ctx, lsm6dsox_sim_t val); -int32_t lsm6dsox_spi_mode_get(stmdev_ctx_t *ctx, lsm6dsox_sim_t *val); +int32_t lsm6dsox_spi_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_sim_t val); +int32_t lsm6dsox_spi_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_sim_t *val); typedef enum { LSM6DSOX_I2C_ENABLE = 0, LSM6DSOX_I2C_DISABLE = 1, } lsm6dsox_i2c_disable_t; -int32_t lsm6dsox_i2c_interface_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_i2c_interface_set(const stmdev_ctx_t *ctx, lsm6dsox_i2c_disable_t val); -int32_t lsm6dsox_i2c_interface_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_i2c_interface_get(const stmdev_ctx_t *ctx, lsm6dsox_i2c_disable_t *val); typedef enum @@ -3589,9 +3598,9 @@ typedef enum LSM6DSOX_I3C_ENABLE_T_1ms = 0x02, LSM6DSOX_I3C_ENABLE_T_25ms = 0x03, } lsm6dsox_i3c_disable_t; -int32_t lsm6dsox_i3c_disable_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_i3c_disable_set(const stmdev_ctx_t *ctx, lsm6dsox_i3c_disable_t val); -int32_t lsm6dsox_i3c_disable_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_i3c_disable_get(const stmdev_ctx_t *ctx, lsm6dsox_i3c_disable_t *val); typedef enum @@ -3601,9 +3610,9 @@ typedef enum LSM6DSOX_INT1_NOPULL_DOWN_INT2_PUSH_PULL = 0x02, LSM6DSOX_INT1_NOPULL_DOWN_INT2_OPEN_DRAIN = 0x03, } lsm6dsox_pp_od_t; -int32_t lsm6dsox_pin_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pin_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_pp_od_t val); -int32_t lsm6dsox_pin_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pin_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_pp_od_t *val); typedef enum @@ -3611,13 +3620,13 @@ typedef enum LSM6DSOX_ACTIVE_HIGH = 0, LSM6DSOX_ACTIVE_LOW = 1, } lsm6dsox_h_lactive_t; -int32_t lsm6dsox_pin_polarity_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pin_polarity_set(const stmdev_ctx_t *ctx, lsm6dsox_h_lactive_t val); -int32_t lsm6dsox_pin_polarity_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pin_polarity_get(const stmdev_ctx_t *ctx, lsm6dsox_h_lactive_t *val); -int32_t lsm6dsox_all_on_int1_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_all_on_int1_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_all_on_int1_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_all_on_int1_get(const stmdev_ctx_t *ctx, uint8_t *val); typedef enum { @@ -3626,9 +3635,9 @@ typedef enum LSM6DSOX_BASE_PULSED_EMB_LATCHED = 2, LSM6DSOX_ALL_INT_LATCHED = 3, } lsm6dsox_lir_t; -int32_t lsm6dsox_int_notification_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_int_notification_set(const stmdev_ctx_t *ctx, lsm6dsox_lir_t val); -int32_t lsm6dsox_int_notification_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_int_notification_get(const stmdev_ctx_t *ctx, lsm6dsox_lir_t *val); typedef enum @@ -3636,33 +3645,33 @@ typedef enum LSM6DSOX_LSb_FS_DIV_64 = 0, LSM6DSOX_LSb_FS_DIV_256 = 1, } lsm6dsox_wake_ths_w_t; -int32_t lsm6dsox_wkup_ths_weight_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_wkup_ths_weight_set(const stmdev_ctx_t *ctx, lsm6dsox_wake_ths_w_t val); -int32_t lsm6dsox_wkup_ths_weight_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_wkup_ths_weight_get(const stmdev_ctx_t *ctx, lsm6dsox_wake_ths_w_t *val); -int32_t lsm6dsox_wkup_threshold_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_wkup_threshold_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_wkup_threshold_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_wkup_threshold_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_xl_usr_offset_on_wkup_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_usr_offset_on_wkup_set(const stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_xl_usr_offset_on_wkup_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_usr_offset_on_wkup_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_wkup_dur_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_wkup_dur_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_wkup_dur_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_wkup_dur_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_gy_sleep_mode_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_gy_sleep_mode_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_gy_sleep_mode_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_gy_sleep_mode_get(const stmdev_ctx_t *ctx, uint8_t *val); typedef enum { LSM6DSOX_DRIVE_SLEEP_CHG_EVENT = 0, LSM6DSOX_DRIVE_SLEEP_STATUS = 1, } lsm6dsox_sleep_status_on_int_t; -int32_t lsm6dsox_act_pin_notification_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_act_pin_notification_set(const stmdev_ctx_t *ctx, lsm6dsox_sleep_status_on_int_t val); -int32_t lsm6dsox_act_pin_notification_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_act_pin_notification_get(const stmdev_ctx_t *ctx, lsm6dsox_sleep_status_on_int_t *val); typedef enum @@ -3672,31 +3681,31 @@ typedef enum LSM6DSOX_XL_12Hz5_GY_SLEEP = 2, LSM6DSOX_XL_12Hz5_GY_PD = 3, } lsm6dsox_inact_en_t; -int32_t lsm6dsox_act_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_act_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_inact_en_t val); -int32_t lsm6dsox_act_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_act_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_inact_en_t *val); -int32_t lsm6dsox_act_sleep_dur_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_act_sleep_dur_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_act_sleep_dur_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_act_sleep_dur_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_tap_detection_on_z_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_tap_detection_on_z_set(const stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_tap_detection_on_z_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_tap_detection_on_z_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_tap_detection_on_y_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_tap_detection_on_y_set(const stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_tap_detection_on_y_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_tap_detection_on_y_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_tap_detection_on_x_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_tap_detection_on_x_set(const stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_tap_detection_on_x_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_tap_detection_on_x_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_tap_threshold_x_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_tap_threshold_x_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_tap_threshold_x_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_tap_threshold_x_get(const stmdev_ctx_t *ctx, uint8_t *val); typedef enum { @@ -3707,34 +3716,34 @@ typedef enum LSM6DSOX_YZX = 5, LSM6DSOX_ZXY = 6, } lsm6dsox_tap_priority_t; -int32_t lsm6dsox_tap_axis_priority_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_tap_axis_priority_set(const stmdev_ctx_t *ctx, lsm6dsox_tap_priority_t val); -int32_t lsm6dsox_tap_axis_priority_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_tap_axis_priority_get(const stmdev_ctx_t *ctx, lsm6dsox_tap_priority_t *val); -int32_t lsm6dsox_tap_threshold_y_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_tap_threshold_y_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_tap_threshold_y_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_tap_threshold_y_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_tap_threshold_z_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_tap_threshold_z_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_tap_threshold_z_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_tap_threshold_z_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_tap_shock_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_tap_shock_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_tap_shock_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_tap_shock_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_tap_quiet_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_tap_quiet_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_tap_quiet_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_tap_quiet_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_tap_dur_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_tap_dur_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_tap_dur_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_tap_dur_get(const stmdev_ctx_t *ctx, uint8_t *val); typedef enum { LSM6DSOX_ONLY_SINGLE = 0, LSM6DSOX_BOTH_SINGLE_DOUBLE = 1, } lsm6dsox_single_double_tap_t; -int32_t lsm6dsox_tap_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_tap_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_single_double_tap_t val); -int32_t lsm6dsox_tap_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_tap_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_single_double_tap_t *val); typedef enum @@ -3744,13 +3753,13 @@ typedef enum LSM6DSOX_DEG_60 = 2, LSM6DSOX_DEG_50 = 3, } lsm6dsox_sixd_ths_t; -int32_t lsm6dsox_6d_threshold_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_6d_threshold_set(const stmdev_ctx_t *ctx, lsm6dsox_sixd_ths_t val); -int32_t lsm6dsox_6d_threshold_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_6d_threshold_get(const stmdev_ctx_t *ctx, lsm6dsox_sixd_ths_t *val); -int32_t lsm6dsox_4d_mode_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_4d_mode_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_4d_mode_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_4d_mode_get(const stmdev_ctx_t *ctx, uint8_t *val); typedef enum { @@ -3763,20 +3772,20 @@ typedef enum LSM6DSOX_FF_TSH_469mg = 6, LSM6DSOX_FF_TSH_500mg = 7, } lsm6dsox_ff_ths_t; -int32_t lsm6dsox_ff_threshold_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_ff_threshold_set(const stmdev_ctx_t *ctx, lsm6dsox_ff_ths_t val); -int32_t lsm6dsox_ff_threshold_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_ff_threshold_get(const stmdev_ctx_t *ctx, lsm6dsox_ff_ths_t *val); -int32_t lsm6dsox_ff_dur_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_ff_dur_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_ff_dur_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_ff_dur_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_fifo_watermark_set(stmdev_ctx_t *ctx, uint16_t val); -int32_t lsm6dsox_fifo_watermark_get(stmdev_ctx_t *ctx, uint16_t *val); +int32_t lsm6dsox_fifo_watermark_set(const stmdev_ctx_t *ctx, uint16_t val); +int32_t lsm6dsox_fifo_watermark_get(const stmdev_ctx_t *ctx, uint16_t *val); -int32_t lsm6dsox_compression_algo_init_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_compression_algo_init_set(const stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_compression_algo_init_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_compression_algo_init_get(const stmdev_ctx_t *ctx, uint8_t *val); typedef enum @@ -3787,23 +3796,23 @@ typedef enum LSM6DSOX_CMP_16_TO_1 = 0x06, LSM6DSOX_CMP_32_TO_1 = 0x07, } lsm6dsox_uncoptr_rate_t; -int32_t lsm6dsox_compression_algo_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_compression_algo_set(const stmdev_ctx_t *ctx, lsm6dsox_uncoptr_rate_t val); -int32_t lsm6dsox_compression_algo_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_compression_algo_get(const stmdev_ctx_t *ctx, lsm6dsox_uncoptr_rate_t *val); -int32_t lsm6dsox_fifo_virtual_sens_odr_chg_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fifo_virtual_sens_odr_chg_set(const stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_fifo_virtual_sens_odr_chg_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fifo_virtual_sens_odr_chg_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_compression_algo_real_time_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_compression_algo_real_time_set(const stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_compression_algo_real_time_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_compression_algo_real_time_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_fifo_stop_on_wtm_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_fifo_stop_on_wtm_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fifo_stop_on_wtm_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_fifo_stop_on_wtm_get(const stmdev_ctx_t *ctx, uint8_t *val); typedef enum @@ -3821,9 +3830,9 @@ typedef enum LSM6DSOX_XL_BATCHED_AT_6667Hz = 10, LSM6DSOX_XL_BATCHED_AT_6Hz5 = 11, } lsm6dsox_bdr_xl_t; -int32_t lsm6dsox_fifo_xl_batch_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fifo_xl_batch_set(const stmdev_ctx_t *ctx, lsm6dsox_bdr_xl_t val); -int32_t lsm6dsox_fifo_xl_batch_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fifo_xl_batch_get(const stmdev_ctx_t *ctx, lsm6dsox_bdr_xl_t *val); typedef enum @@ -3841,9 +3850,9 @@ typedef enum LSM6DSOX_GY_BATCHED_AT_6667Hz = 10, LSM6DSOX_GY_BATCHED_AT_6Hz5 = 11, } lsm6dsox_bdr_gy_t; -int32_t lsm6dsox_fifo_gy_batch_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fifo_gy_batch_set(const stmdev_ctx_t *ctx, lsm6dsox_bdr_gy_t val); -int32_t lsm6dsox_fifo_gy_batch_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fifo_gy_batch_get(const stmdev_ctx_t *ctx, lsm6dsox_bdr_gy_t *val); typedef enum @@ -3855,9 +3864,9 @@ typedef enum LSM6DSOX_STREAM_MODE = 6, LSM6DSOX_BYPASS_TO_FIFO_MODE = 7, } lsm6dsox_fifo_mode_t; -int32_t lsm6dsox_fifo_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fifo_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_fifo_mode_t val); -int32_t lsm6dsox_fifo_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fifo_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_fifo_mode_t *val); typedef enum @@ -3867,9 +3876,9 @@ typedef enum LSM6DSOX_TEMP_BATCHED_AT_12Hz5 = 2, LSM6DSOX_TEMP_BATCHED_AT_52Hz = 3, } lsm6dsox_odr_t_batch_t; -int32_t lsm6dsox_fifo_temp_batch_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fifo_temp_batch_set(const stmdev_ctx_t *ctx, lsm6dsox_odr_t_batch_t val); -int32_t lsm6dsox_fifo_temp_batch_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fifo_temp_batch_get(const stmdev_ctx_t *ctx, lsm6dsox_odr_t_batch_t *val); typedef enum @@ -3879,9 +3888,9 @@ typedef enum LSM6DSOX_DEC_8 = 2, LSM6DSOX_DEC_32 = 3, } lsm6dsox_odr_ts_batch_t; -int32_t lsm6dsox_fifo_timestamp_decimation_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fifo_timestamp_decimation_set(const stmdev_ctx_t *ctx, lsm6dsox_odr_ts_batch_t val); -int32_t lsm6dsox_fifo_timestamp_decimation_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fifo_timestamp_decimation_get(const stmdev_ctx_t *ctx, lsm6dsox_odr_ts_batch_t *val); typedef enum @@ -3915,53 +3924,53 @@ typedef enum LSM6DSOX_ROTATION_TAG, LSM6DSOX_SENSORHUB_NACK_TAG = 0x19, } lsm6dsox_fifo_tag_t; -int32_t lsm6dsox_fifo_cnt_event_batch_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fifo_cnt_event_batch_set(const stmdev_ctx_t *ctx, lsm6dsox_trig_counter_bdr_t val); -int32_t lsm6dsox_fifo_cnt_event_batch_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fifo_cnt_event_batch_get(const stmdev_ctx_t *ctx, lsm6dsox_trig_counter_bdr_t *val); -int32_t lsm6dsox_rst_batch_counter_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_rst_batch_counter_set(const stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_rst_batch_counter_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_rst_batch_counter_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_batch_counter_threshold_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_batch_counter_threshold_set(const stmdev_ctx_t *ctx, uint16_t val); -int32_t lsm6dsox_batch_counter_threshold_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_batch_counter_threshold_get(const stmdev_ctx_t *ctx, uint16_t *val); -int32_t lsm6dsox_fifo_data_level_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fifo_data_level_get(const stmdev_ctx_t *ctx, uint16_t *val); -int32_t lsm6dsox_fifo_status_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fifo_status_get(const stmdev_ctx_t *ctx, lsm6dsox_fifo_status2_t *val); -int32_t lsm6dsox_fifo_full_flag_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_fifo_full_flag_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_fifo_ovr_flag_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_fifo_ovr_flag_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_fifo_wtm_flag_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_fifo_wtm_flag_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_fifo_sensor_tag_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fifo_sensor_tag_get(const stmdev_ctx_t *ctx, lsm6dsox_fifo_tag_t *val); -int32_t lsm6dsox_fifo_pedo_batch_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_fifo_pedo_batch_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_fifo_pedo_batch_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_fifo_pedo_batch_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_sh_batch_slave_0_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_sh_batch_slave_0_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_batch_slave_0_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_sh_batch_slave_0_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_sh_batch_slave_1_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_sh_batch_slave_1_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_batch_slave_1_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_sh_batch_slave_1_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_sh_batch_slave_2_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_sh_batch_slave_2_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_batch_slave_2_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_sh_batch_slave_2_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_sh_batch_slave_3_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_sh_batch_slave_3_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_batch_slave_3_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_sh_batch_slave_3_get(const stmdev_ctx_t *ctx, uint8_t *val); typedef enum @@ -3972,9 +3981,9 @@ typedef enum LSM6DSOX_LEVEL_TRIGGER = 2, LSM6DSOX_EDGE_TRIGGER = 4, } lsm6dsox_den_mode_t; -int32_t lsm6dsox_den_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_den_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_den_mode_t val); -int32_t lsm6dsox_den_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_den_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_den_mode_t *val); typedef enum @@ -3982,9 +3991,9 @@ typedef enum LSM6DSOX_DEN_ACT_LOW = 0, LSM6DSOX_DEN_ACT_HIGH = 1, } lsm6dsox_den_lh_t; -int32_t lsm6dsox_den_polarity_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_den_polarity_set(const stmdev_ctx_t *ctx, lsm6dsox_den_lh_t val); -int32_t lsm6dsox_den_polarity_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_den_polarity_get(const stmdev_ctx_t *ctx, lsm6dsox_den_lh_t *val); typedef enum @@ -3993,19 +4002,19 @@ typedef enum LSM6DSOX_STAMP_IN_XL_DATA = 1, LSM6DSOX_STAMP_IN_GY_XL_DATA = 2, } lsm6dsox_den_xl_g_t; -int32_t lsm6dsox_den_enable_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_den_enable_set(const stmdev_ctx_t *ctx, lsm6dsox_den_xl_g_t val); -int32_t lsm6dsox_den_enable_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_den_enable_get(const stmdev_ctx_t *ctx, lsm6dsox_den_xl_g_t *val); -int32_t lsm6dsox_den_mark_axis_x_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_den_mark_axis_x_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_den_mark_axis_x_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_den_mark_axis_x_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_den_mark_axis_y_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_den_mark_axis_y_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_den_mark_axis_y_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_den_mark_axis_y_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_den_mark_axis_z_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_den_mark_axis_z_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_den_mark_axis_z_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_den_mark_axis_z_get(const stmdev_ctx_t *ctx, uint8_t *val); typedef enum { @@ -4013,32 +4022,32 @@ typedef enum LSM6DSOX_FALSE_STEP_REJ = 0x10, LSM6DSOX_FALSE_STEP_REJ_ADV_MODE = 0x30, } lsm6dsox_pedo_md_t; -int32_t lsm6dsox_pedo_sens_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pedo_sens_set(const stmdev_ctx_t *ctx, lsm6dsox_pedo_md_t val); -int32_t lsm6dsox_pedo_sens_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pedo_sens_get(const stmdev_ctx_t *ctx, lsm6dsox_pedo_md_t *val); -int32_t lsm6dsox_pedo_step_detect_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pedo_step_detect_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_pedo_debounce_steps_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pedo_debounce_steps_set(const stmdev_ctx_t *ctx, uint8_t *buff); -int32_t lsm6dsox_pedo_debounce_steps_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pedo_debounce_steps_get(const stmdev_ctx_t *ctx, uint8_t *buff); -int32_t lsm6dsox_pedo_steps_period_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pedo_steps_period_set(const stmdev_ctx_t *ctx, uint16_t val); -int32_t lsm6dsox_pedo_steps_period_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pedo_steps_period_get(const stmdev_ctx_t *ctx, uint16_t *val); -int32_t lsm6dsox_pedo_adv_detection_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pedo_adv_detection_set(const stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_pedo_adv_detection_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pedo_adv_detection_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_pedo_false_step_rejection_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pedo_false_step_rejection_set(const stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_pedo_false_step_rejection_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pedo_false_step_rejection_get(const stmdev_ctx_t *ctx, uint8_t *val); typedef enum @@ -4046,32 +4055,32 @@ typedef enum LSM6DSOX_EVERY_STEP = 0, LSM6DSOX_COUNT_OVERFLOW = 1, } lsm6dsox_carry_count_en_t; -int32_t lsm6dsox_pedo_int_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pedo_int_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_carry_count_en_t val); -int32_t lsm6dsox_pedo_int_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pedo_int_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_carry_count_en_t *val); -int32_t lsm6dsox_motion_flag_data_ready_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_motion_flag_data_ready_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_tilt_flag_data_ready_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_tilt_flag_data_ready_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_sh_mag_sensitivity_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_mag_sensitivity_set(const stmdev_ctx_t *ctx, uint16_t val); -int32_t lsm6dsox_sh_mag_sensitivity_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_mag_sensitivity_get(const stmdev_ctx_t *ctx, uint16_t *val); -int32_t lsm6dsox_mlc_mag_sensitivity_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_mlc_mag_sensitivity_set(const stmdev_ctx_t *ctx, uint16_t val); -int32_t lsm6dsox_mlc_mag_sensitivity_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_mlc_mag_sensitivity_get(const stmdev_ctx_t *ctx, uint16_t *val); -int32_t lsm6dsox_mag_offset_set(stmdev_ctx_t *ctx, int16_t *val); -int32_t lsm6dsox_mag_offset_get(stmdev_ctx_t *ctx, int16_t *val); +int32_t lsm6dsox_mag_offset_set(const stmdev_ctx_t *ctx, int16_t *val); +int32_t lsm6dsox_mag_offset_get(const stmdev_ctx_t *ctx, int16_t *val); -int32_t lsm6dsox_mag_soft_iron_set(stmdev_ctx_t *ctx, uint16_t *val); -int32_t lsm6dsox_mag_soft_iron_get(stmdev_ctx_t *ctx, uint16_t *val); +int32_t lsm6dsox_mag_soft_iron_set(const stmdev_ctx_t *ctx, uint16_t *val); +int32_t lsm6dsox_mag_soft_iron_get(const stmdev_ctx_t *ctx, uint16_t *val); typedef enum { @@ -4082,9 +4091,9 @@ typedef enum LSM6DSOX_Z_EQ_MIN_Z = 4, LSM6DSOX_Z_EQ_Z = 5, } lsm6dsox_mag_z_axis_t; -int32_t lsm6dsox_mag_z_orient_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_mag_z_orient_set(const stmdev_ctx_t *ctx, lsm6dsox_mag_z_axis_t val); -int32_t lsm6dsox_mag_z_orient_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_mag_z_orient_get(const stmdev_ctx_t *ctx, lsm6dsox_mag_z_axis_t *val); typedef enum @@ -4096,9 +4105,9 @@ typedef enum LSM6DSOX_Y_EQ_MIN_Z = 4, LSM6DSOX_Y_EQ_Z = 5, } lsm6dsox_mag_y_axis_t; -int32_t lsm6dsox_mag_y_orient_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_mag_y_orient_set(const stmdev_ctx_t *ctx, lsm6dsox_mag_y_axis_t val); -int32_t lsm6dsox_mag_y_orient_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_mag_y_orient_get(const stmdev_ctx_t *ctx, lsm6dsox_mag_y_axis_t *val); typedef enum @@ -4110,12 +4119,12 @@ typedef enum LSM6DSOX_X_EQ_MIN_Z = 4, LSM6DSOX_X_EQ_Z = 5, } lsm6dsox_mag_x_axis_t; -int32_t lsm6dsox_mag_x_orient_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_mag_x_orient_set(const stmdev_ctx_t *ctx, lsm6dsox_mag_x_axis_t val); -int32_t lsm6dsox_mag_x_orient_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_mag_x_orient_get(const stmdev_ctx_t *ctx, lsm6dsox_mag_x_axis_t *val); -int32_t lsm6dsox_long_cnt_flag_data_ready_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_long_cnt_flag_data_ready_get(const stmdev_ctx_t *ctx, uint8_t *val); typedef struct @@ -4123,13 +4132,13 @@ typedef struct lsm6dsox_fsm_enable_a_t fsm_enable_a; lsm6dsox_fsm_enable_b_t fsm_enable_b; } lsm6dsox_emb_fsm_enable_t; -int32_t lsm6dsox_fsm_enable_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fsm_enable_set(const stmdev_ctx_t *ctx, lsm6dsox_emb_fsm_enable_t *val); -int32_t lsm6dsox_fsm_enable_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fsm_enable_get(const stmdev_ctx_t *ctx, lsm6dsox_emb_fsm_enable_t *val); -int32_t lsm6dsox_long_cnt_set(stmdev_ctx_t *ctx, uint16_t val); -int32_t lsm6dsox_long_cnt_get(stmdev_ctx_t *ctx, uint16_t *val); +int32_t lsm6dsox_long_cnt_set(const stmdev_ctx_t *ctx, uint16_t val); +int32_t lsm6dsox_long_cnt_get(const stmdev_ctx_t *ctx, uint16_t *val); typedef enum { @@ -4137,9 +4146,9 @@ typedef enum LSM6DSOX_LC_CLEAR = 1, LSM6DSOX_LC_CLEAR_DONE = 2, } lsm6dsox_fsm_lc_clr_t; -int32_t lsm6dsox_long_clr_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_long_clr_set(const stmdev_ctx_t *ctx, lsm6dsox_fsm_lc_clr_t val); -int32_t lsm6dsox_long_clr_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_long_clr_get(const stmdev_ctx_t *ctx, lsm6dsox_fsm_lc_clr_t *val); typedef struct @@ -4161,7 +4170,7 @@ typedef struct lsm6dsox_fsm_outs7_t fsm_outs15; lsm6dsox_fsm_outs8_t fsm_outs16; } lsm6dsox_fsm_out_t; -int32_t lsm6dsox_fsm_out_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fsm_out_get(const stmdev_ctx_t *ctx, lsm6dsox_fsm_out_t *val); typedef enum @@ -4171,30 +4180,30 @@ typedef enum LSM6DSOX_ODR_FSM_52Hz = 2, LSM6DSOX_ODR_FSM_104Hz = 3, } lsm6dsox_fsm_odr_t; -int32_t lsm6dsox_fsm_data_rate_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fsm_data_rate_set(const stmdev_ctx_t *ctx, lsm6dsox_fsm_odr_t val); -int32_t lsm6dsox_fsm_data_rate_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fsm_data_rate_get(const stmdev_ctx_t *ctx, lsm6dsox_fsm_odr_t *val); -int32_t lsm6dsox_fsm_init_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_fsm_init_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_fsm_init_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_fsm_init_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_long_cnt_int_value_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_long_cnt_int_value_set(const stmdev_ctx_t *ctx, uint16_t val); -int32_t lsm6dsox_long_cnt_int_value_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_long_cnt_int_value_get(const stmdev_ctx_t *ctx, uint16_t *val); -int32_t lsm6dsox_fsm_number_of_programs_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fsm_number_of_programs_set(const stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_fsm_number_of_programs_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fsm_number_of_programs_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_fsm_start_address_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fsm_start_address_set(const stmdev_ctx_t *ctx, uint16_t val); -int32_t lsm6dsox_fsm_start_address_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fsm_start_address_get(const stmdev_ctx_t *ctx, uint16_t *val); -int32_t lsm6dsox_mlc_status_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_mlc_status_get(const stmdev_ctx_t *ctx, lsm6dsox_mlc_status_mainpage_t *val); typedef enum @@ -4204,9 +4213,9 @@ typedef enum LSM6DSOX_ODR_PRGS_52Hz = 2, LSM6DSOX_ODR_PRGS_104Hz = 3, } lsm6dsox_mlc_odr_t; -int32_t lsm6dsox_mlc_data_rate_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_mlc_data_rate_set(const stmdev_ctx_t *ctx, lsm6dsox_mlc_odr_t val); -int32_t lsm6dsox_mlc_data_rate_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_mlc_data_rate_get(const stmdev_ctx_t *ctx, lsm6dsox_mlc_odr_t *val); typedef struct @@ -4230,7 +4239,7 @@ typedef struct lsm6dsox_sensor_hub_17_t sh_byte_17; lsm6dsox_sensor_hub_18_t sh_byte_18; } lsm6dsox_emb_sh_read_t; -int32_t lsm6dsox_sh_read_data_raw_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_read_data_raw_get(const stmdev_ctx_t *ctx, lsm6dsox_emb_sh_read_t *val, uint8_t len); @@ -4241,35 +4250,35 @@ typedef enum LSM6DSOX_SLV_0_1_2 = 2, LSM6DSOX_SLV_0_1_2_3 = 3, } lsm6dsox_aux_sens_on_t; -int32_t lsm6dsox_sh_slave_connected_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_slave_connected_set(const stmdev_ctx_t *ctx, lsm6dsox_aux_sens_on_t val); -int32_t lsm6dsox_sh_slave_connected_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_slave_connected_get(const stmdev_ctx_t *ctx, lsm6dsox_aux_sens_on_t *val); -int32_t lsm6dsox_sh_master_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_sh_master_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_sh_master_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_sh_master_get(const stmdev_ctx_t *ctx, uint8_t *val); typedef enum { LSM6DSOX_EXT_PULL_UP = 0, LSM6DSOX_INTERNAL_PULL_UP = 1, } lsm6dsox_shub_pu_en_t; -int32_t lsm6dsox_sh_pin_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_pin_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_shub_pu_en_t val); -int32_t lsm6dsox_sh_pin_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_pin_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_shub_pu_en_t *val); -int32_t lsm6dsox_sh_pass_through_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_sh_pass_through_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_sh_pass_through_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_sh_pass_through_get(const stmdev_ctx_t *ctx, uint8_t *val); typedef enum { LSM6DSOX_EXT_ON_INT2_PIN = 1, LSM6DSOX_XL_GY_DRDY = 0, } lsm6dsox_start_config_t; -int32_t lsm6dsox_sh_syncro_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_syncro_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_start_config_t val); -int32_t lsm6dsox_sh_syncro_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_syncro_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_start_config_t *val); typedef enum @@ -4277,13 +4286,13 @@ typedef enum LSM6DSOX_EACH_SH_CYCLE = 0, LSM6DSOX_ONLY_FIRST_CYCLE = 1, } lsm6dsox_write_once_t; -int32_t lsm6dsox_sh_write_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_write_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_write_once_t val); -int32_t lsm6dsox_sh_write_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_write_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_write_once_t *val); -int32_t lsm6dsox_sh_reset_set(stmdev_ctx_t *ctx); -int32_t lsm6dsox_sh_reset_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_sh_reset_set(const stmdev_ctx_t *ctx); +int32_t lsm6dsox_sh_reset_get(const stmdev_ctx_t *ctx, uint8_t *val); typedef enum { @@ -4292,9 +4301,9 @@ typedef enum LSM6DSOX_SH_ODR_26Hz = 2, LSM6DSOX_SH_ODR_13Hz = 3, } lsm6dsox_shub_odr_t; -int32_t lsm6dsox_sh_data_rate_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_data_rate_set(const stmdev_ctx_t *ctx, lsm6dsox_shub_odr_t val); -int32_t lsm6dsox_sh_data_rate_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_data_rate_get(const stmdev_ctx_t *ctx, lsm6dsox_shub_odr_t *val); typedef struct @@ -4303,7 +4312,7 @@ typedef struct uint8_t slv0_subadd; uint8_t slv0_data; } lsm6dsox_sh_cfg_write_t; -int32_t lsm6dsox_sh_cfg_write(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_cfg_write(const stmdev_ctx_t *ctx, lsm6dsox_sh_cfg_write_t *val); typedef struct @@ -4312,29 +4321,29 @@ typedef struct uint8_t slv_subadd; uint8_t slv_len; } lsm6dsox_sh_cfg_read_t; -int32_t lsm6dsox_sh_slv0_cfg_read(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_slv0_cfg_read(const stmdev_ctx_t *ctx, lsm6dsox_sh_cfg_read_t *val); -int32_t lsm6dsox_sh_slv1_cfg_read(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_slv1_cfg_read(const stmdev_ctx_t *ctx, lsm6dsox_sh_cfg_read_t *val); -int32_t lsm6dsox_sh_slv2_cfg_read(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_slv2_cfg_read(const stmdev_ctx_t *ctx, lsm6dsox_sh_cfg_read_t *val); -int32_t lsm6dsox_sh_slv3_cfg_read(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_slv3_cfg_read(const stmdev_ctx_t *ctx, lsm6dsox_sh_cfg_read_t *val); -int32_t lsm6dsox_sh_status_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_status_get(const stmdev_ctx_t *ctx, lsm6dsox_status_master_t *val); typedef enum { LSM6DSOX_S4S_TPH_7bit = 0, LSM6DSOX_S4S_TPH_15bit = 1, } lsm6dsox_s4s_tph_res_t; -int32_t lsm6dsox_s4s_tph_res_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_s4s_tph_res_set(const stmdev_ctx_t *ctx, lsm6dsox_s4s_tph_res_t val); -int32_t lsm6dsox_s4s_tph_res_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_s4s_tph_res_get(const stmdev_ctx_t *ctx, lsm6dsox_s4s_tph_res_t *val); -int32_t lsm6dsox_s4s_tph_val_set(stmdev_ctx_t *ctx, uint16_t val); -int32_t lsm6dsox_s4s_tph_val_get(stmdev_ctx_t *ctx, uint16_t *val); +int32_t lsm6dsox_s4s_tph_val_set(const stmdev_ctx_t *ctx, uint16_t val); +int32_t lsm6dsox_s4s_tph_val_get(const stmdev_ctx_t *ctx, uint16_t *val); typedef enum { @@ -4343,48 +4352,52 @@ typedef enum LSM6DSOX_S4S_DT_RES_13 = 2, LSM6DSOX_S4S_DT_RES_14 = 3, } lsm6dsox_s4s_res_ratio_t; -int32_t lsm6dsox_s4s_res_ratio_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_s4s_res_ratio_set(const stmdev_ctx_t *ctx, lsm6dsox_s4s_res_ratio_t val); -int32_t lsm6dsox_s4s_res_ratio_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_s4s_res_ratio_get(const stmdev_ctx_t *ctx, lsm6dsox_s4s_res_ratio_t *val); -int32_t lsm6dsox_s4s_command_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_s4s_command_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_s4s_command_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_s4s_command_get(const stmdev_ctx_t *ctx, uint8_t *val); -int32_t lsm6dsox_s4s_dt_set(stmdev_ctx_t *ctx, uint8_t val); -int32_t lsm6dsox_s4s_dt_get(stmdev_ctx_t *ctx, uint8_t *val); +int32_t lsm6dsox_s4s_dt_set(const stmdev_ctx_t *ctx, uint8_t val); +int32_t lsm6dsox_s4s_dt_get(const stmdev_ctx_t *ctx, uint8_t *val); typedef struct { uint8_t ui; uint8_t aux; } lsm6dsox_id_t; -int32_t lsm6dsox_id_get(stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, +int32_t lsm6dsox_id_get(const stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, lsm6dsox_id_t *val); +typedef enum +{ + LSM6DSOX_SEL_BY_HW = 0x00, /* bus mode select by HW (SPI 3W disable) */ + LSM6DSOX_SPI_4W = 0x06, /* Only SPI: SDO / SDI separated pins */ + LSM6DSOX_SPI_3W = 0x07, /* Only SPI: SDO / SDI share the same pin */ + LSM6DSOX_I2C = 0x04, /* Only I2C */ + LSM6DSOX_I3C_T_50us = 0x02, /* I3C: available time equal to 50 μs */ + LSM6DSOX_I3C_T_2us = 0x12, /* I3C: available time equal to 2 μs */ + LSM6DSOX_I3C_T_1ms = 0x22, /* I3C: available time equal to 1 ms */ + LSM6DSOX_I3C_T_25ms = 0x32, /* I3C: available time equal to 25 ms */ +} lsm6dsox_ui_bus_md_t; + +typedef enum +{ + LSM6DSOX_SPI_4W_AUX = 0x00, + LSM6DSOX_SPI_3W_AUX = 0x01, +} lsm6dsox_aux_bus_md_t; + typedef struct { - enum - { - LSM6DSOX_SEL_BY_HW = 0x00, /* bus mode select by HW (SPI 3W disable) */ - LSM6DSOX_SPI_4W = 0x06, /* Only SPI: SDO / SDI separated pins */ - LSM6DSOX_SPI_3W = 0x07, /* Only SPI: SDO / SDI share the same pin */ - LSM6DSOX_I2C = 0x04, /* Only I2C */ - LSM6DSOX_I3C_T_50us = 0x02, /* I3C: available time equal to 50 μs */ - LSM6DSOX_I3C_T_2us = 0x12, /* I3C: available time equal to 2 μs */ - LSM6DSOX_I3C_T_1ms = 0x22, /* I3C: available time equal to 1 ms */ - LSM6DSOX_I3C_T_25ms = 0x32, /* I3C: available time equal to 25 ms */ - } ui_bus_md; - enum - { - LSM6DSOX_SPI_4W_AUX = 0x00, - LSM6DSOX_SPI_3W_AUX = 0x01, - } aux_bus_md; + lsm6dsox_ui_bus_md_t ui_bus_md; + lsm6dsox_aux_bus_md_t aux_bus_md; } lsm6dsox_bus_mode_t; -int32_t lsm6dsox_bus_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_bus_mode_set(const stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, lsm6dsox_bus_mode_t val); -int32_t lsm6dsox_bus_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_bus_mode_get(const stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, lsm6dsox_bus_mode_t *val); @@ -4400,79 +4413,68 @@ typedef enum LSM6DSOX_TILT = 0x40, /* Tilt algo initialization request */ LSM6DSOX_SMOTION = 0x80, /* Significant Motion initialization request */ } lsm6dsox_init_t; -int32_t lsm6dsox_init_set(stmdev_ctx_t *ctx, lsm6dsox_init_t val); +int32_t lsm6dsox_init_set(const stmdev_ctx_t *ctx, lsm6dsox_init_t val); typedef struct { -uint8_t sw_reset : - 1; /* Restoring configuration registers */ + uint8_t sw_reset : 1; /* Restoring configuration registers */ uint8_t boot : 1; /* Restoring calibration parameters */ uint8_t drdy_xl : 1; /* Accelerometer data ready */ uint8_t drdy_g : 1; /* Gyroscope data ready */ uint8_t drdy_temp : 1; /* Temperature data ready */ uint8_t ois_drdy_xl : 1; /* Accelerometer data ready on OIS */ uint8_t ois_drdy_g : 1; /* Gyroscope data ready on OIS */ -uint8_t ois_gyro_settling : - 1; /* Gyroscope is in the settling phase */ + uint8_t ois_gyro_settling : 1; /* Gyroscope is in the settling phase */ } lsm6dsox_status_t; -int32_t lsm6dsox_status_get(stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, +int32_t lsm6dsox_status_get(const stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, lsm6dsox_status_t *val); typedef struct { uint8_t sdo_sa0_pull_up : 1; /* 1 = pull-up on SDO/SA0 pin */ -uint8_t aux_sdo_ocs_pull_up : - 1; /* 1 = pull-up on OCS_Aux/SDO_Aux pins */ + uint8_t aux_sdo_ocs_pull_up : 1; /* 1 = pull-up on OCS_Aux/SDO_Aux pins */ uint8_t int1_int2_push_pull : 1; /* 1 = push-pull / 0 = open-drain*/ -uint8_t int1_pull_down : - 1; /* 1 = pull-down always disabled (0=auto) */ + uint8_t int1_pull_down : 1; /* 1 = pull-down always disabled (0=auto) */ } lsm6dsox_pin_conf_t; -int32_t lsm6dsox_pin_conf_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pin_conf_set(const stmdev_ctx_t *ctx, lsm6dsox_pin_conf_t val); -int32_t lsm6dsox_pin_conf_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pin_conf_get(const stmdev_ctx_t *ctx, lsm6dsox_pin_conf_t *val); typedef struct { uint8_t active_low : 1; /* 1 = active low / 0 = active high */ -uint8_t base_latched : - 1; /* base functions are: FF, WU, 6D, Tap, Act/Inac */ -uint8_t emb_latched : - 1; /* emb functions are: Pedo, Tilt, SMot, Timestamp */ + uint8_t base_latched : 1; /* base functions are: FF, WU, 6D, Tap, Act/Inac */ + uint8_t emb_latched : 1; /* emb functions are: Pedo, Tilt, SMot, Timestamp */ } lsm6dsox_int_mode_t; -int32_t lsm6dsox_interrupt_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_interrupt_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_int_mode_t val); -int32_t lsm6dsox_interrupt_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_interrupt_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_int_mode_t *val); typedef struct { uint8_t drdy_xl : 1; /* Accelerometer data ready */ uint8_t drdy_g : 1; /* Gyroscope data ready */ -uint8_t drdy_temp : - 1; /* Temperature data ready (1 = int2 pin disable) */ + uint8_t drdy_temp : 1; /* Temperature data ready (1 = int2 pin disable) */ uint8_t boot : 1; /* Restoring calibration parameters */ uint8_t fifo_th : 1; /* FIFO threshold reached */ uint8_t fifo_ovr : 1; /* FIFO overrun */ uint8_t fifo_full : 1; /* FIFO full */ uint8_t fifo_bdr : 1; /* FIFO Batch counter threshold reached */ -uint8_t den_flag : - 1; /* external trigger level recognition (DEN) */ + uint8_t den_flag : 1; /* external trigger level recognition (DEN) */ uint8_t sh_endop : 1; /* sensor hub end operation */ -uint8_t timestamp : - 1; /* timestamp overflow (1 = int2 pin disable) */ + uint8_t timestamp : 1; /* timestamp overflow (1 = int2 pin disable) */ uint8_t six_d : 1; /* orientation change (6D/4D detection) */ uint8_t double_tap : 1; /* double-tap event */ uint8_t free_fall : 1; /* free fall event */ uint8_t wake_up : 1; /* wake up event */ uint8_t single_tap : 1; /* single-tap event */ -uint8_t sleep_change : - 1; /* Act/Inact (or Vice-versa) status changed */ + uint8_t sleep_change : 1; /* Act/Inact (or Vice-versa) status changed */ uint8_t step_detector : 1; /* Step detected */ uint8_t tilt : 1; /* Relative tilt event detected */ uint8_t sig_mot : 1; /* "significant motion" event detected */ -uint8_t fsm_lc : - 1; /* fsm long counter timeout interrupt event */ + uint8_t fsm_lc : 1; /* fsm long counter timeout interrupt event */ uint8_t fsm1 : 1; /* fsm 1 interrupt event */ uint8_t fsm2 : 1; /* fsm 2 interrupt event */ uint8_t fsm3 : 1; /* fsm 3 interrupt event */ @@ -4499,9 +4501,9 @@ uint8_t fsm_lc : uint8_t mlc8 : 1; /* mlc 8 interrupt event */ } lsm6dsox_pin_int1_route_t; -int32_t lsm6dsox_pin_int1_route_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pin_int1_route_set(const stmdev_ctx_t *ctx, lsm6dsox_pin_int1_route_t val); -int32_t lsm6dsox_pin_int1_route_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pin_int1_route_get(const stmdev_ctx_t *ctx, lsm6dsox_pin_int1_route_t *val); typedef struct @@ -4520,13 +4522,11 @@ typedef struct uint8_t free_fall : 1; /* free fall event */ uint8_t wake_up : 1; /* wake up event */ uint8_t single_tap : 1; /* single-tap event */ -uint8_t sleep_change : - 1; /* Act/Inact (or Vice-versa) status changed */ + uint8_t sleep_change : 1; /* Act/Inact (or Vice-versa) status changed */ uint8_t step_detector : 1; /* Step detected */ uint8_t tilt : 1; /* Relative tilt event detected */ uint8_t sig_mot : 1; /* "significant motion" event detected */ -uint8_t fsm_lc : - 1; /* fsm long counter timeout interrupt event */ + uint8_t fsm_lc : 1; /* fsm long counter timeout interrupt event */ uint8_t fsm1 : 1; /* fsm 1 interrupt event */ uint8_t fsm2 : 1; /* fsm 2 interrupt event */ uint8_t fsm3 : 1; /* fsm 3 interrupt event */ @@ -4553,10 +4553,10 @@ uint8_t fsm_lc : uint8_t mlc8 : 1; /* mlc 8 interrupt event */ } lsm6dsox_pin_int2_route_t; -int32_t lsm6dsox_pin_int2_route_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pin_int2_route_set(const stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, lsm6dsox_pin_int2_route_t val); -int32_t lsm6dsox_pin_int2_route_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pin_int2_route_get(const stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, lsm6dsox_pin_int2_route_t *val); @@ -4565,10 +4565,8 @@ typedef struct uint8_t drdy_xl : 1; /* Accelerometer data ready */ uint8_t drdy_g : 1; /* Gyroscope data ready */ uint8_t drdy_temp : 1; /* Temperature data ready */ -uint8_t den_flag : - 1; /* external trigger level recognition (DEN) */ -uint8_t timestamp : - 1; /* timestamp overflow (1 = int2 pin disable) */ + uint8_t den_flag : 1; /* external trigger level recognition (DEN) */ + uint8_t timestamp : 1; /* timestamp overflow (1 = int2 pin disable) */ uint8_t free_fall : 1; /* free fall event */ uint8_t wake_up : 1; /* wake up event */ uint8_t wake_up_z : 1; /* wake up on Z axis event */ @@ -4580,30 +4578,19 @@ uint8_t timestamp : uint8_t tap_y : 1; /* single-tap on Y axis event */ uint8_t tap_x : 1; /* single-tap on X axis event */ uint8_t tap_sign : 1; /* sign of tap event (0-pos / 1-neg) */ -uint8_t six_d : - 1; /* orientation change (6D/4D detection) */ -uint8_t six_d_xl : - 1; /* X-axis low 6D/4D event (under threshold) */ -uint8_t six_d_xh : - 1; /* X-axis high 6D/4D event (over threshold) */ -uint8_t six_d_yl : - 1; /* Y-axis low 6D/4D event (under threshold) */ -uint8_t six_d_yh : - 1; /* Y-axis high 6D/4D event (over threshold) */ -uint8_t six_d_zl : - 1; /* Z-axis low 6D/4D event (under threshold) */ -uint8_t six_d_zh : - 1; /* Z-axis high 6D/4D event (over threshold) */ -uint8_t sleep_change : - 1; /* Act/Inact (or Vice-versa) status changed */ -uint8_t sleep_state : - 1; /* Act/Inact status flag (0-Act / 1-Inact) */ + uint8_t six_d : 1; /* orientation change (6D/4D detection) */ + uint8_t six_d_xl : 1; /* X-axis low 6D/4D event (under threshold) */ + uint8_t six_d_xh : 1; /* X-axis high 6D/4D event (over threshold) */ + uint8_t six_d_yl : 1; /* Y-axis low 6D/4D event (under threshold) */ + uint8_t six_d_yh : 1; /* Y-axis high 6D/4D event (over threshold) */ + uint8_t six_d_zl : 1; /* Z-axis low 6D/4D event (under threshold) */ + uint8_t six_d_zh : 1; /* Z-axis high 6D/4D event (over threshold) */ + uint8_t sleep_change : 1; /* Act/Inact (or Vice-versa) status changed */ + uint8_t sleep_state : 1; /* Act/Inact status flag (0-Act / 1-Inact) */ uint8_t step_detector : 1; /* Step detected */ uint8_t tilt : 1; /* Relative tilt event detected */ -uint8_t sig_mot : - 1; /* "significant motion" event detected */ -uint8_t fsm_lc : - 1; /* fsm long counter timeout interrupt event */ + uint8_t sig_mot : 1; /* "significant motion" event detected */ + uint8_t fsm_lc : 1; /* fsm long counter timeout interrupt event */ uint8_t fsm1 : 1; /* fsm 1 interrupt event */ uint8_t fsm2 : 1; /* fsm 2 interrupt event */ uint8_t fsm3 : 1; /* fsm 3 interrupt event */ @@ -4629,183 +4616,186 @@ uint8_t fsm_lc : uint8_t mlc7 : 1; /* mlc 7 interrupt event */ uint8_t mlc8 : 1; /* mlc 8 interrupt event */ uint8_t sh_endop : 1; /* sensor hub end operation */ -uint8_t sh_slave0_nack : - 1; /* Not acknowledge on sensor hub slave 0 */ -uint8_t sh_slave1_nack : - 1; /* Not acknowledge on sensor hub slave 1 */ -uint8_t sh_slave2_nack : - 1; /* Not acknowledge on sensor hub slave 2 */ -uint8_t sh_slave3_nack : - 1; /* Not acknowledge on sensor hub slave 3 */ -uint8_t sh_wr_once : - 1; /* "WRITE_ONCE" end on sensor hub slave 0 */ -uint16_t fifo_diff : - 10; /* Number of unread sensor data in FIFO*/ + uint8_t sh_slave0_nack : 1; /* Not acknowledge on sensor hub slave 0 */ + uint8_t sh_slave1_nack : 1; /* Not acknowledge on sensor hub slave 1 */ + uint8_t sh_slave2_nack : 1; /* Not acknowledge on sensor hub slave 2 */ + uint8_t sh_slave3_nack : 1; /* Not acknowledge on sensor hub slave 3 */ + uint8_t sh_wr_once : 1; /* "WRITE_ONCE" end on sensor hub slave 0 */ + uint16_t fifo_diff : 10; /* Number of unread sensor data in FIFO*/ uint8_t fifo_ovr_latched : 1; /* Latched FIFO overrun status */ -uint8_t fifo_bdr : - 1; /* FIFO Batch counter threshold reached */ + uint8_t fifo_bdr : 1; /* FIFO Batch counter threshold reached */ uint8_t fifo_full : 1; /* FIFO full */ uint8_t fifo_ovr : 1; /* FIFO overrun */ uint8_t fifo_th : 1; /* FIFO threshold reached */ } lsm6dsox_all_sources_t; -int32_t lsm6dsox_all_sources_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_all_sources_get(const stmdev_ctx_t *ctx, lsm6dsox_all_sources_t *val); typedef struct { uint8_t odr_fine_tune; } lsm6dsox_dev_cal_t; -int32_t lsm6dsox_calibration_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_calibration_get(const stmdev_ctx_t *ctx, lsm6dsox_dev_cal_t *val); +typedef enum +{ + LSM6DSOX_XL_UI_OFF = 0x00, /* in power down */ + LSM6DSOX_XL_UI_1Hz6_LP = 0x1B, /* @1Hz6 (low power) */ + LSM6DSOX_XL_UI_1Hz6_ULP = 0x2B, /* @1Hz6 (ultra low/Gy, OIS imu off) */ + LSM6DSOX_XL_UI_12Hz5_HP = 0x01, /* @12Hz5 (high performance) */ + LSM6DSOX_XL_UI_12Hz5_LP = 0x11, /* @12Hz5 (low power) */ + LSM6DSOX_XL_UI_12Hz5_ULP = 0x21, /* @12Hz5 (ultra low/Gy, OIS imu off) */ + LSM6DSOX_XL_UI_26Hz_HP = 0x02, /* @26Hz (high performance) */ + LSM6DSOX_XL_UI_26Hz_LP = 0x12, /* @26Hz (low power) */ + LSM6DSOX_XL_UI_26Hz_ULP = 0x22, /* @26Hz (ultra low/Gy, OIS imu off) */ + LSM6DSOX_XL_UI_52Hz_HP = 0x03, /* @52Hz (high performance) */ + LSM6DSOX_XL_UI_52Hz_LP = 0x13, /* @52Hz (low power) */ + LSM6DSOX_XL_UI_52Hz_ULP = 0x23, /* @52Hz (ultra low/Gy, OIS imu off) */ + LSM6DSOX_XL_UI_104Hz_HP = 0x04, /* @104Hz (high performance) */ + LSM6DSOX_XL_UI_104Hz_NM = 0x14, /* @104Hz (normal mode) */ + LSM6DSOX_XL_UI_104Hz_ULP = 0x24, /* @104Hz (ultra low/Gy, OIS imu off) */ + LSM6DSOX_XL_UI_208Hz_HP = 0x05, /* @208Hz (high performance) */ + LSM6DSOX_XL_UI_208Hz_NM = 0x15, /* @208Hz (normal mode) */ + LSM6DSOX_XL_UI_208Hz_ULP = 0x25, /* @208Hz (ultra low/Gy, OIS imu off) */ + LSM6DSOX_XL_UI_416Hz_HP = 0x06, /* @416Hz (high performance) */ + LSM6DSOX_XL_UI_833Hz_HP = 0x07, /* @833Hz (high performance) */ + LSM6DSOX_XL_UI_1667Hz_HP = 0x08, /* @1kHz66 (high performance) */ + LSM6DSOX_XL_UI_3333Hz_HP = 0x09, /* @3kHz33 (high performance) */ + LSM6DSOX_XL_UI_6667Hz_HP = 0x0A, /* @6kHz66 (high performance) */ +} lsm6dsox_ui_xl_odr_t; + +typedef enum +{ + LSM6DSOX_XL_UI_2g = 0, + LSM6DSOX_XL_UI_4g = 2, + LSM6DSOX_XL_UI_8g = 3, + LSM6DSOX_XL_UI_16g = 1, /* OIS full scale is also forced to be 16g */ +} lsm6dsox_ui_xl_fs_t; + +typedef enum +{ + LSM6DSOX_GY_UI_OFF = 0x00, /* gy in power down */ + LSM6DSOX_GY_UI_12Hz5_LP = 0x11, /* gy @12Hz5 (low power) */ + LSM6DSOX_GY_UI_12Hz5_HP = 0x01, /* gy @12Hz5 (high performance) */ + LSM6DSOX_GY_UI_26Hz_LP = 0x12, /* gy @26Hz (low power) */ + LSM6DSOX_GY_UI_26Hz_HP = 0x02, /* gy @26Hz (high performance) */ + LSM6DSOX_GY_UI_52Hz_LP = 0x13, /* gy @52Hz (low power) */ + LSM6DSOX_GY_UI_52Hz_HP = 0x03, /* gy @52Hz (high performance) */ + LSM6DSOX_GY_UI_104Hz_NM = 0x14, /* gy @104Hz (low power) */ + LSM6DSOX_GY_UI_104Hz_HP = 0x04, /* gy @104Hz (high performance) */ + LSM6DSOX_GY_UI_208Hz_NM = 0x15, /* gy @208Hz (low power) */ + LSM6DSOX_GY_UI_208Hz_HP = 0x05, /* gy @208Hz (high performance) */ + LSM6DSOX_GY_UI_416Hz_HP = 0x06, /* gy @416Hz (high performance) */ + LSM6DSOX_GY_UI_833Hz_HP = 0x07, /* gy @833Hz (high performance) */ + LSM6DSOX_GY_UI_1667Hz_HP = 0x08, /* gy @1kHz66 (high performance) */ + LSM6DSOX_GY_UI_3333Hz_HP = 0x09, /* gy @3kHz33 (high performance) */ + LSM6DSOX_GY_UI_6667Hz_HP = 0x0A, /* gy @6kHz66 (high performance) */ +} lsm6dsox_ui_gy_odr_t; + +typedef enum +{ + LSM6DSOX_GY_UI_250dps = 0, + LSM6DSOX_GY_UI_125dps = 1, + LSM6DSOX_GY_UI_500dps = 2, + LSM6DSOX_GY_UI_1000dps = 4, + LSM6DSOX_GY_UI_2000dps = 6, +} lsm6dsox_ui_gy_fs_t; + +typedef enum +{ + LSM6DSOX_OIS_ONLY_AUX = 0x00, /* Auxiliary SPI full control */ + LSM6DSOX_OIS_ONLY_UI = 0x02, /* Primary interface full control */ + LSM6DSOX_OIS_MIXED = 0x01, /* Enabling by UI / read-config by AUX */ +} lsm6dsox_ois_ctrl_md_t; + +typedef enum +{ + LSM6DSOX_XL_OIS_OFF = 0x00, /* in power down */ + LSM6DSOX_XL_OIS_6667Hz_HP = 0x01, /* @6kHz OIS imu active/NO ULP on UI */ +} lsm6dsox_ois_xl_odr_t; + +typedef enum +{ + LSM6DSOX_XL_OIS_2g = 0, + LSM6DSOX_XL_OIS_4g = 2, + LSM6DSOX_XL_OIS_8g = 3, + LSM6DSOX_XL_OIS_16g = 1, /* UI full scale is also forced to be 16g */ +} lsm6dsox_ois_xl_fs_t; + +typedef enum +{ + LSM6DSOX_GY_OIS_OFF = 0x00, /* in power down */ + LSM6DSOX_GY_OIS_6667Hz_HP = 0x01, /* @6kHz No Ultra Low Power*/ +} lsm6dsox_ois_gy_odr_t; + +typedef enum +{ + LSM6DSOX_GY_OIS_250dps = 0, + LSM6DSOX_GY_OIS_125dps = 1, + LSM6DSOX_GY_OIS_500dps = 2, + LSM6DSOX_GY_OIS_1000dps = 4, + LSM6DSOX_GY_OIS_2000dps = 6, +} lsm6dsox_ois_gy_fs_t; + +typedef enum +{ + LSM6DSOX_FSM_DISABLE = 0x00, + LSM6DSOX_FSM_XL = 0x01, + LSM6DSOX_FSM_GY = 0x02, + LSM6DSOX_FSM_XL_GY = 0x03, +} lsm6dsox_fsm_sens_t; + +typedef enum +{ + LSM6DSOX_MLC_DISABLE = 0x00, + LSM6DSOX_MLC_XL = 0x01, + LSM6DSOX_MLC_XL_GY = 0x03, +} lsm6dsox_mlc_sens_t; + typedef struct { struct { struct { - enum - { - LSM6DSOX_XL_UI_OFF = 0x00, /* in power down */ - LSM6DSOX_XL_UI_1Hz6_LP = 0x1B, /* @1Hz6 (low power) */ - LSM6DSOX_XL_UI_1Hz6_ULP = 0x2B, /* @1Hz6 (ultra low/Gy, OIS imu off) */ - LSM6DSOX_XL_UI_12Hz5_HP = 0x01, /* @12Hz5 (high performance) */ - LSM6DSOX_XL_UI_12Hz5_LP = 0x11, /* @12Hz5 (low power) */ - LSM6DSOX_XL_UI_12Hz5_ULP = 0x21, /* @12Hz5 (ultra low/Gy, OIS imu off) */ - LSM6DSOX_XL_UI_26Hz_HP = 0x02, /* @26Hz (high performance) */ - LSM6DSOX_XL_UI_26Hz_LP = 0x12, /* @26Hz (low power) */ - LSM6DSOX_XL_UI_26Hz_ULP = 0x22, /* @26Hz (ultra low/Gy, OIS imu off) */ - LSM6DSOX_XL_UI_52Hz_HP = 0x03, /* @52Hz (high performance) */ - LSM6DSOX_XL_UI_52Hz_LP = 0x13, /* @52Hz (low power) */ - LSM6DSOX_XL_UI_52Hz_ULP = 0x23, /* @52Hz (ultra low/Gy, OIS imu off) */ - LSM6DSOX_XL_UI_104Hz_HP = 0x04, /* @104Hz (high performance) */ - LSM6DSOX_XL_UI_104Hz_NM = 0x14, /* @104Hz (normal mode) */ - LSM6DSOX_XL_UI_104Hz_ULP = 0x24, /* @104Hz (ultra low/Gy, OIS imu off) */ - LSM6DSOX_XL_UI_208Hz_HP = 0x05, /* @208Hz (high performance) */ - LSM6DSOX_XL_UI_208Hz_NM = 0x15, /* @208Hz (normal mode) */ - LSM6DSOX_XL_UI_208Hz_ULP = 0x25, /* @208Hz (ultra low/Gy, OIS imu off) */ - LSM6DSOX_XL_UI_416Hz_HP = 0x06, /* @416Hz (high performance) */ - LSM6DSOX_XL_UI_833Hz_HP = 0x07, /* @833Hz (high performance) */ - LSM6DSOX_XL_UI_1667Hz_HP = 0x08, /* @1kHz66 (high performance) */ - LSM6DSOX_XL_UI_3333Hz_HP = 0x09, /* @3kHz33 (high performance) */ - LSM6DSOX_XL_UI_6667Hz_HP = 0x0A, /* @6kHz66 (high performance) */ - } odr; - enum - { - LSM6DSOX_XL_UI_2g = 0, - LSM6DSOX_XL_UI_4g = 2, - LSM6DSOX_XL_UI_8g = 3, - LSM6DSOX_XL_UI_16g = 1, /* OIS full scale is also forced to be 16g */ - } fs; + lsm6dsox_ui_xl_odr_t odr; + lsm6dsox_ui_xl_fs_t fs; } xl; struct { - enum - { - LSM6DSOX_GY_UI_OFF = 0x00, /* gy in power down */ - LSM6DSOX_GY_UI_12Hz5_LP = 0x11, /* gy @12Hz5 (low power) */ - LSM6DSOX_GY_UI_12Hz5_HP = 0x01, /* gy @12Hz5 (high performance) */ - LSM6DSOX_GY_UI_26Hz_LP = 0x12, /* gy @26Hz (low power) */ - LSM6DSOX_GY_UI_26Hz_HP = 0x02, /* gy @26Hz (high performance) */ - LSM6DSOX_GY_UI_52Hz_LP = 0x13, /* gy @52Hz (low power) */ - LSM6DSOX_GY_UI_52Hz_HP = 0x03, /* gy @52Hz (high performance) */ - LSM6DSOX_GY_UI_104Hz_NM = 0x14, /* gy @104Hz (low power) */ - LSM6DSOX_GY_UI_104Hz_HP = 0x04, /* gy @104Hz (high performance) */ - LSM6DSOX_GY_UI_208Hz_NM = 0x15, /* gy @208Hz (low power) */ - LSM6DSOX_GY_UI_208Hz_HP = 0x05, /* gy @208Hz (high performance) */ - LSM6DSOX_GY_UI_416Hz_HP = 0x06, /* gy @416Hz (high performance) */ - LSM6DSOX_GY_UI_833Hz_HP = 0x07, /* gy @833Hz (high performance) */ - LSM6DSOX_GY_UI_1667Hz_HP = 0x08, /* gy @1kHz66 (high performance) */ - LSM6DSOX_GY_UI_3333Hz_HP = 0x09, /* gy @3kHz33 (high performance) */ - LSM6DSOX_GY_UI_6667Hz_HP = 0x0A, /* gy @6kHz66 (high performance) */ - } odr; - enum - { - LSM6DSOX_GY_UI_250dps = 0, - LSM6DSOX_GY_UI_125dps = 1, - LSM6DSOX_GY_UI_500dps = 2, - LSM6DSOX_GY_UI_1000dps = 4, - LSM6DSOX_GY_UI_2000dps = 6, - } fs; + lsm6dsox_ui_gy_odr_t odr; + lsm6dsox_ui_gy_fs_t fs; } gy; } ui; struct { - enum - { - LSM6DSOX_OIS_ONLY_AUX = 0x00, /* Auxiliary SPI full control */ - LSM6DSOX_OIS_ONLY_UI = 0x02, /* Primary interface full control */ - LSM6DSOX_OIS_MIXED = 0x01, /* Enabling by UI / read-config by AUX */ - } ctrl_md; + lsm6dsox_ois_ctrl_md_t ctrl_md; struct { - enum - { - LSM6DSOX_XL_OIS_OFF = 0x00, /* in power down */ - LSM6DSOX_XL_OIS_6667Hz_HP = 0x01, /* @6kHz OIS imu active/NO ULP on UI */ - } odr; - enum - { - LSM6DSOX_XL_OIS_2g = 0, - LSM6DSOX_XL_OIS_4g = 2, - LSM6DSOX_XL_OIS_8g = 3, - LSM6DSOX_XL_OIS_16g = 1, /* UI full scale is also forced to be 16g */ - } fs; + lsm6dsox_ois_xl_odr_t odr; + lsm6dsox_ois_xl_fs_t fs; } xl; struct { - enum - { - LSM6DSOX_GY_OIS_OFF = 0x00, /* in power down */ - LSM6DSOX_GY_OIS_6667Hz_HP = 0x01, /* @6kHz No Ultra Low Power*/ - } odr; - enum - { - LSM6DSOX_GY_OIS_250dps = 0, - LSM6DSOX_GY_OIS_125dps = 1, - LSM6DSOX_GY_OIS_500dps = 2, - LSM6DSOX_GY_OIS_1000dps = 4, - LSM6DSOX_GY_OIS_2000dps = 6, - } fs; + lsm6dsox_ois_gy_odr_t odr; + lsm6dsox_ois_gy_fs_t fs; } gy; } ois; struct { - enum - { - LSM6DSOX_FSM_DISABLE = 0x00, - LSM6DSOX_FSM_XL = 0x01, - LSM6DSOX_FSM_GY = 0x02, - LSM6DSOX_FSM_XL_GY = 0x03, - } sens; - enum - { - LSM6DSOX_FSM_12Hz5 = 0x00, - LSM6DSOX_FSM_26Hz = 0x01, - LSM6DSOX_FSM_52Hz = 0x02, - LSM6DSOX_FSM_104Hz = 0x03, - } odr; + lsm6dsox_fsm_sens_t sens; + lsm6dsox_fsm_odr_t odr; } fsm; struct { - enum - { - LSM6DSOX_MLC_DISABLE = 0x00, - LSM6DSOX_MLC_XL = 0x01, - LSM6DSOX_MLC_XL_GY = 0x03, - } sens; - enum - { - LSM6DSOX_MLC_12Hz5 = 0x00, - LSM6DSOX_MLC_26Hz = 0x01, - LSM6DSOX_MLC_52Hz = 0x02, - LSM6DSOX_MLC_104Hz = 0x03, - } odr; + lsm6dsox_mlc_sens_t sens; + lsm6dsox_mlc_odr_t odr; } mlc; } lsm6dsox_md_t; -int32_t lsm6dsox_mode_set(stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, +int32_t lsm6dsox_mode_set(const stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, lsm6dsox_md_t *val); -int32_t lsm6dsox_mode_get(stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, +int32_t lsm6dsox_mode_get(const stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, lsm6dsox_md_t *val); typedef struct @@ -4842,7 +4832,7 @@ typedef struct } gy; } ois; } lsm6dsox_data_t; -int32_t lsm6dsox_data_get(stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, +int32_t lsm6dsox_data_get(const stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, lsm6dsox_md_t *md, lsm6dsox_data_t *data); typedef struct @@ -4854,11 +4844,11 @@ typedef struct uint8_t fsm : 1; /* finite state machine */ uint8_t fifo_compr : 1; /* mlc 8 interrupt event */ } lsm6dsox_emb_sens_t; -int32_t lsm6dsox_embedded_sens_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_embedded_sens_set(const stmdev_ctx_t *ctx, lsm6dsox_emb_sens_t *emb_sens); -int32_t lsm6dsox_embedded_sens_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_embedded_sens_get(const stmdev_ctx_t *ctx, lsm6dsox_emb_sens_t *emb_sens); -int32_t lsm6dsox_embedded_sens_off(stmdev_ctx_t *ctx); +int32_t lsm6dsox_embedded_sens_off(const stmdev_ctx_t *ctx); /** * @} @@ -4871,6 +4861,4 @@ int32_t lsm6dsox_embedded_sens_off(stmdev_ctx_t *ctx); #endif /*LSM6DSOX_DRIVER_H */ - /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ - diff --git a/drivers/CoreIMU/extern/source/lsm6dsox_reg.c b/drivers/CoreIMU/extern/source/lsm6dsox_reg.c index 0cff1dc515..38b65cd97c 100644 --- a/drivers/CoreIMU/extern/source/lsm6dsox_reg.c +++ b/drivers/CoreIMU/extern/source/lsm6dsox_reg.c @@ -48,12 +48,17 @@ * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_read_reg(stmdev_ctx_t *ctx, uint8_t reg, - uint8_t *data, - uint16_t len) +int32_t __weak lsm6dsox_read_reg(const stmdev_ctx_t *ctx, uint8_t reg, + uint8_t *data, + uint16_t len) { int32_t ret; + if (ctx == NULL) + { + return -1; + } + ret = ctx->read_reg(ctx->handle, reg, data, len); return ret; @@ -69,12 +74,17 @@ int32_t lsm6dsox_read_reg(stmdev_ctx_t *ctx, uint8_t reg, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_write_reg(stmdev_ctx_t *ctx, uint8_t reg, - uint8_t *data, - uint16_t len) +int32_t __weak lsm6dsox_write_reg(const stmdev_ctx_t *ctx, uint8_t reg, + uint8_t *data, + uint16_t len) { int32_t ret; + if (ctx == NULL) + { + return -1; + } + ret = ctx->write_reg(ctx->handle, reg, data, len); return ret; @@ -186,7 +196,7 @@ float_t lsm6dsox_from_lsb_to_nsec(int16_t lsb) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_xl_full_scale_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_full_scale_set(const stmdev_ctx_t *ctx, lsm6dsox_fs_xl_t val) { lsm6dsox_ctrl1_xl_t reg; @@ -211,7 +221,7 @@ int32_t lsm6dsox_xl_full_scale_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_xl_full_scale_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_full_scale_get(const stmdev_ctx_t *ctx, lsm6dsox_fs_xl_t *val) { lsm6dsox_ctrl1_xl_t reg; @@ -253,7 +263,7 @@ int32_t lsm6dsox_xl_full_scale_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_xl_data_rate_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_data_rate_set(const stmdev_ctx_t *ctx, lsm6dsox_odr_xl_t val) { lsm6dsox_odr_xl_t odr_xl = val; @@ -509,7 +519,7 @@ int32_t lsm6dsox_xl_data_rate_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_xl_data_rate_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_data_rate_get(const stmdev_ctx_t *ctx, lsm6dsox_odr_xl_t *val) { lsm6dsox_ctrl1_xl_t reg; @@ -583,7 +593,7 @@ int32_t lsm6dsox_xl_data_rate_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_gy_full_scale_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_gy_full_scale_set(const stmdev_ctx_t *ctx, lsm6dsox_fs_g_t val) { lsm6dsox_ctrl2_g_t reg; @@ -608,7 +618,7 @@ int32_t lsm6dsox_gy_full_scale_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_gy_full_scale_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_gy_full_scale_get(const stmdev_ctx_t *ctx, lsm6dsox_fs_g_t *val) { lsm6dsox_ctrl2_g_t reg; @@ -654,7 +664,7 @@ int32_t lsm6dsox_gy_full_scale_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_gy_data_rate_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_gy_data_rate_set(const stmdev_ctx_t *ctx, lsm6dsox_odr_g_t val) { lsm6dsox_odr_g_t odr_gy = val; @@ -910,7 +920,7 @@ int32_t lsm6dsox_gy_data_rate_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_gy_data_rate_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_gy_data_rate_get(const stmdev_ctx_t *ctx, lsm6dsox_odr_g_t *val) { lsm6dsox_ctrl2_g_t reg; @@ -980,7 +990,7 @@ int32_t lsm6dsox_gy_data_rate_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_block_data_update_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_block_data_update_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_ctrl3_c_t reg; int32_t ret; @@ -1004,7 +1014,7 @@ int32_t lsm6dsox_block_data_update_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_block_data_update_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_block_data_update_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_ctrl3_c_t reg; @@ -1025,7 +1035,7 @@ int32_t lsm6dsox_block_data_update_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_xl_offset_weight_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_offset_weight_set(const stmdev_ctx_t *ctx, lsm6dsox_usr_off_w_t val) { lsm6dsox_ctrl6_c_t reg; @@ -1051,7 +1061,7 @@ int32_t lsm6dsox_xl_offset_weight_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_xl_offset_weight_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_offset_weight_get(const stmdev_ctx_t *ctx, lsm6dsox_usr_off_w_t *val) { lsm6dsox_ctrl6_c_t reg; @@ -1086,7 +1096,7 @@ int32_t lsm6dsox_xl_offset_weight_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_xl_power_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_power_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_xl_hm_mode_t val) { lsm6dsox_ctrl5_c_t ctrl5_c; @@ -1123,7 +1133,7 @@ int32_t lsm6dsox_xl_power_mode_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_xl_power_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_power_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_xl_hm_mode_t *val) { lsm6dsox_ctrl5_c_t ctrl5_c; @@ -1167,7 +1177,7 @@ int32_t lsm6dsox_xl_power_mode_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_gy_power_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_gy_power_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_g_hm_mode_t val) { lsm6dsox_ctrl7_g_t reg; @@ -1192,7 +1202,7 @@ int32_t lsm6dsox_gy_power_mode_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_gy_power_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_gy_power_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_g_hm_mode_t *val) { lsm6dsox_ctrl7_g_t reg; @@ -1226,7 +1236,7 @@ int32_t lsm6dsox_gy_power_mode_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_status_reg_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_status_reg_get(const stmdev_ctx_t *ctx, lsm6dsox_status_reg_t *val) { int32_t ret; @@ -1244,7 +1254,7 @@ int32_t lsm6dsox_status_reg_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_xl_flag_data_ready_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_flag_data_ready_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_status_reg_t reg; @@ -1264,7 +1274,7 @@ int32_t lsm6dsox_xl_flag_data_ready_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_gy_flag_data_ready_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_gy_flag_data_ready_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_status_reg_t reg; @@ -1284,7 +1294,7 @@ int32_t lsm6dsox_gy_flag_data_ready_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_temp_flag_data_ready_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_temp_flag_data_ready_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_status_reg_t reg; @@ -1306,7 +1316,7 @@ int32_t lsm6dsox_temp_flag_data_ready_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_xl_usr_offset_x_set(stmdev_ctx_t *ctx, uint8_t *buff) +int32_t lsm6dsox_xl_usr_offset_x_set(const stmdev_ctx_t *ctx, uint8_t *buff) { int32_t ret; @@ -1325,7 +1335,7 @@ int32_t lsm6dsox_xl_usr_offset_x_set(stmdev_ctx_t *ctx, uint8_t *buff) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_xl_usr_offset_x_get(stmdev_ctx_t *ctx, uint8_t *buff) +int32_t lsm6dsox_xl_usr_offset_x_get(const stmdev_ctx_t *ctx, uint8_t *buff) { int32_t ret; @@ -1344,7 +1354,7 @@ int32_t lsm6dsox_xl_usr_offset_x_get(stmdev_ctx_t *ctx, uint8_t *buff) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_xl_usr_offset_y_set(stmdev_ctx_t *ctx, uint8_t *buff) +int32_t lsm6dsox_xl_usr_offset_y_set(const stmdev_ctx_t *ctx, uint8_t *buff) { int32_t ret; @@ -1363,7 +1373,7 @@ int32_t lsm6dsox_xl_usr_offset_y_set(stmdev_ctx_t *ctx, uint8_t *buff) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_xl_usr_offset_y_get(stmdev_ctx_t *ctx, uint8_t *buff) +int32_t lsm6dsox_xl_usr_offset_y_get(const stmdev_ctx_t *ctx, uint8_t *buff) { int32_t ret; @@ -1382,7 +1392,7 @@ int32_t lsm6dsox_xl_usr_offset_y_get(stmdev_ctx_t *ctx, uint8_t *buff) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_xl_usr_offset_z_set(stmdev_ctx_t *ctx, uint8_t *buff) +int32_t lsm6dsox_xl_usr_offset_z_set(const stmdev_ctx_t *ctx, uint8_t *buff) { int32_t ret; @@ -1401,7 +1411,7 @@ int32_t lsm6dsox_xl_usr_offset_z_set(stmdev_ctx_t *ctx, uint8_t *buff) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_xl_usr_offset_z_get(stmdev_ctx_t *ctx, uint8_t *buff) +int32_t lsm6dsox_xl_usr_offset_z_get(const stmdev_ctx_t *ctx, uint8_t *buff) { int32_t ret; @@ -1418,7 +1428,7 @@ int32_t lsm6dsox_xl_usr_offset_z_get(stmdev_ctx_t *ctx, uint8_t *buff) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_xl_usr_offset_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_xl_usr_offset_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_ctrl7_g_t reg; int32_t ret; @@ -1442,7 +1452,7 @@ int32_t lsm6dsox_xl_usr_offset_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_xl_usr_offset_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_xl_usr_offset_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_ctrl7_g_t reg; int32_t ret; @@ -1473,7 +1483,7 @@ int32_t lsm6dsox_xl_usr_offset_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval Interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_timestamp_rst(stmdev_ctx_t *ctx) +int32_t lsm6dsox_timestamp_rst(const stmdev_ctx_t *ctx) { uint8_t rst_val = 0xAA; return lsm6dsox_write_reg(ctx, LSM6DSOX_TIMESTAMP2, &rst_val, 1); @@ -1487,7 +1497,7 @@ int32_t lsm6dsox_timestamp_rst(stmdev_ctx_t *ctx) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_timestamp_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_timestamp_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_ctrl10_c_t reg; int32_t ret; @@ -1511,7 +1521,7 @@ int32_t lsm6dsox_timestamp_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_timestamp_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_timestamp_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_ctrl10_c_t reg; int32_t ret; @@ -1532,7 +1542,7 @@ int32_t lsm6dsox_timestamp_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_timestamp_raw_get(stmdev_ctx_t *ctx, uint32_t *val) +int32_t lsm6dsox_timestamp_raw_get(const stmdev_ctx_t *ctx, uint32_t *val) { uint8_t buff[4]; int32_t ret; @@ -1567,7 +1577,7 @@ int32_t lsm6dsox_timestamp_raw_get(stmdev_ctx_t *ctx, uint32_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_rounding_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_rounding_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_rounding_t val) { lsm6dsox_ctrl5_c_t reg; @@ -1592,7 +1602,7 @@ int32_t lsm6dsox_rounding_mode_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_rounding_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_rounding_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_rounding_t *val) { lsm6dsox_ctrl5_c_t reg; @@ -1644,7 +1654,7 @@ int32_t lsm6dsox_rounding_mode_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_rounding_on_status_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_rounding_on_status_set(const stmdev_ctx_t *ctx, lsm6dsox_rounding_status_t val) { lsm6dsox_ctrl5_c_t reg; @@ -1679,7 +1689,7 @@ int32_t lsm6dsox_rounding_on_status_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_rounding_on_status_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_rounding_on_status_get(const stmdev_ctx_t *ctx, lsm6dsox_rounding_status_t *val) { lsm6dsox_ctrl5_c_t reg; @@ -1715,7 +1725,7 @@ int32_t lsm6dsox_rounding_on_status_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_temperature_raw_get(stmdev_ctx_t *ctx, int16_t *val) +int32_t lsm6dsox_temperature_raw_get(const stmdev_ctx_t *ctx, int16_t *val) { uint8_t buff[2]; int32_t ret; @@ -1736,7 +1746,7 @@ int32_t lsm6dsox_temperature_raw_get(stmdev_ctx_t *ctx, int16_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_angular_rate_raw_get(stmdev_ctx_t *ctx, int16_t *val) +int32_t lsm6dsox_angular_rate_raw_get(const stmdev_ctx_t *ctx, int16_t *val) { uint8_t buff[6]; int32_t ret; @@ -1761,7 +1771,7 @@ int32_t lsm6dsox_angular_rate_raw_get(stmdev_ctx_t *ctx, int16_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_acceleration_raw_get(stmdev_ctx_t *ctx, int16_t *val) +int32_t lsm6dsox_acceleration_raw_get(const stmdev_ctx_t *ctx, int16_t *val) { uint8_t buff[6]; int32_t ret; @@ -1785,7 +1795,7 @@ int32_t lsm6dsox_acceleration_raw_get(stmdev_ctx_t *ctx, int16_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fifo_out_raw_get(stmdev_ctx_t *ctx, uint8_t *buff) +int32_t lsm6dsox_fifo_out_raw_get(const stmdev_ctx_t *ctx, uint8_t *buff) { int32_t ret; @@ -1804,7 +1814,7 @@ int32_t lsm6dsox_fifo_out_raw_get(stmdev_ctx_t *ctx, uint8_t *buff) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_ois_angular_rate_raw_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_ois_angular_rate_raw_get(const stmdev_ctx_t *ctx, int16_t *val) { uint8_t buff[6]; @@ -1831,7 +1841,7 @@ int32_t lsm6dsox_ois_angular_rate_raw_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_ois_acceleration_raw_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_ois_acceleration_raw_get(const stmdev_ctx_t *ctx, int16_t *val) { uint8_t buff[6]; @@ -1859,7 +1869,7 @@ int32_t lsm6dsox_ois_acceleration_raw_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_temperature_raw_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_temperature_raw_get(const stmdev_ctx_t *ctx, int16_t *val) { uint8_t buff[2]; @@ -1883,7 +1893,7 @@ int32_t lsm6dsox_aux_temperature_raw_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_ois_angular_rate_raw_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_ois_angular_rate_raw_get(const stmdev_ctx_t *ctx, int16_t *val) { uint8_t buff[6]; @@ -1911,7 +1921,7 @@ int32_t lsm6dsox_aux_ois_angular_rate_raw_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_ois_acceleration_raw_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_ois_acceleration_raw_get(const stmdev_ctx_t *ctx, int16_t *val) { uint8_t buff[6]; @@ -1936,7 +1946,7 @@ int32_t lsm6dsox_aux_ois_acceleration_raw_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_number_of_steps_get(stmdev_ctx_t *ctx, uint16_t *val) +int32_t lsm6dsox_number_of_steps_get(const stmdev_ctx_t *ctx, uint16_t *val) { uint8_t buff[2]; int32_t ret; @@ -1965,7 +1975,7 @@ int32_t lsm6dsox_number_of_steps_get(stmdev_ctx_t *ctx, uint16_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_steps_reset(stmdev_ctx_t *ctx) +int32_t lsm6dsox_steps_reset(const stmdev_ctx_t *ctx) { lsm6dsox_emb_func_src_t reg; int32_t ret; @@ -1999,7 +2009,7 @@ int32_t lsm6dsox_steps_reset(stmdev_ctx_t *ctx) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_mlc_out_get(stmdev_ctx_t *ctx, uint8_t *buff) +int32_t lsm6dsox_mlc_out_get(const stmdev_ctx_t *ctx, uint8_t *buff) { int32_t ret; @@ -2041,7 +2051,7 @@ int32_t lsm6dsox_mlc_out_get(stmdev_ctx_t *ctx, uint8_t *buff) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_odr_cal_reg_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_odr_cal_reg_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_internal_freq_fine_t reg; int32_t ret; @@ -2069,7 +2079,7 @@ int32_t lsm6dsox_odr_cal_reg_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_odr_cal_reg_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_odr_cal_reg_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_internal_freq_fine_t reg; int32_t ret; @@ -2092,7 +2102,7 @@ int32_t lsm6dsox_odr_cal_reg_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_mem_bank_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_mem_bank_set(const stmdev_ctx_t *ctx, lsm6dsox_reg_access_t val) { lsm6dsox_func_cfg_access_t reg; @@ -2121,7 +2131,7 @@ int32_t lsm6dsox_mem_bank_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_mem_bank_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_mem_bank_get(const stmdev_ctx_t *ctx, lsm6dsox_reg_access_t *val) { lsm6dsox_func_cfg_access_t reg; @@ -2161,7 +2171,7 @@ int32_t lsm6dsox_mem_bank_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_ln_pg_write_byte(stmdev_ctx_t *ctx, uint16_t address, +int32_t lsm6dsox_ln_pg_write_byte(const stmdev_ctx_t *ctx, uint16_t address, uint8_t *val) { lsm6dsox_page_rw_t page_rw; @@ -2236,7 +2246,7 @@ int32_t lsm6dsox_ln_pg_write_byte(stmdev_ctx_t *ctx, uint16_t address, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_ln_pg_write(stmdev_ctx_t *ctx, uint16_t address, +int32_t lsm6dsox_ln_pg_write(const stmdev_ctx_t *ctx, uint16_t address, uint8_t *buf, uint8_t len) { lsm6dsox_page_rw_t page_rw; @@ -2338,7 +2348,7 @@ int32_t lsm6dsox_ln_pg_write(stmdev_ctx_t *ctx, uint16_t address, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_ln_pg_read_byte(stmdev_ctx_t *ctx, uint16_t address, +int32_t lsm6dsox_ln_pg_read_byte(const stmdev_ctx_t *ctx, uint16_t address, uint8_t *val) { lsm6dsox_page_rw_t page_rw; @@ -2413,7 +2423,7 @@ int32_t lsm6dsox_ln_pg_read_byte(stmdev_ctx_t *ctx, uint16_t address, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_data_ready_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_data_ready_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_dataready_pulsed_t val) { lsm6dsox_counter_bdr_reg1_t reg; @@ -2442,7 +2452,7 @@ int32_t lsm6dsox_data_ready_mode_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_data_ready_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_data_ready_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_dataready_pulsed_t *val) { lsm6dsox_counter_bdr_reg1_t reg; @@ -2477,7 +2487,7 @@ int32_t lsm6dsox_data_ready_mode_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_device_id_get(stmdev_ctx_t *ctx, uint8_t *buff) +int32_t lsm6dsox_device_id_get(const stmdev_ctx_t *ctx, uint8_t *buff) { int32_t ret; @@ -2495,7 +2505,7 @@ int32_t lsm6dsox_device_id_get(stmdev_ctx_t *ctx, uint8_t *buff) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_reset_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_reset_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_ctrl3_c_t reg; int32_t ret; @@ -2519,7 +2529,7 @@ int32_t lsm6dsox_reset_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_reset_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_reset_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_ctrl3_c_t reg; int32_t ret; @@ -2539,7 +2549,7 @@ int32_t lsm6dsox_reset_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_auto_increment_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_auto_increment_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_ctrl3_c_t reg; int32_t ret; @@ -2564,7 +2574,7 @@ int32_t lsm6dsox_auto_increment_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_auto_increment_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_auto_increment_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_ctrl3_c_t reg; int32_t ret; @@ -2583,7 +2593,7 @@ int32_t lsm6dsox_auto_increment_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_boot_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_boot_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_ctrl3_c_t reg; int32_t ret; @@ -2607,7 +2617,7 @@ int32_t lsm6dsox_boot_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_boot_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_boot_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_ctrl3_c_t reg; int32_t ret; @@ -2626,7 +2636,7 @@ int32_t lsm6dsox_boot_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_xl_self_test_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_self_test_set(const stmdev_ctx_t *ctx, lsm6dsox_st_xl_t val) { lsm6dsox_ctrl5_c_t reg; @@ -2651,7 +2661,7 @@ int32_t lsm6dsox_xl_self_test_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_xl_self_test_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_self_test_get(const stmdev_ctx_t *ctx, lsm6dsox_st_xl_t *val) { lsm6dsox_ctrl5_c_t reg; @@ -2689,7 +2699,7 @@ int32_t lsm6dsox_xl_self_test_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_gy_self_test_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_gy_self_test_set(const stmdev_ctx_t *ctx, lsm6dsox_st_g_t val) { lsm6dsox_ctrl5_c_t reg; @@ -2714,7 +2724,7 @@ int32_t lsm6dsox_gy_self_test_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_gy_self_test_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_gy_self_test_get(const stmdev_ctx_t *ctx, lsm6dsox_st_g_t *val) { lsm6dsox_ctrl5_c_t reg; @@ -2765,7 +2775,7 @@ int32_t lsm6dsox_gy_self_test_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_xl_filter_lp2_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_xl_filter_lp2_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_ctrl1_xl_t reg; int32_t ret; @@ -2789,7 +2799,7 @@ int32_t lsm6dsox_xl_filter_lp2_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_xl_filter_lp2_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_xl_filter_lp2_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_ctrl1_xl_t reg; int32_t ret; @@ -2810,7 +2820,7 @@ int32_t lsm6dsox_xl_filter_lp2_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_gy_filter_lp1_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_gy_filter_lp1_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_ctrl4_c_t reg; int32_t ret; @@ -2836,7 +2846,7 @@ int32_t lsm6dsox_gy_filter_lp1_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_gy_filter_lp1_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_gy_filter_lp1_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_ctrl4_c_t reg; int32_t ret; @@ -2856,7 +2866,7 @@ int32_t lsm6dsox_gy_filter_lp1_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_filter_settling_mask_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_filter_settling_mask_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_ctrl4_c_t reg; @@ -2882,7 +2892,7 @@ int32_t lsm6dsox_filter_settling_mask_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_filter_settling_mask_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_filter_settling_mask_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_ctrl4_c_t reg; @@ -2902,7 +2912,7 @@ int32_t lsm6dsox_filter_settling_mask_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_gy_lp1_bandwidth_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_gy_lp1_bandwidth_set(const stmdev_ctx_t *ctx, lsm6dsox_ftype_t val) { lsm6dsox_ctrl6_c_t reg; @@ -2927,7 +2937,7 @@ int32_t lsm6dsox_gy_lp1_bandwidth_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_gy_lp1_bandwidth_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_gy_lp1_bandwidth_get(const stmdev_ctx_t *ctx, lsm6dsox_ftype_t *val) { lsm6dsox_ctrl6_c_t reg; @@ -2985,7 +2995,7 @@ int32_t lsm6dsox_gy_lp1_bandwidth_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_xl_lp2_on_6d_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_xl_lp2_on_6d_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_ctrl8_xl_t reg; int32_t ret; @@ -3009,7 +3019,7 @@ int32_t lsm6dsox_xl_lp2_on_6d_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_xl_lp2_on_6d_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_xl_lp2_on_6d_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_ctrl8_xl_t reg; int32_t ret; @@ -3030,7 +3040,7 @@ int32_t lsm6dsox_xl_lp2_on_6d_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_xl_hp_path_on_out_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_hp_path_on_out_set(const stmdev_ctx_t *ctx, lsm6dsox_hp_slope_xl_en_t val) { lsm6dsox_ctrl8_xl_t reg; @@ -3059,7 +3069,7 @@ int32_t lsm6dsox_xl_hp_path_on_out_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_xl_hp_path_on_out_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_hp_path_on_out_get(const stmdev_ctx_t *ctx, lsm6dsox_hp_slope_xl_en_t *val) { lsm6dsox_ctrl8_xl_t reg; @@ -3181,7 +3191,7 @@ int32_t lsm6dsox_xl_hp_path_on_out_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_xl_fast_settling_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_xl_fast_settling_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_ctrl8_xl_t reg; int32_t ret; @@ -3207,7 +3217,7 @@ int32_t lsm6dsox_xl_fast_settling_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_xl_fast_settling_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_xl_fast_settling_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_ctrl8_xl_t reg; int32_t ret; @@ -3227,7 +3237,7 @@ int32_t lsm6dsox_xl_fast_settling_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_xl_hp_path_internal_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_hp_path_internal_set(const stmdev_ctx_t *ctx, lsm6dsox_slope_fds_t val) { lsm6dsox_tap_cfg0_t reg; @@ -3253,7 +3263,7 @@ int32_t lsm6dsox_xl_hp_path_internal_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_xl_hp_path_internal_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_hp_path_internal_get(const stmdev_ctx_t *ctx, lsm6dsox_slope_fds_t *val) { lsm6dsox_tap_cfg0_t reg; @@ -3289,7 +3299,7 @@ int32_t lsm6dsox_xl_hp_path_internal_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_gy_hp_path_internal_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_gy_hp_path_internal_set(const stmdev_ctx_t *ctx, lsm6dsox_hpm_g_t val) { lsm6dsox_ctrl7_g_t reg; @@ -3317,7 +3327,7 @@ int32_t lsm6dsox_gy_hp_path_internal_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_gy_hp_path_internal_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_gy_hp_path_internal_get(const stmdev_ctx_t *ctx, lsm6dsox_hpm_g_t *val) { lsm6dsox_ctrl7_g_t reg; @@ -3376,7 +3386,7 @@ int32_t lsm6dsox_gy_hp_path_internal_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_ois_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_ois_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_spi2_read_en_t val) { lsm6dsox_func_cfg_access_t func_cfg_access; @@ -3418,7 +3428,7 @@ int32_t lsm6dsox_ois_mode_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_ois_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_ois_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_spi2_read_en_t *val) { lsm6dsox_func_cfg_access_t func_cfg_access; @@ -3471,7 +3481,7 @@ int32_t lsm6dsox_ois_mode_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_sdo_ocs_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_sdo_ocs_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_ois_pu_dis_t val) { lsm6dsox_pin_ctrl_t reg; @@ -3497,7 +3507,7 @@ int32_t lsm6dsox_aux_sdo_ocs_mode_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_sdo_ocs_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_sdo_ocs_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_ois_pu_dis_t *val) { lsm6dsox_pin_ctrl_t reg; @@ -3531,7 +3541,7 @@ int32_t lsm6dsox_aux_sdo_ocs_mode_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_pw_on_ctrl_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_pw_on_ctrl_set(const stmdev_ctx_t *ctx, lsm6dsox_ois_on_t val) { lsm6dsox_ctrl7_g_t reg; @@ -3557,7 +3567,7 @@ int32_t lsm6dsox_aux_pw_on_ctrl_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_pw_on_ctrl_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_pw_on_ctrl_get(const stmdev_ctx_t *ctx, lsm6dsox_ois_on_t *val) { lsm6dsox_ctrl7_g_t reg; @@ -3597,7 +3607,7 @@ int32_t lsm6dsox_aux_pw_on_ctrl_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_xl_fs_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_xl_fs_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_xl_fs_mode_t val) { lsm6dsox_ctrl8_xl_t reg; @@ -3627,7 +3637,7 @@ int32_t lsm6dsox_aux_xl_fs_mode_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_xl_fs_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_xl_fs_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_xl_fs_mode_t *val) { lsm6dsox_ctrl8_xl_t reg; @@ -3661,7 +3671,7 @@ int32_t lsm6dsox_aux_xl_fs_mode_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_status_reg_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_status_reg_get(const stmdev_ctx_t *ctx, lsm6dsox_spi2_status_reg_ois_t *val) { int32_t ret; @@ -3680,7 +3690,7 @@ int32_t lsm6dsox_aux_status_reg_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_xl_flag_data_ready_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_xl_flag_data_ready_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_spi2_status_reg_ois_t reg; @@ -3701,7 +3711,7 @@ int32_t lsm6dsox_aux_xl_flag_data_ready_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_gy_flag_data_ready_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_gy_flag_data_ready_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_spi2_status_reg_ois_t reg; @@ -3722,7 +3732,7 @@ int32_t lsm6dsox_aux_gy_flag_data_ready_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_gy_flag_settling_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_gy_flag_settling_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_spi2_status_reg_ois_t reg; @@ -3744,7 +3754,7 @@ int32_t lsm6dsox_aux_gy_flag_settling_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_den_polarity_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_den_polarity_set(const stmdev_ctx_t *ctx, lsm6dsox_den_lh_ois_t val) { lsm6dsox_ui_int_ois_t reg; @@ -3769,7 +3779,7 @@ int32_t lsm6dsox_aux_den_polarity_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_den_polarity_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_den_polarity_get(const stmdev_ctx_t *ctx, lsm6dsox_den_lh_ois_t *val) { lsm6dsox_ui_int_ois_t reg; @@ -3803,7 +3813,7 @@ int32_t lsm6dsox_aux_den_polarity_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_den_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_den_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_lvl2_ois_t val) { lsm6dsox_ui_ctrl1_ois_t ctrl1_ois; @@ -3844,7 +3854,7 @@ int32_t lsm6dsox_aux_den_mode_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_den_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_den_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_lvl2_ois_t *val) { lsm6dsox_ui_ctrl1_ois_t ctrl1_ois; @@ -3891,7 +3901,7 @@ int32_t lsm6dsox_aux_den_mode_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_drdy_on_int2_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_aux_drdy_on_int2_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_ui_int_ois_t reg; int32_t ret; @@ -3916,7 +3926,7 @@ int32_t lsm6dsox_aux_drdy_on_int2_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_drdy_on_int2_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_aux_drdy_on_int2_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_ui_int_ois_t reg; int32_t ret; @@ -3941,7 +3951,7 @@ int32_t lsm6dsox_aux_drdy_on_int2_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_ois_en_spi2_t val) { lsm6dsox_ui_ctrl1_ois_t reg; @@ -3973,7 +3983,7 @@ int32_t lsm6dsox_aux_mode_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_ois_en_spi2_t *val) { lsm6dsox_ui_ctrl1_ois_t reg; @@ -4011,7 +4021,7 @@ int32_t lsm6dsox_aux_mode_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_gy_full_scale_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_gy_full_scale_set(const stmdev_ctx_t *ctx, lsm6dsox_fs_g_ois_t val) { lsm6dsox_ui_ctrl1_ois_t reg; @@ -4036,7 +4046,7 @@ int32_t lsm6dsox_aux_gy_full_scale_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_gy_full_scale_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_gy_full_scale_get(const stmdev_ctx_t *ctx, lsm6dsox_fs_g_ois_t *val) { lsm6dsox_ui_ctrl1_ois_t reg; @@ -4082,7 +4092,7 @@ int32_t lsm6dsox_aux_gy_full_scale_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_spi_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_spi_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_sim_ois_t val) { lsm6dsox_ui_ctrl1_ois_t reg; @@ -4107,7 +4117,7 @@ int32_t lsm6dsox_aux_spi_mode_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_spi_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_spi_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_sim_ois_t *val) { lsm6dsox_ui_ctrl1_ois_t reg; @@ -4142,7 +4152,7 @@ int32_t lsm6dsox_aux_spi_mode_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_gy_lp1_bandwidth_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_gy_lp1_bandwidth_set(const stmdev_ctx_t *ctx, lsm6dsox_ftype_ois_t val) { lsm6dsox_ui_ctrl2_ois_t reg; @@ -4167,7 +4177,7 @@ int32_t lsm6dsox_aux_gy_lp1_bandwidth_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_gy_lp1_bandwidth_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_gy_lp1_bandwidth_get(const stmdev_ctx_t *ctx, lsm6dsox_ftype_ois_t *val) { lsm6dsox_ui_ctrl2_ois_t reg; @@ -4209,7 +4219,7 @@ int32_t lsm6dsox_aux_gy_lp1_bandwidth_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_gy_hp_bandwidth_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_gy_hp_bandwidth_set(const stmdev_ctx_t *ctx, lsm6dsox_hpm_ois_t val) { lsm6dsox_ui_ctrl2_ois_t reg; @@ -4235,7 +4245,7 @@ int32_t lsm6dsox_aux_gy_hp_bandwidth_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_gy_hp_bandwidth_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_gy_hp_bandwidth_get(const stmdev_ctx_t *ctx, lsm6dsox_hpm_ois_t *val) { lsm6dsox_ui_ctrl2_ois_t reg; @@ -4286,7 +4296,7 @@ int32_t lsm6dsox_aux_gy_hp_bandwidth_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_gy_clamp_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_gy_clamp_set(const stmdev_ctx_t *ctx, lsm6dsox_st_ois_clampdis_t val) { lsm6dsox_ui_ctrl3_ois_t reg; @@ -4316,7 +4326,7 @@ int32_t lsm6dsox_aux_gy_clamp_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_gy_clamp_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_gy_clamp_get(const stmdev_ctx_t *ctx, lsm6dsox_st_ois_clampdis_t *val) { lsm6dsox_ui_ctrl3_ois_t reg; @@ -4351,7 +4361,7 @@ int32_t lsm6dsox_aux_gy_clamp_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_xl_bandwidth_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_xl_bandwidth_set(const stmdev_ctx_t *ctx, lsm6dsox_filter_xl_conf_ois_t val) { lsm6dsox_ui_ctrl3_ois_t reg; @@ -4377,7 +4387,7 @@ int32_t lsm6dsox_aux_xl_bandwidth_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_xl_bandwidth_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_xl_bandwidth_get(const stmdev_ctx_t *ctx, lsm6dsox_filter_xl_conf_ois_t *val) { lsm6dsox_ui_ctrl3_ois_t reg; @@ -4436,7 +4446,7 @@ int32_t lsm6dsox_aux_xl_bandwidth_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_xl_full_scale_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_xl_full_scale_set(const stmdev_ctx_t *ctx, lsm6dsox_fs_xl_ois_t val) { lsm6dsox_ui_ctrl3_ois_t reg; @@ -4461,7 +4471,7 @@ int32_t lsm6dsox_aux_xl_full_scale_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_aux_xl_full_scale_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_aux_xl_full_scale_get(const stmdev_ctx_t *ctx, lsm6dsox_fs_xl_ois_t *val) { lsm6dsox_ui_ctrl3_ois_t reg; @@ -4517,7 +4527,7 @@ int32_t lsm6dsox_aux_xl_full_scale_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_sdo_sa0_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sdo_sa0_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_sdo_pu_en_t val) { lsm6dsox_pin_ctrl_t reg; @@ -4542,7 +4552,7 @@ int32_t lsm6dsox_sdo_sa0_mode_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_sdo_sa0_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sdo_sa0_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_sdo_pu_en_t *val) { lsm6dsox_pin_ctrl_t reg; @@ -4576,7 +4586,7 @@ int32_t lsm6dsox_sdo_sa0_mode_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_spi_mode_set(stmdev_ctx_t *ctx, lsm6dsox_sim_t val) +int32_t lsm6dsox_spi_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_sim_t val) { lsm6dsox_ctrl3_c_t reg; int32_t ret; @@ -4600,7 +4610,7 @@ int32_t lsm6dsox_spi_mode_set(stmdev_ctx_t *ctx, lsm6dsox_sim_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_spi_mode_get(stmdev_ctx_t *ctx, lsm6dsox_sim_t *val) +int32_t lsm6dsox_spi_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_sim_t *val) { lsm6dsox_ctrl3_c_t reg; int32_t ret; @@ -4634,7 +4644,7 @@ int32_t lsm6dsox_spi_mode_get(stmdev_ctx_t *ctx, lsm6dsox_sim_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_i2c_interface_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_i2c_interface_set(const stmdev_ctx_t *ctx, lsm6dsox_i2c_disable_t val) { lsm6dsox_ctrl4_c_t reg; @@ -4660,7 +4670,7 @@ int32_t lsm6dsox_i2c_interface_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_i2c_interface_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_i2c_interface_get(const stmdev_ctx_t *ctx, lsm6dsox_i2c_disable_t *val) { lsm6dsox_ctrl4_c_t reg; @@ -4695,7 +4705,7 @@ int32_t lsm6dsox_i2c_interface_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_i3c_disable_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_i3c_disable_set(const stmdev_ctx_t *ctx, lsm6dsox_i3c_disable_t val) { lsm6dsox_i3c_bus_avb_t i3c_bus_avb; @@ -4735,7 +4745,7 @@ int32_t lsm6dsox_i3c_disable_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_i3c_disable_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_i3c_disable_get(const stmdev_ctx_t *ctx, lsm6dsox_i3c_disable_t *val) { lsm6dsox_ctrl9_xl_t ctrl9_xl; @@ -4800,7 +4810,7 @@ int32_t lsm6dsox_i3c_disable_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_pin_mode_set(stmdev_ctx_t *ctx, lsm6dsox_pp_od_t val) +int32_t lsm6dsox_pin_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_pp_od_t val) { lsm6dsox_i3c_bus_avb_t i3c_bus_avb; lsm6dsox_ctrl3_c_t ctrl3_c; @@ -4838,7 +4848,7 @@ int32_t lsm6dsox_pin_mode_set(stmdev_ctx_t *ctx, lsm6dsox_pp_od_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_pin_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pin_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_pp_od_t *val) { lsm6dsox_i3c_bus_avb_t i3c_bus_avb; @@ -4887,7 +4897,7 @@ int32_t lsm6dsox_pin_mode_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_pin_polarity_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pin_polarity_set(const stmdev_ctx_t *ctx, lsm6dsox_h_lactive_t val) { lsm6dsox_ctrl3_c_t reg; @@ -4912,7 +4922,7 @@ int32_t lsm6dsox_pin_polarity_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_pin_polarity_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pin_polarity_get(const stmdev_ctx_t *ctx, lsm6dsox_h_lactive_t *val) { lsm6dsox_ctrl3_c_t reg; @@ -4946,7 +4956,7 @@ int32_t lsm6dsox_pin_polarity_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_all_on_int1_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_all_on_int1_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_ctrl4_c_t reg; int32_t ret; @@ -4970,7 +4980,7 @@ int32_t lsm6dsox_all_on_int1_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_all_on_int1_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_all_on_int1_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_ctrl4_c_t reg; int32_t ret; @@ -4989,7 +4999,7 @@ int32_t lsm6dsox_all_on_int1_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_int_notification_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_int_notification_set(const stmdev_ctx_t *ctx, lsm6dsox_lir_t val) { lsm6dsox_tap_cfg0_t tap_cfg0; @@ -5038,7 +5048,7 @@ int32_t lsm6dsox_int_notification_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_int_notification_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_int_notification_get(const stmdev_ctx_t *ctx, lsm6dsox_lir_t *val) { lsm6dsox_tap_cfg0_t tap_cfg0; @@ -5127,7 +5137,7 @@ int32_t lsm6dsox_int_notification_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_wkup_ths_weight_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_wkup_ths_weight_set(const stmdev_ctx_t *ctx, lsm6dsox_wake_ths_w_t val) { lsm6dsox_wake_up_dur_t reg; @@ -5155,7 +5165,7 @@ int32_t lsm6dsox_wkup_ths_weight_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_wkup_ths_weight_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_wkup_ths_weight_get(const stmdev_ctx_t *ctx, lsm6dsox_wake_ths_w_t *val) { lsm6dsox_wake_up_dur_t reg; @@ -5190,7 +5200,7 @@ int32_t lsm6dsox_wkup_ths_weight_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_wkup_threshold_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_wkup_threshold_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_wake_up_ths_t reg; int32_t ret; @@ -5215,7 +5225,7 @@ int32_t lsm6dsox_wkup_threshold_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_wkup_threshold_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_wkup_threshold_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_wake_up_ths_t reg; int32_t ret; @@ -5235,7 +5245,7 @@ int32_t lsm6dsox_wkup_threshold_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_xl_usr_offset_on_wkup_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_usr_offset_on_wkup_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_wake_up_ths_t reg; @@ -5261,7 +5271,7 @@ int32_t lsm6dsox_xl_usr_offset_on_wkup_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_xl_usr_offset_on_wkup_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_xl_usr_offset_on_wkup_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_wake_up_ths_t reg; @@ -5282,7 +5292,7 @@ int32_t lsm6dsox_xl_usr_offset_on_wkup_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_wkup_dur_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_wkup_dur_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_wake_up_dur_t reg; int32_t ret; @@ -5307,7 +5317,7 @@ int32_t lsm6dsox_wkup_dur_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_wkup_dur_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_wkup_dur_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_wake_up_dur_t reg; int32_t ret; @@ -5339,7 +5349,7 @@ int32_t lsm6dsox_wkup_dur_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_gy_sleep_mode_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_gy_sleep_mode_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_ctrl4_c_t reg; int32_t ret; @@ -5363,7 +5373,7 @@ int32_t lsm6dsox_gy_sleep_mode_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_gy_sleep_mode_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_gy_sleep_mode_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_ctrl4_c_t reg; int32_t ret; @@ -5385,7 +5395,7 @@ int32_t lsm6dsox_gy_sleep_mode_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_act_pin_notification_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_act_pin_notification_set(const stmdev_ctx_t *ctx, lsm6dsox_sleep_status_on_int_t val) { lsm6dsox_tap_cfg0_t reg; @@ -5413,7 +5423,7 @@ int32_t lsm6dsox_act_pin_notification_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_act_pin_notification_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_act_pin_notification_get(const stmdev_ctx_t *ctx, lsm6dsox_sleep_status_on_int_t *val) { lsm6dsox_tap_cfg0_t reg; @@ -5447,7 +5457,7 @@ int32_t lsm6dsox_act_pin_notification_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_act_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_act_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_inact_en_t val) { lsm6dsox_tap_cfg2_t reg; @@ -5472,7 +5482,7 @@ int32_t lsm6dsox_act_mode_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_act_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_act_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_inact_en_t *val) { lsm6dsox_tap_cfg2_t reg; @@ -5515,7 +5525,7 @@ int32_t lsm6dsox_act_mode_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_act_sleep_dur_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_act_sleep_dur_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_wake_up_dur_t reg; int32_t ret; @@ -5540,7 +5550,7 @@ int32_t lsm6dsox_act_sleep_dur_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_act_sleep_dur_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_act_sleep_dur_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_wake_up_dur_t reg; int32_t ret; @@ -5572,7 +5582,7 @@ int32_t lsm6dsox_act_sleep_dur_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_tap_detection_on_z_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_tap_detection_on_z_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_tap_cfg0_t reg; @@ -5597,7 +5607,7 @@ int32_t lsm6dsox_tap_detection_on_z_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_tap_detection_on_z_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_tap_detection_on_z_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_tap_cfg0_t reg; @@ -5617,7 +5627,7 @@ int32_t lsm6dsox_tap_detection_on_z_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_tap_detection_on_y_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_tap_detection_on_y_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_tap_cfg0_t reg; @@ -5642,7 +5652,7 @@ int32_t lsm6dsox_tap_detection_on_y_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_tap_detection_on_y_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_tap_detection_on_y_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_tap_cfg0_t reg; @@ -5662,7 +5672,7 @@ int32_t lsm6dsox_tap_detection_on_y_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_tap_detection_on_x_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_tap_detection_on_x_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_tap_cfg0_t reg; @@ -5687,7 +5697,7 @@ int32_t lsm6dsox_tap_detection_on_x_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_tap_detection_on_x_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_tap_detection_on_x_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_tap_cfg0_t reg; @@ -5707,7 +5717,7 @@ int32_t lsm6dsox_tap_detection_on_x_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_tap_threshold_x_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_tap_threshold_x_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_tap_cfg1_t reg; int32_t ret; @@ -5731,7 +5741,7 @@ int32_t lsm6dsox_tap_threshold_x_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_tap_threshold_x_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_tap_threshold_x_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_tap_cfg1_t reg; int32_t ret; @@ -5751,7 +5761,7 @@ int32_t lsm6dsox_tap_threshold_x_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_tap_axis_priority_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_tap_axis_priority_set(const stmdev_ctx_t *ctx, lsm6dsox_tap_priority_t val) { lsm6dsox_tap_cfg1_t reg; @@ -5777,7 +5787,7 @@ int32_t lsm6dsox_tap_axis_priority_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_tap_axis_priority_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_tap_axis_priority_get(const stmdev_ctx_t *ctx, lsm6dsox_tap_priority_t *val) { lsm6dsox_tap_cfg1_t reg; @@ -5827,7 +5837,7 @@ int32_t lsm6dsox_tap_axis_priority_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_tap_threshold_y_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_tap_threshold_y_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_tap_cfg2_t reg; int32_t ret; @@ -5851,7 +5861,7 @@ int32_t lsm6dsox_tap_threshold_y_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_tap_threshold_y_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_tap_threshold_y_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_tap_cfg2_t reg; int32_t ret; @@ -5870,7 +5880,7 @@ int32_t lsm6dsox_tap_threshold_y_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_tap_threshold_z_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_tap_threshold_z_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_tap_ths_6d_t reg; int32_t ret; @@ -5894,7 +5904,7 @@ int32_t lsm6dsox_tap_threshold_z_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_tap_threshold_z_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_tap_threshold_z_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_tap_ths_6d_t reg; int32_t ret; @@ -5918,7 +5928,7 @@ int32_t lsm6dsox_tap_threshold_z_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_tap_shock_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_tap_shock_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_int_dur2_t reg; int32_t ret; @@ -5947,7 +5957,7 @@ int32_t lsm6dsox_tap_shock_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_tap_shock_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_tap_shock_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_int_dur2_t reg; int32_t ret; @@ -5972,7 +5982,7 @@ int32_t lsm6dsox_tap_shock_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_tap_quiet_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_tap_quiet_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_int_dur2_t reg; int32_t ret; @@ -6002,7 +6012,7 @@ int32_t lsm6dsox_tap_quiet_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_tap_quiet_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_tap_quiet_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_int_dur2_t reg; int32_t ret; @@ -6028,7 +6038,7 @@ int32_t lsm6dsox_tap_quiet_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_tap_dur_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_tap_dur_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_int_dur2_t reg; int32_t ret; @@ -6059,7 +6069,7 @@ int32_t lsm6dsox_tap_dur_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_tap_dur_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_tap_dur_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_int_dur2_t reg; int32_t ret; @@ -6078,7 +6088,7 @@ int32_t lsm6dsox_tap_dur_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_tap_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_tap_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_single_double_tap_t val) { lsm6dsox_wake_up_ths_t reg; @@ -6103,7 +6113,7 @@ int32_t lsm6dsox_tap_mode_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_tap_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_tap_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_single_double_tap_t *val) { lsm6dsox_wake_up_ths_t reg; @@ -6150,7 +6160,7 @@ int32_t lsm6dsox_tap_mode_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_6d_threshold_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_6d_threshold_set(const stmdev_ctx_t *ctx, lsm6dsox_sixd_ths_t val) { lsm6dsox_tap_ths_6d_t reg; @@ -6175,7 +6185,7 @@ int32_t lsm6dsox_6d_threshold_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_6d_threshold_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_6d_threshold_get(const stmdev_ctx_t *ctx, lsm6dsox_sixd_ths_t *val) { lsm6dsox_tap_ths_6d_t reg; @@ -6217,7 +6227,7 @@ int32_t lsm6dsox_6d_threshold_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_4d_mode_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_4d_mode_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_tap_ths_6d_t reg; int32_t ret; @@ -6241,7 +6251,7 @@ int32_t lsm6dsox_4d_mode_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_4d_mode_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_4d_mode_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_tap_ths_6d_t reg; int32_t ret; @@ -6272,7 +6282,7 @@ int32_t lsm6dsox_4d_mode_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_ff_threshold_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_ff_threshold_set(const stmdev_ctx_t *ctx, lsm6dsox_ff_ths_t val) { lsm6dsox_free_fall_t reg; @@ -6297,7 +6307,7 @@ int32_t lsm6dsox_ff_threshold_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_ff_threshold_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_ff_threshold_get(const stmdev_ctx_t *ctx, lsm6dsox_ff_ths_t *val) { lsm6dsox_free_fall_t reg; @@ -6356,7 +6366,7 @@ int32_t lsm6dsox_ff_threshold_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_ff_dur_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_ff_dur_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_wake_up_dur_t wake_up_dur; lsm6dsox_free_fall_t free_fall; @@ -6397,7 +6407,7 @@ int32_t lsm6dsox_ff_dur_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_ff_dur_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_ff_dur_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_wake_up_dur_t wake_up_dur; lsm6dsox_free_fall_t free_fall; @@ -6436,7 +6446,7 @@ int32_t lsm6dsox_ff_dur_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fifo_watermark_set(stmdev_ctx_t *ctx, uint16_t val) +int32_t lsm6dsox_fifo_watermark_set(const stmdev_ctx_t *ctx, uint16_t val) { lsm6dsox_fifo_ctrl1_t fifo_ctrl1; lsm6dsox_fifo_ctrl2_t fifo_ctrl2; @@ -6470,7 +6480,7 @@ int32_t lsm6dsox_fifo_watermark_set(stmdev_ctx_t *ctx, uint16_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fifo_watermark_get(stmdev_ctx_t *ctx, uint16_t *val) +int32_t lsm6dsox_fifo_watermark_get(const stmdev_ctx_t *ctx, uint16_t *val) { lsm6dsox_fifo_ctrl1_t fifo_ctrl1; lsm6dsox_fifo_ctrl2_t fifo_ctrl2; @@ -6498,7 +6508,7 @@ int32_t lsm6dsox_fifo_watermark_get(stmdev_ctx_t *ctx, uint16_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_compression_algo_init_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_compression_algo_init_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_emb_func_init_b_t reg; @@ -6536,7 +6546,7 @@ int32_t lsm6dsox_compression_algo_init_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_compression_algo_init_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_compression_algo_init_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_emb_func_init_b_t reg; @@ -6568,7 +6578,7 @@ int32_t lsm6dsox_compression_algo_init_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_compression_algo_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_compression_algo_set(const stmdev_ctx_t *ctx, lsm6dsox_uncoptr_rate_t val) { lsm6dsox_fifo_ctrl2_t fifo_ctrl2; @@ -6597,7 +6607,7 @@ int32_t lsm6dsox_compression_algo_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_compression_algo_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_compression_algo_get(const stmdev_ctx_t *ctx, lsm6dsox_uncoptr_rate_t *val) { lsm6dsox_fifo_ctrl2_t reg; @@ -6643,7 +6653,7 @@ int32_t lsm6dsox_compression_algo_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fifo_virtual_sens_odr_chg_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fifo_virtual_sens_odr_chg_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_fifo_ctrl2_t reg; @@ -6668,7 +6678,7 @@ int32_t lsm6dsox_fifo_virtual_sens_odr_chg_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fifo_virtual_sens_odr_chg_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fifo_virtual_sens_odr_chg_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_fifo_ctrl2_t reg; @@ -6689,7 +6699,7 @@ int32_t lsm6dsox_fifo_virtual_sens_odr_chg_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_compression_algo_real_time_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_compression_algo_real_time_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_fifo_ctrl2_t reg; @@ -6714,7 +6724,7 @@ int32_t lsm6dsox_compression_algo_real_time_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_compression_algo_real_time_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_compression_algo_real_time_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_fifo_ctrl2_t reg; @@ -6735,7 +6745,7 @@ int32_t lsm6dsox_compression_algo_real_time_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fifo_stop_on_wtm_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_fifo_stop_on_wtm_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_fifo_ctrl2_t reg; int32_t ret; @@ -6760,7 +6770,7 @@ int32_t lsm6dsox_fifo_stop_on_wtm_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fifo_stop_on_wtm_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_fifo_stop_on_wtm_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_fifo_ctrl2_t reg; int32_t ret; @@ -6780,7 +6790,7 @@ int32_t lsm6dsox_fifo_stop_on_wtm_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fifo_xl_batch_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fifo_xl_batch_set(const stmdev_ctx_t *ctx, lsm6dsox_bdr_xl_t val) { lsm6dsox_fifo_ctrl3_t reg; @@ -6806,7 +6816,7 @@ int32_t lsm6dsox_fifo_xl_batch_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fifo_xl_batch_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fifo_xl_batch_get(const stmdev_ctx_t *ctx, lsm6dsox_bdr_xl_t *val) { lsm6dsox_fifo_ctrl3_t reg; @@ -6881,7 +6891,7 @@ int32_t lsm6dsox_fifo_xl_batch_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fifo_gy_batch_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fifo_gy_batch_set(const stmdev_ctx_t *ctx, lsm6dsox_bdr_gy_t val) { lsm6dsox_fifo_ctrl3_t reg; @@ -6907,7 +6917,7 @@ int32_t lsm6dsox_fifo_gy_batch_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fifo_gy_batch_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fifo_gy_batch_get(const stmdev_ctx_t *ctx, lsm6dsox_bdr_gy_t *val) { lsm6dsox_fifo_ctrl3_t reg; @@ -6981,7 +6991,7 @@ int32_t lsm6dsox_fifo_gy_batch_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fifo_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fifo_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_fifo_mode_t val) { lsm6dsox_fifo_ctrl4_t reg; @@ -7006,7 +7016,7 @@ int32_t lsm6dsox_fifo_mode_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fifo_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fifo_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_fifo_mode_t *val) { lsm6dsox_fifo_ctrl4_t reg; @@ -7057,7 +7067,7 @@ int32_t lsm6dsox_fifo_mode_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fifo_temp_batch_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fifo_temp_batch_set(const stmdev_ctx_t *ctx, lsm6dsox_odr_t_batch_t val) { lsm6dsox_fifo_ctrl4_t reg; @@ -7083,7 +7093,7 @@ int32_t lsm6dsox_fifo_temp_batch_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fifo_temp_batch_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fifo_temp_batch_get(const stmdev_ctx_t *ctx, lsm6dsox_odr_t_batch_t *val) { lsm6dsox_fifo_ctrl4_t reg; @@ -7127,7 +7137,7 @@ int32_t lsm6dsox_fifo_temp_batch_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fifo_timestamp_decimation_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fifo_timestamp_decimation_set(const stmdev_ctx_t *ctx, lsm6dsox_odr_ts_batch_t val) { lsm6dsox_fifo_ctrl4_t reg; @@ -7154,7 +7164,7 @@ int32_t lsm6dsox_fifo_timestamp_decimation_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fifo_timestamp_decimation_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fifo_timestamp_decimation_get(const stmdev_ctx_t *ctx, lsm6dsox_odr_ts_batch_t *val) { lsm6dsox_fifo_ctrl4_t reg; @@ -7198,7 +7208,7 @@ int32_t lsm6dsox_fifo_timestamp_decimation_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fifo_cnt_event_batch_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fifo_cnt_event_batch_set(const stmdev_ctx_t *ctx, lsm6dsox_trig_counter_bdr_t val) { lsm6dsox_counter_bdr_reg1_t reg; @@ -7227,7 +7237,7 @@ int32_t lsm6dsox_fifo_cnt_event_batch_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fifo_cnt_event_batch_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fifo_cnt_event_batch_get(const stmdev_ctx_t *ctx, lsm6dsox_trig_counter_bdr_t *val) { lsm6dsox_counter_bdr_reg1_t reg; @@ -7264,7 +7274,7 @@ int32_t lsm6dsox_fifo_cnt_event_batch_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_rst_batch_counter_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_rst_batch_counter_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_counter_bdr_reg1_t reg; int32_t ret; @@ -7292,7 +7302,7 @@ int32_t lsm6dsox_rst_batch_counter_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_rst_batch_counter_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_rst_batch_counter_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_counter_bdr_reg1_t reg; @@ -7314,7 +7324,7 @@ int32_t lsm6dsox_rst_batch_counter_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_batch_counter_threshold_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_batch_counter_threshold_set(const stmdev_ctx_t *ctx, uint16_t val) { lsm6dsox_counter_bdr_reg1_t counter_bdr_reg1; @@ -7350,7 +7360,7 @@ int32_t lsm6dsox_batch_counter_threshold_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_batch_counter_threshold_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_batch_counter_threshold_get(const stmdev_ctx_t *ctx, uint16_t *val) { lsm6dsox_counter_bdr_reg1_t counter_bdr_reg1; @@ -7379,7 +7389,7 @@ int32_t lsm6dsox_batch_counter_threshold_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fifo_data_level_get(stmdev_ctx_t *ctx, uint16_t *val) +int32_t lsm6dsox_fifo_data_level_get(const stmdev_ctx_t *ctx, uint16_t *val) { lsm6dsox_fifo_status1_t fifo_status1; lsm6dsox_fifo_status2_t fifo_status2; @@ -7407,7 +7417,7 @@ int32_t lsm6dsox_fifo_data_level_get(stmdev_ctx_t *ctx, uint16_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fifo_status_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fifo_status_get(const stmdev_ctx_t *ctx, lsm6dsox_fifo_status2_t *val) { int32_t ret; @@ -7425,7 +7435,7 @@ int32_t lsm6dsox_fifo_status_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fifo_full_flag_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_fifo_full_flag_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_fifo_status2_t reg; int32_t ret; @@ -7445,7 +7455,7 @@ int32_t lsm6dsox_fifo_full_flag_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fifo_ovr_flag_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_fifo_ovr_flag_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_fifo_status2_t reg; int32_t ret; @@ -7464,7 +7474,7 @@ int32_t lsm6dsox_fifo_ovr_flag_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fifo_wtm_flag_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_fifo_wtm_flag_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_fifo_status2_t reg; int32_t ret; @@ -7483,7 +7493,7 @@ int32_t lsm6dsox_fifo_wtm_flag_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fifo_sensor_tag_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fifo_sensor_tag_get(const stmdev_ctx_t *ctx, lsm6dsox_fifo_tag_t *val) { lsm6dsox_fifo_data_out_tag_t reg; @@ -7600,7 +7610,7 @@ int32_t lsm6dsox_fifo_sensor_tag_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fifo_pedo_batch_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_fifo_pedo_batch_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_emb_func_fifo_cfg_t reg; int32_t ret; @@ -7637,7 +7647,7 @@ int32_t lsm6dsox_fifo_pedo_batch_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fifo_pedo_batch_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_fifo_pedo_batch_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_emb_func_fifo_cfg_t reg; int32_t ret; @@ -7668,7 +7678,7 @@ int32_t lsm6dsox_fifo_pedo_batch_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_sh_batch_slave_0_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_sh_batch_slave_0_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_slv0_config_t reg; int32_t ret; @@ -7703,7 +7713,7 @@ int32_t lsm6dsox_sh_batch_slave_0_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_sh_batch_slave_0_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_sh_batch_slave_0_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_slv0_config_t reg; int32_t ret; @@ -7733,7 +7743,7 @@ int32_t lsm6dsox_sh_batch_slave_0_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_sh_batch_slave_1_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_sh_batch_slave_1_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_slv1_config_t reg; int32_t ret; @@ -7768,7 +7778,7 @@ int32_t lsm6dsox_sh_batch_slave_1_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_sh_batch_slave_1_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_sh_batch_slave_1_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_slv1_config_t reg; int32_t ret; @@ -7798,7 +7808,7 @@ int32_t lsm6dsox_sh_batch_slave_1_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_sh_batch_slave_2_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_sh_batch_slave_2_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_slv2_config_t reg; int32_t ret; @@ -7833,7 +7843,7 @@ int32_t lsm6dsox_sh_batch_slave_2_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_sh_batch_slave_2_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_sh_batch_slave_2_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_slv2_config_t reg; int32_t ret; @@ -7863,7 +7873,7 @@ int32_t lsm6dsox_sh_batch_slave_2_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_sh_batch_slave_3_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_sh_batch_slave_3_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_slv3_config_t reg; int32_t ret; @@ -7898,7 +7908,7 @@ int32_t lsm6dsox_sh_batch_slave_3_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_sh_batch_slave_3_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_sh_batch_slave_3_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_slv3_config_t reg; int32_t ret; @@ -7940,7 +7950,7 @@ int32_t lsm6dsox_sh_batch_slave_3_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_den_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_den_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_den_mode_t val) { lsm6dsox_ctrl6_c_t reg; @@ -7965,7 +7975,7 @@ int32_t lsm6dsox_den_mode_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_den_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_den_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_den_mode_t *val) { lsm6dsox_ctrl6_c_t reg; @@ -8011,7 +8021,7 @@ int32_t lsm6dsox_den_mode_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_den_polarity_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_den_polarity_set(const stmdev_ctx_t *ctx, lsm6dsox_den_lh_t val) { lsm6dsox_ctrl9_xl_t reg; @@ -8036,7 +8046,7 @@ int32_t lsm6dsox_den_polarity_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_den_polarity_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_den_polarity_get(const stmdev_ctx_t *ctx, lsm6dsox_den_lh_t *val) { lsm6dsox_ctrl9_xl_t reg; @@ -8070,7 +8080,7 @@ int32_t lsm6dsox_den_polarity_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_den_enable_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_den_enable_set(const stmdev_ctx_t *ctx, lsm6dsox_den_xl_g_t val) { lsm6dsox_ctrl9_xl_t reg; @@ -8095,7 +8105,7 @@ int32_t lsm6dsox_den_enable_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_den_enable_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_den_enable_get(const stmdev_ctx_t *ctx, lsm6dsox_den_xl_g_t *val) { lsm6dsox_ctrl9_xl_t reg; @@ -8133,7 +8143,7 @@ int32_t lsm6dsox_den_enable_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_den_mark_axis_x_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_den_mark_axis_x_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_ctrl9_xl_t reg; int32_t ret; @@ -8157,7 +8167,7 @@ int32_t lsm6dsox_den_mark_axis_x_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_den_mark_axis_x_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_den_mark_axis_x_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_ctrl9_xl_t reg; int32_t ret; @@ -8176,7 +8186,7 @@ int32_t lsm6dsox_den_mark_axis_x_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_den_mark_axis_y_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_den_mark_axis_y_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_ctrl9_xl_t reg; int32_t ret; @@ -8200,7 +8210,7 @@ int32_t lsm6dsox_den_mark_axis_y_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_den_mark_axis_y_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_den_mark_axis_y_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_ctrl9_xl_t reg; int32_t ret; @@ -8219,7 +8229,7 @@ int32_t lsm6dsox_den_mark_axis_y_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_den_mark_axis_z_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_den_mark_axis_z_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_ctrl9_xl_t reg; int32_t ret; @@ -8243,7 +8253,7 @@ int32_t lsm6dsox_den_mark_axis_z_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_den_mark_axis_z_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_den_mark_axis_z_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_ctrl9_xl_t reg; int32_t ret; @@ -8274,7 +8284,7 @@ int32_t lsm6dsox_den_mark_axis_z_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_pedo_sens_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pedo_sens_set(const stmdev_ctx_t *ctx, lsm6dsox_pedo_md_t val) { lsm6dsox_pedo_cmd_reg_t pedo_cmd_reg; @@ -8302,7 +8312,7 @@ int32_t lsm6dsox_pedo_sens_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_pedo_sens_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pedo_sens_get(const stmdev_ctx_t *ctx, lsm6dsox_pedo_md_t *val) { lsm6dsox_pedo_cmd_reg_t pedo_cmd_reg; @@ -8342,7 +8352,7 @@ int32_t lsm6dsox_pedo_sens_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_pedo_step_detect_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_pedo_step_detect_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_emb_func_status_t reg; int32_t ret; @@ -8372,7 +8382,7 @@ int32_t lsm6dsox_pedo_step_detect_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_pedo_debounce_steps_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pedo_debounce_steps_set(const stmdev_ctx_t *ctx, uint8_t *buff) { int32_t ret; @@ -8391,7 +8401,7 @@ int32_t lsm6dsox_pedo_debounce_steps_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_pedo_debounce_steps_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pedo_debounce_steps_get(const stmdev_ctx_t *ctx, uint8_t *buff) { int32_t ret; @@ -8410,7 +8420,7 @@ int32_t lsm6dsox_pedo_debounce_steps_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_pedo_steps_period_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pedo_steps_period_set(const stmdev_ctx_t *ctx, uint16_t val) { uint8_t buff[2]; @@ -8438,7 +8448,7 @@ int32_t lsm6dsox_pedo_steps_period_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_pedo_steps_period_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pedo_steps_period_get(const stmdev_ctx_t *ctx, uint16_t *val) { uint8_t buff[2]; @@ -8467,7 +8477,7 @@ int32_t lsm6dsox_pedo_steps_period_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_pedo_int_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pedo_int_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_carry_count_en_t val) { lsm6dsox_pedo_cmd_reg_t reg; @@ -8495,7 +8505,7 @@ int32_t lsm6dsox_pedo_int_mode_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_pedo_int_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pedo_int_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_carry_count_en_t *val) { lsm6dsox_pedo_cmd_reg_t reg; @@ -8543,7 +8553,7 @@ int32_t lsm6dsox_pedo_int_mode_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_motion_flag_data_ready_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_motion_flag_data_ready_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_emb_func_status_t reg; @@ -8587,7 +8597,7 @@ int32_t lsm6dsox_motion_flag_data_ready_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_tilt_flag_data_ready_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_tilt_flag_data_ready_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_emb_func_status_t reg; @@ -8632,7 +8642,7 @@ int32_t lsm6dsox_tilt_flag_data_ready_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_sh_mag_sensitivity_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_mag_sensitivity_set(const stmdev_ctx_t *ctx, uint16_t val) { uint8_t buff[2]; @@ -8661,7 +8671,7 @@ int32_t lsm6dsox_sh_mag_sensitivity_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_sh_mag_sensitivity_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_mag_sensitivity_get(const stmdev_ctx_t *ctx, uint16_t *val) { uint8_t buff[2]; @@ -8690,7 +8700,7 @@ int32_t lsm6dsox_sh_mag_sensitivity_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_mlc_mag_sensitivity_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_mlc_mag_sensitivity_set(const stmdev_ctx_t *ctx, uint16_t val) { uint8_t buff[2]; @@ -8719,7 +8729,7 @@ int32_t lsm6dsox_mlc_mag_sensitivity_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_mlc_mag_sensitivity_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_mlc_mag_sensitivity_get(const stmdev_ctx_t *ctx, uint16_t *val) { uint8_t buff[2]; @@ -8748,7 +8758,7 @@ int32_t lsm6dsox_mlc_mag_sensitivity_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_mag_offset_set(stmdev_ctx_t *ctx, int16_t *val) +int32_t lsm6dsox_mag_offset_set(const stmdev_ctx_t *ctx, int16_t *val) { uint8_t buff[6]; int32_t ret; @@ -8810,7 +8820,7 @@ int32_t lsm6dsox_mag_offset_set(stmdev_ctx_t *ctx, int16_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_mag_offset_get(stmdev_ctx_t *ctx, int16_t *val) +int32_t lsm6dsox_mag_offset_get(const stmdev_ctx_t *ctx, int16_t *val) { uint8_t buff[6]; int32_t ret; @@ -8879,7 +8889,7 @@ int32_t lsm6dsox_mag_offset_get(stmdev_ctx_t *ctx, int16_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_mag_soft_iron_set(stmdev_ctx_t *ctx, uint16_t *val) +int32_t lsm6dsox_mag_soft_iron_set(const stmdev_ctx_t *ctx, uint16_t *val) { uint8_t buff[12]; uint8_t index; @@ -8996,7 +9006,7 @@ int32_t lsm6dsox_mag_soft_iron_set(stmdev_ctx_t *ctx, uint16_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_mag_soft_iron_get(stmdev_ctx_t *ctx, uint16_t *val) +int32_t lsm6dsox_mag_soft_iron_get(const stmdev_ctx_t *ctx, uint16_t *val) { uint8_t buff[12]; uint8_t index; @@ -9110,7 +9120,7 @@ int32_t lsm6dsox_mag_soft_iron_get(stmdev_ctx_t *ctx, uint16_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_mag_z_orient_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_mag_z_orient_set(const stmdev_ctx_t *ctx, lsm6dsox_mag_z_axis_t val) { lsm6dsox_mag_cfg_a_t reg; @@ -9140,7 +9150,7 @@ int32_t lsm6dsox_mag_z_orient_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_mag_z_orient_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_mag_z_orient_get(const stmdev_ctx_t *ctx, lsm6dsox_mag_z_axis_t *val) { lsm6dsox_mag_cfg_a_t reg; @@ -9194,7 +9204,7 @@ int32_t lsm6dsox_mag_z_orient_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_mag_y_orient_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_mag_y_orient_set(const stmdev_ctx_t *ctx, lsm6dsox_mag_y_axis_t val) { lsm6dsox_mag_cfg_a_t reg; @@ -9224,7 +9234,7 @@ int32_t lsm6dsox_mag_y_orient_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_mag_y_orient_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_mag_y_orient_get(const stmdev_ctx_t *ctx, lsm6dsox_mag_y_axis_t *val) { lsm6dsox_mag_cfg_a_t reg; @@ -9278,7 +9288,7 @@ int32_t lsm6dsox_mag_y_orient_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_mag_x_orient_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_mag_x_orient_set(const stmdev_ctx_t *ctx, lsm6dsox_mag_x_axis_t val) { lsm6dsox_mag_cfg_b_t reg; @@ -9308,7 +9318,7 @@ int32_t lsm6dsox_mag_x_orient_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_mag_x_orient_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_mag_x_orient_get(const stmdev_ctx_t *ctx, lsm6dsox_mag_x_axis_t *val) { lsm6dsox_mag_cfg_b_t reg; @@ -9373,7 +9383,7 @@ int32_t lsm6dsox_mag_x_orient_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_long_cnt_flag_data_ready_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_long_cnt_flag_data_ready_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_emb_func_status_t reg; @@ -9404,7 +9414,7 @@ int32_t lsm6dsox_long_cnt_flag_data_ready_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fsm_enable_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fsm_enable_set(const stmdev_ctx_t *ctx, lsm6dsox_emb_fsm_enable_t *val) { int32_t ret; @@ -9439,7 +9449,7 @@ int32_t lsm6dsox_fsm_enable_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fsm_enable_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fsm_enable_get(const stmdev_ctx_t *ctx, lsm6dsox_emb_fsm_enable_t *val) { int32_t ret; @@ -9469,7 +9479,7 @@ int32_t lsm6dsox_fsm_enable_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_long_cnt_set(stmdev_ctx_t *ctx, uint16_t val) +int32_t lsm6dsox_long_cnt_set(const stmdev_ctx_t *ctx, uint16_t val) { uint8_t buff[2]; int32_t ret; @@ -9500,7 +9510,7 @@ int32_t lsm6dsox_long_cnt_set(stmdev_ctx_t *ctx, uint16_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_long_cnt_get(stmdev_ctx_t *ctx, uint16_t *val) +int32_t lsm6dsox_long_cnt_get(const stmdev_ctx_t *ctx, uint16_t *val) { uint8_t buff[2]; int32_t ret; @@ -9531,7 +9541,7 @@ int32_t lsm6dsox_long_cnt_get(stmdev_ctx_t *ctx, uint16_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_long_clr_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_long_clr_set(const stmdev_ctx_t *ctx, lsm6dsox_fsm_lc_clr_t val) { lsm6dsox_fsm_long_counter_clear_t reg; @@ -9569,7 +9579,7 @@ int32_t lsm6dsox_long_clr_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_long_clr_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_long_clr_get(const stmdev_ctx_t *ctx, lsm6dsox_fsm_lc_clr_t *val) { lsm6dsox_fsm_long_counter_clear_t reg; @@ -9621,7 +9631,7 @@ int32_t lsm6dsox_long_clr_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fsm_out_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fsm_out_get(const stmdev_ctx_t *ctx, lsm6dsox_fsm_out_t *val) { int32_t ret; @@ -9649,7 +9659,7 @@ int32_t lsm6dsox_fsm_out_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fsm_data_rate_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fsm_data_rate_set(const stmdev_ctx_t *ctx, lsm6dsox_fsm_odr_t val) { lsm6dsox_emb_func_odr_cfg_b_t reg; @@ -9688,7 +9698,7 @@ int32_t lsm6dsox_fsm_data_rate_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fsm_data_rate_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fsm_data_rate_get(const stmdev_ctx_t *ctx, lsm6dsox_fsm_odr_t *val) { lsm6dsox_emb_func_odr_cfg_b_t reg; @@ -9741,7 +9751,7 @@ int32_t lsm6dsox_fsm_data_rate_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fsm_init_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_fsm_init_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_emb_func_init_b_t reg; int32_t ret; @@ -9777,7 +9787,7 @@ int32_t lsm6dsox_fsm_init_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fsm_init_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_fsm_init_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_emb_func_init_b_t reg; int32_t ret; @@ -9810,7 +9820,7 @@ int32_t lsm6dsox_fsm_init_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_long_cnt_int_value_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_long_cnt_int_value_set(const stmdev_ctx_t *ctx, uint16_t val) { int32_t ret; @@ -9842,7 +9852,7 @@ int32_t lsm6dsox_long_cnt_int_value_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_long_cnt_int_value_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_long_cnt_int_value_get(const stmdev_ctx_t *ctx, uint16_t *val) { int32_t ret; @@ -9872,7 +9882,7 @@ int32_t lsm6dsox_long_cnt_int_value_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fsm_number_of_programs_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fsm_number_of_programs_set(const stmdev_ctx_t *ctx, uint8_t val) { int32_t ret; @@ -9890,7 +9900,7 @@ int32_t lsm6dsox_fsm_number_of_programs_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fsm_number_of_programs_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fsm_number_of_programs_get(const stmdev_ctx_t *ctx, uint8_t *val) { int32_t ret; @@ -9909,7 +9919,7 @@ int32_t lsm6dsox_fsm_number_of_programs_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fsm_start_address_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fsm_start_address_set(const stmdev_ctx_t *ctx, uint16_t val) { int32_t ret; @@ -9939,7 +9949,7 @@ int32_t lsm6dsox_fsm_start_address_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_fsm_start_address_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_fsm_start_address_get(const stmdev_ctx_t *ctx, uint16_t *val) { int32_t ret; @@ -9980,7 +9990,7 @@ int32_t lsm6dsox_fsm_start_address_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_mlc_status_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_mlc_status_get(const stmdev_ctx_t *ctx, lsm6dsox_mlc_status_mainpage_t *val) { return lsm6dsox_read_reg(ctx, LSM6DSOX_MLC_STATUS_MAINPAGE, @@ -9996,7 +10006,7 @@ int32_t lsm6dsox_mlc_status_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_mlc_data_rate_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_mlc_data_rate_set(const stmdev_ctx_t *ctx, lsm6dsox_mlc_odr_t val) { lsm6dsox_emb_func_odr_cfg_c_t reg; @@ -10034,7 +10044,7 @@ int32_t lsm6dsox_mlc_data_rate_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_mlc_data_rate_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_mlc_data_rate_get(const stmdev_ctx_t *ctx, lsm6dsox_mlc_odr_t *val) { lsm6dsox_emb_func_odr_cfg_c_t reg; @@ -10099,7 +10109,7 @@ int32_t lsm6dsox_mlc_data_rate_get(stmdev_ctx_t *ctx, * @param val union of registers from SENSOR_HUB_1 to SENSOR_HUB_18 * */ -int32_t lsm6dsox_sh_read_data_raw_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_read_data_raw_get(const stmdev_ctx_t *ctx, lsm6dsox_emb_sh_read_t *val, uint8_t len) { @@ -10129,7 +10139,7 @@ int32_t lsm6dsox_sh_read_data_raw_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_sh_slave_connected_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_slave_connected_set(const stmdev_ctx_t *ctx, lsm6dsox_aux_sens_on_t val) { lsm6dsox_master_config_t reg; @@ -10164,7 +10174,7 @@ int32_t lsm6dsox_sh_slave_connected_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_sh_slave_connected_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_slave_connected_get(const stmdev_ctx_t *ctx, lsm6dsox_aux_sens_on_t *val) { lsm6dsox_master_config_t reg; @@ -10216,7 +10226,7 @@ int32_t lsm6dsox_sh_slave_connected_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_sh_master_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_sh_master_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_master_config_t reg; int32_t ret; @@ -10250,7 +10260,7 @@ int32_t lsm6dsox_sh_master_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_sh_master_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_sh_master_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_master_config_t reg; int32_t ret; @@ -10279,7 +10289,7 @@ int32_t lsm6dsox_sh_master_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_sh_pin_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_pin_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_shub_pu_en_t val) { lsm6dsox_master_config_t reg; @@ -10314,7 +10324,7 @@ int32_t lsm6dsox_sh_pin_mode_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_sh_pin_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_pin_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_shub_pu_en_t *val) { lsm6dsox_master_config_t reg; @@ -10359,7 +10369,7 @@ int32_t lsm6dsox_sh_pin_mode_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_sh_pass_through_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_sh_pass_through_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_master_config_t reg; int32_t ret; @@ -10394,7 +10404,7 @@ int32_t lsm6dsox_sh_pass_through_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_sh_pass_through_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_sh_pass_through_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_master_config_t reg; int32_t ret; @@ -10423,7 +10433,7 @@ int32_t lsm6dsox_sh_pass_through_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_sh_syncro_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_syncro_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_start_config_t val) { lsm6dsox_master_config_t reg; @@ -10458,7 +10468,7 @@ int32_t lsm6dsox_sh_syncro_mode_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_sh_syncro_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_syncro_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_start_config_t *val) { lsm6dsox_master_config_t reg; @@ -10503,7 +10513,7 @@ int32_t lsm6dsox_sh_syncro_mode_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_sh_write_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_write_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_write_once_t val) { lsm6dsox_master_config_t reg; @@ -10539,7 +10549,7 @@ int32_t lsm6dsox_sh_write_mode_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_sh_write_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_write_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_write_once_t *val) { lsm6dsox_master_config_t reg; @@ -10582,7 +10592,7 @@ int32_t lsm6dsox_sh_write_mode_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_sh_reset_set(stmdev_ctx_t *ctx) +int32_t lsm6dsox_sh_reset_set(const stmdev_ctx_t *ctx) { lsm6dsox_master_config_t reg; int32_t ret; @@ -10622,7 +10632,7 @@ int32_t lsm6dsox_sh_reset_set(stmdev_ctx_t *ctx) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_sh_reset_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_sh_reset_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_master_config_t reg; int32_t ret; @@ -10651,7 +10661,7 @@ int32_t lsm6dsox_sh_reset_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_sh_data_rate_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_data_rate_set(const stmdev_ctx_t *ctx, lsm6dsox_shub_odr_t val) { lsm6dsox_slv0_config_t reg; @@ -10686,7 +10696,7 @@ int32_t lsm6dsox_sh_data_rate_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_sh_data_rate_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_data_rate_get(const stmdev_ctx_t *ctx, lsm6dsox_shub_odr_t *val) { lsm6dsox_slv0_config_t reg; @@ -10741,7 +10751,7 @@ int32_t lsm6dsox_sh_data_rate_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_sh_cfg_write(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_cfg_write(const stmdev_ctx_t *ctx, lsm6dsox_sh_cfg_write_t *val) { lsm6dsox_slv0_add_t reg; @@ -10787,7 +10797,7 @@ int32_t lsm6dsox_sh_cfg_write(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_sh_slv0_cfg_read(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_slv0_cfg_read(const stmdev_ctx_t *ctx, lsm6dsox_sh_cfg_read_t *val) { lsm6dsox_slv0_add_t slv0_add; @@ -10841,7 +10851,7 @@ int32_t lsm6dsox_sh_slv0_cfg_read(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_sh_slv1_cfg_read(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_slv1_cfg_read(const stmdev_ctx_t *ctx, lsm6dsox_sh_cfg_read_t *val) { lsm6dsox_slv1_add_t slv1_add; @@ -10895,7 +10905,7 @@ int32_t lsm6dsox_sh_slv1_cfg_read(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_sh_slv2_cfg_read(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_slv2_cfg_read(const stmdev_ctx_t *ctx, lsm6dsox_sh_cfg_read_t *val) { lsm6dsox_slv2_add_t slv2_add; @@ -10949,7 +10959,7 @@ int32_t lsm6dsox_sh_slv2_cfg_read(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_sh_slv3_cfg_read(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_slv3_cfg_read(const stmdev_ctx_t *ctx, lsm6dsox_sh_cfg_read_t *val) { lsm6dsox_slv3_add_t slv3_add; @@ -11000,7 +11010,7 @@ int32_t lsm6dsox_sh_slv3_cfg_read(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_sh_status_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_sh_status_get(const stmdev_ctx_t *ctx, lsm6dsox_status_master_t *val) { int32_t ret; @@ -11041,7 +11051,7 @@ int32_t lsm6dsox_sh_status_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_s4s_tph_res_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_s4s_tph_res_set(const stmdev_ctx_t *ctx, lsm6dsox_s4s_tph_res_t val) { lsm6dsox_s4s_tph_l_t reg; @@ -11066,7 +11076,7 @@ int32_t lsm6dsox_s4s_tph_res_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_s4s_tph_res_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_s4s_tph_res_get(const stmdev_ctx_t *ctx, lsm6dsox_s4s_tph_res_t *val) { lsm6dsox_s4s_tph_l_t reg; @@ -11101,7 +11111,7 @@ int32_t lsm6dsox_s4s_tph_res_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_s4s_tph_val_set(stmdev_ctx_t *ctx, uint16_t val) +int32_t lsm6dsox_s4s_tph_val_set(const stmdev_ctx_t *ctx, uint16_t val) { lsm6dsox_s4s_tph_l_t s4s_tph_l; lsm6dsox_s4s_tph_h_t s4s_tph_h; @@ -11142,7 +11152,7 @@ int32_t lsm6dsox_s4s_tph_val_set(stmdev_ctx_t *ctx, uint16_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_s4s_tph_val_get(stmdev_ctx_t *ctx, uint16_t *val) +int32_t lsm6dsox_s4s_tph_val_get(const stmdev_ctx_t *ctx, uint16_t *val) { lsm6dsox_s4s_tph_l_t s4s_tph_l; lsm6dsox_s4s_tph_h_t s4s_tph_h; @@ -11172,7 +11182,7 @@ int32_t lsm6dsox_s4s_tph_val_get(stmdev_ctx_t *ctx, uint16_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_s4s_res_ratio_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_s4s_res_ratio_set(const stmdev_ctx_t *ctx, lsm6dsox_s4s_res_ratio_t val) { lsm6dsox_s4s_rr_t reg; @@ -11198,7 +11208,7 @@ int32_t lsm6dsox_s4s_res_ratio_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_s4s_res_ratio_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_s4s_res_ratio_get(const stmdev_ctx_t *ctx, lsm6dsox_s4s_res_ratio_t *val) { lsm6dsox_s4s_rr_t reg; @@ -11240,7 +11250,7 @@ int32_t lsm6dsox_s4s_res_ratio_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_s4s_command_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_s4s_command_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_s4s_st_cmd_code_t reg; int32_t ret; @@ -11266,7 +11276,7 @@ int32_t lsm6dsox_s4s_command_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_s4s_command_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_s4s_command_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_s4s_st_cmd_code_t reg; int32_t ret; @@ -11286,7 +11296,7 @@ int32_t lsm6dsox_s4s_command_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_s4s_dt_set(stmdev_ctx_t *ctx, uint8_t val) +int32_t lsm6dsox_s4s_dt_set(const stmdev_ctx_t *ctx, uint8_t val) { lsm6dsox_s4s_dt_reg_t reg; int32_t ret; @@ -11310,7 +11320,7 @@ int32_t lsm6dsox_s4s_dt_set(stmdev_ctx_t *ctx, uint8_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_s4s_dt_get(stmdev_ctx_t *ctx, uint8_t *val) +int32_t lsm6dsox_s4s_dt_get(const stmdev_ctx_t *ctx, uint8_t *val) { lsm6dsox_s4s_dt_reg_t reg; int32_t ret; @@ -11346,7 +11356,7 @@ int32_t lsm6dsox_s4s_dt_get(stmdev_ctx_t *ctx, uint8_t *val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_id_get(stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, +int32_t lsm6dsox_id_get(const stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, lsm6dsox_id_t *val) { int32_t ret = 0; @@ -11380,7 +11390,7 @@ int32_t lsm6dsox_id_get(stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_init_set(stmdev_ctx_t *ctx, lsm6dsox_init_t val) +int32_t lsm6dsox_init_set(const stmdev_ctx_t *ctx, lsm6dsox_init_t val) { lsm6dsox_emb_func_init_a_t emb_func_init_a; lsm6dsox_emb_func_init_b_t emb_func_init_b; @@ -11467,7 +11477,7 @@ int32_t lsm6dsox_init_set(stmdev_ctx_t *ctx, lsm6dsox_init_t val) * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_bus_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_bus_mode_set(const stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, lsm6dsox_bus_mode_t val) { @@ -11573,7 +11583,7 @@ int32_t lsm6dsox_bus_mode_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_bus_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_bus_mode_get(const stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, lsm6dsox_bus_mode_t *val) { @@ -11687,7 +11697,7 @@ int32_t lsm6dsox_bus_mode_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_status_get(stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, +int32_t lsm6dsox_status_get(const stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, lsm6dsox_status_t *val) { lsm6dsox_spi2_status_reg_ois_t spi2_status_reg_ois; @@ -11747,7 +11757,7 @@ int32_t lsm6dsox_status_get(stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_pin_conf_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pin_conf_set(const stmdev_ctx_t *ctx, lsm6dsox_pin_conf_t val) { lsm6dsox_i3c_bus_avb_t i3c_bus_avb; @@ -11800,7 +11810,7 @@ int32_t lsm6dsox_pin_conf_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_pin_conf_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pin_conf_get(const stmdev_ctx_t *ctx, lsm6dsox_pin_conf_t *val) { lsm6dsox_i3c_bus_avb_t i3c_bus_avb; @@ -11840,7 +11850,7 @@ int32_t lsm6dsox_pin_conf_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_interrupt_mode_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_interrupt_mode_set(const stmdev_ctx_t *ctx, lsm6dsox_int_mode_t val) { lsm6dsox_tap_cfg0_t tap_cfg0; @@ -11901,7 +11911,7 @@ int32_t lsm6dsox_interrupt_mode_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_interrupt_mode_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_interrupt_mode_get(const stmdev_ctx_t *ctx, lsm6dsox_int_mode_t *val) { lsm6dsox_tap_cfg0_t tap_cfg0; @@ -11913,14 +11923,13 @@ int32_t lsm6dsox_interrupt_mode_get(stmdev_ctx_t *ctx, if (ret == 0) { - ctrl3_c.h_lactive = val->active_low; + val->active_low = ctrl3_c.h_lactive; ret = lsm6dsox_read_reg(ctx, LSM6DSOX_TAP_CFG0, (uint8_t *) &tap_cfg0, 1); } if (ret == 0) { - tap_cfg0.lir = val->base_latched; - tap_cfg0.int_clr_on_read = val->base_latched | val->emb_latched; + val->base_latched = (tap_cfg0.lir & tap_cfg0.int_clr_on_read); ret = lsm6dsox_mem_bank_set(ctx, LSM6DSOX_EMBEDDED_FUNC_BANK); } @@ -11931,8 +11940,7 @@ int32_t lsm6dsox_interrupt_mode_get(stmdev_ctx_t *ctx, if (ret == 0) { - page_rw.emb_func_lir = val->emb_latched; - ret = lsm6dsox_write_reg(ctx, LSM6DSOX_PAGE_RW, (uint8_t *) &page_rw, 1); + val->emb_latched = (page_rw.emb_func_lir & tap_cfg0.int_clr_on_read); } if (ret == 0) @@ -11951,21 +11959,22 @@ int32_t lsm6dsox_interrupt_mode_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_pin_int1_route_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pin_int1_route_set(const stmdev_ctx_t *ctx, lsm6dsox_pin_int1_route_t val) { lsm6dsox_pin_int2_route_t pin_int2_route; - lsm6dsox_emb_func_int1_t emb_func_int1; - lsm6dsox_fsm_int1_a_t fsm_int1_a; - lsm6dsox_fsm_int1_b_t fsm_int1_b; - lsm6dsox_int1_ctrl_t int1_ctrl; + lsm6dsox_emb_func_int1_t emb_func_int1 = {0}; + lsm6dsox_fsm_int1_a_t fsm_int1_a = {0}; + lsm6dsox_fsm_int1_b_t fsm_int1_b = {0}; + lsm6dsox_int1_ctrl_t int1_ctrl = {0}; lsm6dsox_int2_ctrl_t int2_ctrl; - lsm6dsox_mlc_int1_t mlc_int1; + lsm6dsox_mlc_int1_t mlc_int1 = {0}; lsm6dsox_tap_cfg2_t tap_cfg2; lsm6dsox_md2_cfg_t md2_cfg; - lsm6dsox_md1_cfg_t md1_cfg; + lsm6dsox_md1_cfg_t md1_cfg = {0}; lsm6dsox_ctrl4_c_t ctrl4_c; int32_t ret; + int1_ctrl.int1_drdy_xl = val.drdy_xl; int1_ctrl.int1_drdy_g = val.drdy_g; int1_ctrl.int1_boot = val.boot; @@ -12198,7 +12207,7 @@ int32_t lsm6dsox_pin_int1_route_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_pin_int1_route_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pin_int1_route_get(const stmdev_ctx_t *ctx, lsm6dsox_pin_int1_route_t *val) { lsm6dsox_emb_func_int1_t emb_func_int1; @@ -12338,7 +12347,7 @@ int32_t lsm6dsox_pin_int1_route_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_pin_int2_route_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pin_int2_route_set(const stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, lsm6dsox_pin_int2_route_t val) { @@ -12580,7 +12589,7 @@ int32_t lsm6dsox_pin_int2_route_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_pin_int2_route_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_pin_int2_route_get(const stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, lsm6dsox_pin_int2_route_t *val) { @@ -12731,7 +12740,7 @@ int32_t lsm6dsox_pin_int2_route_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_all_sources_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_all_sources_get(const stmdev_ctx_t *ctx, lsm6dsox_all_sources_t *val) { lsm6dsox_emb_func_status_mainpage_t emb_func_status_mainpage; @@ -12861,24 +12870,24 @@ int32_t lsm6dsox_all_sources_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_mode_set(stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, +int32_t lsm6dsox_mode_set(const stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, lsm6dsox_md_t *val) { lsm6dsox_func_cfg_access_t func_cfg_access; - lsm6dsox_spi2_ctrl1_ois_t spi2_ctrl1_ois; - lsm6dsox_spi2_ctrl2_ois_t spi2_ctrl2_ois; - lsm6dsox_spi2_ctrl3_ois_t spi2_ctrl3_ois; - lsm6dsox_ui_ctrl1_ois_t ui_ctrl1_ois; - lsm6dsox_ui_ctrl2_ois_t ui_ctrl2_ois; - lsm6dsox_ui_ctrl3_ois_t ui_ctrl3_ois; - lsm6dsox_ctrl1_xl_t ctrl1_xl; - lsm6dsox_ctrl8_xl_t ctrl8_xl; - lsm6dsox_ctrl2_g_t ctrl2_g; - lsm6dsox_ctrl3_c_t ctrl3_c; - lsm6dsox_ctrl4_c_t ctrl4_c; - lsm6dsox_ctrl5_c_t ctrl5_c; - lsm6dsox_ctrl6_c_t ctrl6_c; - lsm6dsox_ctrl7_g_t ctrl7_g; + lsm6dsox_spi2_ctrl1_ois_t spi2_ctrl1_ois = {0}; + lsm6dsox_spi2_ctrl2_ois_t spi2_ctrl2_ois = {0}; + lsm6dsox_spi2_ctrl3_ois_t spi2_ctrl3_ois = {0}; + lsm6dsox_ui_ctrl1_ois_t ui_ctrl1_ois = {0}; + lsm6dsox_ui_ctrl2_ois_t ui_ctrl2_ois = {0}; + lsm6dsox_ui_ctrl3_ois_t ui_ctrl3_ois = {0}; + lsm6dsox_ctrl1_xl_t ctrl1_xl = {0}; + lsm6dsox_ctrl8_xl_t ctrl8_xl = {0}; + lsm6dsox_ctrl2_g_t ctrl2_g = {0}; + lsm6dsox_ctrl3_c_t ctrl3_c = {0}; + lsm6dsox_ctrl4_c_t ctrl4_c = {0}; + lsm6dsox_ctrl5_c_t ctrl5_c = {0}; + lsm6dsox_ctrl6_c_t ctrl6_c = {0}; + lsm6dsox_ctrl7_g_t ctrl7_g = {0}; uint8_t xl_hm_mode; uint8_t g_hm_mode; uint8_t xl_ulp_en; @@ -12974,7 +12983,7 @@ int32_t lsm6dsox_mode_set(stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, { switch (val->fsm.odr) { - case LSM6DSOX_FSM_12Hz5: + case LSM6DSOX_ODR_FSM_12Hz5: if ((val->fsm.sens != LSM6DSOX_FSM_GY) && (odr_xl == 0x00U)) { odr_xl = 0x01U; @@ -12988,7 +12997,7 @@ int32_t lsm6dsox_mode_set(stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, break; - case LSM6DSOX_FSM_26Hz: + case LSM6DSOX_ODR_FSM_26Hz: if ((val->fsm.sens != LSM6DSOX_FSM_GY) && (odr_xl < 0x02U)) { odr_xl = 0x02U; @@ -13002,7 +13011,7 @@ int32_t lsm6dsox_mode_set(stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, break; - case LSM6DSOX_FSM_52Hz: + case LSM6DSOX_ODR_FSM_52Hz: if ((val->fsm.sens != LSM6DSOX_FSM_GY) && (odr_xl < 0x03U)) { odr_xl = 0x03U; @@ -13016,7 +13025,7 @@ int32_t lsm6dsox_mode_set(stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, break; - case LSM6DSOX_FSM_104Hz: + case LSM6DSOX_ODR_FSM_104Hz: if ((val->fsm.sens != LSM6DSOX_FSM_GY) && (odr_xl < 0x04U)) { odr_xl = 0x04U; @@ -13042,7 +13051,7 @@ int32_t lsm6dsox_mode_set(stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, { switch (val->mlc.odr) { - case LSM6DSOX_MLC_12Hz5: + case LSM6DSOX_ODR_PRGS_12Hz5: if (odr_xl == 0x00U) { odr_xl = 0x01U; @@ -13056,7 +13065,7 @@ int32_t lsm6dsox_mode_set(stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, break; - case LSM6DSOX_MLC_26Hz: + case LSM6DSOX_ODR_PRGS_26Hz: if (odr_xl < 0x02U) { odr_xl = 0x02U; @@ -13070,7 +13079,7 @@ int32_t lsm6dsox_mode_set(stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, break; - case LSM6DSOX_MLC_52Hz: + case LSM6DSOX_ODR_PRGS_52Hz: if (odr_xl < 0x03U) { odr_xl = 0x03U; @@ -13084,7 +13093,7 @@ int32_t lsm6dsox_mode_set(stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, break; - case LSM6DSOX_MLC_104Hz: + case LSM6DSOX_ODR_PRGS_104Hz: if (odr_xl < 0x04U) { odr_xl = 0x04U; @@ -13413,7 +13422,7 @@ int32_t lsm6dsox_mode_set(stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_mode_get(stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, +int32_t lsm6dsox_mode_get(const stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, lsm6dsox_md_t *val) { lsm6dsox_emb_func_odr_cfg_b_t emb_func_odr_cfg_b; @@ -13753,24 +13762,24 @@ int32_t lsm6dsox_mode_get(stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, { switch (emb_func_odr_cfg_b.fsm_odr) { - case LSM6DSOX_FSM_12Hz5: - val->fsm.odr = LSM6DSOX_FSM_12Hz5; + case LSM6DSOX_ODR_FSM_12Hz5: + val->fsm.odr = LSM6DSOX_ODR_FSM_12Hz5; break; - case LSM6DSOX_FSM_26Hz: - val->fsm.odr = LSM6DSOX_FSM_26Hz; + case LSM6DSOX_ODR_FSM_26Hz: + val->fsm.odr = LSM6DSOX_ODR_FSM_26Hz; break; - case LSM6DSOX_FSM_52Hz: - val->fsm.odr = LSM6DSOX_FSM_52Hz; + case LSM6DSOX_ODR_FSM_52Hz: + val->fsm.odr = LSM6DSOX_ODR_FSM_52Hz; break; - case LSM6DSOX_FSM_104Hz: - val->fsm.odr = LSM6DSOX_FSM_104Hz; + case LSM6DSOX_ODR_FSM_104Hz: + val->fsm.odr = LSM6DSOX_ODR_FSM_104Hz; break; default: - val->fsm.odr = LSM6DSOX_FSM_12Hz5; + val->fsm.odr = LSM6DSOX_ODR_FSM_12Hz5; break; } @@ -13797,24 +13806,24 @@ int32_t lsm6dsox_mode_get(stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, { switch (emb_func_odr_cfg_c.mlc_odr) { - case LSM6DSOX_MLC_12Hz5: - val->mlc.odr = LSM6DSOX_MLC_12Hz5; + case LSM6DSOX_ODR_PRGS_12Hz5: + val->mlc.odr = LSM6DSOX_ODR_PRGS_12Hz5; break; - case LSM6DSOX_MLC_26Hz: - val->mlc.odr = LSM6DSOX_MLC_26Hz; + case LSM6DSOX_ODR_PRGS_26Hz: + val->mlc.odr = LSM6DSOX_ODR_PRGS_26Hz; break; - case LSM6DSOX_MLC_52Hz: - val->mlc.odr = LSM6DSOX_MLC_52Hz; + case LSM6DSOX_ODR_PRGS_52Hz: + val->mlc.odr = LSM6DSOX_ODR_PRGS_52Hz; break; - case LSM6DSOX_MLC_104Hz: - val->mlc.odr = LSM6DSOX_MLC_104Hz; + case LSM6DSOX_ODR_PRGS_104Hz: + val->mlc.odr = LSM6DSOX_ODR_PRGS_104Hz; break; default: - val->mlc.odr = LSM6DSOX_MLC_12Hz5; + val->mlc.odr = LSM6DSOX_ODR_PRGS_12Hz5; break; } @@ -14107,7 +14116,7 @@ int32_t lsm6dsox_mode_get(stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_data_get(stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, +int32_t lsm6dsox_data_get(const stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, lsm6dsox_md_t *md, lsm6dsox_data_t *data) { uint8_t buff[14]; @@ -14303,7 +14312,7 @@ int32_t lsm6dsox_data_get(stmdev_ctx_t *ctx, stmdev_ctx_t *aux_ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_embedded_sens_set(stmdev_ctx_t *ctx, +int32_t lsm6dsox_embedded_sens_set(const stmdev_ctx_t *ctx, lsm6dsox_emb_sens_t *val) { lsm6dsox_emb_func_en_a_t emb_func_en_a; @@ -14359,7 +14368,7 @@ int32_t lsm6dsox_embedded_sens_set(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_embedded_sens_get(stmdev_ctx_t *ctx, +int32_t lsm6dsox_embedded_sens_get(const stmdev_ctx_t *ctx, lsm6dsox_emb_sens_t *emb_sens) { lsm6dsox_emb_func_en_a_t emb_func_en_a; @@ -14403,7 +14412,7 @@ int32_t lsm6dsox_embedded_sens_get(stmdev_ctx_t *ctx, * @retval interface status (MANDATORY: return 0 -> no Error) * */ -int32_t lsm6dsox_embedded_sens_off(stmdev_ctx_t *ctx) +int32_t lsm6dsox_embedded_sens_off(const stmdev_ctx_t *ctx) { lsm6dsox_emb_func_en_a_t emb_func_en_a; lsm6dsox_emb_func_en_b_t emb_func_en_b; @@ -14459,8 +14468,4 @@ int32_t lsm6dsox_embedded_sens_off(stmdev_ctx_t *ctx) * */ - /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ - - -