no-OS
Loading...
Searching...
No Matches
ad6676.c File Reference

Implementation of AD6676 Driver. More...

#include <stdlib.h>
#include <stdio.h>
#include "ad6676.h"
#include "no_os_alloc.h"
#include "no_os_error.h"
Include dependency graph for ad6676.c:

Functions

int32_t ad6676_spi_read (struct ad6676_dev *dev, uint16_t reg_addr, uint8_t *reg_data)
 SPI read from device.
 
int32_t ad6676_spi_write (struct ad6676_dev *dev, uint16_t reg_addr, uint8_t reg_data)
 SPI write to device.
 
int32_t ad6676_set_fif (struct ad6676_dev *dev, struct ad6676_init_param *init_param)
 Set the target IF frequency.
 
uint64_t ad6676_get_fif (struct ad6676_dev *dev, struct ad6676_init_param *init_param)
 Get the target IF frequency.
 
int32_t ad6676_shuffle_setup (struct ad6676_dev *dev, struct ad6676_init_param *init_param)
 Setup shuffling rate and threshold for the adaptive shuffler.
 
int32_t ad6676_set_attenuation (struct ad6676_dev *dev, struct ad6676_init_param *init_param)
 Set attenuation in decibels or disable attenuator.
 
int32_t ad6676_setup (struct ad6676_dev **device, struct ad6676_init_param init_param)
 Initialize the device.
 
int32_t ad6676_update (struct ad6676_dev *dev, struct ad6676_init_param *init_param)
 Reconfigure device for other target frequency and bandwidth and recalibrate.
 
int32_t ad6676_test (struct ad6676_dev *dev, uint32_t test_mode)
 Perform an interface test.
 

Detailed Description

Implementation of AD6676 Driver.

Authors
Dragos Bogdan (drago.nosp@m.s.bo.nosp@m.gdan@.nosp@m.anal.nosp@m.og.co.nosp@m.m)
Andrei Grozav (andre.nosp@m.i.gr.nosp@m.ozav@.nosp@m.anal.nosp@m.og.co.nosp@m.m)

Copyright 2015(c) Analog Devices, Inc.

SPDX-License-Identifier: BSD-3-Clause

Function Documentation

◆ ad6676_get_fif()

uint64_t ad6676_get_fif ( struct ad6676_dev * dev,
struct ad6676_init_param * init_param )

Get the target IF frequency.

Parameters
dev- The device structure.
init_param- The structure that contains the device initial parameters.
Returns
0 in case of success, negative error code otherwise.

◆ ad6676_set_attenuation()

int32_t ad6676_set_attenuation ( struct ad6676_dev * dev,
struct ad6676_init_param * init_param )

Set attenuation in decibels or disable attenuator.

Parameters
dev- The device structure.
init_param- The structure that contains the device initial parameters.
Returns
0 in case of success, negative error code otherwise.

◆ ad6676_set_fif()

int32_t ad6676_set_fif ( struct ad6676_dev * dev,
struct ad6676_init_param * init_param )

Set the target IF frequency.

Parameters
dev- The device structure.
init_param- The structure that contains the device initial parameters.
Returns
0 in case of success, negative error code otherwise.

◆ ad6676_setup()

int32_t ad6676_setup ( struct ad6676_dev ** device,
struct ad6676_init_param init_param )

Initialize the device.

Parameters
device- The device structure.
init_param- The structure that contains the device initial parameters.
Returns
0 in case of success, negative error code otherwise.

◆ ad6676_shuffle_setup()

int32_t ad6676_shuffle_setup ( struct ad6676_dev * dev,
struct ad6676_init_param * init_param )

Setup shuffling rate and threshold for the adaptive shuffler.

Parameters
dev- The device structure.
init_param- The structure that contains the device initial parameters.
Returns
0 in case of success, negative error code otherwise.

◆ ad6676_spi_read()

int32_t ad6676_spi_read ( struct ad6676_dev * dev,
uint16_t reg_addr,
uint8_t * reg_data )

SPI read from device.

Parameters
dev- The device structure.
reg_addr- Adress of register to be read.
reg_data- Register data.
Returns
0 in case of success, negative error code otherwise.

◆ ad6676_spi_write()

int32_t ad6676_spi_write ( struct ad6676_dev * dev,
uint16_t reg_addr,
uint8_t reg_data )

SPI write to device.

Parameters
dev- The device structure.
reg_addr- Adress of register to be written.
reg_data- Register data.
Returns
0 in case of success, negative error code otherwise.

◆ ad6676_test()

int32_t ad6676_test ( struct ad6676_dev * dev,
uint32_t test_mode )

Perform an interface test.

Parameters
dev- The device structure.
test_mode- Test mode to perform.
Returns
0 in case of success, negative error code otherwise.

◆ ad6676_update()

int32_t ad6676_update ( struct ad6676_dev * dev,
struct ad6676_init_param * init_param )

Reconfigure device for other target frequency and bandwidth and recalibrate.

Parameters
dev- The device structure.
init_param- The structure that contains the device initial parameters.
Returns
0 in case of success, negative error code otherwise.