fix for two-byte enhanced transfer polling, fix unnecessary buffer allocation, fix skip for invalid protocol bytes

This commit is contained in:
john30
2020-01-25 19:44:41 +01:00
parent b8658f8f2c
commit a82ef6631f
2 changed files with 60 additions and 49 deletions
+2 -1
View File
@@ -199,9 +199,10 @@ class Device {
* @param value the reference in which the read byte value is stored.
* @param isAvailable the result of the immediately preceding call to @a available().
* @param arbitrationState the variable in which to store the received arbitration state (mandatory for enhanced proto).
* @param incomplete the variable in which to store when a partial transfer needs another poll.
* @return true on success, false on error.
*/
virtual bool read(symbol_t* value, bool isAvailable, ArbitrationState* arbitrationState=nullptr);
virtual bool read(symbol_t* value, bool isAvailable, ArbitrationState* arbitrationState=nullptr, bool* incomplete=nullptr);
/** the device name (e.g. "/dev/ttyUSB0" for serial, "127.0.0.1:1234" for network). */
const char* m_name;