Skip to main content

Module cyd

Module cyd 

Source
Expand description

ESP32 support for Cheap Yellow Display (CYD) boards.

These boards combine a 320×240 ILI9341 display with XPT2046 resistive touch. After construction, applications use the portable display and calibrated-touch interfaces from device_envoy_core::cyd. The RP, WebAssembly, and in-memory implementations share these interfaces.

§See CYD in action

Linkage Blaze demonstrates animated clocks, mechanisms, and figures built with Device Envoy’s portable CYD display APIs. Explore the examples in the interactive Linkage Blaze gallery. Linkage Blaze gallery showing CYD applications

The portable Core CYD documentation provides the shared application example, drawing-strategy guide, implementation overview, and Linkage Blaze gallery.

Your drawing strategy determines the pixel-buffer capacity selected through CydEsp::new_static: use CydEsp::SCREEN_PIXELS for full-screen frames, the largest region’s pixel count for regional frames, tiling::TileGrid::max_tile_pixel_count for tiled drawing, or 0 for immediate operations and contiguous streaming.

Choose a constructor explains how to construct an ESP32 device. The ESP32 CYD touch-paint example puts both stages together in a complete program.

§Choose a constructor

Construction depends on how many SPI resources the CYD should use and whether the application needs touch:

  • CydEsp uses two SPI resources: one for the display and one for touch. Choose it when the board has both resources available. Construction also loads or runs touch calibration.
  • CydEspOneSpi uses one SPI resource for both the display and touch. Choose it when the board has only one available, or when the application needs to keep another SPI resource for something else. Device Envoy coordinates access internally.
  • CydDisplayEsp uses one SPI resource for the display and omits touch. Choose it when the application does not need touch.

The CydEsp::new, CydEspOneSpi::new, and CydDisplayEsp::new examples show the constructor arguments for each choice. After construction, shared application code can use the Cyd trait without naming an ESP type.

Modules§

tiling
Splits a display region into tiles so drawing needs only one small buffer.
touch
Touch-side support types for the CYD’s cyd device abstraction.

Structs§

CydDisplayEsp
An owned CYD-family ESP32 display component.
CydEsp
An ESP32 CYD device containing a display and calibrated touch input.
CydEspOneSpi
An ESP32 CYD device containing a display and calibrated touch input on one shared SPI bus.
CydFrameEsp
The ESP implementation of CydFrame.
CydStaticEsp
Static storage for a CydEsp-owned pixel buffer.
CydTouchEsp
An owned calibrated CYD-family ESP32 touch component.

Enums§

Error
Error from a CYD ESP display or touch operation.
Orientation
Display orientation for the fixed 320×240 CYD panel.

Constants§

DEFAULT_DISPLAY_SPI_HZ
Default SPI clock for CYD display traffic on ESP boards.
DEFAULT_FONT
The default font accepted by CydDisplayEsp::new. See that method’s compiled display-only constructor example.

Traits§

Cyd
A ready-to-use CYD device with display and calibrated touch components.
CydDisplay
A CYD display.
CydTouch
A CYD touch source that returns calibrated, oriented touch events in logical display coordinates.