-
Notifications
You must be signed in to change notification settings - Fork 29
Should this crate allow reading #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
Comments
this would have to be a separate trait that the drivers would implement somehow since it's only available for some displays. What else besides pixels data itself would you consider to be useful for reading? |
Pixel data would be super useful to read back from a display internal framebuffer. There's still #12 which attempts to provide the ability to read back. I do think it would be feasible to add traits to allow reading back pixel or control data but the big question would be how a display driver or in extension the application via the display driver could use the data. I can see a few caveats for a truly generic and useful API so if you happen to have a specific usecase or even a complete application reading back from the display I'd really love to see and discuss it. |
I'm not trying to be smart and perhaps i'm missing some nuances of driver design but if a chip offers a set of data to be read there has to be a way to get them. In my more specific case i'm using https://github.com/yuri91/ili9341-rs and https://github.com/VersBinarii/xpt2046. I have read through the discussion in #12 but admit i dont fully understand @therealprof reasons for rejecting it. Anyway thanks for your work in this area and if this crate is not usefull in this particular case its still applicable to 99% of other cases |
@VersBinarii I'm the author of the generic MIPIDSI rust driver. I conflated things a bit here, my main aim was to find out "generic use cases" for reading so I could implement it in the overall driver if the I agree 100% that reading is paramount and that the DI should just provide a generic read function same as the write one right now. |
Not sure how this would work. How can you reverse engineer which GUI element the user clicked on by reading back the pixel color?
The problem is we need a universal trait that works with different peripheral interfaces in a useful way without complicating lives for everyone not requiring this ability. The reason why I'm asking how you intend to use the ability to read back pixel data is because most of our users are using I know a few people who would be very excited (including me) to add the ability to use a in-display framebuffer but I don't think anyone has invested the required brainpower to come up with a real use case and a high level concept to implement such a use case. This would help immensly to identify the stumble blocks. Reading a single value might be an easy addition, but once you enter the world of iterators or sized arrays things get complicated very quickly and that's what we need. |
Then maybe this could be the start which will get people to use it and see where this leads ;) @almindor I see. I misunderstood your question then. |
It's super inefficient, I doubt people would even care about that enough to start using it. |
I'm wondering if we should leave this issue open as a discussion place for this. I think reading will become required, might be a good idea to have a dedicated place to put in ideas on how to best handle it. |
I agree. Let's keep it open. |
LCD controller such as ili9341 allows for reading pixel data (and other useful things) from it.
This crate, while great great for simply sending data to display, makes it impossible to read data from it
Should it allow also for reading data
The text was updated successfully, but these errors were encountered: