久久久久久久999_99精品久久精品一区二区爱城_成人欧美一区二区三区在线播放_国产精品日本一区二区不卡视频_国产午夜视频_欧美精品在线观看免费

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 2635|回復: 0
打印 上一主題 下一主題
收起左側

WashingMachine_800x480 EMWIN Demo stm32源碼

[復制鏈接]
跳轉到指定樓層
樓主
EMWIN Demo


單片機源程序如下:
  1. /*********************************************************************
  2. *                SEGGER Microcontroller GmbH & Co. KG                *
  3. *        Solutions for real time microcontroller applications        *
  4. **********************************************************************
  5. *                                                                    *
  6. *        (c) 1996 - 2017  SEGGER Microcontroller GmbH & Co. KG       *
  7. *                                                                    *
  8. *                                                                    *
  9. **********************************************************************

  10. ** emWin V5.42 - Graphical user interface for embedded applications **
  11. emWin is protected by international copyright laws.   Knowledge of the
  12. source code may not be used to write a similar product.  This file may
  13. only  be used  in accordance  with  a license  and should  not be  re-
  14. distributed in any way. We appreciate your understanding and fairness.
  15. ----------------------------------------------------------------------
  16. File        : MainTask_WashingMachine.c
  17. Purpose     : Multilayer-WashingMachine-Demo 800x480
  18. ---------------------------END-OF-HEADER------------------------------
  19. */

  20. #include "LCDConf.h"

  21. #include "WM.h"
  22. #include "DIALOG.h"
  23. #include "Resource.h"

  24. #include "stdio.h"

  25. /*********************************************************************
  26. *
  27. *       Configuration
  28. *
  29. * Set this define to one if using a configuration for softlayer.
  30. *
  31. **********************************************************************
  32. */
  33. #define USE_SOFTLAYER  0

  34. /*********************************************************************
  35. *
  36. *       Defines
  37. *
  38. **********************************************************************
  39. */
  40. #define IMAGE_FRAME_Y   6  // y-frame within bmBar_776x173
  41. #define IMAGE_SIZE_Y  157  // y-size (opaque part) within bmBar_776x173

  42. #define LAYER_BACKGROUND 0
  43. #define LAYER_SLIDER     1
  44. #define LAYER_BAR        2
  45. #define LAYER_START      3

  46. #define PERIOD_FADE  150
  47. #define PERIOD_STAY 3000
  48. #define PERIOD_ANIM  250
  49. #define PERIOD_SNAP  150

  50. #define INDEX_PROGRAM     0
  51. #define INDEX_HOUR        4
  52. #define INDEX_MINUTE      5

  53. #define FONT_DURATION &GUI_Font23SL_AA4
  54. #define FONT_LABEL    &GUI_Font27SL_AA4
  55. #define FONT_SCROLLW  &GUI_Font32SL_AA4
  56. #define FONT_MAG      &GUI_Font39SL_AA4
  57. #define FONT_MAG_TIME &GUI_Font60SL_AA4
  58. #define FONT_START    &GUI_Font39SL_AA4

  59. #define MARGIN_LEFT      16
  60. #define MARGIN_LEFT_MAG   8
  61. #define YPOS_LABEL       10
  62. #define YPOS_DURATION   110

  63. #define ANIM_START_LAYER_DIST 110

  64. #define COLOR_GREEN  0x0014b6a9
  65. #define COLOR_BLUE   0x00623700
  66. #define COLOR_RED    0x000000ff
  67. #define COLOR_WHITE  0x00F2F2F2

  68. #define ALPHA_ACTIVE 0x10000000
  69. #define ALPHA_BAR    0x0D000000

  70. #define APP_SET_INTENS (WM_USER + 0)

  71. /*********************************************************************
  72. *
  73. *       Types
  74. *
  75. **********************************************************************
  76. */
  77. typedef struct {
  78.   //
  79.   // Initialized at the beginning, not changed later on
  80.   //
  81.   int Index;                   // Index # of parameters
  82.   int Start;                   // Initially selected value
  83.   int n;                       // Number of items
  84.   int xPos;                    // X-position of window
  85.   int xSize;                   // X-size of window
  86.   const char ** apTextSingle;  // Single line text for scroll window
  87.   const char ** apTextDouble;  // Optional double line text for bar
  88.   const char * pLabel;         // Label
  89.   //
  90.   // Dynamically calculated values
  91.   //
  92.   int yPos;    // Value changed by motion support
  93.   int Active;  // If set to 1 labels should not be drawn
  94.   //
  95.   // Used in animation...
  96.   //
  97.   int PosStart;
  98.   int PosDiff;
  99. } PARA;

  100. /*********************************************************************
  101. *
  102. *       Static data
  103. *
  104. **********************************************************************
  105. */
  106. //
  107. // Duration text for different programs
  108. //
  109. static const char * _apDuration[] = { "2h 32min", "1h 45min", "2h 15min", "1h 20min", "1h 10min", "15min" };

  110. //
  111. // Text to be used in slider layer
  112. //
  113. static const char * _apText0_Single[] = { "Eco Wash", "Synthetics", "Cotton", "Wool", "Silk", "Spin" };
  114. static const char * _apText1_Single[] = { "90?", "60?", "40?", "30?", "COLD" };
  115. static const char * _apText2_Single[] = { "1600", "1400", "1200", "800", "400", "none" };
  116. static const char * _apText3_Single[] = { "None",     "Short",    "Extra Spinning",    "Pre-Washing",    "Extra Rinsing",    "Wrinkle Resitance" };
  117. static const char * _apText3_Double[] = { NULL, NULL, NULL, NULL, "Extra", "Spinning", "Pre-","Washing", "Extra", "Rinsing", "Wrinkle", "Resitance" };
  118. static const char * _apText4_Single[] = { "00", "01", "02", "03", "04", "05", "06", "07", "08", "09",
  119.                                           "10", "11", "12", "13", "14", "15", "16", "17", "18", "19",
  120.                                           "20", "21", "22", "23" };
  121. static const char * _apText5_Single[] = { "00", "01", "02", "03", "04", "05", "06", "07", "08", "09",
  122.                                           "10", "11", "12", "13", "14", "15", "16", "17", "18", "19",
  123.                                           "20", "21", "22", "23", "24", "25", "26", "27", "28", "29",
  124.                                           "30", "31", "32", "33", "34", "35", "36", "37", "38", "39",
  125.                                           "40", "41", "42", "43", "44", "45", "46", "47", "48", "49",
  126.                                           "50", "51", "52", "53", "54", "55", "56", "57", "58", "59" };

  127. //
  128. // Bar segment definitions to be shown in slider layer
  129. //
  130. static PARA _aPara[] = {
  131.   { 0,  0, GUI_COUNTOF(_apText0_Single),   5, 165, _apText0_Single, NULL,            "Program"},
  132.   { 1,  3, GUI_COUNTOF(_apText1_Single), 171, 105, _apText1_Single, NULL,            "Temp."},
  133.   { 2,  0, GUI_COUNTOF(_apText2_Single), 277,  90, _apText2_Single, NULL,            "U/min"},
  134.   { 3,  2, GUI_COUNTOF(_apText3_Single), 368, 225, _apText3_Single, _apText3_Double, "Options"},
  135.   { 4, 19, GUI_COUNTOF(_apText4_Single), 594,  75, _apText4_Single, NULL,            "Start"},
  136.   { 5, 15, GUI_COUNTOF(_apText5_Single), 670,  75, _apText5_Single, NULL,            ""}
  137. };
  138. //
  139. // Pointers to be attached to the bar segment windows
  140. //
  141. static PARA * _apPara[GUI_COUNTOF(_aPara)];

  142. //
  143. // Handles of bar segment windows
  144. //
  145. static WM_HWIN _ahWinBarSegment[GUI_COUNTOF(_aPara)];

  146. //
  147. // Image index to be shown in the background
  148. //
  149. static int _IndexImage;

  150. //
  151. // Array of background images
  152. //
  153. static const GUI_BITMAP * _apBitmapBk[] = {
  154.   &bmBkEco_800x480,
  155.   &bmBkSynthetic_800x480,
  156.   &bmBkCotton_800x480,
  157.   &bmBkWoll_800x480,
  158.   &bmBkSilk_800x480,
  159.   &bmBkSpin_800x480,
  160. };

  161. //
  162. // Common...
  163. //
  164. static int     _Fading;
  165. static int     _IndexActive;
  166. static WM_HWIN _hWinActive;

  167. /*********************************************************************
  168. *
  169. *       Static code
  170. *
  171. **********************************************************************
  172. */
  173. /*********************************************************************
  174. *
  175. *       _cbRefresh
  176. */
  177. static int _cbRefresh(int TimeRem, void * pVoid) {
  178.   
  179. ……………………

  180. …………限于本文篇幅 余下代碼請從51黑下載附件…………
復制代碼

所有資料51hei提供下載:
WashingMachine_800x480_SRC.zip (350.93 KB, 下載次數: 19)




評分

參與人數 1黑幣 +50 收起 理由
admin + 50 共享資料的黑幣獎勵!

查看全部評分

分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏 分享淘帖 頂 踩
回復

使用道具 舉報

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規則

手機版|小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術交流QQ群281945664

Powered by 單片機教程網

快速回復 返回頂部 返回列表
主站蜘蛛池模板: 国产99久久精品一区二区永久免费 | 中文字幕精品一区 | 国产成人精品一区二区 | 91五月天 | 日韩精品1区2区3区 爱爱综合网 | 成人午夜精品 | 久久这里只有精品首页 | 99热精品国产 | 91视频三区 | 国产精品一区二区久久 | www.中文字幕.com | 一级一片在线观看 | 国产一级一级毛片 | 在线不卡 | 精品九九九 | av一区在线观看 | 黄色一级大片在线免费看产 | 古典武侠第一页久久777 | 一级片子 | 日韩精品一区二区三区老鸭窝 | 日韩欧美综合在线视频 | 日韩和的一区二在线 | aaaaaaa片毛片免费观看 | 久久激情网 | 精品视频免费在线 | 久久久久久成人 | 国产精品国产精品国产专区不片 | 99精品在线观看 | 2019天天操 | www国产亚洲精品久久网站 | 久久久久久久国产精品视频 | 91av在线免费看 | 中国美女一级黄色片 | 精品久久99| 紧缚调教一区二区三区视频 | 成人在线免费电影 | 亚洲精品播放 | 91视频在线看 | 亚洲国产一区在线 | 日日射影院 | 国产在线精品一区二区三区 |