no-OS
Loading...
Searching...
No Matches
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.
 

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.

SPDX-License-Identifier: BSD-3-Clause

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,
}
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:234
#define ADIS_SYNC_OUTPUT
Definition adis.h:34
#define ADIS_HAS_BURST_DELTA_DATA
Definition adis_internals.h:16
#define ADIS_HAS_FIFO
Definition adis_internals.h:17
#define ADIS_HAS_BURST32
Definition adis_internals.h:15