forked from matthijskooijman/arduino-lmic
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from mcci-catena/TMM-issue-ifdef
Convert #if's on config variables to #if defined for consistency
- Loading branch information
Showing
1 changed file
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4546cff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@terrillmoore is this a load-bearing change; that is to say does it materially affect the compilation outcome?
4546cff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It only affects things if you have
#define CFG_us915 0
as the flag to select "us915" mode. (The code was not consistent in using#if
vs#ifdef
. According to ISO C,#if {undefinedVar}
is silently the same as#if 0
. So if you#define CFG_us915 0
you'd get a half-configured codebase, with US915 code in some places, and nothing in others.)This is why I avoid
#ifdef
as a config method, as opposed to#if
... but the code uses#ifdef
and that's not going to change right now.