RefreshMenu.h 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /**
  2. ******************************************************************************
  3. * @file RefreshMenu.h
  4. * @author Vincent
  5. * @version V1.0.0
  6. * @date 23-12-2015
  7. * @brief
  8. ******************************************************************************
  9. * @attention
  10. *
  11. * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
  12. *
  13. * Redistribution and use in source and binary forms, with or without modification,
  14. * are permitted provided that the following conditions are met:
  15. * 1. Redistributions of source code must retain the above copyright notice,
  16. * this list of conditions and the following disclaimer.
  17. * 2. Redistributions in binary form must reproduce the above copyright notice,
  18. * this list of conditions and the following disclaimer in the documentation
  19. * and/or other materials provided with the distribution.
  20. * 3. Neither the name of STMicroelectronics nor the names of its contributors
  21. * may be used to endorse or promote products derived from this software
  22. * without specific prior written permission.
  23. *
  24. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  25. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  26. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  27. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  28. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  29. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  30. * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  31. * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  32. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  33. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  34. *
  35. ******************************************************************************
  36. */
  37. /* Define to prevent recursive inclusion -------------------------------------*/
  38. #ifndef __FREFRESHMENU_H
  39. #define __FREFRESHMENU_H
  40. /* Includes ------------------------------------------------------------------*/
  41. #include "gd32f30x.h"
  42. /* Define to variables declare---------------------------------------------------*/
  43. /* Private variables declare---------------------------------------------------*/
  44. typedef struct
  45. {
  46. _Bool wrenable;
  47. _Bool finished;
  48. uint8_t step;
  49. //uint8_t ackcmd;
  50. uint16_t userCmd;
  51. uint16_t packagecount;
  52. //uint32_t vesionold;
  53. //uint32_t vesionnew;
  54. //uint32_t buff[256];
  55. uint8_t * dataBuff_128B;
  56. uint32_t packageSize;
  57. uint8_t startUpSendCount;
  58. }download_t;
  59. typedef struct
  60. {
  61. _Bool AckEnable;
  62. uint8_t UpdateStatus:2;
  63. uint16_t TimeCounter_Update;
  64. uint16_t TimeCounter_Startup;
  65. uint16_t uwTimeThreshold;
  66. }updatecount_t;
  67. //extern download_t _;
  68. //extern updatecount_t __;
  69. extern download_t downLoad;
  70. extern updatecount_t update;
  71. extern uint8_t flag_FlashWR[];
  72. /*Private function declare---------------------------------------------------*/
  73. void User_Manu_Init(void);
  74. void User_Main_Manu(void);
  75. void Period_Stick(void);
  76. #endif /*__FREFRESHMENU_H */
  77. /*---------------------------- file end -------------------------------------*/