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.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
I am using the MODSERIAL library for my serial communication needs especially for RX interrupts. That seems to be working as expected. I noticed when I use the move method provided by the MODSERIAL library, modserial doesn't clear my char array that is storing the RX serial data after I am through using the data. So I did:
<<code>>memset(pcResponseValue, '\0', sizeof(pcResponseValue)); <</code>>
That seems to work ok; however, I noticed when I set the strlen of the pcREsponseValue char array to a int var then putc to view the results, putc outputs [00] instead of a 0. Why does putc output [00] instead of a 0? When I type text such as hello into my terminal program, putc will output [05]. The 5 seems correct as that number is the amount of characters in the word 'hello'. My code is as follows: