Communication: I2C: Fix invalid packet logic

pull/76/merge
Thomas Stoddard 2025-10-02 14:12:15 +00:00 committed by Kyle Schwarz
parent a5ec9a2d20
commit 895cd0792c
1 changed files with 1 additions and 1 deletions

View File

@ -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