![]() |
PicoVGA
1.0-cmake
VGA/TV display on Raspberry Pico
|
Functions for initialzing the library.
The video mode can be initialized either simply by the Video() function or in more detail by the following functions.
Functions | |
void | StartVgaCore () |
Start the VGA processing on core1. More... | |
void | VgaInitReq (const sVmode *vmode) |
Request to initialize VGA videomode. More... | |
void | Video (u8 dev, u8 res, u8 form, u8 *buf, const void *buf2=FontBoldB8x16) |
Simplified initialization of the video mode. More... | |
void StartVgaCore | ( | ) |
Start the VGA processing on core1.
The first function that should be called in the project. Starts the second processor core with the PicoVGA library.
void VgaInitReq | ( | const sVmode * | vmode | ) |
Request to initialize VGA videomode.
This function passes the library a pointer to the format descriptor generated by the VgaCfg() function. This function does not actually initialize the video mode, it just passes the pointer to the library in the 2nd processor core and then waits for confirmation that the initialization is complete. If the video mode needs to be changed (this refers to changing the timing of the video signal and changing the type of overlay layers), it is necessary to first stop the video generation by calling the VgaInitReq function with the NULL parameter, and only then call the function with the new video mode setting.
vmode | Video format description generated by VgaCfg() or NULL to stop driver. |
void Video | ( | u8 | dev, |
u8 | res, | ||
u8 | form, | ||
u8 * | buf, | ||
const void * | buf2 = FontBoldB8x16 |
||
) |
Simplified initialization of the video mode.
This function incorporates all the video initialization and configuration functions – this one call initializes the video mode and starts the library. It supports only 1 display segment and has a limited repertoire of formats and resolutions, but may be sufficient in some cases. The function only needs to pass a pointer to the frame buffer, which is a u8 array of sufficient size for the image data. The function uses the library's default global structures (Cfg, Vmode, Canvas), otherwise the program can use the default global structures arbitrarily. When using the Video function, the initialization functions are not needed.
dev | Output device |
res | Resolution |
form | Graphics format |
buf | Pointer to frame buffer (must be aligned to 4-bites, use ALIGNED attribute) |
buf2 | Pointer to additional buffer: FORM_TILE*: Pointer to column of tiles 32x32 in 8-bit graphics FORM_TEXT: Pointer to font 8x16 or 8x8 (size 4 KB or 2 KB, ALIGNED attribute, should be in RAM) copy font to 4KB or 2 KB RAM buffer with ALIGNED attribute text uses color attributes PC_* FORM_RLE: Pointer to image rows (ALIGNED attribute, should be in RAM) |