Files
TencentOS-tiny/examples/tos_meets_rust/app/src/lib.rs
2021-01-12 23:47:54 +08:00

24 lines
420 B
Rust

#![no_std]
extern crate cortex_m;
mod bridge;
use crate::bridge::*;
use cty::*;
#[no_mangle]
pub extern "C" fn application_entry_rust() -> c_void {
unsafe {
rust_print(b"[+] Welcome to the RUST-WORLD in TencentOS :)".as_ptr());
rust_mqtt_daemon();
}
loop {
unsafe {
rust_print(b"[+] This is a mqtt demo!".as_ptr());
rust_sleep(5000u32);
}
}
}