⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 drvsecisr.h

📁 mstar 776 开发的车载dvd
💻 H
字号:
////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2006-2007 MStar Semiconductor, Inc.
// All rights reserved.
//
// Unless otherwise stipulated in writing, any and all information contained
// herein regardless in any format shall remain the sole proprietary of
// MStar Semiconductor Inc. and be kept in strict confidence
// (¨MStar Confidential Information〃) by the recipient.
// Any unauthorized act including without limitation unauthorized disclosure,
// copying, use, reproduction, sale, distribution, modification, disassembling,
// reverse engineering and compiling of the contents of MStar Confidential
// Information is unlawful and strictly prohibited. MStar hereby reserves the
// rights to any and all damages, losses, costs and expenses resulting therefrom.
//
// Description: Section Filter ISR
////////////////////////////////////////////////////////////////////////////////

#ifndef _DRV_SECISR_H_
#define _DRV_SECISR_H_

#include "datatype.h"
#include "debug.h"

/*constant definition ===========================================================================*/
#if (PLATFORM != MCU8051) //================================================<<<
#define SEC_RDY_MASK_BIT			(1<<0)
#define PES_RDY_MASK_BIT			(1<<1)
#define TSP_RDY_MASK_BIT			(1<<2)
#define ADF_RDY_MASK_BIT			(1<<3)
#define REQ_RDY_MASK_BIT			(1<<4)
#define BUF_OVF_MASK_BIT			(1<<5)
#endif//PLATFORM_MCU8051 //=================================================>>>

/*enumeration ===================================================================================*/
//<<section isr int code>>=======================================================================//
#if (PLATFORM != MCU8051) //================================================<<<
enum SEC_INTCODE_BIT_MsgClass_VALUE
{
	DMX_PROC_MSG_SEC_RDY			= 0x8001,
	DMX_PROC_MSG_PES_RDY			= 0x8002,
	DMX_PROC_MSG_TSP_RDY			= 0x8003,
	DMX_PROC_MSG_ADF_RDY			= 0x8004,
	DMX_PROC_MSG_REQ_RDY			= 0x8005,
	DMX_PROC_MSG_BUF_OVF			= 0x8006,
	DMX_PROC_MSG_SEC_CRCERR			= 0x8007,
	DMX_PROC_MSG_TTX_RDY			= 0x8008,
	DMX_PROC_MSG_TSP_ALIVE			= 0x8009,
	DMX_PROC_MSG_PES_ERR            = 0x800a
};

#else //<<<=================================================================>>>
enum SEC_INTCODE_BIT_MsgClass_VALUE
{
	DMX_PROC_MSG_SEC_RDY			= 0x01,
	DMX_PROC_MSG_PES_RDY			= 0x02,
	DMX_PROC_MSG_TSP_RDY			= 0x03,
	DMX_PROC_MSG_REQ_RDY			= 0x05,
	DMX_PROC_MSG_BUF_OVF			= 0x06,
	DMX_PROC_MSG_SEC_CRCERR			= 0x07,
	DMX_PROC_MSG_TTX_RDY			= 0x08,
	DMX_PROC_MSG_TSP_ALIVE			= 0x09,
	DMX_PROC_MSG_PES_ERR            = 0x0a
};

#endif//PLATFORM_MCU8051 //=================================================>>>

//<<section isr ack code>>=======================================================================//
enum SEC_ACKCODE_BIT
{
	DMX_PROC_RPL_FLT_START			= 0x8011,
	DMX_PROC_RPL_FLT_STOP			= 0x8012,
	DMX_PROC_RPL_PCR_RESET			= 0x8013,
	DMX_PROC_RPL_PING_ALIVE			= 0x8014,
	DMX_PROC_MSG_SET_REG			= 0x8015,
	DMX_PROC_MSG_GET_REG			= 0x8016,
	DMX_PROC_MSG_REQ_WRITE_ADDRESS	= 0x8017
};

/*function declaration ==========================================================================*/
#ifdef DRV_SECISR
#define DRV_SECISR_INTERFACE
#else
#define	DRV_SECISR_INTERFACE extern
#endif

#if (PLATFORM != MCU8051) //================================================<<<
DRV_SECISR_INTERFACE void MDrv_Secisr_Register(U8 SecIsrNo, U16 u16SecIsrMask, void (*func_ptr)(U8 SecIsrNo));
DRV_SECISR_INTERFACE void MDrv_Secisr_Unregister(U8 SecIsrNo);
DRV_SECISR_INTERFACE void MDrv_Secisr_Isr(void);
DRV_SECISR_INTERFACE void MDrv_Secisr_ClearIntCounter(U8 SecIsrNo);
DRV_SECISR_INTERFACE U32  MDrv_Secisr_GetSecIntCounter(U8 SecIsrNo);
DRV_SECISR_INTERFACE void MDrv_Secisr_MinusSecIntCounter(U8 SecIsrNo);
DRV_SECISR_INTERFACE U32  MDrv_Secisr_GetTspIntCounter(U8 SecIsrNo);
DRV_SECISR_INTERFACE void MDrv_Secisr_MinusTspIntCounter(U8 SecIsrNo);
DRV_SECISR_INTERFACE U32  MDrv_Secisr_GetAdfIntCounter(U8 SecIsrNo);
DRV_SECISR_INTERFACE void MDrv_Secisr_MinusAdfIntCounter(U8 SecIsrNo);
DRV_SECISR_INTERFACE U32  MDrv_Secisr_GetOverflowIntCounter(U8 SecIsrNo);
DRV_SECISR_INTERFACE U32  MDrv_Secisr_GetPesIntCounter(void);
DRV_SECISR_INTERFACE void MDrv_Secisr_MinusPesIntCounter(void);
DRV_SECISR_INTERFACE U32  MDrv_Secisr_GetReqIntCounter(void);
DRV_SECISR_INTERFACE void MDrv_Secisr_MinusReqIntCounter(void);
DRV_SECISR_INTERFACE U8   MDrv_Secisr_GetErrorPesNumber(void);
DRV_SECISR_INTERFACE U16  MDrv_Secisr_GetErrorPesByteNumber(void);
DRV_SECISR_INTERFACE void MDrv_Secisr_ClearPesAllCounters(void);
DRV_SECISR_INTERFACE void MDrv_Secisr_Initial(void);
DRV_SECISR_INTERFACE void MDrv_Secisr_ShowIsrTable(void);
DRV_SECISR_INTERFACE void MDrv_Secisr_ShowIntCounter(U8 SecIsrNo);
DRV_SECISR_INTERFACE void MDrv_Secisr_ShowIntCounterAll(void);
DRV_SECISR_INTERFACE U8   MDrv_Secisr_ReadReg(U16 addr);
DRV_SECISR_INTERFACE void MDrv_Secisr_WriteReg(U16 addr, U8 data);
#else //<<<=================================================================>>>
DRV_SECISR_INTERFACE void MDrv_Secisr_Isr(void);
DRV_SECISR_INTERFACE void MDrv_Secisr_ClearIntCounter(U8 SecIsrNo);
DRV_SECISR_INTERFACE U32  MDrv_Secisr_GetSecIntCounter(U8 SecIsrNo);
DRV_SECISR_INTERFACE void MDrv_Secisr_MinusSecIntCounter(U8 SecIsrNo);
DRV_SECISR_INTERFACE U32  MDrv_Secisr_GetTspIntCounter(U8 SecIsrNo);
DRV_SECISR_INTERFACE void MDrv_Secisr_MinusTspIntCounter(U8 SecIsrNo);
DRV_SECISR_INTERFACE U32  MDrv_Secisr_GetOverflowIntCounter(U8 SecIsrNo);
DRV_SECISR_INTERFACE U32  MDrv_Secisr_GetPesIntCounter(void);
DRV_SECISR_INTERFACE void MDrv_Secisr_MinusPesIntCounter(void);
DRV_SECISR_INTERFACE U32  MDrv_Secisr_GetReqIntCounter(void);
DRV_SECISR_INTERFACE void MDrv_Secisr_MinusReqIntCounter(void);
DRV_SECISR_INTERFACE U8   MDrv_Secisr_GetErrorPesNumber(void);
DRV_SECISR_INTERFACE U16  MDrv_Secisr_GetErrorPesByteNumber(void);
DRV_SECISR_INTERFACE void MDrv_Secisr_ClearPesAllCounters(void);
DRV_SECISR_INTERFACE U16  MDrv_Secisr_GetTtxIntCounter(void);
DRV_SECISR_INTERFACE void MDrv_Secisr_MinusTtxIntCounter(void);
DRV_SECISR_INTERFACE void MDrv_Secisr_ClearTtxIntCounter(void);
DRV_SECISR_INTERFACE void MDrv_Secisr_Initial(void);
DRV_SECISR_INTERFACE void MDrv_Secisr_EnableReserveFlt(BOOLEAN enable);
#endif//PLATFORM_MCU8051 //=================================================>>>

/*global variable ===============================================================================*/
#if (PLATFORM != MCU8051) //================================================<<<
#if (!OR1KCODE)
extern U32 _u32Reg_SecIsrIntCode;
extern U32 _u32Reg_HwConfig4;
extern U32 _u32Reg_SecIsrAckCode;
#endif //OR1KCODE
#else //<<<=================================================================>>>
extern U8 xdata _u8Reg_SecIsrIntCode0;
extern U8 xdata _u8Reg_SecIsrIntCode1;
extern U8 xdata _u8Reg_SecIsrIntCode2;
extern U8 xdata _u8Reg_SecIsrIntCode3;
extern U8 xdata _u8Reg_SecIsrAckCode0;
extern U8 xdata _u8Reg_SecIsrAckCode1;
extern U8 xdata _u8Reg_SecIsrAckCode2;
extern U8 xdata _u8Reg_SecIsrAckCode3;
#endif//PLATFORM_MCU8051 //=================================================>>>

/*===============================================================================================*/


#endif // _DRV_SECISR_H_

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -