no-OS
Classes | Macros | Functions
ad9361_util.h File Reference

AD9361 Header file of Util driver. More...

#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include "ad9361.h"
#include "common.h"
#include "app_config.h"
Include dependency graph for ad9361_util.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  device
 
struct  spi_device
 
struct  axiadc_state
 
struct  axiadc_chip_info
 
struct  axiadc_converter
 

Macros

#define CLK_IGNORE_UNUSED   BIT(3)
 
#define CLK_GET_RATE_NOCACHE   BIT(6)
 
#define dev_err(dev, format, ...)   ({ if (0) printf(format, ## __VA_ARGS__); })
 
#define dev_warn(dev, format, ...)   ({ if (0) printf(format, ## __VA_ARGS__); })
 
#define dev_dbg(dev, format, ...)   ({ if (0) printf(format, ## __VA_ARGS__); })
 
#define printk(format, ...)   ({ if (0) printf(format, ## __VA_ARGS__); })
 

Functions

int32_t clk_prepare_enable (struct clk *clk)
 clk_prepare_enable More...
 
uint32_t clk_get_rate (struct ad9361_rf_phy *phy, struct refclk_scale *clk_priv)
 clk_get_rate More...
 
int32_t clk_set_rate (struct ad9361_rf_phy *phy, struct refclk_scale *clk_priv, uint32_t rate)
 clk_set_rate More...
 
uint32_t int_sqrt (uint32_t x)
 int_sqrt More...
 
int32_t ilog2 (int32_t x)
 ilog2 More...
 
uint32_t find_first_bit (uint32_t word)
 find_first_bit More...
 
void * ERR_PTR (long error)
 ERR_PTR. More...
 
void * zmalloc (size_t size)
 zmalloc More...
 

Detailed Description

AD9361 Header file of Util driver.

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

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

◆ CLK_GET_RATE_NOCACHE

#define CLK_GET_RATE_NOCACHE   BIT(6)

◆ CLK_IGNORE_UNUSED

#define CLK_IGNORE_UNUSED   BIT(3)

◆ dev_dbg

#define dev_dbg (   dev,
  format,
  ... 
)    ({ if (0) printf(format, ## __VA_ARGS__); })

◆ dev_err

#define dev_err (   dev,
  format,
  ... 
)    ({ if (0) printf(format, ## __VA_ARGS__); })

◆ dev_warn

#define dev_warn (   dev,
  format,
  ... 
)    ({ if (0) printf(format, ## __VA_ARGS__); })

◆ printk

#define printk (   format,
  ... 
)    ({ if (0) printf(format, ## __VA_ARGS__); })

Function Documentation

◆ clk_get_rate()

uint32_t clk_get_rate ( struct ad9361_rf_phy phy,
struct refclk_scale clk_priv 
)

clk_get_rate

Here is the caller graph for this function:

◆ clk_prepare_enable()

int32_t clk_prepare_enable ( struct clk clk)

clk_prepare_enable

◆ clk_set_rate()

int32_t clk_set_rate ( struct ad9361_rf_phy phy,
struct refclk_scale clk_priv,
uint32_t  rate 
)

clk_set_rate

◆ ERR_PTR()

void* ERR_PTR ( long  error)

ERR_PTR.

◆ find_first_bit()

uint32_t find_first_bit ( uint32_t  word)

find_first_bit

◆ ilog2()

int32_t ilog2 ( int32_t  x)

ilog2

◆ int_sqrt()

uint32_t int_sqrt ( uint32_t  x)

int_sqrt

◆ zmalloc()

void* zmalloc ( size_t  size)

zmalloc

Here is the caller graph for this function: