OpenOCD
|
Serial Wire Debug (SWD) functions. More...
Go to the source code of this file.
Functions | |
JAYLINK_API int | jaylink_swd_io (struct jaylink_device_handle *devh, const uint8_t *direction, const uint8_t *out, uint8_t *in, uint16_t length) |
Perform a SWD I/O operation. More... | |
Serial Wire Debug (SWD) functions.
Definition in file swd.c.
JAYLINK_API int jaylink_swd_io | ( | struct jaylink_device_handle * | devh, |
const uint8_t * | direction, | ||
const uint8_t * | out, | ||
uint8_t * | in, | ||
uint16_t | length | ||
) |
Perform a SWD I/O operation.
[in,out] | devh | Device handle. |
[in] | direction | Buffer to read the transfer direction from. |
[in] | out | Buffer to read host-to-target data from. |
[out] | in | Buffer to store target-to-host data on success. Its content is undefined on failure. The buffer must be large enough to contain at least the specified number of bits to transfer. |
[in] | length | Total number of bits to transfer from host to target and vice versa. |
JAYLINK_OK | Success. |
JAYLINK_ERR_ARG | Invalid arguments. |
JAYLINK_ERR_TIMEOUT | A timeout occurred. |
JAYLINK_ERR_IO | Input/output error. |
JAYLINK_ERR_DEV_NO_MEMORY | Not enough memory on the device to perform the operation. |
JAYLINK_ERR_DEV | Unspecified device error. |
JAYLINK_ERR | Other error conditions. |
Definition at line 71 of file swd.c.
References buffer_set_u16(), jaylink_device::ctx, jaylink_device_handle::dev, JAYLINK_ERR_ARG, JAYLINK_ERR_DEV, JAYLINK_ERR_DEV_NO_MEMORY, JAYLINK_OK, jaylink_strerror(), log_err(), transport_read(), transport_start_write_read(), and transport_write().
Referenced by jlink_swd_run_queue().