handle enhanced side data without bus signal as well
This commit is contained in:
@@ -567,6 +567,11 @@ bool Device::read(symbol_t* value, bool isAvailable, ArbitrationState* arbitrati
|
|||||||
#endif
|
#endif
|
||||||
m_bufLen += size;
|
m_bufLen += size;
|
||||||
}
|
}
|
||||||
|
if (m_enhancedProto) {
|
||||||
|
if (handleEnhancedBufferedData(value, arbitrationState)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!available()) {
|
if (!available()) {
|
||||||
if (incomplete) {
|
if (incomplete) {
|
||||||
*incomplete = m_enhancedProto && m_bufLen > 0;
|
*incomplete = m_enhancedProto && m_bufLen > 0;
|
||||||
@@ -579,6 +584,10 @@ bool Device::read(symbol_t* value, bool isAvailable, ArbitrationState* arbitrati
|
|||||||
m_bufLen--;
|
m_bufLen--;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
return handleEnhancedBufferedData(value, arbitrationState);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Device::handleEnhancedBufferedData(symbol_t* value, ArbitrationState* arbitrationState) {
|
||||||
while (m_bufLen > 0) {
|
while (m_bufLen > 0) {
|
||||||
symbol_t ch = m_buffer[m_bufPos];
|
symbol_t ch = m_buffer[m_bufPos];
|
||||||
if (!(ch&ENH_BYTE_FLAG)) {
|
if (!(ch&ENH_BYTE_FLAG)) {
|
||||||
|
|||||||
@@ -301,6 +301,14 @@ class Device {
|
|||||||
bool m_resetRequested;
|
bool m_resetRequested;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
/**
|
||||||
|
* Handle the already buffered enhanced data.
|
||||||
|
* @param value the reference in which the read byte value is stored.
|
||||||
|
* @param arbitrationState the variable in which to store the current/received arbitration state (mandatory for enhanced proto).
|
||||||
|
* @return true if the value was set, false otherwise.
|
||||||
|
*/
|
||||||
|
bool handleEnhancedBufferedData(symbol_t* value, ArbitrationState* arbitrationState);
|
||||||
|
|
||||||
/** the @a DeviceListener, or nullptr. */
|
/** the @a DeviceListener, or nullptr. */
|
||||||
DeviceListener* m_listener;
|
DeviceListener* m_listener;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user