42 lines
1.1 KiB
C
42 lines
1.1 KiB
C
|
/*
|
||
|
* @Description:
|
||
|
* @Date: 2021-03-10 10:50:02
|
||
|
* @LastEditors: CK.Zh
|
||
|
* @LastEditTime: 2021-03-10 10:56:12
|
||
|
* @FilePath: \NaviKit_EC_stm32\App\Inc\th_button.h
|
||
|
*/
|
||
|
#ifndef __TH_BUTTON_H__
|
||
|
#define __TH_BUTTON_H__
|
||
|
|
||
|
#include "cmsis_os2.h"
|
||
|
|
||
|
/* Definitions for ButtonDetect */
|
||
|
osThreadId_t ButtonDetectHandle;
|
||
|
const osThreadAttr_t ButtonDetect_attributes;
|
||
|
|
||
|
//Timer
|
||
|
osTimerId_t PwrBtnLongPressTimerHandle;
|
||
|
const osTimerAttr_t PwrBtnLongPressTimer_attributes;
|
||
|
|
||
|
osTimerId_t CustBtnLongPressTimerHandle;
|
||
|
const osTimerAttr_t CustBtnLongPressTimer_attributes;
|
||
|
|
||
|
osTimerId_t PwrBtnShortPressTimerHandle;
|
||
|
const osTimerAttr_t PwrBtnShortPressTimer_attributes;
|
||
|
|
||
|
osTimerId_t CustBtnShortPressTimerHandle;
|
||
|
const osTimerAttr_t CustBtnShortPressTimer_attributes;
|
||
|
|
||
|
osTimerId_t IdleStateHoldTimerHandle;
|
||
|
const osTimerAttr_t IdleStateHoldTimer_attributes;
|
||
|
|
||
|
void StartButtonDetect(void *argument);
|
||
|
|
||
|
//callback
|
||
|
void PwrBtnLongPressTimerCallback(void *argument);
|
||
|
void CustBtnLongPressTimerCallback(void *argument);
|
||
|
void PwrBtnShortPressTimerCallback(void *argument);
|
||
|
void CustBtnShortPressTimerCallback(void *argument);
|
||
|
|
||
|
#endif
|