VSF Documented
adc_interface.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright(C)2009-2022 by VSF Team *
3 * *
4 * Licensed under the Apache License, Version 2.0 (the "License"); *
5 * you may not use this file except in compliance with the License. *
6 * You may obtain a copy of the License at *
7 * *
8 * http://www.apache.org/licenses/LICENSE-2.0 *
9 * *
10 * Unless required by applicable law or agreed to in writing, software *
11 * distributed under the License is distributed on an "AS IS" BASIS, *
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13 * See the License for the specific language governing permissions and *
14 * limitations under the License. *
15 * *
16 ****************************************************************************/
17
18#ifndef __HAL_DRIVER_ADC_INTERFACE_H__
19#define __HAL_DRIVER_ADC_INTERFACE_H__
20
21/*============================ INCLUDES ======================================*/
22
23#include "hal/driver/driver.h"
24
25#if VSF_HAL_USE_ADC == ENABLED
26
27#include "utilities/ooc_class.h"
28
29/*============================ MACROS ========================================*/
30/*============================ MACROFIED FUNCTIONS ===========================*/
31/*============================ TYPES =========================================*/
32
36 implement(i_peripheral_t);
37
39
41 struct {
42 void (*Enable)(void);
43 void (*Disable)(void);
44 } Irq;
45
47 struct {
48 vsf_err_t (*Config)(vsf_adc_channel_cfg_t *ptChannelCfgs, uint32_t nCount);
49 vsf_err_t (*Request)(void *pBuffer, uint32_t nCount);
51
52end_def_interface(i_adc_t)
54
55
56/*============================ GLOBAL VARIABLES ==============================*/
57/*============================ INCLUDES ======================================*/
58/*============================ PROTOTYPES ====================================*/
59/*============================ IMPLEMENTATION ================================*/
60
61#endif
62
63#endif
64/* EOF */
vsf_err_t
Definition __type.h:42
void(* Enable)(void)
Definition adc_interface.h:42
struct @500 Channel
Channel.
vsf_err_t(* Config)(vsf_adc_channel_cfg_t *ptChannelCfgs, uint32_t nCount)
Definition adc_interface.h:48
struct @499 Irq
Irq.
Definition vsf_template_usb.h:429
def_interface(i_adc_t) i_peripheral_t
void(* Disable)(void)
Definition adc_interface.h:43
vsf_err_t(* Init)(vsf_adc_cfg_t *pCfg)
Definition adc_interface.h:38
vsf_err_t(* Request)(void *pBuffer, uint32_t nCount)
Definition adc_interface.h:49
end_def_interface(i_pm_wakeup_t) struct vsf_pm_pclk_cfg_t
Definition device.h:249
unsigned uint32_t
Definition stdint.h:9
adc configuration
Definition vsf_template_adc.h:229
adc channel configuration
Definition vsf_template_adc.h:211