瀏覽代碼

Fix scheduling of hub control transfers

main
PaulStoffregen 7 年之前
父節點
當前提交
5ea0d568a1
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. +2
    -1
      hub.cpp

+ 2
- 1
hub.cpp 查看文件

@@ -210,6 +210,7 @@ void USBHub::control(const Transfer_t *transfer)
println("USBHub control callback");
print_hexbytes(transfer->buffer, transfer->length);

sending_control_transfer = 0;
uint32_t port = transfer->setup.wIndex;
uint32_t mesg = transfer->setup.word1;

@@ -265,7 +266,7 @@ void USBHub::control(const Transfer_t *transfer)
// allow only a single control transfer to occur at once
// which isn't fast, but requires only 3 Transfer_t and
// allows reusing the setup and other buffers
sending_control_transfer = 0;
if (sending_control_transfer) return;
if (send_pending_poweron) {
send_poweron(lowestbit(send_pending_poweron));
} else if (send_pending_clearstatus_connect) {

Loading…
取消
儲存