1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

Merge pull request #6320 from mali/fix_issue_6264

boards/arduino-common: fix software interrupt for context swap
This commit is contained in:
Francisco Acosta 2017-01-11 16:22:51 +01:00 committed by GitHub
commit 23a10e8643

View File

@ -55,16 +55,16 @@ extern "C" {
/**
** Context swap defines
** Setup to use PJ6 which is pin change interrupt 15 (PCINT15)
** Setup to use PC5 which is pin change interrupt 13 (PCINT13)
** This emulates a software triggered interrupt
***/
#define AVR_CONTEXT_SWAP_INIT do { \
DDRC |= (1 << PC6); \
DDRC |= (1 << PC5); \
PCICR |= (1 << PCIE1); \
PCMSK1 |= (1 << PCINT14); \
PCMSK1 |= (1 << PCINT13); \
} while (0)
#define AVR_CONTEXT_SWAP_INTERRUPT_VECT PCINT1_vect
#define AVR_CONTEXT_SWAP_TRIGGER PORTC ^= (1 << PC6)
#define AVR_CONTEXT_SWAP_TRIGGER PORTC ^= (1 << PC5)
/**