summaryrefslogtreecommitdiff
path: root/Debugger/debug_comm.h
diff options
context:
space:
mode:
authorTC Wan2010-12-27 16:24:35 +0800
committerTC Wan2010-12-27 16:24:35 +0800
commitdedac1e444d0def4c124c989ed24ecb3b38c3cdd (patch)
tree531bd8acc9d064188b7a1cae96b657f2a3a602c7 /Debugger/debug_comm.h
parentf9ca2e03b7ea1bc4db4044f72116cdf498d30dd1 (diff)
referenced c functions via a dummy header file
Use .extern to reference C functions in NxOS or NXT Firmware
Diffstat (limited to 'Debugger/debug_comm.h')
-rw-r--r--Debugger/debug_comm.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/Debugger/debug_comm.h b/Debugger/debug_comm.h
new file mode 100644
index 0000000..e5747e3
--- /dev/null
+++ b/Debugger/debug_comm.h
@@ -0,0 +1,45 @@
+/** @file debug_comm.h
+ * @brief Shared C/ASM header file for debugger communications
+ *
+ */
+
+/* Copyright (C) 2007-2010 the NxOS developers
+ *
+ * Module Developed by: TC Wan <tcwan@cs.usm.my>
+ *
+ * See AUTHORS for a full list of the developers.
+ *
+ * See COPYING for redistribution license
+ *
+ */
+
+#ifndef __DEBUG_COMM_H__
+#define __DEBUG_COMM_H__
+
+#include "_c_arm_macros.h"
+
+/* This is a place holder header file to allow for interfacing with C Routines in either
+ * NxOS or NXT Firmware.
+ *
+ * Since the header files from the original source trees were meant for C programs, we can't
+ * include them directly. Here we just use .extern to reference the routines.
+ */
+
+#ifdef __NXOS__
+
+ .extern nx_usb_is_connected
+ .extern nx_usb_can_write
+ .extern nx_usb_write
+ .extern nx_usb_data_written
+ .extern nx_usb_read
+ .extern nx_usb_data_read
+
+#else /* NXT Firmware */
+
+ .extern cCommInit
+ .extern cCommCtrl
+ .extern cCommExit
+
+#endif
+
+#endif