target: add API to temporarily mask target polling
authorAntonio Borneo <borneo.antonio@gmail.com>
Mon, 30 May 2022 20:49:12 +0000 (22:49 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Mon, 15 Aug 2022 13:22:06 +0000 (13:22 +0000)
commit0d56f379b55b24959c88e705a83e1fbb826b75e7
treef17207d38580093526c5635198d6f26d01242772
parentc3138e2d805b94b81ba10bc7fcec47689704f60e
target: add API to temporarily mask target polling

The same flag 'jtag_poll' is currently used as local data for the
command 'poll' and to temporarily mask the target polling.
This can cause unexpected behavior if the command 'poll' is
executed while polling is temporarily masked.

Add a new flag 'jtag_poll_en' to hold the temporarily mask
condition and keep 'jtag_poll' for the 'poll' command only.

While there, change the initial assignment of 'jtag_poll' using
the proper boolean value.

Change-Id: I18dcf7c65b07aefadf046caaa2fcd2d74fa6fbae
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7009
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
src/flash/nor/psoc4.c
src/helper/command.c
src/jtag/core.c
src/jtag/jtag.h
src/target/target.c