提交 f3c38e1f 编写于 作者: 饶先宏's avatar 饶先宏

202108211939

上级 6a64d957
......@@ -22,12 +22,25 @@ unsigned int num2seg(unsigned int num)
int main(int argc, char* argv[])
{
unsigned long long count, ctemp;
int countit = 0;
unsigned int* ledkey = (unsigned int*)0xF0000000;
unsigned int* leddata = (unsigned int*)0xf0000010;
count = 0;
leddata[0] = 0x3f3f3f3f;
do {
count++;
unsigned int key;
key = *ledkey;
if (key & 1) {
count = 0;
}
else if (key & 2) {
countit = 0;
}
else if (key & 4) {
countit = 1;
}
if (countit)
count++;
ctemp = count;
leddata[0] = num2seg(ctemp) |
((num2seg(ctemp / 10ll)) << 8) |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册