完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
sprintf
|
|
|
|
double pi = 3.14159265;
#define __SIZEOF_FLOAT__20 char str_of_float[__SIZEOF_FLOAT__]; sprintf(str_of_float, "%fn", pi); R_SCI1_Serial_Send((uint8_t*)str_of_float, 9); //发送9个字节的数据 |
|
|
|
szzjfyp 发表于 2018-7-23 00:22 把R_SCI1_Serial_Send((uint8_t*)str_of_float, 9);放到while里循环打印。打印不出小数点怎么回事,显示小数点被转换成了' |