?? sprite_multitaskingdolphins.c
字號:
/*********************************************************************
* SEGGER MICROCONTROLLER SYSTEME GmbH *
* Solutions for real time microcontroller applications *
**********************************************************************
* *
* (c) 1996 - 2007 SEGGER Microcontroller Systeme GmbH *
* *
* Internet: www.segger.com Support: support@segger.com *
* *
**********************************************************************
** emWin V4.14 - Graphical user interface for embedded applications **
emWin is protected by international copyright laws. Knowledge of the
source code may not be used to write a similar product. This file may
only be used in accordance with a license and should not be re-
distributed in any way. We appreciate your understanding and fairness.
----------------------------------------------------------------------
File : SPRITE_MultiTaskingDolphins.c
Purpose : Demonstrates using sprites in a separate task
----------------------------------------------------------------------
*/
#include <stddef.h>
#include <string.h>
#include "GUI.h"
#include "DIALOG.h"
#include "PROGBAR.h"
#include "LISTVIEW.h"
#ifndef WIN32
#include "RTOS.h" /* Definitions for embOS */
#else
#include "SIM.h" /* Definitions for the Win32 simulation */
#endif
/*********************************************************************
*
* Config check
*
**********************************************************************
*/
#if (GUI_ALLOC_SIZE < 80000)
#error This sample requires more RAM! Please increase GUI_ALLOC_SIZE in GUIConf.h!
#endif
/*********************************************************************
*
* Defines
*
**********************************************************************
*/
#ifndef WIN32
#define CREATE_TASK(pTCB, pName, pFunc, Priority, pStack) OS_CREATETASK(pTCB, pName, pFunc, Priority, pStack)
#define START_MT() OS_Terminate(0)
#else
#define CREATE_TASK(pTCB, pName, pFunc, Priority, pStack) SIM_CreateTask(pName, pFunc)
#define START_MT() SIM_Start()
#endif
#ifndef WIN32
/* Stacks */
static OS_STACKPTR int Stack_0[1200];
static OS_STACKPTR int Stack_1[1800];
static OS_TASK aTCB[2]; /* Task control blocks */
#endif
#define NUM_WIDGETS GUI_COUNTOF(_aID)
/*********************************************************************
*
* Types
*
**********************************************************************
*/
/*********************************************************************
*
* SPRITE
*/
typedef struct {
int xPos; /* X-position of sprite */
int yPos; /* Y-position of sprite */
int dx; /* X-step */
int dy; /* Y-step */
int NumImages; /* Number of images in apImages */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -