![]() |
Da Vinci Firmware 1
Firmware for the DaVinci-M rocket avionics board.
|
This section group all the functions concerning data generation. More...

Functions | |
| int32_t | lis2mdl_mag_user_offset_set (const stmdev_ctx_t *ctx, int16_t *val) |
| These registers comprise a 3 group of 16-bit number and represent hard-iron offset in order to compensate environmental effects. Data format is the same of output data raw: two’s complement with 1LSb = 1.5mG. These values act on the magnetic output data value in order to delete the environmental offset.[set]. | |
| int32_t | lis2mdl_mag_user_offset_get (const stmdev_ctx_t *ctx, int16_t *val) |
| These registers comprise a 3 group of 16-bit number and represent hard-iron offset in order to compensate environmental effects. Data format is the same of output data raw: two’s complement with 1LSb = 1.5mG. These values act on the magnetic output data value in order to delete the environmental offset.[get]. | |
| int32_t | lis2mdl_operating_mode_set (const stmdev_ctx_t *ctx, lis2mdl_md_t val) |
| Operating mode selection.[set]. | |
| int32_t | lis2mdl_operating_mode_get (const stmdev_ctx_t *ctx, lis2mdl_md_t *val) |
| Operating mode selection.[get]. | |
| int32_t | lis2mdl_data_rate_set (const stmdev_ctx_t *ctx, lis2mdl_odr_t val) |
| Output data rate selection.[set]. | |
| int32_t | lis2mdl_data_rate_get (const stmdev_ctx_t *ctx, lis2mdl_odr_t *val) |
| Output data rate selection.[get]. | |
| int32_t | lis2mdl_power_mode_set (const stmdev_ctx_t *ctx, lis2mdl_lp_t val) |
| Enables high-resolution/low-power mode.[set]. | |
| int32_t | lis2mdl_power_mode_get (const stmdev_ctx_t *ctx, lis2mdl_lp_t *val) |
| Enables high-resolution/low-power mode.[get]. | |
| int32_t | lis2mdl_offset_temp_comp_set (const stmdev_ctx_t *ctx, uint8_t val) |
| Enables the magnetometer temperature compensation.[set]. | |
| int32_t | lis2mdl_offset_temp_comp_get (const stmdev_ctx_t *ctx, uint8_t *val) |
| Enables the magnetometer temperature compensation.[get]. | |
| int32_t | lis2mdl_low_pass_bandwidth_set (const stmdev_ctx_t *ctx, lis2mdl_lpf_t val) |
| Low-pass bandwidth selection.[set]. | |
| int32_t | lis2mdl_low_pass_bandwidth_get (const stmdev_ctx_t *ctx, lis2mdl_lpf_t *val) |
| Low-pass bandwidth selection.[get]. | |
| int32_t | lis2mdl_set_rst_mode_set (const stmdev_ctx_t *ctx, lis2mdl_set_rst_t val) |
| Reset mode.[set]. | |
| int32_t | lis2mdl_set_rst_mode_get (const stmdev_ctx_t *ctx, lis2mdl_set_rst_t *val) |
| Reset mode.[get]. | |
| int32_t | lis2mdl_set_rst_sensor_single_set (const stmdev_ctx_t *ctx, uint8_t val) |
| Enables offset cancellation in single measurement mode. The OFF_CANC bit must be set to 1 when enabling offset cancellation in single measurement mode this means a call function: set_rst_mode(SENS_OFF_CANC_EVERY_ODR) is need.[set]. | |
| int32_t | lis2mdl_set_rst_sensor_single_get (const stmdev_ctx_t *ctx, uint8_t *val) |
| Enables offset cancellation in single measurement mode. The OFF_CANC bit must be set to 1 when enabling offset cancellation in single measurement mode this means a call function: set_rst_mode(SENS_OFF_CANC_EVERY_ODR) is need.[get]. | |
| int32_t | lis2mdl_block_data_update_set (const stmdev_ctx_t *ctx, uint8_t val) |
| Blockdataupdate.[set]. | |
| int32_t | lis2mdl_block_data_update_get (const stmdev_ctx_t *ctx, uint8_t *val) |
| Blockdataupdate.[get]. | |
| int32_t | lis2mdl_mag_data_ready_get (const stmdev_ctx_t *ctx, uint8_t *val) |
| Magnetic set of data available.[get]. | |
| int32_t | lis2mdl_mag_data_ovr_get (const stmdev_ctx_t *ctx, uint8_t *val) |
| Magnetic set of data overrun.[get]. | |
| int32_t | lis2mdl_magnetic_raw_get (const stmdev_ctx_t *ctx, int16_t *val) |
| Magnetic output value.[get]. | |
| int32_t | lis2mdl_temperature_raw_get (const stmdev_ctx_t *ctx, int16_t *val) |
| Temperature output value.[get]. | |
This section group all the functions concerning data generation.
| int32_t lis2mdl_block_data_update_get | ( | const stmdev_ctx_t * | ctx, |
| uint8_t * | val | ||
| ) |
Blockdataupdate.[get].
| ctx | read / write interface definitions.(ptr) |
| val | change the values of bdu in reg CFG_REG_C.(ptr) |
| interface | status.(MANDATORY: return 0 -> no Error) |
Definition at line 646 of file lis2mdl_reg.c.
References lis2mdl_cfg_reg_c_t::bdu, LIS2MDL_CFG_REG_C, and lis2mdl_read_reg().

| int32_t lis2mdl_block_data_update_set | ( | const stmdev_ctx_t * | ctx, |
| uint8_t | val | ||
| ) |
Blockdataupdate.[set].
| ctx | read / write interface definitions.(ptr) |
| val | change the values of bdu in reg CFG_REG_C |
| interface | status.(MANDATORY: return 0 -> no Error) |
Definition at line 622 of file lis2mdl_reg.c.
References lis2mdl_cfg_reg_c_t::bdu, LIS2MDL_CFG_REG_C, lis2mdl_read_reg(), and lis2mdl_write_reg().

| int32_t lis2mdl_data_rate_get | ( | const stmdev_ctx_t * | ctx, |
| lis2mdl_odr_t * | val | ||
| ) |
Output data rate selection.[get].
| ctx | read / write interface definitions.(ptr) |
| val | Get the values of odr in reg CFG_REG_A.(ptr) |
| interface | status.(MANDATORY: return 0 -> no Error) |
Definition at line 306 of file lis2mdl_reg.c.
References LIS2MDL_CFG_REG_A, LIS2MDL_ODR_100Hz, LIS2MDL_ODR_10Hz, LIS2MDL_ODR_20Hz, LIS2MDL_ODR_50Hz, lis2mdl_read_reg(), and lis2mdl_cfg_reg_a_t::odr.

| int32_t lis2mdl_data_rate_set | ( | const stmdev_ctx_t * | ctx, |
| lis2mdl_odr_t | val | ||
| ) |
Output data rate selection.[set].
| ctx | read / write interface definitions.(ptr) |
| val | change the values of odr in reg CFG_REG_A |
| interface | status.(MANDATORY: return 0 -> no Error) |
Definition at line 282 of file lis2mdl_reg.c.
References LIS2MDL_CFG_REG_A, lis2mdl_read_reg(), lis2mdl_write_reg(), and lis2mdl_cfg_reg_a_t::odr.

| int32_t lis2mdl_low_pass_bandwidth_get | ( | const stmdev_ctx_t * | ctx, |
| lis2mdl_lpf_t * | val | ||
| ) |
Low-pass bandwidth selection.[get].
| ctx | read / write interface definitions.(ptr) |
| val | Get the values of lpf in reg CFG_REG_B.(ptr) |
| interface | status.(MANDATORY: return 0 -> no Error) |
Definition at line 472 of file lis2mdl_reg.c.
References LIS2MDL_CFG_REG_B, LIS2MDL_ODR_DIV_2, LIS2MDL_ODR_DIV_4, lis2mdl_read_reg(), and lis2mdl_cfg_reg_b_t::lpf.

| int32_t lis2mdl_low_pass_bandwidth_set | ( | const stmdev_ctx_t * | ctx, |
| lis2mdl_lpf_t | val | ||
| ) |
Low-pass bandwidth selection.[set].
| ctx | read / write interface definitions.(ptr) |
| val | change the values of lpf in reg CFG_REG_B |
| interface | status.(MANDATORY: return 0 -> no Error) |
Definition at line 447 of file lis2mdl_reg.c.
References LIS2MDL_CFG_REG_B, lis2mdl_read_reg(), lis2mdl_write_reg(), and lis2mdl_cfg_reg_b_t::lpf.

| int32_t lis2mdl_mag_data_ovr_get | ( | const stmdev_ctx_t * | ctx, |
| uint8_t * | val | ||
| ) |
Magnetic set of data overrun.[get].
| ctx | read / write interface definitions.(ptr) |
| val | change the values of zyxor in reg STATUS_REG.(ptr) |
| interface | status.(MANDATORY: return 0 -> no Error) |
Definition at line 684 of file lis2mdl_reg.c.
References lis2mdl_read_reg(), LIS2MDL_STATUS_REG, and lis2mdl_status_reg_t::zyxor.

| int32_t lis2mdl_mag_data_ready_get | ( | const stmdev_ctx_t * | ctx, |
| uint8_t * | val | ||
| ) |
Magnetic set of data available.[get].
| ctx | read / write interface definitions.(ptr) |
| val | change the values of zyxda in reg STATUS_REG.(ptr) |
| interface | status.(MANDATORY: return 0 -> no Error) |
Definition at line 665 of file lis2mdl_reg.c.
References lis2mdl_read_reg(), LIS2MDL_STATUS_REG, and lis2mdl_status_reg_t::zyxda.

| int32_t lis2mdl_mag_user_offset_get | ( | const stmdev_ctx_t * | ctx, |
| int16_t * | val | ||
| ) |
These registers comprise a 3 group of 16-bit number and represent hard-iron offset in order to compensate environmental effects. Data format is the same of output data raw: two’s complement with 1LSb = 1.5mG. These values act on the magnetic output data value in order to delete the environmental offset.[get].
| ctx | read / write interface definitions.(ptr) |
| buff | that stores data read |
| interface | status.(MANDATORY: return 0 -> no Error) |
Definition at line 195 of file lis2mdl_reg.c.
References LIS2MDL_OFFSET_X_REG_L, and lis2mdl_read_reg().

| int32_t lis2mdl_mag_user_offset_set | ( | const stmdev_ctx_t * | ctx, |
| int16_t * | val | ||
| ) |
These registers comprise a 3 group of 16-bit number and represent hard-iron offset in order to compensate environmental effects. Data format is the same of output data raw: two’s complement with 1LSb = 1.5mG. These values act on the magnetic output data value in order to delete the environmental offset.[set].
| ctx | read / write interface definitions.(ptr) |
| buff | buffer that contains data to write |
| interface | status.(MANDATORY: return 0 -> no Error) |
Definition at line 167 of file lis2mdl_reg.c.
References LIS2MDL_OFFSET_X_REG_L, and lis2mdl_write_reg().

| int32_t lis2mdl_magnetic_raw_get | ( | const stmdev_ctx_t * | ctx, |
| int16_t * | val | ||
| ) |
Magnetic output value.[get].
| ctx | read / write interface definitions.(ptr) |
| buff | that stores data read |
| interface | status.(MANDATORY: return 0 -> no Error) |
Definition at line 703 of file lis2mdl_reg.c.
References LIS2MDL_OUTX_L_REG, and lis2mdl_read_reg().

| int32_t lis2mdl_offset_temp_comp_get | ( | const stmdev_ctx_t * | ctx, |
| uint8_t * | val | ||
| ) |
Enables the magnetometer temperature compensation.[get].
| ctx | read / write interface definitions.(ptr) |
| val | change the values of comp_temp_en in reg CFG_REG_A.(ptr) |
| interface | status.(MANDATORY: return 0 -> no Error) |
Definition at line 428 of file lis2mdl_reg.c.
References lis2mdl_cfg_reg_a_t::comp_temp_en, LIS2MDL_CFG_REG_A, and lis2mdl_read_reg().

| int32_t lis2mdl_offset_temp_comp_set | ( | const stmdev_ctx_t * | ctx, |
| uint8_t | val | ||
| ) |
Enables the magnetometer temperature compensation.[set].
| ctx | read / write interface definitions.(ptr) |
| val | change the values of comp_temp_en in reg CFG_REG_A |
| interface | status.(MANDATORY: return 0 -> no Error) |
Definition at line 404 of file lis2mdl_reg.c.
References lis2mdl_cfg_reg_a_t::comp_temp_en, LIS2MDL_CFG_REG_A, lis2mdl_read_reg(), and lis2mdl_write_reg().

| int32_t lis2mdl_operating_mode_get | ( | const stmdev_ctx_t * | ctx, |
| lis2mdl_md_t * | val | ||
| ) |
Operating mode selection.[get].
| ctx | read / write interface definitions.(ptr) |
| val | Get the values of md in reg CFG_REG_A.(ptr) |
| interface | status.(MANDATORY: return 0 -> no Error) |
Definition at line 244 of file lis2mdl_reg.c.
References LIS2MDL_CFG_REG_A, LIS2MDL_CONTINUOUS_MODE, LIS2MDL_POWER_DOWN, lis2mdl_read_reg(), LIS2MDL_SINGLE_TRIGGER, and lis2mdl_cfg_reg_a_t::md.

| int32_t lis2mdl_operating_mode_set | ( | const stmdev_ctx_t * | ctx, |
| lis2mdl_md_t | val | ||
| ) |
Operating mode selection.[set].
| ctx | read / write interface definitions.(ptr) |
| val | change the values of md in reg CFG_REG_A |
| interface | status.(MANDATORY: return 0 -> no Error) |
Definition at line 219 of file lis2mdl_reg.c.
References LIS2MDL_CFG_REG_A, lis2mdl_read_reg(), lis2mdl_write_reg(), and lis2mdl_cfg_reg_a_t::md.

| int32_t lis2mdl_power_mode_get | ( | const stmdev_ctx_t * | ctx, |
| lis2mdl_lp_t * | val | ||
| ) |
Enables high-resolution/low-power mode.[get].
| ctx | read / write interface definitions.(ptr) |
| val | Get the values of lp in reg CFG_REG_A.(ptr) |
| interface | status.(MANDATORY: return 0 -> no Error) |
Definition at line 371 of file lis2mdl_reg.c.
References LIS2MDL_CFG_REG_A, LIS2MDL_HIGH_RESOLUTION, LIS2MDL_LOW_POWER, lis2mdl_read_reg(), and lis2mdl_cfg_reg_a_t::lp.

| int32_t lis2mdl_power_mode_set | ( | const stmdev_ctx_t * | ctx, |
| lis2mdl_lp_t | val | ||
| ) |
Enables high-resolution/low-power mode.[set].
| ctx | read / write interface definitions.(ptr) |
| val | change the values of lp in reg CFG_REG_A |
| interface | status.(MANDATORY: return 0 -> no Error) |
Definition at line 347 of file lis2mdl_reg.c.
References LIS2MDL_CFG_REG_A, lis2mdl_read_reg(), lis2mdl_write_reg(), and lis2mdl_cfg_reg_a_t::lp.

| int32_t lis2mdl_set_rst_mode_get | ( | const stmdev_ctx_t * | ctx, |
| lis2mdl_set_rst_t * | val | ||
| ) |
Reset mode.[get].
| ctx | read / write interface definitions.(ptr) |
| val | Get the values of set_rst in reg CFG_REG_B.(ptr) |
| interface | status.(MANDATORY: return 0 -> no Error) |
Definition at line 531 of file lis2mdl_reg.c.
References LIS2MDL_CFG_REG_B, lis2mdl_read_reg(), LIS2MDL_SENS_OFF_CANC_EVERY_ODR, LIS2MDL_SET_SENS_ODR_DIV_63, LIS2MDL_SET_SENS_ONLY_AT_POWER_ON, and lis2mdl_cfg_reg_b_t::set_rst.

| int32_t lis2mdl_set_rst_mode_set | ( | const stmdev_ctx_t * | ctx, |
| lis2mdl_set_rst_t | val | ||
| ) |
Reset mode.[set].
| ctx | read / write interface definitions.(ptr) |
| val | change the values of set_rst in reg CFG_REG_B |
| interface | status.(MANDATORY: return 0 -> no Error) |
Definition at line 506 of file lis2mdl_reg.c.
References LIS2MDL_CFG_REG_B, lis2mdl_read_reg(), lis2mdl_write_reg(), and lis2mdl_cfg_reg_b_t::set_rst.

| int32_t lis2mdl_set_rst_sensor_single_get | ( | const stmdev_ctx_t * | ctx, |
| uint8_t * | val | ||
| ) |
Enables offset cancellation in single measurement mode. The OFF_CANC bit must be set to 1 when enabling offset cancellation in single measurement mode this means a call function: set_rst_mode(SENS_OFF_CANC_EVERY_ODR) is need.[get].
| ctx | read / write interface definitions.(ptr) |
| val | change the values of off_canc_one_shot in reg CFG_REG_B.(ptr) |
| interface | status.(MANDATORY: return 0 -> no Error) |
Definition at line 602 of file lis2mdl_reg.c.
References LIS2MDL_CFG_REG_B, lis2mdl_read_reg(), and lis2mdl_cfg_reg_b_t::off_canc_one_shot.

| int32_t lis2mdl_set_rst_sensor_single_set | ( | const stmdev_ctx_t * | ctx, |
| uint8_t | val | ||
| ) |
Enables offset cancellation in single measurement mode. The OFF_CANC bit must be set to 1 when enabling offset cancellation in single measurement mode this means a call function: set_rst_mode(SENS_OFF_CANC_EVERY_ODR) is need.[set].
| ctx | read / write interface definitions.(ptr) |
| val | change the values of off_canc_one_shot in reg CFG_REG_B |
| interface | status.(MANDATORY: return 0 -> no Error) |
Definition at line 573 of file lis2mdl_reg.c.
References LIS2MDL_CFG_REG_B, lis2mdl_read_reg(), lis2mdl_write_reg(), and lis2mdl_cfg_reg_b_t::off_canc_one_shot.

| int32_t lis2mdl_temperature_raw_get | ( | const stmdev_ctx_t * | ctx, |
| int16_t * | val | ||
| ) |
Temperature output value.[get].
| ctx | read / write interface definitions.(ptr) |
| buff | that stores data read |
| interface | status.(MANDATORY: return 0 -> no Error) |
Definition at line 727 of file lis2mdl_reg.c.
References lis2mdl_read_reg(), and LIS2MDL_TEMP_OUT_L_REG.
