|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
This section groups all the functions that manage the sensor hub. More...
Functions | |
| int32_t | ism330dhcx_sh_read_data_raw_get (stmdev_ctx_t *ctx, ism330dhcx_emb_sh_read_t *val, uint8_t len) |
| Sensor hub output registers. | |
| int32_t | ism330dhcx_sh_slave_connected_set (stmdev_ctx_t *ctx, ism330dhcx_aux_sens_on_t val) |
| Number of external sensors to be read by the sensor hub. | |
| int32_t | ism330dhcx_sh_slave_connected_get (stmdev_ctx_t *ctx, ism330dhcx_aux_sens_on_t *val) |
| Number of external sensors to be read by the sensor hub. | |
| int32_t | ism330dhcx_sh_master_set (stmdev_ctx_t *ctx, uint8_t val) |
| Sensor hub I2C master enable. | |
| int32_t | ism330dhcx_sh_master_get (stmdev_ctx_t *ctx, uint8_t *val) |
| Sensor hub I2C master enable. | |
| int32_t | ism330dhcx_sh_pin_mode_set (stmdev_ctx_t *ctx, ism330dhcx_shub_pu_en_t val) |
| Master I2C pull-up enable. | |
| int32_t | ism330dhcx_sh_pin_mode_get (stmdev_ctx_t *ctx, ism330dhcx_shub_pu_en_t *val) |
| Master I2C pull-up enable. | |
| int32_t | ism330dhcx_sh_pass_through_set (stmdev_ctx_t *ctx, uint8_t val) |
| I2C interface pass-through. | |
| int32_t | ism330dhcx_sh_pass_through_get (stmdev_ctx_t *ctx, uint8_t *val) |
| I2C interface pass-through. | |
| int32_t | ism330dhcx_sh_syncro_mode_set (stmdev_ctx_t *ctx, ism330dhcx_start_config_t val) |
| Sensor hub trigger signal selection. | |
| int32_t | ism330dhcx_sh_syncro_mode_get (stmdev_ctx_t *ctx, ism330dhcx_start_config_t *val) |
| Sensor hub trigger signal selection. | |
| int32_t | ism330dhcx_sh_write_mode_set (stmdev_ctx_t *ctx, ism330dhcx_write_once_t val) |
| Slave 0 write operation is performed only at the first sensor hub cycle. | |
| int32_t | ism330dhcx_sh_write_mode_get (stmdev_ctx_t *ctx, ism330dhcx_write_once_t *val) |
| Slave 0 write operation is performed only at the first sensor hub cycle. | |
| int32_t | ism330dhcx_sh_reset_set (stmdev_ctx_t *ctx) |
| Reset Master logic and output registers. | |
| int32_t | ism330dhcx_sh_reset_get (stmdev_ctx_t *ctx, uint8_t *val) |
| Reset Master logic and output registers. | |
| int32_t | ism330dhcx_sh_data_rate_set (stmdev_ctx_t *ctx, ism330dhcx_shub_odr_t val) |
| Rate at which the master communicates. | |
| int32_t | ism330dhcx_sh_data_rate_get (stmdev_ctx_t *ctx, ism330dhcx_shub_odr_t *val) |
| Rate at which the master communicates. | |
| int32_t | ism330dhcx_sh_cfg_write (stmdev_ctx_t *ctx, ism330dhcx_sh_cfg_write_t *val) |
| Configure slave 0 for perform a write. | |
| int32_t | ism330dhcx_sh_slv0_cfg_read (stmdev_ctx_t *ctx, ism330dhcx_sh_cfg_read_t *val) |
| Configure slave 0 for perform a write/read. | |
| int32_t | ism330dhcx_sh_slv1_cfg_read (stmdev_ctx_t *ctx, ism330dhcx_sh_cfg_read_t *val) |
| Configure slave 0 for perform a write/read. | |
| int32_t | ism330dhcx_sh_slv2_cfg_read (stmdev_ctx_t *ctx, ism330dhcx_sh_cfg_read_t *val) |
| Configure slave 2 for perform a write/read. | |
| int32_t | ism330dhcx_sh_slv3_cfg_read (stmdev_ctx_t *ctx, ism330dhcx_sh_cfg_read_t *val) |
| Configure slave 3 for perform a write/read. | |
| int32_t | ism330dhcx_sh_status_get (stmdev_ctx_t *ctx, ism330dhcx_status_master_t *val) |
| Sensor hub source register. | |
This section groups all the functions that manage the sensor hub.
| int32_t ism330dhcx_sh_cfg_write | ( | stmdev_ctx_t * | ctx, |
| ism330dhcx_sh_cfg_write_t * | val ) |
Configure slave 0 for perform a write.
[set]
| ctx | Read / write interface definitions.(ptr) |
| val | Structure that contain
|
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 11123 of file ism330dhcx_reg.c.
References ISM330DHCX_DATAWRITE_SLV0, ism330dhcx_mem_bank_set(), ISM330DHCX_SENSOR_HUB_BANK, ISM330DHCX_SLV0_ADD, ISM330DHCX_SLV0_SUBADD, ISM330DHCX_USER_BANK, ism330dhcx_write_reg(), ism330dhcx_slv0_add_t::rw_0, ism330dhcx_slv0_add_t::slave0, ism330dhcx_sh_cfg_write_t::slv0_add, ism330dhcx_sh_cfg_write_t::slv0_data, and ism330dhcx_sh_cfg_write_t::slv0_subadd.
Referenced by QwDevISM330DHCX::setHubSensorWrite().
| int32_t ism330dhcx_sh_data_rate_get | ( | stmdev_ctx_t * | ctx, |
| ism330dhcx_shub_odr_t * | val ) |
Rate at which the master communicates.
[get]
| ctx | Read / write interface definitions.(ptr) |
| val | Get the values of shub_odr in reg slv1_CONFIG |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 11068 of file ism330dhcx_reg.c.
References ism330dhcx_mem_bank_set(), ism330dhcx_read_reg(), ISM330DHCX_SENSOR_HUB_BANK, ISM330DHCX_SH_ODR_104Hz, ISM330DHCX_SH_ODR_13Hz, ISM330DHCX_SH_ODR_26Hz, ISM330DHCX_SH_ODR_52Hz, ISM330DHCX_SLV0_CONFIG, ISM330DHCX_USER_BANK, and ism330dhcx_slv0_config_t::shub_odr.
| int32_t ism330dhcx_sh_data_rate_set | ( | stmdev_ctx_t * | ctx, |
| ism330dhcx_shub_odr_t | val ) |
Rate at which the master communicates.
[set]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of shub_odr in reg SLV0_CONFIG |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 11032 of file ism330dhcx_reg.c.
References ism330dhcx_mem_bank_set(), ism330dhcx_read_reg(), ISM330DHCX_SENSOR_HUB_BANK, ISM330DHCX_SLV0_CONFIG, ISM330DHCX_USER_BANK, ism330dhcx_write_reg(), and ism330dhcx_slv0_config_t::shub_odr.
Referenced by QwDevISM330DHCX::setHubODR().
| int32_t ism330dhcx_sh_master_get | ( | stmdev_ctx_t * | ctx, |
| uint8_t * | val ) |
Sensor hub I2C master enable.
[get]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of master_on in reg MASTER_CONFIG |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 10626 of file ism330dhcx_reg.c.
References ISM330DHCX_MASTER_CONFIG, ism330dhcx_mem_bank_set(), ism330dhcx_read_reg(), ISM330DHCX_SENSOR_HUB_BANK, ISM330DHCX_USER_BANK, and ism330dhcx_master_config_t::master_on.
| int32_t ism330dhcx_sh_master_set | ( | stmdev_ctx_t * | ctx, |
| uint8_t | val ) |
Sensor hub I2C master enable.
[set]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of master_on in reg MASTER_CONFIG |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 10591 of file ism330dhcx_reg.c.
References ISM330DHCX_MASTER_CONFIG, ism330dhcx_mem_bank_set(), ism330dhcx_read_reg(), ISM330DHCX_SENSOR_HUB_BANK, ISM330DHCX_USER_BANK, ism330dhcx_write_reg(), and ism330dhcx_master_config_t::master_on.
Referenced by QwDevISM330DHCX::enableSensorI2C().
| int32_t ism330dhcx_sh_pass_through_get | ( | stmdev_ctx_t * | ctx, |
| uint8_t * | val ) |
I2C interface pass-through.
[get]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of pass_through_mode in reg MASTER_CONFIG |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 10770 of file ism330dhcx_reg.c.
References ISM330DHCX_MASTER_CONFIG, ism330dhcx_mem_bank_set(), ism330dhcx_read_reg(), ISM330DHCX_SENSOR_HUB_BANK, ISM330DHCX_USER_BANK, and ism330dhcx_master_config_t::pass_through_mode.
| int32_t ism330dhcx_sh_pass_through_set | ( | stmdev_ctx_t * | ctx, |
| uint8_t | val ) |
I2C interface pass-through.
[set]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of pass_through_mode in reg MASTER_CONFIG |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 10735 of file ism330dhcx_reg.c.
References ISM330DHCX_MASTER_CONFIG, ism330dhcx_mem_bank_set(), ism330dhcx_read_reg(), ISM330DHCX_SENSOR_HUB_BANK, ISM330DHCX_USER_BANK, ism330dhcx_write_reg(), and ism330dhcx_master_config_t::pass_through_mode.
Referenced by QwDevISM330DHCX::setHubPassThrough().
| int32_t ism330dhcx_sh_pin_mode_get | ( | stmdev_ctx_t * | ctx, |
| ism330dhcx_shub_pu_en_t * | val ) |
Master I2C pull-up enable.
[get]
| ctx | Read / write interface definitions.(ptr) |
| val | Get the values of shub_pu_en in reg MASTER_CONFIG |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 10691 of file ism330dhcx_reg.c.
References ISM330DHCX_EXT_PULL_UP, ISM330DHCX_INTERNAL_PULL_UP, ISM330DHCX_MASTER_CONFIG, ism330dhcx_mem_bank_set(), ism330dhcx_read_reg(), ISM330DHCX_SENSOR_HUB_BANK, ISM330DHCX_USER_BANK, and ism330dhcx_master_config_t::shub_pu_en.
| int32_t ism330dhcx_sh_pin_mode_set | ( | stmdev_ctx_t * | ctx, |
| ism330dhcx_shub_pu_en_t | val ) |
Master I2C pull-up enable.
[set]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of shub_pu_en in reg MASTER_CONFIG |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 10655 of file ism330dhcx_reg.c.
References ISM330DHCX_MASTER_CONFIG, ism330dhcx_mem_bank_set(), ism330dhcx_read_reg(), ISM330DHCX_SENSOR_HUB_BANK, ISM330DHCX_USER_BANK, ism330dhcx_write_reg(), and ism330dhcx_master_config_t::shub_pu_en.
Referenced by QwDevISM330DHCX::setHubPullUps().
| int32_t ism330dhcx_sh_read_data_raw_get | ( | stmdev_ctx_t * | ctx, |
| ism330dhcx_emb_sh_read_t * | val, | ||
| uint8_t | len ) |
Sensor hub output registers.
[get]
| ctx | Read / write interface definitions.(ptr) |
| val | Structure of registers from SENSOR_HUB_1 to SENSOR_HUB_18 |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 10476 of file ism330dhcx_reg.c.
References ism330dhcx_mem_bank_set(), ism330dhcx_read_reg(), ISM330DHCX_SENSOR_HUB_1, ISM330DHCX_SENSOR_HUB_BANK, and ISM330DHCX_USER_BANK.
Referenced by QwDevISM330DHCX::readPeripheralSensor().
| int32_t ism330dhcx_sh_reset_get | ( | stmdev_ctx_t * | ctx, |
| uint8_t * | val ) |
Reset Master logic and output registers.
[get]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of rst_master_regs in reg MASTER_CONFIG |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 11003 of file ism330dhcx_reg.c.
References ISM330DHCX_MASTER_CONFIG, ism330dhcx_mem_bank_set(), ism330dhcx_read_reg(), ISM330DHCX_SENSOR_HUB_BANK, and ISM330DHCX_USER_BANK.
| int32_t ism330dhcx_sh_reset_set | ( | stmdev_ctx_t * | ctx | ) |
Reset Master logic and output registers.
[set]
| ctx | Read / write interface definitions.(ptr) |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 10961 of file ism330dhcx_reg.c.
References ISM330DHCX_MASTER_CONFIG, ism330dhcx_mem_bank_set(), ism330dhcx_read_reg(), ISM330DHCX_SENSOR_HUB_BANK, ISM330DHCX_USER_BANK, ism330dhcx_write_reg(), PROPERTY_DISABLE, PROPERTY_ENABLE, and ism330dhcx_master_config_t::rst_master_regs.
Referenced by QwDevISM330DHCX::resetSensorHub().
| int32_t ism330dhcx_sh_slave_connected_get | ( | stmdev_ctx_t * | ctx, |
| ism330dhcx_aux_sens_on_t * | val ) |
Number of external sensors to be read by the sensor hub.
[get]
| ctx | Read / write interface definitions.(ptr) |
| val | Get the values of aux_sens_on in reg MASTER_CONFIG |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 10539 of file ism330dhcx_reg.c.
References ism330dhcx_master_config_t::aux_sens_on, ISM330DHCX_MASTER_CONFIG, ism330dhcx_mem_bank_set(), ism330dhcx_read_reg(), ISM330DHCX_SENSOR_HUB_BANK, ISM330DHCX_SLV_0, ISM330DHCX_SLV_0_1, ISM330DHCX_SLV_0_1_2, ISM330DHCX_SLV_0_1_2_3, and ISM330DHCX_USER_BANK.
| int32_t ism330dhcx_sh_slave_connected_set | ( | stmdev_ctx_t * | ctx, |
| ism330dhcx_aux_sens_on_t | val ) |
Number of external sensors to be read by the sensor hub.
[set]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of aux_sens_on in reg MASTER_CONFIG |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 10503 of file ism330dhcx_reg.c.
References ism330dhcx_master_config_t::aux_sens_on, ISM330DHCX_MASTER_CONFIG, ism330dhcx_mem_bank_set(), ism330dhcx_read_reg(), ISM330DHCX_SENSOR_HUB_BANK, ISM330DHCX_USER_BANK, and ism330dhcx_write_reg().
Referenced by QwDevISM330DHCX::setNumberHubSensors().
| int32_t ism330dhcx_sh_slv0_cfg_read | ( | stmdev_ctx_t * | ctx, |
| ism330dhcx_sh_cfg_read_t * | val ) |
Configure slave 0 for perform a write/read.
[get]
| ctx | Read / write interface definitions.(ptr) |
| val | Structure that contain
|
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 11169 of file ism330dhcx_reg.c.
References ism330dhcx_mem_bank_set(), ism330dhcx_read_reg(), ISM330DHCX_SENSOR_HUB_BANK, ISM330DHCX_SLV0_ADD, ISM330DHCX_SLV0_CONFIG, ISM330DHCX_SLV0_SUBADD, ISM330DHCX_USER_BANK, ism330dhcx_write_reg(), ism330dhcx_slv0_add_t::rw_0, ism330dhcx_slv0_add_t::slave0, ism330dhcx_slv0_config_t::slave0_numop, ism330dhcx_sh_cfg_read_t::slv_add, ism330dhcx_sh_cfg_read_t::slv_len, and ism330dhcx_sh_cfg_read_t::slv_subadd.
Referenced by QwDevISM330DHCX::setHubSensorRead().
| int32_t ism330dhcx_sh_slv1_cfg_read | ( | stmdev_ctx_t * | ctx, |
| ism330dhcx_sh_cfg_read_t * | val ) |
Configure slave 0 for perform a write/read.
[get]
| ctx | Read / write interface definitions.(ptr) |
| val | Structure that contain
|
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 11223 of file ism330dhcx_reg.c.
References ism330dhcx_mem_bank_set(), ism330dhcx_read_reg(), ISM330DHCX_SENSOR_HUB_BANK, ISM330DHCX_SLV1_ADD, ISM330DHCX_SLV1_CONFIG, ISM330DHCX_SLV1_SUBADD, ISM330DHCX_USER_BANK, ism330dhcx_write_reg(), ism330dhcx_slv1_add_t::r_1, ism330dhcx_slv1_add_t::slave1_add, ism330dhcx_slv1_config_t::slave1_numop, ism330dhcx_sh_cfg_read_t::slv_add, ism330dhcx_sh_cfg_read_t::slv_len, and ism330dhcx_sh_cfg_read_t::slv_subadd.
Referenced by QwDevISM330DHCX::setHubSensorRead().
| int32_t ism330dhcx_sh_slv2_cfg_read | ( | stmdev_ctx_t * | ctx, |
| ism330dhcx_sh_cfg_read_t * | val ) |
Configure slave 2 for perform a write/read.
[get]
| ctx | Read / write interface definitions.(ptr) |
| val | Structure that contain
|
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 11277 of file ism330dhcx_reg.c.
References ism330dhcx_mem_bank_set(), ism330dhcx_read_reg(), ISM330DHCX_SENSOR_HUB_BANK, ISM330DHCX_SLV2_ADD, ISM330DHCX_SLV2_CONFIG, ISM330DHCX_SLV2_SUBADD, ISM330DHCX_USER_BANK, ism330dhcx_write_reg(), ism330dhcx_slv2_add_t::r_2, ism330dhcx_slv2_add_t::slave2_add, ism330dhcx_slv2_config_t::slave2_numop, ism330dhcx_sh_cfg_read_t::slv_add, ism330dhcx_sh_cfg_read_t::slv_len, and ism330dhcx_sh_cfg_read_t::slv_subadd.
Referenced by QwDevISM330DHCX::setHubSensorRead().
| int32_t ism330dhcx_sh_slv3_cfg_read | ( | stmdev_ctx_t * | ctx, |
| ism330dhcx_sh_cfg_read_t * | val ) |
Configure slave 3 for perform a write/read.
[get]
| ctx | Read / write interface definitions.(ptr) |
| val | Structure that contain
|
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 11331 of file ism330dhcx_reg.c.
References ism330dhcx_mem_bank_set(), ism330dhcx_read_reg(), ISM330DHCX_SENSOR_HUB_BANK, ISM330DHCX_SLV3_ADD, ISM330DHCX_SLV3_CONFIG, ISM330DHCX_SLV3_SUBADD, ISM330DHCX_USER_BANK, ism330dhcx_write_reg(), ism330dhcx_slv3_add_t::r_3, ism330dhcx_slv3_add_t::slave3_add, ism330dhcx_slv3_config_t::slave3_numop, ism330dhcx_sh_cfg_read_t::slv_add, ism330dhcx_sh_cfg_read_t::slv_len, and ism330dhcx_sh_cfg_read_t::slv_subadd.
Referenced by QwDevISM330DHCX::setHubSensorRead().
| int32_t ism330dhcx_sh_status_get | ( | stmdev_ctx_t * | ctx, |
| ism330dhcx_status_master_t * | val ) |
Sensor hub source register.
[get]
| ctx | Read / write interface definitions.(ptr) |
| val | Registers from STATUS_MASTER |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 11382 of file ism330dhcx_reg.c.
References ism330dhcx_mem_bank_set(), ism330dhcx_read_reg(), ISM330DHCX_SENSOR_HUB_BANK, ISM330DHCX_STATUS_MASTER, and ISM330DHCX_USER_BANK.
Referenced by QwDevISM330DHCX::getExternalSensorNack(), and QwDevISM330DHCX::getHubStatus().
| int32_t ism330dhcx_sh_syncro_mode_get | ( | stmdev_ctx_t * | ctx, |
| ism330dhcx_start_config_t * | val ) |
Sensor hub trigger signal selection.
[get]
| ctx | Read / write interface definitions.(ptr) |
| val | Get the values of start_config in reg MASTER_CONFIG |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 10836 of file ism330dhcx_reg.c.
References ISM330DHCX_EXT_ON_INT2_PIN, ISM330DHCX_MASTER_CONFIG, ism330dhcx_mem_bank_set(), ism330dhcx_read_reg(), ISM330DHCX_SENSOR_HUB_BANK, ISM330DHCX_USER_BANK, ISM330DHCX_XL_GY_DRDY, and ism330dhcx_master_config_t::start_config.
| int32_t ism330dhcx_sh_syncro_mode_set | ( | stmdev_ctx_t * | ctx, |
| ism330dhcx_start_config_t | val ) |
Sensor hub trigger signal selection.
[set]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of start_config in reg MASTER_CONFIG |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 10800 of file ism330dhcx_reg.c.
References ISM330DHCX_MASTER_CONFIG, ism330dhcx_mem_bank_set(), ism330dhcx_read_reg(), ISM330DHCX_SENSOR_HUB_BANK, ISM330DHCX_USER_BANK, ism330dhcx_write_reg(), and ism330dhcx_master_config_t::start_config.
| int32_t ism330dhcx_sh_write_mode_get | ( | stmdev_ctx_t * | ctx, |
| ism330dhcx_write_once_t * | val ) |
Slave 0 write operation is performed only at the first sensor hub cycle.
[get]
| ctx | Read / write interface definitions.(ptr) |
| val | Get the values of write_once in reg MASTER_CONFIG |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 10918 of file ism330dhcx_reg.c.
References ISM330DHCX_EACH_SH_CYCLE, ISM330DHCX_MASTER_CONFIG, ism330dhcx_mem_bank_set(), ISM330DHCX_ONLY_FIRST_CYCLE, ism330dhcx_read_reg(), ISM330DHCX_SENSOR_HUB_BANK, ISM330DHCX_USER_BANK, and ism330dhcx_master_config_t::write_once.
| int32_t ism330dhcx_sh_write_mode_set | ( | stmdev_ctx_t * | ctx, |
| ism330dhcx_write_once_t | val ) |
Slave 0 write operation is performed only at the first sensor hub cycle.
[set]
| ctx | Read / write interface definitions.(ptr) |
| val | Change the values of write_once in reg MASTER_CONFIG |
| Interface | status (MANDATORY: return 0 -> no Error). |
Definition at line 10881 of file ism330dhcx_reg.c.
References ISM330DHCX_MASTER_CONFIG, ism330dhcx_mem_bank_set(), ism330dhcx_read_reg(), ISM330DHCX_SENSOR_HUB_BANK, ISM330DHCX_USER_BANK, ism330dhcx_write_reg(), and ism330dhcx_master_config_t::write_once.
Referenced by QwDevISM330DHCX::setHubWriteMode().