Преглед на файлове

Set USBHS_USBCMD_ITC to 1, workaround for race condition in some drivers

main
PaulStoffregen преди 3 години
родител
ревизия
efaf5cb56f
променени са 2 файла, в които са добавени 10 реда и са изтрити 1 реда
  1. +9
    -0
      USBHost_t36.h
  2. +1
    -1
      ehci.cpp

+ 9
- 0
USBHost_t36.h Целия файл

@@ -62,6 +62,15 @@
//#define USBHOST_PRINT_DEBUG


// When developing a new driver, please edit ehci.cpp to set
// USBHS_USBCMD_ITC to zero. Today we set USBHS_USBCMD_ITC(1)
// because some drivers have race conditions exposed by
// non-delayed interrupts. Eventually USBHS_USBCMD_ITC will
// be changed to 0. Please test any new driver code with
// USBHS_USBCMD_ITC(0) so it won't break in the future when
// this change is made!


// This can let you control where to send the debugging messages
//#define USBHDBGSerial Serial1
#ifndef USBHDBGSerial

+ 1
- 1
ehci.cpp Целия файл

@@ -239,7 +239,7 @@ void USBHost::begin()
USBHS_PERIODICLISTBASE = (uint32_t)periodictable;
USBHS_FRINDEX = 0;
USBHS_ASYNCLISTADDR = 0;
USBHS_USBCMD = USBHS_USBCMD_ITC(0) | USBHS_USBCMD_RS |
USBHS_USBCMD = USBHS_USBCMD_ITC(1) | USBHS_USBCMD_RS |
USBHS_USBCMD_ASP(3) | USBHS_USBCMD_ASPE | USBHS_USBCMD_PSE |
#if PERIODIC_LIST_SIZE == 8
USBHS_USBCMD_FS2 | USBHS_USBCMD_FS(3);

Loading…
Отказ
Запис