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 root directory is a file named import_config.h

You can disable C++ libraries in the import_config.h 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 is the Module to interact in a save way with the Arduino C++ library.
  • This is the Module to interact in a save way with the ArdVoice C++ library.
  • Clib functions you can use on the Arduboy
  • 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
  • This is the Module to interact in a save way with the Arduino Serial C++ library.
  • This is the module to interact in a save way with the Sprites C++ library.

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

Structs

  • This is the struct to interact in a save way with the ArdVoice C++ library.
  • This is the struct to interact in a save way with the Arduboy2 C++ library.
  • This is the struct to interact in a save way with the ArduboyTones C++ library.
  • This is the struct to store and read structs objects to/from eeprom memory.
  • Use this struct to store and read single bytes to/from eeprom memory.

Enums

  • This item is to chose between Black or White

Constants

  • The standard font size of the arduboy
  • The standard height of the arduboy
  • The standard width of the arduboy