Merge I2C command handler into main #18
@ -53,6 +53,11 @@ void i2c_reset_recv() {
|
|||||||
|
|
||||||
void i2c_write_handler(uint8_t data) {
|
void i2c_write_handler(uint8_t data) {
|
||||||
last_action_write = true;
|
last_action_write = true;
|
||||||
|
|
||||||
|
// Validate that we are not overflowing the buffer
|
||||||
|
if (i2c_recv_len >= I2C_RECV_BUF_SIZE) { return; }
|
||||||
|
|
||||||
|
// Write the data to the receive buffer
|
||||||
i2c_recv[i2c_recv_len] = data;
|
i2c_recv[i2c_recv_len] = data;
|
||||||
i2c_recv_len++;
|
i2c_recv_len++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,7 +42,7 @@
|
|||||||
<targetPluginBoard></targetPluginBoard>
|
<targetPluginBoard></targetPluginBoard>
|
||||||
<platformTool>nEdbgTool</platformTool>
|
<platformTool>nEdbgTool</platformTool>
|
||||||
<languageToolchain>XC8</languageToolchain>
|
<languageToolchain>XC8</languageToolchain>
|
||||||
<languageToolchainVersion>2.45</languageToolchainVersion>
|
<languageToolchainVersion>2.46</languageToolchainVersion>
|
||||||
<platform>2</platform>
|
<platform>2</platform>
|
||||||
</toolsSet>
|
</toolsSet>
|
||||||
<packs>
|
<packs>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user