Merge pull request #834 from openmv/add_framebuffer_functions

Add accessor functions to framebuffer.
This commit is contained in:
Ibrahim Abd Elkader 2020-06-15 22:24:35 +02:00 committed by GitHub
commit 085c1d6d85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 0 deletions

View File

@ -155,3 +155,16 @@ void fb_update_jpeg_buffer()
}
}
}
uint8_t *framebuffer_get_buffer()
{
return fb_framebuffer->pixels;
}
void framebuffer_set(int32_t w, int32_t h, int32_t bpp)
{
fb_framebuffer->w = w;
fb_framebuffer->h = h;
fb_framebuffer->bpp = bpp;
}

View File

@ -60,4 +60,11 @@ uint32_t fb_buffer_size();
// Transfers the frame buffer to the jpeg frame buffer if not locked.
void fb_update_jpeg_buffer();
// Return the current buffer address.
uint8_t *framebuffer_get_buffer();
// Set the framebuffer w, h and bpp.
void framebuffer_set(int32_t w, int32_t h, int32_t bpp);
#endif /* __FRAMEBUFFER_H__ */