Skip to content

Leonardo pins_arduino.h defects [imported] #915

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cmaglie opened this issue Nov 15, 2012 · 1 comment
Closed

Leonardo pins_arduino.h defects [imported] #915

cmaglie opened this issue Nov 15, 2012 · 1 comment

Comments

@cmaglie
Copy link
Member

cmaglie commented Nov 15, 2012

This is Issue 915 moved from a Google Code project.
Added by 2012-05-15T21:52:30.000Z by [email protected].
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.

@cmaglie
Copy link
Member Author

cmaglie commented Nov 30, 2012

I merged it manually, thanks.

oriregev pushed a commit to oriregev/Arduino that referenced this issue Dec 20, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant