1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-23 12:51:24 +01:00

Update I2CManager_AVR.h

Bug fix in native driver MUX code.
This commit is contained in:
Neil McKechnie 2023-02-07 23:16:37 +00:00
parent 47cb43d1e9
commit 73a7d3e0ca

View File

@ -22,6 +22,7 @@
#include <Arduino.h>
#include "I2CManager.h"
#include "I2CManager_NonBlocking.h" // to satisfy intellisense
#include <avr/io.h>
#include <avr/interrupt.h>
@ -139,9 +140,7 @@ void I2CManagerClass::I2C_handleInterrupt() {
#if defined(I2C_EXTENDED_ADDRESS)
// First process the MUX state machine.
// This does not need to be entered during passthru phase unless the
// application's send and receive have both completed.
if (muxPhase > MuxPhase_OFF && !(muxPhase==MuxPhase_PASSTHRU && (bytesToSend || bytesToReceive))) {
if (muxPhase > MuxPhase_OFF) {
switch (twsr) {
case TWI_MTX_ADR_ACK: // SLA+W has been transmitted and ACK received
if (muxPhase == MuxPhase_PROLOG) {