diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/transport/swd_core.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/transport/swd_core.c b/src/transport/swd_core.c index 544e6277..f4ae8bea 100644 --- a/src/transport/swd_core.c +++ b/src/transport/swd_core.c @@ -53,7 +53,7 @@ extern struct jtag_interface *jtag_interface; int oocd_swd_queue_idcode_read(struct adiv5_dap *dap, uint8_t *ack, uint32_t *data){ int retval; - retval=swd_dp_read_idcode(dap->ctx, SWD_OPERATION_EXECUTE, (int**) &data); + retval=swd_dp_read_idcode(dap->ctx, SWD_OPERATION_ENQUEUE, (int**) &data); if (retval<0) { LOG_ERROR("swd_dp_read_idcode() error: %s ", swd_error_string(retval)); return ERROR_FAIL; @@ -62,12 +62,12 @@ int oocd_swd_queue_idcode_read(struct adiv5_dap *dap, uint8_t *ack, uint32_t *da int oocd_swd_queue_dp_read(struct adiv5_dap *dap, unsigned reg, uint32_t *data){ int retval, *rdata; - retval=swd_dp_read((swd_ctx_t *)dap->ctx, SWD_OPERATION_EXECUTE, reg, &rdata); + retval=swd_dp_read((swd_ctx_t *)dap->ctx, SWD_OPERATION_ENQUEUE, reg, &rdata); if (retval<0){ LOG_ERROR("swd_dp_read() error: %s ", swd_error_string(retval)); return ERROR_FAIL; } - if (data!=NULL) *data=(uint32_t)*rdata; + if (data!=NULL) data=(uint32_t*)rdata; return ERROR_OK; } @@ -83,12 +83,12 @@ int oocd_swd_queue_dp_write(struct adiv5_dap *dap, unsigned reg, uint32_t data){ int oocd_swd_queue_ap_read(struct adiv5_dap *dap, unsigned reg, uint32_t *data){ int retval, *rdata; - retval=swd_ap_read((swd_ctx_t *)dap->ctx, SWD_OPERATION_EXECUTE, (char) reg, &rdata); + retval=swd_ap_read((swd_ctx_t *)dap->ctx, SWD_OPERATION_ENQUEUE, (char) reg, &rdata); if (retval<0){ LOG_ERROR("swd_ap_read() error: %s ", swd_error_string(retval)); return ERROR_FAIL; } - if (data!=NULL) *data=*rdata; + if (data!=NULL) data=(uint32_t*)rdata; return ERROR_OK; } @@ -106,7 +106,7 @@ int oocd_swd_queue_ap_abort(struct adiv5_dap *dap, uint8_t *ack){ int retval; int abort_flags = SWD_DP_ABORT_ORUNERRCLR | SWD_DP_ABORT_WDERRCLR | SWD_DP_ABORT_STKERRCLR \ | SWD_DP_ABORT_STKCMPCLR | SWD_DP_ABORT_DAPABORT; - retval=swd_dp_write((swd_ctx_t *)dap->ctx, SWD_OPERATION_EXECUTE, SWD_DP_ABORT_ADDR, &abort_flags); + retval=swd_dp_write((swd_ctx_t *)dap->ctx, SWD_OPERATION_ENQUEUE, SWD_DP_ABORT_ADDR, &abort_flags); if (retval<0){ LOG_ERROR("swd_dp_write(ABORT) error: %s ", swd_error_string(retval)); return ERROR_FAIL; |