Skip to content
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

Update architecture switch to match Arduino convention #27

Closed
4-20ma opened this issue May 22, 2015 · 0 comments
Closed

Update architecture switch to match Arduino convention #27

4-20ma opened this issue May 22, 2015 · 0 comments

Comments

@4-20ma
Copy link
Owner

4-20ma commented May 22, 2015

Refer to https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#working-with-multiple-architectures.

Use either:

#if defined(ARDUINO_ARCH_AVR)
  // AVR-specific code
#elif defined(ARDUINO_ARCH_SAM)
  // SAM-specific code
#else
  // generic, non-platform specific code
#endif

or:

#if defined(ARDUINO_ARCH_AVR)
  // AVR-specific code
#elif defined(ARDUINO_ARCH_SAM)
  // SAM-specific code
#else
  #error “This library only supports boards with an AVR or SAM processor.”
#endif
@4-20ma 4-20ma added the style label May 22, 2015
4-20ma added a commit that referenced this issue May 22, 2015
@4-20ma 4-20ma closed this as completed in 1dad174 May 22, 2015
4-20ma added a commit that referenced this issue May 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant