摘要: 在循环中使用scanf的注意事项: 如果输入的格式不正确,则在后面的循环中会跳过scanf(),从而变成死循环,或者无法得到想要的结果; 如 #include <stdio.h> int main() { unsigned int year; char flag = 0, m; printf("请输 阅读全文
posted @ 2020-08-15 15:42 阿拉灯神丁0 阅读(434) 评论(0) 推荐(0)
摘要: 一些声明具有external属性 一些声明具有internal属性 阅读全文
posted @ 2020-07-09 11:41 阿拉灯神丁0 阅读(302) 评论(0) 推荐(0)
摘要: 1 struct iomux { 2 volatile unsigned int unnames[23]; 3 volatile unsigned int IOMUXC_SW_MUX_CTL_PAD_GPIO1_IO00; /* offset 0x5c */ 4 volatile unsigned 阅读全文
posted @ 2020-07-07 15:41 阿拉灯神丁0 阅读(392) 评论(0) 推荐(0)
摘要: 读取键值的方式 1、查询方式 2、休眠-唤醒方式 3、poll方式 4、异步通知方式 这几种方式对应的驱动和APP技术分别为: 驱动技术:中断、休眠、唤醒、poll机制 APP开发:阻塞、非阻塞、休眠、poll机制、异步通知 阅读全文
posted @ 2020-07-07 15:33 阿拉灯神丁0 阅读(205) 评论(0) 推荐(0)
摘要: 1、为什么驱动程序中有很多函数前要加上static ? 因为内核中很多函数都是可能重名的,而函数默认为extern形式,所以尽量需要将本文件内使用的函数加上static,防止引用函数时出错。 2、用户空间User space is system memory allocated to running 阅读全文
posted @ 2020-07-06 05:31 阿拉灯神丁0 阅读(147) 评论(0) 推荐(0)