22 #ifdef SPI_TRANSACTION_MISMATCH_LED 23 uint8_t SPIClass::inTransactionFlag = 0;
76 #ifdef SPI_TRANSACTION_MISMATCH_LED 77 inTransactionFlag = 0;
84 #if defined(__AVR_ATmega32U4__) 85 #define SPI_INT0_MASK (1<<INT0) 86 #define SPI_INT1_MASK (1<<INT1) 87 #define SPI_INT2_MASK (1<<INT2) 88 #define SPI_INT3_MASK (1<<INT3) 89 #define SPI_INT4_MASK (1<<INT6) 90 #elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__) 91 #define SPI_INT0_MASK (1<<INT0) 92 #define SPI_INT1_MASK (1<<INT1) 93 #define SPI_INT2_MASK (1<<INT2) 94 #define SPI_INT3_MASK (1<<INT3) 95 #define SPI_INT4_MASK (1<<INT4) 96 #define SPI_INT5_MASK (1<<INT5) 97 #define SPI_INT6_MASK (1<<INT6) 98 #define SPI_INT7_MASK (1<<INT7) 99 #elif defined(EICRA) && defined(EICRB) && defined(EIMSK) 100 #define SPI_INT0_MASK (1<<INT4) 101 #define SPI_INT1_MASK (1<<INT5) 102 #define SPI_INT2_MASK (1<<INT0) 103 #define SPI_INT3_MASK (1<<INT1) 104 #define SPI_INT4_MASK (1<<INT2) 105 #define SPI_INT5_MASK (1<<INT3) 106 #define SPI_INT6_MASK (1<<INT6) 107 #define SPI_INT7_MASK (1<<INT7) 110 #define SPI_INT0_MASK (1<<INT0) 113 #define SPI_INT1_MASK (1<<INT1) 116 #define SPI_INT2_MASK (1<<INT2) 125 switch (interruptNumber) {
127 case 0: mask = SPI_INT0_MASK;
break;
130 case 1: mask = SPI_INT1_MASK;
break;
133 case 2: mask = SPI_INT2_MASK;
break;
136 case 3: mask = SPI_INT3_MASK;
break;
139 case 4: mask = SPI_INT4_MASK;
break;
142 case 5: mask = SPI_INT5_MASK;
break;
145 case 6: mask = SPI_INT6_MASK;
break;
148 case 7: mask = SPI_INT7_MASK;
break;
168 switch (interruptNumber) {
170 case 0: mask = SPI_INT0_MASK;
break;
173 case 1: mask = SPI_INT1_MASK;
break;
176 case 2: mask = SPI_INT2_MASK;
break;
179 case 3: mask = SPI_INT3_MASK;
break;
182 case 4: mask = SPI_INT4_MASK;
break;
185 case 5: mask = SPI_INT5_MASK;
break;
188 case 6: mask = SPI_INT6_MASK;
break;
191 case 7: mask = SPI_INT7_MASK;
break;
void pinMode(uint8_t, uint8_t)
static uint8_t interruptMode
static void notUsingInterrupt(uint8_t interruptNumber)
static uint8_t interruptSave
static void usingInterrupt(uint8_t interruptNumber)
static const uint8_t MOSI
#define portModeRegister(P)
static uint8_t initialized
#define digitalPinToBitMask(P)
void digitalWrite(uint8_t, uint8_t)
static uint8_t interruptMask
#define digitalPinToPort(P)