📄 drv_defs.h
字号:
#define CICOCRSA3 (*(volatile unsigned *)(CAM_BASE + 0x40)) /* Cr 3nd frame start address for codec DMA */
#define CICOCRSA4 (*(volatile unsigned *)(CAM_BASE + 0x44)) /* Cr 4th frame start address for codec DMA */
#define CICOTRGFMT (*(volatile unsigned *)(CAM_BASE + 0x48)) /* Target image format of codec DMA */
#define CICOCTRL (*(volatile unsigned *)(CAM_BASE + 0x4C)) /* Codec DMA control related */
#define CICOSCPRERATIO (*(volatile unsigned *)(CAM_BASE + 0x50)) /* Codec pre-scaler ratio control */
#define CICOSCPREDST (*(volatile unsigned *)(CAM_BASE + 0x54)) /* Codec pre-scaler destination format */
#define CICOSCCTRL (*(volatile unsigned *)(CAM_BASE + 0x58)) /* Codec main-scaler control */
#define CICOTAREA (*(volatile unsigned *)(CAM_BASE + 0x5C)) /* Codec scaler target area */
#define CICOSTATUS (*(volatile unsigned *)(CAM_BASE + 0x64)) /* Codec path status */
#define CIPRCLRSA1 (*(volatile unsigned *)(CAM_BASE + 0x6C)) /* RGB 1st frame start address for preview DMA */
#define CIPRCLRSA2 (*(volatile unsigned *)(CAM_BASE + 0x70)) /* RGB 2nd frame start address for preview DMA */
#define CIPRCLRSA3 (*(volatile unsigned *)(CAM_BASE + 0x74)) /* RGB 3nd frame start address for preview DMA */
#define CIPRCLRSA4 (*(volatile unsigned *)(CAM_BASE + 0x78)) /* RGB 4th frame start address for preview DMA */
#define CIPRTRGFMT (*(volatile unsigned *)(CAM_BASE + 0x7C)) /* Target image format of preview DMA */
#define CIPRCTRL (*(volatile unsigned *)(CAM_BASE + 0x80)) /* Preview DMA control related */
#define CIPRSCPRERATIO (*(volatile unsigned *)(CAM_BASE + 0x84)) /* Preview pre-scaler ratio control */
#define CIPRSCPREDST (*(volatile unsigned *)(CAM_BASE + 0x88)) /* Preview pre-scaler destination format */
#define CIPRSCCTRL (*(volatile unsigned *)(CAM_BASE + 0x8C)) /* Preview main-scaler control */
#define CIPRTAREA (*(volatile unsigned *)(CAM_BASE + 0x90)) /* Preview scaler target area */
#define CIPRSTATUS (*(volatile unsigned *)(CAM_BASE + 0x98)) /* Preview path status */
#define CIIMGCPT (*(volatile unsigned *)(CAM_BASE + 0xA0)) /* Image capture enable command */
/* Camera config define */
/* camera capture resolution define */
typedef enum _CAMERA_CAP_TYPE
{
CAM_VGA = 0, /* 640*480 */
CAM_QVGA, /* 320*240 */
CAM_QQVGA, /* 160*128 */
CAM_QQQVGA /* 80*64 */
} TCAMERA_CAP_TYPE;
/* video display mode */
typedef enum _VIDEO_MODE
{
VIDEO_LOC_RIG_RMT_LEF= 0,
VIDEO_LOC_LIT_RMT_FUL,
VIDEO_LOC_FUL_RMT_LIT,
VIDEO_LOC_FUL_RMT_NON,
VIDEO_LOC_NON_RMT_FUL
} TVIDEO_MODE;
/* video display mode */
typedef enum _LIGHT_MODE
{
LM_LIGHT= 0,
LM_NIGHT
} TLIGHT_MODE;
/* camera config para meter */
typedef struct _CAMERA_CONFIG {
TCAMERA_CAP_TYPE cap_rgb; /*#0x00 resolution of preview RGB data */
TCAMERA_CAP_TYPE cap_yuv; /*#0x01 resolution of codec YUV data */
TCAMERA_CAP_TYPE dis_rgb; /*#0x02 resolution of codec display data */
TLIGHT_MODE light_mode; /*#0x03 light mode */
int pre_x; /*#0x04 preview little windows x position */
int pre_y; /*#0x08 preview little windows y position */
int co_x; /*#0x0C codex little windows x position */
int co_y; /*#0x10 codex little windows y position */
TVIDEO_MODE mode; /*#0x14 display mode */
unsigned short * p_codec; /*#0x18 codec RGB data */
} TCAMERA_CONFIG;
/*-----------------------------------------------------------------------------
PWM TIMER SPECIAL REGISTERS
------------------------------------------------------------------------------*/
#define TIMER_BASE 0x51000000 /* PWM TIMER register base */
#define TCFG0 (*(volatile unsigned *)(TIMER_BASE + 0x00)) /* TIMER CONFIGRRATION REGISTER0*/
#define TCFG1 (*(volatile unsigned *)(TIMER_BASE + 0x04)) /* TIMER CONFIGRRATION REGISTER1*/
#define TCON (*(volatile unsigned *)(TIMER_BASE + 0x08)) /* TIMER CONTROL REGISTER */
#define TCNTB0 (*(volatile unsigned *)(TIMER_BASE + 0x0c)) /* TIMER0 COUNT BUFFER REGISTER */
#define TCMPB0 (*(volatile unsigned *)(TIMER_BASE + 0x10)) /* TIMER0 COUNT COMPARE BUFFER REGISTER */
#define TCNTO0 (*(volatile unsigned *)(TIMER_BASE + 0x14)) /* TIMER0 COUNT OBSERVATION REGISTER */
#define TCNTB1 (*(volatile unsigned *)(TIMER_BASE + 0x18)) /* TIMER1 COUNT BUFFER REGISTER */
#define TCMPB1 (*(volatile unsigned *)(TIMER_BASE + 0x1c)) /* TIMER1 COUNT COMPARE BUFFER REGISTER */
#define TCNTO1 (*(volatile unsigned *)(TIMER_BASE + 0x20)) /* TIMER1 COUNT OBSERVATION REGISTER */
#define TCNTB2 (*(volatile unsigned *)(TIMER_BASE + 0x24)) /* TIMER2 COUNT BUFFER REGISTER */
#define TCMPB2 (*(volatile unsigned *)(TIMER_BASE + 0x28)) /* TIMER2 COUNT COMPARE BUFFER REGISTER */
#define TCNTO2 (*(volatile unsigned *)(TIMER_BASE + 0x2c)) /* TIMER2 COUNT OBSERVATION REGISTER */
#define TCNTB3 (*(volatile unsigned *)(TIMER_BASE + 0x30)) /* TIMER3 COUNT BUFFER REGISTER */
#define TCMPB3 (*(volatile unsigned *)(TIMER_BASE + 0x34)) /* TIMER3 COUNT COMPARE BUFFER REGISTER */
#define TCNTO3 (*(volatile unsigned *)(TIMER_BASE + 0x38)) /* TIMER3 COUNT OBSERVATION REGISTER */
#define TCNTB4 (*(volatile unsigned *)(TIMER_BASE + 0x3c)) /* TIMER4 COUNT BUFFER REGISTER */
#define TCNTO4 (*(volatile unsigned *)(TIMER_BASE + 0x40)) /* TIMER4 COUNT OBSERVATION REGISTER */
/*------------------------------------------------------------------------------
SST flash definition
------------------------------------------------------------------------------*/
#define SST_BASE ((UINT16 *)0x00000000)
#define SST_END ((UINT16 *)0x003FFFFF)
#define SST_SECTOR_SIZE 4096
#define SST_BLOCK_SIZE 65536
#define SST_VENDOR_ID 0x00BF
#define SST_PRODUCT_ID 0x2782
#define SST_LOCKED 0x02
#define SST_ERROR 0x01
#define SST_OK 0x00
#define FLASH_SECTOR_SIZE 0x1000
/*------------------------------------------------------------------------------
KEYBOARD definition
------------------------------------------------------------------------------*/
/*------------- KEYBOARD KEY CODE VALUE DEFINE -----------------*/
#if KEYBOARD_V1
#define KEY_CODE_NUM1 0x0305
#define KEY_CODE_NUM2 0x0304
#define KEY_CODE_NUM3 0x0303
#define KEY_CODE_NUM4 0x0405
#define KEY_CODE_NUM5 0x0404
#define KEY_CODE_NUM6 0x0403
#define KEY_CODE_NUM7 0x0505
#define KEY_CODE_NUM8 0x0504
#define KEY_CODE_NUM9 0x0503
#define KEY_CODE_NUM0 0x0604
#define KEY_CODE_STAR 0x0605
#define KEY_CODE_GATE 0x0603
#define KEY_CODE_REDIAL 0x0402
#define KEY_CODE_FLASH 0x0502
#define KEY_CODE_OK 0x0105
#define KEY_CODE_CANCEL 0x0103
#define KEY_CODE_UP 0x0104
#define KEY_CODE_DOWN 0x0204
#define KEY_CODE_HANDFREE 0x0302
#define KEY_CODE_LEFT 0x0205
#define KEY_CODE_RIGHT 0x0203
#define KEY_CODE_VCALL 0x0301
#define KEY_CODE_MODE 0x0401
#define KEY_CODE_SNAP 0x0501
#define KEY_CODE_VOLG 0x0101
#define KEY_CODE_VOLL 0x0201
#define KEY_CODE_SLOW 0x0102
#define KEY_CODE_QUICK 0x0202
#elif KEYBOARD_V1_1
#define KEY_CODE_OK 0x0101
#define KEY_CODE_UP 0x0201
#define KEY_CODE_CANCEL 0x0301
#define KEY_CODE_NUM1 0x0401
#define KEY_CODE_NUM2 0x0501
#define KEY_CODE_NUM3 0x0601
#define KEY_CODE_LEFT 0x0102
#define KEY_CODE_DOWN 0x0202
#define KEY_CODE_RIGHT 0x0302
#define KEY_CODE_NUM4 0x0402
#define KEY_CODE_NUM5 0x0502
#define KEY_CODE_NUM6 0x0602
#define KEY_CODE_SLOW 0x0103
#define KEY_CODE_QUICK 0x0203
#define KEY_CODE_MODE 0x0303
#define KEY_CODE_NUM7 0x0403
#define KEY_CODE_NUM8 0x0503
#define KEY_CODE_NUM9 0x0603
#define KEY_CODE_VOLL 0x0104
#define KEY_CODE_VOLG 0x0204
#define KEY_CODE_SNAP 0x0304
#define KEY_CODE_STAR 0x0404
#define KEY_CODE_NUM0 0x0504
#define KEY_CODE_GATE 0x0604
#define KEY_CODE_VCALL 0x0305
#define KEY_CODE_FLASH 0x0405
#define KEY_CODE_REDIAL 0x0505
#define KEY_CODE_HANDFREE 0x0605
#elif KEYBOARD_V1_10
#define KEY_CODE_OK 0x0101
#define KEY_CODE_UP 0x0201
#define KEY_CODE_CANCEL 0x0301
#define KEY_CODE_NUM1 0x0401
#define KEY_CODE_NUM2 0x0501
#define KEY_CODE_NUM3 0x0601
#define KEY_CODE_LEFT 0x0102
#define KEY_CODE_DOWN 0x0202
#define KEY_CODE_RIGHT 0x0302
#define KEY_CODE_NUM4 0x0402
#define KEY_CODE_NUM5 0x0502
#define KEY_CODE_NUM6 0x0602
#define KEY_CODE_SLOW 0x0103
#define KEY_CODE_QUICK 0x0203
#define KEY_CODE_MODE 0x0303
#define KEY_CODE_NUM7 0x0403
#define KEY_CODE_NUM8 0x0503
#define KEY_CODE_NUM9 0x0603
#define KEY_CODE_VOLL 0x0104
#define KEY_CODE_VOLG 0x0204
#define KEY_CODE_SNAP 0x0304
#define KEY_CODE_STAR 0x0405 /* 0x0404 */
#define KEY_CODE_NUM0 0x0505 /* 0x0504 */
#define KEY_CODE_GATE 0x0605 /* 0x0604 */
#define KEY_CODE_VCALL 0x0305
#define KEY_CODE_FLASH 0x0404 /* 0x0405 */
#define KEY_CODE_REDIAL 0x0504 /* 0x0505 */
#define KEY_CODE_HANDFREE 0x0604 /* 0x0605 */
#elif KEYBOARD_A200
#define KEY_CODE_STAR 0x0101
#define KEY_CODE_NUM0 0x0201
#define KEY_CODE_GATE 0x0301
#define KEY_CODE_VOLL 0x0401
#define KEY_CODE_VOLG 0x0501
#define KEY_CODE_VCALL 0x0601
#define KEY_CODE_NUM7 0x0102
#define KEY_CODE_NUM8 0x0202
#define KEY_CODE_NUM9 0x0302
#define KEY_CODE_SLOW 0x0402
#define KEY_CODE_QUICK 0x0502
#define KEY_CODE_REDIAL 0x0602
#define KEY_CODE_NUM4 0x0103
#define KEY_CODE_NUM5 0x0203
#define KEY_CODE_NUM6 0x0303
#define KEY_CODE_SNAP 0x0403
#define KEY_CODE_MODE 0x0503
#define KEY_CODE_FLASH 0x0603
#define KEY_CODE_NUM1 0x0104
#define KEY_CODE_NUM2 0x0204
#define KEY_CODE_NUM3 0x0304
#define KEY_CODE_DOWN 0x0404
#define KEY_CODE_RIGHT 0x0504
#define KEY_CODE_HANDFREE 0x0604
#define KEY_CODE_LEFT 0x0105
#define KEY_CODE_UP 0x0405
#define KEY_CODE_CANCEL 0x0505
#define KEY_CODE_OK 0x0106
#define KEY_CODE_F1 0x0206
#define KEY_CODE_F2 0x0306
#define KEY_CODE_F3 0x0406
#define KEY_CODE_IP 0x0506
#endif
#endif /* _DRV_DEFS_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -