Add usb_hid to image and get it building/working.
This commit is contained in:
@@ -21,7 +21,7 @@ if $(HAIKU_ATA_STACK) = 1 {
|
|||||||
|
|
||||||
SYSTEM_BIN = "[" addattr base64 basename bash beep cal cat catattr chgrp chmod
|
SYSTEM_BIN = "[" addattr base64 basename bash beep cal cat catattr chgrp chmod
|
||||||
chown chroot cksum clear clockconfig cmp collectcatkeys comm compress
|
chown chroot cksum clear clockconfig cmp collectcatkeys comm compress
|
||||||
copyattr cp csplit cut date dd diff diff3 dircolors dirname du
|
copyattr cp csplit cut date dd diff diff3 dircolors dirname df du
|
||||||
dumpcatalog echo eject env error expand expr factor false find finddir
|
dumpcatalog echo eject env error expand expr factor false find finddir
|
||||||
fmt fold fortune gawk gzip gzexe getlimits groups head hostname id
|
fmt fold fortune gawk gzip gzexe getlimits groups head hostname id
|
||||||
<bin>install isvolume join kernel_debugger kill less lessecho lesskey link
|
<bin>install isvolume join kernel_debugger kill less lessecho lesskey link
|
||||||
@@ -91,7 +91,7 @@ AddDriversToHaikuImage : console dprintf null
|
|||||||
random <driver>tty zero ;
|
random <driver>tty zero ;
|
||||||
AddDriversToHaikuImage graphics : $(SYSTEM_ADD_ONS_DRIVERS_GRAPHICS) ;
|
AddDriversToHaikuImage graphics : $(SYSTEM_ADD_ONS_DRIVERS_GRAPHICS) ;
|
||||||
AddDriversToHaikuImage disk usb : usb_disk ;
|
AddDriversToHaikuImage disk usb : usb_disk ;
|
||||||
AddDriversToHaikuImage input : ps2_hid ;
|
AddDriversToHaikuImage input : ps2_hid usb_hid ;
|
||||||
|
|
||||||
# kernel
|
# kernel
|
||||||
AddFilesToHaikuImage system : kernel_$(TARGET_ARCH) ;
|
AddFilesToHaikuImage system : kernel_$(TARGET_ARCH) ;
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ usb_hid_device_added(usb_device device, void **cookie)
|
|||||||
// ensure default configuration is set
|
// ensure default configuration is set
|
||||||
status_t result = gUSBModule->set_configuration(device, config);
|
status_t result = gUSBModule->set_configuration(device, config);
|
||||||
if (result != B_OK) {
|
if (result != B_OK) {
|
||||||
TRACE_ALWAYS("set_configuration() failed 0x%08lx\n", result);
|
TRACE_ALWAYS("set_configuration() failed 0x%08" B_PRIx32 "\n", result);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,8 +78,8 @@ usb_hid_device_added(usb_device device, void **cookie)
|
|||||||
for (size_t i = 0; i < config->interface_count; i++) {
|
for (size_t i = 0; i < config->interface_count; i++) {
|
||||||
const usb_interface_info *interface = config->interface[i].active;
|
const usb_interface_info *interface = config->interface[i].active;
|
||||||
uint8 interfaceClass = interface->descr->interface_class;
|
uint8 interfaceClass = interface->descr->interface_class;
|
||||||
TRACE("interface %lu: class: %u; subclass: %u; protocol: %u\n",
|
TRACE("interface %" B_PRIuSIZE ": class: %u; subclass: %u; protocol: "
|
||||||
i, interfaceClass, interface->descr->interface_subclass,
|
"%u\n", i, interfaceClass, interface->descr->interface_subclass,
|
||||||
interface->descr->interface_protocol);
|
interface->descr->interface_protocol);
|
||||||
|
|
||||||
// check for quirky devices first
|
// check for quirky devices first
|
||||||
@@ -128,7 +128,7 @@ usb_hid_device_added(usb_device device, void **cookie)
|
|||||||
char pathBuffer[128];
|
char pathBuffer[128];
|
||||||
const char *basePath = handler->BasePath();
|
const char *basePath = handler->BasePath();
|
||||||
while (true) {
|
while (true) {
|
||||||
sprintf(pathBuffer, "%s%ld", basePath, index++);
|
sprintf(pathBuffer, "%s%" B_PRId32, basePath, index++);
|
||||||
if (gDeviceList->FindDevice(pathBuffer) == NULL) {
|
if (gDeviceList->FindDevice(pathBuffer) == NULL) {
|
||||||
// this name is still free, use it
|
// this name is still free, use it
|
||||||
handler->SetPublishPath(strdup(pathBuffer));
|
handler->SetPublishPath(strdup(pathBuffer));
|
||||||
@@ -149,7 +149,7 @@ usb_hid_device_added(usb_device device, void **cookie)
|
|||||||
if (!devicesFound)
|
if (!devicesFound)
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
|
||||||
*cookie = (void *)parentCookie;
|
*cookie = (void *)(addr_t)parentCookie;
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -158,8 +158,8 @@ status_t
|
|||||||
usb_hid_device_removed(void *cookie)
|
usb_hid_device_removed(void *cookie)
|
||||||
{
|
{
|
||||||
mutex_lock(&sDriverLock);
|
mutex_lock(&sDriverLock);
|
||||||
int32 parentCookie = (int32)cookie;
|
int32 parentCookie = (int32)(addr_t)cookie;
|
||||||
TRACE("device_removed(%ld)\n", parentCookie);
|
TRACE("device_removed(%" B_PRId32 ")\n", parentCookie);
|
||||||
|
|
||||||
for (int32 i = 0; i < gDeviceList->CountDevices(); i++) {
|
for (int32 i = 0; i < gDeviceList->CountDevices(); i++) {
|
||||||
ProtocolHandler *handler = (ProtocolHandler *)gDeviceList->DeviceAt(i);
|
ProtocolHandler *handler = (ProtocolHandler *)gDeviceList->DeviceAt(i);
|
||||||
|
|||||||
Reference in New Issue
Block a user