使用C99 变长数组和和零长数组特性封装协议回复消息
摘要:背景:主从机交互协议中,需要针对不同控制字封装回复消息接口。本文使用变长数组特性和零长数组特性对这类接口进行统一封装。 1 #pragma pack(1) 2 typedef struct { 3 uint8_t magic; 4 uint8_t len_H; 5 uint8_t len_L; //
阅读全文
posted @
2024-07-30 14:22
TheShore
阅读(5)
推荐(0) 编辑
《ARM® Compiler Software Development Guide v5.06》随笔
摘要:1. AMR初始化过程 2. 硬件初始化(RT-Thread中使用此方式执行初始化流程)
阅读全文
posted @
2024-07-04 15:51
TheShore
阅读(34)
推荐(0) 编辑