summaryrefslogtreecommitdiff
path: root/payloads/libpayload/include
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload/include')
-rw-r--r--payloads/libpayload/include/libpayload.h2
-rw-r--r--payloads/libpayload/include/usb/usb.h7
-rw-r--r--payloads/libpayload/include/usb/usbdisk.h4
3 files changed, 10 insertions, 3 deletions
diff --git a/payloads/libpayload/include/libpayload.h b/payloads/libpayload/include/libpayload.h
index 9ad3c82dd1..060e6b1919 100644
--- a/payloads/libpayload/include/libpayload.h
+++ b/payloads/libpayload/include/libpayload.h
@@ -114,6 +114,8 @@ void rtc_read_clock(struct tm *tm);
* @{
*/
int usb_initialize(void);
+int usbhid_havechar(void);
+int usbhid_getchar(void);
/** @} */
/**
diff --git a/payloads/libpayload/include/usb/usb.h b/payloads/libpayload/include/usb/usb.h
index 1500b75a1e..d06e8077db 100644
--- a/payloads/libpayload/include/usb/usb.h
+++ b/payloads/libpayload/include/usb/usb.h
@@ -114,7 +114,7 @@ struct usbdev_hc {
struct usbdev_hc *next;
pcidev_t bus_address;
u32 reg_base;
- usbdev_t devices[128]; // dev 0 is root hub, 127 is last addressable
+ usbdev_t *devices[128]; // dev 0 is root hub, 127 is last addressable
void (*start) (hci_t *controller);
void (*stop) (hci_t *controller);
void (*reset) (hci_t *controller);
@@ -124,6 +124,9 @@ struct usbdev_hc {
int (*bulk) (endpoint_t *ep, int size, u8 *data, int finalize);
int (*control) (usbdev_t *dev, pid_t pid, int dr_length,
void *devreq, int data_length, u8 *data);
+ void* (*create_intr_queue) (endpoint_t *ep, int reqsize, int reqcount, int reqtiming);
+ void (*destroy_intr_queue) (endpoint_t *ep, void *queue);
+ u8* (*poll_intr_queue) (void *queue);
void *instance;
};
@@ -221,4 +224,6 @@ gen_bmRequestType (dev_req_dir dir, dev_req_type type, dev_req_recp recp)
return (dir << 7) | (type << 5) | recp;
}
+void usb_detach_device(hci_t *controller, int devno);
+int usb_attach_device(hci_t *controller, int hubaddress, int port, int lowspeed);
#endif
diff --git a/payloads/libpayload/include/usb/usbdisk.h b/payloads/libpayload/include/usb/usbdisk.h
index 3ac24631ac..3eb2f627a8 100644
--- a/payloads/libpayload/include/usb/usbdisk.h
+++ b/payloads/libpayload/include/usb/usbdisk.h
@@ -38,7 +38,7 @@
*
* @param dev descriptor for the USB storage device
*/
-void usbdisk_create (usbdev_t *dev);
+void __attribute__((weak)) usbdisk_create (usbdev_t *dev);
/**
* To be implemented by libpayload-client. It's called by the USB stack
@@ -46,6 +46,6 @@ void usbdisk_create (usbdev_t *dev);
*
* @param dev descriptor for the USB storage device
*/
-void usbdisk_remove (usbdev_t *dev);
+void __attribute__((weak)) usbdisk_remove (usbdev_t *dev);
#endif