diff options
author | Øyvind Harboe <oyvind.harboe@zylin.com> | 2010-05-05 08:19:40 +0200 |
---|---|---|
committer | Øyvind Harboe <oyvind.harboe@zylin.com> | 2010-05-05 15:24:24 +0200 |
commit | 2fba796e27fe37076380f90aa4df986db2b06685 (patch) | |
tree | d753641b66e5db2cb772613d269e0237308bbe5c | |
parent | 82ea640830fe13f9ab8ef33c65a76480b697f856 (diff) | |
download | riscv-openocd-2fba796e27fe37076380f90aa4df986db2b06685.zip riscv-openocd-2fba796e27fe37076380f90aa4df986db2b06685.tar.gz riscv-openocd-2fba796e27fe37076380f90aa4df986db2b06685.tar.bz2 |
zy1000: fix tcl command to read power dropout status
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
-rw-r--r-- | src/jtag/zy1000/zy1000.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/jtag/zy1000/zy1000.c b/src/jtag/zy1000/zy1000.c index 2fac176..b3f94e5 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; } |