Cosa icon indicating copy to clipboard operation
Cosa copied to clipboard

TWI: Improve asynchronous mode

Open mikaelpatel opened this issue 10 years ago • 1 comments

Current implementation will synchronize with driver on twi.end(). An Event handler is possible but could be a callback to the driver instead which would be responsible for events in asynchronous mode.

The TWI::Driver class would be extended with a new virtual member function on_completion() which is called by the TWI state machine. The default implementation would do an event push if a handler is defined.

mikaelpatel avatar Aug 14 '15 16:08 mikaelpatel

Initial refactoring; see commit https://github.com/mikaelpatel/Cosa/commit/173c3ebaa483d09acefb62df920bc6b064bf4420.

mikaelpatel avatar Aug 14 '15 22:08 mikaelpatel