Files
espresso_frame/firmware/main/epd_draw.h
T
tfaour 474b92a282
Build and push server image / test (push) Successful in 45s
Firmware build check / build-check (push) Successful in 2m50s
Build and push server image / build-and-push (push) Successful in 4m36s
Build and push server image / deploy (push) Failing after 1m34s
Add server-side support for a second panel (13.3in Spectra 6 / EE02) and scaffold its firmware target
Server: Frame.panel_type (new column + migration) is auto-derived from
the device's reported board (X-Frame-Board), never user-set -- the
panel is a property of the hardware, not a picker in the UI.
image_pipeline's packing/render pipeline is parameterized by panel
geometry instead of hardcoded 800x480 globals, with the real confirmed
13.3in geometry (1600x1200) registered alongside the original 7.3in
panel. Existing 7.3in frames are unaffected (column default + board
mapping both resolve to the original panel).

Board identifiers are also renamed (devkit/xiao -> devkit_esp32c6/
xiao_esp32c6, plus new "ee02") since the EE02 board also carries a XIAO
module -- "xiao" alone stopped disambiguating hardware. The server
keeps accepting the legacy bare names indefinitely for already-flashed
devices.

Firmware: scaffolds a third build target (ee02, ESP32-S3 -- a real
chip-target change, not just a same-chip Kconfig variant like xiao) and
a new epd13in3e driver component skeleton. The actual panel init/LUT/
refresh register sequence isn't ported from vendor demo code yet (none
was available), so that component deliberately fails to compile
(#error) rather than risk sending unverified register values to real
hardware -- devkit/xiao are unaffected and build identically to before.
CI's ee02 build step is continue-on-error for the same reason.
2026-08-04 20:08:22 +00:00

42 lines
1.9 KiB
C

#pragma once
#include <stddef.h>
#include <stdint.h>
#include "epd_board.h"
#include "fonts.h"
/** Sets one pixel in a malloc'd EPD_FRAME_BYTES buffer (packed 2px/byte, per epd_board.h). */
void epd_draw_pixel(uint8_t *frame, int x, int y, epd_color_t color);
/**
* Draws text (uppercased) in the given sFONT (see components/epaper_fonts)
* with its top-left corner at (origin_x, origin_y).
*/
void epd_draw_text(uint8_t *frame, const sFONT *font, const char *text, int origin_x, int origin_y);
/** Same as epd_draw_text(), but horizontally centered on center_x. */
void epd_draw_text_centered(uint8_t *frame, const sFONT *font, const char *text, int center_x, int y);
/**
* Same as epd_draw_pixel()/epd_draw_text()/epd_draw_text_centered(), but
* against an arbitrarily-sized buffer instead of a full EPD_FRAME_BYTES
* one -- stride is bytes per row (packed 2px/byte, so width/2), width and
* height are that buffer's pixel dimensions, used for bounds-checking
* instead of the panel's fixed EPD_WIDTH/EPD_HEIGHT. The non-_ex
* functions above are thin wrappers around these, passing
* EPD_BYTES_PER_ROW/EPD_WIDTH/EPD_HEIGHT -- existing callers are
* unaffected.
*/
void epd_draw_pixel_ex(uint8_t *buf, int stride, int width, int height, int x, int y, epd_color_t color);
void epd_draw_text_ex(uint8_t *buf, int stride, int width, int height, const sFONT *font, const char *text,
int origin_x, int origin_y);
void epd_draw_text_centered_ex(uint8_t *buf, int stride, int width, int height, const sFONT *font, const char *text,
int center_x, int y);
/** Draws a line of the given thickness (in pixels) between two points. */
void epd_draw_line(uint8_t *frame, int x0, int y0, int x1, int y1, int thickness);
/** Draws a checkmark (short down-stroke, long up-stroke) inside a size x size box at (x, y). */
void epd_draw_checkmark(uint8_t *frame, int x, int y, int size);