Implementation of ADF7023 Driver. More...
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. | |
int32_t | adf7023_init (struct adf7023_dev **device, struct adf7023_init_param init_param) |
Initializes the ADF7023. | |
int32_t | adf7023_remove (struct adf7023_dev *dev) |
Free the resources allocated by adf7023_init(). | |
void | adf7023_get_status (struct adf7023_dev *dev, uint8_t *status) |
Reads the status word of the ADF7023. | |
void | adf7023_set_command (struct adf7023_dev *dev, uint8_t command) |
Initiates a command. | |
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. | |
void | adf7023_get_ram (struct adf7023_dev *dev, uint32_t address, uint32_t length, uint8_t *data) |
Reads data from the RAM. | |
void | adf7023_set_ram (struct adf7023_dev *dev, uint32_t address, uint32_t length, uint8_t *data) |
Writes data to RAM. | |
void | adf7023_receive_packet (struct adf7023_dev *dev, uint8_t *packet, uint8_t *length) |
Receives one packet. | |
void | adf7023_transmit_packet (struct adf7023_dev *dev, uint8_t *packet, uint8_t length) |
Transmits one packet. | |
void | adf7023_set_channel_frequency (struct adf7023_dev *dev, uint32_t ch_freq) |
Sets the channel frequency. | |
void | adf7023_set_data_rate (struct adf7023_dev *dev, uint32_t data_rate) |
Sets the data rate. | |
void | adf7023_set_frequency_deviation (struct adf7023_dev *dev, uint32_t freq_dev) |
Sets the frequency deviation. | |
Implementation of ADF7023 Driver.
Copyright 2013(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 ADF7023_CS_ASSERT |
#define ADF7023_CS_DEASSERT |
void adf7023_get_ram | ( | struct adf7023_dev * | dev, |
uint32_t | address, | ||
uint32_t | length, | ||
uint8_t * | data ) |
Reads data from the RAM.
dev | - The device structure. |
address | - Start address. |
length | - Number of bytes to write. |
data | - Read buffer. |
void adf7023_get_status | ( | struct adf7023_dev * | dev, |
uint8_t * | status ) |
Reads the status word of the ADF7023.
dev | - The device structure. |
status | - Status word. |
int32_t adf7023_init | ( | struct adf7023_dev ** | device, |
struct adf7023_init_param | init_param ) |
Initializes the ADF7023.
device | - The device structure. |
init_param | - The structure that contains the device initial parameters. |
void adf7023_receive_packet | ( | struct adf7023_dev * | dev, |
uint8_t * | packet, | ||
uint8_t * | length ) |
Receives one packet.
dev | - The device structure. |
packet | - Data buffer. |
length | - Number of received bytes. |
int32_t adf7023_remove | ( | struct adf7023_dev * | dev | ) |
Free the resources allocated by adf7023_init().
dev | - The device structure. |
void adf7023_set_channel_frequency | ( | struct adf7023_dev * | dev, |
uint32_t | ch_freq ) |
Sets the channel frequency.
dev | - The device structure. |
ch_freq | - Channel frequency. |
void adf7023_set_command | ( | struct adf7023_dev * | dev, |
uint8_t | command ) |
Initiates a command.
dev | - The device structure. |
command | - Command. |
void adf7023_set_data_rate | ( | struct adf7023_dev * | dev, |
uint32_t | data_rate ) |
Sets the data rate.
dev | - The device structure. |
data_rate | - Data rate. |
void adf7023_set_frequency_deviation | ( | struct adf7023_dev * | dev, |
uint32_t | freq_dev ) |
Sets the frequency deviation.
dev | - The device structure. |
freq_dev | - Frequency deviation. |
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.
dev | - The device structure. |
fw_state | - FW state. |
void adf7023_set_ram | ( | struct adf7023_dev * | dev, |
uint32_t | address, | ||
uint32_t | length, | ||
uint8_t * | data ) |
Writes data to RAM.
dev | - The device structure. |
address | - Start address. |
length | - Number of bytes to write. |
data | - Write buffer. |
void adf7023_transmit_packet | ( | struct adf7023_dev * | dev, |
uint8_t * | packet, | ||
uint8_t | length ) |
Transmits one packet.
dev | - The device structure. |
packet | - Data buffer. |
length | - Number of bytes to transmit. |
void adf7023_write_read_byte | ( | struct adf7023_dev * | dev, |
uint8_t | write_byte, | ||
uint8_t * | read_byte ) |
Transfers one byte of data.
dev | - The device structure. |
write_byte | - Write data. |
read_byte | - Read data. |