Merge pull request #3317 from Cacodemon345/usb-work
usb: Increment HcFmNumber in EOF function
This commit is contained in:
@@ -76,6 +76,15 @@ typedef struct
|
|||||||
} usb_desc_conf_t;
|
} usb_desc_conf_t;
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
uint32_t HccaInterrruptTable[32];
|
||||||
|
uint16_t HccaFrameNumber;
|
||||||
|
uint16_t HccaPad1;
|
||||||
|
uint32_t HccaDoneHead;
|
||||||
|
uint32_t Reserved[29];
|
||||||
|
} usb_hcca_t;
|
||||||
|
|
||||||
/* USB endpoint device struct. Incomplete and unused. */
|
/* USB endpoint device struct. Incomplete and unused. */
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
@@ -28,6 +28,7 @@
|
|||||||
#include <86box/mem.h>
|
#include <86box/mem.h>
|
||||||
#include <86box/timer.h>
|
#include <86box/timer.h>
|
||||||
#include <86box/usb.h>
|
#include <86box/usb.h>
|
||||||
|
#include <86box/dma.h>
|
||||||
|
|
||||||
#ifdef ENABLE_USB_LOG
|
#ifdef ENABLE_USB_LOG
|
||||||
int usb_do_log = ENABLE_USB_LOG;
|
int usb_do_log = ENABLE_USB_LOG;
|
||||||
@@ -243,6 +244,7 @@ void
|
|||||||
ohci_end_of_frame(usb_t* dev)
|
ohci_end_of_frame(usb_t* dev)
|
||||||
{
|
{
|
||||||
/* TODO: Put endpoint and transfer descriptor processing here. */
|
/* TODO: Put endpoint and transfer descriptor processing here. */
|
||||||
|
dev->ohci_mmio_w[OHCI_HcFmNumber / 2]++;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -262,8 +264,9 @@ ohci_update_frame_counter(void* priv)
|
|||||||
dev->ohci_mmio_w[OHCI_HcFmRemaining / 2] = dev->ohci_mmio_w[OHCI_HcFmInterval / 2] & 0x3fff;
|
dev->ohci_mmio_w[OHCI_HcFmRemaining / 2] = dev->ohci_mmio_w[OHCI_HcFmInterval / 2] & 0x3fff;
|
||||||
dev->ohci_mmio_l[OHCI_HcFmRemaining / 4] &= ~(1 << 31);
|
dev->ohci_mmio_l[OHCI_HcFmRemaining / 4] &= ~(1 << 31);
|
||||||
dev->ohci_mmio_l[OHCI_HcFmRemaining / 4] |= dev->ohci_mmio_l[OHCI_HcFmInterval / 4] & (1 << 31);
|
dev->ohci_mmio_l[OHCI_HcFmRemaining / 4] |= dev->ohci_mmio_l[OHCI_HcFmInterval / 4] & (1 << 31);
|
||||||
dev->ohci_mmio_w[OHCI_HcFmNumber / 2]++;
|
|
||||||
ohci_start_of_frame(dev);
|
ohci_start_of_frame(dev);
|
||||||
|
timer_on_auto(&dev->ohci_frame_timer, 1. / (12. * 1000. * 1000.));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if (dev->ohci_mmio_w[OHCI_HcFmRemaining / 2]) dev->ohci_mmio_w[OHCI_HcFmRemaining / 2]--;
|
if (dev->ohci_mmio_w[OHCI_HcFmRemaining / 2]) dev->ohci_mmio_w[OHCI_HcFmRemaining / 2]--;
|
||||||
timer_on_auto(&dev->ohci_frame_timer, 1. / (12. * 1000. * 1000.));
|
timer_on_auto(&dev->ohci_frame_timer, 1. / (12. * 1000. * 1000.));
|
||||||
|
Reference in New Issue
Block a user