在sdk17中发现NRF_LOG_INFO处理%s格式化输出时存在问题;
NRF_LOG_INFO(“hello world!”);//这个代码可以直接输出
char str[]=“hello world!”;
NRF_LOG_INFO(“%s%d”,str,strlen(str));//这个只能输出%d的内容,%s内容为空
改为NRF_LOG_INFO(“%s%d”,NRF_LOG_PUSH(str),strlen(str));后正常,同时在打印后加延时也有改善;
在sdk17中发现NRF_LOG_INFO处理%s格式化输出时存在问题;
NRF_LOG_INFO(“hello world!”);//这个代码可以直接输出
char str[]=“hello world!”;
NRF_LOG_INFO(“%s%d”,str,strlen(str));//这个只能输出%d的内容,%s内容为空
改为NRF_LOG_INFO(“%s%d”,NRF_LOG_PUSH(str),strlen(str));后正常,同时在打印后加延时也有改善;