libjaylink  0.2.0
Library to access J-Link devices
Functions
util.c File Reference

Utility functions. More...

#include <stdbool.h>
#include "libjaylink.h"

Functions

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

Detailed Description

Utility functions.

Function Documentation

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