2020-01-28 16:11:46 +00:00
|
|
|
#ifndef _INCLUDE_TRIGGER_FLAGS_H_
|
|
|
|
#define _INCLUDE_TRIGGER_FLAGS_H_
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include "usart.h"
|
|
|
|
#include "keyboard.h"
|
|
|
|
#include "rtc.h"
|
|
|
|
|
|
|
|
typedef union
|
|
|
|
{
|
2021-04-13 15:09:25 +00:00
|
|
|
uint8_t uiByte[2];
|
|
|
|
uint16_t uiKeyCode;
|
2020-01-28 16:11:46 +00:00
|
|
|
}KEY_VALUE;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2021-04-13 15:09:25 +00:00
|
|
|
KEY_VALUE unKeyValue;
|
|
|
|
__IO bool bIsTriggered;
|
|
|
|
__IO bool bHalfRev;
|
2020-01-28 16:11:46 +00:00
|
|
|
}USART_INPUT;
|
|
|
|
|
|
|
|
|
|
|
|
void USARTReceiveProc(USART_INT_REASON eReason, uint8_t uiReceiveData);
|
|
|
|
bool UsartIsReceived(void);
|
|
|
|
uint16_t GetReceivedCode(void);
|
|
|
|
void UsartTriggerReset(void);
|
|
|
|
|
|
|
|
void TimerInterruptProc(void);
|
|
|
|
bool BaseTimerIsTrigger(void);
|
|
|
|
void BaseTimerTriggerReset(void);
|
|
|
|
|
|
|
|
void RTCInterruptProc(uint32_t uiTimeStamp);
|
|
|
|
bool RTCTimerIsTrigger(void);
|
|
|
|
void RTCTimerTriggerReset(void);
|
|
|
|
|
2020-01-30 16:11:38 +00:00
|
|
|
void KeyEventProc(uint16_t uiKeyCode, KEY_EVENT eEvent);
|
|
|
|
|
2020-01-28 16:11:46 +00:00
|
|
|
#endif
|
|
|
|
|