diff options
author | Keith Packard <keithp@keithp.com> | 2012-10-16 21:08:58 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2012-10-16 21:08:58 -0700 |
commit | 4d6d90e15db30991bf81060a0876ae8adb843c75 (patch) | |
tree | 944cfef3d894878de633ede058d4b930e12e61e1 /src | |
parent | b8d8b23ca5e6c2d3a19f8aeda2764b43d25eb9d6 (diff) |
altos/avr: Use ISR_BLOCK to disable interrupts during slave ISR
This avoids enabling and then immediatly disabling them
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/avr/ao_spi_slave.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/avr/ao_spi_slave.c b/src/avr/ao_spi_slave.c index b742d29a..a400b8a0 100644 --- a/src/avr/ao_spi_slave.c +++ b/src/avr/ao_spi_slave.c @@ -44,9 +44,8 @@ ao_spi_slave_send(uint8_t *buf, uint8_t len) static uint8_t ao_spi_slave_running; -ISR(PCINT0_vect) +ISR(PCINT0_vect, ISR_BLOCK) { - cli(); #if SPI_SLAVE_PIN_0_3 if ((PINB & (1 << PORTB0)) == 0) #endif @@ -61,7 +60,6 @@ ISR(PCINT0_vect) } else { ao_spi_slave_running = 0; } - sei(); } void |