Rust-for-Arduboy/Examples/Arduboy-Tutorials/demo2/src/lib.rs

21 lines
574 B
Rust
Raw Normal View History

2023-08-06 18:14:49 +02:00
#![no_std]
#![allow(non_upper_case_globals)]
2023-08-06 18:14:49 +02:00
//Include the Arduboy Library
//Initialize the arduboy object
use arduboy_rust::prelude::*;
const arduboy: Arduboy2 = Arduboy2::new();
2023-08-06 18:14:49 +02:00
//The setup() function runs once when you turn your Arduboy on
#[no_mangle]
pub unsafe extern "C" fn setup() {
// put your setup code here, to run once:
arduboy.begin();
arduboy.clear();
arduboy.print(f!(b"Holmes is cool!\0"));
2023-08-06 18:14:49 +02:00
arduboy.display();
}
#[no_mangle]
#[export_name = "loop"]
pub unsafe extern "C" fn loop_() {
// put your main code here, to run repeatedly:
}