csteaderman Posted November 8, 2016 Report Share Posted November 8, 2016 I'm bringing up a display connected to an Atmel SAMA5D2 Xplained evaluation board. I assumed that the display was a framebuffer as Atmel's sample code assigns a buffer for the display that gets sent to the display. It is setup for 8 bits per pixel, but the framebuffer expects each pixel to be represented by 3 bytes, rather than the 4 bytes that uGFX seems to want to allocate. Is there a way for me to configure uGFX to represent each pixel by exactly 3 bytes (24 bits)? Link to comment Share on other sites More sharing options...
inmarket Posted November 8, 2016 Report Share Posted November 8, 2016 A replacement framebuffer driver would need to be written that writes pixels byte by byte into 3 bytes per pixel format. The existing framebuffer driver assumes that each pixel is 1, 2 or 4 bytes so that it can write the pixel in a single cpu operation. Similarly the existing framebuffer driver does not handle pixel sizes of less than 8 bits per pixel. The changes should be simple by copying the existing framebuffer driver and modifying the pixel addressing and writing. Link to comment Share on other sites More sharing options...
csteaderman Posted November 8, 2016 Author Report Share Posted November 8, 2016 Thanks so much for the pointer. The final solution was even easier because the code to handle the 3 byte per pixel buffer had already been written in some support code from Atmel. I simply needed to modify the uGFX framebuffer calls to call the Atmel code. Now on to optimizations. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now