aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple/usb/stm32f1/usb_lib_globals.h
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2012-06-03 06:00:41 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2012-06-03 22:40:39 -0400
commit378c3a70f81ddfbbddf3656977f81b7dfd8f96cd (patch)
tree0d2853cf5d739cdba5a596387e8709eb1969e185 /libmaple/usb/stm32f1/usb_lib_globals.h
parentb522a442b805507e7a8fc93ba8011068b8b57d96 (diff)
downloadlibrambutan-378c3a70f81ddfbbddf3656977f81b7dfd8f96cd.tar.gz
librambutan-378c3a70f81ddfbbddf3656977f81b7dfd8f96cd.zip
Slightly improve and generify the USB infrastructure.
The good news is that <libmaple/usb.h> and <libmaple/usb_cdcacm.h> did turn out generic enough in what they specify to go on unchanged. However, we can't just go on assuming that there's USB just because we're on an F1. Now that there's value line in the tree, we need to be more careful (value line F1s don't have USB peripherals). To that end, make all the F1 board-includes/*.mk files specify what line their MCU is with an MCU_F1_LINE variable. Use that to hack libmaple/usb/rules.mk so we only try to build the USB module under appropriate circumstances. While we're at it, add a vector_symbols.inc for value line MCUs under support/ld/. We need this to get the target-config.mk modifications implied by the addition of MCU_F1_LINE. We'll fix up some other performance-line-isms under libmaple/stm32f1 in a separate commit. Also in libmaple/usb/: - Move everything into a new stm32f1 directory. Due to aforementioned rules.mk hacks, there is no immediate need for an stm32f2 directory (USB support doesn't exist there). - Update the README for style and content. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Diffstat (limited to 'libmaple/usb/stm32f1/usb_lib_globals.h')
-rw-r--r--libmaple/usb/stm32f1/usb_lib_globals.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/libmaple/usb/stm32f1/usb_lib_globals.h b/libmaple/usb/stm32f1/usb_lib_globals.h
new file mode 100644
index 0000000..1cd2754
--- /dev/null
+++ b/libmaple/usb/stm32f1/usb_lib_globals.h
@@ -0,0 +1,55 @@
+/******************************************************************************
+ * 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_LIB_GLOBALS_H_
+#define _USB_LIB_GLOBALS_H_
+
+/* usb_lib headers */
+#include "usb_type.h"
+#include "usb_core.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern USER_STANDARD_REQUESTS User_Standard_Requests;
+extern USER_STANDARD_REQUESTS *pUser_Standard_Requests;
+
+extern DEVICE_PROP Device_Property;
+extern DEVICE_PROP *pProperty;
+
+extern DEVICE_INFO Device_Info;
+extern DEVICE_INFO *pInformation;
+
+extern DEVICE Device_Table;
+extern u16 SaveRState;
+extern u16 SaveTState;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif