dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Code for OSD video generator

Output video (black & white pixels) over SPI. More...

Files

file  pios_video.h
 OSD gen module, handles OSD draw. Parts from CL-OSD and SUPEROSD projects.
 
file  pios_video.c
 OSD gen module, handles OSD draw. Parts from CL-OSD and SUPEROSD projects.
 
file  pios_video.c
 OSD gen module, handles OSD draw. Parts from CL-OSD and SUPEROSD projects.
 

Data Structures

struct  pios_video_type_boundary
 
struct  pios_video_type_cfg
 
struct  pios_video_cfg
 

Macros

#define GRAPHICS_LEFT   0
 
#define GRAPHICS_TOP   0
 
#define GRAPHICS_RIGHT   pios_video_type_boundary_act->graphics_right
 
#define GRAPHICS_BOTTOM   pios_video_type_boundary_act->graphics_bottom
 
#define GRAPHICS_X_MIDDLE   ((GRAPHICS_RIGHT + 1) / 2)
 
#define GRAPHICS_Y_MIDDLE   ((GRAPHICS_BOTTOM + 1) / 2)
 
#define VIDEO_TYPE_PAL_ROWS   300
 
#define GRAPHICS_WIDTH_REAL   376
 
#define GRAPHICS_HEIGHT_REAL   266
 
#define BUFFER_WIDTH_TMP   (GRAPHICS_WIDTH_REAL / (8 / PIOS_VIDEO_BITS_PER_PIXEL))
 
#define BUFFER_WIDTH   (BUFFER_WIDTH_TMP + BUFFER_WIDTH_TMP % 4)
 
#define BUFFER_HEIGHT   (GRAPHICS_HEIGHT_REAL)
 
#define SWAP_BUFFS(tmp, a, b)   { tmp = a; a = b; b = tmp; }
 

Enumerations

enum  pios_video_3d_mode { PIOS_VIDEO_3D_DISABLED, PIOS_VIDEO_3D_SBS3D }
 
enum  pios_video_system { PIOS_VIDEO_SYSTEM_NONE, PIOS_VIDEO_SYSTEM_PAL, PIOS_VIDEO_SYSTEM_NTSC }
 

Functions

bool PIOS_Vsync_ISR ()
 
bool PIOS_Hsync_ISR ()
 
void PIOS_Video_Init (const struct pios_video_cfg *cfg)
 
void PIOS_Pixel_Init (void)
 
void PIOS_Video_SetLevels (uint8_t, uint8_t)
 
void PIOS_Video_SetXOffset (int8_t)
 
void PIOS_Video_SetYOffset (int8_t)
 
void PIOS_Video_SetXScale (uint8_t x_scale)
 
void PIOS_Video_Set3DConfig (enum pios_video_3d_mode mode, uint8_t right_eye_x_shift)
 
uint16_t PIOS_Video_GetLines (void)
 
enum pios_video_system PIOS_Video_GetSystem (void)
 

Variables

uint16_t pios_video_type_boundary::graphics_right
 
uint16_t pios_video_type_boundary::graphics_bottom
 
uint16_t pios_video_type_cfg::graphics_height_real
 
uint16_t pios_video_type_cfg::graphics_column_start
 
uint8_t pios_video_type_cfg::graphics_line_start
 
uint8_t pios_video_type_cfg::dma_buffer_length
 
uint8_t pios_video_type_cfg::period
 
uint8_t pios_video_type_cfg::dc
 
DMA_TypeDef * pios_video_cfg::mask_dma
 
const struct pios_spi_cfg pios_video_cfg::mask
 
DMA_TypeDef * pios_video_cfg::level_dma
 
const struct pios_spi_cfg pios_video_cfg::level
 
struct pios_tim_channel pios_video_cfg::hsync_capture
 
struct pios_tim_channel pios_video_cfg::pixel_timer
 
TIM_OCInitTypeDef pios_video_cfg::tim_oc_init
 
const struct pios_exti_cfgpios_video_cfg::vsync
 
void(* pios_video_cfg::set_bw_levels )(uint8_t, uint8_t)
 
void(* pios_video_cfg::set_x_scale )(uint8_t)
 
void(* pios_video_cfg::set_3d_config )(enum pios_video_3d_mode, uint8_t)
 
const struct pios_video_cfg pios_video_cfg
 
const struct
pios_video_type_boundary
pios_video_type_boundary_act
 

Detailed Description

Output video (black & white pixels) over SPI.

Macro Definition Documentation

#define BUFFER_HEIGHT   (GRAPHICS_HEIGHT_REAL)

Definition at line 148 of file pios_video.h.

#define BUFFER_WIDTH   (BUFFER_WIDTH_TMP + BUFFER_WIDTH_TMP % 4)

Definition at line 147 of file pios_video.h.

#define BUFFER_WIDTH_TMP   (GRAPHICS_WIDTH_REAL / (8 / PIOS_VIDEO_BITS_PER_PIXEL))

Definition at line 146 of file pios_video.h.

#define GRAPHICS_BOTTOM   pios_video_type_boundary_act->graphics_bottom

Definition at line 131 of file pios_video.h.

#define GRAPHICS_HEIGHT_REAL   266

Definition at line 141 of file pios_video.h.

#define GRAPHICS_LEFT   0

Definition at line 128 of file pios_video.h.

#define GRAPHICS_RIGHT   pios_video_type_boundary_act->graphics_right

Definition at line 130 of file pios_video.h.

#define GRAPHICS_TOP   0

Definition at line 129 of file pios_video.h.

#define GRAPHICS_WIDTH_REAL   376

Definition at line 140 of file pios_video.h.

#define GRAPHICS_X_MIDDLE   ((GRAPHICS_RIGHT + 1) / 2)

Definition at line 133 of file pios_video.h.

#define GRAPHICS_Y_MIDDLE   ((GRAPHICS_BOTTOM + 1) / 2)

Definition at line 134 of file pios_video.h.

#define SWAP_BUFFS (   tmp,
  a,
 
)    { tmp = a; a = b; b = tmp; }

Definition at line 152 of file pios_video.h.

#define VIDEO_TYPE_PAL_ROWS   300

Definition at line 137 of file pios_video.h.

Enumeration Type Documentation

Enumerator
PIOS_VIDEO_3D_DISABLED 
PIOS_VIDEO_3D_SBS3D 

Definition at line 45 of file pios_video.h.

Enumerator
PIOS_VIDEO_SYSTEM_NONE 
PIOS_VIDEO_SYSTEM_PAL 
PIOS_VIDEO_SYSTEM_NTSC 

Definition at line 50 of file pios_video.h.

Function Documentation

bool PIOS_Hsync_ISR ( )
void PIOS_Pixel_Init ( void  )
uint16_t PIOS_Video_GetLines ( void  )
enum pios_video_system PIOS_Video_GetSystem ( void  )
void PIOS_Video_Init ( const struct pios_video_cfg cfg)
void PIOS_Video_Set3DConfig ( enum pios_video_3d_mode  mode,
uint8_t  right_eye_x_shift 
)
void PIOS_Video_SetLevels ( uint8_t  ,
uint8_t   
)
void PIOS_Video_SetXOffset ( int8_t  )
void PIOS_Video_SetXScale ( uint8_t  x_scale)
void PIOS_Video_SetYOffset ( int8_t  )
bool PIOS_Vsync_ISR ( )

Variable Documentation

uint8_t pios_video_type_cfg::dc

Definition at line 92 of file pios_video.h.

uint8_t pios_video_type_cfg::dma_buffer_length

Definition at line 90 of file pios_video.h.

uint16_t pios_video_type_boundary::graphics_bottom

Definition at line 41 of file pios_video.h.

uint16_t pios_video_type_cfg::graphics_column_start

Definition at line 88 of file pios_video.h.

uint16_t pios_video_type_cfg::graphics_height_real

Definition at line 87 of file pios_video.h.

uint8_t pios_video_type_cfg::graphics_line_start

Definition at line 89 of file pios_video.h.

uint16_t pios_video_type_boundary::graphics_right

Definition at line 40 of file pios_video.h.

struct pios_tim_channel pios_video_cfg::hsync_capture

Definition at line 100 of file pios_video.h.

const struct pios_spi_cfg pios_video_cfg::level

Definition at line 99 of file pios_video.h.

DMA_TypeDef* pios_video_cfg::level_dma

Definition at line 98 of file pios_video.h.

const struct pios_spi_cfg pios_video_cfg::mask

Definition at line 97 of file pios_video.h.

DMA_TypeDef* pios_video_cfg::mask_dma

Definition at line 96 of file pios_video.h.

uint8_t pios_video_type_cfg::period

Definition at line 91 of file pios_video.h.

const struct pios_video_type_boundary* pios_video_type_boundary_act
struct pios_tim_channel pios_video_cfg::pixel_timer

Definition at line 101 of file pios_video.h.

void(* pios_video_cfg::set_3d_config)(enum pios_video_3d_mode, uint8_t)

Definition at line 106 of file pios_video.h.

void(* pios_video_cfg::set_bw_levels)(uint8_t, uint8_t)

Definition at line 104 of file pios_video.h.

void(* pios_video_cfg::set_x_scale)(uint8_t)

Definition at line 105 of file pios_video.h.

TIM_OCInitTypeDef pios_video_cfg::tim_oc_init

Definition at line 102 of file pios_video.h.

const struct pios_exti_cfg* pios_video_cfg::vsync

Definition at line 103 of file pios_video.h.