|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
This section groups common useful functions. More...
Functions | |
| int32_t | ism330dhcx_device_conf_set (stmdev_ctx_t *ctx, uint8_t val) |
| DEVICE_CONF bit configuration[set]. | |
| int32_t | ism330dhcx_device_conf_get (stmdev_ctx_t *ctx, uint8_t *val) |
| DEVICE_CONF bit configuration[get]. | |
| int32_t | ism330dhcx_odr_cal_reg_set (stmdev_ctx_t *ctx, uint8_t val) |
| Difference in percentage of the effective ODR (and timestamp rate) with respect to the typical. | |
| int32_t | ism330dhcx_odr_cal_reg_get (stmdev_ctx_t *ctx, uint8_t *val) |
| Difference in percentage of the effective ODR (and timestamp rate) with respect to the typical. | |
| int32_t | ism330dhcx_mem_bank_set (stmdev_ctx_t *ctx, ism330dhcx_reg_access_t val) |
| Enable access to the embedded functions/sensor hub configuration registers. | |
| int32_t | ism330dhcx_mem_bank_get (stmdev_ctx_t *ctx, ism330dhcx_reg_access_t *val) |
| Enable access to the embedded functions/sensor hub configuration registers. | |
| int32_t | ism330dhcx_ln_pg_write_byte (stmdev_ctx_t *ctx, uint16_t add, uint8_t *val) |
| Write a line(byte) in a page. | |
| int32_t | ism330dhcx_ln_pg_write (stmdev_ctx_t *ctx, uint16_t add, uint8_t *buf, uint8_t len) |
| Write buffer in a page. | |
| int32_t | ism330dhcx_ln_pg_read_byte (stmdev_ctx_t *ctx, uint16_t add, uint8_t *val) |
| Read a line(byte) in a page. | |
| int32_t | ism330dhcx_data_ready_mode_set (stmdev_ctx_t *ctx, ism330dhcx_dataready_pulsed_t val) |
| Data-ready pulsed / letched mode. | |
| int32_t | ism330dhcx_data_ready_mode_get (stmdev_ctx_t *ctx, ism330dhcx_dataready_pulsed_t *val) |
| Data-ready pulsed / letched mode. | |
| int32_t | ism330dhcx_device_id_get (stmdev_ctx_t *ctx, uint8_t *buff) |
| Device Who am I. | |
| int32_t | ism330dhcx_reset_set (stmdev_ctx_t *ctx, uint8_t val) |
| Software reset. | |
| int32_t | ism330dhcx_reset_get (stmdev_ctx_t *ctx, uint8_t *val) |
| Software reset. | |
| int32_t | ism330dhcx_auto_increment_set (stmdev_ctx_t *ctx, uint8_t val) |
| Register address automatically incremented during a multiple byte access with a serial interface. | |
| int32_t | ism330dhcx_auto_increment_get (stmdev_ctx_t *ctx, uint8_t *val) |
| Register address automatically incremented during a multiple byte access with a serial interface. | |
| int32_t | ism330dhcx_boot_set (stmdev_ctx_t *ctx, uint8_t val) |
| Reboot memory content. | |
| int32_t | ism330dhcx_boot_get (stmdev_ctx_t *ctx, uint8_t *val) |
| Reboot memory content. | |
| int32_t | ism330dhcx_xl_self_test_set (stmdev_ctx_t *ctx, ism330dhcx_st_xl_t val) |
| Linear acceleration sensor self-test enable. | |
| int32_t | ism330dhcx_xl_self_test_get (stmdev_ctx_t *ctx, ism330dhcx_st_xl_t *val) |
| Linear acceleration sensor self-test enable. | |
| int32_t | ism330dhcx_gy_self_test_set (stmdev_ctx_t *ctx, ism330dhcx_st_g_t val) |
| Angular rate sensor self-test enable. | |
| int32_t | ism330dhcx_gy_self_test_get (stmdev_ctx_t *ctx, ism330dhcx_st_g_t *val) |
| Angular rate sensor self-test enable. | |
This section groups common useful functions.
| int32_t ism330dhcx_auto_increment_get | ( | stmdev_ctx_t * | ctx, |
| uint8_t * | val ) |
Register address automatically incremented during a multiple byte access with a serial interface.
[get]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of if_inc in reg CTRL3_C |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 2449 of file ism330dhcx_reg.c.
References ism330dhcx_ctrl3_c_t::if_inc, ISM330DHCX_CTRL3_C, and ism330dhcx_read_reg().
| int32_t ism330dhcx_auto_increment_set | ( | stmdev_ctx_t * | ctx, |
| uint8_t | val ) |
Register address automatically incremented during a multiple byte access with a serial interface.
[set]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of if_inc in reg CTRL3_C |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 2423 of file ism330dhcx_reg.c.
References ism330dhcx_ctrl3_c_t::if_inc, ISM330DHCX_CTRL3_C, ism330dhcx_read_reg(), and ism330dhcx_write_reg().
| int32_t ism330dhcx_boot_get | ( | stmdev_ctx_t * | ctx, |
| uint8_t * | val ) |
Reboot memory content.
Reload the calibration parameters.[get]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of boot in reg CTRL3_C |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 2493 of file ism330dhcx_reg.c.
References ism330dhcx_ctrl3_c_t::boot, ISM330DHCX_CTRL3_C, and ism330dhcx_read_reg().
| int32_t ism330dhcx_boot_set | ( | stmdev_ctx_t * | ctx, |
| uint8_t | val ) |
Reboot memory content.
Reload the calibration parameters.[set]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of boot in reg CTRL3_C |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 2468 of file ism330dhcx_reg.c.
References ism330dhcx_ctrl3_c_t::boot, ISM330DHCX_CTRL3_C, ism330dhcx_read_reg(), and ism330dhcx_write_reg().
| int32_t ism330dhcx_data_ready_mode_get | ( | stmdev_ctx_t * | ctx, |
| ism330dhcx_dataready_pulsed_t * | val ) |
Data-ready pulsed / letched mode.
[get]
| ctx | Read / write interface definitions.(ptr) |
| val | Get the values of dataready_pulsed in reg COUNTER_BDR_REG1 |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 2328 of file ism330dhcx_reg.c.
References ism330dhcx_counter_bdr_reg1_t::dataready_pulsed, ISM330DHCX_COUNTER_BDR_REG1, ISM330DHCX_DRDY_LATCHED, ISM330DHCX_DRDY_PULSED, and ism330dhcx_read_reg().
| int32_t ism330dhcx_data_ready_mode_set | ( | stmdev_ctx_t * | ctx, |
| ism330dhcx_dataready_pulsed_t | val ) |
Data-ready pulsed / letched mode.
[set]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of dataready_pulsed in reg COUNTER_BDR_REG1 |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 2301 of file ism330dhcx_reg.c.
References ism330dhcx_counter_bdr_reg1_t::dataready_pulsed, ISM330DHCX_COUNTER_BDR_REG1, ism330dhcx_read_reg(), and ism330dhcx_write_reg().
Referenced by QwDevISM330DHCX::setDataReadyMode().
| int32_t ism330dhcx_device_conf_get | ( | stmdev_ctx_t * | ctx, |
| uint8_t * | val ) |
DEVICE_CONF bit configuration[get].
| ctx | Read / write interface definitions.(ptr) |
| val | Get the values of device_conf in reg CTRL9_XL |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 1896 of file ism330dhcx_reg.c.
References ism330dhcx_ctrl9_xl_t::device_conf, ISM330DHCX_CTRL9_XL, and ism330dhcx_read_reg().
| int32_t ism330dhcx_device_conf_set | ( | stmdev_ctx_t * | ctx, |
| uint8_t | val ) |
DEVICE_CONF bit configuration[set].
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of device_conf in reg CTRL9_XL |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 1871 of file ism330dhcx_reg.c.
References ism330dhcx_ctrl9_xl_t::device_conf, ISM330DHCX_CTRL9_XL, ism330dhcx_read_reg(), and ism330dhcx_write_reg().
Referenced by QwDevISM330DHCX::setDeviceConfig().
| int32_t ism330dhcx_device_id_get | ( | stmdev_ctx_t * | ctx, |
| uint8_t * | buff ) |
Device Who am I.
[get]
| ctx | Read / write interface definitions.(ptr) |
| buff | Buffer that stores data read |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 2362 of file ism330dhcx_reg.c.
References ism330dhcx_read_reg(), and ISM330DHCX_WHO_AM_I.
Referenced by QwDevISM330DHCX::getUniqueId().
| int32_t ism330dhcx_gy_self_test_get | ( | stmdev_ctx_t * | ctx, |
| ism330dhcx_st_g_t * | val ) |
Angular rate sensor self-test enable.
[get]
| ctx | Read / write interface definitions.(ptr) |
| val | Get the values of st_g in reg CTRL5_C |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 2604 of file ism330dhcx_reg.c.
References ISM330DHCX_CTRL5_C, ISM330DHCX_GY_ST_DISABLE, ISM330DHCX_GY_ST_NEGATIVE, ISM330DHCX_GY_ST_POSITIVE, ism330dhcx_read_reg(), and ism330dhcx_ctrl5_c_t::st_g.
| int32_t ism330dhcx_gy_self_test_set | ( | stmdev_ctx_t * | ctx, |
| ism330dhcx_st_g_t | val ) |
Angular rate sensor self-test enable.
[set]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of st_g in reg CTRL5_C |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 2578 of file ism330dhcx_reg.c.
References ISM330DHCX_CTRL5_C, ism330dhcx_read_reg(), ism330dhcx_write_reg(), and ism330dhcx_ctrl5_c_t::st_g.
Referenced by QwDevISM330DHCX::setGyroSelfTest().
| int32_t ism330dhcx_ln_pg_read_byte | ( | stmdev_ctx_t * | ctx, |
| uint16_t | add, | ||
| uint8_t * | val ) |
Read a line(byte) in a page.
[get]
| ctx | Read / write interface definitions.(ptr) |
| add | Page line address. |
| val | Read value.(ptr) |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 2223 of file ism330dhcx_reg.c.
References ISM330DHCX_EMBEDDED_FUNC_BANK, ism330dhcx_mem_bank_set(), ISM330DHCX_PAGE_ADDRESS, ISM330DHCX_PAGE_RW, ISM330DHCX_PAGE_SEL, ISM330DHCX_PAGE_VALUE, ism330dhcx_read_reg(), ISM330DHCX_USER_BANK, ism330dhcx_write_reg(), ism330dhcx_page_sel_t::not_used_01, ism330dhcx_page_address_t::page_addr, ism330dhcx_page_rw_t::page_rw, and ism330dhcx_page_sel_t::page_sel.
Referenced by ism330dhcx_fsm_number_of_programs_get(), ism330dhcx_fsm_start_address_get(), ism330dhcx_long_cnt_int_value_get(), ism330dhcx_mag_offset_get(), ism330dhcx_mag_sensitivity_get(), ism330dhcx_mag_soft_iron_get(), ism330dhcx_mag_x_orient_get(), ism330dhcx_mag_x_orient_set(), ism330dhcx_mag_y_orient_get(), ism330dhcx_mag_y_orient_set(), ism330dhcx_mag_z_orient_get(), ism330dhcx_mag_z_orient_set(), ism330dhcx_pedo_debounce_steps_get(), ism330dhcx_pedo_int_mode_get(), ism330dhcx_pedo_int_mode_set(), and ism330dhcx_pedo_steps_period_get().
| int32_t ism330dhcx_ln_pg_write | ( | stmdev_ctx_t * | ctx, |
| uint16_t | add, | ||
| uint8_t * | buf, | ||
| uint8_t | len ) |
Write buffer in a page.
[set]
| ctx | Read / write interface definitions.(ptr) |
| buf | Page line address.(ptr) |
| val | Value to write. |
| len | buffer length. |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 2109 of file ism330dhcx_reg.c.
References ISM330DHCX_EMBEDDED_FUNC_BANK, ism330dhcx_mem_bank_set(), ISM330DHCX_PAGE_ADDRESS, ISM330DHCX_PAGE_RW, ISM330DHCX_PAGE_SEL, ISM330DHCX_PAGE_VALUE, ism330dhcx_read_reg(), ISM330DHCX_USER_BANK, ism330dhcx_write_reg(), ism330dhcx_page_sel_t::not_used_01, ism330dhcx_page_address_t::page_addr, ism330dhcx_page_rw_t::page_rw, and ism330dhcx_page_sel_t::page_sel.
| int32_t ism330dhcx_ln_pg_write_byte | ( | stmdev_ctx_t * | ctx, |
| uint16_t | add, | ||
| uint8_t * | val ) |
Write a line(byte) in a page.
[set]
| ctx | Read / write interface definitions.(ptr) |
| add | Page line address |
| val | Value to write |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 2030 of file ism330dhcx_reg.c.
References ISM330DHCX_EMBEDDED_FUNC_BANK, ism330dhcx_mem_bank_set(), ISM330DHCX_PAGE_ADDRESS, ISM330DHCX_PAGE_RW, ISM330DHCX_PAGE_SEL, ISM330DHCX_PAGE_VALUE, ism330dhcx_read_reg(), ISM330DHCX_USER_BANK, ism330dhcx_write_reg(), ism330dhcx_page_sel_t::not_used_01, ism330dhcx_page_address_t::page_addr, ism330dhcx_page_rw_t::page_rw, and ism330dhcx_page_sel_t::page_sel.
Referenced by ism330dhcx_fsm_number_of_programs_set(), ism330dhcx_fsm_start_address_set(), ism330dhcx_long_cnt_int_value_set(), ism330dhcx_mag_offset_set(), ism330dhcx_mag_sensitivity_set(), ism330dhcx_mag_soft_iron_set(), ism330dhcx_mag_x_orient_set(), ism330dhcx_mag_y_orient_set(), ism330dhcx_mag_z_orient_set(), ism330dhcx_pedo_debounce_steps_set(), ism330dhcx_pedo_int_mode_set(), and ism330dhcx_pedo_steps_period_set().
| int32_t ism330dhcx_mem_bank_get | ( | stmdev_ctx_t * | ctx, |
| ism330dhcx_reg_access_t * | val ) |
Enable access to the embedded functions/sensor hub configuration registers.
[get]
| ctx | Read / write interface definitions.(ptr) |
| val | Get the values of reg_access in reg FUNC_CFG_ACCESS |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 1991 of file ism330dhcx_reg.c.
References ISM330DHCX_EMBEDDED_FUNC_BANK, ISM330DHCX_FUNC_CFG_ACCESS, ism330dhcx_read_reg(), ISM330DHCX_SENSOR_HUB_BANK, ISM330DHCX_USER_BANK, and ism330dhcx_func_cfg_access_t::reg_access.
| int32_t ism330dhcx_mem_bank_set | ( | stmdev_ctx_t * | ctx, |
| ism330dhcx_reg_access_t | val ) |
Enable access to the embedded functions/sensor hub configuration registers.
[set]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of reg_access in reg FUNC_CFG_ACCESS |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 1964 of file ism330dhcx_reg.c.
References ISM330DHCX_FUNC_CFG_ACCESS, ism330dhcx_read_reg(), ism330dhcx_write_reg(), and ism330dhcx_func_cfg_access_t::reg_access.
Referenced by ism330dhcx_all_sources_get(), ism330dhcx_compression_algo_init_get(), ism330dhcx_compression_algo_init_set(), ism330dhcx_compression_algo_set(), ism330dhcx_emb_fsm_en_get(), ism330dhcx_emb_fsm_en_set(), ism330dhcx_fifo_pedo_batch_get(), ism330dhcx_fifo_pedo_batch_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_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_long_cnt_set(), ism330dhcx_mlc_data_rate_get(), ism330dhcx_mlc_data_rate_set(), ism330dhcx_mlc_get(), ism330dhcx_mlc_out_get(), ism330dhcx_mlc_set(), ism330dhcx_motion_flag_data_ready_get(), ism330dhcx_motion_sens_get(), ism330dhcx_motion_sens_set(), ism330dhcx_number_of_steps_get(), 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_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_cfg_write(), 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_steps_reset(), ism330dhcx_tilt_flag_data_ready_get(), ism330dhcx_tilt_sens_get(), and ism330dhcx_tilt_sens_set().
| int32_t ism330dhcx_odr_cal_reg_get | ( | stmdev_ctx_t * | ctx, |
| uint8_t * | val ) |
Difference in percentage of the effective ODR (and timestamp rate) with respect to the typical.
[get] Step: 0.15%. 8-bit format, 2's complement.
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of freq_fine in reg INTERNAL_FREQ_FINE |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 1944 of file ism330dhcx_reg.c.
References ism330dhcx_internal_freq_fine_t::freq_fine, ISM330DHCX_INTERNAL_FREQ_FINE, and ism330dhcx_read_reg().
| int32_t ism330dhcx_odr_cal_reg_set | ( | stmdev_ctx_t * | ctx, |
| uint8_t | val ) |
Difference in percentage of the effective ODR (and timestamp rate) with respect to the typical.
[set] Step: 0.15%. 8-bit format, 2's complement.
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of freq_fine in reg INTERNAL_FREQ_FINE |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 1917 of file ism330dhcx_reg.c.
References ism330dhcx_internal_freq_fine_t::freq_fine, ISM330DHCX_INTERNAL_FREQ_FINE, ism330dhcx_read_reg(), and ism330dhcx_write_reg().
| int32_t ism330dhcx_reset_get | ( | stmdev_ctx_t * | ctx, |
| uint8_t * | val ) |
Software reset.
Restore the default values in user registers.[get]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of sw_reset in reg CTRL3_C |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 2403 of file ism330dhcx_reg.c.
References ISM330DHCX_CTRL3_C, ism330dhcx_read_reg(), and ism330dhcx_ctrl3_c_t::sw_reset.
Referenced by QwDevISM330DHCX::getDeviceReset().
| int32_t ism330dhcx_reset_set | ( | stmdev_ctx_t * | ctx, |
| uint8_t | val ) |
Software reset.
Restore the default values in user registers.[set]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of sw_reset in reg CTRL3_C |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 2378 of file ism330dhcx_reg.c.
References ISM330DHCX_CTRL3_C, ism330dhcx_read_reg(), ism330dhcx_write_reg(), and ism330dhcx_ctrl3_c_t::sw_reset.
Referenced by QwDevISM330DHCX::deviceReset().
| int32_t ism330dhcx_xl_self_test_get | ( | stmdev_ctx_t * | ctx, |
| ism330dhcx_st_xl_t * | val ) |
Linear acceleration sensor self-test enable.
[get]
| ctx | Read / write interface definitions.(ptr) |
| val | Get the values of st_xl in reg CTRL5_C |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 2540 of file ism330dhcx_reg.c.
References ISM330DHCX_CTRL5_C, ism330dhcx_read_reg(), ISM330DHCX_XL_ST_DISABLE, ISM330DHCX_XL_ST_NEGATIVE, ISM330DHCX_XL_ST_POSITIVE, and ism330dhcx_ctrl5_c_t::st_xl.
| int32_t ism330dhcx_xl_self_test_set | ( | stmdev_ctx_t * | ctx, |
| ism330dhcx_st_xl_t | val ) |
Linear acceleration sensor self-test enable.
[set]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of st_xl in reg CTRL5_C |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 2514 of file ism330dhcx_reg.c.
References ISM330DHCX_CTRL5_C, ism330dhcx_read_reg(), ism330dhcx_write_reg(), and ism330dhcx_ctrl5_c_t::st_xl.
Referenced by QwDevISM330DHCX::setAccelSelfTest().