Interface of aducm3029_adc.c.
More...
#include <stdint.h>
Interface of aducm3029_adc.c.
- Author
- Mihail Chindris (mihai.nosp@m.l.ch.nosp@m.indri.nosp@m.s@an.nosp@m.alog..nosp@m.com)
Copyright 2020(c) Analog Devices, Inc.
SPDX-License-Identifier: BSD-3-Clause
◆ ADUCM3029_ADC_NUM_CH
| #define ADUCM3029_ADC_NUM_CH 6 |
◆ ADUCM3029_CH
| #define ADUCM3029_CH |
( |
| x | ) |
|
◆ aducm3029_adc_init()
Allocate adc_desc and initialize adc.
- Parameters
-
| desc | - Adc descriptor |
| param | - Initialization parameter |
- Returns
- 0 in case of success, negative value otherwise.
◆ aducm3029_adc_read()
| 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.
- Parameters
-
| desc | - Adc descriptor |
| buff | - Buffer where to store data. The available size should be number of activated channels * nb_samples. |
| nb_samples | - Number of samples to read for each channel. |
- Returns
- 0 in case of success, negative value otherwise.
◆ aducm3029_adc_remove()
| int32_t aducm3029_adc_remove |
( |
struct adc_desc * | desc | ) |
|
Dealocate resources allocated by aducm3029_adc_init.
- Parameters
-
- Returns
- 0
◆ aducm3029_adc_update_active_channels()
| int32_t aducm3029_adc_update_active_channels |
( |
struct adc_desc * | desc, |
|
|
uint32_t | mask ) |
Activate adc channels.
- Parameters
-
| desc | - Adc descriptor |
| mask | - Channels to activates. Use ADUCM3029_CH define |
- Returns
- 0 in case of success, negative value otherwise.