chipKIT® Development Platform

Inspired by Arduino™

Proposed change to board variant mechanism

Created Tue, 26 Jun 2012 21:08:40 +0000 by GeneApperson


Tue, 26 Jun 2012 21:08:40 +0000

When I made the board variant changes, one thing that I did was to put the definitions for the pin mapping macros in the Board_Defs.h file for each variant. I did this because some board variants need to change the definitions of these macros. I realize now that the way I did this is probably incorrect. What I should have done was to put the common definitions in pins_arduino.h and then have the Board_Defs.h file for a board variant #undef and then #define only the ones that it needs to change. The way it is currently being done makes it difficult (read impossible) to put in generic definitions that change based on the PIC32 microcontroller family. This is something that is now biting me as I work on putting in support for PIC32MX1xx/MX2xx series devices.

I’m proposing to move the definition of the pin mapping macros from the Board_Defs.h file over to pins_arduino.h and then fix the ones where it is needed to #undef the ones that are changed. I can fix this in all of the board variant files that are in the current release. I can’t fix it for any third party board definitions that have already been done and aren’t in the release.

What do you think? Are there any third-party chipKIT board developers who object to me making this change?

Gene Apperson Digilent