#include "OB6710.h"
#include "CCU.h"

extern bit g_CcuInterrupt ;
extern unsigned char g_CcuStatus;

void main(void)
{
	unsigned int Buff;
	
  //----------P0.1 is input Only ( CCU1)--------
	P0M0 = P0M0 & 0xFD;
	P0M1 = P0M1 | 0x02;
	CCU_SetMode(d_CCU_EN_CH1, d_CCU_MODE_CONTINUE_HI_LOW);
  CCU_EnableIE(d_CCU_EN_CH1);
	CCU_Start(d_CCU_CLOCK_1_8);
	while(1)
	{	
		if(g_CcuInterrupt == 1)
		{
			Buff = CCU_GetResult(d_CCU_EN_CH1, d_CCU_MODE_CONTINUE_HI_LOW);
			g_CcuInterrupt= 0;			
		}

	}
}