aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple/usb/usb_config.h
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2011-09-23 17:31:47 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2011-10-18 13:30:17 -0400
commit24e294c9b0be5f2f24c9d7b9cddd163ac22efab2 (patch)
tree9454b38a13c721d6d9d730b21594411b8fdc7662 /libmaple/usb/usb_config.h
parent985138fd8952edeb58606b0c35cf60aa0039c14f (diff)
downloadlibrambutan-24e294c9b0be5f2f24c9d7b9cddd163ac22efab2.tar.gz
librambutan-24e294c9b0be5f2f24c9d7b9cddd163ac22efab2.zip
usb: Prepare for moving some files to usb_reg_map.h.
usb_config.h: Remove usb_regs.h dependency; fix includes; add license. usb_callbacks.h: Change includes to the pieces of usb_lib/ it uses, which doesn't include usb_regs.h. descriptors.h: Remove unused usb_lib.h include. usb.h: Remove unused usb_lib.h include. Some cosmetic commenting. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
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