Skip to content
Snippets Groups Projects
Commit 94624c2b authored by Victor Arino's avatar Victor Arino
Browse files

boards/arduino-atmega-common: use PD7 for ctx operations

This was previously configured to PC5 which is shared with the i2c
SCL line. PD7 is selected since it's the only pin which does not
have an additional function.
parent 23f4f9be
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment