XJAPI_HardwareSetup (pre v2.3)

This form of the function is deprecated, but is used if XJAPI_VERSION is defined to be less than 0x020300.

Initialises the XJLink hardware.

XJAPI_ERROR XJAPI_HardwareSetup(
    unsigned int frequency,
    XJAPI_PINMAP pinMap,
    BOOL         powerOn
);

Arguments

frequency
The TCK frequency in Hz
pinMap
The pinmap to use
powerOn
Whether to power the target board from the XJLink

Return value

An XJAPI_ERROR value indicating whether the function call was successful or not.

Notes

Valid TCK frequencies range from 100kHz to 1MHz in steps of 100kHz and then from 1MHz to 60MHz in steps of 1MHz. If a value is outside this range then an error is returned, and if is not one of these exact values, then it is rounded to the nearest valid value.

If a user-defined pinmap is to be used then XJAPI_USERDEFINED must be specified, then XJAPI_SetPinMap called before the chain is used.

XJAPI_Startup must have been called before this function is called, otherwise XJAPI_ERROR_NOT_INITIALISED is returned.