📄 dm642helper.h
字号:
#ifndef _DM642_HELPER_H
#define _DM642_HELPER_H
#include "common.h"
#include "MibStructure.h"
#include "privateDataInsert.h"
typedef unsigned int U32;
/*PCI memory-mapped registers*/
#define PCI64_RSTSRC 0x01C00000UL
#define PCI64_PMDCSR 0x01C00004UL
#define PCI64_PCIIS 0x01C00008UL
#define PCI64_PCIIEN 0x01C0000CUL
#define PCI64_DSPMA 0x01C00010UL
#define PCI64_PCIMA 0x01C00014UL
#define PCI64_PCIMC 0x01C00018UL
#define PCI64_CDSPA 0x01C0001CUL
#define PCI64_CPCIA 0x01C00020UL
#define PCI64_CCNT 0x01C00024UL
#define PCI64_HALT 0x01C00028UL
#define PCI64_EEADD 0x01C20000UL
#define PCI64_EEDAT 0x01C20004UL
#define PCI64_EECTL 0x01C20008UL
/*I/O registers accessed via base1 memory*/
#define PCI64_HSR 0x01C1FFF0UL
#define PCI64_HDCR 0x01C1FFF4UL
#define PCI64_DSPP 0x01C1FFF8UL
#define BUFSIZE (256*1024)
typedef struct _DM642MAP
{
U32 board_num;
U32 vector[4];
}DM642MAP;
typedef struct _ACCESS_REG
{
U32 op;
U32 reg;
U32 data;
}ACCESS_REG;
typedef struct _ACCESS_INFO
{
U32 len;
U32 data[1024/4];
}ACCESS_INFO;
typedef struct _DM642STATUS
{
U32 vector[MAXSUBBOARD];
}DM642STATUS;
enum
{
BIT0 = 0x00000001,
BIT1 = 0x00000002,
BIT2 = 0x00000004,
BIT3 = 0x00000008,
BIT4 = 0x00000010,
BIT5 = 0x00000020,
BIT6 = 0x00000040,
BIT7 = 0x00000080,
BIT8 = 0x00000100,
BIT9 = 0x00000200,
BIT10 = 0x00000400,
BIT11 = 0x00000800,
BIT12 = 0x00001000,
BIT13 = 0x00002000,
BIT14 = 0x00004000,
BIT15 = 0x00008000,
BIT16 = 0x00010000,
BIT17 = 0x00020000,
BIT18 = 0x00040000,
BIT19 = 0x00080000,
BIT20 = 0x00100000,
BIT21 = 0x00200000,
BIT22 = 0x00400000,
BIT23 = 0x00800000,
BIT24 = 0x01000000,
BIT25 = 0x02000000,
BIT26 = 0x04000000,
BIT27 = 0x08000000,
BIT28 = 0x10000000,
BIT29 = 0x20000000,
BIT30 = 0x40000000,
BIT31 = 0x80000000
};
#define TS_WITHOUT_PRIVATE 0
#define TS_WITH_PRIVATE 1
#define PSI 2
#define SDT 3
#define EIT 4
#define VIDEOPID 0
#define AUDIOPID 1
#define PRIVATEPID 2
typedef struct
{
UINT32 PID;
UINT32 Type;// VIDEOPID ; AUDIOPID ; PRIVATEPID
}struct_PID;
#define MAXORIGINALPID 10
typedef struct
{
UINT32 ProgramNo; //0-9
UINT32 ServiceID;
UINT32 ServiceRate;//single program rate
UINT32 OriginalPIDNumber;//number of PIDs in original PMT
struct_PID OriginalPIDs[MAXORIGINALPID]; // PIDs in original PMT
}struct_ProgInfo;
#define DM642_DATA_HEADER (5*sizeof(UINT32))
//global variables
STATUS readSDTSectionFromFile(UINT8*pSDTSectionData,UINT32* pSDTSectionSize,char* inputFileName);
void WriteToDM642(struct_MCU2DSP* pMCU2DSP,int nSubboardNo);
//void WriteToDM642(struct_MCU2DSP* pMCU2DSP);
void* DM642ServeMain(void* param);
//void RemoveDriver();
//extern global variables declare
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -