📄 mixer_api.h
字号:
/********************************************************************************
* File name : MIX_api.c *
* Start date : 2002.12.12 *
* By : KIM DO YEON *
* Contact : *
* Description: S5H5002 MIX APIs *
********************************************************************************/
#ifndef _MIX_API_H
#define _MIX_API_H
#ifdef __cplusplus
extern "C" {
#endif
/////////////////////////////////////////////////////////////////////////////////
#define MIXER_BASE 0x314000
#define rMIXER_CTRL_H (*(volatile unsigned int *) (MIXER_BASE + 0x00))
#define rMIXER_CTRL_L (*(volatile unsigned int *) (MIXER_BASE + 0x02))
#define rMIXER_CFG_H (*(volatile unsigned int *) (MIXER_BASE + 0x04))
#define rMIXER_CFG_L (*(volatile unsigned int *) (MIXER_BASE + 0x06))
#if 0
#define rMIXER_ANTI_FLICKER_H (*(volatile unsigned int *) (MIXER_BASE + 0x08))
#define rMIXER_ANTI_FLICKER_L (*(volatile unsigned int *) (MIXER_BASE + 0x0A))
#endif
#define rMIXER_GRAPHIC_CF0_H (*(volatile unsigned int *) (MIXER_BASE + 0x0C))
#define rMIXER_GRAPHIC_CF0_L (*(volatile unsigned int *) (MIXER_BASE + 0x0E))
#define rMIXER_GRAPHIC_CF1_H (*(volatile unsigned int *) (MIXER_BASE + 0x10))
#define rMIXER_GRAPHIC_CF1_L (*(volatile unsigned int *) (MIXER_BASE + 0x12))
#define rMIXER_GRAPHIC_CF2_H (*(volatile unsigned int *) (MIXER_BASE + 0x14))
#define rMIXER_GRAPHIC_CF2_L (*(volatile unsigned int *) (MIXER_BASE + 0x16))
#define rMIXER_GRAPHIC_CF3_H (*(volatile unsigned int *) (MIXER_BASE + 0x18))
#define rMIXER_GRAPHIC_CF3_L (*(volatile unsigned int *) (MIXER_BASE + 0x1A))
#define rMIXER_CM_COEFF_Y_H (*(volatile unsigned int *) (MIXER_BASE + 0x1c))
#define rMIXER_CM_COEFF_Y_L (*(volatile unsigned int *) (MIXER_BASE + 0x1E))
#define rMIXER_CM_COEFF_CB_H (*(volatile unsigned int *) (MIXER_BASE + 0x20))
#define rMIXER_CM_COEFF_CB_L (*(volatile unsigned int *) (MIXER_BASE + 0x22))
#define rMIXER_CM_COEFF_CR_H (*(volatile unsigned int *) (MIXER_BASE + 0x24))
#define rMIXER_CM_COEFF_CR_L (*(volatile unsigned int *) (MIXER_BASE + 0x26))
#if 0
#define rMIXER_CURSOR_CFG0_H (*(volatile unsigned int *) (MIXER_BASE + 0x28))
#define rMIXER_CURSOR_CFG0_L (*(volatile unsigned int *) (MIXER_BASE + 0x2A))
#define rMIXER_CURSOR_CFG1_H (*(volatile unsigned int *) (MIXER_BASE + 0x2C))
#define rMIXER_CURSOR_CFG1_L (*(volatile unsigned int *) (MIXER_BASE + 0x2E))
#define rMIXER_CURSOR_CFG2_H (*(volatile unsigned int *) (MIXER_BASE + 0x30))
#define rMIXER_CURSOR_CFG2_L (*(volatile unsigned int *) (MIXER_BASE + 0x32))
#define rMIXER_CURSOR_CLUT0_H (*(volatile unsigned int *) (MIXER_BASE + 0x34))
#define rMIXER_CURSOR_CLUT0_L (*(volatile unsigned int *) (MIXER_BASE + 0x36))
#define rMIXER_CURSOR_CLUT1_H (*(volatile unsigned int *) (MIXER_BASE + 0x38))
#define rMIXER_CURSOR_CLUT1_L (*(volatile unsigned int *) (MIXER_BASE + 0x3A))
#define rMIXER_CURSOR_CLUT2_H (*(volatile unsigned int *) (MIXER_BASE + 0x3C))
#define rMIXER_CURSOR_CLUT2_L (*(volatile unsigned int *) (MIXER_BASE + 0x3E))
#define rMIXER_CURSOR_CLUT3_H (*(volatile unsigned int *) (MIXER_BASE + 0x40))
#define rMIXER_CURSOR_CLUT3_L (*(volatile unsigned int *) (MIXER_BASE + 0x42))
#define rMIXER_CURSOR_CLUT4_H (*(volatile unsigned int *) (MIXER_BASE + 0x44))
#define rMIXER_CURSOR_CLUT4_L (*(volatile unsigned int *) (MIXER_BASE + 0x46))
#define rMIXER_CURSOR_CLUT5_H (*(volatile unsigned int *) (MIXER_BASE + 0x48))
#define rMIXER_CURSOR_CLUT5_L (*(volatile unsigned int *) (MIXER_BASE + 0x4A))
#define rMIXER_CURSOR_CLUT6_H (*(volatile unsigned int *) (MIXER_BASE + 0x4C))
#define rMIXER_CURSOR_CLUT6_L (*(volatile unsigned int *) (MIXER_BASE + 0x4E))
#define rMIXER_CURSOR_CLUT7_H (*(volatile unsigned int *) (MIXER_BASE + 0x50))
#define rMIXER_CURSOR_CLUT7_L (*(volatile unsigned int *) (MIXER_BASE + 0x52))
#define rMIXER_SP_CLUT0_H (*(volatile unsigned int *) (MIXER_BASE + 0x54))
#define rMIXER_SP_CLUT0_L (*(volatile unsigned int *) (MIXER_BASE + 0x56))
#define rMIXER_SP_CLUT1_H (*(volatile unsigned int *) (MIXER_BASE + 0x58))
#define rMIXER_SP_CLUT1_L (*(volatile unsigned int *) (MIXER_BASE + 0x5A))
#define rMIXER_SP_CLUT2_H (*(volatile unsigned int *) (MIXER_BASE + 0x5C))
#define rMIXER_SP_CLUT2_L (*(volatile unsigned int *) (MIXER_BASE + 0x5E))
#define rMIXER_SP_CLUT3_H (*(volatile unsigned int *) (MIXER_BASE + 0x60))
#define rMIXER_SP_CLUT3_L (*(volatile unsigned int *) (MIXER_BASE + 0x62))
#define rMIXER_SP_CLUT4_H (*(volatile unsigned int *) (MIXER_BASE + 0x64))
#define rMIXER_SP_CLUT4_L (*(volatile unsigned int *) (MIXER_BASE + 0x66))
#define rMIXER_SP_CLUT5_H (*(volatile unsigned int *) (MIXER_BASE + 0x68))
#define rMIXER_SP_CLUT5_L (*(volatile unsigned int *) (MIXER_BASE + 0x6A))
#define rMIXER_SP_CLUT6_H (*(volatile unsigned int *) (MIXER_BASE + 0x6C))
#define rMIXER_SP_CLUT6_L (*(volatile unsigned int *) (MIXER_BASE + 0x6E))
#define rMIXER_SP_CLUT7_H (*(volatile unsigned int *) (MIXER_BASE + 0x70))
#define rMIXER_SP_CLUT7_L (*(volatile unsigned int *) (MIXER_BASE + 0x72))
#define rMIXER_SP_CLUT8_H (*(volatile unsigned int *) (MIXER_BASE + 0x74))
#define rMIXER_SP_CLUT8_L (*(volatile unsigned int *) (MIXER_BASE + 0x76))
#define rMIXER_SP_CLUT9_H (*(volatile unsigned int *) (MIXER_BASE + 0x78))
#define rMIXER_SP_CLUT9_L (*(volatile unsigned int *) (MIXER_BASE + 0x7A))
#define rMIXER_SP_CLUT10_H (*(volatile unsigned int *) (MIXER_BASE + 0x7C))
#define rMIXER_SP_CLUT10_L (*(volatile unsigned int *) (MIXER_BASE + 0x7E))
#define rMIXER_SP_CLUT11_H (*(volatile unsigned int *) (MIXER_BASE + 0x80))
#define rMIXER_SP_CLUT11_L (*(volatile unsigned int *) (MIXER_BASE + 0x82))
#define rMIXER_SP_CLUT12_H (*(volatile unsigned int *) (MIXER_BASE + 0x84))
#define rMIXER_SP_CLUT12_L (*(volatile unsigned int *) (MIXER_BASE + 0x86))
#define rMIXER_SP_CLUT13_H (*(volatile unsigned int *) (MIXER_BASE + 0x88))
#define rMIXER_SP_CLUT13_L (*(volatile unsigned int *) (MIXER_BASE + 0x8A))
#define rMIXER_SP_CLUT14_H (*(volatile unsigned int *) (MIXER_BASE + 0x8C))
#define rMIXER_SP_CLUT14_L (*(volatile unsigned int *) (MIXER_BASE + 0x8E))
#define rMIXER_SP_CLUT15_H (*(volatile unsigned int *) (MIXER_BASE + 0x90))
#define rMIXER_SP_CLUT15_L (*(volatile unsigned int *) (MIXER_BASE + 0x92))
#define rMIXER_PIX_CNT_H (*(volatile unsigned int *) (MIXER_BASE + 0x9C))
#define rMIXER_PIX_CNT_L (*(volatile unsigned int *) (MIXER_BASE + 0x9E))
#endif
#define rMIXER_GR_CFG0_H (*(volatile unsigned int *) (MIXER_BASE + 0x0C))
#define rMIXER_GR_CFG0_L (*(volatile unsigned int *) (MIXER_BASE + 0x0E))
#define rMIXER_GR_CFG1_H (*(volatile unsigned int *) (MIXER_BASE + 0x10))
#define rMIXER_GR_CFG1_L (*(volatile unsigned int *) (MIXER_BASE + 0x12))
#define rMIXER_GR_CFG2_H (*(volatile unsigned int *) (MIXER_BASE + 0x14))
#define rMIXER_GR_CFG2_L (*(volatile unsigned int *) (MIXER_BASE + 0x16))
#define rMIXER_GR_CFG3_H (*(volatile unsigned int *) (MIXER_BASE + 0x18))
#define rMIXER_GR_CFG3_L (*(volatile unsigned int *) (MIXER_BASE + 0x20))
#define rMIXER_BG_COLOR_H (*(volatile unsigned int *) (MIXER_BASE + 0x94))
#define rMIXER_BG_COLOR_L (*(volatile unsigned int *) (MIXER_BASE + 0x96))
#define rMIXER_INTR_H (*(volatile unsigned int *) (MIXER_BASE + 0x98))
#define rMIXER_INTR_L (*(volatile unsigned int *) (MIXER_BASE + 0x9A))
#define rMIXER_GR_CLUT0_H (*(volatile unsigned int *) (MIXER_BASE + 0x400))
#define rMIXER_GR_CLUT0_L (*(volatile unsigned int *) (MIXER_BASE + 0x402))
#define rMIXER_GR_CLUT1_H (*(volatile unsigned int *) (MIXER_BASE + 0x404))
#define rMIXER_GR_CLUT1_L (*(volatile unsigned int *) (MIXER_BASE + 0x406))
#define rMIXER_GR_CLUT2_H (*(volatile unsigned int *) (MIXER_BASE + 0x408))
#define rMIXER_GR_CLUT2_L (*(volatile unsigned int *) (MIXER_BASE + 0x40A))
#define rMIXER_GR_CLUT3_H (*(volatile unsigned int *) (MIXER_BASE + 0x40C))
#define rMIXER_GR_CLUT3_L (*(volatile unsigned int *) (MIXER_BASE + 0x40E))
#define rMIXER_GR_CLUT4_H (*(volatile unsigned int *) (MIXER_BASE + 0x410))
#define rMIXER_GR_CLUT4_L (*(volatile unsigned int *) (MIXER_BASE + 0x412))
#define rMIXER_GR_CLUT5_H (*(volatile unsigned int *) (MIXER_BASE + 0x414))
#define rMIXER_GR_CLUT5_L (*(volatile unsigned int *) (MIXER_BASE + 0x416))
#define rMIXER_GR_CLUT6_H (*(volatile unsigned int *) (MIXER_BASE + 0x418))
#define rMIXER_GR_CLUT6_L (*(volatile unsigned int *) (MIXER_BASE + 0x41A))
#define rMIXER_GR_CLUT7_H (*(volatile unsigned int *) (MIXER_BASE + 0x41C))
#define rMIXER_GR_CLUT7_L (*(volatile unsigned int *) (MIXER_BASE + 0x41E))
#define rMIXER_GR_CLUT8_H (*(volatile unsigned int *) (MIXER_BASE + 0x420))
#define rMIXER_GR_CLUT8_L (*(volatile unsigned int *) (MIXER_BASE + 0x422))
#define rMIXER_GR_CLUT9_H (*(volatile unsigned int *) (MIXER_BASE + 0x424))
#define rMIXER_GR_CLUT9_L (*(volatile unsigned int *) (MIXER_BASE + 0x426))
#define rMIXER_GR_CLUT10_H (*(volatile unsigned int *) (MIXER_BASE + 0x428))
#define rMIXER_GR_CLUT10_L (*(volatile unsigned int *) (MIXER_BASE + 0x42A))
#define rMIXER_GR_CLUT11_H (*(volatile unsigned int *) (MIXER_BASE + 0x42C))
#define rMIXER_GR_CLUT11_L (*(volatile unsigned int *) (MIXER_BASE + 0x42E))
#define rMIXER_GR_CLUT12_H (*(volatile unsigned int *) (MIXER_BASE + 0x430))
#define rMIXER_GR_CLUT12_L (*(volatile unsigned int *) (MIXER_BASE + 0x432))
#define rMIXER_GR_CLUT13_H (*(volatile unsigned int *) (MIXER_BASE + 0x434))
#define rMIXER_GR_CLUT13_L (*(volatile unsigned int *) (MIXER_BASE + 0x436))
#define rMIXER_GR_CLUT14_H (*(volatile unsigned int *) (MIXER_BASE + 0x438))
#define rMIXER_GR_CLUT14_L (*(volatile unsigned int *) (MIXER_BASE + 0x43A))
#define rMIXER_GR_CLUT15_H (*(volatile unsigned int *) (MIXER_BASE + 0x43C))
#define rMIXER_GR_CLUT15_L (*(volatile unsigned int *) (MIXER_BASE + 0x43E))
/************************************************************************
* MACRO FUNCTION DEFINITION *
*************************************************************************/
//9908俊辑绰 酒贰狼 巴阑 漂喊洒 促福霸 父甸瘤 富绊 酒贰狼 macro啊 唱坷搁
//窜鉴洒 register write 秦霖促.
// #define WRITE_REG(reg,val) (reg) = (val)
//#define SETBIT_REG(reg,val) (reg) |= (val)
//#define RESETBIT_REG(reg,val) (reg) &= ~(val)
// #define READ_REG(reg) (reg)
/************************************************************************
* MIXER STRUCTURE DEFINITIONS *
*************************************************************************/
#if 0
typedef enum {
MIX_RETURN_ERROR = 0,
MIX_RETURN_DONE
} MIX_Return_t;
typedef struct {
USHORT coeff1; /* [29:20] */
USHORT coeff2; /* [19:10] */
USHORT coeff3; /* [ 9: 0] */
} MIX_Coeff_t;
#endif
typedef enum {
MIX_NTSC,
MIX_PAL
}MIX_Mode_t;
VOID Init_MIX ( void );
VOID DeInit_MIX ( void );
VOID MIX_ClearReg ( void );
// VOID MIX_Start ( void );
// VOID MIX_Stop ( void );
VOID MIX_SetBgColor ( ULONG bg_color );
VOID MIX_SetGfxColorFormat(void);
VOID MIX_SetGraphicEn(BOOL graphic_en);
VOID MIX_SetGfxClut(ULONG number, ULONG*MIX_clut);
VOID MIX_SetGraphicBase(ULONG base_address);
#if _SUPPORT_DOUBLING
VOID MIX_SetDoublingEn(BOOL doubling_en);
BOOL MIX_GetDoublingEn(void);
#endif/* _SUPPORT_DOUBLING */
BOOL MIX_SetGraphicPos(USHORT x_pos, USHORT y_pos);
BOOL MIX_SetGraphicSize(USHORT gfx_width, USHORT gfx_height);
BOOL MIX_GetGraphicEn(void);
VOID MIX_SetVideoEn(BOOL video_en);
void MIX_SetMode ( MIX_Mode_t enMixMode );
#ifdef __cplusplus
}
#endif
#endif /* _MIX_API_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -