Kaynağa Gözat

Fix USB serial issues printing before device ready

teensy4-core
PaulStoffregen 6 yıl önce
ebeveyn
işleme
a1ff3e9256
2 değiştirilmiş dosya ile 3 ekleme ve 2 silme
  1. +2
    -2
      teensy4/usb.c
  2. +1
    -0
      teensy4/usb_serial.c

+ 2
- 2
teensy4/usb.c Dosyayı Görüntüle

} }
break; break;
case 0x2221: // CDC_SET_CONTROL_LINE_STATE case 0x2221: // CDC_SET_CONTROL_LINE_STATE
//usb_cdc_line_rtsdtr_millis = systick_millis_count;
//usb_cdc_line_rtsdtr = setup.wValue;
usb_cdc_line_rtsdtr_millis = systick_millis_count;
usb_cdc_line_rtsdtr = setup.wValue;
case 0x2321: // CDC_SEND_BREAK case 0x2321: // CDC_SEND_BREAK
endpoint0_receive(NULL, 0, 0); endpoint0_receive(NULL, 0, 0);
return; return;

+ 1
- 0
teensy4/usb_serial.c Dosyayı Görüntüle



int usb_serial_write(const void *buffer, uint32_t size) int usb_serial_write(const void *buffer, uint32_t size)
{ {
if (!usb_configuration) return 0;
// TODO: do something so much better that this quick hack.... // TODO: do something so much better that this quick hack....
if (size > sizeof(txbuffer)) size = sizeof(txbuffer); if (size > sizeof(txbuffer)) size = sizeof(txbuffer);
int count=0; int count=0;

Yükleniyor…
İptal
Kaydet