Closed squintz closed 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.
Why not
#define LED_BUILTIN PIN_LED1
...?
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 .
The build was successful, and can be seen at http://chipkitjenkins.wayneandlayne.com/job/chipKIT-core%20PR%20Builder/168/.
This is the same at #235 and #276. Also, #235 talks about changes to SPI.
Jacob
squintz, I think Matt's idea of adding just one
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.
The build was successful, and can be seen at http://chipkitjenkins.wayneandlayne.com/job/chipKIT-core%20PR%20Builder/169/.
The build was successful, and can be seen at http://chipkitjenkins.wayneandlayne.com/job/chipKIT-core%20PR%20Builder/170/.
squintz, I think Matt's idea of adding just one
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.
I don't think he can hear you above the noise of the commits.
Oops, sorry! I was in the middle of changing it while you guys were replying. I can change it to PIN_LED1
The build was successful, and can be seen at http://chipkitjenkins.wayneandlayne.com/job/chipKIT-core%20PR%20Builder/171/.
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.
The build was successful, and can be seen at http://chipkitjenkins.wayneandlayne.com/job/chipKIT-core%20PR%20Builder/172/.
The build was successful, and can be seen at http://chipkitjenkins.wayneandlayne.com/job/chipKIT-core%20PR%20Builder/173/.
The build was successful, and can be seen at http://chipkitjenkins.wayneandlayne.com/job/chipKIT-core%20PR%20Builder/174/.
The build was successful, and can be seen at http://chipkitjenkins.wayneandlayne.com/job/chipKIT-core%20PR%20Builder/175/.
pins_arduino.h?
The build was successful, and can be seen at http://chipkitjenkins.wayneandlayne.com/job/chipKIT-core%20PR%20Builder/176/.
Makes sense to me. I'll close this pull request and pretend it never happened.
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.