OpenOCD
error.c File Reference

Error handling. More...

Include dependency graph for error.c:

Go to the source code of this file.

Functions

JAYLINK_API const char * jaylink_strerror (int error_code)
 Return a human-readable description of a libjaylink error code. More...
 
JAYLINK_API const char * jaylink_strerror_name (int error_code)
 Return the name of a libjaylink error code. More...
 

Detailed Description

Error handling.

Definition in file error.c.

Function Documentation

◆ jaylink_strerror()

JAYLINK_API const char* jaylink_strerror ( int  error_code)

Return a human-readable description of a libjaylink error code.

Parameters
[in]error_codeA libjaylink error code. See jaylink_error for valid values.
Returns
A string which describes the given error code, or the string unknown error if the error code is not known. The string is null-terminated and must not be free'd by the caller.
Since
0.1.0

Definition at line 40 of file error.c.

References JAYLINK_ERR, JAYLINK_ERR_ARG, JAYLINK_ERR_DEV, JAYLINK_ERR_DEV_NO_MEMORY, JAYLINK_ERR_DEV_NOT_AVAILABLE, JAYLINK_ERR_DEV_NOT_SUPPORTED, JAYLINK_ERR_IO, JAYLINK_ERR_MALLOC, JAYLINK_ERR_NOT_AVAILABLE, JAYLINK_ERR_NOT_SUPPORTED, JAYLINK_ERR_PROTO, JAYLINK_ERR_TIMEOUT, and JAYLINK_OK.

Referenced by adjust_swd_buffer_size(), calculate_trace_buffer_size(), COMMAND_HANDLER(), config_trace(), jaylink_clear_reset(), jaylink_emucom_read(), jaylink_emucom_write(), jaylink_file_delete(), jaylink_file_get_size(), jaylink_file_read(), jaylink_file_write(), jaylink_get_available_interfaces(), jaylink_get_caps(), jaylink_get_counters(), jaylink_get_extended_caps(), jaylink_get_firmware_version(), jaylink_get_free_memory(), jaylink_get_hardware_info(), jaylink_get_hardware_status(), jaylink_get_hardware_version(), jaylink_get_selected_interface(), jaylink_get_speeds(), jaylink_jtag_clear_trst(), jaylink_jtag_io(), jaylink_jtag_set_trst(), jaylink_read_raw_config(), jaylink_register(), jaylink_select_interface(), jaylink_set_reset(), jaylink_set_speed(), jaylink_set_target_power(), jaylink_swd_io(), jaylink_swo_get_speeds(), jaylink_swo_read(), jaylink_swo_start(), jaylink_swo_stop(), jaylink_unregister(), jaylink_write_raw_config(), jlink_flush(), jlink_init(), jlink_quit(), jlink_register(), jlink_speed(), jlink_swd_run_queue(), jlink_usb_location_equal(), poll_trace(), read_device_config(), and select_interface().

◆ jaylink_strerror_name()

JAYLINK_API const char* jaylink_strerror_name ( int  error_code)

Return the name of a libjaylink error code.

Parameters
[in]error_codeA libjaylink error code. See jaylink_error for valid values.
Returns
A string which contains the name for the given error code, or the string unknown error code if the error code is not known. The string is null-terminated and must not be free'd by the caller.
Since
0.1.0

Definition at line 86 of file error.c.

References JAYLINK_ERR, JAYLINK_ERR_ARG, JAYLINK_ERR_DEV, JAYLINK_ERR_DEV_NO_MEMORY, JAYLINK_ERR_DEV_NOT_AVAILABLE, JAYLINK_ERR_DEV_NOT_SUPPORTED, JAYLINK_ERR_IO, JAYLINK_ERR_MALLOC, JAYLINK_ERR_NOT_AVAILABLE, JAYLINK_ERR_NOT_SUPPORTED, JAYLINK_ERR_PROTO, JAYLINK_ERR_TIMEOUT, and JAYLINK_OK.