Callbacks for Serial data

I can see that there is a mechanism to attach interrupt handlers to GPIO pin events.

Is there any way to attach a callback to the Serial Rx and Tx mechanisms? It’s sometimes really useful to be able to deal with small details using such a handler rather than breaking up the main thread logic with polling all the things that might have happened along the way.

In other environments I have used handlers that are called by the low level hidden system routines after they have dealt with the UART interrupt and managed the circular buffering.

I hope that this is possible using the BinaryMode registerHandler() function, but I’m not quite sure of the usage. Is there an example around?

Hi Mark,

At the moment there is no option for a Serial Rx/Tx callback. I will forward this to our R&D team.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.