From 9088e1df65a6f7c223e20f2bc83a6da63161d300 Mon Sep 17 00:00:00 2001 From: AJM Date: Sun, 11 Apr 2010 14:26:12 -0400 Subject: 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 --- core/usb/usb.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 core/usb/usb.h (limited to 'core/usb/usb.h') 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 -- cgit v1.2.3