烧录成功
This commit is contained in:
@@ -6,27 +6,21 @@
|
||||
#![no_std]
|
||||
|
||||
use esp_backtrace as _;
|
||||
use esp_println as _;
|
||||
|
||||
#[panic_handler]
|
||||
fn panic(_info: &core::panic::PanicInfo) -> ! {
|
||||
loop {
|
||||
unsafe {
|
||||
core::hint::spin_loop();
|
||||
}
|
||||
core::hint::spin_loop();
|
||||
}
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
extern "C" fn rust_app_main() {
|
||||
esp_println::println!("Rust application starting...");
|
||||
|
||||
loop {
|
||||
esp_println::println!("Rust application running...");
|
||||
core::hint::spin_loop();
|
||||
}
|
||||
}
|
||||
|
||||
#[export_name = "rust_usb_callback"]
|
||||
pub unsafe extern "C" fn usb_callback(event: u32) {
|
||||
esp_println::println!("USB Event: {}", event);
|
||||
}
|
||||
pub unsafe extern "C" fn usb_callback(_event: u32) {
|
||||
}
|
||||
Reference in New Issue
Block a user