Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 8 months ago. This question has been closed. Reason: Off Topic
1 Answer
8 years, 8 months ago.
So it is already ascii, but you want to add 0x in front of it? Define a buffer of sufficient length and then simply write a simple loop that adds "0x" at the correct places and copy the values of the input array to the correct location in the output buffer.
Did that ascii start out as a 32 bit int or uint? If so it might be easier to break it into bytes first then a single printf command will do what you want
posted by Oliver Broad 15 May 2016