Function a121_sys::acc_sensor_calibrate
source · pub unsafe extern "C" fn acc_sensor_calibrate(
sensor: *mut acc_sensor_t,
cal_complete: *mut bool,
cal_result: *mut acc_cal_result_t,
buffer: *mut c_void,
buffer_size: u32
) -> boolExpand description
@brief Calibrate a sensor
Note that the sensor must be powered on before calling this function. To calibrate the sensor, call this function and wait for sensor interrupt, repeat until calibration is complete (or fails).
@param[in] sensor The sensor instance to calibrate @param[out] cal_complete True if calibration is complete False if caller should wait for interrupt and then call again @param[out] cal_result The result after a completed calibration @param[in] buffer Memory used during calibration. A larger buffer might mean fewer transactions between host and sensor. The buffer will only be used during the calibration. The client has to make sure this buffer is suitably aligned for any built-in type. @param[in] buffer_size The size in bytes of the buffer, should be at least buffer_size from @ref acc_rss_get_buffer_size @return true if successful, false otherwise