我尝试使用外部 MCU (EFM32) 使 BLE121LR 模块工作。据我所知,这段代码声明了将结构转换为二进制数据,对吗?有人可以解释一下如何为其添加 ARM (EFM32) 支持吗?非常感谢!!
代码:
/* Compability */
#ifndef PACKSTRUCT
#ifdef PACKED
#define PACKSTRUCT(a) a PACKED
#else
/*Default packed configuration*/
#ifdef __GNUC__
#ifdef _WIN32
#define PACKSTRUCT( decl ) decl __attribute__((__packed__,gcc_struct))
#else
#define PACKSTRUCT( decl ) decl __attribute__((__packed__))
#endif
#define ALIGNED __attribute__((aligned(0x4)))
#else //msvc
#define PACKSTRUCT( decl ) __pragma( pack(push, 1) ) decl __pragma( pack(pop) )
#define ALIGNED
#endif
#endif
#endif