Touchscreen Input Device with RTEMS (evdev)
Vijay Kumar Banerjee
vijay at rtems.org
Tue Apr 7 10:40:11 UTC 2020
On Mon, Apr 6, 2020 at 9:15 PM furkan bodur <furkanbdr at gmail.com> wrote:
> Firstly thanks for replies,
>
> As I said there is no input folder in /dev path here is the output,
>
> SHLL [/] # ls -las /dev/input
>
> /dev/input: No such file or directory
>
> Here is what I did for use libbsd and evdev,
> I builded rtems-freebsd with this,
> $ ./waf configure --prefix="$HOME/development/rtems/5"
> --rtems-bsps=arm/beagleboneblack
> --buildset=buildset/default.ini
> $ ./waf
> $ ./waf install
>
> Commands are correct.
> Even so, when I realize that there is no input.h or evdev.h file in rtems
> includes , I changed some values in the libbsd.py file. Here the things I
> changed,
> I added 'freebsd/sys/dev' and 'freebsd/sys/dev/evdev' paths to
> include-paths.
>
evdev is already included in EVDEV section in libbsd.py, I don't think
it'll be required to add it here.
> I added 'freebsd/sys/dev/evdev' path to header-paths.
>
Yes, if evdev.h is used in the application, this is the right place to add
it.
Can you please send a patch for this? :)
>
> After that, I did waf again and here is the outputs;
>
> $ ./waf
> ...
> [1519/1939] Compiling freebsd/sys/dev/evdev/evdev.c
> ...
>
> ./waf install
> ...
> + install
> /home/furkan/development/rtems/5/arm-rtems5/beagleboneblack/lib/include/dev/evdev/evdev.h
> (from freebsd/sys/dev/evdev/evdev.h)
> + install
> /home/furkan/development/rtems/5/arm-rtems5/beagleboneblack/lib/include/dev/evdev/input-event-codes.h
> (from freebsd/sys/dev/evdev/input-event-codes.h)
> + install
> /home/furkan/development/rtems/5/arm-rtems5/beagleboneblack/lib/include/dev/evdev/input.h
> (from freebsd/sys/dev/evdev/input.h)
> ...
>
> I'm not sure if this is the right way to use evdev. This is how my
> application compiles without errors but still there is no /dev/input file.
>
> As mentioned above, the steps are right and they need to be pushed to
rtems-libbsd, please send
a patch for review.
There are a few more steps to get your app running. In rtems-littlevgl:
1. In lvgl.py add this after line 43:
mk_files.append('lv_drivers/display/display.mk')
2. In lv_drivers/indev/evdev.c:
Change the included headers to match the freebsd headers. Like,
linux/input.h to evdev/input.h and try
to build it. If it builds fine, please test it with your app and see if
it's working.
Best regards,
Vijay
> Vijay Kumar Banerjee <vijay at rtems.org>, 6 Nis 2020 Pzt, 09:43 tarihinde
> şunu yazdı:
>
>>
>>
>> On Mon, Apr 6, 2020 at 5:00 AM Chris Johns <chrisj at rtems.org> wrote:
>>
>>> On 2020-04-06 06:17, furkan bodur wrote:
>>> > Hello everyone,
>>> > I am trying to make an simple HMI system . I am using LittlevGL with
>>> BSD
>>> > framebuffer. Thanks to Vijay, I made a lot of progress, but I can't
>>> > figure it out how to use touchscreen or any input devices. I followed
>>> > LVGL docs and tried to work with evdev drivers but it doesn't work.
>>> >
>>> > I used input.h and other necessary headers from rtems-libbsd and my
>>> app
>>> > successfully compiled but when I run it on the Beagle Black, I am
>>> > getting "unable open evdev interface:: No such file or directory"
>>> error
>>> > in serial screen.
>>> >
>>> > I checked the files in Serial screen and noticed that there is no
>>> input
>>> > folder in the /dev directory, as in Linux systems. I think that's the
>>> > reason of the error, but I don't know where I made the mistake.
>>> >
>>> > Any suggestions for me to use evdev properly?
>>>
>>> I can see there is evdev code in libbsd so at least it is present. Are
>>> you able to confirm the evdev code is being built and linked into your
>>> application?
>>>
>>> On FreeBSD I have ...
>>>
>>> $ ls -las /dev/input
>>> total 1
>>> 1 dr-xr-xr-x 2 root wheel 512 Mar 21 08:22 .
>>> 1 dr-xr-xr-x 11 root wheel 512 Mar 21 08:22 ..
>>> 0 crw------- 1 root wheel 0xc Mar 21 08:22 event0
>>> 0 crw------- 1 root wheel 0x29 Mar 21 08:22 event1
>>> 0 crw------- 1 root wheel 0x8f Mar 22 13:42 event2
>>> 0 crw------- 1 root wheel 0xa3 Mar 21 08:23 event4
>>>
>>> but I am not sure how they were created.
>>>
>>>
>> Hi Furkan,
>>
>> Thanks for posting about your project in the list, good to know that you
>> made progress with it.
>> Please check the command that Chris mentioned. There's evdev code in
>> libbsd and is enabled
>> in the default build as well, so it's supposed to be there. If we're
>> lucky, the only thing that needs
>> to be done in order to run lvgl input is to port lv_drivers input to BSD.
>> Currently, it uses Linux
>> headers and codes. I think we'll just have to change the header includes
>> in lv_drivers/indev/evdev.c
>> and if we're lucky, it'll work.
>>
>> Best regards,
>> Vijay
>>
>>> Chris
>>> _______________________________________________
>>> users mailing list
>>> users at rtems.org
>>> http://lists.rtems.org/mailman/listinfo/users
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20200407/6a962a58/attachment-0001.html>
More information about the users
mailing list