PaulStoffregen 8 lat temu
rodzic
commit
d87c9814b9
1 zmienionych plików z 15 dodań i 3 usunięć
  1. +15
    -3
      teensy3/avr_emulation.h

+ 15
- 3
teensy3/avr_emulation.h Wyświetl plik

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

Ładowanie…
Anuluj
Zapisz