no-OS
Macros | Functions
adf7023.c File Reference

Implementation of ADF7023 Driver. More...

#include <stdlib.h>
#include "adf7023_config.h"
#include "adf7023.h"
Include dependency graph for adf7023.c:

Macros

#define ADF7023_CS_ASSERT
 
#define ADF7023_CS_DEASSERT
 

Functions

void adf7023_write_read_byte (struct adf7023_dev *dev, uint8_t write_byte, uint8_t *read_byte)
 Transfers one byte of data. More...
 
int32_t adf7023_init (struct adf7023_dev **device, struct adf7023_init_param init_param)
 Initializes the ADF7023. More...
 
int32_t adf7023_remove (struct adf7023_dev *dev)
 Free the resources allocated by adf7023_init(). More...
 
void adf7023_get_status (struct adf7023_dev *dev, uint8_t *status)
 Reads the status word of the ADF7023. More...
 
void adf7023_set_command (struct adf7023_dev *dev, uint8_t command)
 Initiates a command. More...
 
void adf7023_set_fw_state (struct adf7023_dev *dev, uint8_t fw_state)
 Sets a FW state and waits until the device enters in that state. More...
 
void adf7023_get_ram (struct adf7023_dev *dev, uint32_t address, uint32_t length, uint8_t *data)
 Reads data from the RAM. More...
 
void adf7023_set_ram (struct adf7023_dev *dev, uint32_t address, uint32_t length, uint8_t *data)
 Writes data to RAM. More...
 
void adf7023_receive_packet (struct adf7023_dev *dev, uint8_t *packet, uint8_t *length)
 Receives one packet. More...
 
void adf7023_transmit_packet (struct adf7023_dev *dev, uint8_t *packet, uint8_t length)
 Transmits one packet. More...
 
void adf7023_set_channel_frequency (struct adf7023_dev *dev, uint32_t ch_freq)
 Sets the channel frequency. More...
 
void adf7023_set_data_rate (struct adf7023_dev *dev, uint32_t data_rate)
 Sets the data rate. More...
 
void adf7023_set_frequency_deviation (struct adf7023_dev *dev, uint32_t freq_dev)
 Sets the frequency deviation. More...
 

Detailed Description

Implementation of ADF7023 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

◆ ADF7023_CS_ASSERT

#define ADF7023_CS_ASSERT
Value:

◆ ADF7023_CS_DEASSERT

#define ADF7023_CS_DEASSERT
Value:

Function Documentation

◆ adf7023_get_ram()

void adf7023_get_ram ( struct adf7023_dev dev,
uint32_t  address,
uint32_t  length,
uint8_t *  data 
)

Reads data from the RAM.

Parameters
dev- The device structure.
address- Start address.
length- Number of bytes to write.
data- Read buffer.
Returns
None.
Here is the caller graph for this function:

◆ adf7023_get_status()

void adf7023_get_status ( struct adf7023_dev dev,
uint8_t *  status 
)

Reads the status word of the ADF7023.

Parameters
dev- The device structure.
status- Status word.
Returns
None.
Here is the caller graph for this function:

◆ adf7023_init()

int32_t adf7023_init ( struct adf7023_dev **  device,
struct adf7023_init_param  init_param 
)

Initializes the ADF7023.

Parameters
device- The device structure.
init_param- The structure that contains the device initial parameters.
Returns
ret - Result of the initialization procedure. Example: 0 - if initialization was successful; -1 - if initialization was unsuccessful.

◆ adf7023_receive_packet()

void adf7023_receive_packet ( struct adf7023_dev dev,
uint8_t *  packet,
uint8_t *  length 
)

Receives one packet.

Parameters
dev- The device structure.
packet- Data buffer.
length- Number of received bytes.
Returns
None.

◆ adf7023_remove()

int32_t adf7023_remove ( struct adf7023_dev dev)

Free the resources allocated by adf7023_init().

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

◆ adf7023_set_channel_frequency()

void adf7023_set_channel_frequency ( struct adf7023_dev dev,
uint32_t  ch_freq 
)

Sets the channel frequency.

Parameters
dev- The device structure.
ch_freq- Channel frequency.
Returns
None.

◆ adf7023_set_command()

void adf7023_set_command ( struct adf7023_dev dev,
uint8_t  command 
)

Initiates a command.

Parameters
dev- The device structure.
command- Command.
Returns
None.
Here is the caller graph for this function:

◆ adf7023_set_data_rate()

void adf7023_set_data_rate ( struct adf7023_dev dev,
uint32_t  data_rate 
)

Sets the data rate.

Parameters
dev- The device structure.
data_rate- Data rate.
Returns
None.

◆ adf7023_set_frequency_deviation()

void adf7023_set_frequency_deviation ( struct adf7023_dev dev,
uint32_t  freq_dev 
)

Sets the frequency deviation.

Parameters
dev- The device structure.
freq_dev- Frequency deviation.
Returns
None.

◆ adf7023_set_fw_state()

void adf7023_set_fw_state ( struct adf7023_dev dev,
uint8_t  fw_state 
)

Sets a FW state and waits until the device enters in that state.

Parameters
dev- The device structure.
fw_state- FW state.
Returns
None.
Here is the caller graph for this function:

◆ adf7023_set_ram()

void adf7023_set_ram ( struct adf7023_dev dev,
uint32_t  address,
uint32_t  length,
uint8_t *  data 
)

Writes data to RAM.

Parameters
dev- The device structure.
address- Start address.
length- Number of bytes to write.
data- Write buffer.
Returns
None.
Here is the caller graph for this function:

◆ adf7023_transmit_packet()

void adf7023_transmit_packet ( struct adf7023_dev dev,
uint8_t *  packet,
uint8_t  length 
)

Transmits one packet.

Parameters
dev- The device structure.
packet- Data buffer.
length- Number of bytes to transmit.
Returns
None.

◆ adf7023_write_read_byte()

void adf7023_write_read_byte ( struct adf7023_dev dev,
uint8_t  write_byte,
uint8_t *  read_byte 
)

Transfers one byte of data.

Parameters
dev- The device structure.
write_byte- Write data.
read_byte- Read data.
Returns
None.
Here is the caller graph for this function:
NO_OS_GPIO_HIGH
@ NO_OS_GPIO_HIGH
Definition: no_os_gpio.h:123
NO_OS_GPIO_LOW
@ NO_OS_GPIO_LOW
Definition: no_os_gpio.h:121
no_os_gpio_set_value
int32_t no_os_gpio_set_value(struct no_os_gpio_desc *desc, uint8_t value)
Set the value of the specified GPIO.
Definition: no_os_gpio.c:160