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

Implementation of adis1654x.c. More...

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

Macros

#define ADIS1654X_CRC32_SEED   0xFFFFFFFF
 

Functions

int adis1654x_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 adis1654x_chip_info
 

Detailed Description

Implementation of adis1654x.c.

Author
RBolboac (ramon.nosp@m.a.gr.nosp@m.adina.nosp@m.riu@.nosp@m.analo.nosp@m.g.co.nosp@m.m)

Copyright 2024(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:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of Analog Devices, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

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.

Macro Definition Documentation

◆ ADIS1654X_CRC32_SEED

#define ADIS1654X_CRC32_SEED   0xFFFFFFFF

Function Documentation

◆ adis1654x_read_burst_data()

int adis1654x_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

◆ adis1654x_chip_info

const struct adis_chip_info adis1654x_chip_info
Initial value:
= {
.cs_change_delay = 5,
.read_delay = 0,
.write_delay = 0,
.timeouts = &adis1654x_timeouts,
.field_map = &adis1654x_def,
.fir_coef_idx_max = 119,
.dec_rate_max = 3999,
.sync_mode_max = ADIS_SYNC_OUTPUT,
.fls_mem_wr_cntr_max = 100000,
.int_clk = 4000,
.sync_clk_freq_limits = adis1654x_sync_clk_freq_limits,
.sampling_clk_limits = adis1654x_sampling_clk_limits,
.has_paging = true,
.get_scale = &adis1654x_get_scale,
.get_offset = &adis1654x_get_offset,
.read_burst_data = &adis1654x_read_burst_data,
.read_sync_mode = &adis1654x_read_sync_mode,
.write_sync_mode = &adis1654x_write_sync_mode,
.read_lpf = &adis1654x_read_lpf,
.write_lpf = &adis1654x_write_lpf,
}
ADIS_HAS_BURST_DELTA_DATA
#define ADIS_HAS_BURST_DELTA_DATA
Definition: adis_internals.h:39
adis1654x_read_burst_data
int adis1654x_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: adis1654x.c:352
ADIS_HAS_BURST32
#define ADIS_HAS_BURST32
Definition: adis_internals.h:38
ADIS_SYNC_OUTPUT
#define ADIS_SYNC_OUTPUT
Definition: adis.h:64