power_key.h 507 B

123456789101112131415161718192021222324
  1. #ifndef __POWER_KEY_H
  2. #define __POWER_KEY_H
  3. #include "stm32f1xx_hal.h"
  4. #define POWER_ON_TIME (uint16_t)1000 //¿ª»úÑÓʱ
  5. #define POWER_OFF_TIME (uint16_t)200 //¹Ø»úÑÓʱ
  6. typedef enum
  7. {
  8. Power_KeyStatus_Init = 0x00,
  9. Power_KeyStatus_OnCheck,
  10. Power_KeyStatus_OnEnd,
  11. Power_KeyStatus_OffCheck,
  12. Power_KeyStatus_Off
  13. }Power_KeyStatus_Struct_t;
  14. extern Power_KeyStatus_Struct_t Power_KeyStatus;
  15. extern uint32_t Power_KeyCheck_TimeDelay;
  16. void Power_Key_Init(void);
  17. void Power_OnOff_Process(void);
  18. #endif