feat: add rust demo
This commit is contained in:
11
examples/tos_meets_rust/app/src/bridge.rs
Normal file
11
examples/tos_meets_rust/app/src/bridge.rs
Normal file
@@ -0,0 +1,11 @@
|
||||
use cty::*;
|
||||
|
||||
/// These glue functions are from tosglue.c
|
||||
extern {
|
||||
pub fn rust_print(msg: *const u8);
|
||||
pub fn rust_oled_print(msg: *const u8);
|
||||
pub fn rust_wifi_init() -> i32;
|
||||
pub fn rust_wifi_connect(ssid: *const u8, passwd: *const u8);
|
||||
pub fn rust_sleep(ms: u32);
|
||||
pub fn rust_mqtt_daemon() -> c_void;
|
||||
}
|
Reference in New Issue
Block a user