@@ -38,8 +38,8 @@ void pinMode(uint8_t pin, PinMode mode)
38
38
if (((pin == PIN_A4 ) || (pin == PIN_A5 )) && (TWI0 .MCTRLA & TWI_ENABLE_bm )) return ;
39
39
40
40
/* Special check for SPI_SS double bonded pin -- no action if SPI is active
41
- (Using Slave Select Disable as indicator of SPI activity) */
42
- if ((pin == 10 ) && (SPI0 .CTRLB & SPI_SSD_bm )) return ;
41
+ (Using SPI Enable bit as indicator of SPI activity) */
42
+ if ((pin == 10 ) && (SPI0 .CTRLA & SPI_ENABLE_bm )) return ;
43
43
44
44
PORT_t * port = digitalPinToPortStruct (pin );
45
45
if (port == NULL ) return ;
@@ -153,8 +153,8 @@ void digitalWrite(uint8_t pin, PinStatus val)
153
153
if (((pin == PIN_A4 ) || (pin == PIN_A5 )) && (TWI0 .MCTRLA & TWI_ENABLE_bm )) return ;
154
154
155
155
/* Special check for SPI_SS double bonded pin -- no action if SPI is active
156
- (Using Slave Select Disable as indicator of SPI activity) */
157
- if ((pin == 10 ) && (SPI0 .CTRLB & SPI_SSD_bm )) return ;
156
+ (Using SPI Enable bit as indicator of SPI activity) */
157
+ if ((pin == 10 ) && (SPI0 .CTRLA & SPI_ENABLE_bm )) return ;
158
158
159
159
/* Turn off PWM if applicable */
160
160
@@ -235,8 +235,8 @@ PinStatus digitalRead(uint8_t pin)
235
235
if (((pin == PIN_A4 ) || (pin == PIN_A5 )) && (TWI0 .MCTRLA & TWI_ENABLE_bm )) return LOW ;
236
236
237
237
/* Special check for SPI_SS double bonded pin -- no action if SPI is active
238
- (Using Slave Select Disable as indicator of SPI activity) */
239
- if ((pin == 10 ) && (SPI0 .CTRLB & SPI_SSD_bm )) return LOW ;
238
+ (Using SPI Enable bit as indicator of SPI activity) */
239
+ if ((pin == 10 ) && (SPI0 .CTRLA & SPI_ENABLE_bm )) return ;
240
240
241
241
// If the pin that support PWM output, we need to turn it off
242
242
// before getting a digital reading.
0 commit comments