PowerBlocks SDK
 
Loading...
Searching...
No Matches
video.h
Go to the documentation of this file.
1
12
13#pragma once
14
15#include <stdint.h>
16
18
27typedef enum {
28 VIDEO_MODE_UNINITIALIZED,
29 VIDEO_MODE_640X480_NTSC_INTERLACED,
30 VIDEO_MODE_640X480_NTSC_PROGRESSIVE,
31 VIDEO_MODE_640X480_PAL50,
32 VIDEO_MODE_640X480_PAL60
34
42typedef struct {
43 uint16_t width;
44 uint16_t efb_height;
45 uint16_t xfb_height;
46
47 uint8_t copy_pattern[12][2];
48 uint8_t copy_filer[7];
50
58typedef void (*video_retrace_callback_t)();
59
60
72
80
87extern void video_initialize(video_mode_t mode);
88
96extern void video_set_framebuffer(const framebuffer_t* framebuffer);
97
105
112extern void video_wait_vsync();
113
123extern void video_wait_vsync_int();
124
Functions for managing and rendering framebuffers.
Data format for framebuffers.
Definition framebuffer.h:28
Definition video.h:42
void video_wait_vsync()
Waits for the next vsync with interrupts.
Definition video.c:376
void video_initialize(video_mode_t mode)
Initializes the video output.
Definition video.c:281
void video_set_framebuffer(const framebuffer_t *framebuffer)
Sets the frame buffer presented to the screen.
Definition video.c:342
video_mode_t
Supported modes for the video interface.
Definition video.h:27
void video_wait_vsync_int()
Waits for the next vsync without interrupts.
Definition video.c:381
void(* video_retrace_callback_t)()
Called at the begining of the video retrace.
Definition video.h:58
const video_profile_t * video_get_profile(video_mode_t mode)
Gets a video profile from a video mode.
Definition video.c:265
framebuffer_t * video_get_framebuffer()
Gets the frame buffer currently displayed.
Definition video.c:365
void video_set_retrace_callback(video_retrace_callback_t callback)
Sets the retrace callback.
Definition video.c:386
video_mode_t video_system_default_video_mode()
Gets the video mode of the console.
Definition video.c:219