display — display driver

The display module exposes drivers for external displays that can be attached to an OpenMV Cam. Four interfaces are supported:

  • SPI-attached TFTs (the smaller 16-bit displays such as the SSD1351), via SPIDisplay.

  • 24-bit parallel RGB panels driven by the LTDC/LCD-TFT controller, via RGBDisplay. The same parallel bus also feeds external HDMI / DisplayPort converters (e.g. a TFP410), so HDMI and DisplayPort outputs are configured through RGBDisplay too.

  • MIPI-DSI panels, via DSIDisplay.

  • NTSC analog video on the OpenMV TV shield, via TVDisplay.

Panel-specific initialisation lives in dedicated controller classes (SSD1351 for SPI panels, ST7701 for DSI panels) that are passed to the display constructor through the controller argument. Backlight brightness is driven by DACBacklight or PWMBacklight, hooked in via the backlight argument.

The constants below select the output frame size and are accepted as the framesize argument by every display class. Once constructed a display object accepts image.Image buffers via its write() method to present a frame.

Classes

Constants

display.QVGA: int

320x240 resolution for framesize.

display.TQVGA: int

240x320 resolution for framesize.

display.FHVGA: int

480x272 resolution for framesize.

display.FHVGA2: int

480x128 resolution for framesize.

display.VGA: int

640x480 resolution for framesize.

display.THVGA: int

320x480 resolution for framesize.

display.FWVGA: int

800x480 resolution for framesize.

display.FWVGA2: int

800x320 resolution for framesize.

display.TFWVGA: int

480x800 resolution for framesize.

display.TFWVGA2: int

480x480 resolution for framesize.

display.SVGA: int

800x600 resolution for framesize.

display.WSVGA: int

1024x600 resolution for framesize.

display.XGA: int

1024x768 resolution for framesize.

display.SXGA: int

1280x1024 resolution for framesize.

display.SXGA2: int

1280x400 resolution for framesize.

display.UXGA: int

1600x1200 resolution for framesize.

display.HD: int

1280x720 resolution for framesize.

display.FHD: int

1920x1080 resolution for framesize.

Note

Use a refresh of 30 Hz with this setting. The STM32H7 is not capable of driving 1080p at 60 Hz.

display.IOCTL_CHANNEL: int

ioctl selector for setting the TV display channel (TVDisplay only).