XJAPI_SetPinMap
Select or change the pin mapping.
This function was designed for use with the original XJLink JTAG controller. Although it can be used with XJLink2-based JTAG controllers it does not have access to all of the features of the XJLink2, and we reccommend using XJAPI_SetPinMapFromFile instead.
XJAPI_ERROR XJAPI_SetPinMap( XJAPI_PINMAP pinMapping, XJAPI_USER_MAP *pinMap, BOOL powerOn );
Arguments
- pinMapping
- The pin mapping to use.
- pinMap
- If pinMapping is XJAPI_USERDEFINED then this is a pointer to an XJAPI_USER_MAP array describing the board's pinmap, otherwise this argument should be NULL.
- 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
XJAPI_HardwareSetup must be called before this function.
Example
XJAPI_ERROR ec; XJAPI_USER_MAP pinMap = { { XJAPI_HIGH, XJAPI_DRIVE_HIGH }, // 1 { XJAPI_DISABLED, 0 }, // 2 { XJAPI_HIGH, XJAPI_DRIVE_HIGH }, // 3 { XJAPI_LOW, XJAPI_DRIVE_HIGH }, // 4 { XJAPI_TDI, XJAPI_DRIVE_LOW }, // 5 { XJAPI_LOW, XJAPI_DRIVE_HIGH }, // 6 { XJAPI_TMS, XJAPI_DRIVE_LOW }, // 7 { XJAPI_LOW, XJAPI_DRIVE_HIGH }, // 8 { XJAPI_TCK, XJAPI_DRIVE_LOW }, // 9 { XJAPI_LOW, XJAPI_DRIVE_HIGH }, // 10 { XJAPI_DISABLED, 0 }, // 11 { XJAPI_LOW, XJAPI_DRIVE_HIGH }, // 12 { XJAPI_TDO, 0 }, // 13 { XJAPI_LOW, XJAPI_DRIVE_HIGH }, // 14 { XJAPI_DISABLED, 0 }, // 15 { XJAPI_LOW, XJAPI_DRIVE_HIGH }, // 16 { XJAPI_DISABLED, 0 }, // 17 { XJAPI_LOW, XJAPI_DRIVE_HIGH }, // 18 { XJAPI_DISABLED, 0 }, // 19 { XJAPI_LOW, XJAPI_DRIVE_HIGH }, // 20 }; ec = XJAPI_SetPinMap(XJAPI_USERDEFINED, &pinMap, FALSE);
See Also
XJTAG v4.1.100