linshire fdcee2da20
[BSP] CH32V307 add drv_adc (#6431)
添加了ch32v307的adc驱动,已在ch32v307评估班上对adc1ch5进行了验证,并修改了kconfig以及scons脚本,可以成功编译以及使用
2022-09-16 22:50:57 -04:00

28 lines
587 B
C

/*
* Copyright (c) 2006-2022, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2022-09-16 linshire add some operation function
* 2021-09-09 WCH the first version
*/
#ifndef DRV_ADC_H__
#define DRV_ADC_H__
typedef struct
{
ADC_TypeDef *Instance;
ADC_InitTypeDef Init;
}ADC_HandleTypeDef;
typedef struct
{
uint32_t Channel;
uint32_t Rank;
uint32_t SamplingTime;
uint32_t Offset;
}ADC_ChannelConfTypeDef;
#endif