summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTat-Chee Wan (USM)2011-06-22 07:48:01 +0800
committerTat-Chee Wan (USM)2011-06-22 07:48:01 +0800
commitabedf371a610485c3de77af2a05e2699627ff358 (patch)
treeace9c34f3a6485b9771a53da36ecfcc6ebab99dc
parentf9b1af8d3ccd6f6b862c483aeb8a4dd577d9c8ba (diff)
more refactoring, moved platform specific includes to debug_runlooptasks.h
-rw-r--r--Debugger/debug_comm.S1
-rw-r--r--Debugger/debug_runlooptasks.S15
-rw-r--r--Debugger/debug_runlooptasks.h (renamed from Debugger/debug_comm.h)17
3 files changed, 13 insertions, 20 deletions
diff --git a/Debugger/debug_comm.S b/Debugger/debug_comm.S
index d0ea213..e237999 100644
--- a/Debugger/debug_comm.S
+++ b/Debugger/debug_comm.S
@@ -17,7 +17,6 @@
#include "debug_macros.h"
#include "debug_stub.h"
#include "debug_internals.h"
-#include "debug_comm.h"
.extern dbg__sendCommMsg
diff --git a/Debugger/debug_runlooptasks.S b/Debugger/debug_runlooptasks.S
index 4115ad6..75c477c 100644
--- a/Debugger/debug_runlooptasks.S
+++ b/Debugger/debug_runlooptasks.S
@@ -70,6 +70,7 @@
#define __ASSEMBLY__
#define REBOOT_POWERDOWN
+#include "debug_runlooptasks.h"
#include "debug_internals.h"
#include "debug_macros.h"
@@ -97,8 +98,6 @@ dbg__runloopTasks:
* NXT Firmware Run Loop
*
****************************************************************************/
- .extern cCommCtrl
-
dbg__runloopTasks:
push {lr}
/* FIXME: Add necessary cXXXCtrl calls here */
@@ -108,7 +107,6 @@ dbg__runloopTasks:
#endif
#ifdef __NXOS__
- .extern nx_core_reset
/****************************************************************************
*
* NxOS Reboot Routine
@@ -118,11 +116,6 @@ dbg__runloopTasks:
b nx_core_reset /* Reboot Brick, won't return */
#else
- .extern dIOCtrlSetPower
- .extern dIOCtrlSetPwm
- .extern dIOCtrlTransfer
- .equ BOOT, 0xA55A
- .equ POWERDOWN, 0x5A00
/****************************************************************************
*
* NXT Firmware Reboot Routine
@@ -171,9 +164,6 @@ _dbg__reboot_wait:
#ifdef __NXOS__
.extern debug_OutCommBuf
- .extern nx_usb_is_connected
- .extern nx_usb_write
- .extern nx_usb_data_written
/****************************************************************************
*
* NxOS Communications Driver Interface Routine
@@ -215,9 +205,6 @@ exit_dbg__sendCommMsg:
#else
- .extern dBtSendMsg
- .extern dUsbIsConfigured
- .extern dUsbWrite
/****************************************************************************
*
* NXT Firmware Communications Driver Interface Routine
diff --git a/Debugger/debug_comm.h b/Debugger/debug_runlooptasks.h
index 7553240..360e0d1 100644
--- a/Debugger/debug_comm.h
+++ b/Debugger/debug_runlooptasks.h
@@ -1,9 +1,9 @@
-/** @file debug_comm.h
+/** @file debug_runlooptasks.h
* @brief Shared C/ASM header file for debugger communications
*
*/
-/* Copyright (C) 2007-2010 the NxOS developers
+/* Copyright (C) 2007-2011 the NxOS developers
*
* Module Developed by: TC Wan <tcwan@cs.usm.my>
*
@@ -13,8 +13,8 @@
*
*/
-#ifndef __DEBUG_COMM_H__
-#define __DEBUG_COMM_H__
+#ifndef __DEBUG_RUNLOOPTASKS_H__
+#define __DEBUG_RUNLOOPTASKS_H__
#include "_c_arm_macros.h"
@@ -27,12 +27,13 @@
#ifdef __NXOS__
- .extern nx_usb_is_connected
+ .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
+ .extern nx_core_reset
#else /* NXT Firmware */
@@ -48,6 +49,12 @@
.equ USB_CMD_READY, 0x01 /* From c_comm.iom */
.equ BT_CMD_READY, 0x02 /* From c_comm.iom */
+ .extern dIOCtrlSetPower
+ .extern dIOCtrlSetPwm
+ .extern dIOCtrlTransfer
+ .equ BOOT, 0xA55A /* from c_ioctrl.iom */
+ .equ POWERDOWN, 0x5A00 /* from c_ioctrl.iom */
+
#endif
#endif