archive: homework4 homework2

This commit is contained in:
2025-04-14 13:16:49 +08:00
parent cfaf068677
commit 6fdc758b79
2 changed files with 20 additions and 1 deletions
+3 -1
View File
@@ -18,7 +18,9 @@
}, },
"targets": { "targets": {
"Debug": { "Debug": {
"excludeList": [], "excludeList": [
"src/test1.c"
],
"toolchain": "Keil_C51", "toolchain": "Keil_C51",
"compileConfig": { "compileConfig": {
"options": "null" "options": "null"
+17
View File
@@ -0,0 +1,17 @@
// test2.c
// 点亮数码管段b和c,让数码管显示一个数字1
#include "homework4.h"
void test2()
{
set_38_2SEG();
BUS2B = 0; // turn on segment b
BUS3C = 0; // turn on segment c
while (1) {
}
}
void main()
{
test2();
}