Skip to content

Leonardo pins_arduino.h defects [imported] #915

Closed
@cmaglie

Description

@cmaglie

This is Issue 915 moved from a Google Code project.
Added by 2012-05-15T21:52:30.000Z by justin.r...@gmail.com.
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Defect, Priority-Medium, Component-ATmega32U4

Original description

What version of the Arduino software are you using? On what operating
system? Which Arduino board are you using?

Arduino 1.0 with an ATmega32u4

Please provide any additional information below.

As sizeof(digital_pin_to_timer_PGM) and sizeof(analog_pin_to_channel_PGM) do not work, getting the number of digital and analog pins requires a macro or constant. The original Arduino "pins_arduino.h" provided NUM_DIGITAL_PINS and NUM_ANALOG_INPUTS, but the Leonardo version does not.

Additionally, the PWM timer mapping does not extend to all digital pins, which can lead to undefined behavior (for D15 or higher).

See #82 for a fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions