SWD Command Element Structure. More...
#include <libswd.h>
Public Attributes | |
union { | |
char TRNnMOSI | |
Holds/sets bus direction: MOSI when zero, MISO for others. | |
char request | |
Request header data. | |
char ack | |
Acknowledge response from target. | |
int misodata | |
Data read from target (MISO). | |
int mosidata | |
Data written to target (MOSI). | |
int data32 | |
Holds "int" data type for inspection. | |
char misobit | |
Single bit read from target (bit-per-char). | |
char mosibit | |
Single bit written to target (bit-per-char). | |
char parity | |
Parity bit for data payload. | |
char control | |
Control transfer data (one byte). | |
char data8 | |
Holds "char" data type for inspection. | |
}; | |
char | bits |
Payload bit count == clk pulses on the bus. | |
swd_cmdtype_t | cmdtype |
Command type as defined by swd_cmdtype_t. | |
char | done |
Non-zero if operation already executed. | |
struct swd_cmd_t * | prev |
Pointer to the previous command. | |
struct swd_cmd_t * | next |
Pointer to the next command. |
SWD Command Element Structure.
In libswd each operation is split into separate commands (request, trn, ack, data, parity) that can be appended to the command queue and later executed. This organization allows better granularity for tracing bugs and makes possible to compose complete bus/target operations made of simple commands.