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

📄 sample.h

📁 dragon ball vz328 上的一个例子程序。 用于做手持仪表用。
💻 H
字号:
/******************************************************************************
02.11.14 by Nie Copyright Shanghai Sunbow Technology  Co.,Ltd http://www.sendbow.com 
*****************************************************************************/ 

/* 
 * 
 * sample.h - Defines all the coordinates and prototypes for use in 
 *           through out this sample applications
 */

extern STATUS rv;

#ifdef PIXEL_1
#define DARK_GREY BLACK
#define LIGHT_GREY WHITE
#endif

#ifdef PIXEL_4
#define DARK_GREY	GREY10
#define LIGHT_GREY	GREY5
#endif

/* Some short form for this sample */
#define SNF             SMALL_NORMAL_FONT
#define LNF				LARGE_NORMAL_FONT
#define SIF				SMALL_ITALIC_FONT
#define LIF				LARGE_ITALIC_FONT
#define STYLE			REPLACE_STYLE

/* global variable for ClkTools */
extern U16 gYear, gMonth, gDay, gHour, gMin, gSec;
extern U32 gAlarmId1, gAlarmId2, gAlarmId3;
extern U32 gPeriodId;
extern P_U8 gScreenMap; 
extern STATUS ClkInit(void);
extern STATUS ClkHandler(U32 id); 

/* Application Function Table */
#define MENUID					0
#define AUDIOAPPID				1
#define PENAPPID				2
#define CHARINAPPID				3
#define GRPHICAPPID				4
#define UARTAPPID				5
#define SYSAPPID				6

/* Hard Icon Function Table */
#define SYSTASKID				7
#define MENUTASKID				8

#define UARTSENDAPPID			9
#define UARTRCVAPPID			10


/* General Appearance */
#define MARGIN                  10
#define SIZEX                   160
#define SIZEY                   220
#define SCREEN_ORGX             0
#define SCREEN_ORGY             0
#define WORK_GAP                2
#define WORK_X                  (SCREEN_ORGX + WORK_GAP)
#define WORK_Y                  (SCREEN_ORGY + WORK_GAP)
#define WORK_X1                 40
#define WORK_Y1                 20
#define WORK_X2                 0
#define WORK_Y2                 40
#define WORK_WIDTH              (SIZEX-(WORK_GAP+WORK_GAP+WORK_X2))
#define WORK_HEIGHT             (SIZEY-(WORK_GAP+WORK_GAP+WORK_Y2))
#define NEED_AREA               1

/* Icon appearance */
#define DOWN_X          		41
#define DOWN_Y          		21
#define UP_X            		41 + ICON_TYPE1_WIDTH
#define UP_Y            		21


/* Catalog appearance */
#define CATALOG_X               WORK_X
#define CATALOG_Y               WORK_Y
#define CATALOG_END_X           (WORK_X+WORK_WIDTH-1)
#define CATALOG_END_Y           (WORK_Y+WORK_HEIGHT-1)
#define CATALOG_ROW_HEIGHT      16
#define CATALOG_NUM_ROWS        (WORK_HEIGHT/CATALOG_ROW_HEIGHT)

/* menu icons layout and dimensions */
#define NUM_APPS                6
#define NUM_APPS_COL            3
#define NUM_APPS_ROW            2
#define APPS_ICON_SIZE          40

/* hard icons task */
#define NUM_HARD_ICON           2

/* HWR appearance */
#define HWR_INPUT_AREA          52
#define HWR_CANDIDATE_NUM       5
#define HWR_CANDIDATE_WIDTH     116
#define HWR_CANDIDATE_HEIGHT    20

/* Hard Icons co-ordinate */
#define HARD_SRCY              	220
#define HARD_DESTY             	237

#define SYS_SRCX             	0
#define SYS_DESTX            	13
#define MENU_SRCX               15
#define MENU_DESTX              52

/* Misc */

#define SOFTKEYBOARD_NUM        2
#define SOFTKEYBOARD_WIDTH      52
#define SOFTKEYBOARD_HEIGHT     52

//extern STATUS UART_Configure(unsigned char mode,unsigned int baudRate,unsigned parity,unsigned char stopBits,unsigned char charLen, unsigned char com );
//extern void Uart_Init(unsigned char com);
/* Function of Tools Set*/

/* Sample Application */      
extern void MenuTaskApp(void);
extern void QueryDataApp(void);
extern void ListUserAllDataApp(void);
extern void ListItemContentApp(void);
extern void SystemSetApp(void);
extern void SetGreyApp(void);
extern void SetTimeApp(void);
extern void ShutDownApp(void);
extern void IntegrateModelApp(void);
extern void AddRecApp(void);
extern void DelRecApp(void);
extern void QryRecApp(void);
extern void LstRecApp(void);
extern void LstRecContentApp(void);
extern void SaveRecApp(void);
/* For hardicon control */  

⌨️ 快捷键说明

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