lcdtask.c
来自「加速度采集器。基于ATMega16L.AVRSTUIDIO4」· C语言 代码 · 共 34 行
C
34 行
//lcdTask.c
#include "lcdTask.h"
#include <iom16v.h>
#include <macros.h>
//interface
extern unsigned short currentImpact;
extern unsigned short impactCounter;
extern unsigned char currentImpactUpdated;
void lcdTask(void)
{
unsigned char lcdImpactUpdated = 0;
unsigned short lcdCurrentImpact;
unsigned short lcdImpactCounter;
//read interface!!!
CLI();
if(currentImpactUpdated&0x01)
{
currentImpactUpdated &= ~0x01;
lcdImpactUpdated = 1;
lcdCurrentImpact = currentImpact;
lcdImpactCounter = impactCounter;
}
SEI();
//Display
if (lcdImpactUpdated)
{
lcdWriteNumber(0,4,4,lcdImpactCounter);
lcdWriteNumber(1,4,4,lcdCurrentImpact);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?