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

boards/arduino-common: use software interrupt for context swap

This commit is contained in:
Laurent Navet 2016-09-10 00:09:27 +02:00
parent 3ff576e46a
commit 5b8cfb0b58

View File

@ -53,6 +53,20 @@ extern "C" {
#define LED0_TOGGLE (PORTB ^= LED0_MASK)
/** @} */
/**
** Context swap defines
** Setup to use PJ6 which is pin change interrupt 15 (PCINT15)
** This emulates a software triggered interrupt
***/
#define AVR_CONTEXT_SWAP_INIT do { \
DDRC |= (1 << PC6); \
PCICR |= (1 << PCIE1); \
PCMSK1 |= (1 << PCINT14); \
} while (0)
#define AVR_CONTEXT_SWAP_INTERRUPT_VECT PCINT1_vect
#define AVR_CONTEXT_SWAP_TRIGGER PORTC ^= (1 << PC6)
/**
* @brief xtimer configuration values
* @{