We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 86e0bbc commit 835387eCopy full SHA for 835387e
cores/arduino/stm32/twi.c
@@ -539,7 +539,7 @@ void HAL_I2C_ListenCpltCallback(I2C_HandleTypeDef *hi2c)
539
540
if((obj->i2c_onSlaveReceive != NULL) &&
541
(obj->slaveMode == SLAVE_MODE_RECEIVE)) {
542
- nbData = I2C_TXRX_BUFFER_SIZE - obj->handle.XferCount;
+ nbData = I2C_TXRX_BUFFER_SIZE - obj->handle.XferSize;
543
if(nbData != 0) {
544
obj->i2c_onSlaveReceive(obj->i2cTxRxBuffer, nbData);
545
}
0 commit comments