Skip to content

macro digitalPinToTimer(P) breaks on DUE #1833

Closed
@bperrybap

Description

@bperrybap

The macro digitalPinToTimer(P) is supposed to report whether the pin
supports PWM.

This allows doing something like this:

  // Check if the pin is associated to a timer, i.e. PWM
  // ---------------------------------------------------
  if(digitalPinToTimer(_backlightPin) != NOT_ON_TIMER)

The macro in DUE not only doesn't work but is improperly defined:

# define digitalPinToTimer(P)       (  )

This creates a compile error on DUE code.
This needs to be updated and corrected to work correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Architecture: SAMApplies only to the SAM microcontrollers (Due)Component: CoreRelated to the code for the standard Arduino APIType: Bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions