no-OS
|
Implementation of AD9523 Driver. More...
Macros | |
#define | AD_IFE(_pde, _a, _b) ((dev->pdata->_pde) ? _a : _b) |
#define | AD_IF(_pde, _a) AD_IFE(_pde, _a, 0) |
Functions | |
int32_t | ad9523_spi_read (struct ad9523_dev *dev, uint32_t reg_addr, uint32_t *reg_data) |
Reads the value of the selected register. More... | |
int32_t | ad9523_spi_write (struct ad9523_dev *dev, uint32_t reg_addr, uint32_t reg_data) |
Writes a value to the selected register. More... | |
int32_t | ad9523_io_update (struct ad9523_dev *dev) |
Updates the AD9523 configuration. More... | |
int32_t | ad9523_vco_out_map (struct ad9523_dev *dev, uint32_t ch, uint32_t out) |
Sets the clock provider for selected channel. More... | |
int32_t | ad9523_calibrate (struct ad9523_dev *dev) |
Updates the AD9523 configuration. More... | |
int32_t | ad9523_status (struct ad9523_dev *dev) |
Updates the AD9523 configuration. More... | |
int32_t | ad9523_sync (struct ad9523_dev *dev) |
Updates the AD9523 configuration. More... | |
int32_t | ad9523_init (struct ad9523_init_param *init_param) |
Initialize the AD9523 data structure with the default register values. More... | |
int32_t | ad9523_setup (struct ad9523_dev **device, const struct ad9523_init_param *init_param) |
Setup the AD9523 device. More... | |
int32_t | ad9523_remove (struct ad9523_dev *dev) |
Free the resources allocated by ad9523_setup(). More... | |
Implementation of AD9523 Driver.
Copyright 2012-2016(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:
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.
#define AD_IF | ( | _pde, | |
_a | |||
) | AD_IFE(_pde, _a, 0) |
#define AD_IFE | ( | _pde, | |
_a, | |||
_b | |||
) | ((dev->pdata->_pde) ? _a : _b) |
int32_t ad9523_calibrate | ( | struct ad9523_dev * | dev | ) |
Updates the AD9523 configuration.
int32_t ad9523_init | ( | struct ad9523_init_param * | init_param | ) |
Initialize the AD9523 data structure with the default register values.
init_param | - The device initial parameters. |
int32_t ad9523_io_update | ( | struct ad9523_dev * | dev | ) |
Updates the AD9523 configuration.
dev | - The device structure. |
int32_t ad9523_remove | ( | struct ad9523_dev * | dev | ) |
Free the resources allocated by ad9523_setup().
dev | - The device structure. |
int32_t ad9523_setup | ( | struct ad9523_dev ** | device, |
const struct ad9523_init_param * | init_param | ||
) |
Setup the AD9523 device.
device | - The device structure. |
init_param | - The structure holding the device initial parameters. |
int32_t ad9523_spi_read | ( | struct ad9523_dev * | dev, |
uint32_t | reg_addr, | ||
uint32_t * | reg_data | ||
) |
Reads the value of the selected register.
dev | - The device structure. |
reg_addr | - The address of the register to read. |
reg_data | - Pointer to the read value. |
int32_t ad9523_spi_write | ( | struct ad9523_dev * | dev, |
uint32_t | reg_addr, | ||
uint32_t | reg_data | ||
) |
Writes a value to the selected register.
dev | - The device structure. |
reg_addr | - The address of the register to write to. |
reg_data | - The value to write to the register. |
int32_t ad9523_status | ( | struct ad9523_dev * | dev | ) |
Updates the AD9523 configuration.
dev | - The device structure. |
int32_t ad9523_sync | ( | struct ad9523_dev * | dev | ) |
Updates the AD9523 configuration.
dev | - The device structure. |
int32_t ad9523_vco_out_map | ( | struct ad9523_dev * | dev, |
uint32_t | ch, | ||
uint32_t | out | ||
) |
Sets the clock provider for selected channel.
dev | - The device structure. |
ch | - Selected channel. |
out | - Selected clock provider. |