浏览代码

Merge pull request #153 from KurtE/Serial2-SetTx/Rx-error

Serial2.setTx and Serial2.setRX should check Uart1
teensy4-core
Paul Stoffregen 9 年前
父节点
当前提交
42b873097e
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      teensy3/serial2.c

+ 2
- 2
teensy3/serial2.c 查看文件



if (opendrain) pin |= 128; if (opendrain) pin |= 128;
if (pin == tx_pin_num) return; if (pin == tx_pin_num) return;
if ((SIM_SCGC4 & SIM_SCGC4_UART2)) {
if ((SIM_SCGC4 & SIM_SCGC4_UART1)) {
switch (tx_pin_num & 127) { switch (tx_pin_num & 127) {
case 10: CORE_PIN10_CONFIG = 0; break; // PTC4 case 10: CORE_PIN10_CONFIG = 0; break; // PTC4
#if !(defined(__MK64FX512__) || defined(__MK66FX1M0__)) // not on T3.4 or T3.5 #if !(defined(__MK64FX512__) || defined(__MK66FX1M0__)) // not on T3.4 or T3.5
{ {
#if defined(KINETISK) #if defined(KINETISK)
if (pin == rx_pin_num) return; if (pin == rx_pin_num) return;
if ((SIM_SCGC4 & SIM_SCGC4_UART2)) {
if ((SIM_SCGC4 & SIM_SCGC4_UART1)) {
switch (rx_pin_num) { switch (rx_pin_num) {
case 9: CORE_PIN9_CONFIG = 0; break; // PTC3 case 9: CORE_PIN9_CONFIG = 0; break; // PTC3
#if !(defined(__MK64FX512__) || defined(__MK66FX1M0__)) // not on T3.4 or T3.5 #if !(defined(__MK64FX512__) || defined(__MK66FX1M0__)) // not on T3.4 or T3.5

正在加载...
取消
保存