diff options
author | Zach Eveland <zeveland@blacklabel-development.com> | 2011-11-09 14:04:59 -0500 |
---|---|---|
committer | Zach Eveland <zeveland@blacklabel-development.com> | 2011-11-09 14:04:59 -0500 |
commit | 4b7771a8159f47891311bbac6d97eac33868bc65 (patch) | |
tree | 729f0940bad89ec074aeb4cdb189f1b2839e744a /bootloaders/diskloader/src/USBAPI.h | |
parent | bca358b9739c8bf7e4dd9808b97acc90cf0b6ab3 (diff) |
restored original non-interrupt-driven DiskLoader
Interrupt-driven version was a dead-end - too many bugs with that approach.
Diffstat (limited to 'bootloaders/diskloader/src/USBAPI.h')
-rw-r--r-- | bootloaders/diskloader/src/USBAPI.h | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/bootloaders/diskloader/src/USBAPI.h b/bootloaders/diskloader/src/USBAPI.h deleted file mode 100644 index f8d71c8..0000000 --- a/bootloaders/diskloader/src/USBAPI.h +++ /dev/null @@ -1,64 +0,0 @@ - - -#ifndef __USBAPI__ -#define __USBAPI__ - -#if defined(USBCON) - -//================================================================================ -//================================================================================ -// USB - -class USB_ -{ -public: - USB_(); - bool configured(); - - void attach(); - void detach(); // Serial port goes down too... - void poll(); -}; -extern USB_ USB; - -//================================================================================ -//================================================================================ -// Low level API - -typedef struct -{ - uint8_t bmRequestType; - uint8_t bRequest; - uint8_t wValueL; - uint8_t wValueH; - uint16_t wIndex; - uint16_t wLength; -} Setup; - -//================================================================================ -//================================================================================ -// CDC 'Driver' - -int CDC_GetInterface(uint8_t* interfaceNum); -int CDC_GetDescriptor(int i); -bool CDC_Setup(Setup& setup); - -//================================================================================ -//================================================================================ - -#define TRANSFER_PGM 0x80 -#define TRANSFER_RELEASE 0x40 -#define TRANSFER_ZERO 0x20 - -int USB_SendControl(uint8_t flags, const void* d, int len); -int USB_RecvControl(void* d, int len); - -uint8_t USB_Available(uint8_t ep); -int USB_Send(uint8_t ep, const void* data, int len); // blocking -int USB_Recv(uint8_t ep, void* data, int len); // non-blocking -void USB_Recv_block(u8 ep, u8* dst, int len); // blocking -int USB_Recv(uint8_t ep); // non-blocking -void USB_Flush(uint8_t ep); - -#endif -#endif /* if defined(USBCON) */ |