>MV2450 linux 사용자입니다.
>
>
>버튼 GPIO를 출력으로 on /off로 사용하려합니다.
>
>board에 있는 button을 누르면 message가 출력되고 led가 켜지는 부분을 없애려면
>
>어떻게 해야하나요??
>
>빠른 답변 부탁드립니다.
>
>
>ps. 제가 질문드린 다른것들에 대한 답변이 없는데, 무슨 문제가 있나요??
> 빠른 답변 부탁드립니다.
마이크로비젼 기술지원팀입니다.
아래 경로의 소스에서 작업을 진행하시길 바랍니다.
Kernel\\drivers\\input\\keyboard\\mv2450_buttons.c파일에서 아래 부분을 확인.
아래를 확인하시면 key입력시 메시지 출력 부분을 확인하실 수 있습니다.
--------------------------------------------------------------------------------------------
button->last_state = down;
printk(\"%s(0x%x) down(%d) button %s\\n\", button->name,irq,down, down ? \"pressed\" : \"released\");
input_report_key(mv2450_buttons_private->input, button->keycode, down);
input_sync(mv2450_buttons_private->input);
down = !(s3c2410_gpio_getpin(button->pin));
#if 0
if (down)
if ( irq == 0x38 || irq == 0x39 || irq== 0x3A || irq == 0x3B || irq == 0x3C || irq == 0x3D) {
mod_timer(&button->timer, jiffies + BUTTON_DELAY);
}
#else
if (down) {
switch (irq){
case 0x38:
s3c2410_gpio_setpin(S3C2443_GPH13, 1);
s3c2410_gpio_setpin(S3C2443_GPH14, 0);
mod_timer(&button->timer, jiffies + BUTTON_DELAY);
break;
case 0x39:
s3c2410_gpio_setpin(S3C2443_GPH13, 0);
s3c2410_gpio_setpin(S3C2443_GPH14, 1);
mod_timer(&button->timer, jiffies + BUTTON_DELAY);
break;
case 0x3A:
s3c2410_gpio_setpin(S3C2443_GPH13, 1);
s3c2410_gpio_setpin(S3C2443_GPH14, 1);
mod_timer(&button->timer, jiffies + BUTTON_DELAY);
break;
case 0x3B:
s3c2410_gpio_setpin(S3C2443_GPH13, 0);
s3c2410_gpio_setpin(S3C2443_GPH14, 0);
mod_timer(&button->timer, jiffies + BUTTON_DELAY);
break;
case 0x3C:
s3c2410_gpio_setpin(S3C2410_GPG3, 1);
s3c2410_gpio_setpin(S3C2410_GPG2, 1);
mod_timer(&button->timer, jiffies + BUTTON_DELAY);
break;
case 0x3D:
s3c2410_gpio_setpin(S3C2410_GPG3, 0);
s3c2410_gpio_setpin(S3C2410_GPG2, 0);
mod_timer(&button->timer, jiffies + BUTTON_DELAY);
break;
default :
break;
}
}
#endif
--------------------------------------------------------------------------------------------
|