Go to the documentation of this file.
46 #define AD7303_INT (0 << 7) // Selects internal reference.
47 #define AD7303_EXT (1 << 7) // Selects external reference.
48 #define AD7303_LDAC (1 << 5) // Load DAC bit.
49 #define AD7303_PDB (1 << 4) // Power-down DAC B.
50 #define AD7303_PDA (1 << 3) // Power-down DAC A.
51 #define AD7303_A (0 << 2) // Address bit to select DAC A.
52 #define AD7303_B (1 << 2) // Address bit to select DAC B.
53 #define AD7303_CR1 (1 << 1) // Control Bit 1.
54 #define AD7303_CR0 (1 << 0) // Control Bit 0.
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
Header file of SPI Interface.
Definition: ad9361_util.h:69
int8_t ad7303_init(struct ad7303_dev **device, struct ad7303_init_param init_param)
Initializes SPI communication.
Definition: ad7303.c:52
int8_t ad7303_init(struct ad7303_dev **device, struct ad7303_init_param init_param)
Initializes SPI communication.
Definition: ad7303.c:52
struct no_os_spi_init_param spi_init
Definition: ad7303.h:67
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
struct no_os_spi_desc * spi_desc
Definition: ad7303.h:62
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:43
int32_t ad7303_remove(struct ad7303_dev *dev)
Free the resources allocated by ad7303_init().
Definition: ad7303.c:76
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
void ad7303_write(struct ad7303_dev *dev, uint8_t control_reg, uint8_t data_reg)
Sends data to AD7303.
Definition: ad7303.c:100
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
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
Header file of AD7303 Driver.
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
void ad7303_write(struct ad7303_dev *dev, uint8_t control_reg, uint8_t data_reg)
Sends data to AD7303.
Definition: ad7303.c:100
int32_t ad7303_remove(struct ad7303_dev *dev)
Free the resources allocated by ad7303_init().
Definition: ad7303.c:76
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140