git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Modules/USB - Callback support and Driver selection
[tpg/acess2.git]
/
Modules
/
USB
/
Core
/
hub.c
diff --git
a/Modules/USB/Core/hub.c
b/Modules/USB/Core/hub.c
index
08295b1
..
b737f07
100644
(file)
--- a/
Modules/USB/Core/hub.c
+++ b/
Modules/USB/Core/hub.c
@@
-5,6
+5,7
@@
* hub.c
* - Basic hub driver
*/
* hub.c
* - Basic hub driver
*/
+#define DEBUG 1
#include <usb_hub.h>
#define MAX_PORTS 32 // Not actually a max, but used for DeviceRemovable
#include <usb_hub.h>
#define MAX_PORTS 32 // Not actually a max, but used for DeviceRemovable
@@
-39,7
+40,7
@@
struct sHubInfo
// === PROTOTYPES ===
void Hub_Connected(tUSBInterface *Dev);
void Hub_Disconnected(tUSBInterface *Dev);
// === PROTOTYPES ===
void Hub_Connected(tUSBInterface *Dev);
void Hub_Disconnected(tUSBInterface *Dev);
-void Hub_PortStatusChange(tUSBInterface *Dev, int Length, void *Data);
+void Hub_PortStatusChange(tUSBInterface *Dev, int
Endpoint, int
Length, void *Data);
void Hub_int_HandleChange(tUSBInterface *Dev, int Port);
// === GLOBALS ===
void Hub_int_HandleChange(tUSBInterface *Dev, int Port);
// === GLOBALS ===
@@
-68,8
+69,8
@@
void Hub_Connected(tUSBInterface *Dev)
struct sHubDescriptor hub_desc;
struct sHubInfo *info;
struct sHubDescriptor hub_desc;
struct sHubInfo *info;
- // Read hub descriptor
- USB_ReadDescriptor(Dev, 0x29, 0, sizeof(hub_desc), &hub_desc);
+ // Read hub descriptor
(Class descriptor 0x29)
+ USB_ReadDescriptor(Dev, 0x
1
29, 0, sizeof(hub_desc), &hub_desc);
LOG("%i Ports", hub_desc.NbrPorts);
LOG("Takes %i ms for power to stabilise", hub_desc.PwrOn2PwrGood*2);
LOG("%i Ports", hub_desc.NbrPorts);
LOG("Takes %i ms for power to stabilise", hub_desc.PwrOn2PwrGood*2);
@@
-100,7
+101,7
@@
void Hub_Disconnected(tUSBInterface *Dev)
free(info);
}
free(info);
}
-void Hub_PortStatusChange(tUSBInterface *Dev, int Length, void *Data)
+void Hub_PortStatusChange(tUSBInterface *Dev, int
Endpoint, int
Length, void *Data)
{
Uint8 *status = Data;
struct sHubInfo *info = USB_GetDeviceDataPtr(Dev);
{
Uint8 *status = Data;
struct sHubInfo *info = USB_GetDeviceDataPtr(Dev);
UCC
git Repository :: git.ucc.asn.au