|
|
|
|
|
|
|
|
|
|
|
|
|
|
void SPIClass::usingInterrupt(uint8_t interruptNumber) |
|
|
void SPIClass::usingInterrupt(uint8_t interruptNumber) |
|
|
{ |
|
|
{ |
|
|
uint8_t mask; |
|
|
|
|
|
|
|
|
uint8_t stmp, mask; |
|
|
|
|
|
|
|
|
if (interruptMode > 1) return; |
|
|
if (interruptMode > 1) return; |
|
|
|
|
|
|
|
|
|
|
|
stmp = SREG; |
|
|
noInterrupts(); |
|
|
noInterrupts(); |
|
|
switch (interruptNumber) { |
|
|
switch (interruptNumber) { |
|
|
#ifdef SPI_INT0_MASK |
|
|
#ifdef SPI_INT0_MASK |
|
|
|
|
|
|
|
|
#endif |
|
|
#endif |
|
|
default: |
|
|
default: |
|
|
interruptMode = 2; |
|
|
interruptMode = 2; |
|
|
interrupts(); |
|
|
|
|
|
|
|
|
SREG = stmp; |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
interruptMode = 1; |
|
|
interruptMode = 1; |
|
|
interruptMask |= mask; |
|
|
interruptMask |= mask; |
|
|
interrupts(); |
|
|
|
|
|
|
|
|
SREG = stmp; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|