Add i2c_message_t and use it all across the codebase. This will allow handling variable-length I2C messages and validation with minimal effort. The test LED and brightness PWM update features got temporarily broken and will fix them soon.

This commit is contained in:
László Monda
2017-09-25 03:03:14 +02:00
parent ef9d9ee9a7
commit b88c6e4291
11 changed files with 93 additions and 60 deletions

View File

@@ -4,6 +4,7 @@
// Includes:
#include "fsl_i2c.h"
#include "slave_protocol.h"
// Macros:
@@ -45,5 +46,7 @@
status_t I2cAsyncWrite(uint8_t i2cAddress, uint8_t *data, size_t dataSize);
status_t I2cAsyncRead(uint8_t i2cAddress, uint8_t *data, size_t dataSize);
status_t I2cAsyncWriteMessage(uint8_t i2cAddress, i2c_message_t *message);
status_t I2cAsyncReadMessage(uint8_t i2cAddress, i2c_message_t *message);
#endif