Linux?μ??????????
???????????? ???????[ 2013/1/10 10:03:12 ] ????????
???????????????????????е????????????????
static inline void s3c2410_ts_connect(void)
{
//??????????????????????ó????????
s3c2410_gpio_cfgpin(S3C2410_GPG(12)?? S3C2410_GPG12_XMON);
s3c2410_gpio_cfgpin(S3C2410_GPG(13)?? S3C2410_GPG13_nXPON);
s3c2410_gpio_cfgpin(S3C2410_GPG(14)?? S3C2410_GPG14_YMON);
s3c2410_gpio_cfgpin(S3C2410_GPG(15)?? S3C2410_GPG15_nYPON);
}
??????????????????????????????????????а??′?????
?????????ж?????????????
static struct timer_list touch_timer =
TIMER_INITIALIZER(touch_timer_fire?? 0?? 0);
?????????????????????????0???????????????????????ζ??????touch_timer_fire
static void touch_timer_fire(unsigned long data)
{
unsigned long data0;
unsigned long data1;
int updown;
data0 = ioread32(base_addr+S3C2410_ADCDAT0); //???X????
data1 = ioread32(base_addr+S3C2410_ADCDAT1); //???Y????
updown = (!(data0 & S3C2410_ADCDAT0_UPDOWN)) && (!(data1 & S3C2410_ADCDAT0_UPDOWN)); //????????????£????????updowm=1
if (updown) {
if (count != 0) {
long tmp;
tmp = xp;
xp = yp;
yp = tmp;
xp >>= 2;
yp >>= 2;
input_report_abs(dev?? ABS_X?? xp);
input_report_abs(dev?? ABS_Y?? yp);
input_report_key(dev?? BTN_TOUCH?? 1);
input_report_abs(dev?? ABS_PRESSURE?? 1);
input_sync(dev);
}
xp = 0;
yp = 0;
count = 0;
iowrite32(S3C2410_ADCTSC_PULL_UP_DISABLE | AUTOPST?? base_addr+S3C2410_ADCTSC);
iowrite32(ioread32(base_addr+S3C2410_ADCCON) | S3C2410_ADCCON_ENABLE_START?? base_addr+S3C2410_ADCCON);
} else { //??б?????
count = 0; //?????count?0????????AD????????
input_report_key(dev?? BTN_TOUCH?? 0); //??input????????δ????
input_report_abs(dev?? ABS_PRESSURE?? 0);
input_sync(dev);
iowrite32(WAIT4INT(0)?? base_addr+S3C2410_ADCTSC); //????????ж?
if (OwnADC) { //OwnADC??????????????????0
OwnADC = 0;
up(&ADC_LOCK);
}
}
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11