#ifndef __ACMP_H
#define __ACMP_H
void ACMP0_Open(unsigned char nPSEL, unsigned char nNSEL, unsigned char nHYS_RANGE);
void ACMP0_Close(void);
void ACMP0_DebounceCount(unsigned char nDebounceCount);
unsigned char ACMP0_OutputStatus(void);
void ACMP0_EnableIE(unsigned char nIE_TYPE);
void ACMP0_DisableIE(void);

unsigned char ACMP2_OutputStatus(void);
#define d_ACMP1 0x00
#define d_ACMP2 0x01

#define d_ACMP0_P_CHANNEL_0 0x00
#define d_ACMP0_P_CHANNEL_1 0x01
#define d_ACMP0_P_CHANNEL_2 0x02

#define d_ACMP0_N_CHANNEL_0 0x00
#define d_ACMP0_N_CHANNEL_1 0x01



#define d_HYS_RANGE_0   0x00
#define d_HYS_RANGE_10  0x01
#define d_HYS_RANGE_20  0x02
#define d_HYS_RANGE_30  0x03
#define d_HYS_RANGE_40  0x04

#define d_ACMP_IE_TYPE_BOTH      0x00
#define d_ACMP_IE_TYPE_FALLING    0x01
#define d_ACMP_IE_TYPE_RISING     0x02

#endif
