📄 sys_debug.h
字号:
#include "ap_defs.h"
#include "dvb_sys.h"
#include "dvb_mem.h"
#include "dvb_osd.h"
#include "dvb_fp.h"
#include "ct_demux.h"
#include "ct_filter.h"
#include "ct_gpio.h"
#include "ct_osd.h"
#ifdef PVR_ENABLE
#include "dvb_pvr.h"
#include "db_api.h"
#include "ap_pvr.h"
#endif
#ifdef HDMI_ENABLE
#include "ct_hdmi.h"
#endif
#ifdef CT216T
#include "ct_type.h"
#include "ct_tve.h"
#endif
#include "ct_sys.h"
//#include "dvb_log.h"
typedef enum
{
EN_USER_DEBUG,
EN_SYSTEM_DEBUG
}EN_SWITCH_DEBUG;
EN_SWITCH_DEBUG DVB_GetUserDebugMode(void);
EN_SWITCH_DEBUG DVB_SetUserDebugMode(EN_SWITCH_DEBUG _enSwitchDebug);
EN_DRV_RESULT Usrdebug_ParseCommand(u8 *pu8ParStr, u8 *pu8ParArgc, u8 *pu8ParArgv);
EN_DRV_RESULT Usrdebug_ExecuteCommand(u8 *pu8ExeArgv);
#ifdef CT216T
extern void CT221_Monitor_Switch(void);
#endif
extern bool8 DVB_TunerInit(void);
extern bool8 nim_test(u16 u16Mode);
extern void Color_Patelle_All(void);
extern void Dump_SatelliteDatabase(void);
extern void Dump_TransponderDatabase(int iTotal);
extern void Dump_ServiceDatabase(void);
extern void nvram_test (u8 u8Mode, u16 u16Para1, u16 u16Para2);
extern void CT_OS_TaskInfo(void);
extern void CT_OS_SemaphoreInfo(void);
extern void CT_OS_HISRInfo(void);
extern void CT_OS_MemoryPoolInfo(void);
extern void DVB_MEM_PoolInfo(void);
extern void DVB_MEM_PrintUsedInfo (EN_MEMPOOL_TYPE mem_type);
extern void DVB_MEM_EITPoolDebug (void);
#ifdef CT216E
extern void DBG_MPGReadHostReg(u32 u32Idx);
extern void DBG_MPGWriteHostReg(u32 u32Idx, u32 u32Data);
extern void DBG_MPGReadSysReg(u8 u8Reg);
extern void DBG_MPGWriteSysReg(u8 u8Reg, u32 u32Data);
extern void DBG_MPGReadDRAM(u32 u32Addr);
extern void DBG_MPGWriteDRAM(u32 u32Addr, u32 u32Data);
extern void DBG_MPGReadDRAMSegment(u32 u32AddrStart, u32 u32AddrEnd);
extern void DBG_MPGReadDM(u32 u32Addr);
extern void DBG_MPGReadDMSegment(u32 u32AddrStart, u32 u32AddrEnd);
extern void DBG_MPGWriteDM(u32 u32Addr, u32 u32Data);
extern void DBG_MPGReadInternalReg(u8 u8Reg);
extern void DBG_MPGWriteInternalReg(u8 u8Reg, u32 u32Data);
#endif
extern void CT_OS_MEMlog_Debug(u8 CmdIdx);
extern void CT_OS_Test(u32 CmdIdx1, u32 CmdIdx2, u32 CmdIdx3);
extern void AV_Test(u16 u16Mode, u16 u16Param1, u16 u16Param2);
extern void AV_SetVideoDisplay(bool8 b8Enable);
extern void DVB_VideoWeight(u8 u8Value);
extern void DVB_BackgroundDisplay(bool8 b8Display);
extern void AV_SetBackgroundWeight(u8 u8Weight);
extern void DVB_AudioSetVolume(u8 u8Volume);
extern void DVB_SetAudioFreq(u8 u8Freq);
extern bool8 DVB_AV_PollAvBuffer(bool8 b8Enable);
extern bool8 DVB_AV_PollRiscDebug(bool8 b8Enable);
extern void DVB_AVDemuxEnable(void);
extern void DVB_AVDemuxDisable(void);
extern void DVB_VideoGetPicInfo (void);
extern void _mem_info(void);
//extern void _dump_stack_info(void);
extern void DVB_OSDSwapRegion(void);
extern void Cursor_Test(void);
extern void USER_ShowLogo(void);
extern bool8 DVB_FlashErase(u8 u8Bank);
extern void CT_Flash_Protect(bool8 b8True);
extern u8 CT_Flash_StatusRead(void);
extern void DVB_EitDumpSectionInfo (void);
extern void DVB_EitDumpEITBKPFEvent (void);
extern void DVB_EitDumpSectionInfo0 (void);
extern void dump_eit_for_srv (u16 u16SrvIdx);
extern void dump_s1_firstevent_info (void);
extern void dump_eit_all_service_event_num (void);
extern void DVB_7SegShowDetial(u8 u8Idx, u8 u8Data);
extern void DVB_SIBK_Print(void);
extern bool8 DVB_FilterShowInfo (void);
#ifdef CONAX
#include "ct_smc.h"
extern void mailbox_addmail(void);
extern void mailbox_delallmail(void);
extern void mailbox_getmailinfo(u8 u8SlotNo);
extern void CA_Notify_Test(u32 u32Index);
extern void mailbox_display_icon(void);
extern EN_SMC_STATUS DVB_SMC_Reset(EN_MODULE_SMC_NO enModuleSmcNo);
#endif
#ifdef PCR_ENABLE
void _PWM_Value_Training(u32 u32TrainingMode, u32 u32Para2);
#endif
extern bool8 CT_OSD_FrameDeactive(void);
extern bool8 CT_OSD_FrameActive(void);
extern EN_OSD_ERROR DVB_OSDRectangleStripDisplay(EN_RS_LAYER enRSLayer, bool8 b8Enable);
extern void _Filter_IRQEnable(void);
extern void _Filter_IRQDisable(void);
extern void DVB_SYS_GetPrimaryMask (void);
extern void DVB_SYS_GetSecondaryMask (void);
extern void DVB_SYS_SetPrimaryMask (u32 u32IrqMask);
extern void DVB_SYS_SetSecondaryMask (u32 u32IrqMask);
#if (defined(CT216S)||defined(CT216T) || defined (CT216H))
extern void Filter_Show_Info (u32 u32FltNo);
extern void CT_OSD_Test(u32 u32Para1, u32 u32Para2, u32 u32Para3);
//extern EN_DRV_RESULT CT_VCXO_Test_Init(void);
//extern EN_DRV_RESULT CT_VCXO_Adjust(void);
#else
extern void CT_FILT_ShowInfo (u8 u8SecFltNo);
#endif
#ifdef PVR_ENABLE
#include "dvb_pvr.h"
// Please Use 10,000MB Storage Test
// At second round, open 255th file will need more then 10s
//#define SYS_DEBUG_FS_OPEN_ISSUE
//#define PVR_FILE_TEST
extern bool8 DVB_PVR_FastForwardPlay(EN_PVR_PLAYBACK_SPEED enSpeed);
extern bool8 DVB_PVR_FastBackwardPlay(EN_PVR_PLAYBACK_SPEED enSpeed);
extern bool8 DVB_PVR_SlowForwardPlay(EN_PVR_PLAYBACK_SPEED enSpeed);
extern bool8 DVB_PVR_NormalPlay(void);
extern void DVB_PVR_TestWrite(void);
extern void DVB_PVR_TestRead(void);
extern void DVB_PVR_TestBigSizeWrite(void);
extern bool8 DVB_PVR_TestDataPath(void);
extern void DVB_PVR_TestRecordStart(void);
extern void DVB_PVR_TestPlayFileStartTask(u32 u32FileIndex);
extern void DVB_PVR_TestPlayFileStopTask(void);
extern void DVB_PVR_TestFastForwardTask(EN_PVR_PLAYBACK_SPEED enSpeed);
extern void DVB_PVR_TestSlowForwardPlay(void);
extern void DVB_PVR_TestPausePlay(void);
extern void DVB_PVR_TestScanModeforward(u8 u8scanforwardMode);
extern void DVB_PVR_TestScanModebackward(u8 u8scanbackwardMode);
extern void DVB_PVR_TestPlaybackFileStart(void);
extern bool8 DVB_PVR_PlaybackStop(void);
extern bool8 DVB_PVR_SlowForwardPlay(EN_PVR_PLAYBACK_SPEED enSpeed);
extern bool8 DVB_PVR_FastBackwardPlay(EN_PVR_PLAYBACK_SPEED enSpeed);
extern void DVB_PVR_TestNormalPlay(void);
extern void DVB_PVR_TestRecordStop(void);
extern void PVR_Get_TSBufferFullness(void);
extern bool8 DVB_PVR_PlaybackSkip(s32 s32Second);
extern bool8 DVB_PVR_SetRecordTime(u32 u32Second);
extern void DVB_PVR_TestSkip(bool8 b8Dir,u16 u16Second);
extern void Sys_profile_on(int resolution);
extern EN_DRV_RESULT Filter_Show_IntStatus(u32 u32FltNo);
extern void DVB_PVR_ShowPlayInfo(void);
extern void PVR_ShowCacheRecInfo(void);
extern void PVR_ShowTracePoint(void);
extern bool8 DVB_PVR_PlaybackRecordingStart(u16 u16LiveVid, u16 u16LiveAid);
extern bool8 DVB_PVR_PlaybackRecordingStop(void);
extern void DVB_PVR_SetTimeShitMode(bool8 b8Mode);
extern bool8 DVB_PVR_TimeShiftLiveBackward(EN_PVR_PLAYBACK_SPEED enSpeed,u16 u16LiveVid, u16 u16LiveAid);
// PVR Verification
extern void sys_debug_test(void);
// PVR
void sys_test_pvr_initial(void);
AP_PVR_NOTIFY sys_test_pvr_callback(EN_PVR_EVENT enPvrEvent);
void sys_test_pvr_get_info(u32 u32FileIndex);
void sys_test_pvr_get_device_type(void);
void sys_test_pvr_get_file_count(void);
void sys_test_pvr_get_file_name(u32 u32FileIndex);
void sys_test_pvr_delete_file(u32 u32FileIndex);
void sys_test_pvr_get_partition_total_size(void);
void sys_test_pvr_get_partition_free_size(void);
void sys_test_pvr_format(u8 u8Index);
// PVR: Record
void sys_test_pvr_record_start(void);
void sys_test_pvr_record_stop(void);
void sys_test_pvr_record_set_duration(u16 u16Time);
void sys_test_pvr_record_get_duration(void);
void sys_test_pvr_record_get_start_time(void);
void sys_test_pvr_record_get_past_time(void);
// PVR: Playback
void sys_test_pvr_playback_start(u32 u32FileIndex);
void sys_test_pvr_playback_pause(bool8 b8Pause);
void sys_test_pvr_playback_stop(void);
void sys_test_pvr_playback_fast_forward(u8 u8Speed);
void sys_test_pvr_playback_slow_forward(u8 u8Speed);
void sys_test_pvr_playback_fast_backward(u8 u8Speed);
void sys_test_pvr_playback_skip(bool8 b8Positive, s32 s32Second);
void sys_test_pvr_playback_get_total_time(void);
void sys_test_pvr_playback_get_progress(void);
void sys_test_pvr_playback_get_speed(void);
// PVR: Time Shift
void sys_test_pvr_timeshift_set_default_size(u8 u8Size);
void sys_test_pvr_timeshift_record_start(void);
void sys_test_pvr_timeshift_record_stop(void);
void sys_test_pvr_timeshift_playback_start(void);
void sys_test_pvr_timeshift_playback_stop(void);
void sys_test_pvr_timeshift_live_pause(bool8 b8Mode, bool8 b8Pause);
void sys_test_pvr_timeshift_playback_pause(bool8 b8Pause);
void sys_test_pvr_timeshift_live_fast_backward(u8 u8Speed);
void sys_test_pvr_timeshift_fast_forward(u8 u8Speed);
void sys_test_pvr_timeshift_slow_forward(u8 u8Speed);
void sys_test_pvr_timeshift_fast_backward(u8 u8Speed);
void sys_test_pvr_timeshift_skip(bool8 b8Positive, s32 s32Second);
void sys_test_pvr_timeshift_get_default_size(void);
void sys_test_pvr_timeshift_get_play_progess(void);
void sys_test_pvr_timeshift_get_record_progess(void);
void sys_test_pvr_timeshift_get_speed(void);
void sys_test_pvr_timeshift_to_record(void);
// PVR: Loop Test
// Record
void sys_long_test_pvr_record_start(u16 u16Time);
void sys_long_test_pvr_check_record_again(void);
// Different Record
void sys_long_test_pvr_different_record_start(u16 u16StartDuration, u16 u16IncreaseTime);
void sys_long_test_pvr_check_different_record_again(void);
// Playback
void sys_long_test_pvr_playback_start(u32 u32FileIndex);
void sys_long_test_pvr_check_playback_again(void);
// Different Playback
void sys_long_test_pvr_different_playback_start(u32 u32FileCount);
void sys_long_test_pvr_check_different_playback_again(void);
// Key
void sys_long_test_pvr_key(bool8 b8Flag, u8 u8Key, u8 u8Speed);
void sys_long_test_pvr_check_key_again(void);
// FS
#ifdef PVR_FILE_TEST
void sys_test_fs_read(void);
void sys_test_fs_write(u32 u32FileCount, u32 u32WriteTimes);
void sys_test_fs_write_open(void);
void sys_test_fs_change_dir(u32 u32Times);
#endif
#endif
#ifdef SYS_DEBUG_FS_OPEN_ISSUE
u32 MyCreateFileFunc(EN_DEVICE_TYPE enDeviceType, u8 *pu8FileName);
bool8 CheckCreateFileDuration(EN_DEVICE_TYPE enDeviceType);
#endif
#if defined (CT216X)
// Video
extern EN_DRV_RESULT CT_MPG_Test(u32 CmdIdx, u32 u32Width, u32 u32Height);
// Parser
extern void DRV_Parser_Test(u32 u32Mode);
extern void CT_Audio_Test(u32 u32Mode);
extern void CT_SYS_SetCpuFreq(u32 u32Freq);
#endif
#if defined(USB_ENABLE) || defined(CARDREADER_ENABLE)
#include ".\FileSystem\file_control.h"
extern void FS_Dir(EN_DEVICE_TYPE enDeviceType);
#endif
#ifdef NIM_PERFORMANCE_TEST_1
extern void test_nim_Scan(bool8 b8Enable);
#endif
#ifdef USB_ENABLE
extern void sys_test_usb(void);
extern bool8 DVB_USB_Read(u32 u32SectorIndex, u16 u16SectorLengths, u8 *pu8Buffer);
extern bool8 DVB_USB_Recovery(void);
extern bool8 DVB_USB_SetChunkSize(u32 u32chunksize);
extern bool8 DVB_USB_GetChunkSize(void);
#endif
extern EN_DRV_RESULT CT_NIM_DebugWriteReg(u16 u16RegIndex, u8 u8Buf);
extern EN_DRV_RESULT CT_NIM_DebugReadReg(u16 u16RegIndex, u16 u16Len);
#if 0
extern void ct201_debug(u8 u8Value);
extern void test_NIM_PerformeceCheck(u16 u16CurrentSatListIdx);
#endif
extern void DVB_MEM_Dump(u32 u32address, u32 u32length);
extern void DVB_MEM_Write(u32 u32address, u32 u32Value);
#ifdef CT216T
extern EN_DRV_RESULT CT_TVE_SetWSS(EN_WSS_MODE enMode, EN_CT_SCAN_MODE enScanType, EN_CT_VID_MODE enVideoMode);
#endif
extern void DVB_SysShowVersion(void);
extern void SetRatingByUser(u8 rating);
#ifdef DBTOOL_ENABLE
extern void DBTL_SSU_LinkCommunication(void);
#endif
#ifdef DEVICE_LOG
extern EN_DRV_RESULT CT_UART_SetOutput(u8 u8Output);
#endif
static USRDEBUG_USER_COMMAND const stSysCmd[] =
{
// { "cursor", Cursor_Test },
{"pwd", (DEBUG_FN)DVB_SwitchDebugTable},
{"mem", (DEBUG_FN)DVB_MEM_Dump},
{"wmem", (DEBUG_FN)DVB_MEM_Write},
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -