Create radio module
This commit is contained in:
parent
c7c746a383
commit
88e8fb48d8
13
src/lib.rs
13
src/lib.rs
@ -1,6 +1,8 @@
|
||||
use std::ffi::CStr;
|
||||
use libc::c_char;
|
||||
|
||||
mod radio;
|
||||
|
||||
const COPYRIGHT: &'static str = "Copyright (C) 2018 Serge Vakulenko KK6ABQ";
|
||||
|
||||
#[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)]
|
||||
mod tests {
|
||||
#[test]
|
||||
|
10
src/radio.rs
Normal file
10
src/radio.rs
Normal file
@ -0,0 +1,10 @@
|
||||
extern {
|
||||
fn radio_list_c();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn radio_list() {
|
||||
unsafe {
|
||||
radio_list_c();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user