This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

how to convert uint8 to string for printf out?

Hi  all 

           i  have got  the  LQI  and Rssi  data , and  i  want  to  using HalUARTWrite() for printf out  those data.

           

      char szLine[50];
      uint8 OutputCnt=0;
      osal_memcpy(szLine, "Rssi=0x",7);  //7
      zclHA_uint8toa( Rssi_temp, &szLine[7] );//3 
      osal_memcpy(&szLine[10], ",LQI=0x", 7); //7 
      zclHA_uint8toa( Rssi_temp, &szLine[17] );//3
      OutputCnt = 20;
      HalUARTWrite(0,szLine,OutputCnt);

        there  is always messy code when  uart printf out ~~~~

        does  anybody knows why ?

BR!