memdev_autodev.c
来自「开发环境:ADS 1.2 目标平台:ARM:S3C44B0 显示屏:tft」· C语言 代码 · 共 263 行 · 第 1/4 页
C
263 行
/********************************************************************* Shape of polygon**********************************************************************/#define MAG 3static const GUI_POINT aNeedle[] = { { MAG * ( 0), MAG * ( 0 + 125)}, { MAG * (-3), MAG * (-15 + 125)}, { MAG * (-3), MAG * (-65 + 125)}, { MAG * ( 3), MAG * (-65 + 125)}, { MAG * ( 3), MAG * (-15 + 125)},};/********************************************************************* Structure containing information for drawing routine*********************************************************************/typedef struct { /* Information about what has to be displayed */ GUI_AUTODEV_INFO AutoDevInfo; /* Polygon data */ GUI_POINT aPoints[7]; float Angle;} PARAM;/********************************************************************* GetAngle*********************************************************************This routine returns the value value to indicate. In a real application,this value would somehow be measured.*/static float GetAngle(int tDiff) { if (tDiff < 15000) { return 225 - 0.006 * tDiff ; } tDiff -= 15000; if (tDiff < 7500) { return 225 - 90 + 0.012 * tDiff ; } tDiff -= 7000; return 225;}/********************************************************************* Drawing routine**********************************************************************/static void Draw(void * p) { PARAM * pParam = (PARAM *)p; /* Fixed background */ if (pParam->AutoDevInfo.DrawFixed) {
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?