aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-08-26 22:41:08 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-08-26 22:41:08 +0200
commitf2893729d58130e94e149cbd7598bf4d015feb34 (patch)
tree846b6554b5c0bf0bff722a10dbee5c3e8e47937d /src/main.rs
parent37a60e2d14857c582ad5770a936c6a5647ea2b9e (diff)
downloadraspi-rfm95-kiss-f2893729d58130e94e149cbd7598bf4d015feb34.tar.gz
raspi-rfm95-kiss-f2893729d58130e94e149cbd7598bf4d015feb34.tar.bz2
raspi-rfm95-kiss-f2893729d58130e94e149cbd7598bf4d015feb34.zip
Remove requirement to link kissattach.c to libax25
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs
index 9073975..134ee11 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -39,13 +39,15 @@ fn create_pts_pair() -> std::io::Result<File> {
}
fn main() {
- println!("Creating PTY pair");
+ eprintln!("Creating PTY pair");
let master_file = match create_pts_pair() {
Ok(fd) => fd,
Err(e) => panic!("create_pts_pair failed: {}", e)
};
+ eprintln!("PTS master: {:?}", master_file);
+
let slavename;
unsafe {
slavename = libc::ptsname(master_file.as_raw_fd());
@@ -56,7 +58,7 @@ fn main() {
}
unsafe {
let slice = CStr::from_ptr(slavename);
- println!("PTS slave: {:?}", slice);
+ eprintln!("PTS slave: {:?}", slice);
}
match RF95::new(Bandwidth::Bw250, CodingRate::Cr8, SpreadingFactor::Sf10) {
@@ -67,7 +69,7 @@ fn main() {
println!("Device version: {:02x}", ver);
}
else {
- println!("Cannot read device version");
+ eprintln!("Cannot read device version");
}
},
Err(e) => panic!("Cannot create lora radio object, {}", e)