B.Linux

灵魂构造师

导航

2019年10月1日 #

嵌入式开发知识点总结

摘要: offsetof和container_of宏 offsetof宏的作用:计算结构体中某个元素相对结构体首地址的偏移量 container_of宏的作用:知道结构体变量中某个成员的指针,反推这个结构体变量的指针 #include <stdio.h> #define offsetof(type,memb 阅读全文

posted @ 2019-10-01 23:06 B.Linux 阅读(578) 评论(0) 推荐(0) 编辑