Browse Source

Support pins 24 & 25 in Serial1 setTX & setRX on Teensy LC

teensy4-core
PaulStoffregen 8 years ago
parent
commit
f5c6b36008
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      teensy3/serial1.c

+ 4
- 0
teensy3/serial1.c View File

case 5: CORE_PIN5_CONFIG = 0; break; // PTD7 case 5: CORE_PIN5_CONFIG = 0; break; // PTD7
#if defined(KINETISL) #if defined(KINETISL)
case 4: CORE_PIN4_CONFIG = 0; break; // PTA2 case 4: CORE_PIN4_CONFIG = 0; break; // PTA2
case 24: CORE_PIN24_CONFIG = 0; break; // PTE20
#endif #endif
} }
if (opendrain) { if (opendrain) {
case 5: CORE_PIN5_CONFIG = cfg | PORT_PCR_MUX(3); break; case 5: CORE_PIN5_CONFIG = cfg | PORT_PCR_MUX(3); break;
#if defined(KINETISL) #if defined(KINETISL)
case 4: CORE_PIN4_CONFIG = cfg | PORT_PCR_MUX(2); break; case 4: CORE_PIN4_CONFIG = cfg | PORT_PCR_MUX(2); break;
case 24: CORE_PIN24_CONFIG = cfg | PORT_PCR_MUX(4); break;
#endif #endif
} }
} }
case 21: CORE_PIN21_CONFIG = 0; break; // PTD6 case 21: CORE_PIN21_CONFIG = 0; break; // PTD6
#if defined(KINETISL) #if defined(KINETISL)
case 3: CORE_PIN3_CONFIG = 0; break; // PTA1 case 3: CORE_PIN3_CONFIG = 0; break; // PTA1
case 25: CORE_PIN25_CONFIG = 0; break; // PTE21
#endif #endif
} }
switch (pin) { switch (pin) {
case 21: CORE_PIN21_CONFIG = PORT_PCR_PE | PORT_PCR_PS | PORT_PCR_PFE | PORT_PCR_MUX(3); break; case 21: CORE_PIN21_CONFIG = PORT_PCR_PE | PORT_PCR_PS | PORT_PCR_PFE | PORT_PCR_MUX(3); break;
#if defined(KINETISL) #if defined(KINETISL)
case 3: CORE_PIN3_CONFIG = PORT_PCR_PE | PORT_PCR_PS | PORT_PCR_PFE | PORT_PCR_MUX(2); break; case 3: CORE_PIN3_CONFIG = PORT_PCR_PE | PORT_PCR_PS | PORT_PCR_PFE | PORT_PCR_MUX(2); break;
case 25: CORE_PIN25_CONFIG = PORT_PCR_PE | PORT_PCR_PS | PORT_PCR_PFE | PORT_PCR_MUX(4); break;
#endif #endif
} }
} }

Loading…
Cancel
Save