-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use as library? #74
Comments
LVGL doesn't appear to support grayscale only displays, and I don't recall how sanely old Kindles like that handle RGB565 (as that's probably the highest you can go, I'm not sure the actual framebuffer is large enough for RGB32). Barring these low-level concerns, you should basically be able to simply send an (I'd probably start from the current fbdev driver instead of that kobo one, though?) |
I might give this a try myself on Kobo this WE, FWIW ;o). |
Small other random comments:
Input might be messy to handle properly (although I expect that to be much much much less of a concern on Kindle than on Kobo ;)). |
That would be awesome! I managed to change this project: https://github.com/lvgl/lv_port_linux_frame_buffer And now i have something that seems to respond. |
That's another kettle of fish I wouldn't bother with just yet[1], as the ultimate solution will depend on your use-case. Right now, as long as you don't interact with the screen (which shouldn't be an issue for a PoC), the only thing that might interact with it would be the status bar (namely, the clock & battery icon).
|
So, here's my code modified code: https://github.com/cyclops1982/lv_port_linux_frame_buffer/tree/kindleport I'm currently just using the As mentioned, the screen is completely black and i think that's because something is wrong when writing the framebuffer. |
Bitdepth is wrong ;). Like I initially said, LVGL doesn't appear to support grayscale, so you can't use its 8bpp support, as it's RGB332 and not grayscale (Y8). (Because Y8 @ 8bpp is the native (and sensible) format of the Kindle fb). You've actually set it to 1bpp, which is even wronger ;). I don't know if your device actually has a large enough framebuffer for RGB32 (it hasn't necessarily been a given on Basics and related devices), so you'll want to check that first manually via fbdepth & fbink. At worst, you should be able to run at 16bpp, as the driver should indeed be expecting that to be RGB565 (... or BGR565, but that's a minor issue at this point, especially since the display will quantize to 16c grayscale anyway). Again, double-check that, as I'm not entirely sure that applies to Kindles. Regardless, you will have to physicially modify the framebuffer status to a compatible "color" state (i.e., 32bpp or 16bpp) with (And restore it on exit, because I remember Xorg being very very very upset about doing that behind its back. You might even have to actually deal with the whole mess I alluded to in my previous answer and drop the kindle's UI framework in order to be able to do that safely). |
Ha, i expected this thing to be so low, that i never tried 8 bits. That seems to work a lot better already. I have some interaction with the mouse, but it's still struggling a bit with the various colours and moving it to greyscale or whatever it needs to be. thanks for the comments on the code - will review them again later! |
RGB332 just isn't grayscale, it's as simple as that ;). |
Hi,
I've got a kindle basic 2 from 2014.
I would like to use lvgl to build a UI on the kindle, sort of like this: https://github.com/embeddedt/lv_port_kobo
Now, i'm wondering how i can use FBInk as a library. Are there any docs that explain this?
The text was updated successfully, but these errors were encountered: