Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Should SPI attachInterrupt() and detachInterrupt() be removed? #183

Copy link
Copy link
Open
@carlosperate

Description

@carlosperate
Issue body actions

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:

When are these methods meant to be used by Arduino users or ArduinoCore developers?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.