Organizational updates. Mega2560 support moved.

- Mega2560 support has been moved to the Grbl-Mega
[project](http://github.com/gnea/grbl-Mega/) to clean up the code and
make future developments easier with increased flash and RAM. All new
developments between the 328p and Mega2560 will be synced when it makes
sense to.

- OEM single file compile configuration option. Before OEMs needed to
alter three files. Provided a way to just alter the config.h file to
contain everything for a particular Grbl build. See config.h for more
details.

- Removed defaults and cpu_map directories and reverted back to
defaults.h and cpu_map.h to contain all definitions. This should help
reduce some headaches and the previous implementation inadvertently
created. Also, it makes the single file config.h possible.

- Moved (and tweaked) the invert control pin mask define and placed
into config.h, rather than in the cpu_map.h file. Makes more sense
there.
This commit is contained in:
Sonny Jeon 2016-03-30 11:58:47 -06:00
parent 5bfc3a1945
commit 0746a5a1d7
20 changed files with 533 additions and 1040 deletions

View file

@ -41,16 +41,16 @@ uint8_t system_control_get_state()
{
uint8_t control_state = 0;
uint8_t pin = (CONTROL_PIN & CONTROL_MASK);
#ifndef INVERT_ALL_CONTROL_PINS
pin ^= CONTROL_INVERT_MASK;
#ifdef INVERT_CONTROL_PIN_MASK
pin ^= INVERT_CONTROL_PIN_MASK;
#endif
if (pin) {
#ifdef ENABLE_SAFETY_DOOR_INPUT_PIN
if (bit_istrue(pin,(1<<SAFETY_DOOR_BIT))) { control_state |= CONTROL_PIN_INDEX_SAFETY_DOOR; }
if (bit_isfalse(pin,(1<<CONTROL_SAFETY_DOOR_BIT))) { control_state |= CONTROL_PIN_INDEX_SAFETY_DOOR; }
#endif
if (bit_istrue(pin,(1<<RESET_BIT))) { control_state |= CONTROL_PIN_INDEX_RESET; }
if (bit_istrue(pin,(1<<FEED_HOLD_BIT))) { control_state |= CONTROL_PIN_INDEX_FEED_HOLD; }
if (bit_istrue(pin,(1<<CYCLE_START_BIT))) { control_state |= CONTROL_PIN_INDEX_CYCLE_START; }
if (bit_isfalse(pin,(1<<CONTROL_RESET_BIT))) { control_state |= CONTROL_PIN_INDEX_RESET; }
if (bit_isfalse(pin,(1<<CONTROL_FEED_HOLD_BIT))) { control_state |= CONTROL_PIN_INDEX_FEED_HOLD; }
if (bit_isfalse(pin,(1<<CONTROL_CYCLE_START_BIT))) { control_state |= CONTROL_PIN_INDEX_CYCLE_START; }
}
return(control_state);
}