Create radio module

This commit is contained in:
Greg Shuflin 2021-02-27 23:16:01 -08:00
parent c7c746a383
commit 88e8fb48d8
2 changed files with 12 additions and 11 deletions

View File

@ -1,6 +1,8 @@
use std::ffi::CStr; use std::ffi::CStr;
use libc::c_char; use libc::c_char;
mod radio;
const COPYRIGHT: &'static str = "Copyright (C) 2018 Serge Vakulenko KK6ABQ"; const COPYRIGHT: &'static str = "Copyright (C) 2018 Serge Vakulenko KK6ABQ";
#[no_mangle] #[no_mangle]
@ -54,17 +56,6 @@ pub extern "C" fn process_options() {
} }
extern {
fn radio_list_c();
}
#[no_mangle]
pub extern "C" fn radio_list() {
unsafe {
radio_list_c();
}
}
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
#[test] #[test]

10
src/radio.rs Normal file
View File

@ -0,0 +1,10 @@
extern {
fn radio_list_c();
}
#[no_mangle]
pub extern "C" fn radio_list() {
unsafe {
radio_list_c();
}
}