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

Define status LED pins without condition #4893

Merged
merged 8 commits into from Sep 25, 2016

Conversation

thinkyhead
Copy link
Member

@thinkyhead thinkyhead commented Sep 25, 2016

On principle, pins should be defined in the pins files even if the feature that uses them isn't enabled. This PR applies that principle to the STAT_LED pins, and also adds the _PIN suffix.

Also…

  • Use fastio macros for pins, where possible
  • Sanity check for the status led pins when TEMP_STAT_LEDS is enabled
  • Group sanity checks for pins
  • LCD_PIN_BL => LCD_BACKLIGHT_PIN

[Concise Diff]

@Blue-Marlin
Copy link
Contributor

FastIO is based on the knowledge about all values (pin and value) at compile-time. You can't use variables.

@thinkyhead thinkyhead force-pushed the rc_stat_led_check branch 7 times, most recently from 16307fd to c42e7e5 Compare September 25, 2016 16:01
@thinkyhead
Copy link
Member Author

@Blue-Marlin I guess the comments in some pins files that say "Not FastIO" are out of date. Some I'm sure because we now have Teensy support in fastio.h. Those that aren't related to the AT90USB series still confuse me.

// Microstepping pins - Mapping not from fastio.h (?)

// You may need to change FAN_PIN to 16 because Marlin isn't using fastio.h
// for the fan and Teensyduino uses a different pin mapping.

// If soft or fast PWM is off then use Teensyduino pin numbering, Marlin
// fastio pin numbering otherwise

  #define DOGLCD_A0  42 //Non-FastIO
  #define DOGLCD_CS  43 //Non-FastIO

  #define STAT_LED_RED_PIN  12 //Non-FastIO
  #define STAT_LED_BLUE_PIN 10 //Non-FastIO

Can these all truly be wrong?

@thinkyhead thinkyhead merged commit 9cebbab into MarlinFirmware:RCBugFix Sep 25, 2016
@thinkyhead thinkyhead deleted the rc_stat_led_check branch September 25, 2016 23:50
@thinkyhead thinkyhead mentioned this pull request Oct 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants