no-OS
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
aducm3029_adc.h
Go to the documentation of this file.
1/***************************************************************************/
33
34#ifndef ADUCM3029_ADC_H
35#define ADUCM3029_ADC_H
36
37#include <stdint.h>
38
39
40#define ADUCM3029_ADC_NUM_CH 6
41#define ADUCM3029_CH(x) (1 << x)
42
43struct adc_desc;
44
50 /* To add options in the future */
51 uint32_t reserved;
52};
53
54/* Activate channels for reading */
56 uint32_t mask);
57
58/* Read adc channels */
59int32_t aducm3029_adc_read(struct adc_desc *desc, uint16_t *buff,
60 uint32_t nb_samples);
61
62/* Initialize the ADC */
63int32_t aducm3029_adc_init(struct adc_desc **desc,
64 struct adc_init_param *param);
65
66/* Free the resources allocated by adc_init(). */
67int32_t aducm3029_adc_remove(struct adc_desc *desc);
68
69#endif
int32_t aducm3029_adc_update_active_channels(struct adc_desc *desc, uint32_t mask)
Activate adc channels.
Definition aducm3029_adc.c: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:83
int32_t aducm3029_adc_remove(struct adc_desc *desc)
Dealocate resources allocated by aducm3029_adc_init.
Definition aducm3029_adc.c:186
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
Adc descriptor.
Definition aducm3029_adc.c:48
This can be extended in the future, no utility for the moment.
Definition aducm3029_adc.h:49
uint32_t reserved
Definition aducm3029_adc.h:51