aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple/usb/usb_config.h
diff options
context:
space:
mode:
Diffstat (limited to 'libmaple/usb/usb_config.h')
-rw-r--r--libmaple/usb/usb_config.h46
1 files changed, 30 insertions, 16 deletions
diff --git a/libmaple/usb/usb_config.h b/libmaple/usb/usb_config.h
index 6eb88a5..9facb96 100644
--- a/libmaple/usb/usb_config.h
+++ b/libmaple/usb/usb_config.h
@@ -1,11 +1,32 @@
-/* insert license */
+/******************************************************************************
+ * The MIT License
+ *
+ * Copyright (c) 2011 LeafLabs LLC.
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use, copy,
+ * modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *****************************************************************************/
#ifndef __USB_CONFIG_H
#define __USB_CONFIG_H
-#include "usb_lib.h"
-#include "gpio.h"
-
/******************************************************************************
******************************************************************************
***
@@ -58,17 +79,17 @@
#define VCOM_CTRL_TX_ADDR 0x80
#define VCOM_CTRL_EPSIZE 0x40
-#define VCOM_TX_ENDP ENDP1
+#define VCOM_TX_ENDP 1
#define VCOM_TX_EPNUM 0x01
#define VCOM_TX_ADDR 0xC0
#define VCOM_TX_EPSIZE 0x40
-#define VCOM_NOTIFICATION_ENDP ENDP2
+#define VCOM_NOTIFICATION_ENDP 2
#define VCOM_NOTIFICATION_EPNUM 0x02
#define VCOM_NOTIFICATION_ADDR 0x100
#define VCOM_NOTIFICATION_EPSIZE 0x40
-#define VCOM_RX_ENDP ENDP3
+#define VCOM_RX_ENDP 3
#define VCOM_RX_EPNUM 0x03
#define VCOM_RX_ADDR 0x110
#define VCOM_RX_EPSIZE 0x40
@@ -78,16 +99,9 @@
#define NUM_ENDPTS 0x04
-/* handle all usb interrupts */
-#define ISR_MSK (CNTR_CTRM | \
- CNTR_WKUPM | \
- CNTR_SUSPM | \
- CNTR_ERRM | \
- CNTR_SOFM | \
- CNTR_ESOFM | \
- CNTR_RESETM)
+/* handle CTRM, WKUPM, SUSPM, ERRM, SOFM, ESOFM, RESETM */
+#define ISR_MSK 0xBF00
#define F_SUSPEND_ENABLED 1
-
#endif