Lu yunfeng wrote:
> Nidhi,
> 
> here is my problem:
> 
> a)normally an application can get key value just like the following function 
> calls in the no embeded directFB if the Linux has a PS interface keybaord:
>      1)CreateInputEventBuffer( dfb, DICAPS_KEYS|DICAPS_BUTTONS|DICAPS_AXES, 
> DFB_TRUE, &eventBuffer);
>      2)eventBuffer->WaitForEvent(eventBuffer);
>      3)eventBuffer->GetEvent(eventBuffer, &event);
>      4)keyvalue=event.input.type;
> 
> b)however in my embedded Linux system, I have a remote controler which is 
> connected to the target board through RS232 cable with embedded Linux on 
> which the directFB is running.
>    1) first  I press a key on remote(for example "1" key") control ,
>     2) because the remote controller  is connected to the target board with 
> RS232 cable,  the firmware on the remote controller will send 0x31('1' 
> character) to the UART2 port of the target directly.
>    3) Linux UART driver will receive the byte( 0x31)  save it into a buffer. 
> a simple application can get the key value into the user space memory.
> 
>    now I hope DirectFB can detect there is a key press event happened in this 
> case, and DirectFB can get the key value(0x31) with the same function 
> call(GetEvent), just like the event is caused by the pressing the  '1' key on 
> the local keyboard.

You can write a new input driver or use DiVine (CVS) with a small
program that reads from the serial and generates your events.

-- 
Best regards,
   Denis Oliver Kropp

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"

_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to