GD32F103 — 23-数码管
来源: DRG GD-1 开发板例程
源文件: GD32/drg_gd_1_gd32f103c8t6-master/23-数码管/test/APP/main.c
子模块
关键代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#include "LED.h"
#include "tm1640_drive.h"
#include "systick.h"
int main(){
systick_config();
tm1640_init();
while(1){
tm1640_display(0, 0);
tm1640_display(11, 1); //4λϵ23λмð
tm1640_display(2, 2);
tm1640_display(3, 3);
tm1640_display(10, 4); //+10֮ʾʾС
tm1640_display(11, 5);
tm1640_display(12, 6);
tm1640_display(13, 7);
}
}
|