#include "TouchKeyScan.h"
#include "Touch_Lib.h"

u16 code TKChnCfg[TKL_CHN_NUM*6]={
1,0,20,100,100,100,
2,1,20,100,100,100,
};


u8 xdata ChnInfoBuf[TKL_CHN_INFO_SIZE * TKL_CHN_NUM] = {0};

void Timer0_IRQHandler() interrupt 6
{        
    TCON |= 0x20;                   // 清中断标志
    TL0   = (65536 - TIM_PERIOD)%256;     // 设置定时计数器
    TH0   = (65536 - TIM_PERIOD)/256;
    
    TKL_ScanStartLoop();
}

void CSD_IRQHandler() interrupt 12
{
    TKL_IRQCallback();
}

void Timer0_Init(void)
{
    CKCON = 0x00;                 // CLK/12
    TMOD = 0x01;
    TL0  = (65536 - TIM_PERIOD)%256;    // 设置定时计数器，定时器周期 1ms
    TH0  = (65536 - TIM_PERIOD)/256;
    TCON = 0x11;
}






































































