all FX functions are now safe wrapped and I added the crate to the docs also it is added to the prelude
This commit is contained in:
parent
3f847e86a6
commit
522844499e
1272 changed files with 1371 additions and 61826 deletions
11
Examples/ArduboyFX/fxhelloworld/Cargo.toml
Normal file
11
Examples/ArduboyFX/fxhelloworld/Cargo.toml
Normal file
|
@ -0,0 +1,11 @@
|
|||
[package]
|
||||
name = "fxhelloworld"
|
||||
version = "0.1.0"
|
||||
authors = ["ZennDev <zenndev@protonmail.com>"]
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
crate-type = ["staticlib"]
|
||||
|
||||
[dependencies]
|
||||
arduboy-rust = { path = "../../../arduboy-rust" }
|
20
Examples/ArduboyFX/fxhelloworld/src/lib.rs
Normal file
20
Examples/ArduboyFX/fxhelloworld/src/lib.rs
Normal file
|
@ -0,0 +1,20 @@
|
|||
#![no_std]
|
||||
#![allow(non_upper_case_globals)]
|
||||
//Include the Arduboy Library
|
||||
//Initialize the arduboy object
|
||||
use arduboy_rust::prelude::*;
|
||||
const arduboy: Arduboy2 = Arduboy2::new();
|
||||
//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"));
|
||||
arduboy.display();
|
||||
}
|
||||
#[no_mangle]
|
||||
#[export_name = "loop"]
|
||||
pub unsafe extern "C" fn loop_() {
|
||||
// put your main code here, to run repeatedly:
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue