|
|
@@ -1039,9 +1039,21 @@ public: |
|
|
|
} |
|
|
|
inline void disable_pins(void) __attribute__((always_inline)) { |
|
|
|
//serial_print("disable_pins\n"); |
|
|
|
CORE_PIN11_CONFIG = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1); |
|
|
|
CORE_PIN12_CONFIG = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1); |
|
|
|
CORE_PIN13_CONFIG = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1); |
|
|
|
if ((pinout & 1) == 0) { |
|
|
|
CORE_PIN11_CONFIG = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1); |
|
|
|
} else { |
|
|
|
CORE_PIN7_CONFIG = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1); |
|
|
|
} |
|
|
|
if ((pinout & 2) == 0) { |
|
|
|
CORE_PIN12_CONFIG = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1); |
|
|
|
} else { |
|
|
|
CORE_PIN8_CONFIG = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1); |
|
|
|
} |
|
|
|
if ((pinout & 4) == 0) { |
|
|
|
CORE_PIN13_CONFIG = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1); |
|
|
|
} else { |
|
|
|
CORE_PIN14_CONFIG = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
extern SPCRemulation SPCR; |