libjaylink 0.3.1
Library to access J-Link devices
|
Silicon Labs 2-wire (C2) interface functions. More...
Functions | |
int | jaylink_c2_read_address (struct jaylink_device_handle *devh, uint8_t *address) |
Read the C2 address register. | |
int | jaylink_c2_write_address (struct jaylink_device_handle *devh, uint8_t address) |
Write to the C2 address register. | |
int | jaylink_c2_read_data (struct jaylink_device_handle *devh, uint8_t *data, uint8_t length) |
Read the C2 data register. | |
int | jaylink_c2_write_data (struct jaylink_device_handle *devh, const uint8_t *data, uint8_t length) |
Write to the C2 data register. | |
Silicon Labs 2-wire (C2) interface functions.
int jaylink_c2_read_address | ( | struct jaylink_device_handle * | devh, |
uint8_t * | address ) |
Read the C2 address register.
[in,out] | devh | Device handle. |
[out] | address | Value read from the address register on success, and undefined on failure. |
JAYLINK_OK | Success. |
JAYLINK_ERR_ARG | Invalid arguments. |
JAYLINK_ERR_TIMEOUT | A timeout occurred. |
JAYLINK_ERR_IO | Input/output error. |
JAYLINK_ERR_DEV | Unspecified device error. |
JAYLINK_ERR | Other error conditions. |
int jaylink_c2_read_data | ( | struct jaylink_device_handle * | devh, |
uint8_t * | data, | ||
uint8_t | length ) |
Read the C2 data register.
[in,out] | devh | Device handle. |
[out] | data | Buffer to store the read data on success. Its content is undefined on failure. |
[in] | length | Number of bytes to read, but not more than JAYLINK_C2_MAX_LENGTH. |
JAYLINK_OK | Success. |
JAYLINK_ERR_ARG | Invalid arguments. |
JAYLINK_ERR_TIMEOUT | A timeout occurred. |
JAYLINK_ERR_IO | Input/output error. |
JAYLINK_ERR_DEV | Unspecified device error. |
JAYLINK_ERR | Other error conditions. |
int jaylink_c2_write_address | ( | struct jaylink_device_handle * | devh, |
uint8_t | address ) |
Write to the C2 address register.
[in,out] | devh | Device handle. |
[in] | address | Value to write into the address register. |
JAYLINK_OK | Success. |
JAYLINK_ERR_ARG | Invalid arguments. |
JAYLINK_ERR_TIMEOUT | A timeout occurred. |
JAYLINK_ERR_IO | Input/output error. |
JAYLINK_ERR_DEV | Unspecified device error. |
JAYLINK_ERR | Other error conditions. |
int jaylink_c2_write_data | ( | struct jaylink_device_handle * | devh, |
const uint8_t * | data, | ||
uint8_t | length ) |
Write to the C2 data register.
[in,out] | devh | Device handle. |
[in] | data | Buffer to be written into the data register. |
[in] | length | Number of bytes to write, but not more than JAYLINK_C2_MAX_LENGTH. |
JAYLINK_OK | Success. |
JAYLINK_ERR_ARG | Invalid arguments. |
JAYLINK_ERR_TIMEOUT | A timeout occurred. |
JAYLINK_ERR_IO | Input/output error. |
JAYLINK_ERR_DEV | Unspecified device error. |
JAYLINK_ERR | Other error conditions. |