no-OS
|
Implementation of adis.c. More...
#include "adis.h"
#include "adis_internals.h"
#include "no_os_delay.h"
#include "no_os_gpio.h"
#include "no_os_util.h"
#include "no_os_alloc.h"
#include "no_os_print_log.h"
#include <string.h>
Functions | |
int | adis_init (struct adis_dev **adis, const struct adis_init_param *ip) |
Initialize adis device. More... | |
void | adis_remove (struct adis_dev *adis) |
Remove adis device. More... | |
int | adis_initial_startup (struct adis_dev *adis) |
Device initial setup. More... | |
int | adis_read_reg (struct adis_dev *adis, uint32_t reg, uint32_t *val, uint32_t size) |
Read N bytes from register. More... | |
int | adis_write_reg (struct adis_dev *adis, uint32_t reg, uint32_t val, uint32_t size) |
Write N bytes to register. More... | |
int | adis_read_field_u32 (struct adis_dev *adis, struct adis_field field, uint32_t *field_val) |
Read field to uint32 value. More... | |
int | adis_read_field_s32 (struct adis_dev *adis, struct adis_field field, int32_t *field_val) |
Read field to int32 value. More... | |
int | adis_write_field_u32 (struct adis_dev *adis, struct adis_field field, uint32_t field_val) |
Write field from uint32 value. More... | |
int | adis_update_bits_base (struct adis_dev *adis, uint32_t reg, const uint32_t mask, const uint32_t val, uint8_t size) |
Update the desired bits of reg in accordance with mask and val. More... | |
bool | adis_validate_checksum (uint8_t *buffer, uint8_t size, uint8_t idx) |
Check if the checksum for burst data is correct. More... | |
void | adis_update_diag_flags (struct adis_dev *adis, uint32_t diag_stat) |
Update device diagnosis flags according to the received parameter. More... | |
int | adis_read_diag_stat (struct adis_dev *adis, struct adis_diag_flags *diag_flags) |
Read diag status register and update device diag flags. More... | |
int | adis_read_temp_flags (struct adis_dev *adis, struct adis_temp_flags *temp_flags) |
Read temperature flags. Currently this implementation is valid only for adis16550. If further other devices support this feature, it should be checked wether the register structure remains the same. If not, a similar approach to diagnosis flags should be implemented. More... | |
void | adis_update_temp_flags (struct adis_dev *adis, uint16_t temp_reg) |
Update device temperature flags according to the received parameter. More... | |
int | adis_read_diag_snsr_init_failure (struct adis_dev *adis, uint32_t *snsr_init_failure) |
Diagnosis: read sensor initialization failure flag value. More... | |
int | adis_read_diag_data_path_overrun (struct adis_dev *adis, uint32_t *data_path_overrun_err) |
Diagnosis: read data path overrun flag value. More... | |
int | adis_read_diag_fls_mem_update_failure (struct adis_dev *adis, uint32_t *fls_mem_update_failure) |
Diagnosis: read flash memory update error flag value. More... | |
int | adis_read_diag_spi_comm_err (struct adis_dev *adis, uint32_t *spi_comm_err) |
Diagnosis: read spi communication error flag value. More... | |
int | adis_read_diag_standby_mode (struct adis_dev *adis, uint32_t *standby_mode) |
Diagnosis: read standby mode flag value. More... | |
int | adis_read_diag_snsr_failure (struct adis_dev *adis, uint32_t *snsr_failure) |
Diagnosis: read sensor self test error flag value. More... | |
int | adis_read_diag_mem_failure (struct adis_dev *adis, uint32_t *mem_failure) |
Diagnosis: read flash memory test error flag value. More... | |
int | adis_read_diag_clk_err (struct adis_dev *adis, uint32_t *clk_err) |
Diagnosis: read clock error flag value. More... | |
int | adis_read_diag_gyro1_failure (struct adis_dev *adis, uint32_t *gyro1_failure) |
Diagnosis: read gyroscope1 self test error flag value. More... | |
int | adis_read_diag_gyro2_failure (struct adis_dev *adis, uint32_t *gyro2_failure) |
Diagnosis: read gyroscope2 self test error flag value. More... | |
int | adis_read_diag_accl_failure (struct adis_dev *adis, uint32_t *accl_failure) |
Diagnosis: read accelerometer self test error flag value. More... | |
int | adis_read_diag_x_axis_gyro_failure (struct adis_dev *adis, uint32_t *x_axis_gyro_failure) |
Diagnosis: read X-Axis Gyroscope failure flag value. More... | |
int | adis_read_diag_y_axis_gyro_failure (struct adis_dev *adis, uint32_t *y_axis_gyro_failure) |
Diagnosis: read Y-Axis Gyroscope failure flag value. More... | |
int | adis_read_diag_z_axis_gyro_failure (struct adis_dev *adis, uint32_t *z_axis_gyro_failure) |
Diagnosis: read Z-Axis Gyroscope failure flag value. More... | |
int | adis_read_diag_x_axis_accl_failure (struct adis_dev *adis, uint32_t *x_axis_accl_failure) |
Diagnosis: read X-Axis Accelerometer failure flag value. More... | |
int | adis_read_diag_y_axis_accl_failure (struct adis_dev *adis, uint32_t *y_axis_accl_failure) |
Diagnosis: read Y-Axis Accelerometer failure flag value. More... | |
int | adis_read_diag_z_axis_accl_failure (struct adis_dev *adis, uint32_t *z_axis_accl_failure) |
Diagnosis: read Z-Axis Accelerometer failure flag value. More... | |
int | adis_read_diag_aduc_mcu_fault (struct adis_dev *adis, uint32_t *aduc_mcu_fault) |
Diagnosis: read ADuC microcontroller fault flag value. More... | |
int | adis_read_diag_config_calib_crc_error (struct adis_dev *adis, uint32_t *config_calib_crc_error) |
Diagnosis: read configuration and/or calibration CRC error flag value. More... | |
int | adis_read_diag_overrange (struct adis_dev *adis, uint32_t *overrange) |
Diagnosis: read overrange for inertial sensors flag value. More... | |
int | adis_read_diag_temp_err (struct adis_dev *adis, uint32_t *temp_err) |
Diagnosis: read temperature error flag value. More... | |
int | adis_read_diag_power_supply_failure (struct adis_dev *adis, uint32_t *power_supply_failure) |
Diagnosis: read power supply error flag value. More... | |
int | adis_read_diag_boot_memory_failure (struct adis_dev *adis, uint32_t *boot_memory_failure) |
Diagnosis: read boot memory failure error flag value. More... | |
int | adis_read_diag_reg_nvm_err (struct adis_dev *adis, uint32_t *reg_nvm_err) |
Diagnosis: read register NVM error flag value. More... | |
int | adis_read_diag_wdg_timer_flag (struct adis_dev *adis, uint32_t *wdg_timer_flag) |
Diagnosis: read watchdog timer flag value. More... | |
int | adis_read_diag_int_proc_supply_err (struct adis_dev *adis, uint32_t *int_proc_supply_err) |
Diagnosis: read internal processor supply error flag value. More... | |
int | adis_read_diag_ext_5v_supply_err (struct adis_dev *adis, uint32_t *ext_5v_supply_err) |
Diagnosis: read external 5V supply error flag value. More... | |
int | adis_read_diag_int_snsr_supply_err (struct adis_dev *adis, uint32_t *int_snsr_supply_err) |
Diagnosis: read internal sensor supply error flag value. More... | |
int | adis_read_diag_int_reg_err (struct adis_dev *adis, uint32_t *int_reg_err) |
Diagnosis: read internal regulator error flag value. More... | |
void | adis_read_diag_checksum_err (struct adis_dev *adis, uint32_t *checksum_err) |
Diagnosis: read checksum error flag value. More... | |
void | adis_read_diag_fls_mem_wr_cnt_exceed (struct adis_dev *adis, uint32_t *fls_mem_wr_cnt_exceed) |
Diagnosis: read flash memory write counts exceeded flag value. More... | |
int | adis_read_x_gyro (struct adis_dev *adis, int32_t *x_gyro) |
Read raw gyroscope data on x axis. More... | |
int | adis_read_y_gyro (struct adis_dev *adis, int32_t *y_gyro) |
Read raw gyroscope data on y axis. More... | |
int | adis_read_z_gyro (struct adis_dev *adis, int32_t *z_gyro) |
Read raw gyroscope data on z axis. More... | |
int | adis_read_x_accl (struct adis_dev *adis, int32_t *x_accl) |
Read raw acceleration data on x axis. More... | |
int | adis_read_y_accl (struct adis_dev *adis, int32_t *y_accl) |
Read raw acceleration data on y axis. More... | |
int | adis_read_z_accl (struct adis_dev *adis, int32_t *z_accl) |
Read raw acceleration data on z axis. More... | |
int | adis_read_temp_out (struct adis_dev *adis, int32_t *temp_out) |
Read raw temperature data. More... | |
int | adis_read_time_stamp (struct adis_dev *adis, uint32_t *time_stamp) |
Read raw time stamp data. More... | |
int | adis_read_data_cntr (struct adis_dev *adis, uint32_t *data_cntr) |
Read data counter value. More... | |
int | adis_read_x_deltang (struct adis_dev *adis, int32_t *x_deltang) |
Read raw delta angle data on x axis. More... | |
int | adis_read_y_deltang (struct adis_dev *adis, int32_t *y_deltang) |
Read raw delta angle data on y axis. More... | |
int | adis_read_z_deltang (struct adis_dev *adis, int32_t *z_deltang) |
Read raw delta angle data on z axis. More... | |
int | adis_read_x_deltvel (struct adis_dev *adis, int32_t *x_deltvel) |
Read raw delta velocity data on x axis. More... | |
int | adis_read_y_deltvel (struct adis_dev *adis, int32_t *y_deltvel) |
Read raw delta velocity data on y axis. More... | |
int | adis_read_z_deltvel (struct adis_dev *adis, int32_t *z_deltvel) |
Read raw delta velocity data on z axis. More... | |
int | adis_read_fifo_cnt (struct adis_dev *adis, uint32_t *fifo_cnt) |
Read output FIFO sample count. More... | |
int | adis_read_spi_chksum (struct adis_dev *adis, uint32_t *checksum) |
Read current sample SPI transaction checksum. More... | |
int | adis_read_xg_bias (struct adis_dev *adis, int32_t *xg_bias) |
Read raw gyroscope offset correction on x axis. More... | |
int | adis_write_xg_bias (struct adis_dev *adis, int32_t xg_bias) |
Write raw gyroscope offset correction on x axis. More... | |
int | adis_read_yg_bias (struct adis_dev *adis, int32_t *yg_bias) |
Read raw gyroscope offset correction on y axis. More... | |
int | adis_write_yg_bias (struct adis_dev *adis, int32_t yg_bias) |
Write raw gyroscope offset correction on y axis. More... | |
int | adis_read_zg_bias (struct adis_dev *adis, int32_t *zg_bias) |
Read raw gyroscope offset correction on z axis. More... | |
int | adis_write_zg_bias (struct adis_dev *adis, int32_t zg_bias) |
Write raw gyroscope offset correction on z axis. More... | |
int | adis_read_xa_bias (struct adis_dev *adis, int32_t *xa_bias) |
Read raw acceleration offset correction on x axis. More... | |
int | adis_write_xa_bias (struct adis_dev *adis, int32_t xa_bias) |
Write raw acceleration offset correction on x axis. More... | |
int | adis_read_ya_bias (struct adis_dev *adis, int32_t *ya_bias) |
Read raw acceleration offset correction on y axis. More... | |
int | adis_write_ya_bias (struct adis_dev *adis, int32_t ya_bias) |
Write raw acceleration offset correction on y axis. More... | |
int | adis_read_za_bias (struct adis_dev *adis, int32_t *za_bias) |
Read raw acceleration offset correction on z axis. More... | |
int | adis_write_za_bias (struct adis_dev *adis, int32_t za_bias) |
Write raw acceleration offset correction on z axis. More... | |
int | adis_read_xg_scale (struct adis_dev *adis, int32_t *xg_scale) |
Read raw gyroscope scale adjustment on x axis. More... | |
int | adis_write_xg_scale (struct adis_dev *adis, int32_t xg_scale) |
Write raw gyroscope scale adjustment on x axis. More... | |
int | adis_read_yg_scale (struct adis_dev *adis, int32_t *yg_scale) |
Read raw gyroscope scale adjustment on y axis. More... | |
int | adis_write_yg_scale (struct adis_dev *adis, int32_t yg_scale) |
Write raw gyroscope scale adjustment on y axis. More... | |
int | adis_read_zg_scale (struct adis_dev *adis, int32_t *zg_scale) |
Read raw gyroscope scale adjustment on z axis. More... | |
int | adis_write_zg_scale (struct adis_dev *adis, int32_t zg_scale) |
Write raw gyroscope scale adjustment on z axis. More... | |
int | adis_read_xa_scale (struct adis_dev *adis, int32_t *xa_scale) |
Read raw acceleration scale adjustment on x axis. More... | |
int | adis_write_xa_scale (struct adis_dev *adis, int32_t xa_scale) |
Write raw acceleration scale adjustment on x axis. More... | |
int | adis_read_ya_scale (struct adis_dev *adis, int32_t *ya_scale) |
Read raw acceleration scale adjustment on y axis. More... | |
int | adis_write_ya_scale (struct adis_dev *adis, int32_t ya_scale) |
Write raw acceleration scale adjustment on y axis. More... | |
int | adis_read_za_scale (struct adis_dev *adis, int32_t *za_scale) |
Read raw acceleration scale adjustment on z axis. More... | |
int | adis_write_za_scale (struct adis_dev *adis, int32_t za_scale) |
Write raw acceleration scale adjustment on z axis. More... | |
int | adis_read_fifo_en (struct adis_dev *adis, uint32_t *fifo_en) |
int | adis_write_fifo_en (struct adis_dev *adis, uint32_t fifo_en) |
Write FIFO enable bit value. More... | |
int | adis_read_fifo_overflow (struct adis_dev *adis, uint32_t *fifo_overflow) |
Read FIFO overflow bit value. More... | |
int | adis_write_fifo_overflow (struct adis_dev *adis, uint32_t fifo_overflow) |
Write FIFO overflow bit value. More... | |
int | adis_read_fifo_wm_int_en (struct adis_dev *adis, uint32_t *fifo_wm_int_en) |
Read FIFO watermark interrupt enable bit value. More... | |
int | adis_write_fifo_wm_int_en (struct adis_dev *adis, uint32_t fifo_wm_int_en) |
Write FIFO watermark interrupt enable bit value. More... | |
int | adis_read_fifo_wm_int_pol (struct adis_dev *adis, uint32_t *fifo_wm_int_pol) |
Read FIFO watermark interrupt polarity bit value. More... | |
int | adis_write_fifo_wm_int_pol (struct adis_dev *adis, uint32_t fifo_wm_int_pol) |
Write FIFO watermark interrupt polarity bit value. More... | |
int | adis_read_fifo_wm_lvl (struct adis_dev *adis, uint32_t *fifo_wm_lvl) |
Read FIFO watermark threshold level value. More... | |
int | adis_write_fifo_wm_lvl (struct adis_dev *adis, uint32_t fifo_wm_lvl) |
Write FIFO watermark threshold level value. More... | |
int | adis_read_filt_size_var_b (struct adis_dev *adis, uint32_t *filt_size_var_b) |
Read filter size variable B value. More... | |
int | adis_write_filt_size_var_b (struct adis_dev *adis, uint32_t filt_size_var_b) |
Write filter size variable B value. More... | |
int | adis_read_lpf (struct adis_dev *adis, enum adis_chan_type chan, enum adis_axis_type axis, uint32_t *freq) |
Read configured filter frequency. More... | |
int | adis_write_lpf (struct adis_dev *adis, enum adis_chan_type chan, enum adis_axis_type axis, uint32_t freq) |
Configure filter for the given filter frequency. More... | |
int | adis_read_gyro_meas_range (struct adis_dev *adis, uint32_t *gyro_meas_range) |
Read gyroscope measurement range value. More... | |
int | adis_read_fir_en_xg (struct adis_dev *adis, uint32_t *fir_en_xg) |
Read x axis gyroscope filter enable bit value. More... | |
int | adis_write_fir_en_xg (struct adis_dev *adis, uint32_t fir_en_xg) |
Write x axis gyroscope filter enable bit value. More... | |
int | adis_read_fir_en_yg (struct adis_dev *adis, uint32_t *fir_en_yg) |
Read y axis gyroscope filter enable bit value. More... | |
int | adis_write_fir_en_yg (struct adis_dev *adis, uint32_t fir_en_yg) |
Write y axis gyroscope filter enable bit value. More... | |
int | adis_read_fir_en_zg (struct adis_dev *adis, uint32_t *fir_en_zg) |
Read z axis gyroscope filter enable bit value. More... | |
int | adis_write_fir_en_zg (struct adis_dev *adis, uint32_t fir_en_zg) |
Write z axis gyroscope filter enable bit value. More... | |
int | adis_read_fir_en_xa (struct adis_dev *adis, uint32_t *fir_en_xa) |
Read x axis accelerometer filter enable bit value. More... | |
int | adis_write_fir_en_xa (struct adis_dev *adis, uint32_t fir_en_xa) |
Write x axis accelerometer filter enable bit value. More... | |
int | adis_read_fir_en_ya (struct adis_dev *adis, uint32_t *fir_en_ya) |
Read y axis accelerometer filter enable bit value. More... | |
int | adis_write_fir_en_ya (struct adis_dev *adis, uint32_t fir_en_ya) |
Write y axis accelerometer filter enable bit value. More... | |
int | adis_read_fir_en_za (struct adis_dev *adis, uint32_t *fir_en_za) |
Read z axis accelerometer filter enable bit value. More... | |
int | adis_write_fir_en_za (struct adis_dev *adis, uint32_t fir_en_za) |
Write z axis accelerometer filter enable bit value. More... | |
int | adis_read_fir_bank_sel_xg (struct adis_dev *adis, uint32_t *fir_bank_sel_xg) |
Read x axis gyroscope filter bank selection encoded value. More... | |
int | adis_write_fir_bank_sel_xg (struct adis_dev *adis, uint32_t fir_bank_sel_xg) |
Write x axis gyroscope filter bank selection encoded value. More... | |
int | adis_read_fir_bank_sel_yg (struct adis_dev *adis, uint32_t *fir_bank_sel_yg) |
Read y axis gyroscope filter bank selection encoded value. More... | |
int | adis_write_fir_bank_sel_yg (struct adis_dev *adis, uint32_t fir_bank_sel_yg) |
Write y axis gyroscope filter bank selection encoded value. More... | |
int | adis_read_fir_bank_sel_zg (struct adis_dev *adis, uint32_t *fir_bank_sel_zg) |
Read z axis gyroscope filter bank selection encoded value. More... | |
int | adis_write_fir_bank_sel_zg (struct adis_dev *adis, uint32_t fir_bank_sel_zg) |
Write z axis gyroscope filter bank selection encoded value. More... | |
int | adis_read_fir_bank_sel_xa (struct adis_dev *adis, uint32_t *fir_bank_sel_xa) |
Read x axis accelerometer filter bank selection encoded value. More... | |
int | adis_write_fir_bank_sel_xa (struct adis_dev *adis, uint32_t fir_bank_sel_xa) |
Write x axis accelerometer filter bank selection encoded value. More... | |
int | adis_read_fir_bank_sel_ya (struct adis_dev *adis, uint32_t *fir_bank_sel_ya) |
Read y axis accelerometer filter bank selection encoded value. More... | |
int | adis_write_fir_bank_sel_ya (struct adis_dev *adis, uint32_t fir_bank_sel_ya) |
Write y axis accelerometer filter bank selection encoded value. More... | |
int | adis_read_fir_bank_sel_za (struct adis_dev *adis, uint32_t *fir_bank_sel_za) |
Read z axis accelerometer filter bank selection encoded value. More... | |
int | adis_write_fir_bank_sel_za (struct adis_dev *adis, uint32_t fir_bank_sel_za) |
Write z axis accelerometer filter bank selection encoded value. More... | |
int | adis_read_fir_coef_bank_a (struct adis_dev *adis, uint8_t coef_idx, uint32_t *coef) |
Read FIR Filter Coefficient Bank A idx value. More... | |
int | adis_write_fir_coef_bank_a (struct adis_dev *adis, uint8_t coef_idx, uint32_t coef) |
Write FIR Filter Coefficient Bank A idx value. More... | |
int | adis_read_fir_coef_bank_b (struct adis_dev *adis, uint8_t coef_idx, uint32_t *coef) |
Read FIR Filter Coefficient Bank B idx value. More... | |
int | adis_write_fir_coef_bank_b (struct adis_dev *adis, uint8_t coef_idx, uint32_t coef) |
Write FIR Filter Coefficient Bank B idx value. More... | |
int | adis_read_fir_coef_bank_c (struct adis_dev *adis, uint8_t coef_idx, uint32_t *coef) |
Read FIR Filter Coefficient Bank C idx value. More... | |
int | adis_write_fir_coef_bank_c (struct adis_dev *adis, uint8_t coef_idx, uint32_t coef) |
Write FIR Filter Coefficient Bank C idx value. More... | |
int | adis_read_fir_coef_bank_d (struct adis_dev *adis, uint8_t coef_idx, uint32_t *coef) |
Read FIR Filter Coefficient Bank D idx value. More... | |
int | adis_write_fir_coef_bank_d (struct adis_dev *adis, uint8_t coef_idx, uint32_t coef) |
Write FIR Filter Coefficient Bank D idx value. More... | |
int | adis_read_dr_selection (struct adis_dev *adis, uint32_t *dr_selection) |
Read data ready selection encoded value. More... | |
int | adis_write_dr_selection (struct adis_dev *adis, uint32_t dr_selection) |
Write data ready selection encoded value. More... | |
int | adis_read_dr_polarity (struct adis_dev *adis, uint32_t *dr_polarity) |
Read data ready polarity encoded value. More... | |
int | adis_write_dr_polarity (struct adis_dev *adis, uint32_t dr_polarity) |
Write data ready polarity encoded value. More... | |
int | adis_read_dr_enable (struct adis_dev *adis, uint32_t *dr_enable) |
Read data ready enable encoded value. More... | |
int | adis_write_dr_enable (struct adis_dev *adis, uint32_t dr_enable) |
Write data ready enable encoded value. More... | |
int | adis_read_sync_selection (struct adis_dev *adis, uint32_t *sync_selection) |
Read sync selection encoded value. More... | |
int | adis_write_sync_selection (struct adis_dev *adis, uint32_t sync_selection) |
Write sync selection encoded value. More... | |
int | adis_read_sync_polarity (struct adis_dev *adis, uint32_t *sync_polarity) |
Read sync polarity encoded value. More... | |
int | adis_write_sync_polarity (struct adis_dev *adis, uint32_t sync_polarity) |
Write sync polarity encoded value. More... | |
int | adis_read_sync_mode (struct adis_dev *adis, uint32_t *sync_mode) |
Read synchronization mode encoded value. More... | |
int | adis_write_sync_mode (struct adis_dev *adis, uint32_t sync_mode, uint32_t ext_clk) |
Update synchronization mode. More... | |
int | adis_read_alarm_selection (struct adis_dev *adis, uint32_t *alarm_selection) |
Read alarm selection encoded value. More... | |
int | adis_write_alarm_selection (struct adis_dev *adis, uint32_t alarm_selection) |
Write alarm selection encoded value. More... | |
int | adis_read_alarm_polarity (struct adis_dev *adis, uint32_t *alarm_polarity) |
Read alarm polarity encoded value. More... | |
int | adis_write_alarm_polarity (struct adis_dev *adis, uint32_t alarm_polarity) |
Write alarm polarity encoded value. More... | |
int | adis_read_alarm_enable (struct adis_dev *adis, uint32_t *alarm_enable) |
Read alarm enable encoded value. More... | |
int | adis_write_alarm_enable (struct adis_dev *adis, uint32_t alarm_enable) |
Write alarm enable encoded value. More... | |
int | adis_read_gpio_dir (struct adis_dev *adis, uint8_t dio_nb, uint32_t *dir) |
Read gpio configured direction. More... | |
int | adis_read_gpio_lvl (struct adis_dev *adis, uint8_t dio_nb, uint32_t *level) |
Read gpio configured data level. More... | |
int | adis_write_gpio_dir (struct adis_dev *adis, uint8_t dio_nb, uint32_t dir) |
Write gpio direction configuration. More... | |
int | adis_write_gpio_lvl (struct adis_dev *adis, uint8_t dio_nb, uint32_t level) |
Write gpio level configuration. More... | |
int | adis_read_sens_bw (struct adis_dev *adis, uint32_t *sens_bw) |
Read internal sensor bandwidth encoded value. More... | |
int | adis_write_sens_bw (struct adis_dev *adis, uint32_t sens_bw) |
Write internal sensor bandwidth encoded value. More... | |
int | adis_read_accl_fir_enable (struct adis_dev *adis, uint32_t *accl_fir_enable) |
Read accelerometer FIR filter control bit value. More... | |
int | adis_write_accl_fir_enable (struct adis_dev *adis, uint32_t accl_fir_enable) |
Write accelerometer FIR filter control bit value. More... | |
int | adis_read_gyro_fir_enable (struct adis_dev *adis, uint32_t *gyro_fir_enable) |
Read gyroscope FIR filter control bit value. More... | |
int | adis_write_gyro_fir_enable (struct adis_dev *adis, uint32_t gyro_fir_enable) |
Write gyroscope FIR filter control bit value. More... | |
int | adis_read_pt_of_perc_algnmt (struct adis_dev *adis, uint32_t *pt_of_perc_algnmt) |
Read point of percussion alignment enable bit value. More... | |
int | adis_write_pt_of_perc_algnmt (struct adis_dev *adis, uint32_t pt_of_perc_algnmt) |
Write point of percussion alignment enable bit value. More... | |
int | adis_read_linear_accl_comp (struct adis_dev *adis, uint32_t *linear_accl_comp) |
Read linear acceleration compensation enable bit value. More... | |
int | adis_write_linear_accl_comp (struct adis_dev *adis, uint32_t linear_accl_comp) |
Write linear acceleration compensation enable bit value. More... | |
int | adis_read_burst_sel (struct adis_dev *adis, uint32_t *burst_sel) |
Read burst selection encoded value. More... | |
int | adis_write_burst_sel (struct adis_dev *adis, uint32_t burst_sel) |
Write burst selection encoded value. More... | |
int | adis_read_burst32 (struct adis_dev *adis, uint32_t *burst32) |
Read burst32 enable bit value. More... | |
int | adis_write_burst32 (struct adis_dev *adis, uint32_t burst32) |
Write burst32 enable bit value. More... | |
int | adis_read_timestamp32 (struct adis_dev *adis, uint32_t *timestamp32) |
Read timestamp32 enable bit value. More... | |
int | adis_write_timestamp32 (struct adis_dev *adis, uint32_t timestamp32) |
Write timestamp32 enable bit value. More... | |
int | adis_read_sync_4khz (struct adis_dev *adis, uint32_t *sync_4khz) |
Read 4khz internal sync enable bit value. More... | |
int | adis_write_sync_4khz (struct adis_dev *adis, uint32_t sync_4khz) |
Write 4khz internal sync enable bit value. More... | |
int | adis_read_up_scale (struct adis_dev *adis, uint32_t *up_scale) |
Read external clock scale factor value. More... | |
int | adis_write_up_scale (struct adis_dev *adis, uint32_t up_scale) |
Write external clock scale factor value. More... | |
int | adis_read_dec_rate (struct adis_dev *adis, uint32_t *dec_rate) |
Read decimation rate value. More... | |
int | adis_write_dec_rate (struct adis_dev *adis, uint32_t dec_rate) |
Write decimation rate value. More... | |
int | adis_read_bias_corr_tbc (struct adis_dev *adis, uint32_t *bias_corr_tbc) |
Read time base control value. More... | |
int | adis_write_bias_corr_tbc (struct adis_dev *adis, uint32_t bias_corr_tbc) |
Write time base control value. More... | |
int | adis_read_bias_corr_en_xg (struct adis_dev *adis, uint32_t *bias_corr_en_xg) |
Read x axis gyroscope bias correction enable bit value. More... | |
int | adis_write_bias_corr_en_xg (struct adis_dev *adis, uint32_t bias_corr_en_xg) |
Write x axis gyroscope bias correction enable bit value. More... | |
int | adis_read_bias_corr_en_yg (struct adis_dev *adis, uint32_t *bias_corr_en_yg) |
Read y axis gyroscope bias correction enable bit value. More... | |
int | adis_write_bias_corr_en_yg (struct adis_dev *adis, uint32_t bias_corr_en_yg) |
Write y axis gyroscope bias correction enable bit value. More... | |
int | adis_read_bias_corr_en_zg (struct adis_dev *adis, uint32_t *bias_corr_en_zg) |
Read z axis gyroscope bias correction enable bit value. More... | |
int | adis_write_bias_corr_en_zg (struct adis_dev *adis, uint32_t bias_corr_en_zg) |
Write z axis gyroscope bias correction enable bit value. More... | |
int | adis_read_bias_corr_en_xa (struct adis_dev *adis, uint32_t *bias_corr_en_xa) |
Read x axis accelerometer bias correction enable bit value. More... | |
int | adis_write_bias_corr_en_xa (struct adis_dev *adis, uint32_t bias_corr_en_xa) |
Write x axis accelerometer bias correction enable bit value. More... | |
int | adis_read_bias_corr_en_ya (struct adis_dev *adis, uint32_t *bias_corr_en_ya) |
Read y axis accelerometer bias correction enable bit value. More... | |
int | adis_write_bias_corr_en_ya (struct adis_dev *adis, uint32_t bias_corr_en_ya) |
Write y axis accelerometer bias correction enable bit value. More... | |
int | adis_read_bias_corr_en_za (struct adis_dev *adis, uint32_t *bias_corr_en_za) |
Read z axis accelerometer bias correction enable bit value. More... | |
int | adis_write_bias_corr_en_za (struct adis_dev *adis, uint32_t bias_corr_en_za) |
Write z axis accelerometer bias correction enable bit value. More... | |
int | adis_cmd_bias_corr_update (struct adis_dev *adis) |
Command: bias correction update. More... | |
int | adis_cmd_fact_calib_restore (struct adis_dev *adis) |
Command: factory calibration restore. More... | |
int | adis_cmd_snsr_self_test (struct adis_dev *adis) |
Command: sensor self test. More... | |
int | adis_cmd_fls_mem_update (struct adis_dev *adis) |
Command: flash memory update. More... | |
int | adis_cmd_fls_mem_test (struct adis_dev *adis) |
Command: flash memory test. More... | |
int | adis_cmd_fifo_flush (struct adis_dev *adis) |
Command: fifo flush. More... | |
int | adis_cmd_sw_res (struct adis_dev *adis) |
Command: software reset. More... | |
int | adis_cmd_write_lock (struct adis_dev *adis) |
Command: write lock. More... | |
int | adis_read_proc_rev (struct adis_dev *adis, uint32_t *proc_rev) |
Read processor revision value. More... | |
int | adis_read_firm_rev (struct adis_dev *adis, uint32_t *firm_rev) |
Read firmware revision value. More... | |
int | adis_read_firm_d (struct adis_dev *adis, uint32_t *firm_d) |
Read firmware factory configuration day value. More... | |
int | adis_read_firm_m (struct adis_dev *adis, uint32_t *firm_m) |
Read firmware factory configuration month value. More... | |
int | adis_read_firm_y (struct adis_dev *adis, uint32_t *firm_y) |
Read firmware factory configuration year value. More... | |
int | adis_read_boot_rev (struct adis_dev *adis, uint32_t *boot_rev) |
Read boot loader revision value. More... | |
int | adis_read_prod_id (struct adis_dev *adis, uint32_t *prod_id) |
Read product id value. More... | |
int | adis_read_serial_num (struct adis_dev *adis, uint32_t *serial_num) |
Read serial number value. More... | |
int | adis_read_lot_num (struct adis_dev *adis, uint32_t *lot_num) |
Read lot specific number value. More... | |
int | adis_read_usr_scr_1 (struct adis_dev *adis, uint32_t *usr_scr_1) |
Read user scratch register 1 value. More... | |
int | adis_write_usr_scr_1 (struct adis_dev *adis, uint32_t usr_scr_1) |
Write user scratch register 1 value. More... | |
int | adis_read_usr_scr_2 (struct adis_dev *adis, uint32_t *usr_scr_2) |
Read user scratch register 2 value. More... | |
int | adis_write_usr_scr_2 (struct adis_dev *adis, uint32_t usr_scr_2) |
Write user scratch register 2 value. More... | |
int | adis_read_usr_scr_3 (struct adis_dev *adis, uint32_t *usr_scr_3) |
Read user scratch register 3 value. More... | |
int | adis_write_usr_scr_3 (struct adis_dev *adis, uint32_t usr_scr_3) |
Write user scratch register 3 value. More... | |
int | adis_read_usr_scr_4 (struct adis_dev *adis, uint32_t *usr_scr_4) |
Read user scratch register 4 value. More... | |
int | adis_write_usr_scr_4 (struct adis_dev *adis, uint32_t usr_scr_4) |
Write user scratch register 4 value. More... | |
int | adis_read_fls_mem_wr_cntr (struct adis_dev *adis, uint32_t *fls_mem_wr_cntr) |
Read flash memory write cycle counter value. More... | |
int | adis_read_fir_coef (struct adis_dev *adis, uint8_t coef_idx, uint32_t *coef) |
Read FIR Filter Coefficient C_coef_idx value. More... | |
int | adis_write_fir_coef (struct adis_dev *adis, uint8_t coef_idx, uint32_t coef) |
Write FIR Filter Coefficient C_coef_idx value. More... | |
int | adis_read_burst_data (struct adis_dev *adis, struct adis_burst_data *data, bool burst32, uint8_t burst_sel, bool fifo_pop, bool crc_check) |
Read burst data. More... | |
int | adis_update_ext_clk_freq (struct adis_dev *adis, uint32_t clk_freq) |
Update external clock frequency. More... | |
int | adis_get_sync_clk_freq (struct adis_dev *adis, uint32_t *clk_freq) |
Read adis synchronization clock frequency value in Hertz. More... | |
int | adis_get_anglvel_scale (struct adis_dev *adis, struct adis_scale_fractional *anglvel_scale) |
Read adis device gyroscope scale in fractional form. More... | |
int | adis_get_accl_scale (struct adis_dev *adis, struct adis_scale_fractional *accl_scale) |
Read adis device acceleration scale in fractional form. More... | |
int | adis_get_deltaangl_scale (struct adis_dev *adis, struct adis_scale_fractional_log2 *deltaangl_scale) |
Read adis device delta angle scale in fractional form. More... | |
int | adis_get_deltavelocity_scale (struct adis_dev *adis, struct adis_scale_fractional_log2 *deltavelocity_scale) |
Read adis device delta velocity scale in fractional form. More... | |
int | adis_get_temp_scale (struct adis_dev *adis, struct adis_scale_fractional *temp_scale) |
Read adis device temperature scale in fractional form. More... | |
int | adis_get_temp_offset (struct adis_dev *adis, int *temp_offset) |
Read adis device temperature offset in integer. More... | |
Implementation of adis.c.
Copyright 2023(c) Analog Devices, Inc.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define ADIS_16_BIT_BURST_SIZE 0 |
#define ADIS_32_BIT_BURST_SIZE 1 |
#define ADIS_CHECKSUM_BUF_IDX 0 |
#define ADIS_CHECKSUM_SIZE 2 /* in bytes */ |
#define ADIS_CNT_IDX_16_BIT_BURST 16 |
#define ADIS_CNT_IDX_32_BIT_BURST 28 |
#define ADIS_DIAG_IDX_16_BIT_BURST 0 |
#define ADIS_DIAG_IDX_32_BIT_BURST 0 |
#define ADIS_FIFO_NOT_PRESENT 0 |
#define ADIS_FIFO_PRESENT 1 |
#define ADIS_MSG_SIZE_16_BIT_BURST 20 /* in bytes */ |
#define ADIS_MSG_SIZE_32_BIT_BURST 32 /* in bytes */ |
#define ADIS_SIGN_BIT_POS 15 |
#define ADIS_TEMP_IDX_16_BIT_BURST 14 |
#define ADIS_TEMP_IDX_32_BIT_BURST 26 |
#define ADIS_XACCL_IDX_16_BIT_BURST 8 |
#define ADIS_XACCL_IDX_32_BIT_BURST 14 |
#define ADIS_XGYRO_IDX_16_BIT_BURST 2 |
#define ADIS_XGYRO_IDX_32_BIT_BURST 2 |
#define ADIS_YACCL_IDX_16_BIT_BURST 10 |
#define ADIS_YACCL_IDX_32_BIT_BURST 18 |
#define ADIS_YGYRO_IDX_16_BIT_BURST 4 |
#define ADIS_YGYRO_IDX_32_BIT_BURST 6 |
#define ADIS_ZACCL_IDX_16_BIT_BURST 12 |
#define ADIS_ZACCL_IDX_32_BIT_BURST 22 |
#define ADIS_ZGYRO_IDX_16_BIT_BURST 6 |
#define ADIS_ZGYRO_IDX_32_BIT_BURST 10 |
int adis_cmd_bias_corr_update | ( | struct adis_dev * | adis | ) |
Command: bias correction update.
adis | - The adis device. |
int adis_cmd_fact_calib_restore | ( | struct adis_dev * | adis | ) |
Command: factory calibration restore.
adis | - The adis device. |
int adis_cmd_fifo_flush | ( | struct adis_dev * | adis | ) |
Command: fifo flush.
adis | - The adis device. |
int adis_cmd_fls_mem_test | ( | struct adis_dev * | adis | ) |
Command: flash memory test.
adis | - The adis device. |
int adis_cmd_fls_mem_update | ( | struct adis_dev * | adis | ) |
Command: flash memory update.
adis | - The adis device. |
int adis_cmd_snsr_self_test | ( | struct adis_dev * | adis | ) |
Command: sensor self test.
adis | - The adis device. |
int adis_cmd_sw_res | ( | struct adis_dev * | adis | ) |
Command: software reset.
adis | - The adis device. |
int adis_cmd_write_lock | ( | struct adis_dev * | adis | ) |
Command: write lock.
adis | - The adis device. |
int adis_get_accl_scale | ( | struct adis_dev * | adis, |
struct adis_scale_fractional * | accl_scale | ||
) |
Read adis device acceleration scale in fractional form.
adis | - The adis device. |
accl_scale | - The acceleration scale. |
int adis_get_anglvel_scale | ( | struct adis_dev * | adis, |
struct adis_scale_fractional * | anglvel_scale | ||
) |
Read adis device gyroscope scale in fractional form.
adis | - The adis device. |
anglvel_scale | - The gyroscope scale. |
int adis_get_deltaangl_scale | ( | struct adis_dev * | adis, |
struct adis_scale_fractional_log2 * | deltaangl_scale | ||
) |
Read adis device delta angle scale in fractional form.
adis | - The adis device. |
deltaangl_scale | - The delta angle scale. |
int adis_get_deltavelocity_scale | ( | struct adis_dev * | adis, |
struct adis_scale_fractional_log2 * | deltavelocity_scale | ||
) |
Read adis device delta velocity scale in fractional form.
adis | - The adis device. |
deltavelocity_scale | - The delta velocity scale. |
int adis_get_sync_clk_freq | ( | struct adis_dev * | adis, |
uint32_t * | clk_freq | ||
) |
Read adis synchronization clock frequency value in Hertz.
adis | - The adis device. |
clk_freq | - The current adis synchronization clock frequency. |
int adis_get_temp_offset | ( | struct adis_dev * | adis, |
int * | temp_offset | ||
) |
Read adis device temperature offset in integer.
adis | - The adis device. |
temp_offset | - The temperature offset. |
int adis_get_temp_scale | ( | struct adis_dev * | adis, |
struct adis_scale_fractional * | temp_scale | ||
) |
Read adis device temperature scale in fractional form.
adis | - The adis device. |
temp_scale | - The temperature scale. |
int adis_init | ( | struct adis_dev ** | adis, |
const struct adis_init_param * | ip | ||
) |
Initialize adis device.
adis | - The adis device. |
ip | - User specific initialization. |
int adis_initial_startup | ( | struct adis_dev * | adis | ) |
Device initial setup.
adis | - The adis device. |
int adis_read_accl_fir_enable | ( | struct adis_dev * | adis, |
uint32_t * | accl_fir_enable | ||
) |
Read accelerometer FIR filter control bit value.
adis | - The adis device. |
accl_fir_enable | - The accelerometer FIR filter control bit value. |
int adis_read_alarm_enable | ( | struct adis_dev * | adis, |
uint32_t * | alarm_enable | ||
) |
Read alarm enable encoded value.
adis | - The adis device. |
alarm_enable | - The alarm enable encoded value. |
int adis_read_alarm_polarity | ( | struct adis_dev * | adis, |
uint32_t * | alarm_polarity | ||
) |
Read alarm polarity encoded value.
adis | - The adis device. |
alarm_polarity | - The alarm polarity encoded value. |
int adis_read_alarm_selection | ( | struct adis_dev * | adis, |
uint32_t * | alarm_selection | ||
) |
Read alarm selection encoded value.
adis | - The adis device. |
alarm_selection | - The alarm selection encoded value. 0: DIO1 1: DIO2 2: DIO3 3: DIO4 |
int adis_read_bias_corr_en_xa | ( | struct adis_dev * | adis, |
uint32_t * | bias_corr_en_xa | ||
) |
Read x axis accelerometer bias correction enable bit value.
adis | - The adis device. |
bias_corr_en_xa | - The x axis accelerometer bias correction enable bit read value. |
int adis_read_bias_corr_en_xg | ( | struct adis_dev * | adis, |
uint32_t * | bias_corr_en_xg | ||
) |
Read x axis gyroscope bias correction enable bit value.
adis | - The adis device. |
bias_corr_en_xg | - The x axis gyroscope bias correction enable bit read value. |
int adis_read_bias_corr_en_ya | ( | struct adis_dev * | adis, |
uint32_t * | bias_corr_en_ya | ||
) |
Read y axis accelerometer bias correction enable bit value.
adis | - The adis device. |
bias_corr_en_ya | - The y axis accelerometer bias correction enable bit read value. |
int adis_read_bias_corr_en_yg | ( | struct adis_dev * | adis, |
uint32_t * | bias_corr_en_yg | ||
) |
Read y axis gyroscope bias correction enable bit value.
adis | - The adis device. |
bias_corr_en_yg | - The y axis gyroscope bias correction enable bit read value. |
int adis_read_bias_corr_en_za | ( | struct adis_dev * | adis, |
uint32_t * | bias_corr_en_za | ||
) |
Read z axis accelerometer bias correction enable bit value.
adis | - The adis device. |
bias_corr_en_za | - The z axis accelerometer bias correction enable bit read value. |
int adis_read_bias_corr_en_zg | ( | struct adis_dev * | adis, |
uint32_t * | bias_corr_en_zg | ||
) |
Read z axis gyroscope bias correction enable bit value.
adis | - The adis device. |
bias_corr_en_zg | - The z axis gyroscope bias correction enable bit read value. |
int adis_read_bias_corr_tbc | ( | struct adis_dev * | adis, |
uint32_t * | bias_corr_tbc | ||
) |
Read time base control value.
adis | - The adis device. |
bias_corr_tbc | - The time base control read value. |
int adis_read_boot_rev | ( | struct adis_dev * | adis, |
uint32_t * | boot_rev | ||
) |
Read boot loader revision value.
adis | - The adis device. |
boot_rev | - The boot loader revision value. |
int adis_read_burst32 | ( | struct adis_dev * | adis, |
uint32_t * | burst32 | ||
) |
Read burst32 enable bit value.
adis | - The adis device. |
burst32 | - The burst32 enable bit value. |
int adis_read_burst_data | ( | struct adis_dev * | adis, |
struct adis_burst_data * | data, | ||
bool | burst32, | ||
uint8_t | burst_sel, | ||
bool | fifo_pop, | ||
bool | crc_check | ||
) |
Read burst data.
adis | - The adis device. |
data | - The burst read data structure to be populated. |
burst32 | - True if 32-bit data is requested for accel and gyro (or delta angle and delta velocity) measurements, false if 16-bit data is requested. |
burst_sel | - 0 if accel and gyro data is requested, 1 if delta angle and delta velocity is requested. |
fifo_pop | - In case FIFO is present, will pop the fifo if true. Unused if FIFO is not present. |
crc_check | - If true CRC will be checked, if false check will be skipped. |
int adis_read_burst_sel | ( | struct adis_dev * | adis, |
uint32_t * | burst_sel | ||
) |
Read burst selection encoded value.
adis | - The adis device. |
burst_sel | - The burst selection encoded value. |
int adis_read_data_cntr | ( | struct adis_dev * | adis, |
uint32_t * | data_cntr | ||
) |
Read data counter value.
adis | - The adis device. |
data_cntr | - The read value. |
int adis_read_dec_rate | ( | struct adis_dev * | adis, |
uint32_t * | dec_rate | ||
) |
Read decimation rate value.
adis | - The adis device. |
dec_rate | - The decimation rate read value. |
int adis_read_diag_accl_failure | ( | struct adis_dev * | adis, |
uint32_t * | accl_failure | ||
) |
Diagnosis: read accelerometer self test error flag value.
adis | - The adis device. |
accl_failure | - Accelerometer self test error flag value. |
int adis_read_diag_aduc_mcu_fault | ( | struct adis_dev * | adis, |
uint32_t * | aduc_mcu_fault | ||
) |
Diagnosis: read ADuC microcontroller fault flag value.
adis | - The adis device. |
aduc_mcu_fault | - ADuC microcontroller fault flag value. |
int adis_read_diag_boot_memory_failure | ( | struct adis_dev * | adis, |
uint32_t * | boot_memory_failure | ||
) |
Diagnosis: read boot memory failure error flag value.
adis | - The adis device. |
boot_memory_failure | - Boot memory failure error flag value. |
void adis_read_diag_checksum_err | ( | struct adis_dev * | adis, |
uint32_t * | checksum_err | ||
) |
Diagnosis: read checksum error flag value.
adis | - The adis device. |
checksum_err | - Checksum error flag value. |
int adis_read_diag_clk_err | ( | struct adis_dev * | adis, |
uint32_t * | clk_err | ||
) |
Diagnosis: read clock error flag value.
adis | - The adis device. |
clk_err | - Clock error flag value. |
int adis_read_diag_config_calib_crc_error | ( | struct adis_dev * | adis, |
uint32_t * | config_calib_crc_error | ||
) |
Diagnosis: read configuration and/or calibration CRC error flag value.
adis | - The adis device. |
config_calib_crc_error | - Configuration and/or calibration CRC error flag value. |
int adis_read_diag_data_path_overrun | ( | struct adis_dev * | adis, |
uint32_t * | data_path_overrun_err | ||
) |
Diagnosis: read data path overrun flag value.
adis | - The adis device. |
data_path_overrun_err | - Data path overrun flag value. |
int adis_read_diag_ext_5v_supply_err | ( | struct adis_dev * | adis, |
uint32_t * | ext_5v_supply_err | ||
) |
Diagnosis: read external 5V supply error flag value.
adis | - The adis device. |
ext_5v_supply_err | - External 5V supply error flag value. |
int adis_read_diag_fls_mem_update_failure | ( | struct adis_dev * | adis, |
uint32_t * | fls_mem_update_failure | ||
) |
Diagnosis: read flash memory update error flag value.
adis | - The adis device. |
fls_mem_update_failure | - Flash memory update error flag value. |
void adis_read_diag_fls_mem_wr_cnt_exceed | ( | struct adis_dev * | adis, |
uint32_t * | fls_mem_wr_cnt_exceed | ||
) |
Diagnosis: read flash memory write counts exceeded flag value.
adis | - The adis device. |
fls_mem_wr_cnt_exceed | - Flash memory write counts exceeded flag value. |
int adis_read_diag_gyro1_failure | ( | struct adis_dev * | adis, |
uint32_t * | gyro1_failure | ||
) |
Diagnosis: read gyroscope1 self test error flag value.
adis | - The adis device. |
gyro1_failure | - Gyroscope1 self test error flag value. |
int adis_read_diag_gyro2_failure | ( | struct adis_dev * | adis, |
uint32_t * | gyro2_failure | ||
) |
Diagnosis: read gyroscope2 self test error flag value.
adis | - The adis device. |
gyro2_failure | - Gyroscope2 self test error flag value. |
int adis_read_diag_int_proc_supply_err | ( | struct adis_dev * | adis, |
uint32_t * | int_proc_supply_err | ||
) |
Diagnosis: read internal processor supply error flag value.
adis | - The adis device. |
int_proc_supply_err | - Internal processor supply error flag value. |
int adis_read_diag_int_reg_err | ( | struct adis_dev * | adis, |
uint32_t * | int_reg_err | ||
) |
Diagnosis: read internal regulator error flag value.
adis | - The adis device. |
int_reg_err | - Internal regulator error flag value. |
int adis_read_diag_int_snsr_supply_err | ( | struct adis_dev * | adis, |
uint32_t * | int_snsr_supply_err | ||
) |
Diagnosis: read internal sensor supply error flag value.
adis | - The adis device. |
int_snsr_supply_err | - Internal sensor supply error flag value. |
int adis_read_diag_mem_failure | ( | struct adis_dev * | adis, |
uint32_t * | mem_failure | ||
) |
Diagnosis: read flash memory test error flag value.
adis | - The adis device. |
mem_failure | - Flash memory test error flag value. |
int adis_read_diag_overrange | ( | struct adis_dev * | adis, |
uint32_t * | overrange | ||
) |
Diagnosis: read overrange for inertial sensors flag value.
adis | - The adis device. |
overrange | - Overrange for inertial sensors flag value. |
int adis_read_diag_power_supply_failure | ( | struct adis_dev * | adis, |
uint32_t * | power_supply_failure | ||
) |
Diagnosis: read power supply error flag value.
adis | - The adis device. |
power_supply_failure | - Power supply error flag value. |
int adis_read_diag_reg_nvm_err | ( | struct adis_dev * | adis, |
uint32_t * | reg_nvm_err | ||
) |
Diagnosis: read register NVM error flag value.
adis | - The adis device. |
reg_nvm_err | - Register NVM error flag value. |
int adis_read_diag_snsr_failure | ( | struct adis_dev * | adis, |
uint32_t * | snsr_failure | ||
) |
Diagnosis: read sensor self test error flag value.
adis | - The adis device. |
snsr_failure | - Sensor self test error flag value. |
int adis_read_diag_snsr_init_failure | ( | struct adis_dev * | adis, |
uint32_t * | snsr_init_failure | ||
) |
Diagnosis: read sensor initialization failure flag value.
adis | - The adis device. |
snsr_init_failure | - Sensor initialization failure flag value. |
int adis_read_diag_spi_comm_err | ( | struct adis_dev * | adis, |
uint32_t * | spi_comm_err | ||
) |
Diagnosis: read spi communication error flag value.
adis | - The adis device. |
spi_comm_err | - Spi communication error flag value. |
int adis_read_diag_standby_mode | ( | struct adis_dev * | adis, |
uint32_t * | standby_mode | ||
) |
Diagnosis: read standby mode flag value.
adis | - The adis device. |
standby_mode | - Standby mode flag value. |
int adis_read_diag_stat | ( | struct adis_dev * | adis, |
struct adis_diag_flags * | diag_flags | ||
) |
Read diag status register and update device diag flags.
adis | - The adis device. |
diag_flags | - The read diag flags. |
int adis_read_diag_temp_err | ( | struct adis_dev * | adis, |
uint32_t * | temp_err | ||
) |
Diagnosis: read temperature error flag value.
adis | - The adis device. |
temp_err | - Temperature error flag value. |
int adis_read_diag_wdg_timer_flag | ( | struct adis_dev * | adis, |
uint32_t * | wdg_timer_flag | ||
) |
Diagnosis: read watchdog timer flag value.
adis | - The adis device. |
wdg_timer_flag | - Watchdog timer flag value. |
int adis_read_diag_x_axis_accl_failure | ( | struct adis_dev * | adis, |
uint32_t * | x_axis_accl_failure | ||
) |
Diagnosis: read X-Axis Accelerometer failure flag value.
adis | - The adis device. |
x_axis_accl_failure | - X-Axis Accelerometer failure flag value. |
int adis_read_diag_x_axis_gyro_failure | ( | struct adis_dev * | adis, |
uint32_t * | x_axis_gyro_failure | ||
) |
Diagnosis: read X-Axis Gyroscope failure flag value.
adis | - The adis device. |
x_axis_gyro_failure | - X-Axis Gyroscope failure flag value. |
int adis_read_diag_y_axis_accl_failure | ( | struct adis_dev * | adis, |
uint32_t * | y_axis_accl_failure | ||
) |
Diagnosis: read Y-Axis Accelerometer failure flag value.
adis | - The adis device. |
y_axis_accl_failure | - Y-Axis Accelerometer failure flag value. |
int adis_read_diag_y_axis_gyro_failure | ( | struct adis_dev * | adis, |
uint32_t * | y_axis_gyro_failure | ||
) |
Diagnosis: read Y-Axis Gyroscope failure flag value.
adis | - The adis device. |
y_axis_gyro_failure | - Y-Axis Gyroscope failure flag value. |
int adis_read_diag_z_axis_accl_failure | ( | struct adis_dev * | adis, |
uint32_t * | z_axis_accl_failure | ||
) |
Diagnosis: read Z-Axis Accelerometer failure flag value.
adis | - The adis device. |
z_axis_accl_failure | - Z-Axis Accelerometer failure flag value. |
int adis_read_diag_z_axis_gyro_failure | ( | struct adis_dev * | adis, |
uint32_t * | z_axis_gyro_failure | ||
) |
Diagnosis: read Z-Axis Gyroscope failure flag value.
adis | - The adis device. |
z_axis_gyro_failure | - Z-Axis Gyroscope failure flag value. |
int adis_read_dr_enable | ( | struct adis_dev * | adis, |
uint32_t * | dr_enable | ||
) |
Read data ready enable encoded value.
adis | - The adis device. |
dr_enable | - The data ready enable encoded value. |
int adis_read_dr_polarity | ( | struct adis_dev * | adis, |
uint32_t * | dr_polarity | ||
) |
Read data ready polarity encoded value.
adis | - The adis device. |
dr_polarity | - The data ready polarity encoded value. |
int adis_read_dr_selection | ( | struct adis_dev * | adis, |
uint32_t * | dr_selection | ||
) |
Read data ready selection encoded value.
adis | - The adis device. |
dr_selection | - The data ready selection encoded value. 0: DIO1 1: DIO2 2: DIO3 3: DIO4 |
int adis_read_field_s32 | ( | struct adis_dev * | adis, |
struct adis_field | field, | ||
int32_t * | field_val | ||
) |
Read field to int32 value.
adis | - The adis device. |
field | - The field structure to be read |
field_val | - The read field value. |
int adis_read_field_u32 | ( | struct adis_dev * | adis, |
struct adis_field | field, | ||
uint32_t * | field_val | ||
) |
Read field to uint32 value.
adis | - The adis device. |
field | - The field structure to be read |
field_val | - The read field value. |
int adis_read_fifo_cnt | ( | struct adis_dev * | adis, |
uint32_t * | fifo_cnt | ||
) |
Read output FIFO sample count.
adis | - The adis device. |
fifo_cnt | - The raw read value. |
int adis_read_fifo_en | ( | struct adis_dev * | adis, |
uint32_t * | fifo_en | ||
) |
FIFO control: read FIFO enable bit value.
int adis_read_fifo_overflow | ( | struct adis_dev * | adis, |
uint32_t * | fifo_overflow | ||
) |
Read FIFO overflow bit value.
adis | - The adis device. |
fifo_overflow | - The FIFO overflow bit read value. |
int adis_read_fifo_wm_int_en | ( | struct adis_dev * | adis, |
uint32_t * | fifo_wm_int_en | ||
) |
Read FIFO watermark interrupt enable bit value.
adis | - The adis device. |
fifo_wm_int_en | - The FIFO watermark interrupt enable bit read value. |
int adis_read_fifo_wm_int_pol | ( | struct adis_dev * | adis, |
uint32_t * | fifo_wm_int_pol | ||
) |
Read FIFO watermark interrupt polarity bit value.
adis | - The adis device. |
fifo_wm_int_pol | - The FIFO watermark interrupt polarity bit read value. |
int adis_read_fifo_wm_lvl | ( | struct adis_dev * | adis, |
uint32_t * | fifo_wm_lvl | ||
) |
Read FIFO watermark threshold level value.
adis | - The adis device. |
fifo_wm_lvl | - The FIFO watermark threshold level read value. |
int adis_read_filt_size_var_b | ( | struct adis_dev * | adis, |
uint32_t * | filt_size_var_b | ||
) |
Read filter size variable B value.
adis | - The adis device. |
filt_size_var_b | - The filter size variable B read value. |
int adis_read_fir_bank_sel_xa | ( | struct adis_dev * | adis, |
uint32_t * | fir_bank_sel_xa | ||
) |
Read x axis accelerometer filter bank selection encoded value.
adis | - The adis device. |
fir_bank_sel_xa | - The x axis accelerometer filter bank selection encoded value. 0: Bank A 1: Bank B 2: Bank C 3: Bank D |
int adis_read_fir_bank_sel_xg | ( | struct adis_dev * | adis, |
uint32_t * | fir_bank_sel_xg | ||
) |
Read x axis gyroscope filter bank selection encoded value.
adis | - The adis device. |
fir_bank_sel_xg | - The x axis gyroscope filter bank selection encoded value. 0: Bank A 1: Bank B 2: Bank C 3: Bank D |
int adis_read_fir_bank_sel_ya | ( | struct adis_dev * | adis, |
uint32_t * | fir_bank_sel_ya | ||
) |
Read y axis accelerometer filter bank selection encoded value.
adis | - The adis device. |
fir_bank_sel_ya | - The y axis accelerometer filter bank selection encoded value. 0: Bank A 1: Bank B 2: Bank C 3: Bank D |
int adis_read_fir_bank_sel_yg | ( | struct adis_dev * | adis, |
uint32_t * | fir_bank_sel_yg | ||
) |
Read y axis gyroscope filter bank selection encoded value.
adis | - The adis device. |
fir_bank_sel_yg | - The y axis gyroscope filter bank selection encoded value. 0: Bank A 1: Bank B 2: Bank C 3: Bank D |
int adis_read_fir_bank_sel_za | ( | struct adis_dev * | adis, |
uint32_t * | fir_bank_sel_za | ||
) |
Read z axis accelerometer filter bank selection encoded value.
adis | - The adis device. |
fir_bank_sel_za | - The z axis accelerometer filter bank selection encoded value. 0: Bank A 1: Bank B 2: Bank C 3: Bank D |
int adis_read_fir_bank_sel_zg | ( | struct adis_dev * | adis, |
uint32_t * | fir_bank_sel_zg | ||
) |
Read z axis gyroscope filter bank selection encoded value.
adis | - The adis device. |
fir_bank_sel_zg | - The z axis gyroscope filter bank selection encoded value. 0: Bank A 1: Bank B 2: Bank C 3: Bank D |
int adis_read_fir_coef | ( | struct adis_dev * | adis, |
uint8_t | coef_idx, | ||
uint32_t * | coef | ||
) |
Read FIR Filter Coefficient C_coef_idx value.
adis | - The adis device. |
coef_idx | - The coefficient id. |
coef | - The coefficient value. |
int adis_read_fir_coef_bank_a | ( | struct adis_dev * | adis, |
uint8_t | coef_idx, | ||
uint32_t * | coef | ||
) |
Read FIR Filter Coefficient Bank A idx value.
adis | - The adis device. |
coef_idx | - The coefficient id. |
coef | - The coefficient value. |
int adis_read_fir_coef_bank_b | ( | struct adis_dev * | adis, |
uint8_t | coef_idx, | ||
uint32_t * | coef | ||
) |
Read FIR Filter Coefficient Bank B idx value.
adis | - The adis device. |
coef_idx | - The coefficient id. |
coef | - The coefficient value. |
int adis_read_fir_coef_bank_c | ( | struct adis_dev * | adis, |
uint8_t | coef_idx, | ||
uint32_t * | coef | ||
) |
Read FIR Filter Coefficient Bank C idx value.
adis | - The adis device. |
coef_idx | - The coefficient id. |
coef | - The coefficient value. |
int adis_read_fir_coef_bank_d | ( | struct adis_dev * | adis, |
uint8_t | coef_idx, | ||
uint32_t * | coef | ||
) |
Read FIR Filter Coefficient Bank D idx value.
adis | - The adis device. |
coef_idx | - The coefficient id. |
coef | - The coefficient value. |
int adis_read_fir_en_xa | ( | struct adis_dev * | adis, |
uint32_t * | fir_en_xa | ||
) |
Read x axis accelerometer filter enable bit value.
adis | - The adis device. |
fir_en_xa | - The x axis accelerometer filter enable bit read value. |
int adis_read_fir_en_xg | ( | struct adis_dev * | adis, |
uint32_t * | fir_en_xg | ||
) |
Read x axis gyroscope filter enable bit value.
adis | - The adis device. |
fir_en_xg | - The x axis gyroscope filter enable bit read value. |
int adis_read_fir_en_ya | ( | struct adis_dev * | adis, |
uint32_t * | fir_en_ya | ||
) |
Read y axis accelerometer filter enable bit value.
adis | - The adis device. |
fir_en_ya | - The y axis accelerometer filter enable bit read value. |
int adis_read_fir_en_yg | ( | struct adis_dev * | adis, |
uint32_t * | fir_en_yg | ||
) |
Read y axis gyroscope filter enable bit value.
adis | - The adis device. |
fir_en_yg | - The y axis gyroscope filter enable bit read value. |
int adis_read_fir_en_za | ( | struct adis_dev * | adis, |
uint32_t * | fir_en_za | ||
) |
Read z axis accelerometer filter enable bit value.
adis | - The adis device. |
fir_en_za | - The z axis accelerometer filter enable bit read value. |
int adis_read_fir_en_zg | ( | struct adis_dev * | adis, |
uint32_t * | fir_en_zg | ||
) |
Read z axis gyroscope filter enable bit value.
adis | - The adis device. |
fir_en_zg | - The z axis gyroscope filter enable bit read value. |
int adis_read_firm_d | ( | struct adis_dev * | adis, |
uint32_t * | firm_d | ||
) |
Read firmware factory configuration day value.
adis | - The adis device. |
firm_d | - The factory configuration day value. |
int adis_read_firm_m | ( | struct adis_dev * | adis, |
uint32_t * | firm_m | ||
) |
Read firmware factory configuration month value.
adis | - The adis device. |
firm_m | - The factory configuration month value. |
int adis_read_firm_rev | ( | struct adis_dev * | adis, |
uint32_t * | firm_rev | ||
) |
Read firmware revision value.
adis | - The adis device. |
firm_rev | - The firmware revision value. |
int adis_read_firm_y | ( | struct adis_dev * | adis, |
uint32_t * | firm_y | ||
) |
Read firmware factory configuration year value.
adis | - The adis device. |
firm_y | - The factory configuration year value. |
int adis_read_fls_mem_wr_cntr | ( | struct adis_dev * | adis, |
uint32_t * | fls_mem_wr_cntr | ||
) |
Read flash memory write cycle counter value.
adis | - The adis device. |
fls_mem_wr_cntr | - The flash memory write cycle counter value. |
int adis_read_gpio_dir | ( | struct adis_dev * | adis, |
uint8_t | dio_nb, | ||
uint32_t * | dir | ||
) |
Read gpio configured direction.
adis | - The adis device. |
dio_nb | - The DIO selection encoded value. 0: DIO1 1: DIO2 2: DIO3 3: DIO4 |
dir | - DIO direction (0 - input, 1 - output) |
int adis_read_gpio_lvl | ( | struct adis_dev * | adis, |
uint8_t | dio_nb, | ||
uint32_t * | level | ||
) |
Read gpio configured data level.
adis | - The adis device. |
dio_nb | - The DIO selection encoded value. 0: DIO1 1: DIO2 2: DIO3 3: DIO4 |
level | - DIO data level (0 - low, 1 - high). |
int adis_read_gyro_fir_enable | ( | struct adis_dev * | adis, |
uint32_t * | gyro_fir_enable | ||
) |
Read gyroscope FIR filter control bit value.
adis | - The adis device. |
gyro_fir_enable | - The gyroscope FIR filter control bit value. |
int adis_read_gyro_meas_range | ( | struct adis_dev * | adis, |
uint32_t * | gyro_meas_range | ||
) |
Read gyroscope measurement range value.
adis | - The adis device. |
gyro_meas_range | - The gyroscope measurement range value. |
int adis_read_linear_accl_comp | ( | struct adis_dev * | adis, |
uint32_t * | linear_accl_comp | ||
) |
Read linear acceleration compensation enable bit value.
adis | - The adis device. |
linear_accl_comp | - The linear acceleration compensation enable bit value. |
int adis_read_lot_num | ( | struct adis_dev * | adis, |
uint32_t * | lot_num | ||
) |
Read lot specific number value.
adis | - The adis device. |
lot_num | - The lot specific number value. |
int adis_read_lpf | ( | struct adis_dev * | adis, |
enum adis_chan_type | chan, | ||
enum adis_axis_type | axis, | ||
uint32_t * | freq | ||
) |
Read configured filter frequency.
adis | - The adis device. |
chan | - The adis channel. |
axis | - Tha adis channel axis. |
freq | - The filter frequency, in Hz. |
int adis_read_proc_rev | ( | struct adis_dev * | adis, |
uint32_t * | proc_rev | ||
) |
Read processor revision value.
adis | - The adis device. |
proc_rev | - The processor revision value. |
int adis_read_prod_id | ( | struct adis_dev * | adis, |
uint32_t * | prod_id | ||
) |
Read product id value.
adis | - The adis device. |
prod_id | - The product id value. |
int adis_read_pt_of_perc_algnmt | ( | struct adis_dev * | adis, |
uint32_t * | pt_of_perc_algnmt | ||
) |
Read point of percussion alignment enable bit value.
adis | - The adis device. |
pt_of_perc_algnmt | - The point of percussion alignment enable bit value. |
int adis_read_reg | ( | struct adis_dev * | adis, |
uint32_t | reg, | ||
uint32_t * | val, | ||
uint32_t | size | ||
) |
Read N bytes from register.
adis | - The adis device. |
reg | - The address of the lower of the two registers. |
val | - The value read back from the device. |
size | - The size of the val buffer. |
int adis_read_sens_bw | ( | struct adis_dev * | adis, |
uint32_t * | sens_bw | ||
) |
Read internal sensor bandwidth encoded value.
adis | - The adis device. |
sens_bw | - The internal sensor bandwidth encoded value. |
int adis_read_serial_num | ( | struct adis_dev * | adis, |
uint32_t * | serial_num | ||
) |
Read serial number value.
adis | - The adis device. |
serial_num | - The serial number value. |
int adis_read_spi_chksum | ( | struct adis_dev * | adis, |
uint32_t * | checksum | ||
) |
Read current sample SPI transaction checksum.
adis | - The adis device. |
checksum | - The raw read value. |
int adis_read_sync_4khz | ( | struct adis_dev * | adis, |
uint32_t * | sync_4khz | ||
) |
Read 4khz internal sync enable bit value.
adis | - The adis device. |
sync_4khz | - The 4khz internal sync enable bit value (1/0 - enabled/disabled). |
int adis_read_sync_mode | ( | struct adis_dev * | adis, |
uint32_t * | sync_mode | ||
) |
Read synchronization mode encoded value.
adis | - The adis device. |
sync_mode | - The synchronization mode encoded value. |
int adis_read_sync_polarity | ( | struct adis_dev * | adis, |
uint32_t * | sync_polarity | ||
) |
Read sync polarity encoded value.
adis | - The adis device. |
sync_polarity | - The sync polarity encoded value. |
int adis_read_sync_selection | ( | struct adis_dev * | adis, |
uint32_t * | sync_selection | ||
) |
Read sync selection encoded value.
adis | - The adis device. |
sync_selection | - The sync selection encoded value. 0: DIO1 1: DIO2 2: DIO3 3: DIO4 |
int adis_read_temp_flags | ( | struct adis_dev * | adis, |
struct adis_temp_flags * | temp_flags | ||
) |
Read temperature flags. Currently this implementation is valid only for adis16550. If further other devices support this feature, it should be checked wether the register structure remains the same. If not, a similar approach to diagnosis flags should be implemented.
adis | - The adis device. |
temp_flags | - The read temperature flags flags. |
int adis_read_temp_out | ( | struct adis_dev * | adis, |
int32_t * | temp_out | ||
) |
Read raw temperature data.
adis | - The adis device. |
temp_out | - The raw read value. |
int adis_read_time_stamp | ( | struct adis_dev * | adis, |
uint32_t * | time_stamp | ||
) |
Read raw time stamp data.
adis | - The adis device. |
time_stamp | - The raw read value. |
int adis_read_timestamp32 | ( | struct adis_dev * | adis, |
uint32_t * | timestamp32 | ||
) |
Read timestamp32 enable bit value.
adis | - The adis device. |
timestamp32 | - The timestamp32 enable bit value. |
int adis_read_up_scale | ( | struct adis_dev * | adis, |
uint32_t * | up_scale | ||
) |
Read external clock scale factor value.
adis | - The adis device. |
up_scale | - The external clock scale factor read value. |
int adis_read_usr_scr_1 | ( | struct adis_dev * | adis, |
uint32_t * | usr_scr_1 | ||
) |
Read user scratch register 1 value.
adis | - The adis device. |
usr_scr_1 | - The user scratch register 1 value. |
int adis_read_usr_scr_2 | ( | struct adis_dev * | adis, |
uint32_t * | usr_scr_2 | ||
) |
Read user scratch register 2 value.
adis | - The adis device. |
usr_scr_2 | - The user scratch register 2 value. |
int adis_read_usr_scr_3 | ( | struct adis_dev * | adis, |
uint32_t * | usr_scr_3 | ||
) |
Read user scratch register 3 value.
adis | - The adis device. |
usr_scr_3 | - The user scratch register 3 value. |
int adis_read_usr_scr_4 | ( | struct adis_dev * | adis, |
uint32_t * | usr_scr_4 | ||
) |
Read user scratch register 4 value.
adis | - The adis device. |
usr_scr_4 | - The user scratch register 4 value. |
int adis_read_x_accl | ( | struct adis_dev * | adis, |
int32_t * | x_accl | ||
) |
Read raw acceleration data on x axis.
adis | - The adis device. |
x_accl | - The raw read value. |
int adis_read_x_deltang | ( | struct adis_dev * | adis, |
int32_t * | x_deltang | ||
) |
Read raw delta angle data on x axis.
adis | - The adis device. |
x_deltang | - The raw read value. |
int adis_read_x_deltvel | ( | struct adis_dev * | adis, |
int32_t * | x_deltvel | ||
) |
Read raw delta velocity data on x axis.
adis | - The adis device. |
x_deltvel | - The raw read value. |
int adis_read_x_gyro | ( | struct adis_dev * | adis, |
int32_t * | x_gyro | ||
) |
Read raw gyroscope data on x axis.
adis | - The adis device. |
x_gyro | - The raw read value. |
int adis_read_xa_bias | ( | struct adis_dev * | adis, |
int32_t * | xa_bias | ||
) |
Read raw acceleration offset correction on x axis.
adis | - The adis device. |
xa_bias | - The raw read value. |
int adis_read_xa_scale | ( | struct adis_dev * | adis, |
int32_t * | xa_scale | ||
) |
Read raw acceleration scale adjustment on x axis.
adis | - The adis device. |
xa_scale | - The raw read value. |
int adis_read_xg_bias | ( | struct adis_dev * | adis, |
int32_t * | xg_bias | ||
) |
Read raw gyroscope offset correction on x axis.
adis | - The adis device. |
xg_bias | - The raw read value. |
int adis_read_xg_scale | ( | struct adis_dev * | adis, |
int32_t * | xg_scale | ||
) |
Read raw gyroscope scale adjustment on x axis.
adis | - The adis device. |
xg_scale | - The raw read value. |
int adis_read_y_accl | ( | struct adis_dev * | adis, |
int32_t * | y_accl | ||
) |
Read raw acceleration data on y axis.
adis | - The adis device. |
y_accl | - The raw read value. |
int adis_read_y_deltang | ( | struct adis_dev * | adis, |
int32_t * | y_deltang | ||
) |
Read raw delta angle data on y axis.
adis | - The adis device. |
y_deltang | - The raw read value. |
int adis_read_y_deltvel | ( | struct adis_dev * | adis, |
int32_t * | y_deltvel | ||
) |
Read raw delta velocity data on y axis.
adis | - The adis device. |
y_deltvel | - The raw read value. |
int adis_read_y_gyro | ( | struct adis_dev * | adis, |
int32_t * | y_gyro | ||
) |
Read raw gyroscope data on y axis.
adis | - The adis device. |
y_gyro | - The raw read value. |
int adis_read_ya_bias | ( | struct adis_dev * | adis, |
int32_t * | ya_bias | ||
) |
Read raw acceleration offset correction on y axis.
adis | - The adis device. |
ya_bias | - The raw read value. |
int adis_read_ya_scale | ( | struct adis_dev * | adis, |
int32_t * | ya_scale | ||
) |
Read raw acceleration scale adjustment on y axis.
adis | - The adis device. |
ya_scale | - The raw read value. |
int adis_read_yg_bias | ( | struct adis_dev * | adis, |
int32_t * | yg_bias | ||
) |
Read raw gyroscope offset correction on y axis.
adis | - The adis device. |
yg_bias | - The raw read value. |
int adis_read_yg_scale | ( | struct adis_dev * | adis, |
int32_t * | yg_scale | ||
) |
Read raw gyroscope scale adjustment on y axis.
adis | - The adis device. |
yg_scale | - The raw read value. |
int adis_read_z_accl | ( | struct adis_dev * | adis, |
int32_t * | z_accl | ||
) |
Read raw acceleration data on z axis.
adis | - The adis device. |
z_accl | - The raw read value. |
int adis_read_z_deltang | ( | struct adis_dev * | adis, |
int32_t * | z_deltang | ||
) |
Read raw delta angle data on z axis.
adis | - The adis device. |
z_deltang | - The raw read value. |
int adis_read_z_deltvel | ( | struct adis_dev * | adis, |
int32_t * | z_deltvel | ||
) |
Read raw delta velocity data on z axis.
adis | - The adis device. |
z_deltvel | - The raw read value. |
int adis_read_z_gyro | ( | struct adis_dev * | adis, |
int32_t * | z_gyro | ||
) |
Read raw gyroscope data on z axis.
adis | - The adis device. |
z_gyro | - The raw read value. |
int adis_read_za_bias | ( | struct adis_dev * | adis, |
int32_t * | za_bias | ||
) |
Read raw acceleration offset correction on z axis.
adis | - The adis device. |
za_bias | - The raw read value. |
int adis_read_za_scale | ( | struct adis_dev * | adis, |
int32_t * | za_scale | ||
) |
Read raw acceleration scale adjustment on z axis.
adis | - The adis device. |
za_scale | - The raw read value. |
int adis_read_zg_bias | ( | struct adis_dev * | adis, |
int32_t * | zg_bias | ||
) |
Read raw gyroscope offset correction on z axis.
adis | - The adis device. |
zg_bias | - The raw read value. |
int adis_read_zg_scale | ( | struct adis_dev * | adis, |
int32_t * | zg_scale | ||
) |
Read raw gyroscope scale adjustment on z axis.
adis | - The adis device. |
zg_scale | - The raw read value. |
void adis_remove | ( | struct adis_dev * | adis | ) |
Remove adis device.
adis | - The adis device. |
int adis_update_bits_base | ( | struct adis_dev * | adis, |
uint32_t | reg, | ||
const uint32_t | mask, | ||
const uint32_t | val, | ||
uint8_t | size | ||
) |
Update the desired bits of reg in accordance with mask and val.
adis | - The adis device. |
reg | - The address of the lower of the two registers. |
mask | - Bitmask to change. |
val | - The value to be written. |
size | - Size of the register to update. |
void adis_update_diag_flags | ( | struct adis_dev * | adis, |
uint32_t | diag_stat | ||
) |
Update device diagnosis flags according to the received parameter.
adis | - The adis device. |
diag_stat | - Diagnosis flags. |
int adis_update_ext_clk_freq | ( | struct adis_dev * | adis, |
uint32_t | clk_freq | ||
) |
Update external clock frequency.
adis | - The adis device. |
clk_freq | - New external clock frequency in Hz. |
void adis_update_temp_flags | ( | struct adis_dev * | adis, |
uint16_t | temp_reg | ||
) |
Update device temperature flags according to the received parameter.
adis | - The adis device. |
temp_reg | - Temperature flags register value. |
bool adis_validate_checksum | ( | uint8_t * | buffer, |
uint8_t | size, | ||
uint8_t | idx | ||
) |
Check if the checksum for burst data is correct.
buffer | - The received burst data buffer. |
size | - The size of the buffer. |
idx | - The start index in the buffer to check the checksum. |
int adis_write_accl_fir_enable | ( | struct adis_dev * | adis, |
uint32_t | accl_fir_enable | ||
) |
Write accelerometer FIR filter control bit value.
adis | - The adis device. |
accl_fir_enable | - The accelerometer FIR filter control bit value to write. |
int adis_write_alarm_enable | ( | struct adis_dev * | adis, |
uint32_t | alarm_enable | ||
) |
Write alarm enable encoded value.
adis | - The adis device. |
alarm_enable | - The alarm enable encoded value to write. |
int adis_write_alarm_polarity | ( | struct adis_dev * | adis, |
uint32_t | alarm_polarity | ||
) |
Write alarm polarity encoded value.
adis | - The adis device. |
alarm_polarity | - The alarm polarity encoded value to write. |
int adis_write_alarm_selection | ( | struct adis_dev * | adis, |
uint32_t | alarm_selection | ||
) |
Write alarm selection encoded value.
adis | - The adis device. |
alarm_selection | - The alarm selection encoded value to write. 0: DIO1 1: DIO2 2: DIO3 3: DIO4 |
int adis_write_bias_corr_en_xa | ( | struct adis_dev * | adis, |
uint32_t | bias_corr_en_xa | ||
) |
Write x axis accelerometer bias correction enable bit value.
adis | - The adis device. |
bias_corr_en_xa | - The x axis accelerometer bias correction enable bit value to write. |
int adis_write_bias_corr_en_xg | ( | struct adis_dev * | adis, |
uint32_t | bias_corr_en_xg | ||
) |
Write x axis gyroscope bias correction enable bit value.
adis | - The adis device. |
bias_corr_en_xg | - The x axis gyroscope bias correction enable bit value to write. |
int adis_write_bias_corr_en_ya | ( | struct adis_dev * | adis, |
uint32_t | bias_corr_en_ya | ||
) |
Write y axis accelerometer bias correction enable bit value.
adis | - The adis device. |
bias_corr_en_ya | - The y axis accelerometer bias correction enable bit value to write. |
int adis_write_bias_corr_en_yg | ( | struct adis_dev * | adis, |
uint32_t | bias_corr_en_yg | ||
) |
Write y axis gyroscope bias correction enable bit value.
adis | - The adis device. |
bias_corr_en_yg | - The y axis gyroscope bias correction enable bit value to write. |
int adis_write_bias_corr_en_za | ( | struct adis_dev * | adis, |
uint32_t | bias_corr_en_za | ||
) |
Write z axis accelerometer bias correction enable bit value.
adis | - The adis device. |
bias_corr_en_za | - The z axis accelerometer bias correction enable bit value to write. |
int adis_write_bias_corr_en_zg | ( | struct adis_dev * | adis, |
uint32_t | bias_corr_en_zg | ||
) |
Write z axis gyroscope bias correction enable bit value.
adis | - The adis device. |
bias_corr_en_zg | - The z axis gyroscope bias correction enable bit value to write. |
int adis_write_bias_corr_tbc | ( | struct adis_dev * | adis, |
uint32_t | bias_corr_tbc | ||
) |
Write time base control value.
adis | - The adis device. |
bias_corr_tbc | - The time base control value to write. |
int adis_write_burst32 | ( | struct adis_dev * | adis, |
uint32_t | burst32 | ||
) |
Write burst32 enable bit value.
adis | - The adis device. |
burst32 | - The burst32 enable bit value to write. |
int adis_write_burst_sel | ( | struct adis_dev * | adis, |
uint32_t | burst_sel | ||
) |
Write burst selection encoded value.
adis | - The adis device. |
burst_sel | - The burst selection encoded value to write. |
int adis_write_dec_rate | ( | struct adis_dev * | adis, |
uint32_t | dec_rate | ||
) |
Write decimation rate value.
adis | - The adis device. |
dec_rate | - The decimation rate value to write. |
int adis_write_dr_enable | ( | struct adis_dev * | adis, |
uint32_t | dr_enable | ||
) |
Write data ready enable encoded value.
adis | - The adis device. |
dr_enable | - The data ready enable encoded value to write. |
int adis_write_dr_polarity | ( | struct adis_dev * | adis, |
uint32_t | dr_polarity | ||
) |
Write data ready polarity encoded value.
adis | - The adis device. |
dr_polarity | - The data ready polarity encoded value to write. |
int adis_write_dr_selection | ( | struct adis_dev * | adis, |
uint32_t | dr_selection | ||
) |
Write data ready selection encoded value.
adis | - The adis device. |
dr_selection | - The data ready selection encoded value to write. 0: DIO1 1: DIO2 2: DIO3 3: DIO4 |
int adis_write_field_u32 | ( | struct adis_dev * | adis, |
struct adis_field | field, | ||
uint32_t | field_val | ||
) |
Write field from uint32 value.
adis | - The adis device. |
field | - The field structure to be written. |
field_val | - The field value to be written. |
int adis_write_fifo_en | ( | struct adis_dev * | adis, |
uint32_t | fifo_en | ||
) |
Write FIFO enable bit value.
adis | - The adis device. |
fifo_en | - The FIFO enable bit value to write. |
int adis_write_fifo_overflow | ( | struct adis_dev * | adis, |
uint32_t | fifo_overflow | ||
) |
Write FIFO overflow bit value.
adis | - The adis device. |
fifo_overflow | - The FIFO overflow bit value to write. |
int adis_write_fifo_wm_int_en | ( | struct adis_dev * | adis, |
uint32_t | fifo_wm_int_en | ||
) |
Write FIFO watermark interrupt enable bit value.
adis | - The adis device. |
fifo_wm_int_en | - The FIFO watermark interrupt enable bit value to write. |
int adis_write_fifo_wm_int_pol | ( | struct adis_dev * | adis, |
uint32_t | fifo_wm_int_pol | ||
) |
Write FIFO watermark interrupt polarity bit value.
adis | - The adis device. |
fifo_wm_int_pol | - The FIFO watermark interrupt polarity bit value to write. |
int adis_write_fifo_wm_lvl | ( | struct adis_dev * | adis, |
uint32_t | fifo_wm_lvl | ||
) |
Write FIFO watermark threshold level value.
adis | - The adis device. |
fifo_wm_lvl | - The FIFO watermark threshold level value to write. |
int adis_write_filt_size_var_b | ( | struct adis_dev * | adis, |
uint32_t | filt_size_var_b | ||
) |
Write filter size variable B value.
adis | - The adis device. |
filt_size_var_b | - The filter size variable B value to write. |
int adis_write_fir_bank_sel_xa | ( | struct adis_dev * | adis, |
uint32_t | fir_bank_sel_xa | ||
) |
Write x axis accelerometer filter bank selection encoded value.
adis | - The adis device. |
fir_bank_sel_xa | - The x axis accelerometer filter bank selection encoded value to write. 0: Bank A 1: Bank B 2: Bank C 3: Bank D |
int adis_write_fir_bank_sel_xg | ( | struct adis_dev * | adis, |
uint32_t | fir_bank_sel_xg | ||
) |
Write x axis gyroscope filter bank selection encoded value.
adis | - The adis device. |
fir_bank_sel_xg | - The x axis gyroscope filter bank selection encoded value to write. 0: Bank A 1: Bank B 2: Bank C 3: Bank D |
int adis_write_fir_bank_sel_ya | ( | struct adis_dev * | adis, |
uint32_t | fir_bank_sel_ya | ||
) |
Write y axis accelerometer filter bank selection encoded value.
adis | - The adis device. |
fir_bank_sel_ya | - The y axis accelerometer filter bank selection encoded value to write. 0: Bank A 1: Bank B 2: Bank C 3: Bank D |
int adis_write_fir_bank_sel_yg | ( | struct adis_dev * | adis, |
uint32_t | fir_bank_sel_yg | ||
) |
Write y axis gyroscope filter bank selection encoded value.
adis | - The adis device. |
fir_bank_sel_yg | - The y axis gyroscope filter bank selection encoded value to write. 0: Bank A 1: Bank B 2: Bank C 3: Bank D |
int adis_write_fir_bank_sel_za | ( | struct adis_dev * | adis, |
uint32_t | fir_bank_sel_za | ||
) |
Write z axis accelerometer filter bank selection encoded value.
adis | - The adis device. |
fir_bank_sel_za | - The z axis accelerometer filter bank selection encoded value to write. 0: Bank A 1: Bank B 2: Bank C 3: Bank D |
int adis_write_fir_bank_sel_zg | ( | struct adis_dev * | adis, |
uint32_t | fir_bank_sel_zg | ||
) |
Write z axis gyroscope filter bank selection encoded value.
adis | - The adis device. |
fir_bank_sel_zg | - The z axis gyroscope filter bank selection encoded value to write. 0: Bank A 1: Bank B 2: Bank C 3: Bank D |
int adis_write_fir_coef | ( | struct adis_dev * | adis, |
uint8_t | coef_idx, | ||
uint32_t | coef | ||
) |
Write FIR Filter Coefficient C_coef_idx value.
adis | - The adis device. |
coef_idx | - The coefficient id. |
coef | - The coefficient value. |
int adis_write_fir_coef_bank_a | ( | struct adis_dev * | adis, |
uint8_t | coef_idx, | ||
uint32_t | coef | ||
) |
Write FIR Filter Coefficient Bank A idx value.
adis | - The adis device. |
coef_idx | - The coefficient id. |
coef | - The coefficient value. |
int adis_write_fir_coef_bank_b | ( | struct adis_dev * | adis, |
uint8_t | coef_idx, | ||
uint32_t | coef | ||
) |
Write FIR Filter Coefficient Bank B idx value.
adis | - The adis device. |
coef_idx | - The coefficient id. |
coef | - The coefficient value. |
int adis_write_fir_coef_bank_c | ( | struct adis_dev * | adis, |
uint8_t | coef_idx, | ||
uint32_t | coef | ||
) |
Write FIR Filter Coefficient Bank C idx value.
adis | - The adis device. |
coef_idx | - The coefficient id. |
coef | - The coefficient value. |
int adis_write_fir_coef_bank_d | ( | struct adis_dev * | adis, |
uint8_t | coef_idx, | ||
uint32_t | coef | ||
) |
Write FIR Filter Coefficient Bank D idx value.
adis | - The adis device. |
coef_idx | - The coefficient id. |
coef | - The coefficient value. |
int adis_write_fir_en_xa | ( | struct adis_dev * | adis, |
uint32_t | fir_en_xa | ||
) |
Write x axis accelerometer filter enable bit value.
adis | - The adis device. |
fir_en_xa | - The x axis accelerometer filter enable bit value to write. |
int adis_write_fir_en_xg | ( | struct adis_dev * | adis, |
uint32_t | fir_en_xg | ||
) |
Write x axis gyroscope filter enable bit value.
adis | - The adis device. |
fir_en_xg | - The x axis gyroscope filter enable bit value to write. |
int adis_write_fir_en_ya | ( | struct adis_dev * | adis, |
uint32_t | fir_en_ya | ||
) |
Write y axis accelerometer filter enable bit value.
adis | - The adis device. |
fir_en_ya | - The y axis accelerometer filter enable bit value to write. |
int adis_write_fir_en_yg | ( | struct adis_dev * | adis, |
uint32_t | fir_en_yg | ||
) |
Write y axis gyroscope filter enable bit value.
adis | - The adis device. |
fir_en_yg | - The y axis gyroscope filter enable bit value to write. |
int adis_write_fir_en_za | ( | struct adis_dev * | adis, |
uint32_t | fir_en_za | ||
) |
Write z axis accelerometer filter enable bit value.
adis | - The adis device. |
fir_en_za | - The z axis accelerometer filter enable bit value to write. |
int adis_write_fir_en_zg | ( | struct adis_dev * | adis, |
uint32_t | fir_en_zg | ||
) |
Write z axis gyroscope filter enable bit value.
adis | - The adis device. |
fir_en_zg | - The z axis gyroscope filter enable bit value to write. |
int adis_write_gpio_dir | ( | struct adis_dev * | adis, |
uint8_t | dio_nb, | ||
uint32_t | dir | ||
) |
Write gpio direction configuration.
adis | - The adis device. |
dio_nb | - The DIO selection encoded value. 0: DIO1 1: DIO2 2: DIO3 3: DIO4 |
dir | - DIO direction (0 - input, 1 - output) |
int adis_write_gpio_lvl | ( | struct adis_dev * | adis, |
uint8_t | dio_nb, | ||
uint32_t | level | ||
) |
Write gpio level configuration.
adis | - The adis device. |
dio_nb | - The DIO selection encoded value. 0: DIO1 1: DIO2 2: DIO3 3: DIO4 |
level | - DIO data level (0 - low, 1 - high). |
int adis_write_gyro_fir_enable | ( | struct adis_dev * | adis, |
uint32_t | gyro_fir_enable | ||
) |
Write gyroscope FIR filter control bit value.
adis | - The adis device. |
gyro_fir_enable | - The gyroscope FIR filter control bit value to write. |
int adis_write_linear_accl_comp | ( | struct adis_dev * | adis, |
uint32_t | linear_accl_comp | ||
) |
Write linear acceleration compensation enable bit value.
adis | - The adis device. |
linear_accl_comp | - The linear acceleration compensation enable bit value to write. |
int adis_write_lpf | ( | struct adis_dev * | adis, |
enum adis_chan_type | chan, | ||
enum adis_axis_type | axis, | ||
uint32_t | freq | ||
) |
Configure filter for the given filter frequency.
adis | - The adis device. |
chan | - The adis channel. |
axis | - Tha adis channel axis. |
freq | - The filter frequency, in Hz. |
int adis_write_pt_of_perc_algnmt | ( | struct adis_dev * | adis, |
uint32_t | pt_of_perc_algnmt | ||
) |
Write point of percussion alignment enable bit value.
adis | - The adis device. |
pt_of_perc_algnmt | - The point of percussion alignment enable bit value to write. |
int adis_write_reg | ( | struct adis_dev * | adis, |
uint32_t | reg, | ||
uint32_t | val, | ||
uint32_t | size | ||
) |
Write N bytes to register.
adis | - The adis device. |
reg | - The address of the lower of the two registers. |
val | - The value to write to device (up to 4 bytes). |
size | - The size of the val buffer. |
int adis_write_sens_bw | ( | struct adis_dev * | adis, |
uint32_t | sens_bw | ||
) |
Write internal sensor bandwidth encoded value.
adis | - The adis device. |
sens_bw | - The internal sensor bandwidth encoded value to write. |
int adis_write_sync_4khz | ( | struct adis_dev * | adis, |
uint32_t | sync_4khz | ||
) |
Write 4khz internal sync enable bit value.
adis | - The adis device. |
sync_4khz | - The 4khz internal sync enable bit value (1/0 - enabled/disabled). |
int adis_write_sync_mode | ( | struct adis_dev * | adis, |
uint32_t | sync_mode, | ||
uint32_t | ext_clk | ||
) |
Update synchronization mode.
adis | - The adis device. |
sync_mode | - The synchronization mode encoded value to update. |
ext_clk | - The external clock frequency to update, will be ignored if sync_mode is different from ADIS_SYNC_SCALED and ADIS_SYNC_DIRECT. |
int adis_write_sync_polarity | ( | struct adis_dev * | adis, |
uint32_t | sync_polarity | ||
) |
Write sync polarity encoded value.
adis | - The adis device. |
sync_polarity | - The sync polarity encoded value to write. |
int adis_write_sync_selection | ( | struct adis_dev * | adis, |
uint32_t | sync_selection | ||
) |
Write sync selection encoded value.
adis | - The adis device. |
sync_selection | - The sync selection encoded value to write. 0: DIO1 1: DIO2 2: DIO3 3: DIO4 |
int adis_write_timestamp32 | ( | struct adis_dev * | adis, |
uint32_t | timestamp32 | ||
) |
Write timestamp32 enable bit value.
adis | - The adis device. |
timestamp32 | - The timestamp32 enable bit value to write. |
int adis_write_up_scale | ( | struct adis_dev * | adis, |
uint32_t | up_scale | ||
) |
Write external clock scale factor value.
adis | - The adis device. |
up_scale | - The external clock scale factor value to write. |
int adis_write_usr_scr_1 | ( | struct adis_dev * | adis, |
uint32_t | usr_scr_1 | ||
) |
Write user scratch register 1 value.
adis | - The adis device. |
usr_scr_1 | - The user scratch register 1 value to write. |
int adis_write_usr_scr_2 | ( | struct adis_dev * | adis, |
uint32_t | usr_scr_2 | ||
) |
Write user scratch register 2 value.
adis | - The adis device. |
usr_scr_2 | - The user scratch register 2 value to write. |
int adis_write_usr_scr_3 | ( | struct adis_dev * | adis, |
uint32_t | usr_scr_3 | ||
) |
Write user scratch register 3 value.
adis | - The adis device. |
usr_scr_3 | - The user scratch register 3 value to write. |
int adis_write_usr_scr_4 | ( | struct adis_dev * | adis, |
uint32_t | usr_scr_4 | ||
) |
Write user scratch register 4 value.
adis | - The adis device. |
usr_scr_4 | - The user scratch register 4 value to write. |
int adis_write_xa_bias | ( | struct adis_dev * | adis, |
int32_t | xa_bias | ||
) |
Write raw acceleration offset correction on x axis.
adis | - The adis device. |
xa_bias | - The raw value to write. |
int adis_write_xa_scale | ( | struct adis_dev * | adis, |
int32_t | xa_scale | ||
) |
Write raw acceleration scale adjustment on x axis.
adis | - The adis device. |
xa_scale | - The raw value to write. |
int adis_write_xg_bias | ( | struct adis_dev * | adis, |
int32_t | xg_bias | ||
) |
Write raw gyroscope offset correction on x axis.
adis | - The adis device. |
xg_bias | - The raw value to write. |
int adis_write_xg_scale | ( | struct adis_dev * | adis, |
int32_t | xg_scale | ||
) |
Write raw gyroscope scale adjustment on x axis.
adis | - The adis device. |
xg_scale | - The raw value to write. |
int adis_write_ya_bias | ( | struct adis_dev * | adis, |
int32_t | ya_bias | ||
) |
Write raw acceleration offset correction on y axis.
adis | - The adis device. |
ya_bias | - The raw value to write. |
int adis_write_ya_scale | ( | struct adis_dev * | adis, |
int32_t | ya_scale | ||
) |
Write raw acceleration scale adjustment on y axis.
adis | - The adis device. |
ya_scale | - The raw value to write. |
int adis_write_yg_bias | ( | struct adis_dev * | adis, |
int32_t | yg_bias | ||
) |
Write raw gyroscope offset correction on y axis.
adis | - The adis device. |
yg_bias | - The raw value to write. |
int adis_write_yg_scale | ( | struct adis_dev * | adis, |
int32_t | yg_scale | ||
) |
Write raw gyroscope scale adjustment on y axis.
adis | - The adis device. |
yg_scale | - The raw value to write. |
int adis_write_za_bias | ( | struct adis_dev * | adis, |
int32_t | za_bias | ||
) |
Write raw acceleration offset correction on z axis.
adis | - The adis device. |
za_bias | - The raw value to write. |
int adis_write_za_scale | ( | struct adis_dev * | adis, |
int32_t | za_scale | ||
) |
Write raw acceleration scale adjustment on z axis.
adis | - The adis device. |
za_scale | - The raw value to write. |
int adis_write_zg_bias | ( | struct adis_dev * | adis, |
int32_t | zg_bias | ||
) |
Write raw gyroscope offset correction on z axis.
adis | - The adis device. |
zg_bias | - The raw value to write. |
int adis_write_zg_scale | ( | struct adis_dev * | adis, |
int32_t | zg_scale | ||
) |
Write raw gyroscope scale adjustment on z axis.
adis | - The adis device. |
zg_scale | - The raw value to write. |