HPM APP
HPMicro Application solution
mp_adc.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2023 HPMicro
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 #ifndef MP_ADC_H
9 #define MP_ADC_H
10 
11 #include "mp_common.h"
12 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
31 uint8_t mp_adc_get_mapindex(uint8_t adc_index);
32 
40 void mp_adc_get_default(uint8_t adc_index, hpm_adc_t* adc_t);
41 
52 int mp_adc_init(uint8_t type, void* handle);
53 
64 int mp_adc_trigger_config(uint8_t type, void* handle);
65 
77 int mp_adc_interrupt_enable(uint8_t type, void* handle, bool enable);
78 
91 int mp_hdma_init_config(uint8_t type, void* handle, hpm_mp_hdma_over_callback cb);
92 
99 int mp_hdma_transfer_start(uint32_t size);
100 
108 //MP hdma链式传输配置,双缓冲模式
109 int mp_dma_chained_transfer_config(uint32_t size);
110 
111 #ifdef __cplusplus
112 }
113 #endif
114 
117 #endif //MP_ADC_H
int mp_hdma_transfer_start(uint32_t size)
MP HDMA trigger and start transmission ;MP HDMA触发开始传输
Definition: mp_adc.c:1208
int mp_adc_trigger_config(uint8_t type, void *handle)
MP ADC trigger the preemption sampling configuration ;MP ADC触发抢占采样配置
Definition: mp_adc.c:527
int mp_adc_interrupt_enable(uint8_t type, void *handle, bool enable)
MP ADC enable interrupt ;MP ADC中断使能
Definition: mp_adc.c:920
int mp_adc_init(uint8_t type, void *handle)
MP ADC init ;MP ADC初始化
Definition: mp_adc.c:501
uint8_t mp_adc_get_mapindex(uint8_t adc_index)
Get ADC MAP index ;获取ADC MAP数组序号
Definition: mp_adc.c:355
int mp_hdma_init_config(uint8_t type, void *handle, hpm_mp_hdma_over_callback cb)
MP HDMA init(HDMA is used to transmit ADC sampling values. It can be used to continuously sample mult...
Definition: mp_adc.c:1099
int mp_dma_chained_transfer_config(uint32_t size)
MP HDMA chain transmission config, double buffered mode(In HDMA chain mode, multiple tasks are config...
Definition: mp_adc.c:1287
void mp_adc_get_default(uint8_t adc_index, hpm_adc_t *adc_t)
Get the default value of the ADC data structure ;获取ADC数据结构默认值
Definition: mp_adc.c:368
void(* hpm_mp_hdma_over_callback)(hpm_hdma_adc_t *hdma_adc_t)
HDMA ADC data transmission and callback completed ;HDMA ADC数据搬用完成回调
Definition: mp_common.h:431
ADC data structure ;ADC 数据结构
Definition: mp_common.h:386