aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/bootVect.h
diff options
context:
space:
mode:
authorajmeyer@mit.edu <ajmeyer@mit.edu@749a229e-a60e-11de-b98f-4500b42dc123>2010-01-07 03:31:35 +0000
committerajmeyer@mit.edu <ajmeyer@mit.edu@749a229e-a60e-11de-b98f-4500b42dc123>2010-01-07 03:31:35 +0000
commit2addfe8c42c6bcdc0a15c751e2436447b73d03fe (patch)
tree07e569cd0fe7fd4a06cb5f71e12ba76dda3d5e2c /src/lib/bootVect.h
parent5f423270cde82f9dfffb52bdd617e5eb439921c5 (diff)
downloadlibrambutan-2addfe8c42c6bcdc0a15c751e2436447b73d03fe.tar.gz
librambutan-2addfe8c42c6bcdc0a15c751e2436447b73d03fe.zip
Added a print class for USB, works identically to the Serial object. Bugs out if you try and pump more than 64 bytes through it in a single packet (which is really the OS's decision). This can be fixed
git-svn-id: https://leaflabs.googlecode.com/svn/trunk/library@93 749a229e-a60e-11de-b98f-4500b42dc123
Diffstat (limited to 'src/lib/bootVect.h')
-rw-r--r--src/lib/bootVect.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/lib/bootVect.h b/src/lib/bootVect.h
new file mode 100644
index 0000000..5bcb42b
--- /dev/null
+++ b/src/lib/bootVect.h
@@ -0,0 +1,52 @@
+/* *****************************************************************************
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * ****************************************************************************/
+
+/**
+ * @file HardwareUsb.h
+ *
+ * @brief Defines the maple boot vector structure
+ */
+
+#ifndef _BOOTVECT_H_
+#define _BOOTVECT_H_
+
+#define BOOTLOADER_VECT_TABLE ((uint32_t*)0x20000000)
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+typedef void (*FuncPtr)(void);
+
+typedef struct {
+ FuncPtr serial_tx_cb;
+ FuncPtr serial_rx_cb;
+ FuncPtr serial_linecoding_cb;
+ uint32_t* serial_count_in;
+ uint32_t* serial_count_out;
+ uint8_t* serial_buffer_out;
+ void* linecoding;
+ uint8_t major_rev;
+ uint8_t minor_rev;
+ void* usb_device_ptr;
+ void* usb_local_obj_ptr;
+} BootVectTable;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _BOOTVECT_H_