Go to the documentation of this file.
34 #ifndef ADUCM3029_ADC_H
35 #define ADUCM3029_ADC_H
40 #define ADUCM3029_ADC_NUM_CH 6
41 #define ADUCM3029_CH(x) (1 << x)
This can be extended in the future, no utility for the moment.
Definition: aducm3029_adc.h:49
uint32_t ch_mask
Definition: aducm3029_adc.c:54
Adc descriptor.
Definition: aducm3029_adc.c:48
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
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:54
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_update_active_channels(struct adc_desc *desc, uint32_t mask)
Activate adc channels.
Definition: aducm3029_adc.c:63
ADI_ADC_HANDLE dev
Definition: aducm3029_adc.c:52
#define NO_OS_UNUSED_PARAM(x)
Definition: no_os_util.h:117
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 aducm3029_adc_remove(struct adc_desc *desc)
Dealocate resources allocated by aducm3029_adc_init.
Definition: aducm3029_adc.c:186
uint32_t reserved
Definition: aducm3029_adc.h:51
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:69
Interface of aducm3029_adc.c.
#define NULL
Definition: wrapper.h:64
uint8_t dev_mem[ADI_ADC_MEMORY_SIZE]
Definition: aducm3029_adc.c:50
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_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.
unsigned int no_os_hweight32(uint32_t word)
#define ADUCM3029_DEV_ID
Definition: aducm3029_adc.c:42
int32_t aducm3029_adc_update_active_channels(struct adc_desc *desc, uint32_t mask)
Activate adc channels.
Definition: aducm3029_adc.c:63