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: aducm3029_adc.h:55
const struct no_os_pwm_platform_ops aducm3029_pwm_ops
ADUCM3029 platform specific PWM platform ops structure.
Definition: aducm3029_pwm.c:308
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:85
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:121
Structure containing the init parameters needed by the PWM generator.
Definition: no_os_pwm.h:72
Struct describing the scan type.
Definition: iio_types.h:173
Adc descriptor.
Definition: aducm3029_adc.c:54
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:85
Structure holding channel attributess.
Definition: iio_types.h:108
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:227
#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)
Set the PWM polarity.
Definition: no_os_pwm.c:249
Definition: ad9361_util.h:75
int32_t number
Definition: no_os_gpio.h:89
uint32_t id
Definition: no_os_pwm.h:74
#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:61
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:130
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:139
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:157
int32_t no_os_pwm_enable(struct no_os_pwm_desc *desc)
Enable PWM signal generation.
Definition: no_os_pwm.c:104
int32_t aducm3029_adc_update_active_channels(struct adc_desc *desc, uint32_t mask)
Activate adc channels.
Definition: aducm3029_adc.c:69
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:121
Structure holding pointers to show and store functions.
Definition: iio_types.h:134
int32_t aducm3029_adc_init(struct adc_desc **desc, struct adc_init_param *param)
Allocate adc_desc and initialize adc.
Definition: aducm3029_adc.c:127
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:110
int32_t aducm3029_adc_remove(struct adc_desc *desc)
Dealocate resources allocated by aducm3029_adc_init.
Definition: aducm3029_adc.c:192
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:269
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:102
@ NO_OS_PWM_POLARITY_HIGH
Definition: no_os_pwm.h:63
#define ADUCM3029_ADC_NUM_CH
Definition: aducm3029_adc.h:46
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:175
Structure representing an PWM generator device.
Definition: no_os_pwm.h:99
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:57
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 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:178
Header file of PWM Interface.
struct scan_type adc_scan_type
Definition: iio_adc_demo.c:233
struct iio_attribute * attributes
Definition: iio_types.h:191
Header file for iio_types.
uint16_t num_ch
Definition: iio_types.h:257
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:203
int16_t ch_num
Definition: iio_types.h:110
Structure holding channels and attributes of a device.
Definition: iio_types.h:252
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:193
Header file of GPIO Interface.
Definition: iio_types.h:156
Structure holding timer descriptor.
Definition: no_os_timer.h:63
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:89
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:153
uint8_t realbits
Definition: iio_types.h:160