pub enum Command {
LoadFromPc {
addr: u32,
bank_id_len: u32,
data: Vec<u8>,
},
DumpToPc {
addr: u32,
bank_id_len: u32,
},
TargetSideFifo(Vec<u8>),
SetSaveType(SaveType),
SetCicType(Cic),
SetCiExtended(u32),
VersionRequest,
}
Variants§
LoadFromPc
DumpToPc
TargetSideFifo(Vec<u8>)
SetSaveType(SaveType)
SetCicType(Cic)
SetCiExtended(u32)
VersionRequest
Implementations§
Source§impl Command
impl Command
pub fn id(&self) -> u8
pub fn encode_packet(&self) -> Vec<u8> ⓘ
pub fn recv_length(&self) -> u32
Sourcepub fn complete_check<D: AsRef<[u8]>>(&self, data: D) -> Result<()>
pub fn complete_check<D: AsRef<[u8]>>(&self, data: D) -> Result<()>
Checks if provided data
is a valid and complete command “footer” from the 64drive.
data
must be exactly 4 bytes long.
§Example
If the DUMP_TO_PC command was previously sent, data
should be the 4 bytes recieved after
the payload data requested from the cartridge: [0x43, 0x4D, 0x50, 0x30]
(3 constant bytes,
followed by the command’s ID number.)
Trait Implementations§
impl StructuralPartialEq for Command
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnwindSafe for Command
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more