软件
Orange_study
这个作者很懒,什么都没留下…
展开
-
码字经验积累(持续更新)
1:if,else,for,while等语句始终使用大括号即使只有一句话 2:尽量使用const关键字来修饰不会变改变的变量 3:尽量使用static关键字 4:尽量使用volatile关键字 5:完成后不要注释代码,可直接提交到版本库 6:使用固定的变量类型,如int8 uint8 int16 uint16等来代替char int short long 型 7:尽量每天结束工作前review更改过的代码 ...原创 2021-10-27 15:20:59 · 164 阅读 · 0 评论 -
attribute学习
__attribute__可以设置函数属性(Function Attribute)、变量属性(Variable Attribute)和类型属性(Type Attribute) #define Caldata __attribute__ ((section(".romdata"),aligned(1))) 将变量归于连接器文件的".romdata"段,并且1个字节对齐格式。后续用Caldata定义的变量均映射在连接文件的.romdata地址范围内 ...原创 2021-10-14 20:58:29 · 96 阅读 · 0 评论