芯片解密,芯片破解,IC解密,单片机解密,MCU解密,STM解密

飞芯科技提供芯片解密,芯片破解,IC解密,单片机解密,MCU解密,STM解密逆向服务

软件开发HC32L136额温枪方案包括BOM,SCH.PCB.源码

软件开发单片机源程序如下:

  1. /******************************************************************************/
  2. /** \file main.c
  3. **
  4. ** A detailed description is available at
  5. ** @link Sample Group Some description @endlink
  6. **
  7. **   - 2017-05-28 LiuHL    First Version
  8. **
  9. ******************************************************************************/

  10. /******************************************************************************
  11. * Include files
  12. ******************************************************************************/
  13. #include "adc.h"
  14. #include "gpio.h"
  15. #include "bgr.h"
  16. #include "lcd.h"
  17. #include "lvd.h"
  18. #include "app_lcd.h"
  19. #include "app_gpio.h"
  20. #include "app_adc.h"
  21. #include "app.h"

  22. /******************************************************************************
  23. * Local pre-processor symbols/macros ('#define')                           
  24. ******************************************************************************/
  25. #define USERKEYTRUE     (0xFFFFFFFFu)
  26. #define USERKEYFALSE    (0x00000000u)

  27. #define LCDCHAR__       (0xFFFFu)

  28. #define CHARGEEMPTY     (0x00000000u)
  29. #define CHARGEFULL      (0xFFFFFFFFu)

  30. /******************************************************************************
  31. * Global variable definitions (declared in header file with 'extern')
  32. ******************************************************************************/
  33. volatile uint32_t gu32AdcRestult = 0;
  34. volatile uint32_t gu32UserKeyFlag[4] = {USERKEYFALSE, USERKEYFALSE, USERKEYFALSE, USERKEYFALSE};
  35. volatile stc_lcd_display_cfg_t gstcLcdDisplayCfg = {0};
  36. volatile uint32_t gVolFlag = CHARGEFULL;

  37. /******************************************************************************
  38. * Local type definitions ('typedef')                                         
  39. ******************************************************************************/
  40. typedef enum enMState
  41. {
  42.     InitialMode     = 0u,
  43.     TempMeasureMode = 1u,
  44.     TempShowMode    = 2u,
  45.     PowerOffMode    = 3u,
  46.     MemoryMode      = 4u,
  47.    
  48. }enMState_t;
  49. /******************************************************************************
  50. * Local function prototypes ('static')
  51. ******************************************************************************/

  52. /******************************************************************************
  53. * Local variable definitions ('static')                                      *
  54. ******************************************************************************/
  55. /*****************************************************************************
  56. * Function implementation - global ('extern') and local ('static')
  57. ******************************************************************************/


  58. /**
  59. ******************************************************************************
  60. ** \brief  Main function of project
  61. **
  62. ** \return uint32_t return value, if needed
  63. **
  64. ** This sample
  65. **
  66. ******************************************************************************/
  67. int32_t main(void)
  68. {   
  69.     volatile enMState_t enMState = InitialMode;
  70.     uint32_t u32AdcResultTmp, u32NtcIndex;
  71.    
  72.     ///< GPIO 初始化
  73.     AppMGpioInit();
  74.    
  75.     ///< ADC 模块初始化
  76.     AppMAdcInit();
  77.    
  78.     ///< LCD 模块初始化
  79.     AppLcdInit();
  80.    
  81.     ///< 电量监测模块初始化
  82.     AppVolMonitorInit();
  83.    
  84.    
  85.     // 初次上电开机LCD全屏显示闪烁两次
  86.     {
  87.         AppLcdShowAll();
  88.         delay1ms(400);
  89.         AppLcdClearAll();
  90.         delay1ms(400);
  91.         AppLcdShowAll();
  92.         delay1ms(400);
  93.         AppLcdClearAll();
  94.         delay1ms(400);
  95.         AppLcdShowAll();
  96.     }
  97.    
  98.     while(1)
  99.     {   
  100.         switch(enMState)
  101.         {
  102.             case InitialMode:
  103.             {
  104.                 // LCD 初始状态显示
  105.                 gstcLcdDisplayCfg.bM6En     = FALSE;
  106.                 gstcLcdDisplayCfg.bM5En     = TRUE;
  107.                 gstcLcdDisplayCfg.bM2En     = FALSE;
  108.                 gstcLcdDisplayCfg.bM7En     = TRUE;
  109.                 gstcLcdDisplayCfg.bM8En     = TRUE;
  110.                 gstcLcdDisplayCfg.bM9En     = FALSE;
  111.                 gstcLcdDisplayCfg.bM10En    = FALSE;
  112.                 gstcLcdDisplayCfg.bM11En    = TRUE;
  113.                 gstcLcdDisplayCfg.bM3En     = FALSE;
  114.                 gstcLcdDisplayCfg.enTmpMode = Char__;
  115.                 gstcLcdDisplayCfg.u16Num    = LCDCHAR__;
  116.             }
  117.             
  118.             {
  119.                 if(USERKEYTRUE == gu32UserKeyFlag[2])
  120.                 {
  121.                     //……
  122.                     //(进入温度测量)
  123.                     gu32UserKeyFlag[0] = USERKEYFALSE;
  124.                     gu32UserKeyFlag[1] = USERKEYFALSE;
  125.                     gu32UserKeyFlag[2] = USERKEYFALSE;
  126.                     gu32UserKeyFlag[3] = USERKEYFALSE;
  127.                     
  128.                 }
  129.                 else if (USERKEYTRUE == gu32UserKeyFlag[2])
  130.                 {
  131.                     //……
  132.                     gu32UserKeyFlag[0] = USERKEYFALSE;
  133.                     gu32UserKeyFlag[1] = USERKEYFALSE;
  134.                     gu32UserKeyFlag[2] = USERKEYFALSE;
  135.                     gu32UserKeyFlag[3] = USERKEYFALSE;
  136.                     
  137.                     enMState = TempMeasureMode;
  138.                 }
  139.             }   
  140.                



联系方式

地址:石家庄市新华区民族路77号华强广场D座2009
电话:0311-88816616/87087811
手机:13315190088
传真:0311-67901001
联系人:张工
网址:www.taihedz.cn
邮箱:feixindz@163.com
微信:xinpianjiemi
QQ:527263666/568069805

在线客服
热线电话

企业微信