no-OS
Macros | Functions | Variables
adis1657x.c File Reference

Implementation of adis1657x.c. More...

#include "adis.h"
#include "adis_internals.h"
#include "adis1657x.h"
#include "no_os_units.h"
#include <string.h>
Include dependency graph for adis1657x.c:

Macros

#define ADIS1657X_MSG_SIZE_16_BIT_BURST_FIFO   20 /* in bytes */
 
#define ADIS1657X_MSG_SIZE_32_BIT_BURST_FIFO   34 /* in bytes */
 
#define ADIS1657X_READ_BURST_DATA_NO_POP   0x00
 
#define ADIS1657X_CHECKSUM_BUF_IDX_FIFO   2
 

Functions

int adis1657x_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...
 

Variables

const struct adis_chip_info adis1657x_chip_info
 

Detailed Description

Implementation of adis1657x.c.

Author
RBolboac (ramon.nosp@m.a.bo.nosp@m.lboac.nosp@m.a@an.nosp@m.alog..nosp@m.com)

Copyright 2023(c) Analog Devices, Inc.

All rights reserved.

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 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, 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.

Macro Definition Documentation

◆ ADIS1657X_CHECKSUM_BUF_IDX_FIFO

#define ADIS1657X_CHECKSUM_BUF_IDX_FIFO   2

◆ ADIS1657X_MSG_SIZE_16_BIT_BURST_FIFO

#define ADIS1657X_MSG_SIZE_16_BIT_BURST_FIFO   20 /* in bytes */

◆ ADIS1657X_MSG_SIZE_32_BIT_BURST_FIFO

#define ADIS1657X_MSG_SIZE_32_BIT_BURST_FIFO   34 /* in bytes */

◆ ADIS1657X_READ_BURST_DATA_NO_POP

#define ADIS1657X_READ_BURST_DATA_NO_POP   0x00

Function Documentation

◆ adis1657x_read_burst_data()

int adis1657x_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.

Parameters
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.
Returns
0 in case of success, error code otherwise. -EAGAIN in case the request has to be sent again due to data being unavailable at the time of the request.

Variable Documentation

◆ adis1657x_chip_info

const struct adis_chip_info adis1657x_chip_info
Initial value:
= {
.field_map = &adis1657x_def,
.sync_clk_freq_limits = adis1657x_sync_clk_freq_limits,
.sampling_clk_limits = adis1657x_sampling_clk_limits,
.timeouts = &adis1657x_timeouts,
.read_delay = 5,
.write_delay = 0,
.cs_change_delay = 5,
.filt_size_var_b_max = 6,
.dec_rate_max = 1999,
.sync_mode_max = ADIS_SYNC_OUTPUT,
.fls_mem_wr_cntr_max = 100000,
.int_clk = 2000,
.bias_corr_tbc_max = 12,
.get_scale = &adis1657x_get_scale,
.read_burst_data = &adis1657x_read_burst_data,
}
ADIS_HAS_BURST_DELTA_DATA
#define ADIS_HAS_BURST_DELTA_DATA
Definition: adis_internals.h:45
ADIS_HAS_FIFO
#define ADIS_HAS_FIFO
Definition: adis_internals.h:46
ADIS_HAS_BURST32
#define ADIS_HAS_BURST32
Definition: adis_internals.h:44
ADIS_SYNC_OUTPUT
#define ADIS_SYNC_OUTPUT
Definition: adis.h:70
adis1657x_read_burst_data
int adis1657x_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.
Definition: adis1657x.c:275