📄 sys_event.c
字号:
#include "sys_event.h"
#include "pub_func.h"
#include "sys_time.h"
#include "protocol.h"
#include "uart.h"
#include "measure.h"
#include "i2c.h"
#include "powersupply.h"
_sys_evt_word_t _sys_event;
/* add a new event to word
*/
void _sys_evt_add(int evt)
{
_disable_interrupt();
_sys_event |= evt;
_enable_interrupt();
}
/* del an event
*/
void _sys_evt_del(int evt)
{
_disable_interrupt();
_sys_event &= ~evt;
_enable_interrupt();
}
/* communication
*/
void _on_comm(void)
{
comm_proc();
}
/* routine job on days
*/
void _on_days(void)
{
ZoneAttributeDetect();
}
void _on_hours(void)
{
}
/* routine job on minutes
*/
void _on_minutes(void)
{
ExesAttributeDetect();
VoltageDetect();
if((_sys_time.minutes%5)==0)
{
GetTemperature();
}
}
/* routine job on seconds
*/
void _on_seconds(void)
{
second_up();
}
/* key down
*/
void _on_key_down(void)
{
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -