From: OpenOCD-Gerrit <ope...@us...> - 2020-07-26 19:16:51
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 3e6f4f8b213ce2c61b052b16606cfc81ba6d7cc4 (commit) from 9b32a06dad0aa6fc9c3896b21d3c32015487a090 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 3e6f4f8b213ce2c61b052b16606cfc81ba6d7cc4 Author: Antonio Borneo <bor...@gm...> Date: Sat Apr 4 19:47:09 2020 +0200 drivers/bitbang: blink LED on SWD The blinking was implemented for JTAG only. Extend it to SWD. There is no error check on SWD exchange. Add a FIXME for further fix. Change-Id: I42a6708c54b1eefaf691e0fe09ca58c42b2764fd Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: http://openocd.zylin.com/5771 Tested-by: jenkins diff --git a/src/jtag/drivers/bitbang.c b/src/jtag/drivers/bitbang.c index 4417e1258..2a78fa248 100644 --- a/src/jtag/drivers/bitbang.c +++ b/src/jtag/drivers/bitbang.c @@ -394,6 +394,11 @@ static void bitbang_swd_exchange(bool rnw, uint8_t buf[], unsigned int offset, u { LOG_DEBUG("bitbang_swd_exchange"); + if (bitbang_interface->blink) { + /* FIXME: we should manage errors */ + bitbang_interface->blink(1); + } + for (unsigned int i = offset; i < bit_cnt + offset; i++) { int bytec = i/8; int bcval = 1 << (i % 8); @@ -410,6 +415,11 @@ static void bitbang_swd_exchange(bool rnw, uint8_t buf[], unsigned int offset, u bitbang_interface->swd_write(1, swdio); } + + if (bitbang_interface->blink) { + /* FIXME: we should manage errors */ + bitbang_interface->blink(0); + } } static int bitbang_swd_switch_seq(enum swd_special_seq seq) ----------------------------------------------------------------------- Summary of changes: src/jtag/drivers/bitbang.c | 10 ++++++++++ 1 file changed, 10 insertions(+) hooks/post-receive -- Main OpenOCD repository |