I’m trying to use the new uart callback function instead of polling. However I’m struggling to make good use of it, because I cannot pass any context with the callback. I’m also not very familiar with squirrel so I might be missing something.
It seems like I can pass a function defined in a class as callback, but when the callback is called it does not seem to be called in the class instance context, e.g. I cannot add the received data to an instance variable in that object.
Are the callback function only be usable in a global context, which seems to be a pretty limited use case or is there another way to make that work?