C027Interface
Fork of C027Interface by
Diff: C027Interface.cpp
- Revision:
- 16:eaf31bd133f0
- Parent:
- 15:21d4f56eb172
--- a/C027Interface.cpp Tue Apr 26 20:34:29 2016 +0000 +++ b/C027Interface.cpp Thu Feb 02 16:17:35 2017 +0000 @@ -207,6 +207,17 @@ return recv; } +void C027Interface::_run() +{ + while (true) { + _callback(_data); + wait(0.25f); + } +} + void C027Interface::socket_attach(void *handle, void (*callback)(void *), void *data) { + _callback = callback; + _data = data; + _thread.start(this, &C027Interface::_run); }