PebbleOS v4.47.0-1075-g013613c8a
Loading...
Searching...
No Matches
STM32 LTDC

Display driver for the STM32 LTDC, sending frames to a panel with frame memory. More...

Data Structures

struct  pbl_display_stm32_ltdc
 LTDC. More...
 

Macros

#define PBL_DISPLAY_STM32_LTDC_DEFINE(sym, _name, _base, _clk, _panel, _bridge, _rotation, _width, _height, _format, _fb, _fb_size, _fb_ram)
 Define the LTDC.
 

Detailed Description

Display driver for the STM32 LTDC, sending frames to a panel with frame memory.

The LTDC sends the rows of an update through its Display bridge, a DSI host in adapted command mode, to the frame memory of the panel, straight from the buffer given, as ST does on its boards: in two halves, left and right, the first from the tearing effect of the panel and the second once the first is out, each written where the scan of the panel is not. The panel takes the frame rotated by the devicetree rotation of the panel, turned by a further 180 degrees on request. The framebuffer the board reserves holds the frame the panel gets first.


Data Structure Documentation

◆ pbl_display_stm32_ltdc

struct pbl_display_stm32_ltdc

LTDC.

Data Fields
uintptr_t base Registers.
const struct pbl_display_bridge * bridge Bridge to the panel.
struct pbl_clk clk Pixel clock.
struct pbl_display disp Display.
const struct pbl_panel * panel Panel.
uint16_t rotation Rotation of the panel, in degrees counterclockwise.
struct pbl_display_stm32_ltdc_state * state Driver runtime state.

Macro Definition Documentation

◆ PBL_DISPLAY_STM32_LTDC_DEFINE

#define PBL_DISPLAY_STM32_LTDC_DEFINE (   sym,
  _name,
  _base,
  _clk,
  _panel,
  _bridge,
  _rotation,
  _width,
  _height,
  _format,
  _fb,
  _fb_size,
  _fb_ram 
)
Value:
static_assert((_rotation) % 90 == 0 && (_rotation) < 360, "rotation of 0, 90, 180 or 270"); \
PBL_DISPLAY_STATE_DEFINE(sym); \
static struct pbl_display_stm32_ltdc_state sym##_ltdc_state; \
PBL_DEVICE_INSTANCE(sym, struct pbl_display_stm32_ltdc, struct pbl_display, disp) { \
.disp = PBL_DISPLAY_INIT_FRAMEBUFFER(sym, _name, nullptr, &pbl_display_stm32_ltdc_ops, _width, \
_height, _format, false, _fb, _fb_size, _fb_ram), \
.state = &sym##_ltdc_state, .base = (_base), .clk = _clk, .panel = (_panel), \
.bridge = (_bridge), .rotation = (_rotation), \
}
LTDC.
Definition stm32_ltdc.h:56
A display.
Definition display.h:146
#define PBL_DISPLAY_INIT_FRAMEBUFFER(sym, _name, _parent, _ops, _width, _height, _format, _rotated, _fb, _fb_size, _fb_ram,...)
Initializer for the struct pbl_display of display sym, with the memory the board reserves for its fra...
Definition display.h:217

Define the LTDC.

Parameters
symSymbol of the display.
_nameName.
_baseRegisters.
_clkPixel clock, from PBL_CLK().
_panelPanel.
_bridgeBridge to the panel.
_rotationRotation of the panel: 0, 90, 180 or 270 degrees.
_widthWidth of the framebuffer, in pixels.
_heightHeight of the framebuffer, in pixels.
_formatFormat of the framebuffer, a pbl_display_format.
_fbAddress of the framebuffer.
_fb_sizeIts size, in bytes.
_fb_ramRAM device the framebuffer is in, or NULL.