From: Øyvind Harboe Date: Wed, 5 May 2010 06:19:40 +0000 (+0200) Subject: zy1000: fix tcl command to read power dropout status X-Git-Tag: v0.5.0-rc1~716 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2fba796e27fe37076380f90aa4df986db2b06685;p=openocd zy1000: fix tcl command to read power dropout status Signed-off-by: Øyvind Harboe --- diff --git a/src/jtag/zy1000/zy1000.c b/src/jtag/zy1000/zy1000.c index 2fac1767..b3f94e5c 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; }