aboutsummaryrefslogtreecommitdiff
path: root/src/target/target.h
diff options
context:
space:
mode:
authorAndreas Fritiofson <andreas.fritiofson@gmail.com>2011-07-15 22:18:39 +0200
committerAndreas Fritiofson <andreas.fritiofson@gmail.com>2011-10-09 00:00:52 +0200
commit3f6ef7a40bcff5e1278b662248902c45a1dc8f81 (patch)
treecf3a506ae661ceb9fb4b83ee154e97ba70ac9ac8 /src/target/target.h
parente56e5a3929a05d18e560c8e37f1985aeb4b95cc9 (diff)
downloadriscv-openocd-3f6ef7a40bcff5e1278b662248902c45a1dc8f81.zip
riscv-openocd-3f6ef7a40bcff5e1278b662248902c45a1dc8f81.tar.gz
riscv-openocd-3f6ef7a40bcff5e1278b662248902c45a1dc8f81.tar.bz2
target: add async algorithm entries to the target type
On supported targets, this may be used to start a long running algorithm in the background so the target may be interacted with during execution and later wait for its completion. The most obvious use case is a double buffered flash algorithm that can upload the next block of data while the algorithm is flashing the current. Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Diffstat (limited to 'src/target/target.h')
-rw-r--r--src/target/target.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/target/target.h b/src/target/target.h
index 5248d69..12726bd 100644
--- a/src/target/target.h
+++ b/src/target/target.h
@@ -432,6 +432,28 @@ int target_run_algorithm(struct target *target,
int timeout_ms, void *arch_info);
/**
+ * Starts an algorithm in the background on the @a target given.
+ *
+ * This routine is a wrapper for target->type->start_algorithm.
+ */
+int target_start_algorithm(struct target *target,
+ int num_mem_params, struct mem_param *mem_params,
+ int num_reg_params, struct reg_param *reg_params,
+ uint32_t entry_point, uint32_t exit_point,
+ void *arch_info);
+
+/**
+ * Wait for an algorithm on the @a target given.
+ *
+ * This routine is a wrapper for target->type->wait_algorithm.
+ */
+int target_wait_algorithm(struct target *target,
+ int num_mem_params, struct mem_param *mem_params,
+ int num_reg_params, struct reg_param *reg_params,
+ uint32_t exit_point, int timeout_ms,
+ void *arch_info);
+
+/**
* Read @a count items of @a size bytes from the memory of @a target at
* the @a address given.
*