| Line 1... |
Line 1... |
| 1 |
#ifndef __PROTOCOL_USB_USB_H__
|
1 |
#ifndef __PROTOCOL_USB_USB_H__
|
| 2 |
#define __PROTOCOL_USB_USB_H__
|
2 |
#define __PROTOCOL_USB_USB_H__
|
| 3 |
|
3 |
|
| 4 |
#include "global.h"
|
4 |
#include "../global.h"
|
| 5 |
|
5 |
|
| 6 |
struct usb_instance;
|
6 |
struct usb_instance;
|
| 7 |
|
7 |
|
| 8 |
union __attribute__((packed,aligned(4))) usb_ep0_buffer
|
8 |
union __attribute__((packed,aligned(4))) usb_ep0_buffer
|
| 9 |
{
|
9 |
{
|
| Line 285... |
Line 285... |
| 285 |
extern void usb_handle_timeout(const struct usb_instance* data, union usb_endpoint_number epnum, int bytesleft);
|
285 |
extern void usb_handle_timeout(const struct usb_instance* data, union usb_endpoint_number epnum, int bytesleft);
|
| 286 |
extern void usb_handle_xfer_complete(const struct usb_instance* data, union usb_endpoint_number epnum, int bytesleft);
|
286 |
extern void usb_handle_xfer_complete(const struct usb_instance* data, union usb_endpoint_number epnum, int bytesleft);
|
| 287 |
extern void usb_handle_setup_received(const struct usb_instance* data, union usb_endpoint_number epnum);
|
287 |
extern void usb_handle_setup_received(const struct usb_instance* data, union usb_endpoint_number epnum);
|
| 288 |
extern void usb_ep0_start_rx(const struct usb_instance* data, int non_setup, bool (*callback)(const struct usb_instance* data, int bytesleft));
|
288 |
extern void usb_ep0_start_rx(const struct usb_instance* data, int non_setup, bool (*callback)(const struct usb_instance* data, int bytesleft));
|
| 289 |
extern void usb_ep0_start_tx(const struct usb_instance* data, const void* buf, int len, bool last, bool (*callback)(const struct usb_instance* data, int bytesleft));
|
289 |
extern void usb_ep0_start_tx(const struct usb_instance* data, const void* buf, int len, bool last, bool (*callback)(const struct usb_instance* data, int bytesleft));
|
| 290 |
extern void usb_ep0_expect_setup(const struct usb_instance* data);
|
- |
|
| 291 |
extern void usb_start_rx(const struct usb_instance* data, union usb_endpoint_number ep, void* buf, int size);
|
290 |
extern void usb_start_rx(const struct usb_instance* data, union usb_endpoint_number ep, void* buf, int size);
|
| 292 |
extern void usb_start_tx(const struct usb_instance* data, union usb_endpoint_number ep, const void* buf, int size);
|
291 |
extern void usb_start_tx(const struct usb_instance* data, union usb_endpoint_number ep, const void* buf, int size);
|
| 293 |
extern void usb_set_stall(const struct usb_instance* data, union usb_endpoint_number ep, int stall);
|
292 |
extern void usb_set_stall(const struct usb_instance* data, union usb_endpoint_number ep, int stall);
|
| 294 |
extern void usb_configure_ep(const struct usb_instance* data, union usb_endpoint_number ep, enum usb_endpoint_type type, int maxpacket);
|
293 |
extern void usb_configure_ep(const struct usb_instance* data, union usb_endpoint_number ep, enum usb_endpoint_type type, int maxpacket);
|
| 295 |
extern void usb_unconfigure_ep(const struct usb_instance* data, union usb_endpoint_number ep);
|
294 |
extern void usb_unconfigure_ep(const struct usb_instance* data, union usb_endpoint_number ep);
|