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

📄 vnc.c

📁 最新IAR6.4软集成开发环境及破解文件
💻 C
📖 第 1 页 / 共 5 页
字号:
/*
*********************************************************************************************************
*                                                uC/GUI
*                        Universal graphic software for embedded applications
*
*                       (c) Copyright 2002, Micrium Inc., Weston, FL
*                       (c) Copyright 2002, SEGGER Microcontroller Systeme GmbH
*
*              礐/GUI 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 redistributed
*              in any way. We appreciate your understanding and fairness.
*
----------------------------------------------------------------------
File        : VNC.c
Purpose     : Shows how to use the VNC support with a house control demo
---------------------------END-OF-HEADER------------------------------
*/

#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "GUI.h"
#include "GUI_VNC.h"
#include "FRAMEWIN.h"
#include "MULTIPAGE.h"

static void _cbWinAlert(WM_MESSAGE* pMsg);

typedef void SERIAL_Callback(const char* pStr, int v1, int v2);

/*********************************************************************
*
*       defines and statics for serial interface
*       (defined for target hardware only)
*
**********************************************************************
*/
#ifndef WIN32
  #include "RTOS.h"

  /*********************************************************************
  *
  *       defines
  */
  #define EOL            13   /* sign marking end of line */
  #define BUFFER_SIZE   512   /* size of receive buffer */
  #define STRING_SIZE    32   /* size of string buffer */

  /*********************************************************************
  *
  *       structures
  */
  typedef struct {
    OS_U8* pDataEnd;
    OS_U8* pWrite;
    OS_U8* pRead;
    U16    Size;
  } BUFFER;

  /*********************************************************************
  *
  *       static data
  */
  static SERIAL_Callback* _pfcbReceiveCommand;

  /* buffer to hold string */
  static char   _acString[STRING_SIZE + 2];
  static char*  _pString = _acString;

  /* buffer for receiving */
  static OS_U8  _Buffer[BUFFER_SIZE];
  static BUFFER _RxBuffer = {_Buffer + BUFFER_SIZE, _Buffer, _Buffer, BUFFER_SIZE};
#endif  /* #ifndef WIN32 */

/*********************************************************************
*
*       defines
*
**********************************************************************
*/

#define PI2 6.2831853f

#define RPM  10
#define UPS 100

#define ARRAY(aItems) aItems, GUI_COUNTOF(aItems)

/*********************************************************************
*
*       structures
*
**********************************************************************
*/

typedef struct {
  I16 XCenter;
  I16 YCenter;
  I16 XSize;
  I16 YSize;
} LOGO;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -