Individual control pin invert compile-option.
- Control pins may be individually inverted through a CONTROL_INVERT_MASK macro. This mask is define in the cpu_map.h file.
This commit is contained in:
parent
0427fd5b9f
commit
3a68c22fab
6 changed files with 18 additions and 5 deletions
|
|
@ -41,8 +41,8 @@ void system_init()
|
|||
ISR(CONTROL_INT_vect)
|
||||
{
|
||||
uint8_t pin = (CONTROL_PIN & CONTROL_MASK);
|
||||
#ifndef INVERT_CONTROL_PIN
|
||||
pin ^= CONTROL_MASK;
|
||||
#ifndef INVERT_ALL_CONTROL_PINS
|
||||
pin ^= CONTROL_INVERT_MASK;
|
||||
#endif
|
||||
// Enter only if any CONTROL pin is detected as active.
|
||||
if (pin) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue