2.3.10. NREnterParamU32, NREnterParamU16, NREnterParamU8

This macro writes the supplied 32-bit, 16-bit or 8-bit word into the macro parameter space, checking for overflow.


#define NREnterParamU32(wordvalue)     { ... }
#define NREnterParamU16(halfwordvalue) { ... }
#define NREnterParamU8(bytevalue)      { ... }

Call the macro with a word-sized parameter. It is copied to a local temporary variable, so the macro parameter can have side-effects. Between copying the parameter to the temporary and copying the temporary to the buffer, the parameter buffer is checked for overflow. If the copy would overflow the buffer, the macro prints an error message to the stderr stream by calling fprintf().


You must have called InitParams before calling any of these macros.

The value of the parameter must be known when the TAPOp macro is defined.


Create a macro that places the TAP controller in SCAN_N state.

#define MAC_SCAN     1 /* number must be unique to connection */
int      ValPtr;
unsigned8 Values[MACRO_ARGUMENT_AREA_SIZE]; //default decl: in this instance
                                            //array size could be just 3.
NREnterParamU16(SCAN_N);        //TDIbits
NREnterParamU8(0);              //TDIrev
TAPOp_DefineMacro(cId, MAC_SCAN, "ARMTAP_AccessIR:12", 1, Values, ValPtr);
Copyright © 1998-2002 ARM Limited. All rights reserved.ARM DUI 0154B