|
|
|
|
|
|
|
|
} else |
|
|
} else |
|
|
#endif |
|
|
#endif |
|
|
{ |
|
|
{ |
|
|
interruptSave = SREG; |
|
|
|
|
|
|
|
|
uint8_t tmp = SREG; |
|
|
cli(); |
|
|
cli(); |
|
|
|
|
|
interruptSave = tmp; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
#ifdef SPI_TRANSACTION_MISMATCH_LED |
|
|
#ifdef SPI_TRANSACTION_MISMATCH_LED |
|
|
|
|
|
|
|
|
// and configure the correct settings. |
|
|
// and configure the correct settings. |
|
|
inline static void beginTransaction(SPISettings settings) { |
|
|
inline static void beginTransaction(SPISettings settings) { |
|
|
if (interruptMasksUsed) { |
|
|
if (interruptMasksUsed) { |
|
|
|
|
|
__disable_irq(); |
|
|
if (interruptMasksUsed & 0x01) { |
|
|
if (interruptMasksUsed & 0x01) { |
|
|
interruptSave[0] = NVIC_ICER0 & interruptMask[0]; |
|
|
interruptSave[0] = NVIC_ICER0 & interruptMask[0]; |
|
|
NVIC_ICER0 = interruptSave[0]; |
|
|
NVIC_ICER0 = interruptSave[0]; |
|
|
|
|
|
|
|
|
NVIC_ICER3 = interruptSave[3]; |
|
|
NVIC_ICER3 = interruptSave[3]; |
|
|
} |
|
|
} |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
__enable_irq(); |
|
|
} |
|
|
} |
|
|
#ifdef SPI_TRANSACTION_MISMATCH_LED |
|
|
#ifdef SPI_TRANSACTION_MISMATCH_LED |
|
|
if (inTransactionFlag) { |
|
|
if (inTransactionFlag) { |