2019-01-01 14:37:14 +00:00
|
|
|
#ifndef __USB_H
|
|
|
|
#define __USB_H
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2019-03-05 03:54:48 +00:00
|
|
|
struct usb_device;
|
|
|
|
struct usb_setup_request;
|
|
|
|
|
2019-01-01 14:37:14 +00:00
|
|
|
void usb_isr(void);
|
2019-01-01 15:03:45 +00:00
|
|
|
void usb_init(void);
|
2019-03-05 03:54:48 +00:00
|
|
|
void usb_connect(void);
|
|
|
|
|
|
|
|
void usb_poll(void);
|
|
|
|
int usb_irq_happened(void);
|
|
|
|
void usb_setup(struct usb_device *dev, const struct usb_setup_request *setup);
|
|
|
|
int usb_send(struct usb_device *dev, int epnum, const void *data, int total_count);
|
|
|
|
int usb_ack(struct usb_device *dev, int epnum);
|
|
|
|
int usb_err(struct usb_device *dev, int epnum);
|
|
|
|
int usb_recv(struct usb_device *dev, void *buffer, unsigned int buffer_len);
|
2019-01-01 14:37:14 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|