Created
June 18, 2018 05:16
-
-
Save lupyuen/b2b8f87da6dbf90a7b47be3a6ff19038 to your computer and use it in GitHub Desktop.
Sample Rust program for PADI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub extern fn main_entry() { | |
let mut s = Serial::new(); | |
s.tx_string("Hello from Rust!\n"); | |
loop { | |
let data = s.rx_i32(); | |
s.tx_string("Received: "); | |
s.tx_i32(data); | |
s.tx_string("\n"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment