no-OS
adaq7980.h
Go to the documentation of this file.
1 /***************************************************************************/
39 #ifndef ADAQ7980_H_
40 #define ADAQ7980_H_
41 
42 /******************************************************************************/
43 /***************************** Include Files **********************************/
44 /******************************************************************************/
45 #include "spi_engine.h"
46 #include "no_os_pwm.h"
47 #include "no_os_gpio.h"
48 
49 /******************************************************************************/
50 /*************************** Types Declarations *******************************/
51 /******************************************************************************/
57  /* SPI */
59  /* SPI module offload init */
61  /* PWM generator init structure */
65 };
66 
71 struct adaq7980_dev {
72  /* SPI descriptor */
74  /* Trigger conversion PWM generator descriptor */
76  /* SPI module offload init */
80 };
81 
82 /******************************************************************************/
83 /************************ Functions Declarations ******************************/
84 /******************************************************************************/
85 /* Initialize the device. */
86 int32_t adaq7980_setup(struct adaq7980_dev **device,
88 
89 /* Read data from device */
90 int32_t ad7980_read_data(struct adaq7980_dev *dev,
91  uint16_t *buf,
92  uint16_t samples);
93 
94 #endif
adaq7980_dev::spi_desc
no_os_spi_desc * spi_desc
Definition: adaq7980.h:73
no_os_gpio_init_param
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:85
spi_engine_offload_message::no_commands
uint32_t no_commands
Definition: spi_engine.h:167
no_os_pwm_init_param
Structure containing the init parameters needed by the PWM generator.
Definition: no_os_pwm.h:66
adaq7980_setup
int32_t adaq7980_setup(struct adaq7980_dev **device, struct adaq7980_init_param *init_param)
Definition: adaq7980.c:89
adaq7980_init_param
Structure containing the init parameters needed by the adaq7980 device.
Definition: adaq7980.h:56
adaq7980_init_param::gpio_pd_ldo
struct no_os_gpio_init_param * gpio_pd_ldo
Definition: adaq7980.h:64
adaq7980_init_param::offload_init_param
struct spi_engine_offload_init_param * offload_init_param
Definition: adaq7980.h:60
CS_LOW
#define CS_LOW
Definition: spi_engine.h:79
spi_engine_offload_init
int32_t spi_engine_offload_init(struct no_os_spi_desc *desc, const struct spi_engine_offload_init_param *param)
Initialize the SPI engine's offload module.
Definition: spi_engine.c:757
spi_engine_offload_message::commands_data
uint32_t * commands_data
Definition: spi_engine.h:169
no_os_delay.h
Header file of Delay functions.
spi_engine_offload_message
Structure representing an offload message.
Definition: spi_engine.h:160
device
Definition: ad9361_util.h:75
NO_OS_GPIO_HIGH
@ NO_OS_GPIO_HIGH
Definition: no_os_gpio.h:123
adaq7980_setup
int32_t adaq7980_setup(struct adaq7980_dev **device, struct adaq7980_init_param *init_param)
Definition: adaq7980.c:89
NO_OS_ARRAY_SIZE
#define NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:53
adaq7980_init_param::spi_init
no_os_spi_init_param * spi_init
Definition: adaq7980.h:58
WRITE_READ
#define WRITE_READ(no_bytes)
Definition: spi_engine.h:71
NO_OS_GPIO_LOW
@ NO_OS_GPIO_LOW
Definition: no_os_gpio.h:121
no_os_mdelay
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: delay.c:130
CS_HIGH
#define CS_HIGH
Definition: spi_engine.h:78
no_os_error.h
Error codes definition.
no_os_pwm_enable
int32_t no_os_pwm_enable(struct no_os_pwm_desc *desc)
Enable PWM generator device.
Definition: axi_pwm.c:107
ad7980_read_data
int32_t ad7980_read_data(struct adaq7980_dev *dev, uint16_t *buf, uint16_t samples)
Read from device. Enter register mode to read/write registers.
Definition: adaq7980.c:57
ad7616_init_param::offload_init_param
struct spi_engine_offload_init_param * offload_init_param
Definition: ad7616.h:168
adaq7980_dev::gpio_pd_ldo
struct no_os_gpio_desc * gpio_pd_ldo
Definition: adaq7980.h:79
spi_engine.h
adaq7980_init_param::trigger_pwm_init
struct no_os_pwm_init_param * trigger_pwm_init
Definition: adaq7980.h:62
ad7980_read_data
int32_t ad7980_read_data(struct adaq7980_dev *dev, uint16_t *buf, uint16_t samples)
Read from device. Enter register mode to read/write registers.
Definition: adaq7980.c:57
no_os_spi_desc
Structure holding SPI descriptor.
Definition: no_os_spi.h:132
no_os_gpio_desc
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:102
spi_engine_offload_message::commands
uint32_t * commands
Definition: spi_engine.h:165
no_os_pwm_desc
Structure representing an PWM generator device.
Definition: no_os_pwm.h:85
no_os_pwm_init
int32_t no_os_pwm_init(struct no_os_pwm_desc **desc, const struct no_os_pwm_init_param *param)
Initialize the pwm axi generator and the handler associated with it.
Definition: axi_pwm.c:280
adaq7980_dev::offload_init_param
struct spi_engine_offload_init_param * offload_init_param
Definition: adaq7980.h:77
no_os_pwm.h
Header file of PWM Interface.
no_os_gpio_set_value
int32_t no_os_gpio_set_value(struct no_os_gpio_desc *desc, uint8_t value)
Set the value of the specified GPIO.
Definition: no_os_gpio.c:160
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:96
spi_engine_offload_transfer
int32_t spi_engine_offload_transfer(struct no_os_spi_desc *desc, struct spi_engine_offload_message msg, uint32_t no_samples)
Initiate a SPI transfer in offload mode.
Definition: spi_engine.c:803
adaq7980_dev
Structure representing an adaq7980 device.
Definition: adaq7980.h:71
no_os_spi_remove
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:70
spi_engine_offload_init_param
Structure containing the init parameters needed by the offload module.
Definition: spi_engine.h:145
no_os_gpio.h
Header file of GPIO Interface.
adaq7980.h
no_os_spi_init
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:51
spi_engine_offload_message::rx_addr
uint32_t rx_addr
Definition: spi_engine.h:173
no_os_gpio_direction_output
int32_t no_os_gpio_direction_output(struct no_os_gpio_desc *desc, uint8_t value)
Enable the output direction of the specified GPIO.
Definition: no_os_gpio.c:124
adaq7980_dev::trigger_pwm_desc
struct no_os_pwm_desc * trigger_pwm_desc
Definition: adaq7980.h:75
no_os_spi_init_param
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:112
no_os_gpio_get_optional
int32_t no_os_gpio_get_optional(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Get the value of an optional GPIO.
Definition: no_os_gpio.c:75