1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #7594 from lebrush/fix/atmega-context-switch

boards/arduino-atmega-common: use PD7 for ctx operations
This commit is contained in:
lebrush 2017-09-18 15:09:46 +02:00 committed by GitHub
commit 81bfb0c97a

View File

@ -65,12 +65,12 @@ extern "C" {
*/
#ifdef CPU_ATMEGA328P
#define AVR_CONTEXT_SWAP_INIT do { \
DDRC |= (1 << PC5); \
PCICR |= (1 << PCIE1); \
PCMSK1 |= (1 << PCINT13); \
DDRD |= (1 << PD7); \
PCICR |= (1 << PCIE2); \
PCMSK2 |= (1 << PCINT23); \
} while (0)
#define AVR_CONTEXT_SWAP_INTERRUPT_VECT PCINT1_vect
#define AVR_CONTEXT_SWAP_TRIGGER PORTC ^= (1 << PC5)
#define AVR_CONTEXT_SWAP_INTERRUPT_VECT PCINT2_vect
#define AVR_CONTEXT_SWAP_TRIGGER PORTD ^= (1 << PD7)
#endif
#ifdef CPU_ATMEGA2560