summaryrefslogtreecommitdiff
path: root/src/helper
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-11-10 10:16:13 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-11-10 10:16:13 +0000
commit3de3de0b37ec1bec5da7b3737a063fe28c332d46 (patch)
treee84649abbbf762b9e8abddf6cc2025b0ea4a7df7 /src/helper
parent0bbe5708820c6dcbef4937371c95bda8f5ba77a6 (diff)
downloadopenocd+libswd-3de3de0b37ec1bec5da7b3737a063fe28c332d46.tar.gz
openocd+libswd-3de3de0b37ec1bec5da7b3737a063fe28c332d46.tar.bz2
openocd+libswd-3de3de0b37ec1bec5da7b3737a063fe28c332d46.tar.xz
openocd+libswd-3de3de0b37ec1bec5da7b3737a063fe28c332d46.zip
execute reset init upon power restore / srst deassert
git-svn-id: svn://svn.berlios.de/openocd/trunk@1150 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/helper')
-rw-r--r--src/helper/startup.tcl20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/helper/startup.tcl b/src/helper/startup.tcl
index 75940e91..f91ba7ed 100644
--- a/src/helper/startup.tcl
+++ b/src/helper/startup.tcl
@@ -327,3 +327,23 @@ proc cpu {args} {
}
}
+proc power_restore {} {
+ puts "Sensed power restore."
+ reset init
+}
+
+add_help_text power_restore "Overridable procedure run when power restore is detected. Runs 'reset init' by default."
+
+proc power_dropout {} {
+ puts "Sensed power dropout."
+}
+
+proc srst_deasserted {} {
+ puts "Sensed nSRST deasserted."
+ reset init
+}
+add_help_text srst_deasserted "Overridable procedure run when srst deassert is detected. Runs 'reset init' by default."
+
+proc srst_asserted {} {
+ puts "Sensed nSRST asserted."
+}