Pablo Henrique
/
STM32F103C8T6_VL53l0x_CAN
code for read VL53l0x sensor with CAN
VL53L0X_simple/VL53L0X_3rd.h@1:7bbfe329c62b, 2019-03-18 (annotated)
- Committer:
- pablo_bmxrp
- Date:
- Mon Mar 18 22:45:39 2019 +0000
- Revision:
- 1:7bbfe329c62b
- Parent:
- STM32F103C8T6_MPA/VL53L0X_simple/VL53L0X_3rd.h@0:44429c0a71d4
V1.0
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
pablo_bmxrp | 0:44429c0a71d4 | 1 | |
pablo_bmxrp | 0:44429c0a71d4 | 2 | /* api.h functions */ |
pablo_bmxrp | 0:44429c0a71d4 | 3 | |
pablo_bmxrp | 0:44429c0a71d4 | 4 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 5 | * @brief Wait for device booted after chip enable (hardware standby) |
pablo_bmxrp | 0:44429c0a71d4 | 6 | * This function can be run only when VL53L0X_State is VL53L0X_STATE_POWERDOWN. |
pablo_bmxrp | 0:44429c0a71d4 | 7 | * |
pablo_bmxrp | 0:44429c0a71d4 | 8 | * @note This function is not Implemented |
pablo_bmxrp | 0:44429c0a71d4 | 9 | * |
pablo_bmxrp | 0:44429c0a71d4 | 10 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 11 | * @return VL53L0X_ERROR_NOT_IMPLEMENTED Not implemented |
pablo_bmxrp | 0:44429c0a71d4 | 12 | * |
pablo_bmxrp | 0:44429c0a71d4 | 13 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 14 | VL53L0X_Error VL53L0X_wait_device_booted(VL53L0X_DEV dev); |
pablo_bmxrp | 0:44429c0a71d4 | 15 | |
pablo_bmxrp | 0:44429c0a71d4 | 16 | |
pablo_bmxrp | 0:44429c0a71d4 | 17 | VL53L0X_Error sequence_step_enabled(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 18 | VL53L0X_SequenceStepId sequence_step_id, uint8_t sequence_config, |
pablo_bmxrp | 0:44429c0a71d4 | 19 | uint8_t *p_sequence_step_enabled); |
pablo_bmxrp | 0:44429c0a71d4 | 20 | |
pablo_bmxrp | 0:44429c0a71d4 | 21 | VL53L0X_Error VL53L0X_check_and_load_interrupt_settings(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 22 | uint8_t start_not_stopflag); |
pablo_bmxrp | 0:44429c0a71d4 | 23 | |
pablo_bmxrp | 0:44429c0a71d4 | 24 | |
pablo_bmxrp | 0:44429c0a71d4 | 25 | /* api_core.h functions */ |
pablo_bmxrp | 0:44429c0a71d4 | 26 | |
pablo_bmxrp | 0:44429c0a71d4 | 27 | VL53L0X_Error VL53L0X_get_info_from_device(VL53L0X_DEV dev, uint8_t option); |
pablo_bmxrp | 0:44429c0a71d4 | 28 | |
pablo_bmxrp | 0:44429c0a71d4 | 29 | VL53L0X_Error VL53L0X_device_read_strobe(VL53L0X_DEV dev); |
pablo_bmxrp | 0:44429c0a71d4 | 30 | |
pablo_bmxrp | 0:44429c0a71d4 | 31 | VL53L0X_Error wrapped_VL53L0X_get_measurement_timing_budget_micro_seconds(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 32 | uint32_t *p_measurement_timing_budget_micro_seconds); |
pablo_bmxrp | 0:44429c0a71d4 | 33 | |
pablo_bmxrp | 0:44429c0a71d4 | 34 | VL53L0X_Error wrapped_VL53L0X_get_vcsel_pulse_period(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 35 | VL53L0X_VcselPeriod vcsel_period_type, uint8_t *p_vcsel_pulse_period_pclk); |
pablo_bmxrp | 0:44429c0a71d4 | 36 | |
pablo_bmxrp | 0:44429c0a71d4 | 37 | uint8_t VL53L0X_decode_vcsel_period(uint8_t vcsel_period_reg); |
pablo_bmxrp | 0:44429c0a71d4 | 38 | |
pablo_bmxrp | 0:44429c0a71d4 | 39 | uint32_t VL53L0X_decode_timeout(uint16_t encoded_timeout); |
pablo_bmxrp | 0:44429c0a71d4 | 40 | |
pablo_bmxrp | 0:44429c0a71d4 | 41 | uint32_t VL53L0X_calc_timeout_us(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 42 | uint16_t timeout_period_mclks, |
pablo_bmxrp | 0:44429c0a71d4 | 43 | uint8_t vcsel_period_pclks); |
pablo_bmxrp | 0:44429c0a71d4 | 44 | |
pablo_bmxrp | 0:44429c0a71d4 | 45 | uint32_t VL53L0X_calc_macro_period_ps(VL53L0X_DEV dev, uint8_t vcsel_period_pclks); |
pablo_bmxrp | 0:44429c0a71d4 | 46 | |
pablo_bmxrp | 0:44429c0a71d4 | 47 | VL53L0X_Error VL53L0X_measurement_poll_for_completion(VL53L0X_DEV dev); |
pablo_bmxrp | 0:44429c0a71d4 | 48 | |
pablo_bmxrp | 0:44429c0a71d4 | 49 | VL53L0X_Error VL53L0X_load_tuning_settings(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 50 | uint8_t *p_tuning_setting_buffer); |
pablo_bmxrp | 0:44429c0a71d4 | 51 | |
pablo_bmxrp | 0:44429c0a71d4 | 52 | VL53L0X_Error VL53L0X_get_pal_range_status(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 53 | uint8_t device_range_status, |
pablo_bmxrp | 0:44429c0a71d4 | 54 | FixPoint1616_t signal_rate, |
pablo_bmxrp | 0:44429c0a71d4 | 55 | uint16_t effective_spad_rtn_count, |
pablo_bmxrp | 0:44429c0a71d4 | 56 | VL53L0X_RangingMeasurementData_t *p_ranging_measurement_data, |
pablo_bmxrp | 0:44429c0a71d4 | 57 | uint8_t *p_pal_range_status); |
pablo_bmxrp | 0:44429c0a71d4 | 58 | VL53L0X_Error VL53L0X_calc_sigma_estimate(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 59 | VL53L0X_RangingMeasurementData_t *p_ranging_measurement_data, |
pablo_bmxrp | 0:44429c0a71d4 | 60 | FixPoint1616_t *p_sigma_estimate, |
pablo_bmxrp | 0:44429c0a71d4 | 61 | uint32_t *p_dmax_mm); |
pablo_bmxrp | 0:44429c0a71d4 | 62 | uint32_t VL53L0X_calc_timeout_mclks(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 63 | uint32_t timeout_period_us, |
pablo_bmxrp | 0:44429c0a71d4 | 64 | uint8_t vcsel_period_pclks); |
pablo_bmxrp | 0:44429c0a71d4 | 65 | uint32_t VL53L0X_isqrt(uint32_t num); |
pablo_bmxrp | 0:44429c0a71d4 | 66 | |
pablo_bmxrp | 0:44429c0a71d4 | 67 | uint32_t VL53L0X_quadrature_sum(uint32_t a, uint32_t b); |
pablo_bmxrp | 0:44429c0a71d4 | 68 | |
pablo_bmxrp | 0:44429c0a71d4 | 69 | VL53L0X_Error VL53L0X_calc_dmax( |
pablo_bmxrp | 0:44429c0a71d4 | 70 | VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 71 | FixPoint1616_t total_signal_rate_mcps, |
pablo_bmxrp | 0:44429c0a71d4 | 72 | FixPoint1616_t total_corr_signal_rate_mcps, |
pablo_bmxrp | 0:44429c0a71d4 | 73 | FixPoint1616_t pw_mult, |
pablo_bmxrp | 0:44429c0a71d4 | 74 | uint32_t sigma_estimate_p1, |
pablo_bmxrp | 0:44429c0a71d4 | 75 | FixPoint1616_t sigma_estimate_p2, |
pablo_bmxrp | 0:44429c0a71d4 | 76 | uint32_t peak_vcsel_duration_us, |
pablo_bmxrp | 0:44429c0a71d4 | 77 | uint32_t *pd_max_mm); |
pablo_bmxrp | 0:44429c0a71d4 | 78 | VL53L0X_Error wrapped_VL53L0X_set_measurement_timing_budget_micro_seconds(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 79 | uint32_t measurement_timing_budget_micro_seconds); |
pablo_bmxrp | 0:44429c0a71d4 | 80 | VL53L0X_Error get_sequence_step_timeout(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 81 | VL53L0X_SequenceStepId sequence_step_id, |
pablo_bmxrp | 0:44429c0a71d4 | 82 | uint32_t *p_time_out_micro_secs); |
pablo_bmxrp | 0:44429c0a71d4 | 83 | VL53L0X_Error set_sequence_step_timeout(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 84 | VL53L0X_SequenceStepId sequence_step_id, |
pablo_bmxrp | 0:44429c0a71d4 | 85 | uint32_t timeout_micro_secs); |
pablo_bmxrp | 0:44429c0a71d4 | 86 | uint16_t VL53L0X_encode_timeout(uint32_t timeout_macro_clks); |
pablo_bmxrp | 0:44429c0a71d4 | 87 | VL53L0X_Error wrapped_VL53L0X_set_vcsel_pulse_period(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 88 | VL53L0X_VcselPeriod vcsel_period_type, uint8_t vcsel_pulse_period_pclk); |
pablo_bmxrp | 0:44429c0a71d4 | 89 | uint8_t lv53l0x_encode_vcsel_period(uint8_t vcsel_period_pclks); |
pablo_bmxrp | 0:44429c0a71d4 | 90 | |
pablo_bmxrp | 0:44429c0a71d4 | 91 | /* api_calibration.h functions */ |
pablo_bmxrp | 0:44429c0a71d4 | 92 | VL53L0X_Error VL53L0X_apply_offset_adjustment(VL53L0X_DEV dev); |
pablo_bmxrp | 0:44429c0a71d4 | 93 | VL53L0X_Error wrapped_VL53L0X_get_offset_calibration_data_micro_meter(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 94 | int32_t *p_offset_calibration_data_micro_meter); |
pablo_bmxrp | 0:44429c0a71d4 | 95 | VL53L0X_Error wrapped_VL53L0X_set_offset_calibration_data_micro_meter(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 96 | int32_t offset_calibration_data_micro_meter); |
pablo_bmxrp | 0:44429c0a71d4 | 97 | VL53L0X_Error wrapped_VL53L0X_perform_ref_spad_management(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 98 | uint32_t *ref_spad_count, |
pablo_bmxrp | 0:44429c0a71d4 | 99 | uint8_t *is_aperture_spads); |
pablo_bmxrp | 0:44429c0a71d4 | 100 | VL53L0X_Error VL53L0X_perform_ref_calibration(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 101 | uint8_t *p_vhv_settings, uint8_t *p_phase_cal, uint8_t get_data_enable); |
pablo_bmxrp | 0:44429c0a71d4 | 102 | VL53L0X_Error VL53L0X_perform_vhv_calibration(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 103 | uint8_t *p_vhv_settings, const uint8_t get_data_enable, |
pablo_bmxrp | 0:44429c0a71d4 | 104 | const uint8_t restore_config); |
pablo_bmxrp | 0:44429c0a71d4 | 105 | VL53L0X_Error VL53L0X_perform_single_ref_calibration(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 106 | uint8_t vhv_init_byte); |
pablo_bmxrp | 0:44429c0a71d4 | 107 | VL53L0X_Error VL53L0X_ref_calibration_io(VL53L0X_DEV dev, uint8_t read_not_write, |
pablo_bmxrp | 0:44429c0a71d4 | 108 | uint8_t vhv_settings, uint8_t phase_cal, |
pablo_bmxrp | 0:44429c0a71d4 | 109 | uint8_t *p_vhv_settings, uint8_t *p_phase_cal, |
pablo_bmxrp | 0:44429c0a71d4 | 110 | const uint8_t vhv_enable, const uint8_t phase_enable); |
pablo_bmxrp | 0:44429c0a71d4 | 111 | VL53L0X_Error VL53L0X_perform_phase_calibration(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 112 | uint8_t *p_phase_cal, const uint8_t get_data_enable, |
pablo_bmxrp | 0:44429c0a71d4 | 113 | const uint8_t restore_config); |
pablo_bmxrp | 0:44429c0a71d4 | 114 | VL53L0X_Error enable_ref_spads(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 115 | uint8_t aperture_spads, |
pablo_bmxrp | 0:44429c0a71d4 | 116 | uint8_t good_spad_array[], |
pablo_bmxrp | 0:44429c0a71d4 | 117 | uint8_t spad_array[], |
pablo_bmxrp | 0:44429c0a71d4 | 118 | uint32_t size, |
pablo_bmxrp | 0:44429c0a71d4 | 119 | uint32_t start, |
pablo_bmxrp | 0:44429c0a71d4 | 120 | uint32_t offset, |
pablo_bmxrp | 0:44429c0a71d4 | 121 | uint32_t spad_count, |
pablo_bmxrp | 0:44429c0a71d4 | 122 | uint32_t *p_last_spad); |
pablo_bmxrp | 0:44429c0a71d4 | 123 | void get_next_good_spad(uint8_t good_spad_array[], uint32_t size, |
pablo_bmxrp | 0:44429c0a71d4 | 124 | uint32_t curr, int32_t *p_next); |
pablo_bmxrp | 0:44429c0a71d4 | 125 | uint8_t is_aperture(uint32_t spad_index); |
pablo_bmxrp | 0:44429c0a71d4 | 126 | VL53L0X_Error enable_spad_bit(uint8_t spad_array[], uint32_t size, |
pablo_bmxrp | 0:44429c0a71d4 | 127 | uint32_t spad_index); |
pablo_bmxrp | 0:44429c0a71d4 | 128 | VL53L0X_Error set_ref_spad_map(VL53L0X_DEV dev, uint8_t *p_ref_spad_array); |
pablo_bmxrp | 0:44429c0a71d4 | 129 | VL53L0X_Error get_ref_spad_map(VL53L0X_DEV dev, uint8_t *p_ref_spad_array); |
pablo_bmxrp | 0:44429c0a71d4 | 130 | VL53L0X_Error perform_ref_signal_measurement(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 131 | uint16_t *p_ref_signal_rate); |
pablo_bmxrp | 0:44429c0a71d4 | 132 | VL53L0X_Error wrapped_VL53L0X_set_reference_spads(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 133 | uint32_t count, uint8_t is_aperture_spads); |
pablo_bmxrp | 0:44429c0a71d4 | 134 | |
pablo_bmxrp | 0:44429c0a71d4 | 135 | /* api_strings.h functions */ |
pablo_bmxrp | 0:44429c0a71d4 | 136 | VL53L0X_Error wrapped_VL53L0X_get_device_info(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 137 | VL53L0X_DeviceInfo_t *p_VL53L0X_device_info); |
pablo_bmxrp | 0:44429c0a71d4 | 138 | VL53L0X_Error VL53L0X_check_part_used(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 139 | uint8_t *revision, |
pablo_bmxrp | 0:44429c0a71d4 | 140 | VL53L0X_DeviceInfo_t *p_VL53L0X_device_info); |
pablo_bmxrp | 0:44429c0a71d4 | 141 | |
pablo_bmxrp | 0:44429c0a71d4 | 142 | /* Read function of the ID device */ |
pablo_bmxrp | 0:44429c0a71d4 | 143 | // virtual int read_id(); |
pablo_bmxrp | 0:44429c0a71d4 | 144 | virtual int read_id(uint8_t *id); |
pablo_bmxrp | 0:44429c0a71d4 | 145 | |
pablo_bmxrp | 0:44429c0a71d4 | 146 | VL53L0X_Error wait_measurement_data_ready(VL53L0X_DEV dev); |
pablo_bmxrp | 0:44429c0a71d4 | 147 | |
pablo_bmxrp | 0:44429c0a71d4 | 148 | VL53L0X_Error wait_stop_completed(VL53L0X_DEV dev); |
pablo_bmxrp | 0:44429c0a71d4 | 149 | |
pablo_bmxrp | 0:44429c0a71d4 | 150 | /* Write and read functions from I2C */ |
pablo_bmxrp | 0:44429c0a71d4 | 151 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 152 | * Write single byte register |
pablo_bmxrp | 0:44429c0a71d4 | 153 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 154 | * @param index The register index |
pablo_bmxrp | 0:44429c0a71d4 | 155 | * @param data 8 bit register data |
pablo_bmxrp | 0:44429c0a71d4 | 156 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 157 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 158 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 159 | VL53L0X_Error VL53L0X_write_byte(VL53L0X_DEV dev, uint8_t index, uint8_t data); |
pablo_bmxrp | 0:44429c0a71d4 | 160 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 161 | * Write word register |
pablo_bmxrp | 0:44429c0a71d4 | 162 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 163 | * @param index The register index |
pablo_bmxrp | 0:44429c0a71d4 | 164 | * @param data 16 bit register data |
pablo_bmxrp | 0:44429c0a71d4 | 165 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 166 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 167 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 168 | VL53L0X_Error VL53L0X_write_word(VL53L0X_DEV dev, uint8_t index, uint16_t data); |
pablo_bmxrp | 0:44429c0a71d4 | 169 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 170 | * Write double word (4 byte) register |
pablo_bmxrp | 0:44429c0a71d4 | 171 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 172 | * @param index The register index |
pablo_bmxrp | 0:44429c0a71d4 | 173 | * @param data 32 bit register data |
pablo_bmxrp | 0:44429c0a71d4 | 174 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 175 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 176 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 177 | VL53L0X_Error VL53L0X_write_dword(VL53L0X_DEV dev, uint8_t index, uint32_t data); |
pablo_bmxrp | 0:44429c0a71d4 | 178 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 179 | * Read single byte register |
pablo_bmxrp | 0:44429c0a71d4 | 180 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 181 | * @param index The register index |
pablo_bmxrp | 0:44429c0a71d4 | 182 | * @param data pointer to 8 bit data |
pablo_bmxrp | 0:44429c0a71d4 | 183 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 184 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 185 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 186 | VL53L0X_Error VL53L0X_read_byte(VL53L0X_DEV dev, uint8_t index, uint8_t *p_data); |
pablo_bmxrp | 0:44429c0a71d4 | 187 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 188 | * Read word (2byte) register |
pablo_bmxrp | 0:44429c0a71d4 | 189 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 190 | * @param index The register index |
pablo_bmxrp | 0:44429c0a71d4 | 191 | * @param data pointer to 16 bit data |
pablo_bmxrp | 0:44429c0a71d4 | 192 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 193 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 194 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 195 | VL53L0X_Error VL53L0X_read_word(VL53L0X_DEV dev, uint8_t index, uint16_t *p_data); |
pablo_bmxrp | 0:44429c0a71d4 | 196 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 197 | * Read dword (4byte) register |
pablo_bmxrp | 0:44429c0a71d4 | 198 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 199 | * @param index The register index |
pablo_bmxrp | 0:44429c0a71d4 | 200 | * @param data pointer to 32 bit data |
pablo_bmxrp | 0:44429c0a71d4 | 201 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 202 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 203 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 204 | VL53L0X_Error VL53L0X_read_dword(VL53L0X_DEV dev, uint8_t index, uint32_t *p_data); |
pablo_bmxrp | 0:44429c0a71d4 | 205 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 206 | * Threat safe Update (read/modify/write) single byte register |
pablo_bmxrp | 0:44429c0a71d4 | 207 | * |
pablo_bmxrp | 0:44429c0a71d4 | 208 | * Final_reg = (Initial_reg & and_data) |or_data |
pablo_bmxrp | 0:44429c0a71d4 | 209 | * |
pablo_bmxrp | 0:44429c0a71d4 | 210 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 211 | * @param index The register index |
pablo_bmxrp | 0:44429c0a71d4 | 212 | * @param and_data 8 bit and data |
pablo_bmxrp | 0:44429c0a71d4 | 213 | * @param or_data 8 bit or data |
pablo_bmxrp | 0:44429c0a71d4 | 214 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 215 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 216 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 217 | VL53L0X_Error VL53L0X_update_byte(VL53L0X_DEV dev, uint8_t index, uint8_t and_data, uint8_t or_data); |
pablo_bmxrp | 0:44429c0a71d4 | 218 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 219 | * Writes the supplied byte buffer to the device |
pablo_bmxrp | 0:44429c0a71d4 | 220 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 221 | * @param index The register index |
pablo_bmxrp | 0:44429c0a71d4 | 222 | * @param p_data Pointer to uint8_t buffer containing the data to be written |
pablo_bmxrp | 0:44429c0a71d4 | 223 | * @param count Number of bytes in the supplied byte buffer |
pablo_bmxrp | 0:44429c0a71d4 | 224 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 225 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 226 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 227 | VL53L0X_Error VL53L0X_write_multi(VL53L0X_DEV dev, uint8_t index, uint8_t *p_data, uint32_t count); |
pablo_bmxrp | 0:44429c0a71d4 | 228 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 229 | * Reads the requested number of bytes from the device |
pablo_bmxrp | 0:44429c0a71d4 | 230 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 231 | * @param index The register index |
pablo_bmxrp | 0:44429c0a71d4 | 232 | * @param p_data Pointer to the uint8_t buffer to store read data |
pablo_bmxrp | 0:44429c0a71d4 | 233 | * @param count Number of uint8_t's to read |
pablo_bmxrp | 0:44429c0a71d4 | 234 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 235 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 236 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 237 | VL53L0X_Error VL53L0X_read_multi(VL53L0X_DEV dev, uint8_t index, uint8_t *p_data, uint32_t count); |
pablo_bmxrp | 0:44429c0a71d4 | 238 | |
pablo_bmxrp | 0:44429c0a71d4 | 239 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 240 | * @brief Writes a buffer towards the I2C peripheral device. |
pablo_bmxrp | 0:44429c0a71d4 | 241 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 242 | * @param p_data pointer to the byte-array data to send |
pablo_bmxrp | 0:44429c0a71d4 | 243 | * @param number_of_bytes number of bytes to be written. |
pablo_bmxrp | 0:44429c0a71d4 | 244 | * @retval 0 if ok, |
pablo_bmxrp | 0:44429c0a71d4 | 245 | * @retval -1 if an I2C error has occured |
pablo_bmxrp | 0:44429c0a71d4 | 246 | * @note On some devices if NumByteToWrite is greater |
pablo_bmxrp | 0:44429c0a71d4 | 247 | * than one, the RegisterAddr must be masked correctly! |
pablo_bmxrp | 0:44429c0a71d4 | 248 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 249 | VL53L0X_Error VL53L0X_i2c_write(uint8_t dev, uint8_t index, uint8_t *p_data, uint16_t number_of_bytes); |
pablo_bmxrp | 0:44429c0a71d4 | 250 | |
pablo_bmxrp | 0:44429c0a71d4 | 251 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 252 | * @brief Reads a buffer from the I2C peripheral device. |
pablo_bmxrp | 0:44429c0a71d4 | 253 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 254 | * @param p_data pointer to the byte-array to read data in to |
pablo_bmxrp | 0:44429c0a71d4 | 255 | * @param number_of_bytes number of bytes to be read. |
pablo_bmxrp | 0:44429c0a71d4 | 256 | * @retval 0 if ok, |
pablo_bmxrp | 0:44429c0a71d4 | 257 | * @retval -1 if an I2C error has occured |
pablo_bmxrp | 0:44429c0a71d4 | 258 | * @note On some devices if NumByteToWrite is greater |
pablo_bmxrp | 0:44429c0a71d4 | 259 | * than one, the RegisterAddr must be masked correctly! |
pablo_bmxrp | 0:44429c0a71d4 | 260 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 261 | VL53L0X_Error VL53L0X_i2c_read(uint8_t dev, uint8_t index, uint8_t *p_data, uint16_t number_of_bytes); |
pablo_bmxrp | 0:44429c0a71d4 | 262 | |
pablo_bmxrp | 0:44429c0a71d4 | 263 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 264 | * @brief execute delay in all polling API call |
pablo_bmxrp | 0:44429c0a71d4 | 265 | * |
pablo_bmxrp | 0:44429c0a71d4 | 266 | * A typical multi-thread or RTOs implementation is to sleep the task for some 5ms (with 100Hz max rate faster polling is not needed) |
pablo_bmxrp | 0:44429c0a71d4 | 267 | * if nothing specific is need you can define it as an empty/void macro |
pablo_bmxrp | 0:44429c0a71d4 | 268 | * @code |
pablo_bmxrp | 0:44429c0a71d4 | 269 | * #define VL53L0X_PollingDelay(...) (void)0 |
pablo_bmxrp | 0:44429c0a71d4 | 270 | * @endcode |
pablo_bmxrp | 0:44429c0a71d4 | 271 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 272 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 273 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 274 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 275 | VL53L0X_Error VL53L0X_polling_delay(VL53L0X_DEV dev); /* usually best implemented as a real function */ |
pablo_bmxrp | 0:44429c0a71d4 | 276 | |
pablo_bmxrp | 0:44429c0a71d4 | 277 | int is_present() |
pablo_bmxrp | 0:44429c0a71d4 | 278 | { |
pablo_bmxrp | 0:44429c0a71d4 | 279 | int status; |
pablo_bmxrp | 0:44429c0a71d4 | 280 | uint8_t id = 0; |
pablo_bmxrp | 0:44429c0a71d4 | 281 | |
pablo_bmxrp | 0:44429c0a71d4 | 282 | status = read_id(&id); |
pablo_bmxrp | 0:44429c0a71d4 | 283 | if (status) { |
pablo_bmxrp | 0:44429c0a71d4 | 284 | VL53L0X_ErrLog("Failed to read ID device. Device not present!\n\r"); |
pablo_bmxrp | 0:44429c0a71d4 | 285 | } |
pablo_bmxrp | 0:44429c0a71d4 | 286 | return status; |
pablo_bmxrp | 0:44429c0a71d4 | 287 | } |
pablo_bmxrp | 0:44429c0a71d4 | 288 | |
pablo_bmxrp | 0:44429c0a71d4 | 289 | /////////////////////////////////////////////////////////////////////////////////////////////////////// |
pablo_bmxrp | 0:44429c0a71d4 | 290 | //Added functions // |
pablo_bmxrp | 0:44429c0a71d4 | 291 | /////////////////////////////////////////////////////////////////////////////////////////////////////// |
pablo_bmxrp | 0:44429c0a71d4 | 292 | |
pablo_bmxrp | 0:44429c0a71d4 | 293 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 294 | * @brief Cycle Power to Device |
pablo_bmxrp | 0:44429c0a71d4 | 295 | * |
pablo_bmxrp | 0:44429c0a71d4 | 296 | * @return status - status 0 = ok, 1 = error |
pablo_bmxrp | 0:44429c0a71d4 | 297 | * |
pablo_bmxrp | 0:44429c0a71d4 | 298 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 299 | int32_t VL53L0X_cycle_power(void); |
pablo_bmxrp | 0:44429c0a71d4 | 300 | |
pablo_bmxrp | 0:44429c0a71d4 | 301 | uint8_t VL53L0X_encode_vcsel_period(uint8_t vcsel_period_pclks); |
pablo_bmxrp | 0:44429c0a71d4 | 302 | |
pablo_bmxrp | 0:44429c0a71d4 | 303 | VL53L0X_Error wrapped_VL53L0X_get_device_error_string(VL53L0X_DeviceError error_code, |
pablo_bmxrp | 0:44429c0a71d4 | 304 | char *p_device_error_string); |
pablo_bmxrp | 0:44429c0a71d4 | 305 | |
pablo_bmxrp | 0:44429c0a71d4 | 306 | VL53L0X_Error wrapped_VL53L0X_get_limit_check_info(VL53L0X_DEV dev, uint16_t limit_check_id, |
pablo_bmxrp | 0:44429c0a71d4 | 307 | char *p_limit_check_string); |
pablo_bmxrp | 0:44429c0a71d4 | 308 | |
pablo_bmxrp | 0:44429c0a71d4 | 309 | VL53L0X_Error wrapped_VL53L0X_get_pal_error_string(VL53L0X_Error pal_error_code, |
pablo_bmxrp | 0:44429c0a71d4 | 310 | char *p_pal_error_string); |
pablo_bmxrp | 0:44429c0a71d4 | 311 | |
pablo_bmxrp | 0:44429c0a71d4 | 312 | VL53L0X_Error wrapped_VL53L0X_get_pal_state_string(VL53L0X_State pal_state_code, |
pablo_bmxrp | 0:44429c0a71d4 | 313 | char *p_pal_state_string); |
pablo_bmxrp | 0:44429c0a71d4 | 314 | |
pablo_bmxrp | 0:44429c0a71d4 | 315 | VL53L0X_Error wrapped_VL53L0X_get_range_status_string(uint8_t range_status, |
pablo_bmxrp | 0:44429c0a71d4 | 316 | char *p_range_status_string); |
pablo_bmxrp | 0:44429c0a71d4 | 317 | |
pablo_bmxrp | 0:44429c0a71d4 | 318 | VL53L0X_Error wrapped_VL53L0X_get_ref_calibration(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 319 | uint8_t *p_vhv_settings, uint8_t *p_phase_cal); |
pablo_bmxrp | 0:44429c0a71d4 | 320 | |
pablo_bmxrp | 0:44429c0a71d4 | 321 | |
pablo_bmxrp | 0:44429c0a71d4 | 322 | VL53L0X_Error count_enabled_spads(uint8_t spad_array[], |
pablo_bmxrp | 0:44429c0a71d4 | 323 | uint32_t byte_count, uint32_t max_spads, |
pablo_bmxrp | 0:44429c0a71d4 | 324 | uint32_t *p_total_spads_enabled, uint8_t *p_is_aperture); |
pablo_bmxrp | 0:44429c0a71d4 | 325 | |
pablo_bmxrp | 0:44429c0a71d4 | 326 | VL53L0X_Error wrapped_VL53L0X_get_sequence_steps_info(VL53L0X_SequenceStepId sequence_step_id, |
pablo_bmxrp | 0:44429c0a71d4 | 327 | char *p_sequence_steps_string); |
pablo_bmxrp | 0:44429c0a71d4 | 328 | |
pablo_bmxrp | 0:44429c0a71d4 | 329 | |
pablo_bmxrp | 0:44429c0a71d4 | 330 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 331 | * @brief Gets the name of a given sequence step. |
pablo_bmxrp | 0:44429c0a71d4 | 332 | * |
pablo_bmxrp | 0:44429c0a71d4 | 333 | * @par Function Description |
pablo_bmxrp | 0:44429c0a71d4 | 334 | * This function retrieves the name of sequence steps corresponding to |
pablo_bmxrp | 0:44429c0a71d4 | 335 | * SequenceStepId. |
pablo_bmxrp | 0:44429c0a71d4 | 336 | * |
pablo_bmxrp | 0:44429c0a71d4 | 337 | * @note This function doesn't Accesses the device |
pablo_bmxrp | 0:44429c0a71d4 | 338 | * |
pablo_bmxrp | 0:44429c0a71d4 | 339 | * @param sequence_step_id Sequence step identifier. |
pablo_bmxrp | 0:44429c0a71d4 | 340 | * @param p_sequence_steps_string Pointer to Info string |
pablo_bmxrp | 0:44429c0a71d4 | 341 | * |
pablo_bmxrp | 0:44429c0a71d4 | 342 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 343 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 344 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 345 | VL53L0X_Error VL53L0X_get_sequence_steps_info(VL53L0X_SequenceStepId sequence_step_id, |
pablo_bmxrp | 0:44429c0a71d4 | 346 | char *p_sequence_steps_string); |
pablo_bmxrp | 0:44429c0a71d4 | 347 | |
pablo_bmxrp | 0:44429c0a71d4 | 348 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 349 | * @brief Get the frequency of the timer used for ranging results time stamps |
pablo_bmxrp | 0:44429c0a71d4 | 350 | * |
pablo_bmxrp | 0:44429c0a71d4 | 351 | * @param[out] p_timer_freq_hz : pointer for timer frequency |
pablo_bmxrp | 0:44429c0a71d4 | 352 | * |
pablo_bmxrp | 0:44429c0a71d4 | 353 | * @return status : 0 = ok, 1 = error |
pablo_bmxrp | 0:44429c0a71d4 | 354 | * |
pablo_bmxrp | 0:44429c0a71d4 | 355 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 356 | int32_t VL53L0X_get_timer_frequency(int32_t *p_timer_freq_hz); |
pablo_bmxrp | 0:44429c0a71d4 | 357 | |
pablo_bmxrp | 0:44429c0a71d4 | 358 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 359 | * @brief Get the timer value in units of timer_freq_hz (see VL53L0X_get_timestamp_frequency()) |
pablo_bmxrp | 0:44429c0a71d4 | 360 | * |
pablo_bmxrp | 0:44429c0a71d4 | 361 | * @param[out] p_timer_count : pointer for timer count value |
pablo_bmxrp | 0:44429c0a71d4 | 362 | * |
pablo_bmxrp | 0:44429c0a71d4 | 363 | * @return status : 0 = ok, 1 = error |
pablo_bmxrp | 0:44429c0a71d4 | 364 | * |
pablo_bmxrp | 0:44429c0a71d4 | 365 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 366 | int32_t VL53L0X_get_timer_value(int32_t *p_timer_count); |
pablo_bmxrp | 0:44429c0a71d4 | 367 | |
pablo_bmxrp | 0:44429c0a71d4 | 368 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 369 | * @brief Configure ranging interrupt reported to system |
pablo_bmxrp | 0:44429c0a71d4 | 370 | * |
pablo_bmxrp | 0:44429c0a71d4 | 371 | * @note This function is not Implemented |
pablo_bmxrp | 0:44429c0a71d4 | 372 | * |
pablo_bmxrp | 0:44429c0a71d4 | 373 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 374 | * @param interrupt_mask Mask of interrupt to Enable/disable |
pablo_bmxrp | 0:44429c0a71d4 | 375 | * (0:interrupt disabled or 1: interrupt enabled) |
pablo_bmxrp | 0:44429c0a71d4 | 376 | * @return VL53L0X_ERROR_NOT_IMPLEMENTED Not implemented |
pablo_bmxrp | 0:44429c0a71d4 | 377 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 378 | VL53L0X_Error VL53L0X_enable_interrupt_mask(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 379 | uint32_t interrupt_mask); |
pablo_bmxrp | 0:44429c0a71d4 | 380 | |
pablo_bmxrp | 0:44429c0a71d4 | 381 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 382 | * @brief Get Dmax Calibration Parameters for a given device |
pablo_bmxrp | 0:44429c0a71d4 | 383 | * |
pablo_bmxrp | 0:44429c0a71d4 | 384 | * |
pablo_bmxrp | 0:44429c0a71d4 | 385 | * @note This function Access to the device |
pablo_bmxrp | 0:44429c0a71d4 | 386 | * |
pablo_bmxrp | 0:44429c0a71d4 | 387 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 388 | * @param p_range_milli_meter Pointer to Calibration Distance |
pablo_bmxrp | 0:44429c0a71d4 | 389 | * @param p_signal_rate_rtn_mega_cps Pointer to Signal rate return |
pablo_bmxrp | 0:44429c0a71d4 | 390 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 391 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 392 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 393 | VL53L0X_Error VL53L0X_get_dmax_cal_parameters(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 394 | uint16_t *p_range_milli_meter, FixPoint1616_t *p_signal_rate_rtn_mega_cps); |
pablo_bmxrp | 0:44429c0a71d4 | 395 | |
pablo_bmxrp | 0:44429c0a71d4 | 396 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 397 | * @brief Set Dmax Calibration Parameters for a given device |
pablo_bmxrp | 0:44429c0a71d4 | 398 | * When one of the parameter is zero, this function will get parameter |
pablo_bmxrp | 0:44429c0a71d4 | 399 | * from NVM. |
pablo_bmxrp | 0:44429c0a71d4 | 400 | * @note This function doesn't Access to the device |
pablo_bmxrp | 0:44429c0a71d4 | 401 | * |
pablo_bmxrp | 0:44429c0a71d4 | 402 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 403 | * @param range_milli_meter Calibration Distance |
pablo_bmxrp | 0:44429c0a71d4 | 404 | * @param signal_rate_rtn_mega_cps Signal rate return read at CalDistance |
pablo_bmxrp | 0:44429c0a71d4 | 405 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 406 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 407 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 408 | VL53L0X_Error VL53L0X_get_dmax_cal_parameters(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 409 | uint16_t range_milli_meter, FixPoint1616_t signal_rate_rtn_mega_cps); |
pablo_bmxrp | 0:44429c0a71d4 | 410 | |
pablo_bmxrp | 0:44429c0a71d4 | 411 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 412 | * @brief Retrieve the measurements from device for a given setup |
pablo_bmxrp | 0:44429c0a71d4 | 413 | * |
pablo_bmxrp | 0:44429c0a71d4 | 414 | * @par Function Description |
pablo_bmxrp | 0:44429c0a71d4 | 415 | * Get data from last successful Histogram measurement |
pablo_bmxrp | 0:44429c0a71d4 | 416 | * @warning USER should take care about @a VL53L0X_GetNumberOfROIZones() |
pablo_bmxrp | 0:44429c0a71d4 | 417 | * before get data. |
pablo_bmxrp | 0:44429c0a71d4 | 418 | * PAL will fill a NumberOfROIZones times the corresponding data structure |
pablo_bmxrp | 0:44429c0a71d4 | 419 | * used in the measurement function. |
pablo_bmxrp | 0:44429c0a71d4 | 420 | * |
pablo_bmxrp | 0:44429c0a71d4 | 421 | * @note This function is not Implemented |
pablo_bmxrp | 0:44429c0a71d4 | 422 | * |
pablo_bmxrp | 0:44429c0a71d4 | 423 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 424 | * @param p_histogram_measurement_data Pointer to the histogram data structure. |
pablo_bmxrp | 0:44429c0a71d4 | 425 | * @return VL53L0X_ERROR_NOT_IMPLEMENTED Not implemented |
pablo_bmxrp | 0:44429c0a71d4 | 426 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 427 | VL53L0X_Error VL53L0X_get_histogram_measurement_data(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 428 | VL53L0X_HistogramMeasurementData_t *p_histogram_measurement_data); |
pablo_bmxrp | 0:44429c0a71d4 | 429 | |
pablo_bmxrp | 0:44429c0a71d4 | 430 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 431 | * @brief Get current new device mode |
pablo_bmxrp | 0:44429c0a71d4 | 432 | * @par Function Description |
pablo_bmxrp | 0:44429c0a71d4 | 433 | * Get current Histogram mode of a Device |
pablo_bmxrp | 0:44429c0a71d4 | 434 | * |
pablo_bmxrp | 0:44429c0a71d4 | 435 | * @note This function doesn't Access to the device |
pablo_bmxrp | 0:44429c0a71d4 | 436 | * |
pablo_bmxrp | 0:44429c0a71d4 | 437 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 438 | * @param p_histogram_mode Pointer to current Histogram Mode value |
pablo_bmxrp | 0:44429c0a71d4 | 439 | * Valid values are: |
pablo_bmxrp | 0:44429c0a71d4 | 440 | * VL53L0X_HISTOGRAMMODE_DISABLED |
pablo_bmxrp | 0:44429c0a71d4 | 441 | * VL53L0X_DEVICEMODE_SINGLE_HISTOGRAM |
pablo_bmxrp | 0:44429c0a71d4 | 442 | * VL53L0X_HISTOGRAMMODE_REFERENCE_ONLY |
pablo_bmxrp | 0:44429c0a71d4 | 443 | * VL53L0X_HISTOGRAMMODE_RETURN_ONLY |
pablo_bmxrp | 0:44429c0a71d4 | 444 | * VL53L0X_HISTOGRAMMODE_BOTH |
pablo_bmxrp | 0:44429c0a71d4 | 445 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 446 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 447 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 448 | VL53L0X_Error VL53L0X_get_histogram_mode(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 449 | VL53L0X_HistogramModes *p_histogram_mode); |
pablo_bmxrp | 0:44429c0a71d4 | 450 | |
pablo_bmxrp | 0:44429c0a71d4 | 451 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 452 | * @brief Set a new Histogram mode |
pablo_bmxrp | 0:44429c0a71d4 | 453 | * @par Function Description |
pablo_bmxrp | 0:44429c0a71d4 | 454 | * Set device to a new Histogram mode |
pablo_bmxrp | 0:44429c0a71d4 | 455 | * |
pablo_bmxrp | 0:44429c0a71d4 | 456 | * @note This function doesn't Access to the device |
pablo_bmxrp | 0:44429c0a71d4 | 457 | * |
pablo_bmxrp | 0:44429c0a71d4 | 458 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 459 | * @param histogram_mode New device mode to apply |
pablo_bmxrp | 0:44429c0a71d4 | 460 | * Valid values are: |
pablo_bmxrp | 0:44429c0a71d4 | 461 | * VL53L0X_HISTOGRAMMODE_DISABLED |
pablo_bmxrp | 0:44429c0a71d4 | 462 | * VL53L0X_DEVICEMODE_SINGLE_HISTOGRAM |
pablo_bmxrp | 0:44429c0a71d4 | 463 | * VL53L0X_HISTOGRAMMODE_REFERENCE_ONLY |
pablo_bmxrp | 0:44429c0a71d4 | 464 | * VL53L0X_HISTOGRAMMODE_RETURN_ONLY |
pablo_bmxrp | 0:44429c0a71d4 | 465 | * VL53L0X_HISTOGRAMMODE_BOTH |
pablo_bmxrp | 0:44429c0a71d4 | 466 | * |
pablo_bmxrp | 0:44429c0a71d4 | 467 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 468 | * @return VL53L0X_ERROR_MODE_NOT_SUPPORTED This error occurs when |
pablo_bmxrp | 0:44429c0a71d4 | 469 | * HistogramMode is not in the supported list |
pablo_bmxrp | 0:44429c0a71d4 | 470 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 471 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 472 | VL53L0X_Error VL53L0X_set_histogram_mode(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 473 | VL53L0X_HistogramModes histogram_mode); |
pablo_bmxrp | 0:44429c0a71d4 | 474 | |
pablo_bmxrp | 0:44429c0a71d4 | 475 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 476 | * @brief Return a description string for a given limit check number |
pablo_bmxrp | 0:44429c0a71d4 | 477 | * |
pablo_bmxrp | 0:44429c0a71d4 | 478 | * @par Function Description |
pablo_bmxrp | 0:44429c0a71d4 | 479 | * This function returns a description string for a given limit check number. |
pablo_bmxrp | 0:44429c0a71d4 | 480 | * The limit check is identified with the LimitCheckId. |
pablo_bmxrp | 0:44429c0a71d4 | 481 | * |
pablo_bmxrp | 0:44429c0a71d4 | 482 | * @note This function doesn't Access to the device |
pablo_bmxrp | 0:44429c0a71d4 | 483 | * |
pablo_bmxrp | 0:44429c0a71d4 | 484 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 485 | * @param limit_check_id Limit Check ID |
pablo_bmxrp | 0:44429c0a71d4 | 486 | (0<= LimitCheckId < VL53L0X_GetNumberOfLimitCheck() ). |
pablo_bmxrp | 0:44429c0a71d4 | 487 | * @param p_limit_check_string Pointer to the |
pablo_bmxrp | 0:44429c0a71d4 | 488 | description string of the given check limit. |
pablo_bmxrp | 0:44429c0a71d4 | 489 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 490 | * @return VL53L0X_ERROR_INVALID_PARAMS This error is |
pablo_bmxrp | 0:44429c0a71d4 | 491 | returned when LimitCheckId value is out of range. |
pablo_bmxrp | 0:44429c0a71d4 | 492 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 493 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 494 | VL53L0X_Error VL53L0X_get_limit_check_info(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 495 | uint16_t limit_check_id, char *p_limit_check_string); |
pablo_bmxrp | 0:44429c0a71d4 | 496 | |
pablo_bmxrp | 0:44429c0a71d4 | 497 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 498 | * @brief Get the linearity corrective gain |
pablo_bmxrp | 0:44429c0a71d4 | 499 | * |
pablo_bmxrp | 0:44429c0a71d4 | 500 | * @par Function Description |
pablo_bmxrp | 0:44429c0a71d4 | 501 | * Should only be used after a successful call to @a VL53L0X_DataInit to backup |
pablo_bmxrp | 0:44429c0a71d4 | 502 | * device NVM value |
pablo_bmxrp | 0:44429c0a71d4 | 503 | * |
pablo_bmxrp | 0:44429c0a71d4 | 504 | * @note This function Access to the device |
pablo_bmxrp | 0:44429c0a71d4 | 505 | * |
pablo_bmxrp | 0:44429c0a71d4 | 506 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 507 | * @param p_linearity_corrective_gain Pointer to the linearity |
pablo_bmxrp | 0:44429c0a71d4 | 508 | * corrective gain in x1000 |
pablo_bmxrp | 0:44429c0a71d4 | 509 | * if value is 1000 then no modification is applied. |
pablo_bmxrp | 0:44429c0a71d4 | 510 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 511 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 512 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 513 | VL53L0X_Error VL53L0X_get_linearity_corrective_gain(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 514 | uint16_t *p_linearity_corrective_gain); |
pablo_bmxrp | 0:44429c0a71d4 | 515 | |
pablo_bmxrp | 0:44429c0a71d4 | 516 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 517 | * Set the linearity corrective gain |
pablo_bmxrp | 0:44429c0a71d4 | 518 | * |
pablo_bmxrp | 0:44429c0a71d4 | 519 | * @note This function Access to the device |
pablo_bmxrp | 0:44429c0a71d4 | 520 | * |
pablo_bmxrp | 0:44429c0a71d4 | 521 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 522 | * @param linearity_corrective_gain Linearity corrective |
pablo_bmxrp | 0:44429c0a71d4 | 523 | * gain in x1000 |
pablo_bmxrp | 0:44429c0a71d4 | 524 | * if value is 1000 then no modification is applied. |
pablo_bmxrp | 0:44429c0a71d4 | 525 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 526 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 527 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 528 | VL53L0X_Error VL53L0X_set_linearity_corrective_gain(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 529 | int16_t linearity_corrective_gain); |
pablo_bmxrp | 0:44429c0a71d4 | 530 | |
pablo_bmxrp | 0:44429c0a71d4 | 531 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 532 | * @brief Get the Maximum number of ROI Zones managed by the Device |
pablo_bmxrp | 0:44429c0a71d4 | 533 | * |
pablo_bmxrp | 0:44429c0a71d4 | 534 | * @par Function Description |
pablo_bmxrp | 0:44429c0a71d4 | 535 | * Get Maximum number of ROI Zones managed by the Device. |
pablo_bmxrp | 0:44429c0a71d4 | 536 | * |
pablo_bmxrp | 0:44429c0a71d4 | 537 | * @note This function doesn't Access to the device |
pablo_bmxrp | 0:44429c0a71d4 | 538 | * |
pablo_bmxrp | 0:44429c0a71d4 | 539 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 540 | * @param p_max_number_of_roi_zones Pointer to the Maximum Number |
pablo_bmxrp | 0:44429c0a71d4 | 541 | * of ROI Zones value. |
pablo_bmxrp | 0:44429c0a71d4 | 542 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 543 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 544 | VL53L0X_Error VL53L0X_get_max_number_of_roi_zones(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 545 | uint8_t *p_max_number_of_roi_zones); |
pablo_bmxrp | 0:44429c0a71d4 | 546 | |
pablo_bmxrp | 0:44429c0a71d4 | 547 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 548 | * @brief Retrieve the Reference Signal after a measurements |
pablo_bmxrp | 0:44429c0a71d4 | 549 | * |
pablo_bmxrp | 0:44429c0a71d4 | 550 | * @par Function Description |
pablo_bmxrp | 0:44429c0a71d4 | 551 | * Get Reference Signal from last successful Ranging measurement |
pablo_bmxrp | 0:44429c0a71d4 | 552 | * This function return a valid value after that you call the |
pablo_bmxrp | 0:44429c0a71d4 | 553 | * @a VL53L0X_GetRangingMeasurementData(). |
pablo_bmxrp | 0:44429c0a71d4 | 554 | * |
pablo_bmxrp | 0:44429c0a71d4 | 555 | * @note This function Access to the device |
pablo_bmxrp | 0:44429c0a71d4 | 556 | * |
pablo_bmxrp | 0:44429c0a71d4 | 557 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 558 | * @param p_measurement_ref_signal Pointer to the Ref Signal to fill up. |
pablo_bmxrp | 0:44429c0a71d4 | 559 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 560 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 561 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 562 | VL53L0X_Error VL53L0X_get_measurement_ref_signal(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 563 | FixPoint1616_t *p_measurement_ref_signal); |
pablo_bmxrp | 0:44429c0a71d4 | 564 | |
pablo_bmxrp | 0:44429c0a71d4 | 565 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 566 | * @brief Get the number of the check limit managed by a given Device |
pablo_bmxrp | 0:44429c0a71d4 | 567 | * |
pablo_bmxrp | 0:44429c0a71d4 | 568 | * @par Function Description |
pablo_bmxrp | 0:44429c0a71d4 | 569 | * This function give the number of the check limit managed by the Device |
pablo_bmxrp | 0:44429c0a71d4 | 570 | * |
pablo_bmxrp | 0:44429c0a71d4 | 571 | * @note This function doesn't Access to the device |
pablo_bmxrp | 0:44429c0a71d4 | 572 | * |
pablo_bmxrp | 0:44429c0a71d4 | 573 | * @param p_number_of_limit_check Pointer to the number of check limit. |
pablo_bmxrp | 0:44429c0a71d4 | 574 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 575 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 576 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 577 | VL53L0X_Error VL53L0X_get_number_of_limit_check( |
pablo_bmxrp | 0:44429c0a71d4 | 578 | uint16_t *p_number_of_limit_check); |
pablo_bmxrp | 0:44429c0a71d4 | 579 | |
pablo_bmxrp | 0:44429c0a71d4 | 580 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 581 | * @brief Get the number of ROI Zones managed by the Device |
pablo_bmxrp | 0:44429c0a71d4 | 582 | * |
pablo_bmxrp | 0:44429c0a71d4 | 583 | * @par Function Description |
pablo_bmxrp | 0:44429c0a71d4 | 584 | * Get number of ROI Zones managed by the Device |
pablo_bmxrp | 0:44429c0a71d4 | 585 | * USER should take care about @a VL53L0X_GetNumberOfROIZones() |
pablo_bmxrp | 0:44429c0a71d4 | 586 | * before get data after a perform measurement. |
pablo_bmxrp | 0:44429c0a71d4 | 587 | * PAL will fill a NumberOfROIZones times the corresponding data |
pablo_bmxrp | 0:44429c0a71d4 | 588 | * structure used in the measurement function. |
pablo_bmxrp | 0:44429c0a71d4 | 589 | * |
pablo_bmxrp | 0:44429c0a71d4 | 590 | * @note This function doesn't Access to the device |
pablo_bmxrp | 0:44429c0a71d4 | 591 | * |
pablo_bmxrp | 0:44429c0a71d4 | 592 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 593 | * @param p_number_of_roi_zones Pointer to the Number of ROI Zones value. |
pablo_bmxrp | 0:44429c0a71d4 | 594 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 595 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 596 | VL53L0X_Error VL53L0X_get_number_of_roi_zones(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 597 | uint8_t *p_number_of_roi_zones); |
pablo_bmxrp | 0:44429c0a71d4 | 598 | |
pablo_bmxrp | 0:44429c0a71d4 | 599 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 600 | * @brief Set the number of ROI Zones to be used for a specific Device |
pablo_bmxrp | 0:44429c0a71d4 | 601 | * |
pablo_bmxrp | 0:44429c0a71d4 | 602 | * @par Function Description |
pablo_bmxrp | 0:44429c0a71d4 | 603 | * Set the number of ROI Zones to be used for a specific Device. |
pablo_bmxrp | 0:44429c0a71d4 | 604 | * The programmed value should be less than the max number of ROI Zones given |
pablo_bmxrp | 0:44429c0a71d4 | 605 | * with @a VL53L0X_GetMaxNumberOfROIZones(). |
pablo_bmxrp | 0:44429c0a71d4 | 606 | * This version of API manage only one zone. |
pablo_bmxrp | 0:44429c0a71d4 | 607 | * |
pablo_bmxrp | 0:44429c0a71d4 | 608 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 609 | * @param number_of_roi_zones Number of ROI Zones to be used for a |
pablo_bmxrp | 0:44429c0a71d4 | 610 | * specific Device. |
pablo_bmxrp | 0:44429c0a71d4 | 611 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 612 | * @return VL53L0X_ERROR_INVALID_PARAMS This error is returned if |
pablo_bmxrp | 0:44429c0a71d4 | 613 | * NumberOfROIZones != 1 |
pablo_bmxrp | 0:44429c0a71d4 | 614 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 615 | VL53L0X_Error VL53L0X_set_number_of_roi_zones(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 616 | uint8_t number_of_roi_zones); |
pablo_bmxrp | 0:44429c0a71d4 | 617 | |
pablo_bmxrp | 0:44429c0a71d4 | 618 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 619 | * @brief Gets number of sequence steps managed by the API. |
pablo_bmxrp | 0:44429c0a71d4 | 620 | * |
pablo_bmxrp | 0:44429c0a71d4 | 621 | * @par Function Description |
pablo_bmxrp | 0:44429c0a71d4 | 622 | * This function retrieves the number of sequence steps currently managed |
pablo_bmxrp | 0:44429c0a71d4 | 623 | * by the API |
pablo_bmxrp | 0:44429c0a71d4 | 624 | * |
pablo_bmxrp | 0:44429c0a71d4 | 625 | * @note This function Accesses the device |
pablo_bmxrp | 0:44429c0a71d4 | 626 | * |
pablo_bmxrp | 0:44429c0a71d4 | 627 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 628 | * @param p_number_of_sequence_steps Out parameter reporting the number of |
pablo_bmxrp | 0:44429c0a71d4 | 629 | * sequence steps. |
pablo_bmxrp | 0:44429c0a71d4 | 630 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 631 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 632 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 633 | VL53L0X_Error VL53L0X_get_number_of_sequence_steps(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 634 | uint8_t *p_number_of_sequence_steps); |
pablo_bmxrp | 0:44429c0a71d4 | 635 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 636 | * @brief Get the power mode for a given Device |
pablo_bmxrp | 0:44429c0a71d4 | 637 | * |
pablo_bmxrp | 0:44429c0a71d4 | 638 | * @note This function Access to the device |
pablo_bmxrp | 0:44429c0a71d4 | 639 | * |
pablo_bmxrp | 0:44429c0a71d4 | 640 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 641 | * @param p_power_mode Pointer to the current value of the power |
pablo_bmxrp | 0:44429c0a71d4 | 642 | * mode. see ::VL53L0X_PowerModes |
pablo_bmxrp | 0:44429c0a71d4 | 643 | * Valid values are: |
pablo_bmxrp | 0:44429c0a71d4 | 644 | * VL53L0X_POWERMODE_STANDBY_LEVEL1, |
pablo_bmxrp | 0:44429c0a71d4 | 645 | * VL53L0X_POWERMODE_IDLE_LEVEL1 |
pablo_bmxrp | 0:44429c0a71d4 | 646 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 647 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 648 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 649 | VL53L0X_Error VL53L0X_get_power_mode(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 650 | VL53L0X_PowerModes *p_power_mode); |
pablo_bmxrp | 0:44429c0a71d4 | 651 | |
pablo_bmxrp | 0:44429c0a71d4 | 652 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 653 | * @brief Set the power mode for a given Device |
pablo_bmxrp | 0:44429c0a71d4 | 654 | * The power mode can be Standby or Idle. Different level of both Standby and |
pablo_bmxrp | 0:44429c0a71d4 | 655 | * Idle can exists. |
pablo_bmxrp | 0:44429c0a71d4 | 656 | * This function should not be used when device is in Ranging state. |
pablo_bmxrp | 0:44429c0a71d4 | 657 | * |
pablo_bmxrp | 0:44429c0a71d4 | 658 | * @note This function Access to the device |
pablo_bmxrp | 0:44429c0a71d4 | 659 | * |
pablo_bmxrp | 0:44429c0a71d4 | 660 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 661 | * @param power_mode The value of the power mode to set. |
pablo_bmxrp | 0:44429c0a71d4 | 662 | * see ::VL53L0X_PowerModes |
pablo_bmxrp | 0:44429c0a71d4 | 663 | * Valid values are: |
pablo_bmxrp | 0:44429c0a71d4 | 664 | * VL53L0X_POWERMODE_STANDBY_LEVEL1, |
pablo_bmxrp | 0:44429c0a71d4 | 665 | * VL53L0X_POWERMODE_IDLE_LEVEL1 |
pablo_bmxrp | 0:44429c0a71d4 | 666 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 667 | * @return VL53L0X_ERROR_MODE_NOT_SUPPORTED This error occurs when PowerMode |
pablo_bmxrp | 0:44429c0a71d4 | 668 | * is not in the supported list |
pablo_bmxrp | 0:44429c0a71d4 | 669 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 670 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 671 | VL53L0X_Error VL53L0X_set_power_mode(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 672 | VL53L0X_PowerModes power_mode); |
pablo_bmxrp | 0:44429c0a71d4 | 673 | |
pablo_bmxrp | 0:44429c0a71d4 | 674 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 675 | * @brief Retrieves SPAD configuration |
pablo_bmxrp | 0:44429c0a71d4 | 676 | * |
pablo_bmxrp | 0:44429c0a71d4 | 677 | * @par Function Description |
pablo_bmxrp | 0:44429c0a71d4 | 678 | * This function retrieves the current number of applied reference spads |
pablo_bmxrp | 0:44429c0a71d4 | 679 | * and also their type : Aperture or Non-Aperture. |
pablo_bmxrp | 0:44429c0a71d4 | 680 | * |
pablo_bmxrp | 0:44429c0a71d4 | 681 | * @note This function Access to the device |
pablo_bmxrp | 0:44429c0a71d4 | 682 | * |
pablo_bmxrp | 0:44429c0a71d4 | 683 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 684 | * @param p_spad_count Number ref Spad Count |
pablo_bmxrp | 0:44429c0a71d4 | 685 | * @param p_is_aperture_spads Reports if spads are of type |
pablo_bmxrp | 0:44429c0a71d4 | 686 | * aperture or non-aperture. |
pablo_bmxrp | 0:44429c0a71d4 | 687 | * 1:=aperture, 0:=Non-Aperture |
pablo_bmxrp | 0:44429c0a71d4 | 688 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 689 | * @return VL53L0X_ERROR_REF_SPAD_INIT Error in the in the reference |
pablo_bmxrp | 0:44429c0a71d4 | 690 | * spad configuration. |
pablo_bmxrp | 0:44429c0a71d4 | 691 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 692 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 693 | VL53L0X_Error wrapped_VL53L0X_get_reference_spads(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 694 | uint32_t *p_spad_count, uint8_t *p_is_aperture_spads); |
pablo_bmxrp | 0:44429c0a71d4 | 695 | |
pablo_bmxrp | 0:44429c0a71d4 | 696 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 697 | * @brief Gets the (on/off) state of a requested sequence step. |
pablo_bmxrp | 0:44429c0a71d4 | 698 | * |
pablo_bmxrp | 0:44429c0a71d4 | 699 | * @par Function Description |
pablo_bmxrp | 0:44429c0a71d4 | 700 | * This function retrieves the state of a requested sequence step, i.e. on/off. |
pablo_bmxrp | 0:44429c0a71d4 | 701 | * |
pablo_bmxrp | 0:44429c0a71d4 | 702 | * @note This function Accesses the device |
pablo_bmxrp | 0:44429c0a71d4 | 703 | * |
pablo_bmxrp | 0:44429c0a71d4 | 704 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 705 | * @param sequence_step_id Sequence step identifier. |
pablo_bmxrp | 0:44429c0a71d4 | 706 | * @param p_sequence_step_enabled Out parameter reporting if the sequence step |
pablo_bmxrp | 0:44429c0a71d4 | 707 | * is enabled {0=Off,1=On}. |
pablo_bmxrp | 0:44429c0a71d4 | 708 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 709 | * @return VL53L0X_ERROR_INVALID_PARAMS Error SequenceStepId parameter not |
pablo_bmxrp | 0:44429c0a71d4 | 710 | * supported. |
pablo_bmxrp | 0:44429c0a71d4 | 711 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 712 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 713 | VL53L0X_Error VL53L0X_get_sequence_step_enable(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 714 | VL53L0X_SequenceStepId sequence_step_id, uint8_t *p_sequence_step_enabled); |
pablo_bmxrp | 0:44429c0a71d4 | 715 | |
pablo_bmxrp | 0:44429c0a71d4 | 716 | |
pablo_bmxrp | 0:44429c0a71d4 | 717 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 718 | * @brief Gets the timeout of a requested sequence step. |
pablo_bmxrp | 0:44429c0a71d4 | 719 | * |
pablo_bmxrp | 0:44429c0a71d4 | 720 | * @par Function Description |
pablo_bmxrp | 0:44429c0a71d4 | 721 | * This function retrieves the timeout of a requested sequence step. |
pablo_bmxrp | 0:44429c0a71d4 | 722 | * |
pablo_bmxrp | 0:44429c0a71d4 | 723 | * @note This function Accesses the device |
pablo_bmxrp | 0:44429c0a71d4 | 724 | * |
pablo_bmxrp | 0:44429c0a71d4 | 725 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 726 | * @param sequence_step_id Sequence step identifier. |
pablo_bmxrp | 0:44429c0a71d4 | 727 | * @param p_time_out_milli_secs Timeout value. |
pablo_bmxrp | 0:44429c0a71d4 | 728 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 729 | * @return VL53L0X_ERROR_INVALID_PARAMS Error SequenceStepId parameter not |
pablo_bmxrp | 0:44429c0a71d4 | 730 | * supported. |
pablo_bmxrp | 0:44429c0a71d4 | 731 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 732 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 733 | VL53L0X_Error VL53L0X_get_sequence_step_timeout(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 734 | VL53L0X_SequenceStepId sequence_step_id, |
pablo_bmxrp | 0:44429c0a71d4 | 735 | FixPoint1616_t *p_time_out_milli_secs); |
pablo_bmxrp | 0:44429c0a71d4 | 736 | |
pablo_bmxrp | 0:44429c0a71d4 | 737 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 738 | * @brief Sets the timeout of a requested sequence step. |
pablo_bmxrp | 0:44429c0a71d4 | 739 | * |
pablo_bmxrp | 0:44429c0a71d4 | 740 | * @par Function Description |
pablo_bmxrp | 0:44429c0a71d4 | 741 | * This function sets the timeout of a requested sequence step. |
pablo_bmxrp | 0:44429c0a71d4 | 742 | * |
pablo_bmxrp | 0:44429c0a71d4 | 743 | * @note This function Accesses the device |
pablo_bmxrp | 0:44429c0a71d4 | 744 | * |
pablo_bmxrp | 0:44429c0a71d4 | 745 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 746 | * @param sequence_step_id Sequence step identifier. |
pablo_bmxrp | 0:44429c0a71d4 | 747 | * @param time_out_milli_secs Demanded timeout |
pablo_bmxrp | 0:44429c0a71d4 | 748 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 749 | * @return VL53L0X_ERROR_INVALID_PARAMS Error SequenceStepId parameter not |
pablo_bmxrp | 0:44429c0a71d4 | 750 | * supported. |
pablo_bmxrp | 0:44429c0a71d4 | 751 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 752 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 753 | VL53L0X_Error VL53L0X_set_sequence_step_timeout(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 754 | VL53L0X_SequenceStepId sequence_step_id, FixPoint1616_t time_out_milli_secs); |
pablo_bmxrp | 0:44429c0a71d4 | 755 | |
pablo_bmxrp | 0:44429c0a71d4 | 756 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 757 | * @brief Get the current SPAD Ambient Damper Factor value |
pablo_bmxrp | 0:44429c0a71d4 | 758 | * |
pablo_bmxrp | 0:44429c0a71d4 | 759 | * @par Function Description |
pablo_bmxrp | 0:44429c0a71d4 | 760 | * This function get the SPAD Ambient Damper Factor value |
pablo_bmxrp | 0:44429c0a71d4 | 761 | * |
pablo_bmxrp | 0:44429c0a71d4 | 762 | * @note This function Access to the device |
pablo_bmxrp | 0:44429c0a71d4 | 763 | * |
pablo_bmxrp | 0:44429c0a71d4 | 764 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 765 | * @param p_spad_ambient_damper_factor Pointer to programmed SPAD Ambient |
pablo_bmxrp | 0:44429c0a71d4 | 766 | * Damper Factor value |
pablo_bmxrp | 0:44429c0a71d4 | 767 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 768 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 769 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 770 | VL53L0X_Error VL53L0X_get_spad_ambient_damper_factor(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 771 | uint16_t *p_spad_ambient_damper_factor); |
pablo_bmxrp | 0:44429c0a71d4 | 772 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 773 | * @brief Set the SPAD Ambient Damper Factor value |
pablo_bmxrp | 0:44429c0a71d4 | 774 | * |
pablo_bmxrp | 0:44429c0a71d4 | 775 | * @par Function Description |
pablo_bmxrp | 0:44429c0a71d4 | 776 | * This function set the SPAD Ambient Damper Factor value |
pablo_bmxrp | 0:44429c0a71d4 | 777 | * |
pablo_bmxrp | 0:44429c0a71d4 | 778 | * @note This function Access to the device |
pablo_bmxrp | 0:44429c0a71d4 | 779 | * |
pablo_bmxrp | 0:44429c0a71d4 | 780 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 781 | * @param spad_ambient_damper_factor SPAD Ambient Damper Factor value |
pablo_bmxrp | 0:44429c0a71d4 | 782 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 783 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 784 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 785 | VL53L0X_Error VL53L0X_set_spad_ambient_damper_factor(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 786 | uint16_t spad_ambient_damper_factor); |
pablo_bmxrp | 0:44429c0a71d4 | 787 | |
pablo_bmxrp | 0:44429c0a71d4 | 788 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 789 | * @brief Get the current SPAD Ambient Damper Threshold value |
pablo_bmxrp | 0:44429c0a71d4 | 790 | * |
pablo_bmxrp | 0:44429c0a71d4 | 791 | * @par Function Description |
pablo_bmxrp | 0:44429c0a71d4 | 792 | * This function get the SPAD Ambient Damper Threshold value |
pablo_bmxrp | 0:44429c0a71d4 | 793 | * |
pablo_bmxrp | 0:44429c0a71d4 | 794 | * @note This function Access to the device |
pablo_bmxrp | 0:44429c0a71d4 | 795 | * |
pablo_bmxrp | 0:44429c0a71d4 | 796 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 797 | * @param p_spad_ambient_damper_threshold Pointer to programmed |
pablo_bmxrp | 0:44429c0a71d4 | 798 | * SPAD Ambient Damper Threshold value |
pablo_bmxrp | 0:44429c0a71d4 | 799 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 800 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 801 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 802 | VL53L0X_Error VL53L0X_get_spad_ambient_damper_threshold(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 803 | uint16_t *p_spad_ambient_damper_threshold); |
pablo_bmxrp | 0:44429c0a71d4 | 804 | |
pablo_bmxrp | 0:44429c0a71d4 | 805 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 806 | * @brief Set the SPAD Ambient Damper Threshold value |
pablo_bmxrp | 0:44429c0a71d4 | 807 | * |
pablo_bmxrp | 0:44429c0a71d4 | 808 | * @par Function Description |
pablo_bmxrp | 0:44429c0a71d4 | 809 | * This function set the SPAD Ambient Damper Threshold value |
pablo_bmxrp | 0:44429c0a71d4 | 810 | * |
pablo_bmxrp | 0:44429c0a71d4 | 811 | * @note This function Access to the device |
pablo_bmxrp | 0:44429c0a71d4 | 812 | * |
pablo_bmxrp | 0:44429c0a71d4 | 813 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 814 | * @param spad_ambient_damper_threshold SPAD Ambient Damper Threshold value |
pablo_bmxrp | 0:44429c0a71d4 | 815 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 816 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 817 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 818 | VL53L0X_Error VL53L0X_set_spad_ambient_damper_threshold(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 819 | uint16_t spad_ambient_damper_threshold); |
pablo_bmxrp | 0:44429c0a71d4 | 820 | |
pablo_bmxrp | 0:44429c0a71d4 | 821 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 822 | * @brief Get the maximal distance for actual setup |
pablo_bmxrp | 0:44429c0a71d4 | 823 | * @par Function Description |
pablo_bmxrp | 0:44429c0a71d4 | 824 | * Device must be initialized through @a VL53L0X_SetParameters() prior calling |
pablo_bmxrp | 0:44429c0a71d4 | 825 | * this function. |
pablo_bmxrp | 0:44429c0a71d4 | 826 | * |
pablo_bmxrp | 0:44429c0a71d4 | 827 | * Any range value more than the value returned is to be considered as |
pablo_bmxrp | 0:44429c0a71d4 | 828 | * "no target detected" or |
pablo_bmxrp | 0:44429c0a71d4 | 829 | * "no target in detectable range"\n |
pablo_bmxrp | 0:44429c0a71d4 | 830 | * @warning The maximal distance depends on the setup |
pablo_bmxrp | 0:44429c0a71d4 | 831 | * |
pablo_bmxrp | 0:44429c0a71d4 | 832 | * @note This function is not Implemented |
pablo_bmxrp | 0:44429c0a71d4 | 833 | * |
pablo_bmxrp | 0:44429c0a71d4 | 834 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 835 | * @param p_upper_limit_milli_meter The maximal range limit for actual setup |
pablo_bmxrp | 0:44429c0a71d4 | 836 | * (in millimeter) |
pablo_bmxrp | 0:44429c0a71d4 | 837 | * @return VL53L0X_ERROR_NOT_IMPLEMENTED Not implemented |
pablo_bmxrp | 0:44429c0a71d4 | 838 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 839 | VL53L0X_Error VL53L0X_get_upper_limit_milli_meter(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 840 | uint16_t *p_upper_limit_milli_meter); |
pablo_bmxrp | 0:44429c0a71d4 | 841 | |
pablo_bmxrp | 0:44429c0a71d4 | 842 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 843 | * @brief Get the tuning settings pointer and the internal external switch |
pablo_bmxrp | 0:44429c0a71d4 | 844 | * value. |
pablo_bmxrp | 0:44429c0a71d4 | 845 | * |
pablo_bmxrp | 0:44429c0a71d4 | 846 | * This function is used to get the Tuning settings buffer pointer and the |
pablo_bmxrp | 0:44429c0a71d4 | 847 | * value. |
pablo_bmxrp | 0:44429c0a71d4 | 848 | * of the switch to select either external or internal tuning settings. |
pablo_bmxrp | 0:44429c0a71d4 | 849 | * |
pablo_bmxrp | 0:44429c0a71d4 | 850 | * @note This function Access to the device |
pablo_bmxrp | 0:44429c0a71d4 | 851 | * |
pablo_bmxrp | 0:44429c0a71d4 | 852 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 853 | * @param pp_tuning_setting_buffer Pointer to tuning settings buffer. |
pablo_bmxrp | 0:44429c0a71d4 | 854 | * @param p_use_internal_tuning_settings Pointer to store Use internal tuning |
pablo_bmxrp | 0:44429c0a71d4 | 855 | * settings value. |
pablo_bmxrp | 0:44429c0a71d4 | 856 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 857 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 858 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 859 | VL53L0X_Error VL53L0X_get_tuning_setting_buffer(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 860 | uint8_t **pp_tuning_setting_buffer, uint8_t *p_use_internal_tuning_settings); |
pablo_bmxrp | 0:44429c0a71d4 | 861 | |
pablo_bmxrp | 0:44429c0a71d4 | 862 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 863 | * @brief Set the tuning settings pointer |
pablo_bmxrp | 0:44429c0a71d4 | 864 | * |
pablo_bmxrp | 0:44429c0a71d4 | 865 | * This function is used to specify the Tuning settings buffer to be used |
pablo_bmxrp | 0:44429c0a71d4 | 866 | * for a given device. The buffer contains all the necessary data to permit |
pablo_bmxrp | 0:44429c0a71d4 | 867 | * the API to write tuning settings. |
pablo_bmxrp | 0:44429c0a71d4 | 868 | * This function permit to force the usage of either external or internal |
pablo_bmxrp | 0:44429c0a71d4 | 869 | * tuning settings. |
pablo_bmxrp | 0:44429c0a71d4 | 870 | * |
pablo_bmxrp | 0:44429c0a71d4 | 871 | * @note This function Access to the device |
pablo_bmxrp | 0:44429c0a71d4 | 872 | * |
pablo_bmxrp | 0:44429c0a71d4 | 873 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 874 | * @param p_tuning_setting_buffer Pointer to tuning settings buffer. |
pablo_bmxrp | 0:44429c0a71d4 | 875 | * @param use_internal_tuning_settings Use internal tuning settings value. |
pablo_bmxrp | 0:44429c0a71d4 | 876 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 877 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 878 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 879 | VL53L0X_Error VL53L0X_set_tuning_setting_buffer(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 880 | uint8_t *p_tuning_setting_buffer, uint8_t use_internal_tuning_settings); |
pablo_bmxrp | 0:44429c0a71d4 | 881 | |
pablo_bmxrp | 0:44429c0a71d4 | 882 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 883 | * @defgroup VL53L0X_registerAccess_group PAL Register Access Functions |
pablo_bmxrp | 0:44429c0a71d4 | 884 | * @brief PAL Register Access Functions |
pablo_bmxrp | 0:44429c0a71d4 | 885 | * @{ |
pablo_bmxrp | 0:44429c0a71d4 | 886 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 887 | |
pablo_bmxrp | 0:44429c0a71d4 | 888 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 889 | * Lock comms interface to serialize all commands to a shared I2C interface for a specific device |
pablo_bmxrp | 0:44429c0a71d4 | 890 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 891 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 892 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 893 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 894 | VL53L0X_Error VL53L0X_lock_sequence_access(VL53L0X_DEV dev); |
pablo_bmxrp | 0:44429c0a71d4 | 895 | |
pablo_bmxrp | 0:44429c0a71d4 | 896 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 897 | * Unlock comms interface to serialize all commands to a shared I2C interface for a specific device |
pablo_bmxrp | 0:44429c0a71d4 | 898 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 899 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 900 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 901 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 902 | VL53L0X_Error VL53L0X_unlock_sequence_access(VL53L0X_DEV dev); |
pablo_bmxrp | 0:44429c0a71d4 | 903 | |
pablo_bmxrp | 0:44429c0a71d4 | 904 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 905 | * @brief Prepare device for operation |
pablo_bmxrp | 0:44429c0a71d4 | 906 | * @par Function Description |
pablo_bmxrp | 0:44429c0a71d4 | 907 | * Update device with provided parameters |
pablo_bmxrp | 0:44429c0a71d4 | 908 | * @li Then start ranging operation. |
pablo_bmxrp | 0:44429c0a71d4 | 909 | * |
pablo_bmxrp | 0:44429c0a71d4 | 910 | * @note This function Access to the device |
pablo_bmxrp | 0:44429c0a71d4 | 911 | * |
pablo_bmxrp | 0:44429c0a71d4 | 912 | * @param Dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 913 | * @param pDeviceParameters Pointer to store current device parameters. |
pablo_bmxrp | 0:44429c0a71d4 | 914 | * @return VL53L0X_ERROR_NONE Success |
pablo_bmxrp | 0:44429c0a71d4 | 915 | * @return "Other error code" See ::VL53L0X_Error |
pablo_bmxrp | 0:44429c0a71d4 | 916 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 917 | VL53L0X_Error vl53L0x_set_device_parameters(VL53L0X_DEV Dev, |
pablo_bmxrp | 0:44429c0a71d4 | 918 | const VL53L0X_DeviceParameters_t *pDeviceParameters); |
pablo_bmxrp | 0:44429c0a71d4 | 919 | |
pablo_bmxrp | 0:44429c0a71d4 | 920 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 921 | * Set Group parameter Hold state |
pablo_bmxrp | 0:44429c0a71d4 | 922 | * |
pablo_bmxrp | 0:44429c0a71d4 | 923 | * @par Function Description |
pablo_bmxrp | 0:44429c0a71d4 | 924 | * Set or remove device internal group parameter hold |
pablo_bmxrp | 0:44429c0a71d4 | 925 | * |
pablo_bmxrp | 0:44429c0a71d4 | 926 | * @note This function is not Implemented |
pablo_bmxrp | 0:44429c0a71d4 | 927 | * |
pablo_bmxrp | 0:44429c0a71d4 | 928 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 929 | * @param group_param_hold Group parameter Hold state to be set (on/off) |
pablo_bmxrp | 0:44429c0a71d4 | 930 | * @return VL53L0X_ERROR_NOT_IMPLEMENTED Not implemented |
pablo_bmxrp | 0:44429c0a71d4 | 931 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 932 | VL53L0X_Error VL53L0X_set_group_param_hold(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 933 | uint8_t group_param_hold); |
pablo_bmxrp | 0:44429c0a71d4 | 934 | |
pablo_bmxrp | 0:44429c0a71d4 | 935 | |
pablo_bmxrp | 0:44429c0a71d4 | 936 | /** |
pablo_bmxrp | 0:44429c0a71d4 | 937 | * @brief Wait for device ready for a new measurement command. |
pablo_bmxrp | 0:44429c0a71d4 | 938 | * Blocking function. |
pablo_bmxrp | 0:44429c0a71d4 | 939 | * |
pablo_bmxrp | 0:44429c0a71d4 | 940 | * @note This function is not Implemented |
pablo_bmxrp | 0:44429c0a71d4 | 941 | * |
pablo_bmxrp | 0:44429c0a71d4 | 942 | * @param dev Device Handle |
pablo_bmxrp | 0:44429c0a71d4 | 943 | * @param max_loop Max Number of polling loop (timeout). |
pablo_bmxrp | 0:44429c0a71d4 | 944 | * @return VL53L0X_ERROR_NOT_IMPLEMENTED Not implemented |
pablo_bmxrp | 0:44429c0a71d4 | 945 | */ |
pablo_bmxrp | 0:44429c0a71d4 | 946 | VL53L0X_Error VL53L0X_wait_device_ready_for_new_measurement(VL53L0X_DEV dev, |
pablo_bmxrp | 0:44429c0a71d4 | 947 | uint32_t max_loop); |
pablo_bmxrp | 0:44429c0a71d4 | 948 | |
pablo_bmxrp | 0:44429c0a71d4 | 949 | VL53L0X_Error VL53L0X_reverse_bytes(uint8_t *data, uint32_t size); |
pablo_bmxrp | 0:44429c0a71d4 | 950 | |
pablo_bmxrp | 0:44429c0a71d4 | 951 | int range_meas_int_continuous_mode(void (*fptr)(void)); |
pablo_bmxrp | 0:44429c0a71d4 | 952 |