display --- 顯示器驅動程式

display 模組提供可連接至 OpenMV Cam 的外接顯示器驅動程式。支援四種介面:

  • SPI 連接的 TFT(如 SSD1351 等較小的 16 位元顯示器),透過 SPIDisplay

  • 由 LTDC/LCD-TFT 控制器驅動的 24 位元並列 RGB 面板,透過 RGBDisplay。同一條並列匯流排也供給外接 HDMI/DisplayPort 轉換器(例如 TFP410),因此 HDMI 與 DisplayPort 輸出也是透過 RGBDisplay 來設定。

  • MIPI-DSI 面板,透過 DSIDisplay

  • OpenMV TV 擴充板上的 NTSC 類比視訊,透過 TVDisplay

面板專屬的初始化置於專用的控制器類別中(SSD1351 用於 SPI 面板,ST7701 用於 DSI 面板),並透過 controller 引數傳遞給顯示器建構子。背光亮度由 DACBacklightPWMBacklight 驅動,透過 backlight 引數掛接。

下列常數用於選擇輸出影格大小,每個顯示器類別皆接受其作為 framesize 引數。建構完成後,顯示器物件透過其 write() 方法接受 image.Image 緩衝區以呈現影格。

類別

常數

display.QVGA: int

framesize 的 320x240 解析度。

display.TQVGA: int

framesize 的 240x320 解析度。

display.FHVGA: int

framesize 的 480x272 解析度。

display.FHVGA2: int

framesize 的 480x128 解析度。

display.VGA: int

framesize 的 640x480 解析度。

display.THVGA: int

framesize 的 320x480 解析度。

display.FWVGA: int

framesize 的 800x480 解析度。

display.FWVGA2: int

framesize 的 800x320 解析度。

display.TFWVGA: int

framesize 的 480x800 解析度。

display.TFWVGA2: int

framesize 的 480x480 解析度。

display.SVGA: int

framesize 的 800x600 解析度。

display.WSVGA: int

framesize 的 1024x600 解析度。

display.XGA: int

framesize 的 1024x768 解析度。

display.SXGA: int

framesize 的 1280x1024 解析度。

display.SXGA2: int

framesize 的 1280x400 解析度。

display.UXGA: int

framesize 的 1600x1200 解析度。

display.HD: int

framesize 的 1280x720 解析度。

display.FHD: int

framesize 的 1920x1080 解析度。

備註

在此設定下請使用 30 Hz 的 refresh。STM32H7 無法以 60 Hz 驅動 1080p。

display.IOCTL_CHANNEL: int

用於設定 TV 顯示通道的 ioctl 選擇器(僅限 TVDisplay)。