diff --git a/components/flow3r_bsp/flow3r_bsp.h b/components/flow3r_bsp/flow3r_bsp.h index bdfb1c4a..c2002c02 100644 --- a/components/flow3r_bsp/flow3r_bsp.h +++ b/components/flow3r_bsp/flow3r_bsp.h @@ -21,11 +21,7 @@ void flow3r_bsp_display_init(void); // This must not be called if another transfer is already being performed. The // user code should sequence access and make sure not more than one transfer is // performed simultaneously. -void flow3r_bsp_display_send_fb(void *fb_data, int bits); - -void flow3r_bsp_display_send_fb_osd(void *fb_data, int bits, int scale, - void *osd_data, int osd_x0, int osd_y0, - int osd_x1, int osd_y1); +void flow3r_bsp_display_send_fb(void *fb_data, int i); // Set display backlight, as integer percent value (from 0 to 100, clamped). // No-op if display hasn't been successfully initialized. diff --git a/components/flow3r_bsp/flow3r_bsp_display.c b/components/flow3r_bsp/flow3r_bsp_display.c index 29ebc59b..03622bb1 100644 --- a/components/flow3r_bsp/flow3r_bsp_display.c +++ b/components/flow3r_bsp/flow3r_bsp_display.c @@ -36,17 +36,13 @@ void flow3r_bsp_display_init(void) { } } -void flow3r_bsp_display_send_fb_osd(void *fb_data, int bits, int scale, - void *osd_data, int osd_x0, int osd_y0, - int osd_x1, int osd_y1) { +void flow3r_bsp_display_send_fb(void *fb_data, int i) { if (!gc9a01_initialized) { return; } static bool had_error = false; - esp_err_t ret = - flow3r_bsp_gc9a01_blit_osd(&gc9a01, fb_data, bits, scale, osd_data, - osd_x0, osd_y0, osd_x1, osd_y1); + esp_err_t ret = flow3r_bsp_gc9a01_blit_full(&gc9a01, fb_data, i); if (ret != ESP_OK) { if (!had_error) { ESP_LOGE(TAG, "display blit failed: %s", esp_err_to_name(ret)); @@ -60,10 +56,6 @@ void flow3r_bsp_display_send_fb_osd(void *fb_data, int bits, int scale, } } -void flow3r_bsp_display_send_fb(void *fb_data, int bits) { - flow3r_bsp_display_send_fb_osd(fb_data, bits, 1, NULL, 0, 0, 0, 0); -} - void flow3r_bsp_display_set_backlight(uint8_t percent) { if (!gc9a01_initialized) { return; diff --git a/components/flow3r_bsp/flow3r_bsp_gc9a01.c b/components/flow3r_bsp/flow3r_bsp_gc9a01.c index 36163912..4b82038c 100644 --- a/components/flow3r_bsp/flow3r_bsp_gc9a01.c +++ b/components/flow3r_bsp/flow3r_bsp_gc9a01.c @@ -99,14 +99,6 @@ typedef struct { typedef struct { flow3r_bsp_gc9a01_t *gc9a01; const uint8_t *fb; - const uint8_t *osd_fb; - int osd_x0; - int osd_y0; - int osd_x1; - int osd_y1; - uint16_t *pal_16; - int bits; - int scale; size_t left; size_t off; // current pixel offset in blit @@ -201,7 +193,7 @@ static IRAM_ATTR void flow3r_bsp_gc9a01_pre_transfer_callback( * mode for higher speed. The overhead of interrupt transactions is more than * just waiting for the transaction to complete. */ -esp_err_t flow3r_bsp_gc9a01_cmd_sync(flow3r_bsp_gc9a01_t *gc9a01, uint8_t cmd) { +static esp_err_t flow3r_bsp_gc9a01_cmd_sync(flow3r_bsp_gc9a01_t *gc9a01, uint8_t cmd) { spi_transaction_t t; memset(&t, 0, sizeof(t)); @@ -569,431 +561,6 @@ esp_err_t flow3r_bsp_gc9a01_init(flow3r_bsp_gc9a01_t *gc9a01, return ret; } -/* branchless 8bit add that maxes out at 255 */ -static inline uint8_t ctx_sadd8(uint8_t a, uint8_t b) { - uint16_t s = (uint16_t)a + b; - return -(s >> 8) | (uint8_t)s; -} - -static EXT_RAM_BSS_ATTR uint16_t temp_blit[SPI_MAX_DMA_LEN / 2]; - -static inline uint32_t ctx_565_unpack_32(const uint16_t pixel, - const int byteswap) { - uint16_t byteswapped; - if (byteswap) { - byteswapped = (pixel >> 8) | (pixel << 8); - } else { - byteswapped = pixel; - } - uint32_t b = (byteswapped & 31) << 3; - uint32_t g = ((byteswapped >> 5) & 63) << 2; - uint32_t r = ((byteswapped >> 11) & 31) << 3; -#if 0 - b = (b > 248) * 255 + (b <= 248) * b; - g = (g > 248) * 255 + (g <= 248) * g; - r = (r > 248) * 255 + (r <= 248) * r; -#endif - - return r + (g << 8) + (b << 16) + (0xff << 24); -} - -static inline uint16_t ctx_565_pack(uint8_t red, uint8_t green, uint8_t blue, - const int byteswap) { -#if 0 - // is this extra precision warranted? - // for 332 it gives more pure white.. - // it might be the case also for generic 565 - red = ctx_sadd8(red, 4); - green = ctx_sadd8(green, 3); - blue = ctx_sadd8(blue, 4); -#endif - - uint32_t c = (red >> 3) << 11; - c |= (green >> 2) << 5; - c |= blue >> 3; - if (byteswap) { - return (c >> 8) | (c << 8); - } /* swap bytes */ - return c; -} - -#define U8_LERP(a, b, t) ((a) + ((((b) - (a)) * t + 256) >> 8)) - -extern uint8_t st3m_pal[256 * 3]; -EXT_RAM_BSS_ATTR static uint16_t st3m_pal16[256]; - -// https://pippin.gimp.org/a_dither/ -#define a_dither(x, y, divisor) \ - ((((((x) + (y)*236) * 119) & 255) - 127) / divisor) - -static void flow3r_bsp_prep_blit(flow3r_bsp_gc9a01_blit_t *blit, - int pix_count) { - int scale = blit->scale; - const uint8_t *fb = blit->fb; - const uint8_t *osd_fb = blit->osd_fb; - unsigned int start_off = blit->off; - unsigned int pxstride = 240; - unsigned int end_off = start_off + pix_count; - unsigned int o = 0; - - if (scale > 1) { - /* XXX : this code has room for optimization, in particular - when memcpy of preceding scanlines should be used instead - of recomputing the scanline - */ - if (osd_fb && (start_off < blit->osd_y1 * 240)) { - switch (blit->bits) { - case 1: - for (unsigned int i = start_off; i < end_off; i++) { - int x = i % 240; - int y = i / 240; - int j = ((y / scale) * 240) + x / scale; - // TODO: add OSD - temp_blit[o++] = - blit->pal_16[(fb[j / 8] >> ((j & 7))) & 0x1]; - } - break; - case 2: - for (unsigned int i = start_off; i < end_off; i++) { - // TODO: add OSD - int x = i % 240; - int y = i / 240; - int j = ((y / scale) * 240) + x / scale; - temp_blit[o++] = - blit->pal_16[(fb[j / 4] >> ((j & 3) * 2)) & 0x3]; - } - break; - case 4: - for (unsigned int i = start_off; i < end_off; i++) { - // TODO: add OSD - int x = i % 240; - int y = i / 240; - int j = ((y / scale) * 240) + x / scale; - temp_blit[o++] = - blit->pal_16[(fb[j / 2] >> ((j & 1) * 4)) & 0xf]; - } - break; - case 8: - case 9: - for (unsigned int i = start_off; i < end_off; i++) { - int x = i % 240; - int y = i / 240; - int j = ((y / scale) * pxstride) + x / scale; - int j2 = ((y / scale) * 240) + x / scale; - int idx = fb[j]; - uint8_t r = (((idx >> 5) & 7) * 255) / 7; - uint8_t g = (((idx >> 2) & 7) * 255) / 7; - uint8_t b = - ((((idx & 3) << 1) | ((idx >> 2) & 1)) * 255) / 7; - - uint8_t ya = osd_fb[j2 * 4 + 3]; - - r = U8_LERP(r, osd_fb[j2 * 4 + 0], ya); - g = U8_LERP(g, osd_fb[j2 * 4 + 1], ya); - b = U8_LERP(b, osd_fb[j2 * 4 + 2], ya); - - idx = ((ctx_sadd8(r, 15) >> 5) << 5) | - ((ctx_sadd8(g, 15) >> 5) << 2) | - (ctx_sadd8(b, 15) >> 6); - - temp_blit[o++] = blit->pal_16[idx]; - } - break; - case 24: - for (unsigned int i = start_off; i < end_off; i++) { - int x = i % 240; - int y = i / 240; - int j = ((y / scale) * 240) + x / scale; - int j4 = j * 4; - uint8_t sr = osd_fb[j4 + 0]; - uint8_t sg = osd_fb[j4 + 1]; - uint8_t sb = osd_fb[j4 + 2]; - uint8_t sa = osd_fb[j4 + 3]; - int j3 = j * 3; - uint8_t r = U8_LERP(fb[j3 + 0], sr, sa); - uint8_t g = U8_LERP(fb[j3 + 1], sg, sa); - uint8_t b = U8_LERP(fb[j3 + 2], sb, sa); - temp_blit[o++] = ctx_565_pack(r, g, b, 1); - } - break; - case 32: - for (unsigned int i = start_off; i < end_off; i++) { - int x = i % 240; - int y = i / 240; - int j = ((y / scale) * 240) + x / scale; - int j4 = j * 4; - uint8_t sr = osd_fb[j4 + 0]; - uint8_t sg = osd_fb[j4 + 1]; - uint8_t sb = osd_fb[j4 + 2]; - uint8_t sa = osd_fb[j4 + 3]; - uint8_t r = U8_LERP(fb[j4 + 0], sr, sa); - uint8_t g = U8_LERP(fb[j4 + 1], sg, sa); - uint8_t b = U8_LERP(fb[j4 + 2], sb, sa); - temp_blit[o++] = ctx_565_pack(r, g, b, 1); - } - break; - case 16: - for (unsigned int i = start_off; i < end_off; i++) { - int x = i % 240; - int y = i / 240; - int j = ((y / scale) * pxstride) + x / scale; - int j2 = ((y / scale) * 240) + x / scale; - uint32_t col = - ctx_565_unpack_32(((uint16_t *)fb)[j], 1); - uint8_t *rgba = (uint8_t *)&col; - j2 *= 4; - uint8_t sr = osd_fb[j2]; - uint8_t sg = osd_fb[j2 + 1]; - uint8_t sb = osd_fb[j2 + 2]; - uint8_t sa = osd_fb[j2 + 3]; - uint8_t dr = U8_LERP(rgba[0], sr, sa); - uint8_t dg = U8_LERP(rgba[1], sg, sa); - uint8_t db = U8_LERP(rgba[2], sb, sa); - temp_blit[o++] = ctx_565_pack(dr, dg, db, 1); - } - break; - } - } else { - switch (blit->bits) { - case 1: - for (unsigned int i = start_off; i < end_off; i++) { - int x = i % 240; - int y = i / 240; - int j = ((y / scale) * 240) + x / scale; - temp_blit[o++] = - blit->pal_16[(fb[j / 8] >> ((j & 7))) & 0x1]; - } - break; - case 2: - for (unsigned int i = start_off; i < end_off; i++) { - int x = i % 240; - int y = i / 240; - int j = ((y / scale) * 240) + x / scale; - temp_blit[o++] = - blit->pal_16[(fb[j / 4] >> ((j & 3) * 2)) & 0x3]; - } - break; - case 4: - for (unsigned int i = start_off; i < end_off; i++) { - int x = i % 240; - int y = i / 240; - int j = ((y / scale) * 240) + x / scale; - temp_blit[o++] = - blit->pal_16[(fb[j / 2] >> ((j & 1) * 4)) & 0xf]; - } - break; - case 16: - for (unsigned int i = start_off; i < end_off; i++) { - int x = i % 240; - int y = i / 240; - int j = ((y / scale) * pxstride) + x / scale; - temp_blit[o++] = ((uint16_t *)fb)[j]; - } - break; - case 8: - case 9: - for (unsigned int i = start_off; i < end_off; i++) { - int x = i % 240; - int y = i / 240; - int j = ((y / scale) * pxstride) + x / scale; - temp_blit[o++] = blit->pal_16[fb[j]]; - } - break; - case 24: - for (unsigned int i = start_off; i < end_off; i++) { - int x = i % 240; - int y = i / 240; - int j = ((y / scale) * 240) + x / scale; - temp_blit[o++] = ctx_565_pack( - fb[j * 3 + 0], fb[j * 3 + 1], fb[j * 3 + 2], 1); - } - break; - case 32: - for (unsigned int i = start_off; i < end_off; i++) { - int x = i % 240; - int y = i / 240; - int j = ((y / scale) * 240) + x / scale; - temp_blit[o++] = ctx_565_pack( - fb[j * 4 + 0], fb[j * 4 + 1], fb[j * 4 + 2], 1); - } - break; - } - } - } - - else { // 1x scale - if (osd_fb && ((start_off < blit->osd_y1 * 240))) switch (blit->bits) { - case 1: - // TODO: OSD - for (unsigned int i = start_off; i < end_off; i++) - temp_blit[o++] = - blit->pal_16[(fb[i / 8] >> ((i & 7))) & 0x1]; - break; - case 2: - // TODO: OSD - for (unsigned int i = start_off; i < end_off; i++) - temp_blit[o++] = - blit->pal_16[(fb[i / 4] >> ((i & 3) * 2)) & 0x3]; - break; - case 4: - // TODO: OSD - for (unsigned int i = start_off; i < end_off; i++) { - temp_blit[o++] = - blit->pal_16[(fb[i / 2] >> ((i & 1) * 4)) & 0xf]; - } - break; - case 8: - for (unsigned int i = start_off; i < end_off; i++) { - int x = i % 240; - int y = i / 240; - int j = (y * 240) + x; - temp_blit[o++] = blit->pal_16[U8_LERP( - fb[j], osd_fb[i * 4 + 1], osd_fb[i * 4 + 3])]; - } - break; - case 9: // RGB332 - for (unsigned int i = start_off; i < end_off; i++) { - int x = i % 240; - int y = i / 240; - int j = (y * 240) + x; - int idx = fb[j]; - uint8_t r = (((idx >> 5) & 7) * 255) / 7; - uint8_t g = (((idx >> 2) & 7) * 255) / 7; - uint8_t b = - ((((idx & 3) << 1) | ((idx >> 2) & 1)) * 255) / 7; - uint8_t ya = osd_fb[i * 4 + 3]; - - r = U8_LERP(r, osd_fb[i * 4 + 0], ya); - g = U8_LERP(g, osd_fb[i * 4 + 1], ya); - b = U8_LERP(b, osd_fb[i * 4 + 2], ya); - - idx = ((ctx_sadd8(r, 15) >> 5) << 5) | - ((ctx_sadd8(g, 15) >> 5) << 2) | - (ctx_sadd8(b, 15) >> 6); - - temp_blit[o++] = blit->pal_16[idx]; - } - break; - case 24: - for (unsigned int i = start_off; i < end_off; i++) { - unsigned int i4 = i * 4; - uint8_t sr = osd_fb[i4 + 0]; - uint8_t sg = osd_fb[i4 + 1]; - uint8_t sb = osd_fb[i4 + 2]; - uint8_t sa = osd_fb[i4 + 3]; - unsigned int i3 = i * 3; - uint8_t r = U8_LERP(fb[i3 + 0], sr, sa); - uint8_t g = U8_LERP(fb[i3 + 1], sg, sa); - uint8_t b = U8_LERP(fb[i3 + 2], sb, sa); - temp_blit[o++] = ctx_565_pack(r, g, b, 1); - } - break; - case 32: - for (unsigned int i = start_off; i < end_off; i++) { - unsigned int i4 = i * 4; - uint8_t sr = osd_fb[i4 + 0]; - uint8_t sg = osd_fb[i4 + 1]; - uint8_t sb = osd_fb[i4 + 2]; - uint8_t sa = osd_fb[i4 + 3]; - uint8_t r = U8_LERP(fb[i4 + 0], sr, sa); - uint8_t g = U8_LERP(fb[i4 + 1], sg, sa); - uint8_t b = U8_LERP(fb[i4 + 2], sb, sa); - temp_blit[o++] = ctx_565_pack(r, g, b, 1); - } - break; - case 16: { - int y = start_off / 240; - int x = start_off % 240; - int j = y * 240 + x; - for (unsigned int i = start_off; i < end_off; i++) { - uint32_t col = - ctx_565_unpack_32(((uint16_t *)fb)[j], 1); - uint8_t *rgba = (uint8_t *)&col; - int i4 = i * 4; - uint8_t sr = osd_fb[i4]; - uint8_t sg = osd_fb[i4 + 1]; - uint8_t sb = osd_fb[i4 + 2]; - uint8_t sa = osd_fb[i4 + 3]; - uint8_t dr = U8_LERP(rgba[0], sr, sa); - uint8_t dg = U8_LERP(rgba[1], sg, sa); - uint8_t db = U8_LERP(rgba[2], sb, sa); - temp_blit[o++] = ctx_565_pack(dr, dg, db, 1); - j++; - } - } break; - } - else { - switch (blit->bits) { - case 16: - blit->spi_tx.tx_buffer = &blit->fb[start_off * 2]; - break; - case 1: - for (unsigned int i = start_off; i < end_off; i++) - temp_blit[o++] = - blit->pal_16[(fb[i / 8] >> ((i & 7))) & 0x1]; - break; - case 2: - for (unsigned int i = start_off; i < end_off; i++) - temp_blit[o++] = - blit->pal_16[(fb[i / 4] >> ((i & 3) * 2)) & 0x3]; - break; - case 4: - for (unsigned int i = start_off; i < end_off; i++) { - temp_blit[o++] = - blit->pal_16[(fb[i / 2] >> ((i & 1) * 4)) & 0xf]; - } - break; - case 8: - case 9: - for (unsigned int i = start_off; i < end_off; i++) - temp_blit[o++] = blit->pal_16[fb[i]]; - break; - case 24: - for (unsigned int i = start_off; i < end_off; i++) - temp_blit[o++] = ctx_565_pack( - fb[i * 3 + 0], fb[i * 3 + 1], fb[i * 3 + 2], 1); - break; - case 32: { - int x = start_off % 240; - int y = start_off / 240; - uint8_t *src = (uint8_t *)&fb[start_off * 4]; - for (unsigned int i = start_off; i < end_off; i++) { - uint8_t rgba[4]; - { - int val = src[0] + a_dither(x, y, 32); - if (val < 0) val = 0; - if (val > 255) val = 255; - rgba[0] = val; - } - { - int val = src[1] + a_dither(x, y, 16); - if (val < 0) val = 0; - if (val > 255) val = 255; - rgba[1] = val; - } - { - int val = src[2] + a_dither(x, y, 32); - if (val < 0) val = 0; - if (val > 255) val = 255; - rgba[2] = val; - } - - temp_blit[o++] = - ctx_565_pack(rgba[0], rgba[1], rgba[2], 1); - src += 4; - x++; - if (x == 240) { - x = 0; - y++; - } - } - } break; - } - } - } - blit->off += pix_count; -} - static inline esp_err_t flow3r_bsp_gc9a01_blit_next( flow3r_bsp_gc9a01_blit_t *blit) { size_t size = blit->left; @@ -1009,9 +576,9 @@ static inline esp_err_t flow3r_bsp_gc9a01_blit_next( // transaction. memset(&blit->spi_tx, 0, sizeof(spi_transaction_t)); blit->spi_tx.length = pix_count * 16; - blit->spi_tx.tx_buffer = temp_blit; blit->spi_tx.user = &blit->gc9a01_tx; - flow3r_bsp_prep_blit(blit, pix_count); + blit->spi_tx.tx_buffer = &blit->fb[blit->off * 2]; + blit->off += pix_count; blit->left -= size; esp_err_t res = @@ -1027,40 +594,29 @@ static inline esp_err_t flow3r_bsp_gc9a01_blit_next( return res; } -static esp_err_t flow3r_bsp_gc9a01_blit_start(flow3r_bsp_gc9a01_t *gc9a01, +static inline esp_err_t flow3r_bsp_gc9a01_blit_start(flow3r_bsp_gc9a01_t *gc9a01, flow3r_bsp_gc9a01_blit_t *blit, - const uint16_t *fb, int bits, - int scale, const void *osd_fb, - int osd_x0, int osd_y0, - int osd_x1, int osd_y1) { + const uint16_t *fb, + int i) { memset(blit, 0, sizeof(flow3r_bsp_gc9a01_blit_t)); blit->gc9a01 = gc9a01; blit->fb = (const uint8_t *)fb; - blit->bits = bits; - blit->osd_fb = (const uint8_t *)osd_fb; - blit->osd_x0 = osd_x0; - blit->osd_x1 = osd_x1; - blit->osd_y0 = osd_y0; - blit->osd_y1 = osd_y1; - blit->scale = scale; - blit->left = 2 * 240 * 240; // left in native bytes (16bpp) - if (bits < 16) { - uint8_t *pal_24 = st3m_pal; - blit->pal_16 = st3m_pal16; - for (int i = 0; i < 256; i++) - blit->pal_16[i] = ctx_565_pack(pal_24[i * 3 + 0], pal_24[i * 3 + 1], - pal_24[i * 3 + 2], 1); + blit->left = 2 * 240 * 240 / 4; // left in native bytes (16bpp) + + esp_err_t ret = flow3r_bsp_gc9a01_row_set(gc9a01, (i*60), (i*60) + 59); + if (ret != ESP_OK) { + return ret ; } return flow3r_bsp_gc9a01_cmd_sync(gc9a01, Cmd_RAMWR); } -static uint8_t flow3r_bsp_gc9a01_blit_done(flow3r_bsp_gc9a01_blit_t *blit) { +static inline uint8_t flow3r_bsp_gc9a01_blit_done(flow3r_bsp_gc9a01_blit_t *blit) { return blit->left == 0; } -static esp_err_t flow3r_bsp_gc9a01_blit_wait_done( +static inline esp_err_t flow3r_bsp_gc9a01_blit_wait_done( flow3r_bsp_gc9a01_blit_t *blit, TickType_t ticks_to_wait) { spi_transaction_t *tx_done; esp_err_t ret = @@ -1068,13 +624,9 @@ static esp_err_t flow3r_bsp_gc9a01_blit_wait_done( return ret; } -esp_err_t flow3r_bsp_gc9a01_blit_osd(flow3r_bsp_gc9a01_t *gc9a01, - const void *fb, int bits, int scale, - const void *osd_fb, int osd_x0, int osd_y0, - int osd_x1, int osd_y1) { +esp_err_t flow3r_bsp_gc9a01_blit_full(flow3r_bsp_gc9a01_t *gc9a01, const void *fb, int i) { flow3r_bsp_gc9a01_blit_t blit; - esp_err_t res = flow3r_bsp_gc9a01_blit_start( - gc9a01, &blit, fb, bits, scale, osd_fb, osd_x0, osd_y0, osd_x1, osd_y1); + esp_err_t res = flow3r_bsp_gc9a01_blit_start(gc9a01, &blit, fb, i); if (res != ESP_OK) { return res; } @@ -1090,9 +642,4 @@ esp_err_t flow3r_bsp_gc9a01_blit_osd(flow3r_bsp_gc9a01_t *gc9a01, } } return ESP_OK; -} - -esp_err_t flow3r_bsp_gc9a01_blit_full(flow3r_bsp_gc9a01_t *gc9a01, - const void *fb, int bits) { - return flow3r_bsp_gc9a01_blit_osd(gc9a01, fb, bits, 1, NULL, 0, 0, 0, 0); -} +} \ No newline at end of file diff --git a/components/flow3r_bsp/flow3r_bsp_gc9a01.h b/components/flow3r_bsp/flow3r_bsp_gc9a01.h index 28ed0cb5..7877b58d 100644 --- a/components/flow3r_bsp/flow3r_bsp_gc9a01.h +++ b/components/flow3r_bsp/flow3r_bsp_gc9a01.h @@ -67,12 +67,7 @@ esp_err_t flow3r_bsp_gc9a01_init(flow3r_bsp_gc9a01_t *gc9a01, // // if overlay is provided we want it composited in, the pixel format of overlay // depends on bits - it is presumed to be the same size as fb. -esp_err_t flow3r_bsp_gc9a01_blit_full(flow3r_bsp_gc9a01_t *gc9a01, - const void *fb, int bits); -esp_err_t flow3r_bsp_gc9a01_blit_osd(flow3r_bsp_gc9a01_t *gc9a01, - const void *fb, int bits, int scale, - const void *osd_fb, int osd_x0, int osd_y0, - int osd_x1, int osd_y1); +esp_err_t flow3r_bsp_gc9a01_blit_full(flow3r_bsp_gc9a01_t *gc9a01, const void *fb, int i); // Set backlight for display, using integer percent value (0-100, clamped). esp_err_t flow3r_bsp_gc9a01_backlight_set(flow3r_bsp_gc9a01_t *gc9a01, diff --git a/components/st3m/CMakeLists.txt b/components/st3m/CMakeLists.txt index d464d397..592741cf 100644 --- a/components/st3m/CMakeLists.txt +++ b/components/st3m/CMakeLists.txt @@ -6,9 +6,7 @@ endif() idf_component_register( SRCS - st3m_gfx.c st3m_counter.c - st3m_scope.c st3m_imu.c "${ST3M_VERSION_PATH}" INCLUDE_DIRS diff --git a/components/st3m/st3m_imu.c b/components/st3m/st3m_imu.c index 0b433cce..fe626d5f 100644 --- a/components/st3m/st3m_imu.c +++ b/components/st3m/st3m_imu.c @@ -32,7 +32,7 @@ void st3m_imu_init() { return; } - xTaskCreate(&_task, "imu", 4096, NULL, configMAX_PRIORITIES - 2, NULL); + xTaskCreatePinnedToCore(&_task, "imu", 4096, NULL, configMAX_PRIORITIES - 2, NULL, 0); ESP_LOGI(TAG, "IMU task started"); } diff --git a/drivers/gc9a01/display.c b/drivers/gc9a01/display.c index 618a825c..6d16a1b7 100644 --- a/drivers/gc9a01/display.c +++ b/drivers/gc9a01/display.c @@ -1,118 +1,166 @@ #include "py/runtime.h" -#include "st3m_gfx.h" +#include "st3m_counter.h" #include "flow3r_bsp.h" #include "mp_uctx.h" #include -bool gfx_inited = false; +#include "esp_task.h" +#include "freertos/FreeRTOS.h" +#include "freertos/task.h" +#include "freertos/idf_additions.h" -static mp_obj_t bsp_init() { - flow3r_bsp_display_init(); - return MP_ROM_QSTR(MP_QSTR_sample); +static float smoothed_fps = 0.0f; + +static st3m_counter_rate_t rast_rate; + +static inline void gfx_fps_update(void) { + st3m_counter_rate_sample(&rast_rate); + float rate = 1000000.0 / st3m_counter_rate_average(&rast_rate); + smoothed_fps = smoothed_fps * 0.6 + 0.4 * rate; } -static MP_DEFINE_CONST_FUN_OBJ_0(bsp_init_obj, bsp_init); + +static bool gfx_inited = false; static mp_obj_t gfx_init() { if (!gfx_inited) { - st3m_gfx_init(); + st3m_counter_rate_init(&rast_rate); + flow3r_bsp_display_init(); gfx_inited = true; } return mp_const_none; } static MP_DEFINE_CONST_FUN_OBJ_0(gfx_init_obj, gfx_init); - static mp_obj_t get_fps() { - return mp_obj_new_float(st3m_gfx_fps()); + return mp_obj_new_float(smoothed_fps); } static MP_DEFINE_CONST_FUN_OBJ_0(get_fps_obj, get_fps); #define TILDAGON_DISPLAY_WIDTH 240 #define TILDAGON_DISPLAY_HEIGHT 240 -//EXT_RAM_BSS_ATTR -static uint8_t tildagon_fb[TILDAGON_DISPLAY_WIDTH * TILDAGON_DISPLAY_HEIGHT * 2]; +static uint8_t tildagon_fb[TILDAGON_DISPLAY_WIDTH * TILDAGON_DISPLAY_HEIGHT * 2] __attribute__((aligned(16))); static Ctx *tildagon_ctx = NULL; -Ctx *tildagon_gfx_ctx(void) -{ - if (tildagon_ctx == NULL) - { - tildagon_ctx = ctx_new_for_framebuffer (tildagon_fb, TILDAGON_DISPLAY_WIDTH, TILDAGON_DISPLAY_HEIGHT, TILDAGON_DISPLAY_WIDTH * 2, CTX_FORMAT_RGB565_BYTESWAPPED); - } - return tildagon_ctx; +typedef enum { + FB_INVALID, + FB_RENDERED, + FB_DISPLAYED, +} FramebufferState; +static FramebufferState fb_sect_state[4] = {FB_INVALID, FB_INVALID, FB_INVALID, FB_INVALID}; + +static portTASK_FUNCTION(vADisplayFlip, pvParameters) { + for (;;) { + for (int i = 0; i < 4; i++) { + while (fb_sect_state[i] != FB_RENDERED) { + xTaskNotifyWait(0, ULONG_MAX, NULL, portMAX_DELAY); + } + flow3r_bsp_display_send_fb(tildagon_fb + (TILDAGON_DISPLAY_WIDTH * TILDAGON_DISPLAY_HEIGHT * 2 / 4) * i, i); + fb_sect_state[i] = FB_INVALID; + } + } + vTaskDelete(NULL); } -void tildagon_start_frame(Ctx *ctx) -{ - int32_t offset_x = FLOW3R_BSP_DISPLAY_WIDTH / 2; - int32_t offset_y = FLOW3R_BSP_DISPLAY_HEIGHT / 2; +TaskHandle_t display_flip_task = NULL; + +static mp_obj_t start_display_flip_task() { + xTaskCreatePinnedToCore(vADisplayFlip, + "DisplayFlip", + 2048, + NULL, + tskIDLE_PRIORITY + 2, + &display_flip_task, 0); - ctx_save (ctx); - ctx_identity (ctx); - ctx_apply_transform (ctx, 1.0f, 0.0f, offset_x, 0.0f, 1.0f, offset_y, 0.0f, 0.0f, 1.0f); + return mp_const_none; } +static MP_DEFINE_CONST_FUN_OBJ_0(start_display_flip_task_obj, start_display_flip_task); -static mp_obj_t get_ctx() { - Ctx *ctx = tildagon_gfx_ctx(); - assert (ctx); - tildagon_start_frame (ctx); - return mp_ctx_from_ctx(ctx); +static inline Ctx *tildagon_gfx_ctx(void) { + if (tildagon_ctx == NULL) + { + tildagon_ctx = ctx_new_for_framebuffer(tildagon_fb, TILDAGON_DISPLAY_WIDTH, TILDAGON_DISPLAY_HEIGHT, TILDAGON_DISPLAY_WIDTH * 2, CTX_FORMAT_RGB565_BYTESWAPPED); + } + return tildagon_ctx; } -static MP_DEFINE_CONST_FUN_OBJ_0(get_ctx_obj, get_ctx); -void tildagon_blit_fb (void) -{ - flow3r_bsp_display_send_fb(tildagon_fb, 16); +static inline void tildagon_start_frame(Ctx *ctx) { + int32_t offset_x = FLOW3R_BSP_DISPLAY_WIDTH / 2; + int32_t offset_y = FLOW3R_BSP_DISPLAY_HEIGHT / 2; + + ctx_save(ctx); + ctx_identity(ctx); + ctx_apply_transform(ctx, 1.0f, 0.0f, offset_x, 0.0f, 1.0f, offset_y, 0.0f, 0.0f, 1.0f); } -void tildagon_end_frame(Ctx *ctx) -{ - ctx_restore (ctx); - tildagon_blit_fb (); - st3m_gfx_fps_update (); +static mp_obj_t section_ready(mp_obj_t section) { + mp_uint_t i = mp_obj_int_get_uint_checked(section); + return fb_sect_state[i] == FB_INVALID ? mp_const_true : mp_const_false; +} +static MP_DEFINE_CONST_FUN_OBJ_1(section_ready_obj, section_ready); + +static mp_obj_t all_sections_ready() { + return (fb_sect_state[0] == FB_INVALID) && + (fb_sect_state[1] == FB_INVALID) && + (fb_sect_state[2] == FB_INVALID) && + (fb_sect_state[3] == FB_INVALID) + ? mp_const_true + : mp_const_false; +} +static MP_DEFINE_CONST_FUN_OBJ_0(all_sections_ready_obj, all_sections_ready); + +static mp_obj_t start_frame() { + Ctx *ctx = tildagon_gfx_ctx(); + assert(ctx); + tildagon_start_frame(ctx); + return mp_ctx_from_ctx(ctx); +} +static MP_DEFINE_CONST_FUN_OBJ_0(start_frame_obj, start_frame); + +static inline void tildagon_end_frame(Ctx *ctx) { + ctx_restore(ctx); + fb_sect_state[0] = FB_RENDERED; + fb_sect_state[1] = FB_RENDERED; + fb_sect_state[2] = FB_RENDERED; + fb_sect_state[3] = FB_RENDERED; + if (display_flip_task) { + xTaskNotify(display_flip_task, 0, eNoAction); + } + gfx_fps_update(); } static mp_obj_t end_frame(mp_obj_t ctx) { mp_ctx_obj_t *self = MP_OBJ_TO_PTR(ctx); - tildagon_end_frame (self->ctx); + tildagon_end_frame(self->ctx); return ctx; } static MP_DEFINE_CONST_FUN_OBJ_1(end_frame_obj, end_frame); -static mp_obj_t splash() { - for (int i = 0; i < 5; i++) { - st3m_gfx_splash(""); - } - return MP_ROM_QSTR(MP_QSTR_sample); -} -static MP_DEFINE_CONST_FUN_OBJ_0(splash_obj, splash); - static mp_obj_t hexagon(size_t n_args, const mp_obj_t *args) { // Draw a regular hexagon in a context and return the context mp_ctx_obj_t *ctx = MP_OBJ_TO_PTR(args[0]); float x = mp_obj_get_float(args[1]); float y = mp_obj_get_float(args[2]); float dim = mp_obj_get_float(args[3]); - + // All the internal angles are 120 degrees, or 2/3 pi radians // This translates to either an offset of (1, 0) or the pair below float minor_component = cos(M_PI / 3); float major_component = sin(M_PI / 3); - + // Stash the caller's axes ctx_save(ctx->ctx); - + // Set the origin to the centre of the hexagon and scale to the size - ctx_translate (ctx->ctx, x, y); - ctx_scale (ctx->ctx, dim, dim); - + ctx_translate(ctx->ctx, x, y); + ctx_scale(ctx->ctx, dim, dim); + // Rotate so point is at the top - the drawing code has the flat side at the top ctx_rotate(ctx->ctx, M_PI / 2.0f); - + // Move to the start of the top left line ctx_move_to(ctx->ctx, -minor_component, -major_component); - + // Draw the six segments ctx_rel_line_to(ctx->ctx, 1.0f, 0.0f); ctx_rel_line_to(ctx->ctx, minor_component, major_component); @@ -120,10 +168,10 @@ static mp_obj_t hexagon(size_t n_args, const mp_obj_t *args) { ctx_rel_line_to(ctx->ctx, -1.0f, 0.0f); ctx_rel_line_to(ctx->ctx, -minor_component, -major_component); ctx_rel_line_to(ctx->ctx, minor_component, -major_component); - + // Fill the hexagon ctx_fill(ctx->ctx); - + // Restore the axes ctx_restore(ctx->ctx); @@ -136,11 +184,12 @@ static MP_DEFINE_CONST_FUN_OBJ_VAR(hexagon_obj, 4, hexagon); static const mp_rom_map_elem_t display_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_display) }, { MP_ROM_QSTR(MP_QSTR_gfx_init), MP_ROM_PTR(&gfx_init_obj) }, - { MP_ROM_QSTR(MP_QSTR_bsp_init), MP_ROM_PTR(&bsp_init_obj) }, - { MP_ROM_QSTR(MP_QSTR_splash), MP_ROM_PTR(&splash_obj) }, { MP_ROM_QSTR(MP_QSTR_get_fps), MP_ROM_PTR(&get_fps_obj) }, - { MP_ROM_QSTR(MP_QSTR_get_ctx), MP_ROM_PTR(&get_ctx_obj) }, + { MP_ROM_QSTR(MP_QSTR_start_frame), MP_ROM_PTR(&start_frame_obj) }, { MP_ROM_QSTR(MP_QSTR_end_frame), MP_ROM_PTR(&end_frame_obj) }, + { MP_ROM_QSTR(MP_QSTR_start_display_flip_task), MP_ROM_PTR(&start_display_flip_task_obj) }, + { MP_ROM_QSTR(MP_QSTR_section_ready), MP_ROM_PTR(§ion_ready_obj) }, + { MP_ROM_QSTR(MP_QSTR_all_sections_ready), MP_ROM_PTR(&all_sections_ready_obj) }, { MP_ROM_QSTR(MP_QSTR_hexagon), MP_ROM_PTR(&hexagon_obj) }, }; static MP_DEFINE_CONST_DICT(display_module_globals, display_module_globals_table); diff --git a/drivers/gc9a01/mp_uctx.c b/drivers/gc9a01/mp_uctx.c index 5b425af7..4c592776 100644 --- a/drivers/gc9a01/mp_uctx.c +++ b/drivers/gc9a01/mp_uctx.c @@ -5,7 +5,6 @@ #include "py/runtime.h" #include "mp_uctx.h" -#include "st3m_scope.h" void gc_collect(void); #ifdef EMSCRIPTEN @@ -242,13 +241,6 @@ MP_CTX_COMMON_FUN_6F(radial_gradient); MP_CTX_COMMON_FUN_3F(logo); -static mp_obj_t mp_ctx_scope(mp_obj_t self_in) { - mp_ctx_obj_t *self = MP_OBJ_TO_PTR(self_in); - st3m_scope_draw(self->ctx); - return self_in; -} -MP_DEFINE_CONST_FUN_OBJ_1(mp_ctx_scope_obj, mp_ctx_scope); - #if 0 @@ -873,7 +865,6 @@ static const mp_rom_map_elem_t mp_ctx_locals_dict_table[] = { #endif #endif MP_CTX_METHOD(logo), - MP_CTX_METHOD(scope), // Instance attributes MP_CTX_ATTR(x), diff --git a/micropython b/micropython index 5114f2c1..f498a16c 160000 --- a/micropython +++ b/micropython @@ -1 +1 @@ -Subproject commit 5114f2c1ea7c05fc7ab920299967595cfc5307de +Subproject commit f498a16c7db6d4b2de200b3e0856528dfe0613c3 diff --git a/modules/app_components/layout.py b/modules/app_components/layout.py index b6410d27..06f107db 100644 --- a/modules/app_components/layout.py +++ b/modules/app_components/layout.py @@ -188,7 +188,7 @@ async def button_event(self, event) -> bool: bar = app_components.layout.DefinitionDisplay("Wifi", "emfcamp") layout = app_components.layout.LinearLayout([text, foo, bar]) -ctx=display.get_ctx() +ctx=display.start_frame() app_components.clear_background(ctx) ctx.rgb(1,1,1) layout.draw(ctx) @@ -198,7 +198,7 @@ async def button_event(self, event) -> bool: """ def scroll(): for i in range(20): - ctx=display.get_ctx() + ctx=display.start_frame() app_components.clear_background(ctx) ctx.rgb(1,1,1) layout.draw(ctx) diff --git a/modules/firmware_apps/intro_app.py b/modules/firmware_apps/intro_app.py index 72c59602..ea1ccbcb 100644 --- a/modules/firmware_apps/intro_app.py +++ b/modules/firmware_apps/intro_app.py @@ -41,6 +41,7 @@ def draw(self, ctx): class IntroApp(app.App): def __init__(self, text="EMF Camp", n_hexagons=5): + super().__init__() self.text = text self.hexagons = [Hexagon() for _ in range(n_hexagons)] self.time_elapsed = 0 diff --git a/modules/firmware_apps/menu_demo.py b/modules/firmware_apps/menu_demo.py index 27dfe34b..b0d913cd 100644 --- a/modules/firmware_apps/menu_demo.py +++ b/modules/firmware_apps/menu_demo.py @@ -14,6 +14,7 @@ class MenuDemo(App): def __init__(self): + super().__init__() self.current_menu = "main" self.menu = Menu( self, diff --git a/modules/firmware_apps/patterninhibit.py b/modules/firmware_apps/patterninhibit.py index 1fdefd91..772f88e0 100644 --- a/modules/firmware_apps/patterninhibit.py +++ b/modules/firmware_apps/patterninhibit.py @@ -10,6 +10,7 @@ class PatternInhibit(app.App): def __init__(self): + super().__init__() self.button_states = Buttons(self) eventbus.emit(PatternDisable()) self._make_red() diff --git a/modules/firmware_apps/settings_app.py b/modules/firmware_apps/settings_app.py index b01cfc31..d2d31106 100644 --- a/modules/firmware_apps/settings_app.py +++ b/modules/firmware_apps/settings_app.py @@ -39,6 +39,7 @@ def reset_wifi_settings(): class SettingsApp(app.App): def __init__(self): + super().__init__() self.layout = layout.LinearLayout(items=[layout.DefinitionDisplay("", "")]) self.overlays = [] self.dialog = None diff --git a/modules/firmware_apps/sponsors.py b/modules/firmware_apps/sponsors.py index ba8738a8..a1eeb849 100644 --- a/modules/firmware_apps/sponsors.py +++ b/modules/firmware_apps/sponsors.py @@ -13,6 +13,7 @@ class Sponsors(App): def __init__(self): + super().__init__() self.current_menu = "main" self.menu = Menu( self, diff --git a/modules/initgfx.py b/modules/initgfx.py index fa2310c1..c4e5604f 100644 --- a/modules/initgfx.py +++ b/modules/initgfx.py @@ -3,24 +3,24 @@ display.gfx_init() -ctx = display.get_ctx() +ctx = display.start_frame() ctx.rgb(1, 0, 0).rectangle(-120, -120, 240, 240).fill() display.end_frame(ctx) time.sleep(0.33) -ctx = display.get_ctx() +ctx = display.start_frame() ctx.rgb(0, 1, 0).rectangle(-120, -120, 240, 240).fill() display.end_frame(ctx) time.sleep(0.33) -ctx = display.get_ctx() +ctx = display.start_frame() ctx.rgb(0, 0, 1).rectangle(-120, -120, 240, 240).fill() display.end_frame(ctx) time.sleep(0.33) -ctx = display.get_ctx() +ctx = display.start_frame() ctx.rgb(0, 0, 0).rectangle(-120, -120, 240, 240).fill() display.end_frame(ctx) diff --git a/modules/system/launcher/app.py b/modules/system/launcher/app.py index 41b041a2..e8411bc6 100644 --- a/modules/system/launcher/app.py +++ b/modules/system/launcher/app.py @@ -89,6 +89,7 @@ def list_user_apps(): class Launcher(App): def __init__(self): + super().__init__() self.update_menu() self._apps = {} eventbus.on_async(RequestStopAppEvent, self._handle_stop_app, self) diff --git a/modules/system/notification/app.py b/modules/system/notification/app.py index 646378a4..b1b2db01 100644 --- a/modules/system/notification/app.py +++ b/modules/system/notification/app.py @@ -6,6 +6,7 @@ class NotificationService(app.App): def __init__(self): + super().__init__() eventbus.on_async( ShowNotificationEvent, self._handle_incoming_notification, self ) diff --git a/modules/system/patterndisplay/app.py b/modules/system/patterndisplay/app.py index 9699b560..481cf730 100644 --- a/modules/system/patterndisplay/app.py +++ b/modules/system/patterndisplay/app.py @@ -8,6 +8,7 @@ class PatternDisplay(App): def __init__(self): + super().__init__() eventbus.on_async(PatternEnable, self._enable, self) eventbus.on_async(PatternDisable, self._disable, self) eventbus.on_async(PatternReload, self._reload, self) diff --git a/modules/system/scheduler/__init__.py b/modules/system/scheduler/__init__.py index 2366dc10..a8fb18f3 100644 --- a/modules/system/scheduler/__init__.py +++ b/modules/system/scheduler/__init__.py @@ -206,13 +206,16 @@ async def app_wrapper(): await asyncio.sleep(1)""" async def _render_task(self): + display.start_display_flip_task() while True: # Do not bother re-rendering unless an update has happened await self.render_needed.wait() self.render_needed.clear() with PerfTimer("render"): - ctx = display.get_ctx() + while not display.all_sections_ready(): + await asyncio.sleep(0) + ctx = display.start_frame() for app in self.foreground_stack[-1:] + self.on_top_stack: with PerfTimer(f"rendering {app}"): ctx.save() diff --git a/modules/tildagonos.py b/modules/tildagonos.py index 8a15a8f9..9ba7cc36 100644 --- a/modules/tildagonos.py +++ b/modules/tildagonos.py @@ -1,6 +1,5 @@ from machine import Pin, SPI import neopixel -import gc9a01py as gc9a01 from egpio import ePin BUS_SYSTEM = 7 @@ -28,13 +27,6 @@ def __init__(self): self.spi = None self.tft = None - def init_display(self): - self.spi = SPI(1, 40000000, sck=Pin(8), mosi=Pin(7)) - self.tft = gc9a01.GC9A01( - self.spi, dc=Pin(2, Pin.OUT), cs=Pin(1, Pin.OUT), rotation=2 - ) - self.tft.fill(gc9a01.MAGENTA) - def init_gpio(self): print( "Warning init_gpio has been depriciated use system.hexpansion.config HexpansionConfig or tildagon Pin instead" diff --git a/scripts/hard-reset.sh b/scripts/hard-reset.sh new file mode 100755 index 00000000..c5df54a1 --- /dev/null +++ b/scripts/hard-reset.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Hard resets submodules. +# Assumes submodules are initialised. +# scripts/firstTime.sh will need to be rerun after this. + +# Use: sudo scripts/hard_reset.sh + +cd micropython +git submodule foreach git clean -fdx +git clean -fdx +git reset --hard --recurse-submodules \ No newline at end of file diff --git a/sim/apps/example/app.py b/sim/apps/example/app.py index 83faf712..d3a5990c 100644 --- a/sim/apps/example/app.py +++ b/sim/apps/example/app.py @@ -6,6 +6,7 @@ class ExampleApp(app.App): def __init__(self): + super().__init__() self.button_states = Buttons(self) def update(self, delta): diff --git a/sim/fakes/_sim.py b/sim/fakes/_sim.py index b16f3f6e..35af232a 100644 --- a/sim/fakes/_sim.py +++ b/sim/fakes/_sim.py @@ -497,7 +497,7 @@ def set_overlay_clip(x, y, x2, y2): overlay_clip = (x, y, x2 - x, y2 - y) -def get_ctx(): +def start_frame(): dctx = ctx._wasm.ctx_new_drawlist(240, 240) return ctx.Context(dctx) diff --git a/sim/fakes/display.py b/sim/fakes/display.py index c04d9a07..7e456b1b 100644 --- a/sim/fakes/display.py +++ b/sim/fakes/display.py @@ -13,8 +13,8 @@ def end_frame(ctx): times = [time for time in times if time > now - 1000] _sim.display_update(ctx) -def get_ctx(): - return _sim.get_ctx() +def start_frame(): + return _sim.start_frame() def hexagon(ctx, x, y, dim): return ctx.round_rectangle(x-dim, y-dim, 2*dim, 2*dim, dim).fill() diff --git a/sim/fakes/sys_display.py b/sim/fakes/sys_display.py index acac485d..01e7770d 100644 --- a/sim/fakes/sys_display.py +++ b/sim/fakes/sys_display.py @@ -34,7 +34,7 @@ def fps(): update = _sim.display_update -get_ctx = _sim.get_ctx +start_frame = _sim.start_frame get_overlay_ctx = _sim.get_overlay_ctx overlay_clip = _sim.set_overlay_clip osd = 256 @@ -43,7 +43,7 @@ def fps(): def ctx(foo): if foo == osd: return _sim.get_overlay_ctx() - return _sim.get_ctx() + return _sim.start_frame() def set_backlight(a): diff --git a/tildagon/sdkconfig.board b/tildagon/sdkconfig.board index 8feb924c..971b0344 100644 --- a/tildagon/sdkconfig.board +++ b/tildagon/sdkconfig.board @@ -28,3 +28,32 @@ CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR=n CONFIG_APP_PROJECT_VER_FROM_CONFIG=y CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP=y + +CONFIG_COMPILER_OPTIMIZATION_DEBUG=n +CONFIG_COMPILER_OPTIMIZATION_PERF=n +CONFIG_COMPILER_OPTIMIZATION_NONE=n +CONFIG_COMPILER_OPTIMIZATION_SIZE=y + +CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=n +CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y + +CONFIG_LOG_DEFAULT_LEVEL_NONE=n +CONFIG_LOG_DEFAULT_LEVEL_ERROR=n +CONFIG_LOG_DEFAULT_LEVEL_WARN=n +CONFIG_LOG_DEFAULT_LEVEL_INFO=y +CONFIG_LOG_DEFAULT_LEVEL_DEBUG=n +CONFIG_LOG_DEFAULT_LEVEL_VERBOSE=n + +CONFIG_LOG_TAG_LEVEL_IMPL_NONE=y +CONFIG_LOG_TAG_LEVEL_IMPL_LINKED_LIST=n +CONFIG_LOG_TAG_LEVEL_IMPL_CACHE_AND_LINKED_LIST=n + +CONFIG_LOG_DYNAMIC_LEVEL_CONTROL=n + +CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT=y + +CONFIG_ESP32S3_INSTRUCTION_CACHE_16KB=n +CONFIG_ESP32S3_INSTRUCTION_CACHE_32KB=y +CONFIG_ESP32S3_DATA_CACHE_16KB=n +CONFIG_ESP32S3_DATA_CACHE_32KB=n +CONFIG_ESP32S3_DATA_CACHE_64KB=y