diff options
| author | Xavier Del Campo <xavi92psx@gmail.com> | 2018-12-31 00:28:46 +0100 |
|---|---|---|
| committer | Xavier Del Campo <xavi92psx@gmail.com> | 2018-12-31 00:28:46 +0100 |
| commit | 42f2476aeebc5eb5a9366a6a366c9678eba6eb1b (patch) | |
| tree | 2098f4cdd976edae82d841f56298a6030512a792 /src/transfer.rs | |
| parent | b47361f283777f266970f9c082782ebac6c04aef (diff) | |
| download | rspsxserial-42f2476aeebc5eb5a9366a6a366c9678eba6eb1b.tar.gz | |
Some more work, but it still does not compile
Diffstat (limited to 'src/transfer.rs')
| -rw-r--r-- | src/transfer.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/transfer.rs b/src/transfer.rs new file mode 100644 index 0000000..617eb62 --- /dev/null +++ b/src/transfer.rs @@ -0,0 +1,16 @@ +const initial_transmission : u8 = 'b' as u8; + +pub enum TransferState { + FirstContact, + WaitAck, + Finished +} + +use serial; +use serial::SystemPort; + +pub fn first_contact(port : &mut serial::SystemPort) -> TransferState { + + *port.write(&initial_transmission); + TransferState::WaitAck +} |
