mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
Communication: I2C: Fix invalid packet logic
This commit is contained in:
committed by
Kyle Schwarz
parent
a5ec9a2d20
commit
895cd0792c
@@ -49,7 +49,7 @@ namespace icsneo
|
|||||||
report(APIEvent::Type::I2CMessageExceedsMaxLength, APIEvent::Severity::Error);
|
report(APIEvent::Type::I2CMessageExceedsMaxLength, APIEvent::Severity::Error);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(message.controlBytes.empty() || message.dataBytes.empty())
|
if(message.controlBytes.empty() && message.dataBytes.empty())
|
||||||
{
|
{
|
||||||
//You'll need to provide a target R/W register in controlBytes
|
//You'll need to provide a target R/W register in controlBytes
|
||||||
//alternatively, you're expecting to read without providing a dataBytes payload
|
//alternatively, you're expecting to read without providing a dataBytes payload
|
||||||
|
|||||||
Reference in New Issue
Block a user