mrossen Active Member Licensed User Longtime User Dec 19, 2013 #1 Hi, What is the correct use of Serial PurgePort I do: B4X: Serial1.PurgePort(1) But the doc says ex. PURGE_RXCLEAR And there should also be a way to combine the 4 methods Mogens
Hi, What is the correct use of Serial PurgePort I do: B4X: Serial1.PurgePort(1) But the doc says ex. PURGE_RXCLEAR And there should also be a way to combine the 4 methods Mogens
agraham Expert Licensed User Longtime User Dec 19, 2013 #2 mrossen said: But the doc says ex. PURGE_RXCLEAR Click to expand... That is just an integer constant. By the way 1 is PURGE_TXABORT. PURGE_RXCLEAR is actually 8. And there should also be a way to combine the 4 methods Click to expand... Read the comment in the xml. PurgeFlags should be one of the PURGE constants or any combination (with Bit.Or). Click to expand... Actually you could just add them, it's a bit simpler. Upvote 0
mrossen said: But the doc says ex. PURGE_RXCLEAR Click to expand... That is just an integer constant. By the way 1 is PURGE_TXABORT. PURGE_RXCLEAR is actually 8. And there should also be a way to combine the 4 methods Click to expand... Read the comment in the xml. PurgeFlags should be one of the PURGE constants or any combination (with Bit.Or). Click to expand... Actually you could just add them, it's a bit simpler.
mrossen Active Member Licensed User Longtime User Dec 19, 2013 #3 Hi, Thanks for the reply, but where have you found the value for ex. PURGE_RXCLEAR? I have looked in the xml, but cannot see it Mogens Upvote 0
Hi, Thanks for the reply, but where have you found the value for ex. PURGE_RXCLEAR? I have looked in the xml, but cannot see it Mogens
agraham Expert Licensed User Longtime User Dec 19, 2013 #4 I looked at the code with JD-GUI but you can also see it by just doing "Log(ex.PURGE_RXCLEAR)". Upvote 0
mrossen Active Member Licensed User Longtime User Dec 19, 2013 #5 Nice trick, Thank You. I was doing: Log(Serial1.PURGE_RXABORT) Upvote 0