zy1000: fix tcl command to read power dropout status

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
__archive__
Øyvind Harboe 2010-05-05 08:19:40 +02:00
parent 82ea640830
commit 2fba796e27
1 changed files with 2 additions and 3 deletions

View File

@ -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;
}