Code: Select all
void displayY8(unsigned char * frame, int xres, int yres)
{
tft.setAddrWindow(0, 0, yres - 1, xres - 1);
int i = 0;
for(int x = 0; x < xres; x++)
for(int y = 0; y < yres; y++)
{
i = y * xres + x;
unsigned char c = frame[i];
unsigned short r = c >> 3;
unsigned short g = c >> 2;
unsigned short b = c >> 3;
tft.pushColor(r << 11 | g << 5 | b);
}
}
I'm trying to get a 320x240 frame with esp32 generating a 8Mhz clock. Right now I'm trying to get the test BAR from the camera (reg 7 - 17 - 71) but got nothing
the data is arrange in this way SM_0A0B_0C0D.
How can I send this c value through uart if uart_write_bytes takes a pointer?
Regards
Gastón