]> git.sur5r.net Git - openocd/blobdiff - src/target/arm_adi_v5.h
adiv5: introduce optional dap_sync() function
[openocd] / src / target / arm_adi_v5.h
index 44d3962cd3660cc7ccd4801139a2f42bbece5f84..f001d6a2634d1b328d3e289ded785dd6f7394186 100644 (file)
@@ -274,6 +274,10 @@ struct dap_ops {
 
        /** Executes all queued DAP operations. */
        int (*run)(struct adiv5_dap *dap);
+
+       /** Executes all queued DAP operations but doesn't check
+        * sticky error conditions */
+       int (*sync)(struct adiv5_dap *dap);
 };
 
 /*
@@ -397,6 +401,14 @@ static inline int dap_run(struct adiv5_dap *dap)
        return dap->ops->run(dap);
 }
 
+static inline int dap_sync(struct adiv5_dap *dap)
+{
+       assert(dap->ops != NULL);
+       if (dap->ops->sync)
+               return dap->ops->sync(dap);
+       return ERROR_OK;
+}
+
 static inline int dap_dp_read_atomic(struct adiv5_dap *dap, unsigned reg,
                                     uint32_t *value)
 {