![]() |
osd
Xilinx SDK Drivers API Documentation
|
Data Structures | |
struct | XOsd_Config |
OSD core configuration structure. More... | |
struct | XOsd_Layer |
The OSD core layer info structure. More... | |
struct | XOsd |
The XOsd instance data. More... | |
Macros | |
#define | XOSD_H_ |
Prevent circular inclusions by using protection macros. More... | |
#define | XOsd_Enable(InstancePtr) |
This function macro enables an OSD core. More... | |
#define | XOsd_Disable(InstancePtr) |
This function macro disables an OSD core. More... | |
#define | XOsd_RegUpdateEnable(InstancePtr) |
This function macro commits all the register value changes made so far by the software to the OSD core instance. More... | |
#define | XOsd_RegUpdateDisable(InstancePtr) |
This function macro prevents the OSD core from committing recent changes made so far by the software. More... | |
#define | XOsd_Reset(InstancePtr) |
This function macro resets an OSD core This effects the core immediately, and may cause image tearing. More... | |
#define | XOsd_IntrEnable(InstancePtr, IntrType) |
This function macro enables the given individual interrupt(s) on the OSD core. More... | |
#define | XOsd_IntrDisable(InstancePtr, IntrType) |
This function macro disables the given individual interrupt(s) on the OSD core. More... | |
#define | XOsd_IntrGetPending(InstancePtr) |
This function macro returns the pending interrupts of the OSD core. More... | |
#define | XOsd_IntrClear(InstancePtr, IntrType) |
This function macro clears/acknowledges pending interrupts of the OSD core. More... | |
#define | XOsd_StatusGetPending(InstancePtr) |
This function macro returns the pending status of the OSD core. More... | |
#define | XOsd_SyncReset(InstancePtr) |
This function macro resets a OSD core at the end of the frame being processed. More... | |
#define | XOsd_FSyncReset XOsd_SyncReset |
This macro resets the OSD core at the end of the frame being processed. More... | |
#define | XOsd_Start XOsd_Enable |
This function macro stops an OSD core. More... | |
#define | XOsd_Stop XOsd_Disable |
This function macro stops an OSD core. More... | |
#define | XOSD_HW_H_ |
Prevent circular inclusions by using protection macros. More... | |
Typedefs | |
typedef void(* | XOsd_CallBack) (void *CallBackRef) |
This function callback type for all interrupts except error interrupt. More... | |
typedef void(* | XOsd_ErrorCallBack) (void *CallBackRef, u32 ErrorMask) |
This function callback type for error interrupt. More... | |
typedef u32 | XOsd_Instruction[XOSD_INS_SIZE] |
The XOsd_Instruction data structure for holding one GC instruction. More... | |
Functions | |
int | XOsd_CfgInitialize (XOsd *InstancePtr, XOsd_Config *CfgPtr, u32 EffectiveAddr) |
This function initializes an OSD core. More... | |
void | XOsd_SetActiveSize (XOsd *InstancePtr, u32 Width, u32 Height) |
This function sets the screen size of the OSD Output. More... | |
void | XOsd_GetActiveSize (XOsd *InstancePtr, u32 *WidthPtr, u32 *HeightPtr) |
This function gets the screen size of the OSD Output. More... | |
void | XOsd_SetBackgroundColor (XOsd *InstancePtr, u16 Red, u16 Blue, u16 Green) |
This function sets the background color used by the OSD output. More... | |
void | XOsd_GetBackgroundColor (XOsd *InstancePtr, u16 *RedPtr, u16 *BluePtr, u16 *GreenPtr) |
This function gets the background color used by the OSD output. More... | |
void | XOsd_SetLayerDimension (XOsd *InstancePtr, u8 LayerIndex, u16 XStart, u16 YStart, u16 XSize, u16 YSize) |
This function sets the start position and size of an OSD layer. More... | |
void | XOsd_GetLayerDimension (XOsd *InstancePtr, u8 LayerIndex, u16 *XStartPtr, u16 *YStartPtr, u16 *XSizePtr, u16 *YSizePtr) |
This function gets the start position and size of an OSD layer. More... | |
void | XOsd_SetLayerAlpha (XOsd *InstancePtr, u8 LayerIndex, u16 GlobalAlphaEnable, u16 GlobalAlphaValue) |
This function sets the alpha value and mode of an OSD layer. More... | |
void | XOsd_GetLayerAlpha (XOsd *InstancePtr, u8 LayerIndex, u16 *GlobalAlphaEnablePtr, u16 *GlobalAlphaValuePtr) |
This function gets the alpha value and mode of an OSD layer. More... | |
void | XOsd_SetLayerPriority (XOsd *InstancePtr, u8 LayerIndex, u8 Priority) |
This function sets the priority of an OSD layer. More... | |
void | XOsd_GetLayerPriority (XOsd *InstancePtr, u8 LayerIndex, u8 *PriorityPtr) |
This function gets the priority of an OSD layer. More... | |
void | XOsd_EnableLayer (XOsd *InstancePtr, u8 LayerIndex) |
This function enables an OSD layer. More... | |
void | XOsd_DisableLayer (XOsd *InstancePtr, u8 LayerIndex) |
This function disables an OSD layer. More... | |
void | XOsd_LoadColorLUTBank (XOsd *InstancePtr, u8 GcIndex, u8 BankIndex, u32 ColorData[]) |
This function loads color look up table data into an OSD Graphics Controller bank. More... | |
void | XOsd_LoadCharacterSetBank (XOsd *InstancePtr, u8 GcIndex, u8 BankIndex, u32 CharSetData[]) |
This function loads character set data (font) into an OSD Graphics Controller bank. More... | |
void | XOsd_LoadTextBank (XOsd *InstancePtr, u8 GcIndex, u8 BankIndex, u32 TextData[]) |
This function loads text data into an OSD Graphics Controller bank. More... | |
void | XOsd_SetActiveBank (XOsd *InstancePtr, u8 GcIndex, u8 ColorBankIndex, u8 CharBankIndex, u8 TextBankIndex, u8 InstructionBankIndex) |
This function chooses active banks for a GC in the OSD core. More... | |
void | XOsd_CreateInstruction (XOsd *InstancePtr, u32 InstructionPtr[], u8 GcIndex, u16 ObjType, u8 ObjSize, u16 XStart, u16 YStart, u16 XEnd, u16 YEnd, u8 TextIndex, u8 ColorIndex) |
This function creates an instruction for the OSD core. More... | |
void | XOsd_LoadInstructionList (XOsd *InstancePtr, u8 GcIndex, u8 BankIndex, u32 InstSetPtr[], u32 InstNum) |
This function load an instruction list to be used by an Graphic Controller in the OSD core. More... | |
u32 | XOsd_GetVersion (XOsd *InstancePtr) |
This function returns the Version of the OSD core. More... | |
XOsd_Config * | XOsd_LookupConfig (u16 DeviceId) |
This function gets a reference to an XOsd_Config structure based on the unique device id, DeviceId. More... | |
void | XOsd_IntrHandler (void *InstancePtr) |
This function is the interrupt handler for the On-Screen-Display driver. More... | |
int | XOsd_SetCallBack (XOsd *InstancePtr, u32 HandlerType, void *CallBackFunc, void *CallBackRef) |
This routine installs an asynchronous callback function for the given HandlerType: More... | |
int | XOsd_SelfTest (XOsd *InstancePtr) |
This function reads Version register of OSD core and compares with zero as part of self test. More... | |
Interrupt types for setting up callbacks | |
enum | { XOSD_HANDLER_PROCSTART = 1, XOSD_HANDLER_FRAMEDONE, XOSD_HANDLER_ERROR } |
Compatibility Macros | |
#define | XOSD_Config XOsd_Config |
#define | XOSD_Layer XOsd_Layer |
#define | XOSD_CallBack XOsd_CallBack |
#define | XOSD_ErrorCallBack XOsd_ErrorCallBack |
#define | XOSD XOsd |
#define | XOSD_Instruction XOsd_Instruction |
#define | XOSD_Enable XOsd_Enable |
#define | XOSD_Disable XOsd_Disable |
#define | XOSD_RegUpdateEnable XOsd_RegUpdateEnable |
#define | XOSD_RegUpdateDisable XOsd_RegUpdateDisable |
#define | XOSD_Reset XOsd_Reset |
#define | XOSD_IntrEnable XOsd_IntrEnable |
#define | XOSD_IntrDisable XOsd_IntrDisable |
#define | XOSD_IntrGetPending XOsd_IntrGetPending |
#define | XOSD_IntrClear XOsd_IntrClear |
#define | XOSD_CfgInitialize XOsd_CfgInitialize |
#define | XOSD_SetScreenSize XOsd_SetActiveSize |
#define | XOSD_GetScreenSize XOsd_GetActiveSize |
#define | XOSD_SetBackgroundColor XOsd_SetBackgroundColor |
#define | XOSD_GetBackgroundColor XOsd_GetBackgroundColor |
#define | XOSD_SetLayerDimension XOsd_SetLayerDimension |
#define | XOSD_GetLayerDimension XOsd_GetLayerDimension |
#define | XOSD_SetLayerAlpha XOsd_SetLayerAlpha |
#define | XOSD_GetLayerAlpha XOsd_GetLayerAlpha |
#define | XOSD_SetLayerPriority XOsd_SetLayerPriority |
#define | XOSD_GetLayerPriority XOsd_GetLayerPriority |
#define | XOSD_EnableLayer XOsd_EnableLayer |
#define | XOSD_DisableLayer XOsd_DisableLayer |
#define | XOSD_LoadColorLUTBank XOsd_LoadColorLUTBank |
#define | XOSD_LoadCharacterSetBank XOsd_LoadCharacterSetBank |
#define | XOSD_LoadTextBank XOsd_LoadTextBank |
#define | XOSD_SetActiveBank XOsd_SetActiveBank |
#define | XOSD_CreateInstruction XOsd_CreateInstruction |
#define | XOSD_GetVersion XOsd_GetVersion |
#define | XOSD_LoadInstructionList XOsd_LoadInstructionList |
#define | XOSD_LookupConfig XOsd_LookupConfig |
#define | XOSD_IntrHandler XOsd_IntrHandler |
#define | XOSD_SetCallBack XOsd_SetCallBack |
Register Offsets | |
#define | XOSD_CTL_OFFSET 0x000 |
Control Offset. More... | |
#define | XOSD_ACTIVE_SIZE_OFFSET 0x020 |
Screen Size / Output Active_Size Offset. More... | |
#define | XOSD_BC0_OFFSET 0x100 |
Background Color Channel 0 Offset. More... | |
#define | XOSD_BC1_OFFSET 0x104 |
Background Color Channel 1 Offset. More... | |
#define | XOSD_BC2_OFFSET 0x108 |
Background Color Channel 2 Offset. More... | |
#define | XOSD_L0C_OFFSET 0x110 |
Layer 0 Control Offset. More... | |
#define | XOSD_L0P_OFFSET 0x114 |
Layer 0 Position Offset. More... | |
#define | XOSD_L0S_OFFSET 0x118 |
Layer 0 Size Offset. More... | |
#define | XOSD_L1C_OFFSET 0x120 |
Layer 1 Control Offset. More... | |
#define | XOSD_L1P_OFFSET 0x124 |
Layer 1 Position Offset. More... | |
#define | XOSD_L1S_OFFSET 0x128 |
Layer 1 Size Offset. More... | |
#define | XOSD_L2C_OFFSET 0x130 |
Layer 2 Control Offset. More... | |
#define | XOSD_L2P_OFFSET 0x134 |
Layer 2 Position Offset. More... | |
#define | XOSD_L2S_OFFSET 0x138 |
Layer 2 Size Offset. More... | |
#define | XOSD_L3C_OFFSET 0x140 |
Layer 3 Control Offset. More... | |
#define | XOSD_L3P_OFFSET 0x144 |
Layer 3 Position Offset. More... | |
#define | XOSD_L3S_OFFSET 0x148 |
Layer 3 Size Offset. More... | |
#define | XOSD_L4C_OFFSET 0x150 |
Layer 4 Control Offset. More... | |
#define | XOSD_L4P_OFFSET 0x154 |
Layer 4 Position Offset. More... | |
#define | XOSD_L4S_OFFSET 0x158 |
Layer 4 Size Offset. More... | |
#define | XOSD_L5C_OFFSET 0x160 |
Layer 5 Control Offset. More... | |
#define | XOSD_L5P_OFFSET 0x164 |
Layer 5 Position Offset. More... | |
#define | XOSD_L5S_OFFSET 0x168 |
Layer 5 Size Offset. More... | |
#define | XOSD_L6C_OFFSET 0x170 |
Layer 6 Control Offset. More... | |
#define | XOSD_L6P_OFFSET 0x174 |
Layer 6 Position Offset. More... | |
#define | XOSD_L6S_OFFSET 0x178 |
Layer 6 Size Offset. More... | |
#define | XOSD_L7C_OFFSET 0x180 |
Layer 7 Control Offset. More... | |
#define | XOSD_L7P_OFFSET 0x184 |
Layer 7 Position Offset. More... | |
#define | XOSD_L7S_OFFSET 0x188 |
Layer 7 Size Offset. More... | |
#define | XOSD_GCWBA_OFFSET 0x190 |
GPU Write Bank Address Offset. More... | |
#define | XOSD_GCABA_OFFSET 0x194 |
GPU Active Bank Address Offset. More... | |
#define | XOSD_GCD_OFFSET 0x198 |
GPU Data Offset. More... | |
#define | XOSD_VER_OFFSET 0x010 |
Version Offset. More... | |
#define | XOSD_RST_OFFSET XOSD_CTL_OFFSET |
Software Reset Offset. More... | |
#define | XOSD_ISR_OFFSET XOSD_STATUS_OFFSET |
Interrupt status register generates a interrupt if the corresponding bits of interrupt enable register bits are set. More... | |
#define | XOSD_IER_OFFSET 0x00C |
Interrupt Enable Register Offset. More... | |
#define | XOSD_STATUS_OFFSET 0x004 |
Status Offset. More... | |
#define | XOSD_ERROR_OFFSET 0x008 |
Error Offset. More... | |
#define | XOSD_OPENC_OFFSET 0x028 |
Output Encoding Offset. More... | |
Memory footprint of layers | |
#define | XOSD_LAYER_SIZE 0x10 |
Total number of Layers. More... | |
#define | XOSD_LXC 0x00 |
Layer Control. More... | |
#define | XOSD_LXP 0x04 |
Layer Position. More... | |
#define | XOSD_LXS 0x08 |
Layer Size. More... | |
Graphics Controller Bank related constants | |
#define | XOSD_GC_BANK_NUM 2 |
The number of Banks in each Graphics controller. More... | |
Active Size Register bit definition and Shift | |
#define | XOSD_ACTSIZE_NUM_PIXEL_MASK 0x00000FFF |
Horizontal Width of OSD Output Mask. More... | |
#define | XOSD_ACTSIZE_NUM_LINE_MASK 0x0FFF0000 |
Vertical Height of OSD Output Mask. More... | |
#define | XOSD_ACTSIZE_NUM_LINE_SHIFT 16 |
Vertical Height of OSD Output Shift. More... | |
Background Color Channel 0 Mask | |
#define | XOSD_BC0_YG_MASK 0x00000FFF |
Y (luma) or Green Mask. More... | |
Background Color Channel 1 Mask | |
#define | XOSD_BC1_UCBB_MASK 0x00000FFF |
U (Cb) or Blue Mask. More... | |
Background Color Channel 2 Mask | |
#define | XOSD_BC2_VCRR_MASK 0x00000FFF |
V(Cr) or Red Mask. More... | |
Maximum number of the layers | |
#define | XOSD_MAX_NUM_OF_LAYERS 8 |
The max number of layers. More... | |
Layer Control (Layer 0 through (XOSD_MAX_NUM_OF_LAYERS - 1)) bit | |
#define | XOSD_LXC_ALPHA_MASK 0x1FFF0000 |
Global Alpha Value Mask. More... | |
#define | XOSD_LXC_ALPHA_SHIFT 16 |
Bit shift number of Global Alpha Value. More... | |
#define | XOSD_LXC_PRIORITY_MASK 0x00000700 |
Layer Priority Mask. More... | |
#define | XOSD_LXC_PRIORITY_SHIFT 8 |
Bit shift number of Layer Priority. More... | |
#define | XOSD_LXC_GALPHAEN_MASK 0x00000002 |
Global Alpha Enable Mask. More... | |
#define | XOSD_LXC_EN_MASK 0x00000001 |
Layer Enable Mask. More... | |
Layer Position (Layer 0 through (XOSD_MAX_NUM_OF_LAYERS - 1)) bit | |
#define | XOSD_LXP_YSTART_MASK 0x0FFF0000 |
Vertical start line of origin of layer Mask. More... | |
#define | XOSD_LXP_YSTART_SHIFT 16 |
Bit shift of vertical start line of origin of layer. More... | |
#define | XOSD_LXP_XSTART_MASK 0x00000FFF |
Horizontal start pixel of origin of layer Mask. More... | |
Layer Size (Layer 0 through (XOSD_MAX_NUM_OF_LAYERS - 1)) bit | |
#define | XOSD_LXS_YSIZE_MASK 0x0FFF0000 |
Vertical size of layer Mask. More... | |
#define | XOSD_LXS_YSIZE_SHIFT 16 |
Bit shift number of vertical size of layer. More... | |
#define | XOSD_LXS_XSIZE_MASK 0x00000FFF |
Horizontal size of layer Mask. More... | |
Graphics Controller Write Bank Address bit definition and Shift | |
#define | XOSD_GCWBA_GCNUM_MASK 0x00000700 |
Graphics Controller Number Mask. More... | |
#define | XOSD_GCWBA_GCNUM_SHIFT 8 |
Bit shift of Graphics Controller Number. More... | |
#define | XOSD_GCWBA_BANK_MASK 0x00000007 |
Controls which bank to write GPU instructions and Color LUT data into. More... | |
#define | XOSD_GCWBA_INS0 0x00000000 |
Instruction RAM 0. More... | |
#define | XOSD_GCWBA_INS1 0x00000001 |
Instruction RAM 1. More... | |
#define | XOSD_GCWBA_COL0 0x00000002 |
Color LUT RAM 0. More... | |
#define | XOSD_GCWBA_COL1 0x00000003 |
Color LUT RAM 1. More... | |
#define | XOSD_GCWBA_TXT0 0x00000004 |
Text RAM 0. More... | |
#define | XOSD_GCWBA_TXT1 0x00000005 |
Text RAM 1. More... | |
#define | XOSD_GCWBA_CHR0 0x00000006 |
Character Set RAM 0. More... | |
#define | XOSD_GCWBA_CHR1 0x00000007 |
Character Set RAM 1. More... | |
Graphics Controller Active Bank Address bit definition and Shifts | |
#define | XOSD_GCABA_CHR_MASK 0xFF000000 |
Set the active Character Bank Mask. More... | |
#define | XOSD_GCABA_CHR_SHIFT 24 |
Bit shift of active Character Bank. More... | |
#define | XOSD_GCABA_TXT_MASK 0x00FF0000 |
Set the active Text Bank Mask. More... | |
#define | XOSD_GCABA_TXT_SHIFT 16 |
Bit shift of active Text Bank. More... | |
#define | XOSD_GCABA_COL_MASK 0x0000FF00 |
Set the active Color Table Bank Mask. More... | |
#define | XOSD_GCABA_COL_SHIFT 8 |
Bit shift of active Color Table Bank. More... | |
#define | XOSD_GCABA_INS_MASK 0x000000FF |
Set the active instruction Bank Mask. More... | |
Version Register bit definition and Shifts | |
#define | XOSD_VER_MAJOR_MASK 0xFF000000 |
Major Version Mask. More... | |
#define | XOSD_VER_MAJOR_SHIFT 24 |
Major Version Shift. More... | |
#define | XOSD_VER_MINOR_MASK 0x00FF0000 |
Minor Version Mask. More... | |
#define | XOSD_VER_MINOR_SHIFT 16 |
Minor Version Bit Shift. More... | |
#define | XOSD_VER_REV_MASK 0x0000F000 |
Revision Version Mask. More... | |
#define | XOSD_VER_REV_SHIFT 12 |
Revision Bit Shift. More... | |
Software Reset | |
#define | XOSD_RST_RESET XOSD_CTL_SW_RST_MASK |
Software Reset. More... | |
Interrupt Register Bit Masks. It is applicable for ISR and IER. | |
#define | XOSD_IXR_LAYER0_ERROR_MASK 0x00000010 |
Layer 0 Error interrupt enable Mask. More... | |
#define | XOSD_IXR_LAYER1_ERROR_MASK 0x00000020 |
Layer 1 Error interrupt enable Mask. More... | |
#define | XOSD_IXR_LAYER2_ERROR_MASK 0x00000040 |
Layer 2 Error interrupt enable Mask. More... | |
#define | XOSD_IXR_LAYER3_ERROR_MASK 0x00000080 |
Layer 3 Error interrupt enable Mask. More... | |
#define | XOSD_IXR_LAYER4_ERROR_MASK 0x00000100 |
Layer 4 Error interrupt enable Mask. More... | |
#define | XOSD_IXR_LAYER5_ERROR_MASK 0x00000200 |
Layer 5 Error interrupt enable Mask. More... | |
#define | XOSD_IXR_LAYER6_ERROR_MASK 0x00000400 |
Layer 6 Error interrupt enable Mask. More... | |
#define | XOSD_IXR_LAYER7_ERROR_MASK 0x00000800 |
Layer 7 Error interrupt enable Mask. More... | |
#define | XOSD_IXR_PROC_STARTED_MASK 0x00000001 |
OSD Processing started Mask. More... | |
#define | XOSD_IXR_EOF_MASK 0x00000002 |
OSD End of frame mask. More... | |
#define | XOSD_IXR_ALLERR_MASK |
OSD Layer 0 to Layer 7 Error Mask. More... | |
#define | XOSD_IXR_ALLINTR_MASK |
OR'ing of all Masks. More... | |
Layer Types | |
#define | XOSD_LAYER_TYPE_DISABLE 0 |
Layer is disabled. More... | |
#define | XOSD_LAYER_TYPE_GPU 1 |
Layer's type is GPU. More... | |
#define | XOSD_LAYER_TYPE_VFBC 2 |
Layer's type is VFBC. More... | |
Supported instruction numbers given an instruction memory size | |
#define | XOSD_INS_MEM_SIZE_TO_NUM 1 |
Conversion to the number of instructions from the instruction memory size. More... | |
GC instruction word offset definition | |
#define | XOSD_INS0 0 |
Instruction word 0 offset. More... | |
#define | XOSD_INS1 1 |
Instruction word 1 offset. More... | |
#define | XOSD_INS2 2 |
Instruction word 2 offset. More... | |
#define | XOSD_INS3 3 |
Instruction word 3 offset. More... | |
#define | XOSD_INS_SIZE 4 |
Size of an instruction in words. More... | |
GC Instruction word 0 definition and Shifts | |
#define | XOSD_INS0_OPCODE_MASK 0xF0000000 |
Operation Code (OpCode) Mask. More... | |
#define | XOSD_INS0_OPCODE_SHIFT 28 |
Bit shift number of OpCode. More... | |
#define | XOSD_INS0_GCNUM_MASK 0x07000000 |
Graphics controller number (GC#) Mask. More... | |
#define | XOSD_INS0_GCNUM_SHIFT 24 |
Bit shift number of GC#. More... | |
#define | XOSD_INS0_XEND_MASK 0x00FFF000 |
Horizontal end pixel of the object Mask. More... | |
#define | XOSD_INS0_XEND_SHIFT 12 |
Bit shift number of Horizontal end pixel of the object. More... | |
#define | XOSD_INS0_XSTART_MASK 0x00000FFF |
Horizontal start pixel of the Object Mask. More... | |
GC Instruction word 1 definition | |
#define | XOSD_INS1_TXTINDEX_MASK 0x0000000F |
String Index. More... | |
GC Instruction word 2 definition and Shifts | |
#define | XOSD_INS2_OBJSIZE_MASK 0xFF000000 |
Object Size Mask. More... | |
#define | XOSD_INS2_OBJSIZE_SHIFT 24 |
Bit shift number of Object Size. More... | |
#define | XOSD_INS2_YEND_MASK 0x00FFF000 |
Vertical end line of the object Mask. More... | |
#define | XOSD_INS2_YEND_SHIFT 12 |
Bit shift number of Vertical end line of the object. More... | |
#define | XOSD_INS2_YSTART_MASK 0x00000FFF |
Vertical start line of the Object Mask. More... | |
GC Instruction word 3 definition | |
#define | XOSD_INS3_COL_MASK 0x0000000F |
Color Index for Box/Text Mask. More... | |
GC Instruction Operation Code definition (used in Instruction word 0) | |
#define | XOSD_INS_OPCODE_END 0x0 |
End of instruction list. More... | |
#define | XOSD_INS_OPCODE_NOP 0x8 |
NOP. More... | |
#define | XOSD_INS_OPCODE_BOX 0xA |
Box. More... | |
#define | XOSD_INS_OPCODE_LINE 0xC |
Line. More... | |
#define | XOSD_INS_OPCODE_TXT 0xE |
Text. More... | |
#define | XOSD_INS_OPCODE_BOXTXT 0xF |
Box Text. More... | |
GC color size | |
#define | XOSD_COLOR_ENTRY_SIZE 4 |
Size of each color entry in bytes. More... | |
GC font unit size | |
#define | XOSD_FONT_BIT_TO_BYTE 8 |
Ratio to convert font size to byte. More... | |
Layer priority | |
#define | XOSD_LAYER_PRIORITY_0 0 |
Priority 0 — Lowest. More... | |
#define | XOSD_LAYER_PRIORITY_1 1 |
Priority 1. More... | |
#define | XOSD_LAYER_PRIORITY_2 2 |
Priority 2. More... | |
#define | XOSD_LAYER_PRIORITY_3 3 |
Priority 3. More... | |
#define | XOSD_LAYER_PRIORITY_4 4 |
Priority 4. More... | |
#define | XOSD_LAYER_PRIORITY_5 5 |
Priority 5. More... | |
#define | XOSD_LAYER_PRIORITY_6 6 |
Priority 6. More... | |
#define | XOSD_LAYER_PRIORITY_7 7 |
Priority 7 — Highest. More... | |
Output Encoding Register bit definition | |
#define | XOSD_OPENC_VID_FORMAT_MASK 0x0000000F |
OSD Output Video Format Mask 0: YUV 4:2:2 1: YUV 4:4:4 2: RGB 3: YUV 4:2:0. More... | |
#define | XOSD_OPENC_NBITS_MASK 0x00000030 |
Vertical Height of OSD Output Mask. More... | |
Error Register bit definition | |
#define | XOSD_ERR_LAYER7_SOF_LATE_MASK 0x80000000 |
OSD Layer 7 error for SOF late Mask. More... | |
#define | XOSD_ERR_LAYER7_SOF_EARLY_MASK 0x40000000 |
OSD Layer 7 error for SOF early Mask. More... | |
#define | XOSD_ERR_LAYER7_EOL_LATE_MASK 0x20000000 |
OSD Layer 7 error for EOL late Mask. More... | |
#define | XOSD_ERR_LAYER7_EOL_EARLY_MASK 0x10000000 |
OSD Layer 7 error for EOL early. More... | |
#define | XOSD_ERR_LAYER6_SOF_LATE_MASK 0x08000000 |
OSD Layer 6 error for SOF late Mask. More... | |
#define | XOSD_ERR_LAYER6_SOF_EARLY_MASK 0x04000000 |
OSD Layer 6 error for SOF early Mask. More... | |
#define | XOSD_ERR_LAYER6_EOL_LATE_MASK 0x02000000 |
OSD Layer 6 error for EOL late Mask. More... | |
#define | XOSD_ERR_LAYER6_EOL_EARLY_MASK 0x01000000 |
OSD Layer 6 error for EOL early Mask. More... | |
#define | XOSD_ERR_LAYER5_SOF_LATE_MASK 0x00800000 |
OSD Layer 5 error for SOF late Mask. More... | |
#define | XOSD_ERR_LAYER5_SOF_EARLY_MASK 0x00400000 |
OSD Layer 5 error for SOF early Mask. More... | |
#define | XOSD_ERR_LAYER5_EOL_LATE_MASK 0x00200000 |
OSD Layer 5 error for EOL late Mask. More... | |
#define | XOSD_ERR_LAYER5_EOL_EARLY_MASK 0x00100000 |
OSD Layer 5 error for EOL early Mask. More... | |
#define | XOSD_ERR_LAYER4_SOF_LATE_MASK 0x00080000 |
OSD Layer 4 error for SOF late Mask. More... | |
#define | XOSD_ERR_LAYER4_SOF_EARLY_MASK 0x00040000 |
OSD Layer 4 error for SOF early Mask. More... | |
#define | XOSD_ERR_LAYER4_EOL_LATE_MASK 0x00020000 |
OSD Layer 4 error for EOL late Mask. More... | |
#define | XOSD_ERR_LAYER4_EOL_EARLY_MASK 0x00010000 |
OSD Layer 4 error for EOL early Mask. More... | |
#define | XOSD_ERR_LAYER3_SOF_LATE_MASK 0x00008000 |
OSD Layer 3 error for SOF late Mask. More... | |
#define | XOSD_ERR_LAYER3_SOF_EARLY_MASK 0x00004000 |
OSD Layer 3 error for SOF early Mask. More... | |
#define | XOSD_ERR_LAYER3_EOL_LATE_MASK 0x00002000 |
OSD Layer 3 error for EOL late Mask. More... | |
#define | XOSD_ERR_LAYER3_EOL_EARLY_MASK 0x00001000 |
OSD Layer 3 error for EOL early Mask. More... | |
#define | XOSD_ERR_LAYER2_SOF_LATE_MASK 0x00000800 |
OSD Layer 2 error for SOF late Mask. More... | |
#define | XOSD_ERR_LAYER2_SOF_EARLY_MASK 0x00000400 |
OSD Layer 2 error for SOF early Mask. More... | |
#define | XOSD_ERR_LAYER2_EOL_LATE_MASK 0x00000200 |
OSD Layer 2 error for EOL late Mask. More... | |
#define | XOSD_ERR_LAYER2_EOL_EARLY_MASK 0x00000100 |
OSD Layer 2 error for EOL early Mask. More... | |
#define | XOSD_ERR_LAYER1_SOF_LATE_MASK 0x00000080 |
OSD Layer 1 error for SOF late Mask. More... | |
#define | XOSD_ERR_LAYER1_SOF_EARLY_MASK 0x00000040 |
OSD Layer 1 error for SOF early Mask. More... | |
#define | XOSD_ERR_LAYER1_EOL_LATE_MASK 0x00000020 |
OSD Layer 1 error for EOL late Mask. More... | |
#define | XOSD_ERR_LAYER1_EOL_EARLY_MASK 0x00000010 |
OSD Layer 1 error for EOL early Mask. More... | |
#define | XOSD_ERR_LAYER0_SOF_LATE_MASK 0x00000008 |
OSD Layer 0 error for SOF late Mask. More... | |
#define | XOSD_ERR_LAYER0_SOF_EARLY_MASK 0x00000004 |
OSD Layer 0 error for SOF early Mask. More... | |
#define | XOSD_ERR_LAYER0_EOL_LATE_MASK 0x00000002 |
OSD Layer 0 error for EOL late Mask. More... | |
#define | XOSD_ERR_LAYER0_EOL_EARLY_MASK 0x00000001 |
OSD Layer 0 error for EOL early Mask. More... | |
#define | XOSD_ERR_ALL_ERR_MASK 0xFFFFFFFF |
OSD Layer 0 to Layer 7 error for EOL late or early early or SOF late or early Mask. More... | |
Control Register bit definition | |
#define | XOSD_CTL_EN_MASK 0x00000001 |
Enable / SW Enable Mask. More... | |
#define | XOSD_CTL_RUE_MASK 0x00000002 |
Register Update Enable Mask. More... | |
#define | XOSD_CTL_FSYNC_MASK 0x40000000 |
Frame Sync Reset Mask. More... | |
#define | XOSD_CTL_SW_RST_MASK 0x80000000 |
Core Reset Mask. More... | |
Constants. It is defined as constants to use instead magic numbers. | |
#define | XOSD_DATA_8 8 |
#define | XOSD_DATA_2 2 |
Compatibility Macros | |
#define | XOSD_CTL XOSD_CTL_OFFSET |
#define | XOSD_SS XOSD_ACTIVE_SIZE_OFFSET |
#define | XOSD_VER XOSD_VER_OFFSET |
#define | XOSD_OPENC XOSD_OPENC_OFFSET |
#define | XOSD_BC0 XOSD_BC0_OFFSET |
#define | XOSD_BC1 XOSD_BC1_OFFSET |
#define | XOSD_BC2 XOSD_BC2_OFFSET |
#define | XOSD_L0C XOSD_L0C_OFFSET |
#define | XOSD_L0P XOSD_L0P_OFFSET |
#define | XOSD_L0S XOSD_L0S_OFFSET |
#define | XOSD_L1C XOSD_L1C_OFFSET |
#define | XOSD_L1P XOSD_L1P_OFFSET |
#define | XOSD_L1S XOSD_L1S_OFFSET |
#define | XOSD_L2C XOSD_L2C_OFFSET |
#define | XOSD_L2P XOSD_L2P_OFFSET |
#define | XOSD_L2S XOSD_L2S_OFFSET |
#define | XOSD_L3C XOSD_L3C_OFFSET |
#define | XOSD_L3P XOSD_L3P_OFFSET |
#define | XOSD_L3S XOSD_L3S_OFFSET |
#define | XOSD_L4C XOSD_L4C_OFFSET |
#define | XOSD_L4P XOSD_L4P_OFFSET |
#define | XOSD_L4S XOSD_L4S_OFFSET |
#define | XOSD_L5C XOSD_L5C_OFFSET |
#define | XOSD_L5P XOSD_L5P_OFFSET |
#define | XOSD_L5S XOSD_L5S_OFFSET |
#define | XOSD_L6C XOSD_L6C_OFFSET |
#define | XOSD_L6P XOSD_L6P_OFFSET |
#define | XOSD_L6S XOSD_L6S_OFFSET |
#define | XOSD_L7C XOSD_L7C_OFFSET |
#define | XOSD_L7P XOSD_L7P_OFFSET |
#define | XOSD_L7S XOSD_L7S_OFFSET |
#define | XOSD_GCWBA XOSD_GCWBA_OFFSET |
#define | XOSD_GCABA XOSD_GCABA_OFFSET |
#define | XOSD_GCD XOSD_GCD_OFFSET |
#define | XOSD_RST XOSD_RST_OFFSET |
#define | XOSD_ISR XOSD_ISR_OFFSET |
#define | XOSD_IER XOSD_IER_OFFSET |
#define | XOSD_SS_YSIZE_MASK XOSD_ACTSIZE_NUM_LINE_MASK |
#define | XOSD_SS_XSIZE_MASK XOSD_ACTSIZE_NUM_PIXEL_MASK |
#define | XOSD_SS_YSIZE_SHIFT XOSD_ACTSIZE_NUM_LINE_SHIFT |
#define | XOSD_In32 XOsd_In32 |
#define | XOSD_Out32 XOsd_Out32 |
#define | XOSD_ReadReg XOsd_ReadReg |
#define | XOSD_WriteReg XOsd_WriteReg |
Core register I/O APIs | |
#define | XOsd_In32 Xil_In32 |
#define | XOsd_Out32 Xil_Out32 |
#define | XOsd_ReadReg(BaseAddress, RegOffset) XOsd_In32((BaseAddress) + (u32)(RegOffset)) |
This function reads the given register. More... | |
#define | XOsd_WriteReg(BaseAddress, RegOffset, Data) XOsd_Out32((BaseAddress) + (u32)(RegOffset), (Data)) |
This function writes the given register. More... | |
#define XOSD_ACTIVE_SIZE_OFFSET 0x020 |
#include <xosd_hw.h>
Screen Size / Output Active_Size Offset.
Referenced by XOsd_GetActiveSize(), and XOsd_SetActiveSize().
#define XOSD_ACTSIZE_NUM_LINE_MASK 0x0FFF0000 |
#include <xosd_hw.h>
Vertical Height of OSD Output Mask.
Referenced by XOsd_GetActiveSize(), and XOsd_SetActiveSize().
#define XOSD_ACTSIZE_NUM_LINE_SHIFT 16 |
#include <xosd_hw.h>
Vertical Height of OSD Output Shift.
Referenced by XOsd_GetActiveSize(), and XOsd_SetActiveSize().
#define XOSD_ACTSIZE_NUM_PIXEL_MASK 0x00000FFF |
#include <xosd_hw.h>
Horizontal Width of OSD Output Mask.
Referenced by XOsd_GetActiveSize(), and XOsd_SetActiveSize().
#define XOSD_BC0_OFFSET 0x100 |
#include <xosd_hw.h>
Background Color Channel 0 Offset.
Referenced by XOsd_GetBackgroundColor(), and XOsd_SetBackgroundColor().
#define XOSD_BC0_YG_MASK 0x00000FFF |
#include <xosd_hw.h>
Y (luma) or Green Mask.
Referenced by XOsd_GetBackgroundColor(), and XOsd_SetBackgroundColor().
#define XOSD_BC1_OFFSET 0x104 |
#include <xosd_hw.h>
Background Color Channel 1 Offset.
Referenced by XOsd_GetBackgroundColor(), and XOsd_SetBackgroundColor().
#define XOSD_BC1_UCBB_MASK 0x00000FFF |
#include <xosd_hw.h>
U (Cb) or Blue Mask.
Referenced by XOsd_GetBackgroundColor(), and XOsd_SetBackgroundColor().
#define XOSD_BC2_OFFSET 0x108 |
#include <xosd_hw.h>
Background Color Channel 2 Offset.
Referenced by XOsd_GetBackgroundColor(), and XOsd_SetBackgroundColor().
#define XOSD_BC2_VCRR_MASK 0x00000FFF |
#include <xosd_hw.h>
V(Cr) or Red Mask.
Referenced by XOsd_GetBackgroundColor(), and XOsd_SetBackgroundColor().
#define XOSD_COLOR_ENTRY_SIZE 4 |
#include <xosd_hw.h>
Size of each color entry in bytes.
#define XOSD_CTL_EN_MASK 0x00000001 |
#include <xosd_hw.h>
Enable / SW Enable Mask.
#define XOSD_CTL_FSYNC_MASK 0x40000000 |
#include <xosd_hw.h>
Frame Sync Reset Mask.
#define XOSD_CTL_OFFSET 0x000 |
#include <xosd_hw.h>
Control Offset.
#define XOSD_CTL_RUE_MASK 0x00000002 |
#include <xosd_hw.h>
Register Update Enable Mask.
#define XOSD_CTL_SW_RST_MASK 0x80000000 |
#include <xosd_hw.h>
Core Reset Mask.
#define XOsd_Disable | ( | InstancePtr | ) |
#include <xosd.h>
This function macro disables an OSD core.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
#define XOsd_Enable | ( | InstancePtr | ) |
#include <xosd.h>
This function macro enables an OSD core.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
#define XOSD_ERR_ALL_ERR_MASK 0xFFFFFFFF |
#include <xosd_hw.h>
OSD Layer 0 to Layer 7 error for EOL late or early early or SOF late or early Mask.
#define XOSD_ERR_LAYER0_EOL_EARLY_MASK 0x00000001 |
#include <xosd_hw.h>
OSD Layer 0 error for EOL early Mask.
#define XOSD_ERR_LAYER0_EOL_LATE_MASK 0x00000002 |
#include <xosd_hw.h>
OSD Layer 0 error for EOL late Mask.
#define XOSD_ERR_LAYER0_SOF_EARLY_MASK 0x00000004 |
#include <xosd_hw.h>
OSD Layer 0 error for SOF early Mask.
#define XOSD_ERR_LAYER0_SOF_LATE_MASK 0x00000008 |
#include <xosd_hw.h>
OSD Layer 0 error for SOF late Mask.
#define XOSD_ERR_LAYER1_EOL_EARLY_MASK 0x00000010 |
#include <xosd_hw.h>
OSD Layer 1 error for EOL early Mask.
#define XOSD_ERR_LAYER1_EOL_LATE_MASK 0x00000020 |
#include <xosd_hw.h>
OSD Layer 1 error for EOL late Mask.
#define XOSD_ERR_LAYER1_SOF_EARLY_MASK 0x00000040 |
#include <xosd_hw.h>
OSD Layer 1 error for SOF early Mask.
#define XOSD_ERR_LAYER1_SOF_LATE_MASK 0x00000080 |
#include <xosd_hw.h>
OSD Layer 1 error for SOF late Mask.
#define XOSD_ERR_LAYER2_EOL_EARLY_MASK 0x00000100 |
#include <xosd_hw.h>
OSD Layer 2 error for EOL early Mask.
#define XOSD_ERR_LAYER2_EOL_LATE_MASK 0x00000200 |
#include <xosd_hw.h>
OSD Layer 2 error for EOL late Mask.
#define XOSD_ERR_LAYER2_SOF_EARLY_MASK 0x00000400 |
#include <xosd_hw.h>
OSD Layer 2 error for SOF early Mask.
#define XOSD_ERR_LAYER2_SOF_LATE_MASK 0x00000800 |
#include <xosd_hw.h>
OSD Layer 2 error for SOF late Mask.
#define XOSD_ERR_LAYER3_EOL_EARLY_MASK 0x00001000 |
#include <xosd_hw.h>
OSD Layer 3 error for EOL early Mask.
#define XOSD_ERR_LAYER3_EOL_LATE_MASK 0x00002000 |
#include <xosd_hw.h>
OSD Layer 3 error for EOL late Mask.
#define XOSD_ERR_LAYER3_SOF_EARLY_MASK 0x00004000 |
#include <xosd_hw.h>
OSD Layer 3 error for SOF early Mask.
#define XOSD_ERR_LAYER3_SOF_LATE_MASK 0x00008000 |
#include <xosd_hw.h>
OSD Layer 3 error for SOF late Mask.
#define XOSD_ERR_LAYER4_EOL_EARLY_MASK 0x00010000 |
#include <xosd_hw.h>
OSD Layer 4 error for EOL early Mask.
#define XOSD_ERR_LAYER4_EOL_LATE_MASK 0x00020000 |
#include <xosd_hw.h>
OSD Layer 4 error for EOL late Mask.
#define XOSD_ERR_LAYER4_SOF_EARLY_MASK 0x00040000 |
#include <xosd_hw.h>
OSD Layer 4 error for SOF early Mask.
#define XOSD_ERR_LAYER4_SOF_LATE_MASK 0x00080000 |
#include <xosd_hw.h>
OSD Layer 4 error for SOF late Mask.
#define XOSD_ERR_LAYER5_EOL_EARLY_MASK 0x00100000 |
#include <xosd_hw.h>
OSD Layer 5 error for EOL early Mask.
#define XOSD_ERR_LAYER5_EOL_LATE_MASK 0x00200000 |
#include <xosd_hw.h>
OSD Layer 5 error for EOL late Mask.
#define XOSD_ERR_LAYER5_SOF_EARLY_MASK 0x00400000 |
#include <xosd_hw.h>
OSD Layer 5 error for SOF early Mask.
#define XOSD_ERR_LAYER5_SOF_LATE_MASK 0x00800000 |
#include <xosd_hw.h>
OSD Layer 5 error for SOF late Mask.
#define XOSD_ERR_LAYER6_EOL_EARLY_MASK 0x01000000 |
#include <xosd_hw.h>
OSD Layer 6 error for EOL early Mask.
#define XOSD_ERR_LAYER6_EOL_LATE_MASK 0x02000000 |
#include <xosd_hw.h>
OSD Layer 6 error for EOL late Mask.
#define XOSD_ERR_LAYER6_SOF_EARLY_MASK 0x04000000 |
#include <xosd_hw.h>
OSD Layer 6 error for SOF early Mask.
#define XOSD_ERR_LAYER6_SOF_LATE_MASK 0x08000000 |
#include <xosd_hw.h>
OSD Layer 6 error for SOF late Mask.
#define XOSD_ERR_LAYER7_EOL_EARLY_MASK 0x10000000 |
#include <xosd_hw.h>
OSD Layer 7 error for EOL early.
#define XOSD_ERR_LAYER7_EOL_LATE_MASK 0x20000000 |
#include <xosd_hw.h>
OSD Layer 7 error for EOL late Mask.
#define XOSD_ERR_LAYER7_SOF_EARLY_MASK 0x40000000 |
#include <xosd_hw.h>
OSD Layer 7 error for SOF early Mask.
#define XOSD_ERR_LAYER7_SOF_LATE_MASK 0x80000000 |
#include <xosd_hw.h>
OSD Layer 7 error for SOF late Mask.
#define XOSD_ERROR_OFFSET 0x008 |
#include <xosd_hw.h>
Error Offset.
#define XOSD_FONT_BIT_TO_BYTE 8 |
#define XOsd_FSyncReset XOsd_SyncReset |
#include <xosd.h>
This macro resets the OSD core at the end of the frame being processed.
It enables core automatically synchronizes to the SOF of the core to prevent image tearing. This function macro is differ from XOsd_Reset().
On the next rising-edge of SOF following a call to XOsd_SyncReset(), all of the core's configuration registers and outputs will be reset, then the reset flag will be immediately released, allowing the core to immediately resume default operation.
#define XOSD_GC_BANK_NUM 2 |
#include <xosd_hw.h>
The number of Banks in each Graphics controller.
Referenced by XOsd_LoadCharacterSetBank(), XOsd_LoadColorLUTBank(), XOsd_LoadInstructionList(), XOsd_LoadTextBank(), and XOsd_SetActiveBank().
#define XOSD_GCABA_CHR_MASK 0xFF000000 |
#define XOSD_GCABA_CHR_SHIFT 24 |
#include <xosd_hw.h>
Bit shift of active Character Bank.
Referenced by XOsd_LoadCharacterSetBank(), and XOsd_SetActiveBank().
#define XOSD_GCABA_COL_MASK 0x0000FF00 |
#define XOSD_GCABA_COL_SHIFT 8 |
#define XOSD_GCABA_INS_MASK 0x000000FF |
#define XOSD_GCABA_OFFSET 0x194 |
#include <xosd_hw.h>
GPU Active Bank Address Offset.
Referenced by XOsd_LoadCharacterSetBank(), XOsd_LoadInstructionList(), XOsd_LoadTextBank(), and XOsd_SetActiveBank().
#define XOSD_GCABA_TXT_MASK 0x00FF0000 |
#define XOSD_GCABA_TXT_SHIFT 16 |
#include <xosd_hw.h>
Bit shift of active Text Bank.
Referenced by XOsd_LoadTextBank(), and XOsd_SetActiveBank().
#define XOSD_GCD_OFFSET 0x198 |
#include <xosd_hw.h>
GPU Data Offset.
Referenced by XOsd_LoadCharacterSetBank(), XOsd_LoadInstructionList(), and XOsd_LoadTextBank().
#define XOSD_GCWBA_BANK_MASK 0x00000007 |
#include <xosd_hw.h>
Controls which bank to write GPU instructions and Color LUT data into.
Referenced by XOsd_LoadCharacterSetBank(), XOsd_LoadColorLUTBank(), XOsd_LoadInstructionList(), and XOsd_LoadTextBank().
#define XOSD_GCWBA_CHR0 0x00000006 |
#define XOSD_GCWBA_CHR1 0x00000007 |
#include <xosd_hw.h>
Character Set RAM 1.
#define XOSD_GCWBA_COL0 0x00000002 |
#define XOSD_GCWBA_COL1 0x00000003 |
#include <xosd_hw.h>
Color LUT RAM 1.
#define XOSD_GCWBA_GCNUM_MASK 0x00000700 |
#include <xosd_hw.h>
Graphics Controller Number Mask.
Referenced by XOsd_LoadCharacterSetBank(), XOsd_LoadColorLUTBank(), XOsd_LoadInstructionList(), and XOsd_LoadTextBank().
#define XOSD_GCWBA_GCNUM_SHIFT 8 |
#include <xosd_hw.h>
Bit shift of Graphics Controller Number.
Referenced by XOsd_LoadCharacterSetBank(), XOsd_LoadColorLUTBank(), XOsd_LoadInstructionList(), and XOsd_LoadTextBank().
#define XOSD_GCWBA_INS0 0x00000000 |
#define XOSD_GCWBA_INS1 0x00000001 |
#include <xosd_hw.h>
Instruction RAM 1.
#define XOSD_GCWBA_OFFSET 0x190 |
#include <xosd_hw.h>
GPU Write Bank Address Offset.
Referenced by XOsd_LoadCharacterSetBank(), XOsd_LoadColorLUTBank(), XOsd_LoadInstructionList(), and XOsd_LoadTextBank().
#define XOSD_GCWBA_TXT0 0x00000004 |
#define XOSD_GCWBA_TXT1 0x00000005 |
#include <xosd_hw.h>
Text RAM 1.
#define XOSD_H_ |
#include <xosd.h>
Prevent circular inclusions by using protection macros.
#define XOSD_HW_H_ |
#include <xosd_hw.h>
Prevent circular inclusions by using protection macros.
#define XOSD_IER_OFFSET 0x00C |
#include <xosd_hw.h>
Interrupt Enable Register Offset.
#define XOSD_INS0 0 |
#define XOSD_INS0_GCNUM_MASK 0x07000000 |
#define XOSD_INS0_GCNUM_SHIFT 24 |
#define XOSD_INS0_OPCODE_MASK 0xF0000000 |
#define XOSD_INS0_OPCODE_SHIFT 28 |
#define XOSD_INS0_XEND_MASK 0x00FFF000 |
#include <xosd_hw.h>
Horizontal end pixel of the object Mask.
Referenced by XOsd_CreateInstruction().
#define XOSD_INS0_XEND_SHIFT 12 |
#include <xosd_hw.h>
Bit shift number of Horizontal end pixel of the object.
Referenced by XOsd_CreateInstruction().
#define XOSD_INS0_XSTART_MASK 0x00000FFF |
#include <xosd_hw.h>
Horizontal start pixel of the Object Mask.
Referenced by XOsd_CreateInstruction().
#define XOSD_INS1 1 |
#define XOSD_INS1_TXTINDEX_MASK 0x0000000F |
#define XOSD_INS2 2 |
#define XOSD_INS2_OBJSIZE_MASK 0xFF000000 |
#define XOSD_INS2_OBJSIZE_SHIFT 24 |
#define XOSD_INS2_YEND_MASK 0x00FFF000 |
#define XOSD_INS2_YEND_SHIFT 12 |
#include <xosd_hw.h>
Bit shift number of Vertical end line of the object.
Referenced by XOsd_CreateInstruction().
#define XOSD_INS2_YSTART_MASK 0x00000FFF |
#include <xosd_hw.h>
Vertical start line of the Object Mask.
Referenced by XOsd_CreateInstruction().
#define XOSD_INS3 3 |
#define XOSD_INS3_COL_MASK 0x0000000F |
#define XOSD_INS_MEM_SIZE_TO_NUM 1 |
#include <xosd_hw.h>
Conversion to the number of instructions from the instruction memory size.
#define XOSD_INS_OPCODE_BOX 0xA |
#define XOSD_INS_OPCODE_BOXTXT 0xF |
#define XOSD_INS_OPCODE_END 0x0 |
#define XOSD_INS_OPCODE_LINE 0xC |
#define XOSD_INS_OPCODE_NOP 0x8 |
#define XOSD_INS_OPCODE_TXT 0xE |
#define XOSD_INS_SIZE 4 |
#include <xosd_hw.h>
Size of an instruction in words.
Referenced by XOsd_CreateInstruction(), and XOsd_LoadInstructionList().
#define XOsd_IntrClear | ( | InstancePtr, | |
IntrType | |||
) |
#include <xosd.h>
This function macro clears/acknowledges pending interrupts of the OSD core.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
IntrType | is the pending interrupts to clear/acknowledge. Use OR'ing of XOSD_IXR_*_MASK constants defined in xosd_hw.h to create this parameter value. |
Referenced by XOsd_IntrHandler().
#define XOsd_IntrDisable | ( | InstancePtr, | |
IntrType | |||
) |
#include <xosd.h>
This function macro disables the given individual interrupt(s) on the OSD core.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
IntrType | is the bit-mask of the interrupts to be enabled. Bit positions of 1 will be disabled. Bit positions of 0 will keep the previous setting.This mask is formed by OR'ing of XOSD_IXR_*_MASK bits defined in xosd_hw.h. |
#define XOsd_IntrEnable | ( | InstancePtr, | |
IntrType | |||
) |
#include <xosd.h>
This function macro enables the given individual interrupt(s) on the OSD core.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
IntrType | is the bit-mask of the interrupts to be enabled. Bit positions of 1 will be enabled. Bit positions of 0 will keep the previous setting.This mask is formed by OR'ing of XOSD_IXR_*_MASK bits defined in xosd_hw.h. |
#define XOsd_IntrGetPending | ( | InstancePtr | ) |
#include <xosd.h>
This function macro returns the pending interrupts of the OSD core.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
Referenced by XOsd_IntrHandler().
#define XOSD_ISR_OFFSET XOSD_STATUS_OFFSET |
#include <xosd_hw.h>
Interrupt status register generates a interrupt if the corresponding bits of interrupt enable register bits are set.
Interrupt Status Register Offset
#define XOSD_IXR_ALLERR_MASK |
#include <xosd_hw.h>
OSD Layer 0 to Layer 7 Error Mask.
Referenced by XOsd_IntrHandler().
#define XOSD_IXR_ALLINTR_MASK |
#include <xosd_hw.h>
OR'ing of all Masks.
#define XOSD_IXR_EOF_MASK 0x00000002 |
#define XOSD_IXR_LAYER0_ERROR_MASK 0x00000010 |
#include <xosd_hw.h>
Layer 0 Error interrupt enable Mask.
#define XOSD_IXR_LAYER1_ERROR_MASK 0x00000020 |
#include <xosd_hw.h>
Layer 1 Error interrupt enable Mask.
#define XOSD_IXR_LAYER2_ERROR_MASK 0x00000040 |
#include <xosd_hw.h>
Layer 2 Error interrupt enable Mask.
#define XOSD_IXR_LAYER3_ERROR_MASK 0x00000080 |
#include <xosd_hw.h>
Layer 3 Error interrupt enable Mask.
#define XOSD_IXR_LAYER4_ERROR_MASK 0x00000100 |
#include <xosd_hw.h>
Layer 4 Error interrupt enable Mask.
#define XOSD_IXR_LAYER5_ERROR_MASK 0x00000200 |
#include <xosd_hw.h>
Layer 5 Error interrupt enable Mask.
#define XOSD_IXR_LAYER6_ERROR_MASK 0x00000400 |
#include <xosd_hw.h>
Layer 6 Error interrupt enable Mask.
#define XOSD_IXR_LAYER7_ERROR_MASK 0x00000800 |
#include <xosd_hw.h>
Layer 7 Error interrupt enable Mask.
#define XOSD_IXR_PROC_STARTED_MASK 0x00000001 |
#define XOSD_L0C_OFFSET 0x110 |
#include <xosd_hw.h>
Layer 0 Control Offset.
Referenced by XOsd_DisableLayer(), XOsd_EnableLayer(), XOsd_GetLayerAlpha(), XOsd_GetLayerDimension(), XOsd_GetLayerPriority(), XOsd_SetLayerAlpha(), XOsd_SetLayerDimension(), and XOsd_SetLayerPriority().
#define XOSD_L0P_OFFSET 0x114 |
#include <xosd_hw.h>
Layer 0 Position Offset.
#define XOSD_L0S_OFFSET 0x118 |
#include <xosd_hw.h>
Layer 0 Size Offset.
#define XOSD_L1C_OFFSET 0x120 |
#include <xosd_hw.h>
Layer 1 Control Offset.
#define XOSD_L1P_OFFSET 0x124 |
#include <xosd_hw.h>
Layer 1 Position Offset.
#define XOSD_L1S_OFFSET 0x128 |
#include <xosd_hw.h>
Layer 1 Size Offset.
#define XOSD_L2C_OFFSET 0x130 |
#include <xosd_hw.h>
Layer 2 Control Offset.
#define XOSD_L2P_OFFSET 0x134 |
#include <xosd_hw.h>
Layer 2 Position Offset.
#define XOSD_L2S_OFFSET 0x138 |
#include <xosd_hw.h>
Layer 2 Size Offset.
#define XOSD_L3C_OFFSET 0x140 |
#include <xosd_hw.h>
Layer 3 Control Offset.
#define XOSD_L3P_OFFSET 0x144 |
#include <xosd_hw.h>
Layer 3 Position Offset.
#define XOSD_L3S_OFFSET 0x148 |
#include <xosd_hw.h>
Layer 3 Size Offset.
#define XOSD_L4C_OFFSET 0x150 |
#include <xosd_hw.h>
Layer 4 Control Offset.
#define XOSD_L4P_OFFSET 0x154 |
#include <xosd_hw.h>
Layer 4 Position Offset.
#define XOSD_L4S_OFFSET 0x158 |
#include <xosd_hw.h>
Layer 4 Size Offset.
#define XOSD_L5C_OFFSET 0x160 |
#include <xosd_hw.h>
Layer 5 Control Offset.
#define XOSD_L5P_OFFSET 0x164 |
#include <xosd_hw.h>
Layer 5 Position Offset.
#define XOSD_L5S_OFFSET 0x168 |
#include <xosd_hw.h>
Layer 5 Size Offset.
#define XOSD_L6C_OFFSET 0x170 |
#include <xosd_hw.h>
Layer 6 Control Offset.
#define XOSD_L6P_OFFSET 0x174 |
#include <xosd_hw.h>
Layer 6 Position Offset.
#define XOSD_L6S_OFFSET 0x178 |
#include <xosd_hw.h>
Layer 6 Size Offset.
#define XOSD_L7C_OFFSET 0x180 |
#include <xosd_hw.h>
Layer 7 Control Offset.
#define XOSD_L7P_OFFSET 0x184 |
#include <xosd_hw.h>
Layer 7 Position Offset.
#define XOSD_L7S_OFFSET 0x188 |
#include <xosd_hw.h>
Layer 7 Size Offset.
#define XOSD_LAYER_PRIORITY_0 0 |
#include <xosd_hw.h>
Priority 0 — Lowest.
#define XOSD_LAYER_PRIORITY_1 1 |
#include <xosd_hw.h>
Priority 1.
#define XOSD_LAYER_PRIORITY_2 2 |
#include <xosd_hw.h>
Priority 2.
#define XOSD_LAYER_PRIORITY_3 3 |
#include <xosd_hw.h>
Priority 3.
#define XOSD_LAYER_PRIORITY_4 4 |
#include <xosd_hw.h>
Priority 4.
#define XOSD_LAYER_PRIORITY_5 5 |
#include <xosd_hw.h>
Priority 5.
#define XOSD_LAYER_PRIORITY_6 6 |
#include <xosd_hw.h>
Priority 6.
#define XOSD_LAYER_PRIORITY_7 7 |
#define XOSD_LAYER_SIZE 0x10 |
#include <xosd_hw.h>
Total number of Layers.
Referenced by XOsd_DisableLayer(), XOsd_EnableLayer(), XOsd_GetLayerAlpha(), XOsd_GetLayerDimension(), XOsd_GetLayerPriority(), XOsd_SetLayerAlpha(), XOsd_SetLayerDimension(), and XOsd_SetLayerPriority().
#define XOSD_LAYER_TYPE_DISABLE 0 |
#include <xosd_hw.h>
Layer is disabled.
Referenced by XOsd_DisableLayer(), XOsd_EnableLayer(), XOsd_GetLayerAlpha(), XOsd_GetLayerDimension(), XOsd_GetLayerPriority(), XOsd_SetLayerAlpha(), XOsd_SetLayerDimension(), and XOsd_SetLayerPriority().
#define XOSD_LAYER_TYPE_GPU 1 |
#include <xosd_hw.h>
Layer's type is GPU.
Referenced by XOsd_CreateInstruction(), XOsd_LoadCharacterSetBank(), XOsd_LoadColorLUTBank(), XOsd_LoadInstructionList(), XOsd_LoadTextBank(), and XOsd_SetActiveBank().
#define XOSD_LAYER_TYPE_VFBC 2 |
#include <xosd_hw.h>
Layer's type is VFBC.
#define XOSD_LXC 0x00 |
#include <xosd_hw.h>
Layer Control.
Referenced by XOsd_DisableLayer(), XOsd_EnableLayer(), XOsd_GetLayerAlpha(), XOsd_GetLayerPriority(), XOsd_SetLayerAlpha(), and XOsd_SetLayerPriority().
#define XOSD_LXC_ALPHA_MASK 0x1FFF0000 |
#include <xosd_hw.h>
Global Alpha Value Mask.
Referenced by XOsd_GetLayerAlpha(), and XOsd_SetLayerAlpha().
#define XOSD_LXC_ALPHA_SHIFT 16 |
#include <xosd_hw.h>
Bit shift number of Global Alpha Value.
Referenced by XOsd_GetLayerAlpha(), and XOsd_SetLayerAlpha().
#define XOSD_LXC_EN_MASK 0x00000001 |
#define XOSD_LXC_GALPHAEN_MASK 0x00000002 |
#include <xosd_hw.h>
Global Alpha Enable Mask.
Referenced by XOsd_GetLayerAlpha(), and XOsd_SetLayerAlpha().
#define XOSD_LXC_PRIORITY_MASK 0x00000700 |
#include <xosd_hw.h>
Layer Priority Mask.
Referenced by XOsd_GetLayerPriority(), and XOsd_SetLayerPriority().
#define XOSD_LXC_PRIORITY_SHIFT 8 |
#include <xosd_hw.h>
Bit shift number of Layer Priority.
Referenced by XOsd_GetLayerPriority(), and XOsd_SetLayerPriority().
#define XOSD_LXP 0x04 |
#include <xosd_hw.h>
Layer Position.
Referenced by XOsd_GetLayerDimension(), and XOsd_SetLayerDimension().
#define XOSD_LXP_XSTART_MASK 0x00000FFF |
#include <xosd_hw.h>
Horizontal start pixel of origin of layer Mask.
Referenced by XOsd_GetLayerDimension(), and XOsd_SetLayerDimension().
#define XOSD_LXP_YSTART_MASK 0x0FFF0000 |
#include <xosd_hw.h>
Vertical start line of origin of layer Mask.
Referenced by XOsd_GetLayerDimension(), and XOsd_SetLayerDimension().
#define XOSD_LXP_YSTART_SHIFT 16 |
#include <xosd_hw.h>
Bit shift of vertical start line of origin of layer.
Referenced by XOsd_GetLayerDimension(), and XOsd_SetLayerDimension().
#define XOSD_LXS 0x08 |
#include <xosd_hw.h>
Layer Size.
Referenced by XOsd_GetLayerDimension(), and XOsd_SetLayerDimension().
#define XOSD_LXS_XSIZE_MASK 0x00000FFF |
#include <xosd_hw.h>
Horizontal size of layer Mask.
Referenced by XOsd_GetLayerDimension(), and XOsd_SetLayerDimension().
#define XOSD_LXS_YSIZE_MASK 0x0FFF0000 |
#include <xosd_hw.h>
Vertical size of layer Mask.
Referenced by XOsd_GetLayerDimension(), and XOsd_SetLayerDimension().
#define XOSD_LXS_YSIZE_SHIFT 16 |
#include <xosd_hw.h>
Bit shift number of vertical size of layer.
Referenced by XOsd_GetLayerDimension(), and XOsd_SetLayerDimension().
#define XOSD_MAX_NUM_OF_LAYERS 8 |
#define XOSD_OPENC_NBITS_MASK 0x00000030 |
#include <xosd_hw.h>
Vertical Height of OSD Output Mask.
#define XOSD_OPENC_OFFSET 0x028 |
#include <xosd_hw.h>
Output Encoding Offset.
#define XOSD_OPENC_VID_FORMAT_MASK 0x0000000F |
#include <xosd_hw.h>
OSD Output Video Format Mask 0: YUV 4:2:2 1: YUV 4:4:4 2: RGB 3: YUV 4:2:0.
#define XOsd_ReadReg | ( | BaseAddress, | |
RegOffset | |||
) | XOsd_In32((BaseAddress) + (u32)(RegOffset)) |
#include <xosd_hw.h>
This function reads the given register.
BaseAddress | is the base address of the OSD core. |
RegOffset | is the register offset of the OSD core. |
Referenced by XOsd_DisableLayer(), XOsd_EnableLayer(), XOsd_GetActiveSize(), XOsd_GetBackgroundColor(), XOsd_GetLayerAlpha(), XOsd_GetLayerDimension(), XOsd_GetLayerPriority(), XOsd_GetVersion(), XOsd_LoadCharacterSetBank(), XOsd_LoadInstructionList(), XOsd_LoadTextBank(), XOsd_SelfTest(), XOsd_SetActiveBank(), XOsd_SetLayerAlpha(), and XOsd_SetLayerPriority().
#define XOsd_RegUpdateDisable | ( | InstancePtr | ) |
#include <xosd.h>
This function macro prevents the OSD core from committing recent changes made so far by the software.
When disabled, changes to other configuration registers are stored, but do not effect the behavior of the core.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
#define XOsd_RegUpdateEnable | ( | InstancePtr | ) |
#include <xosd.h>
This function macro commits all the register value changes made so far by the software to the OSD core instance.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
#define XOsd_Reset | ( | InstancePtr | ) |
#include <xosd.h>
This function macro resets an OSD core This effects the core immediately, and may cause image tearing.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
#define XOSD_RST_OFFSET XOSD_CTL_OFFSET |
#include <xosd_hw.h>
Software Reset Offset.
#define XOSD_RST_RESET XOSD_CTL_SW_RST_MASK |
#include <xosd_hw.h>
Software Reset.
#define XOsd_Start XOsd_Enable |
#include <xosd.h>
This function macro stops an OSD core.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
#define XOSD_STATUS_OFFSET 0x004 |
#include <xosd_hw.h>
Status Offset.
#define XOsd_StatusGetPending | ( | InstancePtr | ) |
#include <xosd.h>
This function macro returns the pending status of the OSD core.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
#define XOsd_Stop XOsd_Disable |
#include <xosd.h>
This function macro stops an OSD core.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
#define XOsd_SyncReset | ( | InstancePtr | ) |
#include <xosd.h>
This function macro resets a OSD core at the end of the frame being processed.
It enables core automatically synchronizes to the SOF of the core to prevent image tearing. This function macro is differ from XOsd_Reset().
On the next rising-edge of SOF following a call to XOsd_SyncReset(), all of the core's configuration registers and outputs will be reset, then the reset flag will be immediately released, allowing the core to immediately resume default operation.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
#define XOSD_VER_MAJOR_MASK 0xFF000000 |
#include <xosd_hw.h>
Major Version Mask.
#define XOSD_VER_MAJOR_SHIFT 24 |
#include <xosd_hw.h>
Major Version Shift.
#define XOSD_VER_MINOR_MASK 0x00FF0000 |
#include <xosd_hw.h>
Minor Version Mask.
#define XOSD_VER_MINOR_SHIFT 16 |
#include <xosd_hw.h>
Minor Version Bit Shift.
#define XOSD_VER_OFFSET 0x010 |
#define XOSD_VER_REV_MASK 0x0000F000 |
#include <xosd_hw.h>
Revision Version Mask.
#define XOSD_VER_REV_SHIFT 12 |
#include <xosd_hw.h>
Revision Bit Shift.
#define XOsd_WriteReg | ( | BaseAddress, | |
RegOffset, | |||
Data | |||
) | XOsd_Out32((BaseAddress) + (u32)(RegOffset), (Data)) |
#include <xosd_hw.h>
This function writes the given register.
BaseAddress | is the base address of the OSD core. |
RegOffset | is the register offset of the OSD core. |
Data | is the 32-bit value to write into the core register. |
Referenced by XOsd_DisableLayer(), XOsd_EnableLayer(), XOsd_LoadCharacterSetBank(), XOsd_LoadColorLUTBank(), XOsd_LoadInstructionList(), XOsd_LoadTextBank(), XOsd_SetActiveBank(), XOsd_SetActiveSize(), XOsd_SetBackgroundColor(), XOsd_SetLayerAlpha(), XOsd_SetLayerDimension(), and XOsd_SetLayerPriority().
typedef void(* XOsd_CallBack) (void *CallBackRef) |
#include <xosd.h>
This function callback type for all interrupts except error interrupt.
CallBackRef | is a callback reference passed in by the upper layer when setting the callback functions and passed back to the upper layer when the callback is invoked. |
typedef void(* XOsd_ErrorCallBack) (void *CallBackRef, u32 ErrorMask) |
#include <xosd.h>
This function callback type for error interrupt.
CallBackRef | is a callback reference passed in by the upper layer when setting the callback functions, and passed back to the upper layer when the callback is invoked. |
ErrorMask | is a bit mask indicating the cause of the error. Its value equals 'OR'ing one or more XOSD_IXR_* values defined in xosd_hw.h. |
typedef u32 XOsd_Instruction[XOSD_INS_SIZE] |
#include <xosd.h>
The XOsd_Instruction data structure for holding one GC instruction.
anonymous enum |
#include <xosd.h>
Enumerator | |
---|---|
XOSD_HANDLER_PROCSTART | A processing start event interrupt type. |
XOSD_HANDLER_FRAMEDONE | A frame done event interrupt type. |
XOSD_HANDLER_ERROR | An error condition interrupt type. |
int XOsd_CfgInitialize | ( | XOsd * | InstancePtr, |
XOsd_Config * | CfgPtr, | ||
u32 | EffectiveAddr | ||
) |
#include <xosd.c>
This function initializes an OSD core.
This function must be called prior to using an OSD core. Initialization of an OSD includes setting up the instance data and ensuring the hardware is in a quiescent state.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
CfgPtr | points to the configuration structure associated with the OSD core. |
EffectiveAddr | is the base address of the core. If address translation is being used, then this parameter must reflect the virtual base address. Otherwise, the physical address should be used. |
References XOsd_Config::BaseAddress, XOsd::Config, XOsd::InstructionInExternalMem, XOsd_Config::LayerNum, XOsd::ProcStartCallBack, and XOSD_MAX_NUM_OF_LAYERS.
Referenced by XOsdSelfTestExample().
void XOsd_CreateInstruction | ( | XOsd * | InstancePtr, |
u32 | InstructionPtr[], | ||
u8 | GcIndex, | ||
u16 | ObjType, | ||
u8 | ObjSize, | ||
u16 | XStart, | ||
u16 | YStart, | ||
u16 | XEnd, | ||
u16 | YEnd, | ||
u8 | TextIndex, | ||
u8 | ColorIndex | ||
) |
#include <xosd.c>
This function creates an instruction for the OSD core.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
InstructionPtr | is a pointer to the instruction buffer to be populated with the instruction to be created. The upper level application is responsible for allocating this instruction buffer. |
GcIndex | indicates the Graphics Controller that will consume the instruction. Valid value range is from 0 to (The Number of Layers) - 1. The layer's type must be set to XOSD_LAYER_TYPE_GPU (defined in xosd_hw.h) for this function to work properly. |
ObjType | indicates the type of object to draw. Use one of XOSD_INS_OPCODE_* constants defined in xosd_hw.h. |
ObjSize | indicates line width of boxes and lines and the text scale factor for text boxes. |
XStart | indicates the horizontal start pixel of the Object. |
YStart | indicates the vertical start line of the Object. |
XEnd | indicates the horizontal end pixel of the Object. |
YEnd | indicates the vertical end line of the Object. |
TextIndex | indicates the string index. |
ColorIndex | indicates the color index. |
References XOsd::IsReady, XOsd::Layers, XOsd_Layer::LayerType, XOsd_Layer::TextNumStrings, XOSD_INS0, XOSD_INS0_GCNUM_MASK, XOSD_INS0_GCNUM_SHIFT, XOSD_INS0_OPCODE_MASK, XOSD_INS0_OPCODE_SHIFT, XOSD_INS0_XEND_MASK, XOSD_INS0_XEND_SHIFT, XOSD_INS0_XSTART_MASK, XOSD_INS1, XOSD_INS1_TXTINDEX_MASK, XOSD_INS2, XOSD_INS2_OBJSIZE_MASK, XOSD_INS2_OBJSIZE_SHIFT, XOSD_INS2_YEND_MASK, XOSD_INS2_YEND_SHIFT, XOSD_INS2_YSTART_MASK, XOSD_INS3, XOSD_INS3_COL_MASK, XOSD_INS_OPCODE_BOX, XOSD_INS_OPCODE_BOXTXT, XOSD_INS_OPCODE_END, XOSD_INS_OPCODE_LINE, XOSD_INS_OPCODE_NOP, XOSD_INS_OPCODE_TXT, XOSD_INS_SIZE, and XOSD_LAYER_TYPE_GPU.
void XOsd_DisableLayer | ( | XOsd * | InstancePtr, |
u8 | LayerIndex | ||
) |
#include <xosd.c>
This function disables an OSD layer.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
LayerIndex | indicates which layer to be worked on. Valid value range is from 0 to (the number of layers implemented in the core - 1). |
References XOsd_Config::BaseAddress, XOsd::Config, XOsd::IsReady, XOsd::Layers, XOsd_Layer::LayerType, XOSD_L0C_OFFSET, XOSD_LAYER_SIZE, XOSD_LAYER_TYPE_DISABLE, XOSD_LXC, XOSD_LXC_EN_MASK, XOsd_ReadReg, and XOsd_WriteReg.
void XOsd_EnableLayer | ( | XOsd * | InstancePtr, |
u8 | LayerIndex | ||
) |
#include <xosd.c>
This function enables an OSD layer.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
LayerIndex | indicates which layer to be worked on. Valid value range is from 0 to (the number of layers implemented in the core - 1). |
References XOsd_Config::BaseAddress, XOsd::Config, XOsd::IsReady, XOsd::Layers, XOsd_Layer::LayerType, XOSD_L0C_OFFSET, XOSD_LAYER_SIZE, XOSD_LAYER_TYPE_DISABLE, XOSD_LXC, XOSD_LXC_EN_MASK, XOsd_ReadReg, and XOsd_WriteReg.
void XOsd_GetActiveSize | ( | XOsd * | InstancePtr, |
u32 * | WidthPtr, | ||
u32 * | HeightPtr | ||
) |
#include <xosd.c>
This function gets the screen size of the OSD Output.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
WidthPtr | will point to the width of the OSD output after this function returns. |
HeightPtr | will point to the height of the OSD output after this function returns. |
References XOsd_Config::BaseAddress, XOsd::Config, XOsd::IsReady, XOSD_ACTIVE_SIZE_OFFSET, XOSD_ACTSIZE_NUM_LINE_MASK, XOSD_ACTSIZE_NUM_LINE_SHIFT, XOSD_ACTSIZE_NUM_PIXEL_MASK, and XOsd_ReadReg.
void XOsd_GetBackgroundColor | ( | XOsd * | InstancePtr, |
u16 * | RedPtr, | ||
u16 * | BluePtr, | ||
u16 * | GreenPtr | ||
) |
#include <xosd.c>
This function gets the background color used by the OSD output.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
RedPtr | will point to the red value used in the background color after this function returns. |
BluePtr | will point to the blue value used in the background color after this function returns. |
GreenPtr | will point to the green value used in the background color after this function returns. |
References XOsd_Config::BaseAddress, XOsd::Config, XOsd::IsReady, XOSD_BC0_OFFSET, XOSD_BC0_YG_MASK, XOSD_BC1_OFFSET, XOSD_BC1_UCBB_MASK, XOSD_BC2_OFFSET, XOSD_BC2_VCRR_MASK, and XOsd_ReadReg.
void XOsd_GetLayerAlpha | ( | XOsd * | InstancePtr, |
u8 | LayerIndex, | ||
u16 * | GlobalAlphaEnablePtr, | ||
u16 * | GlobalAlphaValuePtr | ||
) |
#include <xosd.c>
This function gets the alpha value and mode of an OSD layer.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
LayerIndex | indicates which layer to be worked on. Valid value range is from 0 to (the number of layers implemented in the core - 1). |
GlobalAlphaEnablePtr | will point to a flag indicating whether the global alpha is enabled on a layer after this function returns. Flag 1 indicates that the global alpha is enabled, 0 indicates that it is not. |
GlobalAlphaValuePtr | will point to the transparent level after this function returns. 0 for 100% transparent, 255 (8bit) for 0% transparent (100% opaque). |
References XOsd_Config::BaseAddress, XOsd::Config, XOsd::IsReady, XOsd::Layers, XOsd_Layer::LayerType, XOSD_L0C_OFFSET, XOSD_LAYER_SIZE, XOSD_LAYER_TYPE_DISABLE, XOSD_LXC, XOSD_LXC_ALPHA_MASK, XOSD_LXC_ALPHA_SHIFT, XOSD_LXC_GALPHAEN_MASK, and XOsd_ReadReg.
void XOsd_GetLayerDimension | ( | XOsd * | InstancePtr, |
u8 | LayerIndex, | ||
u16 * | XStartPtr, | ||
u16 * | YStartPtr, | ||
u16 * | XSizePtr, | ||
u16 * | YSizePtr | ||
) |
#include <xosd.c>
This function gets the start position and size of an OSD layer.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
LayerIndex | indicates which layer to be worked on. Valid value range is from 0 to (the number of layers implemented in the core - 1). |
XStartPtr | will point to the horizontal start pixel value of origin of the layer after this function returns. |
YStartPtr | will point to the vertical start line of origin of the layer after this function returns. |
XSizePtr | will point to the horizontal size value of the layer after this function returns. |
YSizePtr | will point to the vertical size value of the layer after this function returns. |
References XOsd_Config::BaseAddress, XOsd::Config, XOsd::IsReady, XOsd::Layers, XOsd_Layer::LayerType, XOSD_L0C_OFFSET, XOSD_LAYER_SIZE, XOSD_LAYER_TYPE_DISABLE, XOSD_LXP, XOSD_LXP_XSTART_MASK, XOSD_LXP_YSTART_MASK, XOSD_LXP_YSTART_SHIFT, XOSD_LXS, XOSD_LXS_XSIZE_MASK, XOSD_LXS_YSIZE_MASK, XOSD_LXS_YSIZE_SHIFT, and XOsd_ReadReg.
void XOsd_GetLayerPriority | ( | XOsd * | InstancePtr, |
u8 | LayerIndex, | ||
u8 * | PriorityPtr | ||
) |
#include <xosd.c>
This function gets the priority of an OSD layer.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
LayerIndex | indicates which layer to be worked on. Valid value range is from 0 to (the number of layers implemented in the core - 1). |
PriorityPtr | will point to the priority used on the layer after this function returns. Use one of XOSD_LAYER_PRIORITY_0 (the lowest priority) through XOSD_LAYER_PRIORITY_7 (the highest priority) defined in xosd_hw.h to interpret the value. |
References XOsd_Config::BaseAddress, XOsd::Config, XOsd::IsReady, XOsd::Layers, XOsd_Layer::LayerType, XOSD_L0C_OFFSET, XOSD_LAYER_SIZE, XOSD_LAYER_TYPE_DISABLE, XOSD_LXC, XOSD_LXC_PRIORITY_MASK, XOSD_LXC_PRIORITY_SHIFT, and XOsd_ReadReg.
u32 XOsd_GetVersion | ( | XOsd * | InstancePtr | ) |
#include <xosd.c>
This function returns the Version of the OSD core.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
References XOsd_Config::BaseAddress, XOsd::Config, XOsd_ReadReg, and XOSD_VER_OFFSET.
void XOsd_IntrHandler | ( | void * | InstancePtr | ) |
#include <xosd.h>
This function is the interrupt handler for the On-Screen-Display driver.
This handler reads the pending interrupt from the IER/ISR, determines the source of the interrupts, calls according callbacks, and finally clears the interrupts.
The application is responsible for connecting this function to the interrupt system. Application beyond this driver is also responsible for providing callbacks to handle interrupts and installing the callbacks using XOsd_SetCallBack() during initialization phase.
InstancePtr | is a pointer to the XOsd instance that just interrupted. |
References XOsd::ErrCallBack, XOsd::ErrRef, XOsd::FrameDoneCallBack, XOsd::FrameDoneRef, XOsd::IsReady, XOsd::ProcStartCallBack, XOsd::ProcStartRef, XOsd_IntrClear, XOsd_IntrGetPending, XOSD_IXR_ALLERR_MASK, XOSD_IXR_EOF_MASK, and XOSD_IXR_PROC_STARTED_MASK.
void XOsd_LoadCharacterSetBank | ( | XOsd * | InstancePtr, |
u8 | GcIndex, | ||
u8 | BankIndex, | ||
u32 | CharSetData[] | ||
) |
#include <xosd.c>
This function loads character set data (font) into an OSD Graphics Controller bank.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
GcIndex | indicates which Graphics Controller to work on. Valid value range is from 0 to (The Number of Layers) - 1. The layer's type must be set to XOSD_LAYER_TYPE_GPU (defined in xosd_hw.h) for this function to work properly. |
BankIndex | indicates which GC bank to be worked on. Valid value range is from 0 to XOSD_GC_BANK_NUM - 1. |
CharSetData | points to the character set data to be loaded. |
References XOsd_Config::BaseAddress, XOsd::Config, XOsd_Layer::FontBitsPerPixel, XOsd_Layer::FontHeight, XOsd_Layer::FontNumChars, XOsd_Layer::FontWidth, XOsd::IsReady, XOsd::Layers, XOsd_Layer::LayerType, XOSD_FONT_BIT_TO_BYTE, XOSD_GC_BANK_NUM, XOSD_GCABA_CHR_SHIFT, XOSD_GCABA_OFFSET, XOSD_GCD_OFFSET, XOSD_GCWBA_BANK_MASK, XOSD_GCWBA_CHR0, XOSD_GCWBA_GCNUM_MASK, XOSD_GCWBA_GCNUM_SHIFT, XOSD_GCWBA_OFFSET, XOSD_LAYER_TYPE_GPU, XOsd_ReadReg, and XOsd_WriteReg.
void XOsd_LoadColorLUTBank | ( | XOsd * | InstancePtr, |
u8 | GcIndex, | ||
u8 | BankIndex, | ||
u32 | ColorData[] | ||
) |
#include <xosd.c>
This function loads color look up table data into an OSD Graphics Controller bank.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
GcIndex | indicates which Graphics Controller to work on. Valid value range is from 0 to (The Number of Layers) - 1. The layer's type must be set to XOSD_LAYER_TYPE_GPU (defined in xosd_hw.h) for this function to work properly. |
BankIndex | indicates which GC Bank to be worked on. Valid value range is from 0 to XOSD_GC_BANK_NUM - 1. |
ColorData | points to the color LUT data to be loaded. |
References XOsd_Config::BaseAddress, XOsd::Config, XOsd::IsReady, XOsd::Layers, XOsd_Layer::LayerType, XOsd_Config::SlaveAxisVideoDataWidth, XOSD_GC_BANK_NUM, XOSD_GCWBA_BANK_MASK, XOSD_GCWBA_COL0, XOSD_GCWBA_GCNUM_MASK, XOSD_GCWBA_GCNUM_SHIFT, XOSD_GCWBA_OFFSET, XOSD_LAYER_TYPE_GPU, and XOsd_WriteReg.
void XOsd_LoadInstructionList | ( | XOsd * | InstancePtr, |
u8 | GcIndex, | ||
u8 | BankIndex, | ||
u32 | InstSetPtr[], | ||
u32 | InstNum | ||
) |
#include <xosd.c>
This function load an instruction list to be used by an Graphic Controller in the OSD core.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
GcIndex | indicates which Graphics Controller to work on. Valid value range is from 0 to (The Number of Layers) - 1. The layer's type must be set to XOSD_LAYER_TYPE_GPU (defined in xosd_hw.h) for this function to work properly. |
BankIndex | indicates which GC Bank to be worked on. Valid value range is from 0 to XOSD_GC_BANK_NUM. |
InstSetPtr | is a pointer to the start of the instruction list to load into the OSD core. The last instruction in the list must has XOSD_INS_OPCODE_END type. |
InstNum | indicates the number of the instructions in the list to load. Valid value range is from 1 to the half of the size of the instruction memory created for the Graphic Controller. |
References XOsd_Config::BaseAddress, XOsd::Config, XOsd::IsReady, XOsd::Layers, XOsd_Layer::LayerType, XOSD_GC_BANK_NUM, XOSD_GCABA_OFFSET, XOSD_GCD_OFFSET, XOSD_GCWBA_BANK_MASK, XOSD_GCWBA_GCNUM_MASK, XOSD_GCWBA_GCNUM_SHIFT, XOSD_GCWBA_INS0, XOSD_GCWBA_OFFSET, XOSD_INS_SIZE, XOSD_LAYER_TYPE_GPU, XOsd_ReadReg, and XOsd_WriteReg.
void XOsd_LoadTextBank | ( | XOsd * | InstancePtr, |
u8 | GcIndex, | ||
u8 | BankIndex, | ||
u32 | TextData[] | ||
) |
#include <xosd.c>
This function loads text data into an OSD Graphics Controller bank.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
GcIndex | indicates which Graphics Controller to work on. Valid value range is from 0 to (The Number of Layers) - 1. The layer's type must be set to XOSD_LAYER_TYPE_GPU (defined in xosd_hw.h) for this function to work properly. |
BankIndex | indicates which GC bank to be worked on. Valid value range is from 0 to XOSD_GC_BANK_NUM - 1. |
TextData | points to the text data to be loaded. |
References XOsd_Config::BaseAddress, XOsd::Config, XOsd::IsReady, XOsd::Layers, XOsd_Layer::LayerType, XOsd_Layer::TextMaxStringLength, XOSD_GC_BANK_NUM, XOSD_GCABA_OFFSET, XOSD_GCABA_TXT_SHIFT, XOSD_GCD_OFFSET, XOSD_GCWBA_BANK_MASK, XOSD_GCWBA_GCNUM_MASK, XOSD_GCWBA_GCNUM_SHIFT, XOSD_GCWBA_OFFSET, XOSD_GCWBA_TXT0, XOSD_LAYER_TYPE_GPU, XOsd_ReadReg, and XOsd_WriteReg.
XOsd_Config * XOsd_LookupConfig | ( | u16 | DeviceId | ) |
#include <xosd.h>
This function gets a reference to an XOsd_Config structure based on the unique device id, DeviceId.
The return value will refer to an entry in the core configuration table defined in the xosd_g.c file.
DeviceId | is the unique core ID of the OSD core for the lookup operation. |
Referenced by XOsdSelfTestExample().
int XOsd_SelfTest | ( | XOsd * | InstancePtr | ) |
#include <xosd.h>
This function reads Version register of OSD core and compares with zero as part of self test.
InstancePtr | is a pointer to the XOsd instance. |
References XOsd_Config::BaseAddress, XOsd::Config, XOsd_ReadReg, and XOSD_VER_OFFSET.
Referenced by XOsdSelfTestExample().
void XOsd_SetActiveBank | ( | XOsd * | InstancePtr, |
u8 | GcIndex, | ||
u8 | ColorBankIndex, | ||
u8 | CharBankIndex, | ||
u8 | TextBankIndex, | ||
u8 | InstructionBankIndex | ||
) |
#include <xosd.c>
This function chooses active banks for a GC in the OSD core.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
GcIndex | indicates which Graphics Controller to work on. Valid value range is from 0 to (The Number of Layers) - 1. The layer's type must be set to XOSD_LAYER_TYPE_GPU (defined in xosd_hw.h) for this function to work properly. |
ColorBankIndex | indicates the color LUT bank to be choose as active. |
CharBankIndex | indicates the character set bank to be chosen as active. |
TextBankIndex | indicates the text data bank to be chosen as active. |
InstructionBankIndex | indicates the instruction bank to be chosen as active. |
References XOsd_Config::BaseAddress, XOsd::Config, XOsd::IsReady, XOsd::Layers, XOsd_Layer::LayerType, XOSD_GC_BANK_NUM, XOSD_GCABA_CHR_MASK, XOSD_GCABA_CHR_SHIFT, XOSD_GCABA_COL_MASK, XOSD_GCABA_COL_SHIFT, XOSD_GCABA_INS_MASK, XOSD_GCABA_OFFSET, XOSD_GCABA_TXT_MASK, XOSD_GCABA_TXT_SHIFT, XOSD_LAYER_TYPE_GPU, XOsd_ReadReg, and XOsd_WriteReg.
void XOsd_SetActiveSize | ( | XOsd * | InstancePtr, |
u32 | Width, | ||
u32 | Height | ||
) |
#include <xosd.c>
This function sets the screen size of the OSD Output.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
Width | defines the width of the OSD output. |
Height | defines the height of the OSD output. |
References XOsd_Config::BaseAddress, XOsd::Config, XOsd::IsReady, XOsd::ScreenHeight, XOsd::ScreenWidth, XOSD_ACTIVE_SIZE_OFFSET, XOSD_ACTSIZE_NUM_LINE_MASK, XOSD_ACTSIZE_NUM_LINE_SHIFT, XOSD_ACTSIZE_NUM_PIXEL_MASK, and XOsd_WriteReg.
void XOsd_SetBackgroundColor | ( | XOsd * | InstancePtr, |
u16 | Red, | ||
u16 | Blue, | ||
u16 | Green | ||
) |
#include <xosd.c>
This function sets the background color used by the OSD output.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
Red | indicates the red value to be used in the background color. |
Blue | indicates the blue value to be used in the background color. |
Green | indicates the green value to be used in the background color. |
References XOsd_Config::BaseAddress, XOsd::Config, XOsd::IsReady, XOSD_BC0_OFFSET, XOSD_BC0_YG_MASK, XOSD_BC1_OFFSET, XOSD_BC1_UCBB_MASK, XOSD_BC2_OFFSET, XOSD_BC2_VCRR_MASK, and XOsd_WriteReg.
int XOsd_SetCallBack | ( | XOsd * | InstancePtr, |
u32 | HandlerType, | ||
void * | CallBackFunc, | ||
void * | CallBackRef | ||
) |
#include <xosd.h>
This routine installs an asynchronous callback function for the given HandlerType:
HandlerType Callback Function Type ----------------------- ------------------------------- XOSD_HANDLER_PROCSTART StubCallBack XOSD_HANDLER_FRAMEDONE StubCallBack XOSD_HANDLER_ERROR StubErrCallBack
InstancePtr | is a pointer to the XOsd instance to be worked on. |
HandlerType | specifies which callback is to be attached. |
CallBackFunc | is the address of the callback function. |
CallBackRef | is a user data item that will be passed to the callback function when it is invoked. |
References XOsd::ErrCallBack, XOsd::ErrRef, XOsd::FrameDoneCallBack, XOsd::FrameDoneRef, XOsd::IsReady, XOsd::ProcStartCallBack, XOsd::ProcStartRef, XOSD_HANDLER_ERROR, XOSD_HANDLER_FRAMEDONE, and XOSD_HANDLER_PROCSTART.
void XOsd_SetLayerAlpha | ( | XOsd * | InstancePtr, |
u8 | LayerIndex, | ||
u16 | GlobalAlphaEnable, | ||
u16 | GlobalAlphaValue | ||
) |
#include <xosd.c>
This function sets the alpha value and mode of an OSD layer.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
LayerIndex | indicates which layer to be worked on. Valid value range is from 0 to (the number of layers implemented in the core - 1). |
GlobalAlphaEnable | indicates whether to enable the global alpha. Use any non-0 value to enable the global alpha, and 0 to disable it. |
GlobalAlphaValue | indicates the transparent level. 0 for 100% transparent, 255 (8bit) for 0% transparent (100% opaque). This argument will be ignored if parameter GlobalAlphaEnble has value 0. |
References XOsd_Config::BaseAddress, XOsd::Config, XOsd::IsReady, XOsd::Layers, XOsd_Layer::LayerType, XOSD_L0C_OFFSET, XOSD_LAYER_SIZE, XOSD_LAYER_TYPE_DISABLE, XOSD_LXC, XOSD_LXC_ALPHA_MASK, XOSD_LXC_ALPHA_SHIFT, XOSD_LXC_GALPHAEN_MASK, XOsd_ReadReg, and XOsd_WriteReg.
void XOsd_SetLayerDimension | ( | XOsd * | InstancePtr, |
u8 | LayerIndex, | ||
u16 | XStart, | ||
u16 | YStart, | ||
u16 | XSize, | ||
u16 | YSize | ||
) |
#include <xosd.c>
This function sets the start position and size of an OSD layer.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
LayerIndex | indicates which layer to be worked on. Valid value range is from 0 to (the number of layers implemented in the core - 1). |
XStart | indicates the horizontal start pixel of origin of the layer. |
YStart | indicates the vertical start line of origin of the layer. |
XSize | indicates the horizontal size of the layer. |
YSize | indicates the vertical size of the layer. |
References XOsd_Config::BaseAddress, XOsd::Config, XOsd::IsReady, XOsd::Layers, XOsd_Layer::LayerType, XOsd::ScreenHeight, XOsd::ScreenWidth, XOSD_L0C_OFFSET, XOSD_LAYER_SIZE, XOSD_LAYER_TYPE_DISABLE, XOSD_LXP, XOSD_LXP_XSTART_MASK, XOSD_LXP_YSTART_MASK, XOSD_LXP_YSTART_SHIFT, XOSD_LXS, XOSD_LXS_XSIZE_MASK, XOSD_LXS_YSIZE_MASK, XOSD_LXS_YSIZE_SHIFT, and XOsd_WriteReg.
void XOsd_SetLayerPriority | ( | XOsd * | InstancePtr, |
u8 | LayerIndex, | ||
u8 | Priority | ||
) |
#include <xosd.c>
This function sets the priority of an OSD layer.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
LayerIndex | indicates which layer to be worked on. Valid value range is from 0 to (the number of layers implemented in the core - 1). |
Priority | indicates the priority to be applied on the layer. Use one of XOSD_LAYER_PRIORITY_0 (the lowest priority) through XOSD_LAYER_PRIORITY_7 (the highest priority) defined in xosd_hw.h. |
References XOsd_Config::BaseAddress, XOsd::Config, XOsd::IsReady, XOsd::Layers, XOsd_Layer::LayerType, XOSD_L0C_OFFSET, XOSD_LAYER_PRIORITY_7, XOSD_LAYER_SIZE, XOSD_LAYER_TYPE_DISABLE, XOSD_LXC, XOSD_LXC_PRIORITY_MASK, XOSD_LXC_PRIORITY_SHIFT, XOsd_ReadReg, and XOsd_WriteReg.