no-OS
iio_adf4382.h
Go to the documentation of this file.
1 /***************************************************************************/
39 #ifndef IIO_ADF4382_H
40 #define IIO_ADF4382_H
41 
42 #include "iio.h"
43 
47 };
48 
51 };
52 
53 int adf4382_iio_init(struct adf4382_iio_dev **iio_dev,
55 
56 int adf4382_iio_remove(struct adf4382_iio_dev *desc);
57 
58 #endif
adf4382_iio_dev::iio_dev
struct iio_device * iio_dev
Definition: iio_adf4382.h:46
no_os_alloc.h
END_ATTRIBUTES_ARRAY
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:122
adf4382_set_en_sync
int adf4382_set_en_sync(struct adf4382_dev *dev, bool en)
Set the sync to enable or disable based on the passed parameter. If the parameter is different then 0...
Definition: adf4382.c:521
IIO_VAL_INT
@ IIO_VAL_INT
Definition: iio_types.h:56
iio_channel
Struct describing the scan type.
Definition: iio_types.h:174
IIO_SHARED_BY_TYPE
@ IIO_SHARED_BY_TYPE
Definition: iio_types.h:126
IIO_SEPARATE
@ IIO_SEPARATE
Definition: iio_types.h:125
adf4382_iio_init
int adf4382_iio_init(struct adf4382_iio_dev **iio_dev, struct adf4382_iio_dev_init_param *init_param)
Initializes the ADF4382 IIO driver.
Definition: iio_adf4382.c:948
adf4382_dev::cp_i
uint8_t cp_i
Definition: adf4382.h:521
adf4382_iio_dev
Definition: iio_adf4382.h:44
iio_ch_info
Structure holding channel attributess.
Definition: iio_types.h:109
adf4382_get_rfout
int adf4382_get_rfout(struct adf4382_dev *dev, uint64_t *val)
Gets the user proposed output frequency.
Definition: adf4382.c:596
adf4382_get_en_sync
int adf4382_get_en_sync(struct adf4382_dev *dev, bool *en)
Gets the value the sync if it is enabled or disable.
Definition: adf4382.c:535
adf4382_set_out_power
int adf4382_set_out_power(struct adf4382_dev *dev, uint8_t ch, int32_t pwr)
Set the output power register value of a channel and reset everything over to maximum supported value...
Definition: adf4382.c:420
IIO_VAL_INT_PLUS_MICRO
@ IIO_VAL_INT_PLUS_MICRO
Definition: iio_types.h:57
adf4382_set_rfout
int adf4382_set_rfout(struct adf4382_dev *dev, uint64_t val)
Set the desired output frequency and reset everything over to maximum supported value of 22GHz (21GHz...
Definition: adf4382.c:558
adf4382_get_bleed_word
int adf4382_get_bleed_word(struct adf4382_dev *dev, int32_t *word)
Gets the value of the set bleed word.
Definition: adf4382.c:390
adf4382_set_en_chan
int adf4382_set_en_chan(struct adf4382_dev *dev, uint8_t ch, bool en)
Set the output channel to enable or disable based on the passed parameter. If the parameter is differ...
Definition: adf4382.c:471
adf4382_remove
int adf4382_remove(struct adf4382_dev *dev)
Free resources allocated for ADF4382.
Definition: adf4382.c:1289
adf4382_get_cp_i
int adf4382_get_cp_i(struct adf4382_dev *dev, int32_t *reg_val)
Gets the charge pump value from the register. The value will be between 0 and 15 on 8 bits....
Definition: adf4382.c:349
IIO_ALTVOLTAGE
@ IIO_ALTVOLTAGE
Definition: iio_types.h:73
iio_channel::ch_type
enum iio_chan_type ch_type
Definition: iio_types.h:178
no_os_calloc
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:60
NO_OS_ARRAY_SIZE
#define NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:55
adf4382_init_param
ADF4382 Initialization Parameters structure.
Definition: adf4382.h:493
adf4382_get_out_power
int adf4382_get_out_power(struct adf4382_dev *dev, uint8_t ch, int32_t *pwr)
Gets the output power register value.
Definition: adf4382.c:444
IIO_SHARED_BY_ALL
@ IIO_SHARED_BY_ALL
Definition: iio_types.h:128
adf4382_get_ref_div
int adf4382_get_ref_div(struct adf4382_dev *dev, int32_t *div)
Gets the value the reference divider.
Definition: adf4382.c:305
adf4382_set_ref_clk
int adf4382_set_ref_clk(struct adf4382_dev *dev, uint64_t val)
Set the desired reference frequency and reset everything over to maximum supported value of 5GHz to t...
Definition: adf4382.c:207
iio.h
Header file of iio.
no_os_error.h
Error codes definition.
adf4382_dev::phase_adj
uint32_t phase_adj
Definition: adf4382.h:524
iio_attribute::name
const char * name
Definition: iio_types.h:137
adf4382_get_phase_pol
int adf4382_get_phase_pol(struct adf4382_dev *dev, bool *polarity)
Gets the polarity of the phase adjust.
Definition: adf4382.c:1144
adf4382_dev
ADF4382 Device Descriptor.
Definition: adf4382.h:512
adf4382_spi_read
int adf4382_spi_read(struct adf4382_dev *dev, uint16_t reg_addr, uint8_t *data)
Reads data from ADF4382 over SPI.
Definition: adf4382.c:104
iio_attribute
Structure holding pointers to show and store functions.
Definition: iio_types.h:135
adf4382_set_bleed_word
int adf4382_set_bleed_word(struct adf4382_dev *dev, int32_t word)
Set the bleed word, which represents the value of the bleed current written to the register space.
Definition: adf4382.c:371
adf4382_iio_dev_init_param::adf4382_dev_init
struct adf4382_init_param * adf4382_dev_init
Definition: iio_adf4382.h:50
adf4382_set_cp_i
int adf4382_set_cp_i(struct adf4382_dev *dev, int32_t reg_val)
Set the charge pump value which will be written to the register. The value will be between 0 and 15 o...
Definition: adf4382.c:328
iio_parse_value
int32_t iio_parse_value(char *buf, enum iio_val fmt, int32_t *val, int32_t *val2)
Definition: iio.c:616
adf4382_get_en_ref_doubler
int adf4382_get_en_ref_doubler(struct adf4382_dev *dev, bool *en)
Gets the value the doubler if it is enabled or disable and stores it it the dev structure.
Definition: adf4382.c:264
adf4382_set_ref_div
int adf4382_set_ref_div(struct adf4382_dev *dev, int32_t div)
Set the reference divider value and reset everything over to maximum supported value of 63 to the max...
Definition: adf4382.c:286
iio_format_value
int iio_format_value(char *buf, uint32_t len, enum iio_val fmt, int32_t size, int32_t *vals)
Definition: iio.c:667
iio_adf4382.h
Implementation of IIO ADF4382 Driver.
iio_channel::attributes
struct iio_attribute * attributes
Definition: iio_types.h:192
adf4382_set_phase_adjust
int adf4382_set_phase_adjust(struct adf4382_dev *dev, uint32_t phase_ps)
Set the phase adjustment in pico-seconds. The phase adjust will enable the Bleed current option as we...
Definition: adf4382.c:1060
no_os_free
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:75
adf4382_get_ref_clk
int adf4382_get_ref_clk(struct adf4382_dev *dev, uint64_t *val)
Gets the user proposed reference frequency.
Definition: adf4382.c:229
adf4382_iio_remove
int adf4382_iio_remove(struct adf4382_iio_dev *desc)
Free the resources allocated by adf4382_iio_init().
Definition: iio_adf4382.c:978
NULL
#define NULL
Definition: wrapper.h:64
adf4382_iio_dev_init_param
Definition: iio_adf4382.h:49
adf4382.h
Implementation of adf4382 Driver.
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:119
iio_ch_info::ch_num
int16_t ch_num
Definition: iio_types.h:111
iio_device
Structure holding channels and attributes of a device.
Definition: iio_types.h:253
adf4382_get_en_chan
int adf4382_get_en_chan(struct adf4382_dev *dev, uint8_t ch, bool *en)
Gets the value the output channel if it is enabled or disable.
Definition: adf4382.c:494
adf4382_spi_write
int adf4382_spi_write(struct adf4382_dev *dev, uint16_t reg_addr, uint8_t data)
Writes data to ADF4382 over SPI.
Definition: adf4382.c:74
adf4382_set_en_ref_doubler
int adf4382_set_en_ref_doubler(struct adf4382_dev *dev, bool en)
Set the reference doubler to enable or disable based on the passed parameter. If the parameter is dif...
Definition: adf4382.c:247
adf4382_set_phase_pol
int adf4382_set_phase_pol(struct adf4382_dev *dev, bool polarity)
Set the phase polarity. If pol = 0 then it will add the phase value otherwise it will subtract the ph...
Definition: adf4382.c:1128
adf4382_init
int adf4382_init(struct adf4382_dev **dev, struct adf4382_init_param *init_param)
Initializes the ADF4382.
Definition: adf4382.c:1187
adf4382_iio_init
int adf4382_iio_init(struct adf4382_iio_dev **iio_dev, struct adf4382_iio_dev_init_param *init_param)
Initializes the ADF4382 IIO driver.
Definition: iio_adf4382.c:948
adf4382_iio_remove
int adf4382_iio_remove(struct adf4382_iio_dev *dev)
Free the resources allocated by adf4382_iio_init().
Definition: iio_adf4382.c:978
adf4382_iio_dev::adf4382_dev
struct adf4382_dev * adf4382_dev
Definition: iio_adf4382.h:45
no_os_util.h
Header file of utility functions.
reg_sequence::reg
uint16_t reg
Definition: adf4371.c:192