SWD Command Element Structure. More...
#include <libswd.h>
Public Attributes | |
union { | |
char TRNnMOSI | |
< Payload data union. | |
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). | |
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 | 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 |
struct swd_cmd_t * | next |
Pointer to the previous/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.
char swd_cmd_t::TRNnMOSI |
< Payload data union.
Holds/sets bus direction: MOSI when zero, MISO for other.