avr-fw-modules/usb/include/usb/usb.h

63 lines
823 B
C

#pragma once
/*
First try of basic USB API for AVR
*/
struct usb_device;
typedef struct usb_device USB_DEVICE;
#include <usb/usb_spec.h>
#include <usb/usb_spec_cdc.h>
#include <usb/types.h>
#include <usb/usb_descriptor.h>
#include <usb/usb_configuration.h>
#include <usb/usb_interrupt.h>
#include <usb/usb_endpoint.h>
#include <usb/usb_device.h>
#include <usb/usb_device_avr.h>
// Record setup requests in ram with hardware status
//#define USB_DEBUG_SETUP
#ifdef USB_DEBUG_SETUP
typedef struct {
uint8_t cfg0x,
cfg1x,
sta0x,
sta1x,
intx,
ienx;
uint16_t bcx;
usb_device_request_t
request;
} usb_debug_setup_t;
extern usb_debug_setup_t *usb_debug_setup;
extern int *usb_debug_index;
extern int *usb_debug_size;
#endif
#include <stdint.h>
#include <stdio.h>