Go to the documentation of this file.
48 #define ADUCM3029_TIMERS_NUMS 3
49 #define ADUCM3029_GPIOS_NUMS 44
51 struct iio_aducm3029_desc {
56 uint32_t current_gpio;
59 extern struct iio_aducm3029_desc g_aducm3029_desc;
60 extern struct iio_device const iio_aducm3029_desc;
62 int get_pwm_attr(
void *
device,
char *buf, uint32_t len,
64 int set_pwm_attr(
void *
device,
char *buf, uint32_t len,
67 int get_global_attr(
void *
device,
char *buf, uint32_t len,
69 int set_global_attr(
void *
device,
char *buf, uint32_t len,
72 int get_gpio_attr(
void *
device,
char *buf, uint32_t len,
74 int set_gpio_attr(
void *
device,
char *buf, uint32_t len,
77 int32_t iio_aducm3029_adc_set_mask(
struct iio_aducm3029_desc *desc,
79 int32_t iio_aducm3029_adc_read(
struct iio_aducm3029_desc *desc, uint16_t *buff,
82 enum iio_pwm_attributes {
89 enum iio_gpio_attributes {
92 GPIO_DIRECTION_OUTPUT,
96 enum global_attributes {
This can be extended in the future, no utility for the moment.
Definition: adc.h:55
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:85
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:109
int32_t aducm3029_adc_init(struct adc_desc **desc, struct adc_init_param *param)
Allocate adc_desc and initialize adc.
Definition: adc.c:126
Structure containing the init parameters needed by the PWM generator.
Definition: no_os_pwm.h:66
Struct describing the scan type.
Definition: iio_types.h:172
Adc descriptor.
Definition: adc.c:53
int32_t no_os_pwm_remove(struct no_os_pwm_desc *desc)
Free the memory allocated by axi_pwmgen_init().
Definition: axi_pwm.c:372
Structure holding channel attributess.
Definition: iio_types.h:96
int32_t no_os_gpio_get_value(struct no_os_gpio_desc *desc, uint8_t *value)
Get the value of the specified GPIO.
Definition: no_os_gpio.c:177
#define NO_OS_IS_ERR_VALUE(x)
Definition: no_os_error.h:56
int32_t no_os_pwm_set_polarity(struct no_os_pwm_desc *desc, enum no_os_pwm_polarity polarity)
Definition: no_os_pwm.c:281
Definition: ad9361_util.h:75
int32_t number
Definition: no_os_gpio.h:89
uint32_t id
Definition: no_os_pwm.h:68
#define NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:53
uint32_t no_os_str_to_uint32(const char *str)
no_os_pwm_polarity
Possible polarities of the PWM signal.
Definition: no_os_pwm.h:55
int32_t no_os_gpio_direction_input(struct no_os_gpio_desc *desc)
Enable the input direction of the specified GPIO.
Definition: no_os_gpio.c:108
int32_t no_os_pwm_set_period(struct no_os_pwm_desc *desc, uint32_t period_ns)
Set period of PWM generator device.
Definition: axi_pwm.c:150
int32_t no_os_pwm_get_period(struct no_os_pwm_desc *desc, uint32_t *period_ns)
Get period of PWM generator device.
Definition: axi_pwm.c:178
int32_t no_os_pwm_enable(struct no_os_pwm_desc *desc)
Enable PWM generator device.
Definition: axi_pwm.c:107
int32_t no_os_pwm_disable(struct no_os_pwm_desc *desc)
Disable PWM generator device.
Definition: axi_pwm.c:128
Structure holding pointers to show and store functions.
Definition: iio_types.h:133
int32_t aducm3029_adc_update_active_channels(struct adc_desc *desc, uint32_t mask)
Activate adc channels.
Definition: adc.c:68
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:95
int32_t no_os_pwm_get_polarity(struct no_os_pwm_desc *desc, enum no_os_pwm_polarity *polarity)
Definition: no_os_pwm.c:293
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:102
@ NO_OS_PWM_POLARITY_HIGH
Definition: no_os_pwm.h:57
int32_t no_os_pwm_set_duty_cycle(struct no_os_pwm_desc *desc, uint32_t duty_cycle_ns)
Set duty cycle of PWM generator device.
Definition: axi_pwm.c:193
Structure representing an PWM generator device.
Definition: no_os_pwm.h:85
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
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:55
int32_t aducm3029_adc_read(struct adc_desc *desc, uint16_t *buff, uint32_t nb_samples)
Read adc data. aducm3029_adc_update_active_channels should be called in order to enable channeles.
Definition: adc.c:88
int32_t no_os_gpio_get_direction(struct no_os_gpio_desc *desc, uint8_t *direction)
Get the direction of the specified GPIO.
Definition: no_os_gpio.c:142
Header file of PWM Interface.
struct scan_type adc_scan_type
Definition: iio_adc_demo.c:228
struct iio_attribute * attributes
Definition: iio_types.h:190
Header file for iio_types.
uint16_t num_ch
Definition: iio_types.h:247
#define NULL
Definition: wrapper.h:64
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
int32_t aducm3029_adc_remove(struct adc_desc *desc)
Dealocate resources allocated by aducm3029_adc_init.
Definition: adc.c:191
int16_t ch_num
Definition: iio_types.h:98
Structure holding channels and attributes of a device.
Definition: iio_types.h:242
iio description of aducm3029 uc
int32_t no_os_pwm_get_duty_cycle(struct no_os_pwm_desc *desc, uint32_t *duty_cycle_ns)
Get duty cycle of PWM generator device.
Definition: axi_pwm.c:224
Header file of GPIO Interface.
Definition: iio_types.h:155
Structure holding timer descriptor.
Definition: no_os_timer.h:57
Header file of utility functions.
#define ADUCM3029_ADC_NUM_CH
Definition: adc.h:46
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
uint8_t realbits
Definition: iio_types.h:159