2017年11月23日

注意字符串的strlen与sizeof的差别

摘要: unsigned char AT_RESET[]="r\r\n"; printf("strlen=%d sizeof=%d\n",strlen(AT_RESET),sizeof(AT_RESET)); 结果:strlen=3 sizeof=4 阅读全文

posted @ 2017-11-23 18:54 xihong 阅读(163) 评论(0) 推荐(0) 编辑

嵌入式串口传送汉字乱码

摘要: arm3358开发板与其他自带单片机的裸机进行串口通信,开发板发送汉字时出现乱码。 问题出在数据定义上: //unsigned char AT_SCREENOUT[]="sthis is test 1234\r\n"; 1、//unsigned char AT_SCREENOUT[]="s测试123 阅读全文

posted @ 2017-11-23 18:48 xihong 阅读(350) 评论(0) 推荐(0) 编辑

导航