Skip to content

Commit

Permalink
Update printf.rst
Browse files Browse the repository at this point in the history
Clarifies the need for ti/real.h library by including it in the code snippet
  • Loading branch information
aengus126 authored and mateoconlechuga committed Sep 12, 2023
1 parent de8f3ec commit 98c877b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/static/printf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ To disable all other printf functions and use this `sprintf` implementation, add
HAS_PRINTF = NO
If you just need to convert a float to a string, which the OS sprintf does not support, you can utilize the following `float2str` function by including `ti/real.h` instead.
If you just need to convert a float to a string, which the OS sprintf does not support, you can utilize the following `float2str` function instead.

.. code-block:: c
#include <ti/real.h>
void float2str(float value, char *str)
{
real_t tmp_real = os_FloatToReal(value);
Expand Down

0 comments on commit 98c877b

Please sign in to comment.