Go to the documentation of this file.
45 #define AD9508_SPI_CONFIG 0x000
46 #define AD9508_PART_ID_LOW 0x00C
47 #define AD9508_PART_ID_HIGH 0x00D
48 #define AD9508_OUT1_DIV_RATIO_LOW 0x01B
49 #define AD9508_OUT1_DIV_RATIO_HIGH 0x01C
50 #define AD9508_OUT1_PHASE_LOW 0x01D
51 #define AD9508_OUT1_PHASE_HIGH 0x01E
52 #define AD9508_PART_ID_VALUE 0x005
53 #define AD9508_DIVIDE_RATIO_ONE 0x000
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.
Header file of Delay functions.
int32_t ad9508_reg_write(struct ad9508_dev *dev, uint16_t reg_addr, uint8_t reg_data)
Write to the ad9508 that is conected to the SPI.
Definition: ad9508.c:84
#define AD9508_PART_ID_HIGH
Definition: ad9508.h:47
int32_t ad9508_reg_read(struct ad9508_dev *dev, uint16_t reg_addr, uint8_t *reg_data)
Reads from the ad9508 that is contected to the SPI.
Definition: ad9508.c:52
Definition: ad9361_util.h:69
int32_t ad9508_setup(struct ad9508_dev **device, const struct ad9508_init_param *init_param)
Setup the working parameters of the ad9508 chip.
Definition: ad9508.c:109
int32_t ad9508_remove(struct ad9508_dev *dev)
Free the resources allocated by ad9508_setup().
Definition: ad9508.c:182
#define AD9508_SPI_CONFIG
Definition: ad9508.h:45
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:126
int32_t ad9508_reg_write(struct ad9508_dev *dev, uint16_t reg_addr, uint8_t reg_data)
Write to the ad9508 that is conected to the SPI.
Definition: ad9508.c:84
#define AD9508_OUT1_PHASE_LOW
Definition: ad9508.h:50
int32_t ad9508_setup(struct ad9508_dev **device, const struct ad9508_init_param *init_param)
Setup the working parameters of the ad9508 chip.
Definition: ad9508.c:109
#define AD9508_OUT1_DIV_RATIO_HIGH
Definition: ad9508.h:49
struct no_os_spi_desc * spi_desc
Definition: ad9508.h:66
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
#define AD9508_PART_ID_VALUE
Definition: ad9508.h:52
int32_t ad9508_reg_read(struct ad9508_dev *dev, uint16_t reg_addr, uint8_t *reg_data)
Reads from the ad9508 that is contected to the SPI.
Definition: ad9508.c:52
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:43
int32_t ad9508_remove(struct ad9508_dev *dev)
Free the resources allocated by ad9508_setup().
Definition: ad9508.c:182
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
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
Header file of AD9508 Driver.
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
#define AD9508_OUT1_PHASE_HIGH
Definition: ad9508.h:51
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
struct no_os_spi_init_param spi_init
Definition: ad9508.h:61
#define AD9508_PART_ID_LOW
Definition: ad9508.h:46
#define AD9508_OUT1_DIV_RATIO_LOW
Definition: ad9508.h:48
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140
#define AD9508_DIVIDE_RATIO_ONE
Definition: ad9508.h:53