#include "xosd_hw.h"
#include "xil_assert.h"
#include "xstatus.h"
Classes | |
struct | XOsd_Config |
struct | XOsd_Layer |
struct | XOsd |
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 |
Interrupt types for setting up callbacks | |
enum | { XOSD_HANDLER_PROCSTART = 1, XOSD_HANDLER_FRAMEDONE, XOSD_HANDLER_ERROR } |
Defines | |
#define | XOSD_H_ |
#define | XOsd_Enable(InstancePtr) |
#define | XOsd_Disable(InstancePtr) |
#define | XOsd_RegUpdateEnable(InstancePtr) |
#define | XOsd_RegUpdateDisable(InstancePtr) |
#define | XOsd_Reset(InstancePtr) |
#define | XOsd_IntrEnable(InstancePtr, IntrType) |
#define | XOsd_IntrDisable(InstancePtr, IntrType) |
#define | XOsd_IntrGetPending(InstancePtr) |
#define | XOsd_IntrClear(InstancePtr, IntrType) |
#define | XOsd_StatusGetPending(InstancePtr) |
#define | XOsd_SyncReset(InstancePtr) |
#define | XOsd_FSyncReset XOsd_SyncReset |
#define | XOsd_Start XOsd_Enable |
#define | XOsd_Stop XOsd_Disable |
Typedefs | |
typedef void(*) | XOsd_CallBack (void *CallBackRef) |
typedef void(*) | XOsd_ErrorCallBack (void *CallBackRef, u32 ErrorMask) |
typedef u32 | XOsd_Instruction [XOSD_INS_SIZE] |
Functions | |
int | XOsd_CfgInitialize (XOsd *InstancePtr, XOsd_Config *CfgPtr, u32 EffectiveAddr) |
void | XOsd_SetActiveSize (XOsd *InstancePtr, u32 Width, u32 Height) |
void | XOsd_GetActiveSize (XOsd *InstancePtr, u32 *WidthPtr, u32 *HeightPtr) |
void | XOsd_SetBackgroundColor (XOsd *InstancePtr, u16 Red, u16 Blue, u16 Green) |
void | XOsd_GetBackgroundColor (XOsd *InstancePtr, u16 *RedPtr, u16 *BluePtr, u16 *GreenPtr) |
void | XOsd_SetLayerDimension (XOsd *InstancePtr, u8 LayerIndex, u16 XStart, u16 YStart, u16 XSize, u16 YSize) |
void | XOsd_GetLayerDimension (XOsd *InstancePtr, u8 LayerIndex, u16 *XStartPtr, u16 *YStartPtr, u16 *XSizePtr, u16 *YSizePtr) |
void | XOsd_SetLayerAlpha (XOsd *InstancePtr, u8 LayerIndex, u16 GlobalAlphaEnable, u16 GlobalAlphaValue) |
void | XOsd_GetLayerAlpha (XOsd *InstancePtr, u8 LayerIndex, u16 *GlobalAlphaEnablePtr, u16 *GlobalAlphaValuePtr) |
void | XOsd_SetLayerPriority (XOsd *InstancePtr, u8 LayerIndex, u8 Priority) |
void | XOsd_GetLayerPriority (XOsd *InstancePtr, u8 LayerIndex, u8 *PriorityPtr) |
void | XOsd_EnableLayer (XOsd *InstancePtr, u8 LayerIndex) |
void | XOsd_DisableLayer (XOsd *InstancePtr, u8 LayerIndex) |
void | XOsd_LoadColorLUTBank (XOsd *InstancePtr, u8 GcIndex, u8 BankIndex, u32 ColorData[]) |
void | XOsd_LoadCharacterSetBank (XOsd *InstancePtr, u8 GcIndex, u8 BankIndex, u32 CharSetData[]) |
void | XOsd_LoadTextBank (XOsd *InstancePtr, u8 GcIndex, u8 BankIndex, u32 TextData[]) |
void | XOsd_SetActiveBank (XOsd *InstancePtr, u8 GcIndex, u8 ColorBankIndex, u8 CharBankIndex, u8 TextBankIndex, u8 InstructionBankIndex) |
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) |
void | XOsd_LoadInstructionList (XOsd *InstancePtr, u8 GcIndex, u8 BankIndex, u32 InstSetPtr[], u32 InstNum) |
u32 | XOsd_GetVersion (XOsd *InstancePtr) |
XOsd_Config * | XOsd_LookupConfig (u16 DeviceId) |
void | XOsd_IntrHandler (void *InstancePtr) |
int | XOsd_SetCallBack (XOsd *InstancePtr, u32 HandlerType, void *CallBackFunc, void *CallBackRef) |
int | XOsd_SelfTest (XOsd *InstancePtr) |
#define XOSD XOsd |
#define XOSD_CallBack XOsd_CallBack |
#define XOSD_CfgInitialize XOsd_CfgInitialize |
#define XOSD_Config XOsd_Config |
#define XOSD_CreateInstruction XOsd_CreateInstruction |
#define XOsd_Disable | ( | InstancePtr | ) |
Value:
XOsd_WriteReg((InstancePtr)->Config.BaseAddress, (XOSD_CTL_OFFSET), \ ((XOsd_ReadReg((InstancePtr)->Config.BaseAddress, \ (XOSD_CTL_OFFSET))) & (~(XOSD_CTL_EN_MASK))))
InstancePtr | is a pointer to the XOsd instance to be worked on. |
#define XOSD_Disable XOsd_Disable |
#define XOSD_DisableLayer XOsd_DisableLayer |
#define XOsd_Enable | ( | InstancePtr | ) |
Value:
XOsd_WriteReg((InstancePtr)->Config.BaseAddress, (XOSD_CTL_OFFSET), \ ((XOsd_ReadReg((InstancePtr)->Config.BaseAddress, \ (XOSD_CTL_OFFSET))) | (XOSD_CTL_EN_MASK)))
InstancePtr | is a pointer to the XOsd instance to be worked on. |
#define XOSD_Enable XOsd_Enable |
#define XOSD_EnableLayer XOsd_EnableLayer |
#define XOSD_ErrorCallBack XOsd_ErrorCallBack |
#define XOsd_FSyncReset XOsd_SyncReset |
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_GetBackgroundColor XOsd_GetBackgroundColor |
#define XOSD_GetLayerAlpha XOsd_GetLayerAlpha |
#define XOSD_GetLayerDimension XOsd_GetLayerDimension |
#define XOSD_GetLayerPriority XOsd_GetLayerPriority |
#define XOSD_GetScreenSize XOsd_GetActiveSize |
#define XOSD_GetVersion XOsd_GetVersion |
#define XOSD_H_ |
Prevent circular inclusions by using protection macros
#define XOSD_Instruction XOsd_Instruction |
#define XOsd_IntrClear | ( | InstancePtr, | |||
IntrType | ) |
Value:
XOsd_WriteReg((InstancePtr)->Config.BaseAddress, \ (XOSD_STATUS_OFFSET), ((IntrType) & (XOSD_IXR_ALLINTR_MASK)))
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. |
#define XOSD_IntrClear XOsd_IntrClear |
#define XOsd_IntrDisable | ( | InstancePtr, | |||
IntrType | ) |
Value:
XOsd_WriteReg((InstancePtr)->Config.BaseAddress, (XOSD_IER_OFFSET), \ (((~(IntrType)) & (XOSD_IXR_ALLINTR_MASK)) & \ (XOsd_ReadReg((InstancePtr)->Config.BaseAddress, \ (XOSD_IER_OFFSET)))))
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_IntrDisable XOsd_IntrDisable |
#define XOsd_IntrEnable | ( | InstancePtr, | |||
IntrType | ) |
Value:
XOsd_WriteReg((InstancePtr)->Config.BaseAddress, (XOSD_IER_OFFSET), \ (((IntrType) & (XOSD_IXR_ALLINTR_MASK)) | \ (XOsd_ReadReg((InstancePtr)->Config.BaseAddress, \ (XOSD_IER_OFFSET)))))
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_IntrEnable XOsd_IntrEnable |
#define XOsd_IntrGetPending | ( | InstancePtr | ) |
Value:
XOsd_ReadReg((InstancePtr)->Config.BaseAddress, (XOSD_IER_OFFSET)) & \ (XOsd_ReadReg((InstancePtr)->Config.BaseAddress, \ (XOSD_STATUS_OFFSET))) & (XOSD_IXR_ALLINTR_MASK)
InstancePtr | is a pointer to the XOsd instance to be worked on. |
#define XOSD_IntrGetPending XOsd_IntrGetPending |
#define XOSD_IntrHandler XOsd_IntrHandler |
#define XOSD_Layer XOsd_Layer |
#define XOSD_LoadCharacterSetBank XOsd_LoadCharacterSetBank |
#define XOSD_LoadColorLUTBank XOsd_LoadColorLUTBank |
#define XOSD_LoadInstructionList XOsd_LoadInstructionList |
#define XOSD_LoadTextBank XOsd_LoadTextBank |
#define XOSD_LookupConfig XOsd_LookupConfig |
#define XOsd_RegUpdateDisable | ( | InstancePtr | ) |
Value:
XOsd_WriteReg((InstancePtr)->Config.BaseAddress, (XOSD_CTL_OFFSET), \ ((XOsd_ReadReg((InstancePtr)->Config.BaseAddress, \ (XOSD_CTL_OFFSET))) & (~(XOSD_CTL_RUE_MASK))))
InstancePtr | is a pointer to the XOsd instance to be worked on. |
#define XOSD_RegUpdateDisable XOsd_RegUpdateDisable |
#define XOsd_RegUpdateEnable | ( | InstancePtr | ) |
Value:
XOsd_WriteReg((InstancePtr)->Config.BaseAddress, (XOSD_CTL_OFFSET), \ ((XOsd_ReadReg((InstancePtr)->Config.BaseAddress, \ (XOSD_CTL_OFFSET))) | (XOSD_CTL_RUE_MASK)))
InstancePtr | is a pointer to the XOsd instance to be worked on. |
#define XOSD_RegUpdateEnable XOsd_RegUpdateEnable |
#define XOsd_Reset | ( | InstancePtr | ) |
Value:
{ \ XOsd_WriteReg((InstancePtr)->Config.BaseAddress, (XOSD_CTL_OFFSET), \ (XOSD_CTL_SW_RST_MASK)); \ (InstancePtr)->InstructionInExternalMem = (u32)0x0; \ (InstancePtr)->ScreenHeight = (u32)0x0; \ (InstancePtr)->ScreenWidth = (u32)0x0; \ }
InstancePtr | is a pointer to the XOsd instance to be worked on. |
#define XOSD_Reset XOsd_Reset |
#define XOSD_SetActiveBank XOsd_SetActiveBank |
#define XOSD_SetBackgroundColor XOsd_SetBackgroundColor |
#define XOSD_SetCallBack XOsd_SetCallBack |
#define XOSD_SetLayerAlpha XOsd_SetLayerAlpha |
#define XOSD_SetLayerDimension XOsd_SetLayerDimension |
#define XOSD_SetLayerPriority XOsd_SetLayerPriority |
#define XOSD_SetScreenSize XOsd_SetActiveSize |
#define XOsd_Start XOsd_Enable |
This function macro stops an OSD core.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
#define XOsd_StatusGetPending | ( | InstancePtr | ) |
Value:
XOsd_ReadReg((InstancePtr)->Config.BaseAddress, \ (XOSD_STATUS_OFFSET)) & (XOSD_IXR_ALLINTR_MASK)
InstancePtr | is a pointer to the XOsd instance to be worked on. |
#define XOsd_Stop XOsd_Disable |
This function macro stops an OSD core.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
#define XOsd_SyncReset | ( | InstancePtr | ) |
Value:
XOsd_WriteReg((InstancePtr)->Config.BaseAddress, (XOSD_CTL_OFFSET), \ (XOSD_CTL_FSYNC_MASK))
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. |
typedef void(*) XOsd_CallBack(void *CallBackRef) |
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) |
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] |
The XOsd_Instruction data structure for holding one GC instruction.
anonymous enum |
int XOsd_CfgInitialize | ( | XOsd * | InstancePtr, | |
XOsd_Config * | CfgPtr, | |||
u32 | EffectiveAddr | |||
) |
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. |
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.
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. |
void XOsd_DisableLayer | ( | XOsd * | InstancePtr, | |
u8 | LayerIndex | |||
) |
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). |
void XOsd_EnableLayer | ( | XOsd * | InstancePtr, | |
u8 | LayerIndex | |||
) |
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). |
void XOsd_GetActiveSize | ( | XOsd * | InstancePtr, | |
u32 * | WidthPtr, | |||
u32 * | HeightPtr | |||
) |
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. |
void XOsd_GetBackgroundColor | ( | XOsd * | InstancePtr, | |
u16 * | RedPtr, | |||
u16 * | BluePtr, | |||
u16 * | GreenPtr | |||
) |
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. |
void XOsd_GetLayerAlpha | ( | XOsd * | InstancePtr, | |
u8 | LayerIndex, | |||
u16 * | GlobalAlphaEnablePtr, | |||
u16 * | GlobalAlphaValuePtr | |||
) |
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). |
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.
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. |
void XOsd_GetLayerPriority | ( | XOsd * | InstancePtr, | |
u8 | LayerIndex, | |||
u8 * | PriorityPtr | |||
) |
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. |
u32 XOsd_GetVersion | ( | XOsd * | InstancePtr | ) |
This function returns the Version of the OSD core.
InstancePtr | is a pointer to the XOsd instance to be worked on. |
void XOsd_IntrHandler | ( | void * | InstancePtr | ) |
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. |
void XOsd_LoadCharacterSetBank | ( | XOsd * | InstancePtr, | |
u8 | GcIndex, | |||
u8 | BankIndex, | |||
u32 | CharSetData[] | |||
) |
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. |
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.
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. |
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.
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. |
void XOsd_LoadTextBank | ( | XOsd * | InstancePtr, | |
u8 | GcIndex, | |||
u8 | BankIndex, | |||
u32 | TextData[] | |||
) |
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. |
XOsd_Config* XOsd_LookupConfig | ( | u16 | DeviceId | ) |
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. |
int XOsd_SelfTest | ( | XOsd * | InstancePtr | ) |
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. |
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.
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. |
void XOsd_SetActiveSize | ( | XOsd * | InstancePtr, | |
u32 | Width, | |||
u32 | Height | |||
) |
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. |
void XOsd_SetBackgroundColor | ( | XOsd * | InstancePtr, | |
u16 | Red, | |||
u16 | Blue, | |||
u16 | Green | |||
) |
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. |
int XOsd_SetCallBack | ( | XOsd * | InstancePtr, | |
u32 | HandlerType, | |||
void * | CallBackFunc, | |||
void * | CallBackRef | |||
) |
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. |
void XOsd_SetLayerAlpha | ( | XOsd * | InstancePtr, | |
u8 | LayerIndex, | |||
u16 | GlobalAlphaEnable, | |||
u16 | GlobalAlphaValue | |||
) |
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. |
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.
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. |
void XOsd_SetLayerPriority | ( | XOsd * | InstancePtr, | |
u8 | LayerIndex, | |||
u8 | Priority | |||
) |
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. |
Copyright @ 1995-2014 Xilinx, Inc. All rights reserved.