与以前介绍过的函数里面省略号,多参数使用不同,宏定义中使用多参数
测试demo{
#include "stdio.h"
#include "string.h"
#include "stdarg.h"
#define BT_UUID_DECLARE_128(value...) printf("%s\n",#value);
#define OTA_CHA_TX_UUID BT_UUID_DECLARE_128(0xe3,0xea,0x28,0xe1,0xf6,0x9a,0x11,0xe8,\
0x82,0xb3,0xf2,0x80,0x1f,0x1b,0x9f,0xd1)
int main()
{
OTA_CHA_TX_UUID;
return 0;
}
结果就是打印出
0xe3,0xea,0x28,0xe1,0xf6,0x9a,0x11,0xe8,0x82,0xb3,0xf2,0x80,0x1f,0x1b,0x9f,0xd1