FreeCalypso > hg > freecalypso-tools
changeset 115:c41511b79b1d
fc-tmsh: rfpr command implemented
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 16 Jan 2017 20:25:48 +0000 |
parents | eb54195fded6 |
children | 3eb75280b38b |
files | rvinterf/tmsh/l1cmd.c rvinterf/tmsh/usercmd.c |
diffstat | 2 files changed, 16 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/rvinterf/tmsh/l1cmd.c Mon Jan 16 20:14:48 2017 +0000 +++ b/rvinterf/tmsh/l1cmd.c Mon Jan 16 20:25:48 2017 +0000 @@ -164,3 +164,17 @@ return(ERROR_BUG); } } + +cmd_rfpr(argc, argv) + char **argv; +{ + u16 index; + u_char cmdpkt[5]; + + index = strtoul(argv[1], 0, 0); + cmdpkt[1] = RF_PARAM_READ; + cmdpkt[2] = index; + cmdpkt[3] = index >> 8; + send_etm_cmd(cmdpkt, 3); + return(0); +}
--- a/rvinterf/tmsh/usercmd.c Mon Jan 16 20:14:48 2017 +0000 +++ b/rvinterf/tmsh/usercmd.c Mon Jan 16 20:25:48 2017 +0000 @@ -24,6 +24,7 @@ extern int cmd_r16(); extern int cmd_r32(); extern int cmd_rfe(); +extern int cmd_rfpr(); extern int cmd_rfpw(); extern int cmd_scr(); extern int cmd_scw(); @@ -65,6 +66,7 @@ {"r16", 1, 2, cmd_r16}, {"r32", 1, 2, cmd_r32}, {"rfe", 1, 1, cmd_rfe}, + {"rfpr", 1, 1, cmd_rfpr}, {"rfpw", 2, 3, cmd_rfpw}, {"scr", 1, 1, cmd_scr}, {"scw", 2, 2, cmd_scw},