Alchemy
Loading...
Searching...
No Matches

SerialTransferState Struct Reference

A console's block transfer state, exchanged with the partner each VBlank: its block sequence, its status and flags, and a 20-byte block. More...

#include <system/serial_runtime.h>

Data Fields

u8 active
 The sequence number of the block in payload; as receiver, the one it expects with bit 7 set to ask for a resend; 1 when a transfer starts.
u8 status
 0x80 sending or 0x81 receiving when started; the receiver counts blocks (status + 1, with bit 7) and sets 0 after the last.
u8 flags
 The receive state: 1 receiving, 2 the last block taken, 0 idle.
u8 peerFlags
 The send state: 1 a block with more to follow, 2 the last block, 0 idle.
u8 payload [20]
 one block of the data sent

Detailed Description

A console's block transfer state, exchanged with the partner each VBlank: its block sequence, its status and flags, and a 20-byte block.

Definition at line 94 of file serial_runtime.h.

Field Documentation

◆ active

u8 SerialTransferState::active

The sequence number of the block in payload; as receiver, the one it expects with bit 7 set to ask for a resend; 1 when a transfer starts.

Definition at line 97 of file serial_runtime.h.

Referenced by SerialRuntime_BeginReceive(), SerialRuntime_BeginSend(), and SerialRuntime_StepBlockTransfer().

◆ status

u8 SerialTransferState::status

0x80 sending or 0x81 receiving when started; the receiver counts blocks (status + 1, with bit 7) and sets 0 after the last.

Definition at line 100 of file serial_runtime.h.

Referenced by SerialRuntime_BeginReceive(), SerialRuntime_BeginSend(), SerialRuntime_ResetTransferState(), and SerialRuntime_StepBlockTransfer().

◆ flags

u8 SerialTransferState::flags

The receive state: 1 receiving, 2 the last block taken, 0 idle.

Definition at line 102 of file serial_runtime.h.

Referenced by SerialRuntime_GetActiveTransfers(), SerialRuntime_ResetTransferState(), and SerialRuntime_StepBlockTransfer().

◆ peerFlags

u8 SerialTransferState::peerFlags

The send state: 1 a block with more to follow, 2 the last block, 0 idle.

Definition at line 104 of file serial_runtime.h.

Referenced by SerialRuntime_ResetTransferState(), and SerialRuntime_StepBlockTransfer().

◆ payload