OpenOCD
jtag/drivers/libjaylink/libjaylink/util.c File Reference

Utility functions. More...

Include dependency graph for jtag/drivers/libjaylink/libjaylink/util.c:

Go to the source code of this file.

Functions

JAYLINK_API bool jaylink_has_cap (const uint8_t *caps, uint32_t cap)
 Check for a capability. More...
 

Detailed Description

Utility functions.

Definition in file jtag/drivers/libjaylink/libjaylink/util.c.

Function Documentation

◆ jaylink_has_cap()

JAYLINK_API bool jaylink_has_cap ( const uint8_t *  caps,
uint32_t  cap 
)

Check for a capability.

The capabilities are expected to be stored in a bit array consisting of one or more bytes where each individual bit represents a capability. The first bit of this array is the least significant bit of the first byte and the following bits are sequentially numbered in order of increasing bit significance and byte index. A set bit indicates a supported capability.

Parameters
[in]capsBuffer with capabilities.
[in]capBit position of the capability to check for.
Return values
trueCapability is supported.
falseCapability is not supported or invalid argument.
Since
0.1.0

Definition at line 47 of file jtag/drivers/libjaylink/libjaylink/util.c.

Referenced by adjust_swd_buffer_size(), calculate_trace_buffer_size(), COMMAND_HANDLER(), config_trace(), jlink_init(), jlink_quit(), jlink_register(), jlink_speed(), select_interface(), and show_config().