Commit 3ba2e1d3 authored by hu's avatar hu

调整个别报文接收周期,调整CAN外发

parent c5d4fd9f
......@@ -112,7 +112,7 @@ void Speed_Processing_Service(void)
Fre_SortShort(VehFreBuf, VehFreNum);
i = 0u;
}
VehValCup = (uint16_t) VehFreBuf[1u];
VehValCup = (uint16_t) VehFreBuf[3u];
if (VehValCup > 2250)
{
......
......@@ -76,7 +76,7 @@ static void Key_Process(Key_Num_en_t enKeyIndex)
if (stKeyAttribute[enKeyIndex].pfnKeyOperationCallBack != 0U)
{
if ((stKeyCtrVariate[enKeyIndex].enKeyTypeLast == KEY_CAN_NONE) &&
(enKeyRealType == KEY_CAN_SHORT_PRESS))
(enKeyRealType == KEY_CAN_SHORT_PRESS))
{
stKeyAttribute[enKeyIndex].pfnKeyOperationCallBack(KEY_EVENT_SHORT_PRESS);
}
......@@ -110,7 +110,7 @@ static void Key_Process(Key_Num_en_t enKeyIndex)
if (stKeyAttribute[enKeyIndex].pfnKeyOperationCallBack != 0U)
{
if ((stKeyCtrVariate[enKeyIndex].enKeyTypeLast == KEY_CAN_SHORT_PRESS) &&
(enKeyRealType == KEY_CAN_NONE))
(enKeyRealType == KEY_CAN_NONE))
{
stKeyAttribute[enKeyIndex].pfnKeyOperationCallBack(KEY_EVENT_SHORT_PRESS);
}
......@@ -157,8 +157,8 @@ static void Key_Process(Key_Num_en_t enKeyIndex)
stKeyCtrVariate[enKeyIndex].u16KeyIGNTimeCount = 0U;
}
if ((stKeyCtrVariate[enKeyIndex].u16KeyInvalidTimeCount >= stKeyParameter.u16KeyLoosenTime) &&
(stKeyCtrVariate[enKeyIndex].u16KeyValidTimeCount >= stKeyParameter.u16KeyShortPressTime) &&
(stKeyCtrVariate[enKeyIndex].u16KeyValidTimeCount < stKeyParameter.u16KeyLongPressTime))
(stKeyCtrVariate[enKeyIndex].u16KeyValidTimeCount >= stKeyParameter.u16KeyShortPressTime) &&
(stKeyCtrVariate[enKeyIndex].u16KeyValidTimeCount < stKeyParameter.u16KeyLongPressTime))
{
stKeyCtrVariate[enKeyIndex].u16KeyValidTimeCount = 0U;
/* call back */
......@@ -240,7 +240,7 @@ static void Key_Process(Key_Num_en_t enKeyIndex)
if (enKeyIGNRealStatus == KEY_IG_ON)
{
if ((stKeyCtrVariate[enKeyIndex].u16KeyFirstIGNTimeRecord >= stKeyParameter.u16KeyValidOFFTime) &&
(stKeyCtrVariate[enKeyIndex].u16KeyIGNTimeCount >= stKeyParameter.u16KeyValidONTime))
(stKeyCtrVariate[enKeyIndex].u16KeyIGNTimeCount >= stKeyParameter.u16KeyValidONTime))
{
if (stKeyAttribute[enKeyIndex].pfnKeyOperationCallBack != 0U)
{
......@@ -255,7 +255,7 @@ static void Key_Process(Key_Num_en_t enKeyIndex)
if (enKeyIGNRealStatus == KEY_IG_OFF)
{
if ((stKeyCtrVariate[enKeyIndex].u16KeyFirstIGNTimeRecord >= stKeyParameter.u16KeyValidONTime) &&
(stKeyCtrVariate[enKeyIndex].u16KeyIGNTimeCount >= stKeyParameter.u16KeyValidOFFTime))
(stKeyCtrVariate[enKeyIndex].u16KeyIGNTimeCount >= stKeyParameter.u16KeyValidOFFTime))
{
if (stKeyAttribute[enKeyIndex].pfnKeyOperationCallBack != 0U)
{
......@@ -306,9 +306,10 @@ void Key_Init(void)
stKeyCtrVariate[i].u16KeyIGNTimeCount = 0U;
}
/*按键动作时间*/
/*342 4.1 短按/长按操作的判断标准(判定时间):短按;40ms以上,未到800ms,长按;800ms以上*/
stKeyParameter.u16KeyLoosenTime = 100U;
stKeyParameter.u16KeyShortPressTime = 40U;
stKeyParameter.u16KeyLongPressTime = 1500U;
stKeyParameter.u16KeyLongPressTime = 1000U;
stKeyParameter.u16KeySuperLongPressTime = 10000U;
stKeyParameter.u16KeyValidOFFTime = 200U; /*按键动作时间*/
stKeyParameter.u16KeyValidONTime = 1000U;
......
......@@ -176,7 +176,7 @@ const st_CANMsgAttribute CAN_MSG_CONST_ARRAY[ID_TOTAL_MAX] =
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
5000ul,
2000ul,
0x18FEEE00ul,
(( void * )0),
(( void * )0),
......@@ -306,7 +306,7 @@ const st_CANMsgAttribute CAN_MSG_CONST_ARRAY[ID_TOTAL_MAX] =
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
5000ul,
2000ul,
0x18EF1718ul,
(( void * )0),
(( void * )0),
......
......@@ -4,7 +4,6 @@
#include "Common_Interface.h"
#include "Gauges.h"
#include "GaugesInterface.h"
#include "Telltales.h"
#include "GUI.h"
......@@ -389,37 +388,36 @@ void Can_Set_Buff_18FF2A17(uint8_t CopyData[])
uint8_t Range_Air_Cut_Warning = 0u;
uint8_t IRIS_Warning_Lamp_Status = 0u;
#if 0
/*手刹状态*/
if (LINK_PARK_BRAKE_IN_LG32_P03 == 0)
if (Line_In_Get_Status(LINE_IN_PARK_BRAKE) == 1u)
SW_Parking = 1 ;
else
SW_Parking = 0 ;
/*水温状态*/
if ((ET1_Engine_Coolant_Temperature > 0xFA) || (ET1_STATUS & CAN_MSG_LOST))
if ((Get_ID_18FEEE00_Sig_Engine_Coolant_Temperature() > 0xFA) ||
(CAN_SIG_LOST == CAN_MSG_Status(ID_CanMsg18FEEE00_Msg_Count)))
{
Water_Temp_Level = 2;
Over_Heat_Warning_Status = 0;
}
else if ((DataCoolantTempSegDisp >= 0) && (DataCoolantTempSegDisp < 12))
else if ((Coolant_Get_CurSeg() >= 0) && (Coolant_Get_CurSeg() < 12))
{
Water_Temp_Level = 0 ;
Over_Heat_Warning_Status = 0 ;
}
else if ((DataCoolantTempSegDisp >= 12) && (DataCoolantTempSegDisp <= 13))
else if ((Coolant_Get_CurSeg() >= 12) && (Coolant_Get_CurSeg() <= 13))
{
Water_Temp_Level = 1 ;
if (DataVSpeedDisp > 20)
if (Common_Get_Disp_V_Speed() > 20)
Over_Heat_Warning_Status = 0 ;
else
Over_Heat_Warning_Status = 1 ;
}
/*电源电压*/
IGN_Voltage = (9 + DataCoolantVolSegDisp) * 10 ;
#endif
IGN_Voltage = (9 + Gui_Get_Voltmeter_DisplayMode()) * 10 ;
CopyData[0] = (uint8_t)(((Water_Temp_Level << 6u) & 0xC0u) |
((Remining_Fuel_Warning << 5u) & 0x20u) |
......
#include "GUI.h"
#include "r_wm_api.h"
#include "r_typedefs.h"
#include "loc_graphics.h"
......@@ -5988,4 +5989,17 @@ void GUI_General_Popup_Display(uint16_t PopupMsg)
GUI_General_Display(MultiPurpose_Sprite, GUIGeneralPopupTable[PopupMsg].HImageCN3, GUI_BLENDMODE_CUSTOM);
GUI_General_Display(MultiPurpose_Sprite, GUIGeneralPopupTable[PopupMsg].HImageCN4, GUI_BLENDMODE_CUSTOM);
}
}
void Loc_Display_Blue(void)
{
loc_Disable_Window_App();
JCUA_Disable_window();
R_WM_ScreenBgColorSet(0, 0, 0, 0Xff);
R_WM_FrameEndMark(0, 0);
R_WM_FrameWait(0, 0);
}
\ No newline at end of file
......@@ -64,6 +64,7 @@ void RTE_PWM_LCD_Start(void)
}
/*车速频率输出*/
void RTE_PWM_Set_Speed_Out(uint16_t m_Cycle, uint16_t m_Duty)
{
uint32_t ActSetFreq = 0u;;
......@@ -73,20 +74,22 @@ void RTE_PWM_Set_Speed_Out(uint16_t m_Cycle, uint16_t m_Duty)
Fre_8_pulse *= 25 ;
Fre_8_pulse /= 8 ;
//车速1//8脉冲
/*A16-25 A17-8 A18-8*/
/*车速1 8脉冲*/
ActSetFreq = TimerB_PWM_Channel_Fre_Set(TIMERB_2_CH10 , Fre_8_pulse , m_Duty);
//车速2//25脉冲
/*车速2 25脉冲*/
ActSetFreq = TimerB_PWM_Channel_Fre_Set(TIMERB_2_CH13 , m_Cycle , m_Duty);
//车速3//25脉冲
/*车速3 25脉冲*/
ActSetFreq = TimerB_PWM_Channel_Fre_Set(TIMERB_2_CH15 , m_Cycle , m_Duty);
}
/*转速频率输出*/
void RTE_PWM_Set_Tacho_Out(uint16_t m_Cycle, uint16_t m_Duty)
{
uint32_t ActSetFreq;
//转速
/*342 10.2 以4脉冲/发动机1转向A39端子输出 */
ActSetFreq = TimerB_PWM_Channel_Fre_Set(TIMERB_0_CH7 , m_Cycle , m_Duty);
}
......@@ -149,7 +149,7 @@ void RSCAN0_CH_Init(CANFD_Filter_Init_st_t *pFilterInit, uint32_t IDFilterNum)
RSCAN0C0CTR |= 0x00400000UL; // BUSOFF end occur recover by user
/* Set Channel Configuration register */
RSCAN0C0CFG = 0x023A0000UL; /* 500K 75%*/
//RSCAN0C0CFG = 0x023A0001UL; /* 250K 75%*/
//RSCAN0C0CFG = 0x023A0001UL; /* 250K 75%*/
#endif
/* Set Global Configuration register */
......
......@@ -2,15 +2,15 @@
****************************************************************************
PROJECT : WM driver
FILE : $Id: r_wm_api.h 15479 2018-01-11 14:04:31Z florian.zimmermann $
============================================================================
============================================================================
DESCRIPTION
Driver for the Window Manager
============================================================================
C O P Y R I G H T
============================================================================
Copyright (c) 2016
by
Renesas Electronics (Europe) GmbH.
by
Renesas Electronics (Europe) GmbH.
Arcadiastrasse 10
D-40472 Duesseldorf
Germany
......@@ -31,16 +31,18 @@ with the terms and conditions of the signed license agreement.
#ifndef R_WM_API_H
#define R_WM_API_H
#include "r_ddb_api.h"
#ifdef __cplusplus
extern "C" {
#endif
/***********************************************************
Title: WM API
WM (Window Manager) API.
WM controls VDCE and SPEA drivers via WM support functions,
WM controls VDCE and SPEA drivers via WM support functions,
and WM doesn't accesses H/W register directly.
An application using Window Manager API should include the following header files.
......@@ -69,13 +71,13 @@ extern "C" {
Section: Global Types
*/
/***********************************************************
Enum: r_wm_Error_t
Description:
WM driver error code.
If an error occurs these enumerations give information about the
reason.
......@@ -185,11 +187,11 @@ typedef enum
R_WM_MSG_SPRITE_ENABLE,
R_WM_MSG_SPRITE_MOVE,
R_WM_MSG_SPRITE_BUF_SET,
R_WM_MSG_CAPT_CREATE, /* 24 */
R_WM_MSG_CAPT_DELETE,
R_WM_MSG_CAPT_ENABLE,
R_WM_MSG_EOF,
R_WM_MSG_VBLANK,
......@@ -201,10 +203,10 @@ typedef enum
Enum: r_wm_WinMode_t
Description:
A window can be supported by hardware or in can be managed by software;
see also the chapter <WM Window functions>.
A parameter of this type is used by the application to specify,
if it wants to create a window with hardware support,
A window can be supported by hardware or in can be managed by software;
see also the chapter <WM Window functions>.
A parameter of this type is used by the application to specify,
if it wants to create a window with hardware support,
software support or if the application does not care.
Members:
......@@ -213,7 +215,7 @@ typedef enum
Note:
this type is not used.
Instead <R_WM_DEV_*> indicates the type of the WM device
Instead <R_WM_DEV_*> indicates the type of the WM device
*/
typedef enum
......@@ -227,9 +229,9 @@ typedef enum
Enum: r_wm_WinStatus_t
Description:
Each window has a flag specifying its status.
Each window has a flag specifying its status.
If required, additional status could be added.
Members:
R_WM_WINSTATUS_NOTINITIALIZED - The window has not been created.
R_WM_WINSTATUS_DISABLED - The window is invisible on the screen.
......@@ -248,18 +250,18 @@ typedef enum
Enum: r_wm_WinBufStatus_t
Description:
A window might have more than one buffer.
For this case there is a status flag for each buffer.
The flag can be used to identify, if a buffer can be used for
A window might have more than one buffer.
For this case there is a status flag for each buffer.
The flag can be used to identify, if a buffer can be used for
drawing operations or if it is ready to be switched to the screen etc.
Members:
R_WM_WINBUF_FREE - The buffer can be used for rendering operations and it is not visible on the screen.
The next free buffer must be requested by <R_WM_WindowNewDrawBufGet>.
R_WM_WINBUF_RENDER_STARTED - Drawing operations have been started on the buffer.
R_WM_WINBUF_RENDER_STARTED - Drawing operations have been started on the buffer.
This state of a buffer is switched to R_WM_WINBUF_RENDER_FINISHED
R_WM_WINBUF_RENDER_FINISHED - The drawing operations in the buffer have been completed and the buffer is ready to be displayed.
R_WM_WINBUF_ON_SCREEN - The buffer is scheduled to be transferred to the screen, or it is already on the screen.
*/
......@@ -317,7 +319,7 @@ typedef struct
Enum: r_wm_WinColorFmt_t
Description:
A parameter of this type specifies the colour mode of a window.
A parameter of this type specifies the colour mode of a window.
Members:
(A)RGB(w)xyz - The value specifies the number of bits for each colour and the alpha channel.
......@@ -349,7 +351,7 @@ typedef struct
Due to chroma subsampling, two pixels share their u and v data
32bit |<- pixel 2 ->|<- pixel 1 ->|
R_WM_COLORFMT_YCBCR_422, 16bit uuuuuuuuyyyyyyyy vvvvvvvvyyyyyyyy
R_WM_COLORFMT_YCBCR_422, 16bit uuuuuuuuyyyyyyyy vvvvvvvvyyyyyyyy
R_WM_COLORFMT_YUV_YUYV, 16bit vvvvvvvvyyyyyyyy uuuuuuuuyyyyyyyy YCbCr 422 mode, variation
R_WM_COLORFMT_YUV_UYVY, 16bit yyyyyyyyvvvvvvvv yyyyyyyyuuuuuuuu YCbCr 422 mode, variation
R_WM_COLORFMT_YUV_YVYU, 16bit uuuuuuuuyyyyyyyy vvvvvvvvyyyyyyyy YCbCr 422 mode, equal to YCBCR_422
......@@ -395,7 +397,7 @@ typedef enum
Enum: r_wm_OutColorFmt_t
Description:
A parameter of this type specifies the colour mode of the video output.
A parameter of this type specifies the colour mode of the video output.
Members:
(A)RGB(w)xyz - The value specifies the number of bits for each colour.
......@@ -406,15 +408,15 @@ typedef enum
R_WM_OUTCOLORFMT_RGB666 18bit ------rrrrrrggggggbbbbbb
R_WM_OUTCOLORFMT_RGB565 16bit --------rrrrrggggggbbbbb
(end)
***Documentation of flags it subject to be moved to system-specific implementation***
supported flags :
R_WM_OUTCOLORFMT_FLAG_ENDIAN change endianess of output colour
R_WM_OUTCOLORFMT_FLAG_SWAP_BR swap blue and red channel of output color
R_WM_OUTCOLORFMT_FLAG_DITHER activate dithering applied to output colour
Result of flags is shown as example for RGB666.
(code)
MSB LSB
......@@ -438,30 +440,30 @@ typedef enum
R_WM_OUTCOLORFMT_RGB666 = 1u,
R_WM_OUTCOLORFMT_RGB565 = 2u,
R_WM_OUTCOLORFMT_LAST = 3u,
/* Documentation of flags is subject to be moved to system-specific implementation */
R_WM_OUTCOLORFMT_FLAG_DITHER = (uint32_t) 1u<<28u,
R_WM_OUTCOLORFMT_FLAG_SWAP_BR = (uint32_t) 1u<<29u,
R_WM_OUTCOLORFMT_FLAG_ENDIAN = (uint32_t) 1u<<30u,
R_WM_OUTCOLORFMT_FLAG_DITHER = (uint32_t) 1u << 28u,
R_WM_OUTCOLORFMT_FLAG_SWAP_BR = (uint32_t) 1u << 29u,
R_WM_OUTCOLORFMT_FLAG_ENDIAN = (uint32_t) 1u << 30u,
/* We do not use the 31th bit if not needed. Saves some signedness castings */
R_WM_OUTCOLORFMT_FLAG_MASK = (R_WM_OUTCOLORFMT_FLAG_ENDIAN
+ R_WM_OUTCOLORFMT_FLAG_SWAP_BR
+ R_WM_OUTCOLORFMT_FLAG_DITHER),
+ R_WM_OUTCOLORFMT_FLAG_SWAP_BR
+ R_WM_OUTCOLORFMT_FLAG_DITHER),
} r_wm_OutColorFmt_t;
/***********************************************************
typedef: r_wm_ClutEntry_t
Description:
Defines an entry of the colour lookup table.
Struct members:
B - 8-bit blue component
G - 8-bit green component
R - 8-bit red component
A - 8-bit alpha component
*/
typedef struct
......@@ -539,7 +541,7 @@ typedef struct r_wm_Sprite_s
On/Off Switches for different functionalities of a WM window.
Members:
R_WM_WINFLAG_V_MIRROR - Flip the output image vertically
*/
......@@ -554,13 +556,13 @@ typedef enum
typedef: r_wm_Window_t
Description:
Each window has a data structure of this type.
Each window has a data structure of this type.
All windows are linked in a chain by the window manager.
Initialization instructions:
It is required to clear the memory of <r_wm_Window_t> to zero.
The following variables need to be initialised to any valid value (including zero)
The following variables need to be initialised to any valid value (including zero)
before calling <R_WM_WindowCreate>. This is already covered by clearing everything to zero.
PosX
PosY
......@@ -570,7 +572,7 @@ typedef enum
UsePremultipliedAlpha
ClutNumEntries
ColorKey.Enabled
The following varibales need use-case specific setup before calling R_WM_WindowCreate
Mode
ColorFmt
......@@ -583,7 +585,7 @@ typedef enum
Alpha
ClutNumEntries (if ColorFmt is a CLUT format)
Clut (if ColorFmt is a CLUT format)
The following variables are set by <R_WM_WindowCreate>, so initialization value is not important
Status
Surface.SpritesRoot (if Mode is R_WM_WINMODE_SPRITES)
......@@ -593,9 +595,9 @@ typedef enum
Status - The element keeps the status of the window; see <r_wm_WinStatus_t>.
Mode - See description of <r_wm_WinMode_t>.
ColorFmt - The member specifies the color mode of the window; see <r_wm_WinColorFmt_t>.
PosX / PosY - These parameters specify the position of the window on the screen.
PosZ - This parameter specifies the Z position of the window.
PosZ - This parameter specifies the Z position of the window.
Pitch - This is the line pitch of a frame buffer. It must be greater or equal Width.
Width / Height - These values are the size of the window.
ScaledWidth / ScaledHeight - These values are the scaled size of the window.
......@@ -609,18 +611,18 @@ typedef enum
Alpha - The parameter specifies the transparency value of the window.
UsePremultipliedAlpha - Premultiplied Alpha Mode is active
[used when ColorFmt == R_WM_COLORFMT_CLUT* ]
ClutNumEntries - No of entries of the CLUT assigned to this window
Clut - Pointer to array of CLUT entries
[Color Keying. This feature cannot be used together with the Window's <Alpha>]
[used when <ColorFmt> is an RGB Format ]
ColorKey.In.RgbKey - The key color for the RGBA color keying
ColorKey.In.RgbKey - The key color for the RGBA color keying
[used when <ColorFmt> == R_WM_COLORFMT_CLUT* ]
ColorKey.In.ClutKey - The key color for the color indexed color keying
ColorKey.Out - The 'In' key color gets substituted with the 'Out' color defined here).
Flags - Additional flags to set certain properties of a window.
Next - *internal* pointer to the next window in the chain.
......@@ -631,16 +633,16 @@ struct r_wm_Window_s
r_wm_WinStatus_t Status;
r_wm_WinMode_t Mode;
r_wm_WinColorFmt_t ColorFmt;
int32_t PosX;
int32_t PosY;
uint32_t PosZ;
uint32_t Pitch;
uint32_t Pitch;
uint32_t Width;
uint32_t Height;
uint32_t ScaledWidth;
uint32_t ScaledHeight;
union
{
struct
......@@ -654,10 +656,10 @@ struct r_wm_Window_s
uint8_t Alpha;
uint8_t UsePremultipliedAlpha;
uint32_t ClutNumEntries;
const r_wm_ClutEntry_t* Clut;
struct
{
uint8_t Enabled;
......@@ -679,7 +681,7 @@ struct r_wm_Window_s
uint8_t Alpha;
} Out;
} ColorKey;
r_wm_WinFlags_t Flags;
struct r_wm_Window_s *Next; /*internal*/
} /*r_wm_Window_t*/;
......@@ -909,7 +911,7 @@ typedef union
Description:
The window manager stores all requests in an internal msg queue.
During initialization the application provides an array of
During initialization the application provides an array of
<r_wm_Msg_t>, which the driver will use as a msg queue storage.
Struct members:
......@@ -933,7 +935,7 @@ struct r_wm_Msg_s
External event id. The events are dispatched to the callback function specified
during the R_WM_DevInit call. These events can be used for implementing the asynchronous
drawing mechanism (see the appropriate application note).
R_WM_EVENT_VBLANK = VBLANK interrupt notification
R_WM_EVENT_SCANLINE = SCANLINE interrupt notification
R_WM_EVENT_VI_VBLANK = Video Input VBLANK interrupt notification
......@@ -966,12 +968,12 @@ typedef enum
drawing mechanism (see the appropriate application note).
Member:
Id - Event ID
Data - Data associated with the event
*/
typedef struct
typedef struct
{
r_wm_EventId_t Id;
uint32_t Data;
......@@ -981,8 +983,8 @@ typedef struct
Enum: r_wm_Memory_t
Description:
The window manager requires different access types to the memory.
Therefore the function R_WM_SysAlloc is called with a parameter,
The window manager requires different access types to the memory.
Therefore the function R_WM_SysAlloc is called with a parameter,
which indicates the memory type requested by the window manager.
Members:
......@@ -1001,7 +1003,7 @@ typedef enum
typedef: r_wm_CapMode_t
Description:
There are different modes of video capturing, especially for interlaced videos.
There are different modes of video capturing, especially for interlaced videos.
This type is used to describe, which method shall be used for a capturing surface.
Members:
......@@ -1016,7 +1018,7 @@ typedef enum
The following flags are optional and can be omitted :
Dithering can be used with framebuffer format R_VI_FB_FORMAT_RGB565.
Dithering can be used with framebuffer format R_VI_FB_FORMAT_RGB565.
Dithering is disabled on default and can be enabled with one of the following flags.
If none of these is selected dithering is disabled :
......@@ -1034,47 +1036,47 @@ typedef enum
Data can be captured using CSync, HSync/VSync or Data Enable Sync.
If none of the following flags is set then HSync/VSync is used.
Default capture mode does not use deinterlacing.
If interlaced video is input, this equals to BOB deinterlacing.
Set flag below for weave deinterlacing.
R_WM_CAPMODE_WEAVE - The weave method is used to deinterlace the video.
R_WM_CAPMODE_WEAVE - The weave method is used to deinterlace the video.
Only one single input buffer video is supported, no multi-buffering.
*/
typedef enum
{
R_WM_CAPMODE_NONE = 0,
R_WM_CAPMODE_YUV_ITU656 = (int32_t)(1uL<< 0),
R_WM_CAPMODE_YUV_8BIT = (int32_t)(1uL<< 1),
R_WM_CAPMODE_YUV_16BIT = (int32_t)(1uL<< 2),
R_WM_CAPMODE_RGB_16BPP = (int32_t)(1uL<< 3),
R_WM_CAPMODE_RGB_18BPP = (int32_t)(1uL<< 4),
R_WM_CAPMODE_RGB_24BPP = (int32_t)(1uL<< 5),
R_WM_CAPMODE_DITHER = (int32_t)(1uL<< 6),
R_WM_CAPMODE_YUV_ITU656 = (int32_t)(1uL << 0),
R_WM_CAPMODE_YUV_8BIT = (int32_t)(1uL << 1),
R_WM_CAPMODE_YUV_16BIT = (int32_t)(1uL << 2),
R_WM_CAPMODE_RGB_16BPP = (int32_t)(1uL << 3),
R_WM_CAPMODE_RGB_18BPP = (int32_t)(1uL << 4),
R_WM_CAPMODE_RGB_24BPP = (int32_t)(1uL << 5),
R_WM_CAPMODE_DITHER = (int32_t)(1uL << 6),
/* default Y1UY2V, inverted UY1VY2 */
R_WM_CAPMODE_YUV_Y_UV_INVERT = (int32_t)(1uL<< 10),
R_WM_CAPMODE_YUV_Y_UV_INVERT = (int32_t)(1uL << 10),
/* vsync polarity (default: pos polarity, inverted: neg polarity) */
R_WM_CAPMODE_VSYNC_INVERT = (int32_t)(1uL<< 11),
R_WM_CAPMODE_VSYNC_INVERT = (int32_t)(1uL << 11),
/* hsync polarity (default: pos polarity, inverted: neg polarity) */
R_WM_CAPMODE_HSYNC_INVERT = (int32_t)(1uL<< 12),
R_WM_CAPMODE_HSYNC_INVERT = (int32_t)(1uL << 12),
/* data sampling point (default: falling clock edge, inverted: rising clock edge) */
R_WM_CAPMODE_DATA_CLK_INVERT = (int32_t)(1uL<< 15),
R_WM_CAPMODE_DATA_CLK_INVERT = (int32_t)(1uL << 15),
/* vsync sampling point (default: falling clock edge, inverted: rising clock edge) */
R_WM_CAPMODE_VSYNC_CLK_INVERT = (int32_t)(1uL<< 16),
R_WM_CAPMODE_VSYNC_CLK_INVERT = (int32_t)(1uL << 16),
/* hsync sampling point (default: falling clock edge, inverted: rising clock edge) */
R_WM_CAPMODE_HSYNC_CLK_INVERT = (int32_t)(1uL<< 17),
R_WM_CAPMODE_H_MIRRORING = (int32_t)(1uL<< 18),
R_WM_CAPMODE_V_MIRRORING = (int32_t)(1uL<< 19),
R_WM_CAPMODE_HSYNC_CLK_INVERT = (int32_t)(1uL << 17),
R_WM_CAPMODE_H_MIRRORING = (int32_t)(1uL << 18),
R_WM_CAPMODE_V_MIRRORING = (int32_t)(1uL << 19),
/* internal fixed vsync generation (default: vo vsync is synchronised to vi vsync) */
R_WM_CAPMODE_FIXED_VSYNC = (int32_t)(1uL<< 20),
/* Bits 0-20 mirror the VDCE data type <r_vdce_CapMode_t>.
R_WM_CAPMODE_FIXED_VSYNC = (int32_t)(1uL << 20),
/* Bits 0-20 mirror the VDCE data type <r_vdce_CapMode_t>.
The following entries are additional. */
R_WM_CAPMODE_WEAVE = (int32_t)(1ul<< 30),
R_WM_CAPMODE_WEAVE = (int32_t)(1ul << 30),
} r_wm_CapMode_t;
......@@ -1082,12 +1084,12 @@ typedef enum
typedef: r_wm_Capture_t
Description:
The type describes the settings of a video capturing surface.
The video capturing surface is always associated with a window surface.
The type describes the settings of a video capturing surface.
The video capturing surface is always associated with a window surface.
Members:
Window - The member is a pointer to the associated window.
The window has to match the requirements of the captured video;
Window - The member is a pointer to the associated window.
The window has to match the requirements of the captured video;
e.g. size, colour mode.
Mode - The member specifies the capturing mode.
Status - see <R_WM_WinStatus_t>
......@@ -1100,10 +1102,10 @@ typedef enum
<Width/Height> will be the dimension of the window on-screen.
D1x/VDCE Specific: Only upscaling is supported, thus ScaledWidth/Height < Width/Height.
Delay - When VI- and VO-VSYNC are synchronized, this value delays VO-VSYNC measured in lines.
CapUnit - The Video Channel to be used for capturing.
If another Unit is to be used than the assigned Window,
CapUnit - The Video Channel to be used for capturing.
If another Unit is to be used than the assigned Window,
please make sure that this unit is already initialised.
Next - *internal* All capturing surfaces are linked in a list.
Next - *internal* All capturing surfaces are linked in a list.
This pointer points to the next capturing surface.
*/
......@@ -1128,17 +1130,17 @@ struct r_wm_Capture_s
/***********************************************************
typedef: r_wm_WinCapbs_t
Description:
Description:
D1M1A only.
For other devices, this is fixed to:
0: RLE
1: SPRITES
2: SPRITES
3: SPRITES
Please see API documentation of function <R_WM_WindowCapabilitiesSet>.
Members:
R_WM_WINCAPBS_RLE - Set video output layer to support RLE format.
R_WM_WINCAPBS_SPRITES - Set video output layer to support SPRITES.
......@@ -1160,8 +1162,8 @@ typedef enum
/***********************************************************
Group: Device
The section describes driver functions,
which are required for general use of the driver,
The section describes driver functions,
which are required for general use of the driver,
but which are related to a specific functionality of the macro itself.
*/
......@@ -1170,18 +1172,18 @@ typedef enum
Function: R_WM_DevInit
Init WM unit.
Description:
This function initializes the driver and the hardware as far as necessary.
The driver makes sure, that the macro is set into a default configuration.
It is also in the responsibility of the driver to keep track of the macro
instance status and to avoid, that the macro instance is initialized more
than one time or that any other function can be executed before the
This function initializes the driver and the hardware as far as necessary.
The driver makes sure, that the macro is set into a default configuration.
It is also in the responsibility of the driver to keep track of the macro
instance status and to avoid, that the macro instance is initialized more
than one time or that any other function can be executed before the
initialization has been completed successfully.
Parameter:
Unit - The parameter specifies the screen number
The window manager can support more than one physical screen
The window manager can support more than one physical screen
Valid values are defined by <R_WM_DEV_*>
The number of valid devices is <R_WM_DEV_NUM>
MsgQueue - This is a pointer to Size elements of the <R_WM_Msg_t> type
......@@ -1190,17 +1192,17 @@ typedef enum
EventCb - External event notification callback function
CpuHeap - Pointer to your managed cpu heap
VidHeap - Pointer to your managed video heap
Return value:
See <R_WM_Error_t>.
See <R_WM_Error_t>.
*/
r_wm_Error_t R_WM_DevInit ( uint32_t Unit,
r_wm_Msg_t *MsgQueue,
uint32_t Size,
void(*EventCb)(uint32_t Unit, const r_wm_Event_t *Event),
const void *CpuHeap,
const void *VidHeap
r_wm_Msg_t *MsgQueue,
uint32_t Size,
void(*EventCb)(uint32_t Unit, const r_wm_Event_t *Event),
const void *CpuHeap,
const void *VidHeap
);
......@@ -1211,15 +1213,15 @@ r_wm_Error_t R_WM_DevInit ( uint32_t Unit,
Register for retrieving the notification on an event.
Only the external events registered with this function will
be received by the device callback function.
Parameter:
Unit - See description of <R_WM_DevInit>
EventId - The ID of the event to be registered for receiving
Arg - Generic argument if applicable
Generic argument values:
R_WM_EVENT_VBLANK - any (ignored)
R_WM_EVENT_SCANLINE - scan line number on which the interrupt will trigger
*/
......@@ -1234,13 +1236,13 @@ r_wm_Error_t R_WM_DevEventRegister ( uint32_t Unit,
DeInit WM unit.
Description:
This function deinitializes the driver and the hardware.
In case the function is called for an instance of the macro,
which has not been initialized before, the function shall return an error.
This function deinitializes the driver and the hardware.
In case the function is called for an instance of the macro,
which has not been initialized before, the function shall return an error.
Parameter:
Unit - See description of <R_WM_DevInit>
Return value:
See <r_wm_Error_t>.
*/
......@@ -1278,7 +1280,7 @@ r_wm_Error_t R_WM_DevInfoGet ( uint32_t Unit,
Function: R_WM_GetVersionString
Returns:
version string of this WM driver
*/
......@@ -1288,8 +1290,8 @@ const int8_t *R_WM_GetVersionString(void);
/***********************************************************
Group: Screen
A screen is a physical video output unit.
There is no frame-buffer associated with a screen,
A screen is a physical video output unit.
There is no frame-buffer associated with a screen,
but a screen might have a background color.
*/
......@@ -1299,16 +1301,16 @@ const int8_t *R_WM_GetVersionString(void);
Description:
Create a screen on the specified video output.
The new values will be active after placing a call to <R_WM_ScreenEnable>
The new values will be active after placing a call to <R_WM_ScreenEnable>
into the message queue and executing this part of the queue.
Parameter:
Unit - See description of <R_WM_DevInit>
Timing - The timing parameter contains all the information
Timing - The timing parameter contains all the information
to drive the display see the description of <r_ddb_Timing_t> for details.
Return value:
See <r_wm_Error_t>.
See <r_wm_Error_t>.
*/
r_wm_Error_t R_WM_ScreenTimingSet ( uint32_t Unit,
......@@ -1321,12 +1323,12 @@ r_wm_Error_t R_WM_ScreenTimingSet ( uint32_t Unit,
Description:
Create a screen on the specified video output.
The new values will be active after placing a call to <R_WM_ScreenEnable>
The new values will be active after placing a call to <R_WM_ScreenEnable>
into the message queue and executing this part of the queue.
Parameter:
Unit - See description of <R_WM_DevInit>
Name - The name is an identifier, which is used to lookup
Name - The name is an identifier, which is used to lookup
for the correct screen timing in the display data base (see: <r_ddb_Timing_t>).
Return value:
......@@ -1334,7 +1336,7 @@ r_wm_Error_t R_WM_ScreenTimingSet ( uint32_t Unit,
*/
r_wm_Error_t R_WM_ScreenTimingSetByName ( uint32_t Unit,
const int8_t *Name
const int8_t *Name
);
......@@ -1354,17 +1356,17 @@ r_wm_Error_t R_WM_ScreenTimingSetByName ( uint32_t Unit,
*/
r_wm_Error_t R_WM_ScreenColorFormatSet ( uint32_t Unit,
r_wm_OutColorFmt_t OutFmt
);
r_wm_OutColorFmt_t OutFmt
);
/***********************************************************
Function: R_WM_ScreenBgColorSet
Description:
Set the screen background color that is seen, if no window
(or a transparent one) is on top of it.
If the selected screen does not support a background color,
Set the screen background color that is seen, if no window
(or a transparent one) is on top of it.
If the selected screen does not support a background color,
the function will return with an error.
Parameter:
......@@ -1372,11 +1374,11 @@ r_wm_Error_t R_WM_ScreenColorFormatSet ( uint32_t Unit,
Red/Green/Blue - The individual color components of the background color.
Return value:
See <r_wm_Error_t>.
See <r_wm_Error_t>.
*/
r_wm_Error_t R_WM_ScreenBgColorSet ( uint32_t Unit,
uint8_t Red,
uint8_t Green,
uint8_t Red,
uint8_t Green,
uint8_t Blue
);
......@@ -1385,42 +1387,42 @@ r_wm_Error_t R_WM_ScreenBgColorSet ( uint32_t Unit,
Function: R_WM_ScreenColorCurveSet
Description:
Set a curve to be used as custom gamma or color correction curve.
Using this curve, each RGB color channel is individually corrected according
Set a curve to be used as custom gamma or color correction curve.
Using this curve, each RGB color channel is individually corrected according
to the given curve.
For the correction in D1x/VDCE, the incoming color information of each channel
For the correction in D1x/VDCE, the incoming color information of each channel
is split into 32 equally sized segments each covering a range 8 color values.
For each of these 8 values in a segment, the same gain factor applies.
To configure the segments, a start and an end value need to be given.
To configure the segments, a start and an end value need to be given.
This requires 33 RGB reference points to be passed to this function.
For each segment of each color, the gain factor must be in range [0.0 .. +2.0],
For each segment of each color, the gain factor must be in range [0.0 .. +2.0],
thus the values between two reference points may have a difference in range of [0 .. +16].
The origin is always at point zero: In = Out = RGB(0,0,0).
The slope is always positive.
If any value except [0] exceeds above limitation, the curve will be approximated
as close as possible while staying within the HW limitations.
The reference points are defined as RGB values which define the color output expected
for that certain reference point.
E.g.
The reference points are defined as RGB values which define the color output expected
for that certain reference point.
E.g.
Reference point 1 defines the desired RGB output color for the input color RGB(8,8,8).
Reference point 3 defines the desired RGB output color for the input color RGB(24,24,24).
This function will overwrite the settings of <R_WM_ScreenGammaSet>.
Parameter:
Unit - See description of <R_WM_DevInit>
NumEntries - Number of reference points
Clut - Pointer to Table of reference points <r_wm_ClutEntry_t>.
Clut - Pointer to Table of reference points <r_wm_ClutEntry_t>.
ALPHA value of data type is unused!
Note: The data pointed to by the pointer <ColorCurve> must be available
until the message queue containing this command has been processed.
Return value:
See <r_wm_Error_t>.
See <r_wm_Error_t>.
*/
r_wm_Error_t R_WM_ScreenColorCurveSet ( uint32_t Unit,
uint32_t NumEntries,
......@@ -1433,12 +1435,12 @@ r_wm_Error_t R_WM_ScreenColorCurveSet ( uint32_t Unit,
Description:
This function sets the output gamma correction.
This function will overwrite the settings of <R_WM_ScreenColorCurveSet>.
Also for Gamma Correction Curves, the slope is limited to the range [0.0 .. +2.0]
Also for Gamma Correction Curves, the slope is limited to the range [0.0 .. +2.0]
as described above in <R_WM_ScreenColorCurveSet>.
If parts of the Gamma Curve exceed this range, this function will choose
If parts of the Gamma Curve exceed this range, this function will choose
the closest match based on the given limitations.
Parameter:
......@@ -1446,7 +1448,7 @@ r_wm_Error_t R_WM_ScreenColorCurveSet ( uint32_t Unit,
Gamma - Gamma correction factor (0..255 => 0.25..2.0, 128=1.0)
Return value:
See <r_wm_Error_t>.
See <r_wm_Error_t>.
*/
r_wm_Error_t R_WM_ScreenGammaSet ( uint32_t Unit,
const uint8_t GammaRed,
......@@ -1465,7 +1467,7 @@ r_wm_Error_t R_WM_ScreenGammaSet ( uint32_t Unit,
Unit - See description of <R_WM_DevInit>
Return value:
See <r_wm_Error_t>.
See <r_wm_Error_t>.
*/
r_wm_Error_t R_WM_ScreenEnable(uint32_t Unit);
......@@ -1481,7 +1483,7 @@ r_wm_Error_t R_WM_ScreenEnable(uint32_t Unit);
Unit - See description of <R_WM_DevInit>
Return value:
See <r_wm_Error_t>.
See <r_wm_Error_t>.
*/
r_wm_Error_t R_WM_ScreenDisable(uint32_t Unit);
......@@ -1489,23 +1491,23 @@ r_wm_Error_t R_WM_ScreenDisable(uint32_t Unit);
/***********************************************************
Group: Windows
Description:
A window is an area with graphical content, which is placed
on a screen.
Windows may cover the whole screen, but they could also cover
part of the screen only.
A window is an area with graphical content, which is placed
on a screen.
Windows may cover the whole screen, but they could also cover
part of the screen only.
It is possible to stack windows and to define transparency
for a window.
If overlapping windows have the same Z position, it is not
defined, which window will be on the top.
It is possible to stack windows and to define transparency
for a window.
If overlapping windows have the same Z position, it is not
defined, which window will be on the top.
A video output can have hardware support for windows (e.g.
hardware layers).
A video output can have hardware support for windows (e.g.
hardware layers).
Note:
If an OS is used the Window functions internally use semaphores.
If an OS is used the Window functions internally use semaphores.
This must be taken into account if they are called by an interrupt service routine.
*/
......@@ -1514,19 +1516,19 @@ r_wm_Error_t R_WM_ScreenDisable(uint32_t Unit);
Function: R_WM_WindowCapabilitiesSet
Description:
Configure the Video Output Layers to decode RLE compressed textures or to
Configure the Video Output Layers to decode RLE compressed textures or to
show sprite windows. Only one feature may be selected for each layer.
The windows of the WM are internally mapped to HW-video-output layers.
The windows of the WM are internally mapped to HW-video-output layers.
The assignment happens automatically and is influenced by the following parameters:
* Z-Index (PosZ), mapping to HW is started with lowest PosZ to lowest HW-Layer
* Color Format (r_wm_WinColorFmt_t), if RLE Format is requested, HW-Layers may be skipped until HW-Layer with RLE support is found.
* Window-Mode (r_wm_WinMode_t), if Sprite Mode is requested, HW-Layers may be skipped until HW-Layer with sprite support is found.
-> If no matching layer could be found with regard to the z-Index, the driver reports an error.
Please make sure, the z-Indices <PosZ> match the order of the required capabilities.
D1M1A only! Default values are as shown below.
For other devices, this is always fixed to the default values and cannot be changed.
Default values:
......@@ -1537,9 +1539,9 @@ r_wm_Error_t R_WM_ScreenDisable(uint32_t Unit);
Calling this function influences both WM Unit 0 and WM Unit 1, therefore it has no Unit <parameter>.
Attention: The layer order of VO1 is different from the layer order of VO0.
Calling this function is only possible with all instances of VDCE/VOWE disabled.
Parameter:
Capability0 - Selects mode for VO0 Layer0 and VO1 Layer0
Capability1 - Selects mode for VO0 Layer1 and VO1 Layer3
......@@ -1549,19 +1551,19 @@ r_wm_Error_t R_WM_ScreenDisable(uint32_t Unit);
*/
r_wm_Error_t R_WM_WindowCapabilitiesSet ( r_wm_WinCapbs_t Capability0,
r_wm_WinCapbs_t Capability1,
r_wm_WinCapbs_t Capability2,
r_wm_WinCapbs_t Capability3
);
r_wm_WinCapbs_t Capability1,
r_wm_WinCapbs_t Capability2,
r_wm_WinCapbs_t Capability3
);
/***********************************************************
Function: R_WM_WindowCreate
Description:
Create a window as specified in the Window parameter on screen Unit.
Create a window as specified in the Window parameter on screen Unit.
For variable locations of <r_wm_Window_t> that are not initialized
For variable locations of <r_wm_Window_t> that are not initialized
during startup, e.g. local variables or allocated variables, please
make sure to initialize all members of the struct.
Unused values may be set to zero.
......@@ -1569,35 +1571,35 @@ r_wm_Error_t R_WM_WindowCapabilitiesSet ( r_wm_WinCapbs_t Capability0,
memset(&Window, 0, sizeof(r_wm_Window_t))
(end)
If the <r_wm_WinBufAllocMode_t> is R_WM_WINBUF_ALLOC_EXTERNAL
the pointer Buffer of the window structure has to point to
If the <r_wm_WinBufAllocMode_t> is R_WM_WINBUF_ALLOC_EXTERNAL
the pointer Buffer of the window structure has to point to
an array of BufNum elements of <r_wm_WinBuffer_t> type.
D1x/VDCE Specific:
- RLE-Type buffer addresses must be 128-Byte aligned.
- RLE-Type buffer strides must be 128-byte aligned and increased by another 128-byte.
- Normal-Type buffer addresses must be 128-Byte aligned.
Alternatively the Buffer does not need to be set yet.
Alternatively the Buffer does not need to be set yet.
It can be set later by <r_wm_WindowExternalBufSet>.
If the <r_wm_WinBufAllocMode_t> is R_WM_WINBUF_ALLOC_INTERNAL
the function will allocate the Buffer data for each buffer itself.
the function will allocate the Buffer data for each buffer itself.
Buffer must be set to NULL.
The Next pointer value is set by the function; any value
in it will be ignored.
The window will not be visible until it is enabled.
The Next pointer value is set by the function; any value
in it will be ignored.
The window will not be visible until it is enabled.
Parameter:
Unit - See description of <R_WM_DevInit>
Window - This is a pointer to an <r_wm_Window_t> structure.
The structure has to be filled by the application
Window - This is a pointer to an <r_wm_Window_t> structure.
The structure has to be filled by the application
before calling the function.
Return value:
See <r_wm_Error_t>.
See <r_wm_Error_t>.
*/
r_wm_Error_t R_WM_WindowCreate ( uint32_t Unit,
......@@ -1609,15 +1611,15 @@ r_wm_Error_t R_WM_WindowCreate ( uint32_t Unit,
Function: R_WM_WindowDelete
Description:
The function will delete the specified window.
All internally allocated data buffer will be freed by the function.
The function will delete the specified window.
All internally allocated data buffer will be freed by the function.
Parameter:
Unit - See description of <R_WM_DevInit>
Window - This is a window's structure <r_wm_Window_t> pointer
Return value:
See <r_wm_Error_t>.
See <r_wm_Error_t>.
*/
r_wm_Error_t R_WM_WindowDelete ( uint32_t Unit,
......@@ -1629,7 +1631,7 @@ r_wm_Error_t R_WM_WindowDelete ( uint32_t Unit,
Function: R_WM_WindowEnable
Description:
Enable the window. The window will be visible on the screen
Enable the window. The window will be visible on the screen
after calling this function.
This function triggers a config event, see <r_wm_MsgId_t>.
......@@ -1639,7 +1641,7 @@ r_wm_Error_t R_WM_WindowDelete ( uint32_t Unit,
Window - This is a window's structure <r_wm_Window_t> pointer
Return value:
See <r_wm_Error_t>.
See <r_wm_Error_t>.
*/
r_wm_Error_t R_WM_WindowEnable ( uint32_t Unit,
......@@ -1651,7 +1653,7 @@ r_wm_Error_t R_WM_WindowEnable ( uint32_t Unit,
Function: R_WM_WindowDisable
Description:
Disable the window. The window will be invisible on the screen
Disable the window. The window will be invisible on the screen
after calling this function.
This function triggers a config event, see <r_wm_MsgId_t>.
......@@ -1661,7 +1663,7 @@ r_wm_Error_t R_WM_WindowEnable ( uint32_t Unit,
Window - This is a Window's structure <r_wm_Window_t> pointer
Return value:
See <r_wm_Error_t>.
See <r_wm_Error_t>.
*/
r_wm_Error_t R_WM_WindowDisable ( uint32_t Unit,
......@@ -1681,16 +1683,16 @@ r_wm_Error_t R_WM_WindowDisable ( uint32_t Unit,
Unit - See description of <R_WM_DevInit>
Window - This is a window's structure <r_wm_Window_t> pointer
PosX/PosY/PosZ - These parameters specify the new absolute position of the window on the screen.
For negative X coordinates, please note that moving is restricted
by the horizontal blanking width. Negative PosX values may not fall
below (-r_ddb_Timing_t.H.BlankWidth+16). For negative PosX that exceed
For negative X coordinates, please note that moving is restricted
by the horizontal blanking width. Negative PosX values may not fall
below (-r_ddb_Timing_t.H.BlankWidth+16). For negative PosX that exceed
this limit, their value is clamped to (-r_ddb_Timing_t.H.BlankWidth+16).
An exception that allows for free moving in negative X direction is
An exception that allows for free moving in negative X direction is
that (r_ddb_Timing_t.H.BlankWidth - 16) >= (128 / BPP).
Return value:
See <r_wm_Error_t>.
See <r_wm_Error_t>.
*/
r_wm_Error_t R_WM_WindowMove ( uint32_t Unit,
......@@ -1712,7 +1714,7 @@ r_wm_Error_t R_WM_WindowMove ( uint32_t Unit,
Pitch/Width/Height - These parameters specify the new geometry of the window.
Return value:
See <r_wm_Error_t>.
See <r_wm_Error_t>.
*/
r_wm_Error_t R_WM_WindowResize ( uint32_t Unit,
......@@ -1720,7 +1722,7 @@ r_wm_Error_t R_WM_WindowResize ( uint32_t Unit,
uint32_t Pitch,
uint32_t Width,
uint32_t Height
);
);
/***********************************************************
Function: R_WM_WindowColorFmtSet
......@@ -1734,7 +1736,7 @@ r_wm_Error_t R_WM_WindowResize ( uint32_t Unit,
ColorFmt - Window color format, see the description of <r_wm_WinColorFmt_t>
Return value:
See <r_wm_Error_t>.
See <r_wm_Error_t>.
*/
r_wm_Error_t R_WM_WindowColorFmtSet ( uint32_t Unit,
......@@ -1753,9 +1755,9 @@ r_wm_Error_t R_WM_WindowColorFmtSet ( uint32_t Unit,
Unit - See description of <R_WM_DevInit>
Window - This is a window's structure <r_wm_Window_t> pointer
Alpha - New alpha value of the window.
Return value:
See <r_wm_Error_t>.
See <r_wm_Error_t>.
*/
r_wm_Error_t R_WM_WindowAlphaSet( uint32_t Unit,
......@@ -1772,13 +1774,13 @@ r_wm_Error_t R_WM_WindowAlphaSet( uint32_t Unit,
Parameter:
Unit - See description of <R_WM_DevInit>
Window - This is a window's structure <r_wm_Window_t> pointer
Return value:
See <r_wm_Error_t>.
See <r_wm_Error_t>.
*/
r_wm_Error_t R_WM_WindowPremultipliedAlphaEnable( uint32_t Unit,
r_wm_Window_t *Window);
r_wm_Window_t *Window);
/***********************************************************
......@@ -1790,13 +1792,13 @@ r_wm_Error_t R_WM_WindowPremultipliedAlphaEnable( uint32_t Unit,
Parameter:
Unit - See description of <R_WM_DevInit>
Window - This is a window's structure <r_wm_Window_t> pointer
Return value:
See <r_wm_Error_t>.
See <r_wm_Error_t>.
*/
r_wm_Error_t R_WM_WindowPremultipliedAlphaDisable( uint32_t Unit,
r_wm_Window_t *Window);
r_wm_Window_t *Window);
/***********************************************************
......@@ -1808,13 +1810,13 @@ r_wm_Error_t R_WM_WindowPremultipliedAlphaDisable( uint32_t Unit,
Parameter:
Unit - See description of <R_WM_DevInit>
Window - This is a window's structure <r_wm_Window_t> pointer
Return value:
See <r_wm_Error_t>.
See <r_wm_Error_t>.
*/
r_wm_Error_t R_WM_WindowVerticalMirrorEnable( uint32_t Unit,
r_wm_Window_t *Window);
r_wm_Window_t *Window);
/***********************************************************
......@@ -1826,28 +1828,28 @@ r_wm_Error_t R_WM_WindowVerticalMirrorEnable( uint32_t Unit,
Parameter:
Unit - See description of <R_WM_DevInit>
Window - This is a window's structure <r_wm_Window_t> pointer
Return value:
See <r_wm_Error_t>.
See <r_wm_Error_t>.
*/
r_wm_Error_t R_WM_WindowVerticalMirrorDisable( uint32_t Unit,
r_wm_Window_t *Window);
r_wm_Window_t *Window);
/***********************************************************
Function: R_WM_WindowSwap
Description:
If the window is a multi-buffer window, the background buffer
is switched to the window surface (see: <r_wm_WinBufStatus_t>).
If the window is a multi-buffer window, the background buffer
is switched to the window surface (see: <r_wm_WinBufStatus_t>).
Parameter:
Unit - See description of <R_WM_DevInit>
Window - Pointer to the window's structure <r_wm_Window_t>
Return value:
See <r_wm_Error_t>.
See <r_wm_Error_t>.
*/
r_wm_Error_t R_WM_WindowSwap ( uint32_t Unit,
......@@ -1920,7 +1922,7 @@ void *R_WM_WindowCurrentDrawBufGet ( uint32_t Unit,
Description:
Dynamically set the framebuffers in desired format (not neccessarilly the same as during window creation)
for windows with externally allocated buffers.
The window must have been created with the <r_wm_WinBufAllocMode_t> R_WM_WINBUF_ALLOC_EXTERNAL.
D1x/VDCE Specific:
......@@ -1940,10 +1942,10 @@ void *R_WM_WindowCurrentDrawBufGet ( uint32_t Unit,
*/
r_wm_Error_t R_WM_WindowExternalBufSet ( uint32_t Unit,
r_wm_Window_t *Window,
r_wm_WinBuffer_t *Buf,
uint32_t BufNum,
r_wm_WinColorFmt_t ColorFormat
r_wm_Window_t *Window,
r_wm_WinBuffer_t *Buf,
uint32_t BufNum,
r_wm_WinColorFmt_t ColorFormat
);
......@@ -1981,18 +1983,18 @@ r_wm_Error_t R_WM_WindowColorKeyDisable(uint32_t Unit, r_wm_Window_t *Window);
/***********************************************************
Function: R_WM_WindowClutSet
Description:
Sets the colour lookup table. Only applicable for the
windows with CLUT colour modes specified.
Parameters:
Unit - See description of <R_WM_DevInit>
Window - window's structure <r_wm_Window_t> pointer
NumEntries - Number of the color lookup-table entries
Clut - Color lookup-table pointer <r_wm_ClutEntry_t>.
Note: The data pointed to by the pointer <Clut> must be avalilable
Clut - Color lookup-table pointer <r_wm_ClutEntry_t>.
Note: The data pointed to by the pointer <Clut> must be avalilable
as long as the Window using the CLUT color format is active.
*/
......@@ -2008,14 +2010,14 @@ r_wm_Error_t R_WM_WindowClutSet ( uint32_t Unit,
Description:
Deletes all sprites associated to the window. This function is guaranteed
to execute faster than deleting sprite by sprite manually.
Parameters:
Unit - See description of <R_WM_DevInit>
Window - window's structure <r_wm_Window_t> pointer
*/
r_wm_Error_t R_WM_WindowDeleteAllSprites ( uint32_t Unit,
r_wm_Window_t *Window
r_wm_Window_t *Window
);
......@@ -2029,16 +2031,16 @@ r_wm_Error_t R_WM_WindowDeleteAllSprites ( uint32_t Unit,
Description:
Enqueues the WM requests to the message queue.
Parameter:
Unit - See description of <R_WM_DevInit>
Msg - Event description, see <r_wm_Msg_t>.
Return value:
See <r_wm_Error_t>.
See <r_wm_Error_t>.
Note:
This function must not be called by an ISR!
This function must not be called by an ISR!
*/
r_wm_Error_t R_WM_MsgEnqueue ( uint32_t Unit,
......@@ -2051,22 +2053,22 @@ r_wm_Error_t R_WM_MsgEnqueue ( uint32_t Unit,
Description:
Frame delimiter - marks the end of the sequence of the WM requests to be executed
during one frame redraw.
Parameters:
Unit - See description of <R_WM_DevInit>
Id - The sequence ID (should be used in subsequent R_WM_FrameWait call)
Return value:
See <r_wm_Error_t>.
*/
r_wm_Error_t R_WM_FrameEndMark(uint32_t Unit, uint16_t Id);
/***********************************************************
Function: R_WM_FrameWait
Description:
Executes the requests from the message queue up to the specicied frame delimiter.
Executes the requests from the message queue up to the specicied frame delimiter.
Parameters:
Unit - See description of <R_WM_DevInit>
......@@ -2074,53 +2076,53 @@ r_wm_Error_t R_WM_FrameEndMark(uint32_t Unit, uint16_t Id);
Return value:
See <r_wm_Error_t>.
Remarks:
This function blocks until all the requests scheduled up to the specified frame delimiter
are executed, and the corresponding VOUT HW update is finished.
Specific implementation for the VDCE:
- Before processing the message queue, this function waits until the Hardware is ready to be
reconfigured. The point of time of this "Scanline Event" can be configured with the function
- Before processing the message queue, this function waits until the Hardware is ready to be
reconfigured. The point of time of this "Scanline Event" can be configured with the function
<R_WM_Sys_DevEventRegister>. The default value is (ScreenHeight / 2).
- After processing the queue, this function waits for the "VSync Event" until the Hardware
- After processing the queue, this function waits for the "VSync Event" until the Hardware
accepted the new configuration.
- Please note, if the "Scanline Event" already occurred for the current frame, this function
- Please note, if the "Scanline Event" already occurred for the current frame, this function
will wait for the next event, thus it will skip one frame.
The same applies to the "VSync Event". If processing the message queue took too much time to
The same applies to the "VSync Event". If processing the message queue took too much time to
miss the current event, this function will wait for the next event and skip one frame.
Default sequence:
The call to <R_WM_FrameWait> consists of
The call to <R_WM_FrameWait> consists of
- WAIT (for "Scanline Event")
- EXEC (process the message queue)
- WAIT (for "VSync Event")
(code)
VSync ScanLine VSync ScanLine VSync
| | | | |
| DRW | | | DRW | | |
| | WAIT | | | WAIT | |
| | EXEC | | | EXEC | |
| | | WAIT | | | WAIT |
| | | | |
| DRW | | | DRW | | |
| | WAIT | | | WAIT | |
| | EXEC | | | EXEC | |
| | | WAIT | | | WAIT |
(end)
Problematic sequence:
Case 1 - The "Scanline Event" is configured to occur while drawing is still active.
The execution of the Message Queue will happen on the following "Scanline Event".
(code)
VSync ScanLine VSync ScanLine VSync
| | | | |
| DRW --------> | | | |
| | | WAIT ---------------> | |
| | | | EXEC | |
| | | | | WAIT |
| | | | |
| DRW --------> | | | |
| | | WAIT ---------------> | |
| | | | EXEC | |
| | | | | WAIT |
(end)
Case 2 - The "Scanline Event" is configured to occur too close to the "Vsync Event".
Control will be given back to user application only after the following "VSync Event"
(code)
VSync ScanLine VSync ScanLine VSync
| | | | |
......@@ -2129,7 +2131,7 @@ r_wm_Error_t R_WM_FrameEndMark(uint32_t Unit, uint16_t Id);
| | EXEC --> | | |
| | | | WAIT ---------------> |
(end)
*/
r_wm_Error_t R_WM_FrameWait(uint32_t Unit, uint16_t Id);
......@@ -2137,15 +2139,15 @@ r_wm_Error_t R_WM_FrameWait(uint32_t Unit, uint16_t Id);
Function: R_WM_FrameExecuteNext
Description:
Requests to WM are stored in the message queue.
This function executes the requests in the queue up to the next frame delimiter.
Requests to WM are stored in the message queue.
This function executes the requests in the queue up to the next frame delimiter.
Parameters:
Unit - See description of <R_WM_DevInit>
Return value:
The encountered frame-end Id .
Remarks:
This function can be used for implementing the custom drawing mechanism, apart from the
synchronous one provided by default.
......@@ -2155,7 +2157,7 @@ uint32_t R_WM_FrameExecuteNext(uint32_t Unit);
/***********************************************************
Group: Video Capture
The window manager offers the possibility to create surfaces
The window manager offers the possibility to create surfaces
for the video capturing.
*/
......@@ -2163,20 +2165,20 @@ uint32_t R_WM_FrameExecuteNext(uint32_t Unit);
Function: R_WM_CaptureCreate
Description:
Create a video capture surface inside a specific window on the screen Unit.
Create a video capture surface inside a specific window on the screen Unit.
The pointer Window of the capture structure has to point to a valid window,
which needs to be of the 'frame buffer' type.
It is also the responsibility of the caller to ensure
that the window is suitable for the desired video capturing parameters.
The capturing surface will not be visible until it is enabled.
that the window is suitable for the desired video capturing parameters.
The capturing surface will not be visible until it is enabled.
Parameter:
Unit - See description of <R_WM_DevInit>
Capture - This is a pointer to an <r_wm_Capture_t> structure.
Capture - This is a pointer to an <r_wm_Capture_t> structure.
The structure has to be filled by the application before calling the function.
Return value:
See <r_wm_Error_t>.
See <r_wm_Error_t>.
*/
r_wm_Error_t R_WM_CaptureCreate ( uint32_t Unit,
......@@ -2186,7 +2188,7 @@ r_wm_Error_t R_WM_CaptureCreate ( uint32_t Unit,
Function: R_WM_CaptureDelete
Description:
Delete the specified capturing surface.
Delete the specified capturing surface.
It will not delete the window, which is used for the capturing.
Parameter:
......@@ -2194,18 +2196,18 @@ r_wm_Error_t R_WM_CaptureCreate ( uint32_t Unit,
Capture - This is a pointer to the capturing surface's structure <r_wm_Capture_t>.
Return value:
See <r_wm_Error_t>.
See <r_wm_Error_t>.
*/
r_wm_Error_t R_WM_CaptureDelete(uint32_t Unit,
r_wm_Capture_t *Capture);
r_wm_Capture_t *Capture);
/***********************************************************
Function: R_WM_CaptureEnable
Description:
Enable the video capturing surface and start the capturing.
Enable the video capturing surface and start the capturing.
The capturing is visible inside the specified window.
......@@ -2214,11 +2216,11 @@ r_wm_Error_t R_WM_CaptureDelete(uint32_t Unit,
Capture - This is a pointer to the capturing surface's structure <r_wm_Capture_t>
Return value:
See <r_wm_Error_t>.
See <r_wm_Error_t>.
*/
r_wm_Error_t R_WM_CaptureEnable(uint32_t Unit,
r_wm_Capture_t *Capture);
r_wm_Capture_t *Capture);
/***********************************************************
......@@ -2232,7 +2234,7 @@ r_wm_Error_t R_WM_CaptureEnable(uint32_t Unit,
Capture - This is a pointer to the capturing surface's structure <r_wm_Capture_t>.
Return value:
See <r_wm_Error_t>.
See <r_wm_Error_t>.
*/
r_wm_Error_t R_WM_CaptureDisable ( uint32_t Unit,
......@@ -2300,7 +2302,7 @@ r_wm_Error_t R_WM_SpriteCreate(uint32_t Unit, r_wm_Sprite_t *Sprite);
/***********************************************************
Function: R_WM_SpriteEnable
Description:
Enable the specified sprite. The sprite becomes visible on the screen.
......@@ -2315,7 +2317,7 @@ r_wm_Error_t R_WM_SpriteEnable(uint32_t Unit, r_wm_Sprite_t *Sprite);
/***********************************************************
Function: R_WM_SpriteDisable
Description:
Disable the specified sprite. The sprite becomes not visible on the screen.
......@@ -2331,7 +2333,7 @@ r_wm_Error_t R_WM_SpriteDisable(uint32_t Unit, r_wm_Sprite_t *Sprite);
/***********************************************************
Function: R_WM_SpriteMove
Description:
Move the sprite to the specified X/Y and Z-order location.
......@@ -2339,12 +2341,12 @@ r_wm_Error_t R_WM_SpriteDisable(uint32_t Unit, r_wm_Sprite_t *Sprite);
Unit - See description of <R_WM_DevInit>
Sprite - <R_WM_Sprite_t> structure pointer
PosX/PosY/PosZ - New sprite position
Return value:
See R_WM_Error_t.
Remarks:
The PosZ specifies the relative position of the sprite in the sprites Z-order.
Changing the PosZ of one sprite can yield VOUT HW registers writes for all the sprites
defined within a window.
......@@ -2359,7 +2361,7 @@ r_wm_Error_t R_WM_SpriteMove ( uint32_t Unit,
/***********************************************************
Function: R_WM_SpriteBufSet
Description:
Set the sprite buffer. This way the buffer initially
set upon completion of the <R_WM_SpriteCreate> can be changed.
......@@ -2368,7 +2370,7 @@ r_wm_Error_t R_WM_SpriteMove ( uint32_t Unit,
Unit - See description of <R_WM_DevInit>
Sprite - <R_WM_Sprite_t> structure pointer
Buffer - New sprite buffer
Return value:
See R_WM_Error_t.
*/
......@@ -2377,14 +2379,14 @@ r_wm_Error_t R_WM_SpriteBufSet(uint32_t Unit, r_wm_Sprite_t *Sprite, void *Buffe
/***********************************************************
Function: R_WM_SpriteDelete
Description:
Remove the sprite from the host window.
Parameter:
Unit - See description of <R_WM_DevInit>
Sprite - <R_WM_Sprite_t> structure pointer
Return value:
See R_WM_Error_t.
*/
......@@ -2406,11 +2408,11 @@ r_wm_Error_t R_WM_SpriteDelete(uint32_t Unit, r_wm_Sprite_t *Sprite);
ErrorCb - Error callback function
Return value:
See <r_wm_Error_t>.
See <r_wm_Error_t>.
*/
r_wm_Error_t R_WM_ErrorCallbackSet ( uint32_t Unit,
void (*ErrorCb) ( uint32_t Unit,
r_wm_Error_t Error
r_wm_Error_t Error
)
);
......@@ -2419,12 +2421,12 @@ r_wm_Error_t R_WM_ErrorCallbackSet ( uint32_t Unit,
Function: R_WM_ErrorHandler
Description:
The function is the driver's central error handler.
If the application has set an error handler call-back function,
the central error handler shall call it and then return to its caller.
The central error handler shall return in case no
The function is the driver's central error handler.
If the application has set an error handler call-back function,
the central error handler shall call it and then return to its caller.
The central error handler shall return in case no
error handler call-back function has been set.
Unit - See description of <R_WM_DevInit>
Error - See <r_wm_Error_t>.
......@@ -2432,7 +2434,7 @@ r_wm_Error_t R_WM_ErrorCallbackSet ( uint32_t Unit,
No return value.
*/
void R_WM_ErrorHandler ( uint32_t Unit,
void R_WM_ErrorHandler ( uint32_t Unit,
r_wm_Error_t Error
);
......@@ -2443,10 +2445,10 @@ void R_WM_ErrorHandler ( uint32_t Unit,
Description:
Return the bits per pixel count for the specified format.
Parameter:
Format - Color format
Return value:
Bits per pixel count of the specified format.
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment