include: usb_ch9: fix USB_FS_ISO_EP_INTERVAL calculation
Per section 5.6.4 of the USB 2.0 standard, Isochronous Endpoints are derived by the (2^(bInterval-1) * F) formula. The current implementation uses the formula intended for Interrupt Endpoints. Signed-off-by: Victor Brzeski <vbrzeski@gmail.com>
This commit is contained in:
parent
48dc588636
commit
d9c7b19ae0
@ -354,8 +354,8 @@ struct usb_association_descriptor {
|
||||
/** Calculate high speed interrupt endpoint bInterval from a value in microseconds */
|
||||
#define USB_HS_INT_EP_INTERVAL(us) CLAMP((ilog2((us) / 125U) + 1U), 1U, 16U)
|
||||
|
||||
/** Calculate high speed isochronous endpoint bInterval from a value in microseconds */
|
||||
#define USB_FS_ISO_EP_INTERVAL(us) CLAMP(((us) / 1000U), 1U, 16U)
|
||||
/** Calculate full speed isochronous endpoint bInterval from a value in microseconds */
|
||||
#define USB_FS_ISO_EP_INTERVAL(us) CLAMP((ilog2((us) / 1000U) + 1U), 1U, 16U)
|
||||
|
||||
/** Calculate high speed isochronous endpoint bInterval from a value in microseconds */
|
||||
#define USB_HS_ISO_EP_INTERVAL(us) CLAMP((ilog2((us) / 125U) + 1U), 1U, 16U)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user