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

📄 func.h

📁 C语言编写的监控中心终端程序。基于GPRS上传收发数据功能
💻 H
📖 第 1 页 / 共 2 页
字号:
#ifndef __FUNC_H
#define __FUNC_H
#include "sio.h"

void			monitor(void);

/************************************************************************
 *	GLOBAL DEFINITIONS
 ************************************************************************/
/*
**	From cderr.c
*/
#define	CDERR_LATE_SECTOR	0x10
#define	CDERR_EARLY_SECTOR	0x11
#define	CDERR_SEEK_TOO_LONG	0x12
#define	CDERR_CRC_ERROR		0x20
#define	cderr_clear_seekerr()	(cd_seek_error = 0)
#define	cderr_clearLS_seqerr()	(cd_sequencerLS_error = 0)
#define	cderr_clearES_seqerr()	(cd_sequencerES_error = 0)
#define	cderr_clear_crcerr()	(cd_crc_error = 0)
/*
**	From cd.c
*/
#define	CD_RESET_HARDWARE	(1 << 0)
#define	CD_RESET_PARSER		(1 << 1)
#define	CD_RESET_CACHE		(1 << 2)
/*
**	From ircmd
*/
#define	GOTO_FAIL		0
#define	PROG_CNL		0
#define	RAND_CNL		1
#define	GOTO_CNL		2
#define	ALL_CNL			3
/*
**	From osdutil.c
*/
#define	C_OFF			0
#define	C_ON			1
#define	C_WAIT			2
#define	CH_N			0
#define	CH_S			1
#define	CH_P			2
#define	C_UP			0
#define	C_DN			1
#define	C_FF			0xFF
#define	TIMER			1
#define	ALWAYS			0
#define	C_TRUE			1
#define	C_FALSE			0
#define	C_CLEAR			0xFF
#define	C_ENABLE		0x00
#define	C_WRITE			1
#define	C_READ			0
#define	C_FIRST_TIME		0xFF

#define	SW_REGION1		0x10
#define	SW_REGION2		0x20
#define	SW_REGION3		0x30
#define	SW_REGION_OFF		0x10
#define	SW_REGION_ANTI		0x20

#define	CDDSP_NORMAL		0
#define	CDDSP_PAUSE		1
/*
**	From osd.c
*/
#define	OSD_OFF			0
#define	OSD_ON			1
#define	OSD_TOG			2
#define	OSD_FORMAT_SPLIT	0x10

#define	OSD_NONINTERLACED	0x00
#define	OSD_INTERLACED		0x08

#define	OSD_FORMAT_MASK		0x03
#define	OSD_FORMAT_4COLOR	0x00
#define	OSD_FORMAT_16COLOR	0x01
#define	OSD_FORMAT_256COLOR	0x02
#define	OSD_FORMAT_DIRECTCOLOR	0x03

/************************************************************************
 *	EXPORT FUNCTIONS
 ************************************************************************/
/*
**	From cd.c
*/
void			do_cd_pause(void);
void			do_cd_pause_release(void);
void			playback_cd_init(int);
/*
**	From mpegsys.c
*/
void			reset_video_decoder(void);
/*
**	From svcd.c
*/
int			check_cdtype(void);
/*
**	From macro.c
*/
void			ReShowState(void);
/*
**	From polling.c
*/
int			polling(void);
int			polling_timeout(void);
void			polling_Qtable(void);
/*
**	From ir.c
*/
void			reset_ir(void);
BYTE			polling_ir(void);
/*
**	From ircmd.c
*/
void			cdda_forward_chk(void);

#ifdef SUPPORT_OSD
void			InitSW_region(void);
void			ClearOsdMsg(int);

#define	SUPPORT_OSD_AUTO_INIT	1
#ifndef SUPPORT_OSD_AUTO_INIT
void			osd_init(void);
void			osd_init_2(void);
void			osd_init_prog(void);
void			osd_init_preview(void);
void			osd_init_realtime_eq(void);
void			osd_init_setup_main(void);
void			osd_init_setup_show_eq(void);
void			osd_init_setup_set_eq(void);
#else
void			initiate_osd(BYTE);

#define	REC_LEN			6
#define	PAL_LEN			6 * REC_LEN + 1
#define	COLOR_BIT		1
#define	SCAN_BIT		2

#define	OSD_INIT_NORMAL		0
#define	OSD_INIT_PREVIEW	1
#define	OSD_INIT_PROG		2
#define	OSD_INIT_REALTIME_EQ	3
#define	OSD_INIT_SETUP_MAIN	4
#define	OSD_INIT_SETUP_SHOW_EQ	5
#define	OSD_INIT_SETUP_SET_EQ	6
#define	OSD_INIT_MENU		7
#define	OSD_INIT_NAVI		8

#define	osd_init()			initiate_osd(OSD_INIT_NORMAL)
#define	osd_init_preview()		initiate_osd(OSD_INIT_PREVIEW)
#define	osd_init_prog()			initiate_osd(OSD_INIT_PROG)
#define	osd_init_realtime_eq()		initiate_osd(OSD_INIT_REALTIME_EQ)
#define	osd_init_setup_main()		initiate_osd(OSD_INIT_SETUP_MAIN)
#define	osd_init_setup_show_eq()	initiate_osd(OSD_INIT_SETUP_SHOW_EQ)
#define	osd_init_setup_set_eq()		initiate_osd(OSD_INIT_SETUP_SET_EQ)
#define	osd_init_menu()			initiate_osd(OSD_INIT_MENU)
#define	osd_init_navi()			initiate_osd(OSD_INIT_NAVI)
#endif

#define	MENU_COLOR_HALF_2	0x00
#define	MENU_COLOR_GREEN	0x01
#define	MENU_COLOR_GREEN_2	0x02
#define	MENU_COLOR_GREEN_3	0x03
#define	MENU_COLOR_YELLOW_2	0x04
#define	MENU_COLOR_YELLOW	0x05
#define	MENU_COLOR_CYAN		0x06
#define	MENU_COLOR_ORANGE	0x07
#define	MENU_COLOR_RED		0x08
#define	MENU_COLOR_WHITE_2	0x09
#define	MENU_COLOR_HALF		0x0A
#define	MENU_COLOR_WHITE	0x0B
#define	MENU_COLOR_BLACK	0x0C
#define	MENU_COLOR_BLUE		0x0D
#define	MENU_COLOR_MAGENTA	0x0E
#define	MENU_COLOR_TRANS	0x0F

#define	FONT_COLOR_HALF		0x00
#define	FONT_COLOR_WHITE	0x0B
#define	FONT_COLOR_GREEN	0x03
#define	FONT_COLOR_YELLOW	0x04
#define	FONT_COLOR_RED		0x08
#define	FONT_COLOR_TRANS	0x0F

#define	BACK_COLOR_BLACK	0x00
#define	BACK_COLOR_WHITE	0x0B
#define	BACK_COLOR_GREEN	0x03
#define	BACK_COLOR_YELLOW	0x04
#define	BACK_COLOR_RED		0x08
#define	BACK_COLOR_MAGENTA	0x0E

void			MenuScreenStart(void);
void			MenuScreenSelect(BYTE);
void			MenuScreenClose(BYTE);
void			MenuScreenColor(BYTE, BYTE);
void			MenuClearPoint(void);
void			MenuPrintString(UINT16, UINT16, BYTE *);
void			MenuQrintString(UINT16, UINT16, BYTE *);
void			MenuPrintPoint(UINT16, UINT16, BYTE *);
void			MenuPrintMessage(BYTE);
void			MenuDrawLine(INT16, INT16, INT16, INT16);
void			MenuDrawRectangle(INT16, INT16, INT16, INT16);
void			MenuFillRectangle(INT16, INT16, INT16, INT16);
void			MenuDrawWindow(INT16, INT16, INT16, INT16);
void			MenuDrawGrid(BYTE, BYTE, BYTE, BYTE);
void			MenuDrawFrame(BYTE, BYTE, BYTE, BYTE);

void			NaviScreenStart(void);
void			NaviScreenClose(void);
void			NaviScreenColor(BYTE, BYTE);
void			NaviClearPoint(void);
void			NaviSetLineWidth(BYTE);
void			NaviDrawLine(INT16, INT16, INT16, INT16);
void			NaviDrawLineWidth(INT16, INT16, INT16, INT16);
void			NaviDrawDashWidth(INT16, INT16, INT16, INT16);
void			NaviDrawRectangle(INT16, INT16, INT16, INT16);
void			NaviFillRectangle(INT16, INT16, INT16, INT16);
void			NaviDrawImage(UINT16, UINT16, BYTE *, BYTE, BYTE);
void			NaviHideImage(UINT16, UINT16, BYTE);
void			OSDTimer1S(void);

#ifdef SUPPORT_TEST_FUNCTION
void			TestOSD(void);
#endif

void			InitGraphVar(void);
void			MapSetColor(UINT32);
void			MapSetBackColor(UINT32);
UINT32			MapGetColor(void);
void			MapSaveColor(void);
void			MapRestoreColor(void);
void			MapSetFontSize(BYTE);
BYTE			MapGetFontSize(void);
void			MapSaveFontSize(void);
void			MapRestoreFontSize(void);
void			MapClearWindow(INT16, INT16, INT16, INT16);
void			MapSaveWindow(UINT16, UINT16);
void			MapLoadWindow(UINT16, UINT16);
void			MapMoveWindowUp(UINT16, UINT16, UINT16, UINT16);
void			MapMoveWindowLeft(UINT16, UINT16, UINT16, UINT16, BYTE);
void			MapSaveFrame(UINT16, UINT16, UINT16, UINT16);
void			MapLoadFrame(UINT16, UINT16, UINT16, UINT16);
void			MapSetLineWidth(BYTE);
BYTE			MapGetLineWidth(void);
void			MapDrawLine(INT16, INT16, INT16, INT16);
void			MapDrawLineWidth(INT16, INT16, INT16, INT16);
void			MapDrawLineNavi(INT16, INT16, INT16, INT16);
void			MapDrawLineWidthNavi(INT16, INT16, INT16, INT16);
void			MapDrawFrame(INT16, INT16, INT16, INT16);
void			MapDrawRectangle(INT16, INT16, INT16, INT16);
void			MapFillRectangle(INT16, INT16, INT16, INT16);
void			MapDrawTriangle(INT16, INT16, INT16, BYTE, BYTE);
void			MapFillTriangle(INT16, INT16, INT16, BYTE, BYTE);
void			MapDrawString(INT16, INT16, BYTE *);
void			MapFillString(INT16, INT16, BYTE *);
void			MapDrawFontMap(INT16, INT16, BYTE *, BYTE);
void			MapDrawFontPart(INT16, INT16, BYTE *, BYTE, BYTE);
void			MapDrawIcon(INT16, INT16, BYTE *);
void			MapDrawRound(INT16, INT16, INT16);
void			MapDrawCircle(INT16, INT16, INT16);
void			MapDrawCircleRect(INT16, INT16, INT16, INT16, INT16);
void			MapFillCircleRect(INT16, INT16, INT16, INT16, INT16);
void			MapDrawBottom(void);
void			MapDrawBottomIcon(BYTE *, BYTE, BYTE);
void			MapDrawBottomString(BYTE *, BYTE);
void			MapDrawBook(void);
void			MapHideBook(void);
void			MapDrawBookZone(BYTE *, BYTE);
void			MapDrawPhone(void);
void			MapHidePhone(void);
void			MapDrawPhoneZone(BYTE *, BYTE);
void			MapNoteEnter(void);
void			MapNoteExit(void);
BYTE			MapNoteState(void);
void			MapNoteShowText(BYTE *);
void			MapBillEnter(void);
void			MapBillExit(void);
BYTE			MapBillState(void);
void			MapBillShowHead(BYTE *);
void			MapBillShowText(BYTE *, BYTE, BYTE);
void			MapShowInit(void);
void			MapShowError(BYTE);
void			MapShowErrorText(BYTE *);

#if 0
void			MapShowEdit(void);
void			MapShowEditText(BYTE *);
void			MapEditClear(void);
void			MapEditNewLine(void);
void			MapEditSetColor(UINT32);
#endif

void			MapShowSBar(void);
void			MapShowSBarIcon(BYTE, BYTE);
void			MapShowSBarText(BYTE, BYTE *);
void			MapShowTalk(void);
void			MapShowTalkText(BYTE, BYTE *);

void			GraphTimer100mS(void);

void			ShowDebugHex(UINT32, BYTE);
void			ShowDebugDec(UINT32, BYTE);
void			ShowDebugStr(BYTE *, BYTE);

#else	// NOT SUPPORT_OSD
#define	osd_init()		0
#define	osd_print_region(r,p)	0
#define	osd_tog_region(r,m)	0
#define	polling_osd(i)		0
#endif

#if defined(UNIX) || defined(DISABLE_OSD)
#define	__osdpr(r,s)		{}
#define	osdprint(i,s,t)		{}
#else
#define	__osdpr(i,r,s)		(osd_print_region((r),(s)), osd_tog_region((i),OSD_ON))
#define	osdprint(i,s,t)		(__osdpr(i,&region[i], (s)), timeout_osd[i]=(t))
#endif

void			ShowTitle(void);
void			InitGPIO(void);
void			ServoInitGPIO(void);
void			SwitchSelect(BYTE);
void			SystemTimer10mS(void);

#ifdef SUPPORT_LINEAR_PLAYBACK
void			ServoInitPlay(void);
void			InitLinearVar(void);

void			VCDMenuShow(BYTE);
void			VCDMenuHide(void);
BYTE			VCDMenuStatus(void);

⌨️ 快捷键说明

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