This is just function renaming - no code implementation changes.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
req.wValue = val;
req.wIndex = 0;
req.wLength = 0;
- return send_default_control(pipe, &req, NULL);
+ return usb_send_default_control(pipe, &req, NULL);
}
// Send USB HID SetIdle request.
req.wValue = (ms/4)<<8;
req.wIndex = 0;
req.wLength = 0;
- return send_default_control(pipe, &req, NULL);
+ return usb_send_default_control(pipe, &req, NULL);
}
#define KEYREPEATWAITMS 500
req.wValue = USB_DT_HUB<<8;
req.wIndex = 0;
req.wLength = sizeof(*desc);
- return send_default_control(pipe, &req, desc);
+ return usb_send_default_control(pipe, &req, desc);
}
static int
req.wIndex = port + 1;
req.wLength = 0;
mutex_lock(&hub->lock);
- int ret = send_default_control(hub->usbdev->defpipe, &req, NULL);
+ int ret = usb_send_default_control(hub->usbdev->defpipe, &req, NULL);
mutex_unlock(&hub->lock);
return ret;
}
req.wIndex = port + 1;
req.wLength = 0;
mutex_lock(&hub->lock);
- int ret = send_default_control(hub->usbdev->defpipe, &req, NULL);
+ int ret = usb_send_default_control(hub->usbdev->defpipe, &req, NULL);
mutex_unlock(&hub->lock);
return ret;
}
req.wIndex = port + 1;
req.wLength = sizeof(*sts);
mutex_lock(&hub->lock);
- int ret = send_default_control(hub->usbdev->defpipe, &req, sts);
+ int ret = usb_send_default_control(hub->usbdev->defpipe, &req, sts);
mutex_unlock(&hub->lock);
return ret;
}
req.wIndex = 0;
req.wLength = 1;
unsigned char maxlun;
- int ret = send_default_control(pipe, &req, &maxlun);
+ int ret = usb_send_default_control(pipe, &req, &maxlun);
if (ret)
return 0;
return maxlun;
// Send a message to the default control pipe of a device.
int
-send_default_control(struct usb_pipe *pipe, const struct usb_ctrlrequest *req
- , void *data)
+usb_send_default_control(struct usb_pipe *pipe, const struct usb_ctrlrequest *req
+ , void *data)
{
return usb_send_control(pipe, req->bRequestType & USB_DIR_IN
, req, sizeof(*req), data, req->wLength);
req.wValue = USB_DT_DEVICE<<8;
req.wIndex = 0;
req.wLength = 8;
- return send_default_control(pipe, &req, dinfo);
+ return usb_send_default_control(pipe, &req, dinfo);
}
static struct usb_config_descriptor *
req.wValue = USB_DT_CONFIG<<8;
req.wIndex = 0;
req.wLength = sizeof(cfg);
- int ret = send_default_control(pipe, &req, &cfg);
+ int ret = usb_send_default_control(pipe, &req, &cfg);
if (ret)
return NULL;
if (!config)
return NULL;
req.wLength = cfg.wTotalLength;
- ret = send_default_control(pipe, &req, config);
+ ret = usb_send_default_control(pipe, &req, config);
if (ret)
return NULL;
//hexdump(config, cfg.wTotalLength);
req.wValue = val;
req.wIndex = 0;
req.wLength = 0;
- return send_default_control(pipe, &req, NULL);
+ return usb_send_default_control(pipe, &req, NULL);
}
req.wValue = cntl->maxaddr + 1;
req.wIndex = 0;
req.wLength = 0;
- int ret = send_default_control(usbdev->defpipe, &req, NULL);
+ int ret = usb_send_default_control(usbdev->defpipe, &req, NULL);
if (ret) {
free_pipe(usbdev->defpipe);
return -1;
int usb_send_bulk(struct usb_pipe *pipe, int dir, void *data, int datasize);
int usb_poll_intr(struct usb_pipe *pipe, void *data);
int usb_32bit_pipe(struct usb_pipe *pipe_fl);
-int send_default_control(struct usb_pipe *pipe, const struct usb_ctrlrequest *req
- , void *data);
+int usb_send_default_control(struct usb_pipe *pipe
+ , const struct usb_ctrlrequest *req, void *data);
void free_pipe(struct usb_pipe *pipe);
struct usb_pipe *usb_getFreePipe(struct usb_s *cntl, u8 eptype);
void usb_desc2pipe(struct usb_pipe *pipe, struct usbdevice_s *usbdev