chipKIT32 / chipKIT-core

Downloadable chipKIT core for use with Arduino 1.6 - 1.8+ IDE, PlatformIO, and UECIDE
http://chipkit.net/
Apache License 2.0
59 stars 53 forks source link

Added LED_BUILTIN to Board_Defs.h #283

Closed squintz closed 8 years ago

squintz commented 8 years ago

The Arduino project has added LED_BUILTIN to their official list of Constants. See https://www.arduino.cc/en/Reference/Constants

They have also updated their examples to use LED_BUILTIN which means it must be defined in variants of Board_Defs.h in order to compile some of their examples. This will likely be an issue in most chipKIT variants.

EmbeddedMan commented 8 years ago

Unfortunately this needs to be done on a per-board basis, as many boards do not have pin 13 connected to an LED. (Thus the reason Arduino went to a constant rather than using "13", because many of their boards don't have it on 13 anymore either.) Each board's variant file will need to get this define.

majenkotech commented 8 years ago

Why not

#define LED_BUILTIN PIN_LED1

...?

EmbeddedMan commented 8 years ago

Ahhh! Yes, that would work well I think.

*Brian

On Fri, Oct 28, 2016 at 3:30 PM, Majenko Technologies < notifications@github.com> wrote:

Why not

define PIN_LEDBUILTIN PIN_LED1

...?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/chipKIT32/chipKIT-core/pull/283#issuecomment-257020605, or mute the thread https://github.com/notifications/unsubscribe-auth/AAbeCHsgvC7DsbYSiGRwvN72q9FHeADGks5q4ltPgaJpZM4Kj05a .

chipkitbot commented 8 years ago

The build was successful, and can be seen at http://chipkitjenkins.wayneandlayne.com/job/chipKIT-core%20PR%20Builder/168/.

JacobChrist commented 8 years ago

This is the same at #235 and #276. Also, #235 talks about changes to SPI.

Jacob

EmbeddedMan commented 8 years ago

squintz, I think Matt's idea of adding just one

define LED_BUILTIN PIN_LED1

in one common place (which will work because every board's variant file will already have PIN_LED1 defined appropriately) may be a better way to go than adding this to every variant file.

chipkitbot commented 8 years ago

The build was successful, and can be seen at http://chipkitjenkins.wayneandlayne.com/job/chipKIT-core%20PR%20Builder/169/.

chipkitbot commented 8 years ago

The build was successful, and can be seen at http://chipkitjenkins.wayneandlayne.com/job/chipKIT-core%20PR%20Builder/170/.

JacobChrist commented 8 years ago

squintz, I think Matt's idea of adding just one

define LED_BUILTIN PIN_LED1

in one common place (which will work because every board's variant file will already have PIN_LED1 defined appropriately) may be a better way to go than adding this to every variant file.

majenkotech commented 8 years ago

I don't think he can hear you above the noise of the commits.

squintz commented 8 years ago

Oops, sorry! I was in the middle of changing it while you guys were replying. I can change it to PIN_LED1

chipkitbot commented 8 years ago

The build was successful, and can be seen at http://chipkitjenkins.wayneandlayne.com/job/chipKIT-core%20PR%20Builder/171/.

squintz commented 8 years ago

So before I go making the changes again... where would the one common place be that #define LED_BUILTIN PIN_LED1 should go? It only took a couple minutes to add it to each board file so it should only take a few minutes to undo what I did.

chipkitbot commented 8 years ago

The build was successful, and can be seen at http://chipkitjenkins.wayneandlayne.com/job/chipKIT-core%20PR%20Builder/172/.

chipkitbot commented 8 years ago

The build was successful, and can be seen at http://chipkitjenkins.wayneandlayne.com/job/chipKIT-core%20PR%20Builder/173/.

chipkitbot commented 8 years ago

The build was successful, and can be seen at http://chipkitjenkins.wayneandlayne.com/job/chipKIT-core%20PR%20Builder/174/.

chipkitbot commented 8 years ago

The build was successful, and can be seen at http://chipkitjenkins.wayneandlayne.com/job/chipKIT-core%20PR%20Builder/175/.

JacobChrist commented 8 years ago

pins_arduino.h?

chipkitbot commented 8 years ago

The build was successful, and can be seen at http://chipkitjenkins.wayneandlayne.com/job/chipKIT-core%20PR%20Builder/176/.

squintz commented 8 years ago

Makes sense to me. I'll close this pull request and pretend it never happened.