mirror of
https://github.com/im-tomu/foboot.git
synced 2024-09-20 02:40:09 +00:00
d89eea3934
Due to some subtle quirks, as well as a poorly-implemented state machine, foboot was not compatible with many Desktop devices. This should fix the implementation so that it is more compatible. Signed-off-by: Sean Cross <sean@xobs.io>
30 lines
591 B
C
30 lines
591 B
C
#ifndef __USB_H
|
|
#define __USB_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
struct usb_setup_request;
|
|
|
|
void usb_isr(void);
|
|
void usb_init(void);
|
|
void usb_connect(void);
|
|
void usb_disconnect(void);
|
|
|
|
int usb_irq_happened(void);
|
|
void usb_setup(const struct usb_setup_request *setup);
|
|
int usb_send(const void *data, int total_count);
|
|
void usb_ack_in(void);
|
|
void usb_ack_out(void);
|
|
void usb_err(void);
|
|
int usb_recv(void *buffer, unsigned int buffer_len);
|
|
void usb_poll(void);
|
|
int usb_wait_for_send_done(void);
|
|
void usb_recv_done(void);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif |