CH552/project/examples/ADC/ADC.H

35 lines
1.4 KiB
C++
Raw Normal View History

2018-10-17 10:44:45 +02:00
#define ADC_INTERRUPT 1
/*******************************************************************************
* Function Name : ADCClkSet(UINT8 div)
* Description : ADC<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,ģ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>жϿ<EFBFBD><EFBFBD><EFBFBD>
* Input : UINT8 div ʱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
0 <EFBFBD><EFBFBD> 384<EFBFBD><EFBFBD>Fosc
1 <EFBFBD><EFBFBD> 96<EFBFBD><EFBFBD>Fosc
* Output : None
* Return : None
*******************************************************************************/
void ADCInit(UINT8 div);
/*******************************************************************************
* Function Name : ADC_ChannelSelect(UINT8 ch)
* Description : ADC<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* Input : UINT8 ch <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD>0-3
* Output : None
* Return : <EFBFBD>ɹ<EFBFBD> SUCCESS
ʧ<EFBFBD><EFBFBD> FAIL ͨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ó<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Χ
*******************************************************************************/
UINT8 ADC_ChannelSelect(UINT8 ch);
/*******************************************************************************
* Function Name : VoltageCMPModeInit()
* Description : <EFBFBD><EFBFBD>ѹ<EFBFBD>Ƚ<EFBFBD><EFBFBD><EFBFBD>ģʽ<EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD>
* Input : UINT8 fo <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˿<EFBFBD> 0\1\2\3
UINT8 re <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˿<EFBFBD> 1\3
* Output : None
* Return : <EFBFBD>ɹ<EFBFBD> SUCCESS
ʧ<EFBFBD><EFBFBD> FAIL
*******************************************************************************/
UINT8 VoltageCMPModeInit(UINT8 fo,UINT8 re);