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

📄 ui.h

📁 这个是单片机4200的ui程序
💻 H
📖 第 1 页 / 共 2 页
字号:
/******************************************************************************
*         Copyright (c) 2004 Oak Technology, Inc. All rights reserved.
*
* Author:                
*
* Description:       This is the herder file for the User Interface module
*                    
*
* Revision History:
* Date       Author    Description
* --------   ------    ---------------
* 06/06/02    Hsin     Initial Create
* 10/09/02    Hsin     Initial Release
* 06/14/05    CRuss    Added vopu define
 * 2006-08-08	Cellming.Chen	Trim this routine
******************************************************************************/
#ifndef __UI
#define __UI

#include	"jobcopy.h"
#include	"job.h"
#include	"lasercopymonoouter.h"






#include	"photopr.gh"




















// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//                               Constants/Macros
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

// enable photo print for 4100 and 4200 reference board
/*
#ifndef PHOTO_PRINT_ENABLED
#if defined(ZR4100) || defined(ZR4200)
#define PHOTO_PRINT_ENABLED     0
#endif
#endif
*/
// disable Fire Pulse setting by default
#ifndef ENABLE_FIREPULSE_SETTING
#define ENABLE_FIREPULSE_SETTING    0
#endif


/* UI Status definitions */
#define UI_STATUS_COMPLETE    API_OK
#define UI_STATUS_CONTINUE    API_FAIL 


/* timeout period definition */
#define UI_OK_PERIOD          10000    /* ms unit */
#define UI_TIMEOUT_PERIOD     10000    /* ms unit */
#define UI_SAVINGMODE_PERIOD  600000   /* ms unit */
#define UI_SET_ALIGN_PERIOD   60000    /* ms unit */


/* Max. constant of ... */
#define UI_MAX_COPY_NO        99
#define UI_MAX_PAPER_TYPE     4
#define UI_MAX_IMAGE_TYPE     3
#define UI_MAX_COPY_QUALITY   3


/* Brightness constant */
#define UI_BRIGHT_DARK_MAX    0
#define UI_BRIGHT_NORMAL      3
#define UI_BRIGHT_LIGHT_MAX   6


/* Scaling value range */
#define UI_SCALING_VALUE_MIN     25    /* 25 % */
#define UI_SCALING_VALUE_NORMAL  100   /* 100% */
#define UI_SCALING_VALUE_MAX     400   /* 400% */
#define UI_POSTER_VALUE_MIN      101
#define UI_POSTER_VALUE_MAX      UI_SCALING_VALUE_MAX
#define UI_CLONE_VALUE_MIN       UI_SCALING_VALUE_MIN
#define UI_CLONE_VALUE_MAX       100

/* Alignment index */
#define UI_ALIGN_VALUE_LENGTH    ALIGNMENT_NO
#define UI_ALIGN_INDEX_START     0
#define UI_ALIGN_INDEX_END       4 // !!! use 5 align value // (ALIGNMENT_NO - 1)
//#define UI_ALIGN_VALUE_MIN       1
//#define UI_ALIGN_VALUE_DEFAULT   5
//#define UI_ALIGN_VALUE_MAX       10

/* Max. Jobs allowed */
#define UI_MAX_JOB      1 /* only one job can be executing */
#define UI_JOB_NONE     0xFF /* No Job index */

/* Fire pulse value */
#define UI_FIRE_PULSE_WIDTH_TYPES   3     // Draft, Normal and Best
#define UI_PREFIRE_PULSE_WIDTH_DEF  270
//#define UI_FIRE_PULSE_WIDTH_DEF     900
#define UI_BLK_FIRE_PULSE_WIDTH_DEF 920
#define UI_CLR_FIRE_PULSE_WIDTH_DEF 1170
#define UI_PREFIRE_PULSE_WIDTH_MIN  100
#define UI_PREFIRE_PULSE_WIDTH_MAX  500
#define UI_FIRE_PULSE_WIDTH_MIN     500
#define UI_FIRE_PULSE_WIDTH_MAX     1300


// Alignment value limit
#define  UI_ALIGN_VALUE_MIN       0






// undefine the UI_IGNORE_COVER to check the cover
#define UI_IGNORE_COVER 1


#if UI_IGNORE_COVER
#define PHERR_FORCE_CHANGECARTRIDGE 0
#endif

// define preprocessor symbol UI_PANEL_ENABLE to enable UI panel
#ifndef UI_PANEL_ENABLE
#define UI_PANEL_ENABLE
#endif

#define DB_Read(par1, par2) 
#define DB_Write(par1, par2)




/*****************************************************************************/
/*   user input command definitions                                          */
/*****************************************************************************/
/* task info */
#ifndef UI_STACK_SIZE              
#define UI_STACK_SIZE               1024 //512
#endif

// Jon start executing time
#define NO_JOB_EXEC_TIME            0xFFFFFFFF

// TimeOut for Printer to remove its device error
#define UI_PRINTER_RESET_TIME       1500  /* ms unit */

/* First level command */
#define UI_COMMAND_NONE             0x00  /* No command is executing */
#define UI_COMMAND_COPIES           0x01  /* Do NO. of Copies selection */
#define UI_COMMAND_SCALING          0x02  /* Do scaling factor selection */
#define UI_COMMAND_SETTING          0x03  /* Do setting sub-menu selection */
#define UI_COMMAND_QUALITY          0x04  /* Do copy quality selection */
#define UI_COMMAND_SCAN_TO          0x05  /* Do scan to dest. selection*/
#define UI_COMMAND_BRIGHTNESS       0x06  /* Do Lighter/Darker selection */
#define UI_COMMAND_PAPER_TYPE       0x07  /* Do paper type selection */
#define UI_COMMAND_SELECT           0x08  /* Do Select */
#define UI_COMMAND_COLOR_COPY       0x09  /* Do Color-Copy Job */
#define UI_COMMAND_MONO_COPY        0x0A  /* Do B&W-Copy Job */
#define UI_COMMAND_SCAN             0x0B  /* Do Scan Job */
#define UI_COMMAND_CANCEL           0x0C  /* Do Cancel job */
#define UI_COMMAND_POWER            0x0D  /* Do Power On/Off Job */
#define UI_COMMAND_MODE             0x0E  /* Do mode selection */
#define UI_COMMAND_DEVICE_ERROR     0x0F  /* Do device error procedure */
#define UI_COMMAND_COVER_OPEN       0x10  /* Do change cartridge job */

// memory card command
#define UI_COMMAND_NEXT_IMAGE           0x20  /* Select next image for memory card */
#define UI_COMMAND_PREV_IMAGE           0x21  /* Select previous image for memory card */
#define UI_COMMAND_COLOR_IMAGE_PRINT    0x22  /* print selected image (color) */
#define UI_COMMAND_MONO_IMAGE_PRINT     0x23  /* print selected image (mono) */
#define UI_COMMAND_IMAGE_INDEX_PRINT    0x24  /* Index printing (color) */

#ifdef UI_ENABLE_COMBO
/* Combo key command */
#define UI_COMMAND_COMBO_LEFT       0x40  /* SELECT-LEFT combo key */
#define UI_COMMAND_COMBO_RIGHT      0x41  /* SELECT-RIGHT combo key */
#define UI_COMMAND_COMBO_MENU       0x42  /* SELECT-MENU combo key */
#endif


/* Sub command of Setting */
#define UI_COMMAND_AUTO_ALIGN_CAR   0x80  /* Do Auto Align Cartridge Job */
#define UI_COMMAND_ALIGN_CARTRIDGE  0x81  /* Do align cartridge job */
#define UI_COMMAND_CLEAN_CARTRIDGE  0x82  /* Do clean cartridge job */
#define UI_COMMAND_SET_ALIGNMENT    0x83  /* Do align value selection */
#define UI_COMMAND_SET_DEFAULT      0x84  /* Do Reset to defautl values */
#define UI_COMMAND_SET_VOPU_MODE    0x85
#define UI_COMMAND_CHANGE_CARTRIDGE 0x90  /* Wait for cartridge changed */

/**************************************************************************/
/*   Panel input key(Scan Code) definitions                               */
/**************************************************************************/
/* wait for UI driver API definition */
#define PANEL_KEY_UNSPECIFY      KYBD_NO_KEY
#define PANEL_KEY_COPIES         0x04  /* NO. of Copies key ID */
#define PANEL_KEY_SCALING        0x05  /* Reduce/Enlarge key ID */
#define PANEL_KEY_SCROLL_PREV    0x01  /* Scroll Previous key ID */
#define PANEL_KEY_SCROLL_NEXT    0x02  /* Scroll Next key ID */
#define PANEL_KEY_SETTING        0x00  /* Setting key ID */
#define PANEL_KEY_MODE           0x0A  /* Mode selection key ID */
#define PANEL_KEY_QUALITY        0x08  /* Copy Quality key ID */
//#define PANEL_KEY_SCAN_TO        0x09  /* Scan to destination key ID */
#define PANEL_KEY_CANCEL         0x0F  /* Calcel Job key ID */
#define PANEL_KEY_BRIGHTNESS     0x06  /* Lighter/Darker key ID */
#define PANEL_KEY_PAPER_TYPE     0x07  /* Paper type key ID */
#define PANEL_KEY_SELECT         0x03  /* Select key ID */
#define PANEL_KEY_COLOR_COPY     0x0D  /* Color Copy key ID */
#define PANEL_KEY_MONO_COPY      0x0C  /* B&W Copy key ID */
#define PANEL_KEY_SCAN           0x0E  /* Scan key ID */
#define PANEL_KEY_POWER          0x10  /* Power On/Off key ID */

/**************************************************************************/
/*   Selection key state definitions                                      */
/**************************************************************************/
#define SELECTION_KEY_NONE       0x00
#define SELECTION_KEY_OK         0x01
#define SELECTION_KEY_CANCEL     0x02 
#define SELECTION_KEY_PREV       0x03
#define SELECTION_KEY_NEXT       0x04
#define SELECTION_KEY_SPECIFY    0x05

// GPR IOCTR ATRANS bit definition 
#define GPR_IOCTR_ATRANS	(0x1<<9)	/* Bit 9                              */

/**************************************************************************/
/*   Internal Device status definitions                                   */
/**************************************************************************/

/* LCD information */
#define LCD_ROW_1                0     /* status row */
#define LCD_ROW_2                1     /* Information row */

#define LCD_COPY_COL             0     /* copy no. column pos. */
#define LCD_SCALING_COL          0 /* scaling factor column pos. */
#define LCD_SETTING_TYPE_COL     0 /* setting type column pos. */

#define LCD_SETTING_ITEM_COL     2 /* setting item column pos. */ 
#define LCD_SETTING_PHOTO_COL    5 /* setting item column pos. */ 
#define LCD_BRIGHTNESS_COL       9 /* brightness info. column pos. */
#define LCD_PAPERTYPE_COL        9 /* paper type info. column pos. */
#define LCD_SCALING_VALUE_COL    0  /* scaling value info. column pos. */
#define LCD_SAVINGMODE_COL       0  /* Save mode info. column pos. */
#define LCD_ALIGN_VALUE_COL      1  /* Alignment info. column pos. */
#define LCD_ALIGN_SET_COL        1  /* alignment set info column pos. */

// DPS information pos
#define LCD_DPS_VALUE_COL        0
#define LCD_PHOTO_IMG_INFO       0
#define LCD_PHOTO_IMG_FILE       7

/* Brightness indicating character pattern definition */
#define UI_FOCUS_CHAR_ID         0x01
#define CHAR_BRIGHTNESS          '\x7c'
#define CHAR_BRIGHTNESS_FOCUS    UI_FOCUS_CHAR_ID

/* Data source/sink name */
#define SRCNAME_ALIGN            "ALIGN"     /* Alignment image device name */
#define SRCNAME_SCANNER          "SCANNER"   /* Scanner device name */

#ifdef    PHOTO_PRINT_WITHOUT_PRINT_ENGINE

  #ifdef    HPC
    #define SNKNAME_PRINTER      "RAWSINK"   // raw print to file
  #else  // NOT HPC
    #define SNKNAME_PRINTER      "TESTSINK"  // print to null device
  #endif // HPC

#else  // NOT PHOTO_PRINT_WITHOUT_PRINT_ENGINE - i.e. normal print environment

  #define SNKNAME_PRINTER      "PRINTER"   // Printer device name

#endif // PHOTO_PRINT_WITHOUT_PRINT_ENGINE


⌨️ 快捷键说明

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