Go to the documentation of this file.
42 #define ADUCM3029_TIMERS_NUMS 3
43 #define ADUCM3029_GPIOS_NUMS 44
45 struct iio_aducm3029_desc {
50 uint32_t current_gpio;
53 extern struct iio_aducm3029_desc g_aducm3029_desc;
54 extern struct iio_device const iio_aducm3029_desc;
56 int get_pwm_attr(
void *
device,
char *buf, uint32_t len,
58 int set_pwm_attr(
void *
device,
char *buf, uint32_t len,
61 int get_global_attr(
void *
device,
char *buf, uint32_t len,
63 int set_global_attr(
void *
device,
char *buf, uint32_t len,
66 int get_gpio_attr(
void *
device,
char *buf, uint32_t len,
68 int set_gpio_attr(
void *
device,
char *buf, uint32_t len,
71 int32_t iio_aducm3029_adc_set_mask(
struct iio_aducm3029_desc *desc,
73 int32_t iio_aducm3029_adc_read(
struct iio_aducm3029_desc *desc, uint16_t *buff,
76 enum iio_pwm_attributes {
83 enum iio_gpio_attributes {
86 GPIO_DIRECTION_OUTPUT,
90 enum global_attributes {
This can be extended in the future, no utility for the moment.
Definition: aducm3029_adc.h:49
const struct no_os_pwm_platform_ops aducm3029_pwm_ops
ADUCM3029 platform specific PWM platform ops structure.
Definition: aducm3029_pwm.c:302
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:116
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:168
Adc descriptor.
Definition: aducm3029_adc.c:48
int32_t no_os_pwm_remove(struct no_os_pwm_desc *desc)
Free the resources allocated by no_os_pwm_init().
Definition: no_os_pwm.c:79
Structure holding channel attributess.
Definition: iio_types.h:103
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:221
#define NO_OS_IS_ERR_VALUE(x)
Definition: no_os_error.h:50
int32_t no_os_pwm_set_polarity(struct no_os_pwm_desc *desc, enum no_os_pwm_polarity polarity)
Set the PWM polarity.
Definition: no_os_pwm.c:243
Definition: ad9361_util.h:69
int32_t number
Definition: no_os_gpio.h:83
uint32_t id
Definition: no_os_pwm.h:68
#define NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:49
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:124
int32_t no_os_pwm_set_period(struct no_os_pwm_desc *desc, uint32_t period_ns)
Set the PWM period value.
Definition: no_os_pwm.c:133
int32_t no_os_pwm_get_period(struct no_os_pwm_desc *desc, uint32_t *period_ns)
Get the PWM period value.
Definition: no_os_pwm.c:151
int32_t no_os_pwm_enable(struct no_os_pwm_desc *desc)
Enable PWM signal generation.
Definition: no_os_pwm.c:98
int32_t aducm3029_adc_update_active_channels(struct adc_desc *desc, uint32_t mask)
Activate adc channels.
Definition: aducm3029_adc.c:63
Header file for aducm3029 pwm specifics.
int32_t no_os_pwm_disable(struct no_os_pwm_desc *desc)
Disable PWM signal generation.
Definition: no_os_pwm.c:115
Structure holding pointers to show and store functions.
Definition: iio_types.h:129
int32_t aducm3029_adc_init(struct adc_desc **desc, struct adc_init_param *param)
Allocate adc_desc and initialize adc.
Definition: aducm3029_adc.c:121
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:104
int32_t aducm3029_adc_remove(struct adc_desc *desc)
Dealocate resources allocated by aducm3029_adc_init.
Definition: aducm3029_adc.c:186
int32_t no_os_pwm_get_polarity(struct no_os_pwm_desc *desc, enum no_os_pwm_polarity *polarity)
Get the PWM polarity.
Definition: no_os_pwm.c:263
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
@ NO_OS_PWM_POLARITY_HIGH
Definition: no_os_pwm.h:57
#define ADUCM3029_ADC_NUM_CH
Definition: aducm3029_adc.h:40
int32_t no_os_pwm_set_duty_cycle(struct no_os_pwm_desc *desc, uint32_t duty_cycle_ns)
Set the PWM duty cycle.
Definition: no_os_pwm.c:169
Structure representing an PWM generator device.
Definition: no_os_pwm.h:93
int32_t no_os_pwm_init(struct no_os_pwm_desc **desc, const struct no_os_pwm_init_param *param)
Initialize the PWM peripheral.
Definition: no_os_pwm.c:51
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:49
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:172
Header file of PWM Interface.
struct scan_type adc_scan_type
Definition: iio_adc_demo.c:227
struct iio_attribute * attributes
Definition: iio_types.h:186
Header file for iio_types.
uint16_t num_ch
Definition: iio_types.h:252
Interface of aducm3029_adc.c.
#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:197
int16_t ch_num
Definition: iio_types.h:105
Structure holding channels and attributes of a device.
Definition: iio_types.h:247
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 the PWM duty cycle.
Definition: no_os_pwm.c:187
Header file of GPIO Interface.
Definition: iio_types.h:151
Structure holding timer descriptor.
Definition: no_os_timer.h:57
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: aducm3029_adc.c:83
Header file of utility functions.
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:147
uint8_t realbits
Definition: iio_types.h:155