mirror of
https://libwebsockets.org/repo/libwebsockets
synced 2025-01-09 21:25:40 +00:00
63c1e8ba00
Add lws_display and minimal example support for esp32-wrover to match wsp32-heltec-wb32 Since no usable buttons that don't affect something else on wrover kit, assumes a button to 0V on GPIO14.
26 lines
427 B
C
26 lines
427 B
C
/*
|
|
* gcc /tmp/q.c && convert cat-565.png -depth 8 rgb:- | ./a.out > cat-565.h
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
|
|
int main()
|
|
{
|
|
int r, g, b, w, m = 0;
|
|
|
|
while (1) {
|
|
r = getchar();
|
|
g = getchar();
|
|
b = getchar();
|
|
|
|
if (r == EOF || g == EOF || b == EOF)
|
|
return r == EOF;
|
|
|
|
w = (b >> 3) | ((g >> 2) << 5) | ((r >> 3) << 11);
|
|
printf("0x%02X, 0x%02X, ", (w >> 8) & 0xFF, w & 0xFF);
|
|
|
|
if (((++m) & 3) == 0)
|
|
printf("\n");
|
|
}
|
|
}
|
|
|