Add I2C_MESSAGE_HEADER_LENGTH and use it in i2cSlaveCallback() instead of magic numbers.

This commit is contained in:
László Monda
2017-10-01 21:42:55 +02:00
parent 0ba979a658
commit 4ade25d739
2 changed files with 4 additions and 3 deletions

View File

@@ -4,7 +4,8 @@
// Macros:
#define I2C_MESSAGE_MAX_LENGTH 255
#define I2C_BUFFER_MAX_LENGTH (I2C_MESSAGE_MAX_LENGTH + 3)
#define I2C_MESSAGE_HEADER_LENGTH 3
#define I2C_BUFFER_MAX_LENGTH (I2C_MESSAGE_HEADER_LENGTH + I2C_MESSAGE_MAX_LENGTH)
// Typedefs: