Crate arduboy_rust

source ·
Expand description

This is the arduboy_rust crate To get started import the prelude to your project.

Import the module:

use arduboy_rust::prelude::*;

Disable C++ libraries

Inside the project directory is a file named config.toml

You can disable C++ libraries in the config.toml file. Just comment the unused library definition out.

Be careful with disabling libraries because:

  • The only error you get is something like this if you try to use a function that relies on the library you disabled.
game.90c69b91e57f285-cgu.0:(.text.loop+0x290): undefined reference to `sound_tone'
  • the benefit of disabling will be important in the feature when I add support for the ArduboyG library etc.

To get an idea, the ArduboyTones Library needs additional 2-3% of the flash memory.

Here is the link to the GitHub Repo

Modules

  • This is the Module to interact in a save way with the Arduboy2 C++ library.
  • This is the Module to interact in a save way with the ArduboyTones C++ library.
  • This is the Module to interact in a save way with the ArduboyFX C++ library.
  • This module contains all the Arduino system functions to interact with the hardware.
  • This is the Module to interact in a save way with the ArdVoice C++ library.
  • This is the Module to interact in a save way with the Arduboy hardware.
  • static friendly data structures that don’t require dynamic memory allocation
  • This is the important one to use this library effective in your project

Macros

  • This is the way to go if you want print some random text
  • Create a const raw pointer to a ardvoice tone as u8, without creating an intermediate reference.
  • Create a const raw pointer to a sprite as u8, without creating an intermediate reference.
  • Create a const raw pointer to a [u8;_] that saves text, without creating an intermediate reference.
  • Create a const raw pointer to a tone sequenze as u16, without creating an intermediate reference.
  • Create a space for Progmem variable