ulink_cmd struct
OpenULINK command (OpenULINK command queue element). For the OUT direction payload, things are quite easy: Payload is stored in a rather small array (up to 63 bytes), the payload is always allocated by the function generating the command and freed by ulink_clear_queue(). For the IN direction payload, things get a little bit more complicated: The maximum IN payload size for a single command is 64 bytes. Assume that a single OpenOCD command needs to scan 256 bytes. This results in the generation of four OpenULINK commands. The function generating these commands shall allocate an uint8_t[256] array. Each command's #payload_in pointer shall point to the corresponding offset where IN data shall be placed, while #payload_in_start shall point to the first element of the 256 byte array. - first command: #payload_in_start + 0 - second command: #payload_in_start + 64 - third command: #payload_in_start + 128 - fourth command: #payload_in_start + 192 The last command sets #needs_postprocessing to true.
Fields
OUT direction payload data.
OUT direction payload size for this command.
Pointer to first element of IN payload array.
Pointer where IN payload shall be stored.
IN direction payload size for this command.
Indicates if this command needs post-processing.
Indicates if ulink_clear_queue() should free payload_in_start.
Pointer to corresponding OpenOCD command for post-processing.
Pointer to next command (linked list).