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.
9 years, 12 months ago.
Using the txIsBusy() method
Hi,
I have been using the MODSERIAL library but am struggling to understand the example1.cpp. How do you use the txIsBusy method? I have tried several things but can't seem to get it to work.
Cheers
Alex
Question relating to:
1 Answer
9 years, 12 months ago.
The function should return true when it is sending something and false otherwise. Mainly useful for RS485 networks.
Thank you for your reply. What I was hoping for was some code showing how to use the method. I am new at programming and can't see how to use it.
posted by 23 Nov 2014The question is more what do you want it to do? It might very well not be the function you are looking for.
posted by 23 Nov 2014I'm using the mbed to received data from an RF field probe. The probe sends a huge packet of data at switch on and then once has received a specific command (goes into slave mode) responds upon request. I would like to be sure that all data has been correctly received from the probe before sending it another command. The example1.cpp code alludes to the fact that although the code has finished sending not all data has been received. I think the better method would be to probe the RXbuffer to see if it is empty. If all data has been sent the RX buffer will be empty.
posted by 24 Nov 2014I think you will need something like a TimeOut, where if no new data has been received for a while it should have received everything. Unless it simply finishes with a specific character, in which case you can wait on that one.
For sure TxIsBusy will not be related to received data./
posted by 24 Nov 2014