We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4950f4f commit 8ed4d1fCopy full SHA for 8ed4d1f
cores/arduino/wiring_analog.c
@@ -125,6 +125,11 @@ void analogWrite(uint8_t pin, int val)
125
/* Special check for SPI_SS double bonded pin -- no action if SPI is active
126
(Using Slave Select Disable as indicator of SPI activity) */
127
if((pin == 10) && (SPI0.CTRLB & SPI_SSD_bm)) return;
128
+
129
+ /* Check if TWI is operating on double bonded pin (Master Enable is high
130
+ in both Master and Slave mode for bus error detection, so this can
131
+ indicate an active state for Wire) */
132
+ if(((pin == PIN_A4) || (pin == PIN_A5)) && (TWI0.MCTRLA & TWI_ENABLE_bm)) return;
133
134
// We need to make sure the PWM output is enabled for those pins
135
// that support it, as we turn it off when digitally reading or
0 commit comments