STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
ISM330DHCX_Interfaces_Functions

This section provide a set of functions used to read and write a generic register of the device. More...

Collaboration diagram for ISM330DHCX_Interfaces_Functions:

Functions

int32_t ism330dhcx_read_reg (stmdev_ctx_t *ctx, uint8_t reg, uint8_t *data, uint16_t len)
 Read generic device register.
int32_t ism330dhcx_write_reg (stmdev_ctx_t *ctx, uint8_t reg, uint8_t *data, uint16_t len)
 Write generic device register.

Detailed Description

This section provide a set of functions used to read and write a generic register of the device.

MANDATORY: return 0 -> no Error.

Function Documentation

◆ ism330dhcx_read_reg()

int32_t ism330dhcx_read_reg ( stmdev_ctx_t * ctx,
uint8_t reg,
uint8_t * data,
uint16_t len )

Read generic device register.

Parameters
ctxread / write interface definitions(ptr)
regregister to read
datapointer to buffer that store the data read(ptr)
lennumber of consecutive register to read
Return values
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 49 of file ism330dhcx_reg.c.

References stmdev_ctx_t::handle, stmdev_ctx_t::read_reg, and reg.

Referenced by ism330dhcx_4d_mode_get(), ism330dhcx_4d_mode_set(), ism330dhcx_6d_threshold_get(), ism330dhcx_6d_threshold_set(), ism330dhcx_acceleration_raw_get(), ism330dhcx_act_mode_get(), ism330dhcx_act_mode_set(), ism330dhcx_act_pin_notification_get(), ism330dhcx_act_pin_notification_set(), ism330dhcx_act_sleep_dur_get(), ism330dhcx_act_sleep_dur_set(), ism330dhcx_all_on_int1_get(), ism330dhcx_all_on_int1_set(), ism330dhcx_all_sources_get(), ism330dhcx_angular_rate_raw_get(), ism330dhcx_auto_increment_get(), ism330dhcx_auto_increment_set(), ism330dhcx_aux_den_mode_get(), ism330dhcx_aux_den_mode_set(), ism330dhcx_aux_den_polarity_get(), ism330dhcx_aux_den_polarity_set(), ism330dhcx_aux_drdy_on_int2_get(), ism330dhcx_aux_drdy_on_int2_set(), ism330dhcx_aux_gy_clamp_get(), ism330dhcx_aux_gy_clamp_set(), ism330dhcx_aux_gy_flag_data_ready_get(), ism330dhcx_aux_gy_flag_settling_get(), ism330dhcx_aux_gy_full_scale_get(), ism330dhcx_aux_gy_full_scale_set(), ism330dhcx_aux_gy_hp_bandwidth_get(), ism330dhcx_aux_gy_hp_bandwidth_set(), ism330dhcx_aux_gy_lp1_bandwidth_get(), ism330dhcx_aux_gy_lp1_bandwidth_set(), ism330dhcx_aux_gy_self_test_get(), ism330dhcx_aux_gy_self_test_set(), ism330dhcx_aux_mode_get(), ism330dhcx_aux_mode_set(), ism330dhcx_aux_pw_on_ctrl_get(), ism330dhcx_aux_pw_on_ctrl_set(), ism330dhcx_aux_sdo_ocs_mode_get(), ism330dhcx_aux_sdo_ocs_mode_set(), ism330dhcx_aux_spi_mode_get(), ism330dhcx_aux_spi_mode_set(), ism330dhcx_aux_status_reg_get(), ism330dhcx_aux_xl_bandwidth_get(), ism330dhcx_aux_xl_bandwidth_set(), ism330dhcx_aux_xl_flag_data_ready_get(), ism330dhcx_aux_xl_full_scale_get(), ism330dhcx_aux_xl_full_scale_set(), ism330dhcx_aux_xl_self_test_get(), ism330dhcx_aux_xl_self_test_set(), ism330dhcx_batch_counter_threshold_get(), ism330dhcx_batch_counter_threshold_set(), ism330dhcx_block_data_update_get(), ism330dhcx_block_data_update_set(), ism330dhcx_boot_get(), ism330dhcx_boot_set(), ism330dhcx_compression_algo_get(), ism330dhcx_compression_algo_init_get(), ism330dhcx_compression_algo_init_set(), ism330dhcx_compression_algo_real_time_get(), ism330dhcx_compression_algo_real_time_set(), ism330dhcx_compression_algo_set(), ism330dhcx_data_ready_mode_get(), ism330dhcx_data_ready_mode_set(), ism330dhcx_den_enable_get(), ism330dhcx_den_enable_set(), ism330dhcx_den_mark_axis_x_get(), ism330dhcx_den_mark_axis_x_set(), ism330dhcx_den_mark_axis_y_get(), ism330dhcx_den_mark_axis_y_set(), ism330dhcx_den_mark_axis_z_get(), ism330dhcx_den_mark_axis_z_set(), ism330dhcx_den_mode_get(), ism330dhcx_den_mode_set(), ism330dhcx_den_polarity_get(), ism330dhcx_den_polarity_set(), ism330dhcx_device_conf_get(), ism330dhcx_device_conf_set(), ism330dhcx_device_id_get(), ism330dhcx_emb_fsm_en_get(), ism330dhcx_emb_fsm_en_set(), ism330dhcx_ff_dur_get(), ism330dhcx_ff_dur_set(), ism330dhcx_ff_threshold_get(), ism330dhcx_ff_threshold_set(), ism330dhcx_fifo_cnt_event_batch_get(), ism330dhcx_fifo_cnt_event_batch_set(), ism330dhcx_fifo_data_level_get(), ism330dhcx_fifo_full_flag_get(), ism330dhcx_fifo_gy_batch_get(), ism330dhcx_fifo_gy_batch_set(), ism330dhcx_fifo_mode_get(), ism330dhcx_fifo_mode_set(), ism330dhcx_fifo_out_raw_get(), ism330dhcx_fifo_ovr_flag_get(), ism330dhcx_fifo_pedo_batch_get(), ism330dhcx_fifo_pedo_batch_set(), ism330dhcx_fifo_sensor_tag_get(), ism330dhcx_fifo_status_get(), ism330dhcx_fifo_stop_on_wtm_get(), ism330dhcx_fifo_stop_on_wtm_set(), ism330dhcx_fifo_temp_batch_get(), ism330dhcx_fifo_temp_batch_set(), ism330dhcx_fifo_timestamp_decimation_get(), ism330dhcx_fifo_timestamp_decimation_set(), ism330dhcx_fifo_virtual_sens_odr_chg_get(), ism330dhcx_fifo_virtual_sens_odr_chg_set(), ism330dhcx_fifo_watermark_get(), ism330dhcx_fifo_watermark_set(), ism330dhcx_fifo_wtm_flag_get(), ism330dhcx_fifo_xl_batch_get(), ism330dhcx_fifo_xl_batch_set(), ism330dhcx_filter_settling_mask_get(), ism330dhcx_filter_settling_mask_set(), ism330dhcx_fsm_data_rate_get(), ism330dhcx_fsm_data_rate_set(), ism330dhcx_fsm_enable_get(), ism330dhcx_fsm_enable_set(), ism330dhcx_fsm_init_get(), ism330dhcx_fsm_init_set(), ism330dhcx_fsm_out_get(), ism330dhcx_gy_data_rate_get(), ism330dhcx_gy_data_rate_set(), ism330dhcx_gy_filter_lp1_get(), ism330dhcx_gy_filter_lp1_set(), ism330dhcx_gy_flag_data_ready_get(), ism330dhcx_gy_full_scale_get(), ism330dhcx_gy_full_scale_set(), ism330dhcx_gy_hp_path_internal_get(), ism330dhcx_gy_hp_path_internal_set(), ism330dhcx_gy_lp1_bandwidth_get(), ism330dhcx_gy_lp1_bandwidth_set(), ism330dhcx_gy_power_mode_get(), ism330dhcx_gy_power_mode_set(), ism330dhcx_gy_self_test_get(), ism330dhcx_gy_self_test_set(), ism330dhcx_gy_sleep_mode_get(), ism330dhcx_gy_sleep_mode_set(), ism330dhcx_i2c_interface_get(), ism330dhcx_i2c_interface_set(), ism330dhcx_int_notification_get(), ism330dhcx_int_notification_set(), ism330dhcx_ln_pg_read_byte(), ism330dhcx_ln_pg_write(), ism330dhcx_ln_pg_write_byte(), ism330dhcx_long_clr_get(), ism330dhcx_long_clr_set(), ism330dhcx_long_cnt_flag_data_ready_get(), ism330dhcx_long_cnt_get(), ism330dhcx_mem_bank_get(), ism330dhcx_mem_bank_set(), ism330dhcx_mlc_data_rate_get(), ism330dhcx_mlc_data_rate_set(), ism330dhcx_mlc_get(), ism330dhcx_mlc_out_get(), ism330dhcx_mlc_set(), ism330dhcx_mlc_status_get(), ism330dhcx_motion_flag_data_ready_get(), ism330dhcx_motion_sens_get(), ism330dhcx_motion_sens_set(), ism330dhcx_number_of_steps_get(), ism330dhcx_odr_cal_reg_get(), ism330dhcx_odr_cal_reg_set(), ism330dhcx_pedo_sens_get(), ism330dhcx_pedo_sens_set(), ism330dhcx_pedo_step_detect_get(), ism330dhcx_pin_int1_route_get(), ism330dhcx_pin_int1_route_set(), ism330dhcx_pin_int2_route_get(), ism330dhcx_pin_int2_route_set(), ism330dhcx_pin_mode_get(), ism330dhcx_pin_mode_set(), ism330dhcx_pin_polarity_get(), ism330dhcx_pin_polarity_set(), ism330dhcx_reset_get(), ism330dhcx_reset_set(), ism330dhcx_rounding_mode_get(), ism330dhcx_rounding_mode_set(), ism330dhcx_rst_batch_counter_get(), ism330dhcx_rst_batch_counter_set(), ism330dhcx_sdo_sa0_mode_get(), ism330dhcx_sdo_sa0_mode_set(), ism330dhcx_sh_batch_slave_0_get(), ism330dhcx_sh_batch_slave_0_set(), ism330dhcx_sh_batch_slave_1_get(), ism330dhcx_sh_batch_slave_1_set(), ism330dhcx_sh_batch_slave_2_get(), ism330dhcx_sh_batch_slave_2_set(), ism330dhcx_sh_batch_slave_3_get(), ism330dhcx_sh_batch_slave_3_set(), ism330dhcx_sh_data_rate_get(), ism330dhcx_sh_data_rate_set(), ism330dhcx_sh_master_get(), ism330dhcx_sh_master_set(), ism330dhcx_sh_pass_through_get(), ism330dhcx_sh_pass_through_set(), ism330dhcx_sh_pin_mode_get(), ism330dhcx_sh_pin_mode_set(), ism330dhcx_sh_read_data_raw_get(), ism330dhcx_sh_reset_get(), ism330dhcx_sh_reset_set(), ism330dhcx_sh_slave_connected_get(), ism330dhcx_sh_slave_connected_set(), ism330dhcx_sh_slv0_cfg_read(), ism330dhcx_sh_slv1_cfg_read(), ism330dhcx_sh_slv2_cfg_read(), ism330dhcx_sh_slv3_cfg_read(), ism330dhcx_sh_status_get(), ism330dhcx_sh_syncro_mode_get(), ism330dhcx_sh_syncro_mode_set(), ism330dhcx_sh_write_mode_get(), ism330dhcx_sh_write_mode_set(), ism330dhcx_spi_mode_get(), ism330dhcx_spi_mode_set(), ism330dhcx_status_reg_get(), ism330dhcx_steps_reset(), ism330dhcx_tap_axis_priority_get(), ism330dhcx_tap_axis_priority_set(), ism330dhcx_tap_detection_on_x_get(), ism330dhcx_tap_detection_on_x_set(), ism330dhcx_tap_detection_on_y_get(), ism330dhcx_tap_detection_on_y_set(), ism330dhcx_tap_detection_on_z_get(), ism330dhcx_tap_detection_on_z_set(), ism330dhcx_tap_dur_get(), ism330dhcx_tap_dur_set(), ism330dhcx_tap_mode_get(), ism330dhcx_tap_mode_set(), ism330dhcx_tap_quiet_get(), ism330dhcx_tap_quiet_set(), ism330dhcx_tap_shock_get(), ism330dhcx_tap_shock_set(), ism330dhcx_tap_threshold_x_get(), ism330dhcx_tap_threshold_x_set(), ism330dhcx_tap_threshold_y_get(), ism330dhcx_tap_threshold_y_set(), ism330dhcx_tap_threshold_z_get(), ism330dhcx_tap_threshold_z_set(), ism330dhcx_temp_flag_data_ready_get(), ism330dhcx_temperature_raw_get(), ism330dhcx_tilt_flag_data_ready_get(), ism330dhcx_tilt_sens_get(), ism330dhcx_tilt_sens_set(), ism330dhcx_timestamp_get(), ism330dhcx_timestamp_raw_get(), ism330dhcx_timestamp_set(), ism330dhcx_wkup_dur_get(), ism330dhcx_wkup_dur_set(), ism330dhcx_wkup_threshold_get(), ism330dhcx_wkup_threshold_set(), ism330dhcx_wkup_ths_weight_get(), ism330dhcx_wkup_ths_weight_set(), ism330dhcx_xl_data_rate_get(), ism330dhcx_xl_data_rate_set(), ism330dhcx_xl_fast_settling_get(), ism330dhcx_xl_fast_settling_set(), ism330dhcx_xl_filter_lp2_get(), ism330dhcx_xl_filter_lp2_set(), ism330dhcx_xl_flag_data_ready_get(), ism330dhcx_xl_full_scale_get(), ism330dhcx_xl_full_scale_set(), ism330dhcx_xl_hp_path_internal_get(), ism330dhcx_xl_hp_path_internal_set(), ism330dhcx_xl_hp_path_on_out_get(), ism330dhcx_xl_hp_path_on_out_set(), ism330dhcx_xl_lp2_on_6d_get(), ism330dhcx_xl_lp2_on_6d_set(), ism330dhcx_xl_offset_weight_get(), ism330dhcx_xl_offset_weight_set(), ism330dhcx_xl_power_mode_get(), ism330dhcx_xl_power_mode_set(), ism330dhcx_xl_self_test_get(), ism330dhcx_xl_self_test_set(), ism330dhcx_xl_usr_offset_get(), ism330dhcx_xl_usr_offset_on_wkup_get(), ism330dhcx_xl_usr_offset_on_wkup_set(), ism330dhcx_xl_usr_offset_set(), ism330dhcx_xl_usr_offset_x_get(), ism330dhcx_xl_usr_offset_y_get(), and ism330dhcx_xl_usr_offset_z_get().

◆ ism330dhcx_write_reg()

int32_t ism330dhcx_write_reg ( stmdev_ctx_t * ctx,
uint8_t reg,
uint8_t * data,
uint16_t len )

Write generic device register.

Parameters
ctxread / write interface definitions(ptr)
regregister to write
datapointer to data to write in register reg(ptr)
lennumber of consecutive register to write
Return values
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 69 of file ism330dhcx_reg.c.

References stmdev_ctx_t::handle, reg, and stmdev_ctx_t::write_reg.

Referenced by ism330dhcx_4d_mode_set(), ism330dhcx_6d_threshold_set(), ism330dhcx_act_mode_set(), ism330dhcx_act_pin_notification_set(), ism330dhcx_act_sleep_dur_set(), ism330dhcx_all_on_int1_set(), ism330dhcx_auto_increment_set(), ism330dhcx_aux_den_mode_set(), ism330dhcx_aux_den_polarity_set(), ism330dhcx_aux_drdy_on_int2_set(), ism330dhcx_aux_gy_clamp_set(), ism330dhcx_aux_gy_full_scale_set(), ism330dhcx_aux_gy_hp_bandwidth_set(), ism330dhcx_aux_gy_lp1_bandwidth_set(), ism330dhcx_aux_gy_self_test_set(), ism330dhcx_aux_mode_set(), ism330dhcx_aux_pw_on_ctrl_set(), ism330dhcx_aux_sdo_ocs_mode_set(), ism330dhcx_aux_spi_mode_set(), ism330dhcx_aux_xl_bandwidth_set(), ism330dhcx_aux_xl_full_scale_set(), ism330dhcx_aux_xl_self_test_set(), ism330dhcx_batch_counter_threshold_set(), ism330dhcx_block_data_update_set(), ism330dhcx_boot_set(), ism330dhcx_compression_algo_init_set(), ism330dhcx_compression_algo_real_time_set(), ism330dhcx_compression_algo_set(), ism330dhcx_data_ready_mode_set(), ism330dhcx_den_enable_set(), ism330dhcx_den_mark_axis_x_set(), ism330dhcx_den_mark_axis_y_set(), ism330dhcx_den_mark_axis_z_set(), ism330dhcx_den_mode_set(), ism330dhcx_den_polarity_set(), ism330dhcx_device_conf_set(), ism330dhcx_emb_fsm_en_get(), ism330dhcx_emb_fsm_en_set(), ism330dhcx_ff_dur_set(), ism330dhcx_ff_threshold_set(), ism330dhcx_fifo_cnt_event_batch_set(), ism330dhcx_fifo_gy_batch_set(), ism330dhcx_fifo_mode_set(), ism330dhcx_fifo_pedo_batch_set(), ism330dhcx_fifo_stop_on_wtm_set(), ism330dhcx_fifo_temp_batch_set(), ism330dhcx_fifo_timestamp_decimation_set(), ism330dhcx_fifo_virtual_sens_odr_chg_set(), ism330dhcx_fifo_watermark_set(), ism330dhcx_fifo_xl_batch_set(), ism330dhcx_filter_settling_mask_set(), ism330dhcx_fsm_data_rate_set(), ism330dhcx_fsm_enable_set(), ism330dhcx_fsm_init_set(), ism330dhcx_gy_data_rate_set(), ism330dhcx_gy_filter_lp1_set(), ism330dhcx_gy_full_scale_set(), ism330dhcx_gy_hp_path_internal_set(), ism330dhcx_gy_lp1_bandwidth_set(), ism330dhcx_gy_power_mode_set(), ism330dhcx_gy_self_test_set(), ism330dhcx_gy_sleep_mode_set(), ism330dhcx_i2c_interface_set(), ism330dhcx_int_notification_set(), ism330dhcx_ln_pg_read_byte(), ism330dhcx_ln_pg_write(), ism330dhcx_ln_pg_write_byte(), ism330dhcx_long_clr_set(), ism330dhcx_long_cnt_set(), ism330dhcx_mem_bank_set(), ism330dhcx_mlc_data_rate_set(), ism330dhcx_mlc_set(), ism330dhcx_motion_sens_set(), ism330dhcx_odr_cal_reg_set(), ism330dhcx_pedo_sens_set(), ism330dhcx_pin_int1_route_set(), ism330dhcx_pin_int2_route_set(), ism330dhcx_pin_mode_set(), ism330dhcx_pin_polarity_set(), ism330dhcx_reset_set(), ism330dhcx_rounding_mode_set(), ism330dhcx_rst_batch_counter_set(), ism330dhcx_sdo_sa0_mode_set(), ism330dhcx_sh_batch_slave_0_set(), ism330dhcx_sh_batch_slave_1_set(), ism330dhcx_sh_batch_slave_2_set(), ism330dhcx_sh_batch_slave_3_set(), ism330dhcx_sh_cfg_write(), ism330dhcx_sh_data_rate_set(), ism330dhcx_sh_master_set(), ism330dhcx_sh_pass_through_set(), ism330dhcx_sh_pin_mode_set(), ism330dhcx_sh_reset_set(), ism330dhcx_sh_slave_connected_set(), ism330dhcx_sh_slv0_cfg_read(), ism330dhcx_sh_slv1_cfg_read(), ism330dhcx_sh_slv2_cfg_read(), ism330dhcx_sh_slv3_cfg_read(), ism330dhcx_sh_syncro_mode_set(), ism330dhcx_sh_write_mode_set(), ism330dhcx_spi_mode_set(), ism330dhcx_steps_reset(), ism330dhcx_tap_axis_priority_set(), ism330dhcx_tap_detection_on_x_set(), ism330dhcx_tap_detection_on_y_set(), ism330dhcx_tap_detection_on_z_set(), ism330dhcx_tap_dur_set(), ism330dhcx_tap_mode_set(), ism330dhcx_tap_quiet_set(), ism330dhcx_tap_shock_set(), ism330dhcx_tap_threshold_x_set(), ism330dhcx_tap_threshold_y_set(), ism330dhcx_tap_threshold_z_set(), ism330dhcx_tilt_sens_set(), ism330dhcx_timestamp_rst(), ism330dhcx_timestamp_set(), ism330dhcx_wkup_dur_set(), ism330dhcx_wkup_threshold_set(), ism330dhcx_wkup_ths_weight_set(), ism330dhcx_xl_data_rate_set(), ism330dhcx_xl_fast_settling_set(), ism330dhcx_xl_filter_lp2_set(), ism330dhcx_xl_full_scale_set(), ism330dhcx_xl_hp_path_internal_set(), ism330dhcx_xl_hp_path_on_out_set(), ism330dhcx_xl_lp2_on_6d_set(), ism330dhcx_xl_offset_weight_set(), ism330dhcx_xl_power_mode_set(), ism330dhcx_xl_self_test_set(), ism330dhcx_xl_usr_offset_on_wkup_set(), ism330dhcx_xl_usr_offset_set(), ism330dhcx_xl_usr_offset_x_set(), ism330dhcx_xl_usr_offset_y_set(), and ism330dhcx_xl_usr_offset_z_set().