Hello Guys,
Thanks for the commit Bogdan! Now that we have more people working with the RIT OLED display, we should try to bring it's functions to the LM3S dedicated ( to be require()d )module, at least until we have a Generic Display module for eLua. I've tried it in different ways but I would like to hear what would be the best way to do it. I also don't know if the same LM lower/driver code can be used for both LM6965 (Snyder's code) and LM8962 (my code) implementations. Best Dado -------------- next part -------------- An HTML attachment was scrubbed... URL: https://lists.berlios.de/pipermail/elua-dev/attachments/20090108/d04775ac/attachment.html |
This is a job for someone with some experience in writing
drivers/applications for graphical LCDs (this is not me), but here are my $0.02: a graphical display should be as "raw" as possible. That is, its operations should be (roughly): - initialize - on/off - clear - (optional) set backlight - blit (take a block of data from the display buffer and send it to the display). All the other operations (putpixel, lines, circles, text rendering) should be done by a generic layer that writes everything into the display buffer, then call "blit" when there's something to be drawn (which introduces the concepts of "dirty rectangles" and "BeginDraw/EndDraw", but I won't go into details here, suffice to say that the actual memory-to-display operation should happen as rare as possible). This follows the idea of Linux's DirectFB: draw everything into a frame buffer (except, of course, that DirectFB can actually give you a frame buffer that points to the actual VIDEO memory, while in some embedded systems you might not have this luxury). This is anything but simple, so more additions are welcome. Best, Bogdan On Thu, Jan 8, 2009 at 5:48 PM, Dado Sutter <dadosutter at gmail.com> wrote: > Hello Guys, > Thanks for the commit Bogdan! > Now that we have more people working with the RIT OLED display, we > should try to bring it's functions to the LM3S dedicated ( to be require()d > )module, at least until we have a Generic Display module for eLua. > I've tried it in different ways but I would like to hear what would be > the best way to do it. > I also don't know if the same LM lower/driver code can be used for both > LM6965 (Snyder's code) and LM8962 (my code) implementations. > > Best > Dado > > > > _______________________________________________ > Elua-dev mailing list > Elua-dev at lists.berlios.de > https://lists.berlios.de/mailman/listinfo/elua-dev > > An HTML attachment was scrubbed... URL: https://lists.berlios.de/pipermail/elua-dev/attachments/20090108/c6076e7e/attachment-0001.html |
In reply to this post by Dado Sutter
I am a noob at this side of lua, and am confused
the only thing I think I do not see is how it actually calls the C functions in rit128x96x4.c though the mapped functions in disp.c Thanks in advance for whatever you can spare! |
Hello Osgeld,
And welcome to the list. On Wed, Apr 27, 2011 at 00:05, Osgeld <[hidden email]> wrote: I am a noob at this side of lua, and am confused You are at the right place then :) the only thing I think I do not see is how it actually calls the C functions You mean, you are trying to understand Lua-C binds ? On the mapping array you found, you put the function names you want on the Lua side and the addresses of the actual functions on the C side. No need to use C function "names" or any other symbols, Lua binds depend only on function addresses.
If this is what you're looking for, I suggest you read the Lua API chapter of the Programming in Lua book (http://www.amazon.com/Programming-Lua-Second-Roberto-Ierusalimschy/dp/8590379825/ref=sr_1_1?ie=UTF8&qid=1303873842&sr=8-1). This week I found another good resource for this and other hints for Lua beginners. It is the nice site http://www.troubleshooters.com/codecorn/lua/ Specifically for your needs you can check the excelent introduction to Lua binds on two sections of the rightmost column: Calling C from Lua and Calling Lua from C I hope this helps Best Dado
_______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Free forum by Nabble | Edit this page |