aboutsummaryrefslogtreecommitdiff
path: root/bootloaders/nuevo_diskloader/src/USBAPI.h
diff options
context:
space:
mode:
authorZach Eveland <zeveland@blacklabel-development.com>2011-10-27 10:23:06 -0400
committerZach Eveland <zeveland@blacklabel-development.com>2011-10-27 10:23:06 -0400
commitda03595c32f3822d0b8c96ab61ec7b65131196ee (patch)
tree2c3feb6fe620b48aeed3497d5f5fab0ac0698b6c /bootloaders/nuevo_diskloader/src/USBAPI.h
parent29cfd9e9fe12cc10fc8f4bae5c884c514ad95902 (diff)
brought nuevo_diskloader changes over to diskloader
Moved nuevo_diskloader files into diskloader directory. Changed back to real PID for Leonardo
Diffstat (limited to 'bootloaders/nuevo_diskloader/src/USBAPI.h')
-rw-r--r--bootloaders/nuevo_diskloader/src/USBAPI.h83
1 files changed, 0 insertions, 83 deletions
diff --git a/bootloaders/nuevo_diskloader/src/USBAPI.h b/bootloaders/nuevo_diskloader/src/USBAPI.h
deleted file mode 100644
index 1724ce1..0000000
--- a/bootloaders/nuevo_diskloader/src/USBAPI.h
+++ /dev/null
@@ -1,83 +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;
-
-//================================================================================
-//================================================================================
-// Serial over CDC (Serial1 is the physical port)
-
-class Serial_
-{
-public:
- void begin(uint16_t baud_count);
- void end(void);
-
- virtual int available(void);
- virtual int peek(void);
- virtual int read(void);
- virtual void flush(void);
- virtual size_t write(uint8_t);
-};
-extern Serial_ Serial;
-
-//================================================================================
-//================================================================================
-// 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) */ \ No newline at end of file