Communication: I2C: Fix invalid packet logic
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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue