Go to the documentation of this file.
111 #define AD5446_CTRL_LOAD_UPDATE 0x0
112 #define AD5446_CTRL_ACTIVE_POSEDGE 0x3
115 #define AD5446_LDAC_OUT no_os_gpio_direction_output(dev->gpio_ladc, \
117 #define AD5446_LDAC_LOW no_os_gpio_set_value(dev->gpio_ladc, \
119 #define AD5446_LDAC_HIGH no_os_gpio_set_value(dev->gpio_ladc, \
122 #define AD5446_CLR_OUT no_os_gpio_direction_output(dev->gpio_clrout, \
124 #define AD5446_CLR_LOW no_os_gpio_set_value(dev->gpio_clrout, \
126 #define AD5446_CLR_HIGH no_os_gpio_set_value(dev->gpio_clrout, \
#define LSB_OFFSET
Definition: ad5446.c:49
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
active_clk_t
Definition: ad5446.h:49
#define AD5446_CLR_HIGH
Definition: ad5446.h:126
int32_t no_os_spi_write_and_read(struct no_os_spi_desc *desc, uint8_t *data, uint16_t bytes_number)
Write and read data to/from SPI.
Definition: no_os_spi.c:159
struct no_os_gpio_desc * gpio_ladc
Definition: ad5446.h:94
#define AD5446_LDAC_OUT
Definition: ad5446.h:115
Header file of SPI Interface.
@ ID_AD5541A
Definition: ad5446.h:80
enum active_clk_t data_clock_in
Definition: ad5446.h:63
struct no_os_gpio_init_param gpio_clrout
Definition: ad5446.h:105
@ unipolar_inv
Definition: ad5446.h:70
#define CMD_OFFSET
Definition: ad5446.c:51
#define PKT_LENGTH
Definition: ad5446.c:52
Definition: ad9361_util.h:69
@ unipolar
Definition: ad5446.h:69
@ ID_AD5450
Definition: ad5446.h:85
@ ID_AD5444
Definition: ad5446.h:87
@ ID_AD5600
Definition: ad5446.h:76
#define DATA_MASK(x)
Definition: ad5446.c:44
struct no_os_spi_init_param spi_init
Definition: ad5446.h:102
void ad5446_set_register(struct ad5446_dev *dev, uint8_t command, uint16_t data)
Writes to input register via SPI.
Definition: ad5446.c:202
bool_t
Definition: ad5446.h:55
int32_t ad5446_remove(struct ad5446_dev *dev)
Free the resources allocated by ad5446_init().
Definition: ad5446.c:179
#define AD5446_CLR_OUT
Definition: ad5446.h:122
@ ID_AD5543
Definition: ad5446.h:78
int32_t ad5446_remove(struct ad5446_dev *dev)
Free the resources allocated by ad5446_init().
Definition: ad5446.c:179
uint8_t resolution
Definition: ad5446.h:62
@ ID_AD5453
Definition: ad5446.h:82
@ posedge
Definition: ad5446.h:51
ad5446_type_t
Definition: ad5446.h:75
#define MSB_OFFSET
Definition: ad5446.c:47
int32_t no_os_gpio_remove(struct no_os_gpio_desc *desc)
Free the resources allocated by no_os_gpio_get().
Definition: no_os_gpio.c:104
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
float ad5446_set_voltage(struct ad5446_dev *dev, float voltage, float vref, enum vout_type_t vout_type)
Sets the output voltage.
Definition: ad5446.c:234
@ ID_AD5452
Definition: ad5446.h:83
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
enum bool_t has_ctrl
Definition: ad5446.h:64
#define AD5446_CLR_LOW
Definition: ad5446.h:124
int32_t no_os_gpio_get(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Obtain the GPIO decriptor.
Definition: no_os_gpio.c:49
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:43
@ ID_AD5512A
Definition: ad5446.h:81
Header file of AD5446 Driver. This driver supporting the following devices: AD5553,...
float ad5446_set_voltage(struct ad5446_dev *dev, float voltage, float vref, enum vout_type_t vout_type)
Sets the output voltage.
Definition: ad5446.c:234
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:69
vout_type_t
Definition: ad5446.h:68
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
struct no_os_gpio_desc * gpio_clrout
Definition: ad5446.h:95
@ bipolar
Definition: ad5446.h:71
enum ad5446_type_t act_device
Definition: ad5446.h:97
int32_t no_os_spi_remove(struct no_os_spi_desc *desc)
Free the resources allocated by no_os_spi_init().
Definition: no_os_spi.c:116
@ ID_AD5446
Definition: ad5446.h:86
@ ID_AD5553
Definition: ad5446.h:77
Header file of GPIO Interface.
#define MSB_MASK
Definition: ad5446.c:46
int32_t no_os_spi_init(struct no_os_spi_desc **desc, const struct no_os_spi_init_param *param)
Initialize the SPI communication peripheral.
Definition: no_os_spi.c:52
@ negedge
Definition: ad5446.h:50
struct no_os_gpio_init_param gpio_ladc
Definition: ad5446.h:104
@ ID_AD5451
Definition: ad5446.h:84
struct no_os_spi_desc * spi_desc
Definition: ad5446.h:92
#define AD5446_LDAC_LOW
Definition: ad5446.h:117
int8_t ad5446_init(struct ad5446_dev **device, struct ad5446_init_param init_param)
Initialize SPI and Initial Values for AD5446 Board.
Definition: ad5446.c:133
#define LSB_MASK
Definition: ad5446.c:48
enum ad5446_type_t act_device
Definition: ad5446.h:107
void ad5446_set_register(struct ad5446_dev *dev, uint8_t command, uint16_t data)
Writes to input register via SPI.
Definition: ad5446.c:202
#define CMD_MASK
Definition: ad5446.c:50
int8_t ad5446_init(struct ad5446_dev **device, struct ad5446_init_param init_param)
Initialize SPI and Initial Values for AD5446 Board.
Definition: ad5446.c:133
@ ID_AD5542A
Definition: ad5446.h:79
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140
#define DATA_OFFSET(x)
Definition: ad5446.c:45