forked from haraldwolff/avr-fw-modules
47 lines
688 B
C
47 lines
688 B
C
#pragma once
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <avr/io.h>
|
|
#include <hwo/fifo.h>
|
|
|
|
|
|
#define USB_EP_CONTROL (0)
|
|
#define USB_EP_ISOCHRONOUS (1)
|
|
#define USB_EP_BULK (2)
|
|
#define USB_EP_INTERRUPT (3)
|
|
|
|
#define USB_EP_IN 1
|
|
#define USB_EP_OUT 0
|
|
|
|
#define USB_EPCB_TXIN 0
|
|
#define USB_EPCB_RXOUT 1
|
|
#define USB_EPCB_SETUP 2
|
|
|
|
#define USB_EP0_SIZE 64
|
|
|
|
enum _usb_controlep_stages { IDLE, SETUP, DATA, STATUS };
|
|
|
|
struct usb_ll_endpoint
|
|
{
|
|
struct usb_standard_endpoint_descriptor*
|
|
desc;
|
|
|
|
uint8_t *buffer;
|
|
int blen,
|
|
bpos;
|
|
|
|
usb_device_request_t
|
|
*request;
|
|
|
|
usb_cb_setup_request_t
|
|
cb_setup;
|
|
|
|
};
|
|
typedef struct usb_ll_endpoint
|
|
usb_ll_endpoint_t;
|
|
|
|
|
|
|
|
|