no-OS
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ad9508.h
Go to the documentation of this file.
1/***************************************************************************/
33#ifndef AD9508_H_
34#define AD9508_H_
35
36#include "no_os_spi.h"
37
38#define AD9508_SPI_CONFIG 0x000
39#define AD9508_PART_ID_LOW 0x00C
40#define AD9508_PART_ID_HIGH 0x00D
41#define AD9508_OUT1_DIV_RATIO_LOW 0x01B
42#define AD9508_OUT1_DIV_RATIO_HIGH 0x01C
43#define AD9508_OUT1_PHASE_LOW 0x01D
44#define AD9508_OUT1_PHASE_HIGH 0x01E
45#define AD9508_PART_ID_VALUE 0x005
46#define AD9508_DIVIDE_RATIO_ONE 0x000
47
49 /* SPI */
51};
52
53struct ad9508_dev {
54 /* SPI */
56};
57
58int32_t ad9508_reg_read(struct ad9508_dev *dev, uint16_t reg_addr,
59 uint8_t *reg_data);
60
61int32_t ad9508_reg_write(struct ad9508_dev *dev, uint16_t reg_addr,
62 uint8_t reg_data);
63
64int32_t ad9508_setup(struct ad9508_dev **device,
65 const struct ad9508_init_param *init_param);
66
67int32_t ad9508_remove(struct ad9508_dev *dev);
68
69#endif
struct ad7616_init_param init_param
Definition ad7616_sdz.c:107
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:49
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:81
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:106
int32_t ad9508_remove(struct ad9508_dev *dev)
Free the resources allocated by ad9508_setup().
Definition ad9508.c:181
Header file of SPI Interface.
Definition ad9508.h:53
struct no_os_spi_desc * spi_desc
Definition ad9508.h:55
Definition ad9508.h:48
struct no_os_spi_init_param spi_init
Definition ad9508.h:50
Definition ad9361_util.h:63
Structure holding SPI descriptor.
Definition no_os_spi.h:180
Structure holding the parameters for SPI initialization.
Definition no_os_spi.h:128