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

📄 sprite_multitaskingdolphins.c

📁 ucgu最新版本 4.14
💻 C
📖 第 1 页 / 共 5 页
字号:
/*********************************************************************
*                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 + -