sys_event.c

来自「小区巡检系统,MSPF437,里面主要参考的内容为TI单片机的低功耗处理,仅供参」· C语言 代码 · 共 58 行

C
58
字号
#include "sys_event.h"
#include "pub_func.h"
#include "sys_time.h"
#include "protocol.h"
#include "sys_card.h"
#include "key.h"
#include "uart.h"
#include "indication.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();
}

/* read station
*/
void _on_card(void)
{
    card_proc();
}

/* routine job on seconds
*/
void _on_seconds(void)
{
    second_up();
}

/* key down
*/
void _on_key_down(void)
{
    key_down_detect();
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?