libjaylink
0.3.1
Library to access J-Link devices
|
Emulator communication (EMUCOM). More...
Functions | |
int | jaylink_emucom_read (struct jaylink_device_handle *devh, uint32_t channel, uint8_t *buffer, uint32_t *length) |
Read from an EMUCOM channel. More... | |
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).
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. |
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. |