KeyScan.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * @Description:
  3. * @Version: 1.0
  4. * @Author: Ausen
  5. * @Date: 2023-11-29 22:11:54
  6. * @LastEditors: Ausen
  7. * @LastEditTime: 2023-12-12 20:39:50
  8. */
  9. /**************************** (C) COPYRIGHT 2015 Fortiortech shenzhen *****************************
  10. * File Name : KeyScan.h
  11. * Author : Billy Long Fortiortech Market Dept
  12. * Version : V1.0
  13. * Date : 01/07/2015
  14. * Description : This file contains all the common data types used for Motor Control.
  15. ***************************************************************************************************
  16. * All Rights Reserved
  17. **************************************************************************************************/
  18. /* Define to prevent recursive inclusion --------------------------------------------------------*/
  19. #ifndef __KEYSCAN_H_
  20. #define __KEYSCAN_H_
  21. #define SW3 GP33
  22. #define SW1 GP33
  23. #define SW2 GP26
  24. /* Exported types -------------------------------------------------------------------------------*/
  25. typedef struct
  26. {
  27. uint8 Key1Value;
  28. uint8 Key2Value;
  29. uint8 Key3Value;
  30. uint16 Key1PressCnt;
  31. uint16 Key2PressCnt;
  32. uint16 Key2PressCnt2;
  33. uint16 Key3PressCnt;
  34. uint16 Key3releaseCnt;
  35. uint16 KeyADCValue;
  36. uint8 KeyValuetotal;
  37. uint8 OldKeyValuetotal;
  38. uint8 ChangeKeyFlg;
  39. uint8 TwoCarrierCnt;
  40. uint8 ColdHotFlag;
  41. uint16 ONOFFCNT;
  42. uint8 ONOFFFlag;
  43. } KeyScanParam_TypeDef;
  44. /* Exported variables ---------------------------------------------------------------------------*/
  45. extern KeyScanParam_TypeDef xdata KS;
  46. /* Exported functions ---------------------------------------------------------------------------*/
  47. extern void KeyInit(void);
  48. extern int KeyValue(void);
  49. extern int KeyValue1(void);
  50. extern void KeyScan(void);
  51. #endif