PaulStoffregen 8 år sedan
förälder
incheckning
d87c9814b9
1 ändrade filer med 15 tillägg och 3 borttagningar
  1. +15
    -3
      teensy3/avr_emulation.h

+ 15
- 3
teensy3/avr_emulation.h Visa fil

@@ -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;

Laddar…
Avbryt
Spara