45#define DCC_PACKET_MAX_PAYLOAD (32)
47#define DCC_PACKET_EMERGENCY_STOP (0xFFFF)
50#define DCC_PACKET_CHANGE_DIR (0xFFFF)
54typedef struct dcc_packet
90 uint8_t header_raw_data;
91 struct pkt_t packet_header;
92 struct cmd_t command_header;
#define DCC_PACKET_MAX_PAYLOAD
Maximum number of payload bytes.
Specifies the meaning of the command byte for meta-commands to send.
uint8_t cmd
Command identifier.
Specifies the meaning of the command byte for packets to send.
uint8_t skip_ec
typically for DCC packets: 1: do NOT append an EC byte to the end of the packet.
uint8_t send_long_preamble
1: send long preamble instead of packet.
uint8_t is_marklin
0: DCC packet, 1: motorola packet.
uint8_t csum_error
1 if there was a checksum error in this packet.
uint8_t sense_ack
1: wait for service mode ack and report it back to the host.
uint8_t rept_count
The packet will be sent 1 + rept_count times to the wire.
Stores a DCC packet in memory.
uintptr_t feedback_key
An opaque key used by the hardware driver to attribute feedback information to the source of the pack...
uint8_t dlc
Specifies the number of used payload bytes.