摘要:
我们先来了解些结构体的定义和赋值: 1.结构体一般形式: struct 结构体名 {成员列表}; 2.定义结构体的方式 2.1定义结构体且先不定义结构体变量 struct Book { int num; char name[20]; char sex; int age; float score; c 阅读全文
posted @ 2023-03-01 17:13
seekwhale13
阅读(615)
评论(0)
推荐(0)
摘要:
文件结构如下: 点击查看代码 . ├── bsp │ ├── clk │ │ ├── bsp_clk.c │ │ └── bsp_clk.h │ ├── delay │ │ ├── bsp_delay.c │ │ └── bsp_delay.h │ └── led │ ├── bsp_led.c │ 阅读全文
posted @ 2023-03-01 14:00
seekwhale13
阅读(33)
评论(0)
推荐(0)
摘要:
我们在使用单片机时经常会用到某些某些变量来表示某些状态,例如Led_Flag的1或0表示开与关,我们可以定义一个结构体来进行操作: struct LEDS{ uchar Led_Green; uchar Led_Red; uchar Led_Blue; }leds; 当我们需要控制LED灯开关状态时 阅读全文
posted @ 2023-03-01 13:54
seekwhale13
阅读(237)
评论(0)
推荐(0)

浙公网安备 33010602011771号