From 2fba796e27fe37076380f90aa4df986db2b06685 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Harboe?= Date: Wed, 5 May 2010 08:19:40 +0200 Subject: [PATCH] zy1000: fix tcl command to read power dropout status MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Øyvind Harboe --- src/jtag/zy1000/zy1000.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/jtag/zy1000/zy1000.c b/src/jtag/zy1000/zy1000.c index 2fac1767a..b3f94e5cd 100644 --- a/src/jtag/zy1000/zy1000.c +++ b/src/jtag/zy1000/zy1000.c @@ -434,10 +434,9 @@ zylinjtag_Jim_Command_powerstatus(Jim_Interp *interp, return JIM_ERR; } - uint32_t status; - ZY1000_PEEK(ZY1000_JTAG_BASE + 0x10, status); + bool dropout = readPowerDropout(); - Jim_SetResult(interp, Jim_NewIntObj(interp, (status&0x80) != 0)); + Jim_SetResult(interp, Jim_NewIntObj(interp, dropout)); return JIM_OK; }