VSF Documented
vsf_fbcon_t Class Reference

#include <vsf_fbcon.h>

Data Fields

vk_disp_tdisp
 
vsf_stream_tstream
 

Detailed Description

vsf_fbcon_t - callback-driven framebuffer console

fbcon renders incoming byte stream data to a display panel using a built-in 8x16 bitmap font. It owns no task/thread; rendering is driven purely by stream rx events and display ready callbacks.

Memory-efficient design:

  • Uses a single-text-row line buffer instead of a full-frame pixel buffer.
  • Dirty rows are tracked with a bitmask and refreshed one at a time (async chain via ui_on_ready).
  • char_grid stores palette indices (1 byte each) rather than raw pixel colors, keeping it format-independent and compact (3 bytes/cell).
  • Pixel format is auto-detected from disp->param.color; supported: RGB332 (1B/px), RGB565 (2B/px), RGB888_32/ARGB8888 (4B/px).

Before calling vsf_fbcon_init(), the caller MUST initialize the following public members:

.disp - pointer to a vk_disp_t instance (display panel driver). fbcon will call vk_disp_init() on it internally. .stream - pointer to a vsf_stream_t instance that provides the input byte stream (e.g. a vsf_fifo_stream_t used as debug output). fbcon subscribes to VSF_STREAM_ON_RX on this stream.

Field Documentation

◆ disp

vk_disp_t* vsf_fbcon_t::disp

◆ stream

vsf_stream_t* vsf_fbcon_t::stream

◆ ch

uint8_t vsf_fbcon_t::ch

◆ fg

uint8_t vsf_fbcon_t::fg

◆ bg

uint8_t vsf_fbcon_t::bg
Generated from commit: vsfteam/vsf@ceb53fd