|
OpenOCD
|
Emulator communication (EMUCOM). More...

Go to the source code of this file.
Functions | |
| JAYLINK_API int | jaylink_emucom_read (struct jaylink_device_handle *devh, uint32_t channel, uint8_t *buffer, uint32_t *length) |
| Read from an EMUCOM channel. More... | |
| JAYLINK_API int | jaylink_emucom_write (struct jaylink_device_handle *devh, uint32_t channel, const uint8_t *buffer, uint32_t *length) |
| Write to an EMUCOM channel. More... | |
Emulator communication (EMUCOM).
Definition in file emucom.c.
| JAYLINK_API int jaylink_emucom_read | ( | struct jaylink_device_handle * | devh, |
| uint32_t | channel, | ||
| uint8_t * | buffer, | ||
| uint32_t * | length | ||
| ) |
Read from an EMUCOM channel.
| [in,out] | devh | Device handle. |
| [in] | channel | Channel to read data from. |
| [out] | buffer | Buffer to store read data on success. Its content is undefined on failure. |
| [in,out] | length | Number of bytes to read. On success, the value gets updated with the actual number of bytes read. Unless otherwise specified, the value is undefined on failure. |
| JAYLINK_OK | Success. |
| JAYLINK_ERR_ARG | Invalid arguments. |
| JAYLINK_ERR_TIMEOUT | A timeout occurred. |
| JAYLINK_ERR_PROTO | Protocol violation. |
| JAYLINK_ERR_IO | Input/output error. |
| JAYLINK_ERR_DEV_NOT_SUPPORTED | Channel is not supported by the device. |
| JAYLINK_ERR_DEV_NOT_AVAILABLE | Channel is not available for the requested amount of data. length is updated with the number of bytes available on this channel. |
| JAYLINK_ERR_DEV | Unspecified device error. |
| JAYLINK_ERR | Other error conditions. |
Definition at line 93 of file emucom.c.
References buffer_get_u32(), buffer_set_u32(), jaylink_device::ctx, jaylink_device_handle::dev, JAYLINK_ERR_ARG, JAYLINK_ERR_DEV, JAYLINK_ERR_DEV_NOT_AVAILABLE, JAYLINK_ERR_DEV_NOT_SUPPORTED, JAYLINK_ERR_PROTO, JAYLINK_OK, jaylink_strerror(), log_err(), transport_read(), transport_start_read(), transport_start_write_read(), and transport_write().
Referenced by COMMAND_HANDLER().
| JAYLINK_API int jaylink_emucom_write | ( | struct jaylink_device_handle * | devh, |
| uint32_t | channel, | ||
| const uint8_t * | buffer, | ||
| uint32_t * | length | ||
| ) |
Write to an EMUCOM channel.
| [in,out] | devh | Device handle. |
| [in] | channel | Channel to write data to. |
| [in] | buffer | Buffer to write data from. |
| [in,out] | length | Number of bytes to write. On success, the value gets updated with the actual number of bytes written. The value is undefined on failure. |
| JAYLINK_OK | Success. |
| JAYLINK_ERR_ARG | Invalid arguments. |
| JAYLINK_ERR_TIMEOUT | A timeout occurred. |
| JAYLINK_ERR_PROTO | Protocol violation. |
| JAYLINK_ERR_IO | Input/output error. |
| JAYLINK_ERR_DEV_NOT_SUPPORTED | Channel is not supported by the device. |
| JAYLINK_ERR_DEV | Unspecified device error. |
| JAYLINK_ERR | Other error conditions. |
Definition at line 206 of file emucom.c.
References buffer_get_u32(), buffer_set_u32(), jaylink_device::ctx, jaylink_device_handle::dev, JAYLINK_ERR_ARG, JAYLINK_ERR_DEV, JAYLINK_ERR_DEV_NOT_SUPPORTED, JAYLINK_ERR_PROTO, JAYLINK_OK, jaylink_strerror(), log_err(), transport_read(), transport_start_write(), transport_start_write_read(), and transport_write().
Referenced by COMMAND_HANDLER().