How to print a floating type?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to print a floating type?

1,744件の閲覧回数
quanjunzhang
Contributor III

DBG_vPrintf() could only print integers through UART. 

I try printf(), but there was a compilation error.

How can I print floating point types?

Thanks very much!

0 件の賞賛
返信
2 返答(返信)

1,654件の閲覧回数
quanjunzhang
Contributor III

printf1.PNG

Application Notes:JN-AN-1217-Zigbee-3-0-Base-Device

0 件の賞賛
返信

1,654件の閲覧回数
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Zhang,

JN does not support floating point representation. You could handle variable as integer and the application will know that is decimal if you print it.

Regards,

Mario

0 件の賞賛
返信