aboutsummaryrefslogtreecommitdiffstats
path: root/core/usb/usb.h
diff options
context:
space:
mode:
authorAJM <poslathian@poslathian.(none)>2010-04-11 14:26:12 -0400
committerbnewbold <bnewbold@robocracy.org>2010-05-20 22:09:15 -0400
commit9088e1df65a6f7c223e20f2bc83a6da63161d300 (patch)
tree118d8d49be408772984cdeaf17694f2b768b9b04 /core/usb/usb.h
parent73444bbbe2aebb9d2d4ed62e52f6fde69532bbeb (diff)
downloadlibrambutan-9088e1df65a6f7c223e20f2bc83a6da63161d300.tar.gz
librambutan-9088e1df65a6f7c223e20f2bc83a6da63161d300.zip
added the skeleton dir for the usb application lib, since were still dependent on st for low level access, the entire usb
stack lives in the core application level (not in libmaple). the next project should be to include some low level usb stack in the libmaple
Diffstat (limited to 'core/usb/usb.h')
-rw-r--r--core/usb/usb.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/core/usb/usb.h b/core/usb/usb.h
new file mode 100644
index 0000000..fa40123
--- /dev/null
+++ b/core/usb/usb.h
@@ -0,0 +1,26 @@
+#ifndef _USB_H_
+#define _USB_H_
+
+#define USB_ISR_ADDR (0x08000090)
+#define USB_SERIAL_ENDP_TXADDR ((uint32) 0xC0)
+#define USB_SERIAL_ENDP_RXADDR ((uint32) 0x110)
+#define USB_SERIAL_ENDP_TX ((uint16) 0x1)
+#define USB_SERIAL_ENDP_RX ((uint16) 0x3)
+#define USB_SERIAL_BUF_SIZE (0x40)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void usb_lpIRQHandler(void);
+void usb_userToPMABufferCopy(uint8 *pbUsrBuf,uint16 wPMABufAddr,uint16 wNBytes);
+void usb_PMAToUserBufferCopy(uint8 *pbUsrBuf,uint16 wPMABufAddr,uint16 wNBytes);
+void usb_serialWriteStr(const char *outStr);
+void usb_serialWriteChar(unsigned char ch);
+uint8_t usb_serialGetRecvLen();
+void usb_copyRecvBuffer(unsigned char* dest, uint8 len);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+#endif //_USB_H