Open
Description
It looks like these methos are only used in the AVR ports, and even then they indicate that they should not be used.
ArduinoCore-avr/libraries/SPI/src/SPI.h#L306-L310
ArduinoCore-megaavr/libraries/SPI/src/SPI.h#L183-L187
// These undocumented functions should not be used. SPI.transfer()
// polls the hardware flag which is automatically cleared as the
// AVR responds to SPI's interrupt
inline static void attachInterrupt() { SPCR |= _BV(SPIE); }
inline static void detachInterrupt() { SPCR &= ~_BV(SPIE); }
Other cores do nothing or even do not implement it:
- ArduinoCore-samd/libraries/SPI/SPI.cpp#L267-L273
- ArduinoCore-mbed/libraries/SPI/SPI.cpp#L90-L96
- ArduinoCore-arc32/libraries/SPI/src/SPI.h
- ArduinoCore-sam/libraries/SPI/src/SPI.cpp
When are these methods meant to be used by Arduino users or ArduinoCore developers?