no-OS
Macros | Functions
ad9081.c File Reference

Implementation of AD9081 Driver. More...

#include <stdlib.h>
#include "no_os_error.h"
#include "adi_cms_api_common.h"
#include "no_os_util.h"
#include "no_os_delay.h"
#include "adi_ad9081_hal.h"
#include "ad9081.h"
#include <inttypes.h>
Include dependency graph for ad9081.c:

Macros

#define __STDC_FORMAT_MACROS
 
#define CHIPID_AD9081   0x9081
 
#define CHIPID_MASK   0xFFFF
 
#define for_each_cddc(bit, mask)
 

Functions

void ad9081_work_func (struct ad9081_phy *phy)
 
int32_t ad9081_reset_pin_ctrl (void *user_data, uint8_t enable)
 
int32_t ad9081_log_write (void *user_data, int32_t log_type, const char *message, va_list argp)
 
int32_t ad9081_parse_jesd_link_init_param (struct ad9081_jesd_link *link, const struct link_init_param *init_param, bool jtx)
 
int32_t ad9081_parse_init_param (struct ad9081_phy *phy, const struct ad9081_init_param *init_param)
 
int32_t ad9081_init (struct ad9081_phy **dev, const struct ad9081_init_param *init_param)
 
int32_t ad9081_remove (struct ad9081_phy *dev)
 

Detailed Description

Implementation of AD9081 Driver.

Author
DBogdan (drago.nosp@m.s.bo.nosp@m.gdan@.nosp@m.anal.nosp@m.og.co.nosp@m.m)

Copyright 2020(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

◆ __STDC_FORMAT_MACROS

#define __STDC_FORMAT_MACROS

◆ CHIPID_AD9081

#define CHIPID_AD9081   0x9081

◆ CHIPID_MASK

#define CHIPID_MASK   0xFFFF

◆ for_each_cddc

#define for_each_cddc (   bit,
  mask 
)
Value:
for ((bit) = 0; (bit) < MAX_NUM_MAIN_DATAPATHS; (bit)++) \
if ((mask) & NO_OS_BIT(bit))

Function Documentation

◆ ad9081_init()

int32_t ad9081_init ( struct ad9081_phy **  dev,
const struct ad9081_init_param init_param 
)

Initialize the device.

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.
Here is the caller graph for this function:

◆ ad9081_log_write()

int32_t ad9081_log_write ( void *  user_data,
int32_t  log_type,
const char *  message,
va_list  argp 
)

◆ ad9081_parse_init_param()

int32_t ad9081_parse_init_param ( struct ad9081_phy phy,
const struct ad9081_init_param init_param 
)
Here is the caller graph for this function:

◆ ad9081_parse_jesd_link_init_param()

int32_t ad9081_parse_jesd_link_init_param ( struct ad9081_jesd_link link,
const struct link_init_param init_param,
bool  jtx 
)
Here is the caller graph for this function:

◆ ad9081_remove()

int32_t ad9081_remove ( struct ad9081_phy dev)

Remove the device - release resources.

Parameters
dev- The device structure.
Returns
0 in case of success, negative error code otherwise.

◆ ad9081_reset_pin_ctrl()

int32_t ad9081_reset_pin_ctrl ( void *  user_data,
uint8_t  enable 
)

◆ ad9081_work_func()

void ad9081_work_func ( struct ad9081_phy phy)
NO_OS_BIT
#define NO_OS_BIT(x)
Definition: no_os_util.h:51
MAX_NUM_MAIN_DATAPATHS
#define MAX_NUM_MAIN_DATAPATHS
Definition: ad9081.h:55