📄 testcode.c
字号:
/*************************************************************************
*
* Copyright (C) Asic Center. 2001
* All Rights Reserved
*
* Filename : testcode.c
* Function : Some tasks for testing system prototype, such as SHELL, TIMER
* TASK, IDLE TASK, TASK A,B,C, and so on.
* Revision :
* 2001/10/9 Pessia Create this file
*
************************************************************************/
#include <stdio.h>
#include <string.h>
#include <asixwin.h>
#include <kernel\ros33\Ros33.h> //Normally, we do not appreciate including this kernel file.
#include <ppsm.h>
/********************************************************************
* Function testpen()
* param in: void
* param out: void
* description: test pen calibration
********************************************************************/
void testpen(void)
{
MSG msg;
U32 framewnd;
U32 pGC;
U32 areaId;
int i=0;
char tmp[2]="+";
S16 sx = -1, sy = -1, mx = 0, my = 0;
pGC = GetGC();
memset(&msg, 0x0, sizeof(MSG));
framewnd = CreateWindow(WNDCLASS_WIN, NULL, WS_BORDER, 0, 0, \
ASIX_LCD_W, ASIX_LCD_H,0,0,NULL);
SysActiveAreaEnable( &areaId, INPUT_AREA, CONTINUOUS_MODE, 0, 0, ASIX_LCD_W -1, ASIX_LCD_H -1, framewnd );
while(1)
{
ASIXGetMessage(&msg,NULL,0,0);
switch(msg.message)
{
case ASIX_PEN:
GetPosData( msg.data, &mx, &my);
//mx = ((POINT *)&msg.lparam)->x;
//my = ((POINT *)&msg.lparam)->y;
if( mx == -1 || my == -1 )
{
sx = -1;
sy = -1;
break;
}
if( sx == -1 && sy == -1 )
DrawDot( pGC, GPC_BLACK, mx, my, GPC_REPLACE_STYLE );
else
DrawLine( pGC, GPC_BLACK, sx, sy, mx, my, GPC_SOLID_LINE, GPC_REPLACE_STYLE );
sx = mx;
sy = my;
break;
default:
break;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -