usb: Ensure TERMINATE bit gets set
This commit is contained in:
@ -218,7 +218,8 @@ void usb_endpoint_schedule_wait(
|
|||||||
// Schedule an already filled-in transfer descriptor for execution on
|
// Schedule an already filled-in transfer descriptor for execution on
|
||||||
// the given endpoint, appending to the end of the endpoint's queue if
|
// the given endpoint, appending to the end of the endpoint's queue if
|
||||||
// there are pending TDs. Note that this requires that one knows the
|
// there are pending TDs. Note that this requires that one knows the
|
||||||
// tail of the endpoint's TD queue
|
// tail of the endpoint's TD queue. Moreover, the user is responsible
|
||||||
|
// for setting the TERMINATE bit of next_dtd_pointer if needed.
|
||||||
void usb_endpoint_schedule_append(
|
void usb_endpoint_schedule_append(
|
||||||
const usb_endpoint_t* const endpoint,
|
const usb_endpoint_t* const endpoint,
|
||||||
usb_transfer_descriptor_t* const tail_td,
|
usb_transfer_descriptor_t* const tail_td,
|
||||||
|
@ -137,6 +137,7 @@ void usb_transfer_schedule(
|
|||||||
usb_transfer_t* const transfer = allocate_transfer();
|
usb_transfer_t* const transfer = allocate_transfer();
|
||||||
uint_fast8_t index = USB_ENDPOINT_INDEX(endpoint->address);
|
uint_fast8_t index = USB_ENDPOINT_INDEX(endpoint->address);
|
||||||
fill_in_transfer(transfer, data, maximum_length);
|
fill_in_transfer(transfer, data, maximum_length);
|
||||||
|
transfer->td.next_dtd_pointer = USB_TD_NEXT_DTD_POINTER_TERMINATE;
|
||||||
transfer->completion_cb = completion_cb;
|
transfer->completion_cb = completion_cb;
|
||||||
// TODO: disable_interrupts();
|
// TODO: disable_interrupts();
|
||||||
usb_transfer_t* tail = endpoint_transfers[index];
|
usb_transfer_t* tail = endpoint_transfers[index];
|
||||||
|
Reference in New Issue
Block a user