thgfuncs.c
上传用户:super_houu
上传日期:2008-09-21
资源大小:4099k
文件大小:6k
- /* DO NOT EDIT -- AUTOMATICALLY GENERATED! */
- #include "config.h"
- #ifdef TEST_HARNASS///////////////////////////////////////////////////////////////////////////
- #include "includesysdefs.h"
- #include <samp_gen.h>
- #include <testharn.h>
- #include "playcorenav_sacdglue_test.h"
- #include "PlaycoreAuxCacheAuxCache.h"
- #include "decoderdec_defs.h"
- #include "decoderdecoder.h"
- #include "KerneluITRONrtos.h"
- #include "KernelKer_API.h"
- #include "PlaycoreSAMPschedulerSAMPScheduler.h"
- #include "PlaycoreSAMPschedulerSAMP_API.h"
- #include "kerneleventdef.h"
- extern int Furore2Init( unsigned long Begin, unsigned long End );
- extern int CaptureMasterToc(void);
- extern SAMP(ErrCode) SAMP(ISR_Install)(void (*FuroreIsr)(void));
- extern unsigned short Furore2Read( unsigned long Addr );
- extern void Furore2Write( unsigned long addr, unsigned short val );
- DECLARE_GROUPFUNC(THG_SAMP)
- DECLARE_GROUPFUNC(THG_NAV)
- DECLARE_GROUPFUNC(THG_SDI)
- DECLARE_GROUPFUNC(THG_SDM)
- DECLARE_GROUPFUNC(THG_PBC)
- DECLARE_GROUPFUNC(THG_BP)
- DECLARE_GROUPFUNC(THG_SBM)
- DECLARE_GROUPFUNC(THG_AD)
- DECLARE_GROUPFUNC(THG_APM)
- DECLARE_GROUPFUNC(THG_SP)
- DECLARE_GROUPFUNC(THG_PSP)
- DECLARE_GROUPFUNC(THG_BUF)
- DECLARE_GROUPFUNC(THG_DMX)
- DECLARE_GROUPFUNC(THG_LLD)
- DECLARE_GROUPFUNC(THG_APP)
- DECLARE_GROUPFUNC(THG_FUR)
- DECLARE_GROUPFUNC(THG_GEN)
- DECLARE_GROUPFUNC(THG_GLUE)
- DECLARE_GROUPFUNC(THG_DEBUG)
- //jerry cai add const attribute
- CONST THGConnection THGConnections[] = {
- { GROUP('S','A','M','P','_'), THG_SAMP },
- { GROUP('N','A','V','_','_'), THG_NAV },
- { GROUP('S','D','I','_','_'), THG_SDI },
- { GROUP('S','D','M','_','_'), THG_SDM },
- { GROUP('P','B','C','_','_'), THG_PBC },
- { GROUP('B','P','_','_','_'), THG_BP },
- { GROUP('S','B','M','_','_'), THG_SBM },
- { GROUP('A','D','_','_','_'), THG_AD },
- { GROUP('A','P','M','_','_'), THG_APM },
- { GROUP('S','P','_','_','_'), THG_SP },
- { GROUP('P','S','P','_','_'), THG_PSP },
- { GROUP('B','U','F','_','_'), THG_BUF },
- { GROUP('D','M','X','_','_'), THG_DMX },
- { GROUP('L','L','D','_','_'), THG_LLD },
- { GROUP('A','P','P','_','_'), THG_APP },
- { GROUP('F','U','R','_','_'), THG_FUR },
- { GROUP('G','E','N','_','_'), THG_GEN },
- { GROUP('G','L','U','E','_'), THG_GLUE },
- { GROUP('D','E','B','U','G'), THG_DEBUG },
- { 0, 0 } /* end marker */
- };
- #if 0 //jerry cai todo: remove it later
- DEFINE_GROUPFUNC(THG_SAMP)
- GROUP_SWITCH
- END_GROUPFUNC
- DEFINE_GROUPFUNC(THG_APM)
- GROUP_SWITCH
- END_GROUPFUNC
- DEFINE_GROUPFUNC(THG_NAV)
- GROUP_SWITCH
- END_GROUPFUNC
- DEFINE_GROUPFUNC(THG_SDI)
- GROUP_SWITCH
- END_GROUPFUNC
- DEFINE_GROUPFUNC(THG_SDM)
- GROUP_SWITCH
- END_GROUPFUNC
- #endif
- #if 1 //jerry cai todo: remove te later.
- DEFINE_GROUPFUNC(THG_PBC)
- GROUP_SWITCH
- {
- SAMP(ErrCode) lErr;
- SAMP(TH_Send)("PBC", cmd, "%u", lErr);
- }
- END_GROUPFUNC
- DEFINE_GROUPFUNC(THG_BP)
- GROUP_SWITCH
- {
- SAMP(ErrCode) lErr;
- SAMP(TH_Send)("BP", cmd, "%u", lErr);
- }
- END_GROUPFUNC
- DEFINE_GROUPFUNC(THG_SBM)
- GROUP_SWITCH
- {
- SAMP(ErrCode) lErr;
- SAMP(TH_Send)("SBM", cmd, "%u", lErr);
- }
- END_GROUPFUNC
- DEFINE_GROUPFUNC(THG_AD)
- GROUP_SWITCH
- {
- SAMP(ErrCode) lErr;
- SAMP(TH_Send)("AD", cmd, "%u", lErr);
- }
- END_GROUPFUNC
- DEFINE_GROUPFUNC(THG_SP)
- GROUP_SWITCH
- {
- SAMP(ErrCode) lErr;
- SAMP(TH_Send)("SP", cmd, "%u", lErr);
- }
- END_GROUPFUNC
- DEFINE_GROUPFUNC(THG_GEN)
- GROUP_SWITCH
- {
- SAMP(ErrCode) lErr;
- SAMP(TH_Send)("GEN", cmd, "%u", lErr);
- }
- END_GROUPFUNC
- DEFINE_GROUPFUNC(THG_FUR)
- GROUP_SWITCH
- {
- SAMP(ErrCode) lErr;
- SAMP(TH_Send)("FUR", cmd, "%u", lErr);
- }
- END_GROUPFUNC
- DEFINE_GROUPFUNC(THG_APP)
- GROUP_SWITCH
- {
- SAMP(ErrCode) lErr;
- SAMP(TH_Send)("APP", cmd, "%u", lErr);
- }
- END_GROUPFUNC
- DEFINE_GROUPFUNC(THG_LLD)
- GROUP_SWITCH
- {
- SAMP(ErrCode) lErr;
- SAMP(TH_Send)("LLD", cmd, "%u", lErr);
- }
- END_GROUPFUNC
- DEFINE_GROUPFUNC(THG_DMX)
- GROUP_SWITCH
- {
- SAMP(ErrCode) lErr;
- SAMP(TH_Send)("DMX", cmd, "%u", lErr);
- }
- END_GROUPFUNC
- DEFINE_GROUPFUNC(THG_BUF)
- GROUP_SWITCH
- {
- SAMP(ErrCode) lErr;
- SAMP(TH_Send)("BUF", cmd, "%u", lErr);
- }
- END_GROUPFUNC
- DEFINE_GROUPFUNC(THG_PSP)
- GROUP_SWITCH
- {
- SAMP(ErrCode) lErr;
- SAMP(TH_Send)("PSP", cmd, "%u", lErr);
- }
- END_GROUPFUNC
- #endif
- //debug cmd handler
- DEFINE_GROUPFUNC(THG_DEBUG)
- GROUP_SWITCH
- CASE_CMD( "play" )
- {
- SAMP_EXP(NAV_PlayTrack)(1, 0); //todo: remove later.
- }
- END_CASE
- CASE_CMD( "b" )
- {
- SAMP(ErrCode) lErr;
- SAMP(TH_Send)("DEBUG", cmd, "%u", (SAMP(UInt32))lErr);
- asm {
- int 3;
- }
- return;
- }
- END_CASE
- CASE_CMD( "o" )
- {
- SAMP(BE_TrayOpen)();
- }
- END_CASE
- CASE_CMD( "c" )
- {
- SAMP(BE_TrayClose)();
- }
- END_CASE
- CASE_CMD( "t" )
- {
- CaptureMasterToc();
- }
- END_CASE
- CASE_CMD( "p" )
- {
- PspKeyDetection();
- }
- END_CASE
- CASE_CMD( "r" )
- {
- unsigned short res;
- UINT32 address;
- TH_GetParam(OPTIONS, "%u", &address);
- res = Furore2Read(address);
- printf("n value: 0x%xn", res);
- }
- END_CASE
- CASE_CMD( "w" )
- {
- UINT32 address;
- UINT32 res;
- TH_GetParam(OPTIONS, "%u%u", &address, &res);
- Furore2Write(address, res);
- }
- END_CASE
- CASE_CMD( "si" )
- {
- ie_send(IE_CORE_SAMP_INSTALL_SCHEDULER);
- // SAMP_SchedulerInstall();
- }
- END_CASE
- CASE_CMD( "sr" )
- {
- ie_send(IE_CORE_SAMP_REMOVE_SCHEDULER);
- // SAMP_SchedulerRemove();
- }
- END_CASE
- CASE_CMD( "ss" )
- {
- SAMP(ErrCode) error;
- SAMP_APICallRequest (SAMP_API_START,&error);
- }
- END_CASE
- CASE_CMD( "sc" )
- {
- SAMP(OS_ISendMsg) (1,"Mess 1",7);
- }
- END_CASE
- CASE_CMD( "g" )
- {
- SAMP(UInt32) startDataArea, endDataArea, endLayer0;
- SAMP(BE_GetDataArea)(&startDataArea, &endDataArea, &endLayer0);
- }
- END_CASE
- /*
- CASE_CMD( "p" )
- {
- SAMP(ErrCode) lErr = SAMP(ERR_OK);
- SAMP(TH_Send)("DEBUG", cmd, "%u", lErr);
- printFuroreStatus();
- return;
- }
- END_CASE
- */
- DEFAULT
- ;
- END_CASE
- {
- SAMP(ErrCode) lErr = SAMP(ERR_OK);
- SAMP(TH_Send)("DEBUG", cmd, "%u", (SAMP(UInt32))lErr);
- }
-
- END_GROUPFUNC
- #endif ///////////////////////////////////////////////////////////////////////////////////////////////////////////