Crate arduboy_rust
source ·Expand description
This is the arduboy_rust crate +
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::*;
Inside the Wrapper-Project folder is a folder named src. +You can disable C++ libraries in the main.h file. +Just comment the unused library definition out.
+To get an idea, the ArduboyTones Library needs 2-3% of the flash memory.
+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 Arduino C++ library.
- Clib functions you can use on the Arduboy
- This is the Module to interact in a save way with the Arduboy hardware.
- 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 Sprites C++ library.
Macros
- This is the way to go if you want print some random text
- 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 sprite 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 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
Returns true if the specified point is within the specified rectangle.
-This function is intended to detemine if an object, whose boundaries are are defined by the given rectangle, is in contact with the given point.
+This function is intended to detemine if an object, whose boundaries are defined by the given rectangle, is in contact with the given point.
sourcepub fn collide_rect(&self, rect1: Rect, rect2: Rect) -> bool
pub fn collide_rect(&self, rect1: Rect, rect2: Rect) -> bool
Test if a rectangle is intersecting with another rectangle.
Parameters
-
@@ -253,7 +253,7 @@ true if the specified point is within the specified rectangle.
Returns true if the first rectangle is intersecting the second.
-This function is intended to detemine if an object, whose boundaries are are defined by the given rectangle, is in contact with another rectangular object.
+This function is intended to detemine if an object, whose boundaries are defined by the given rectangle, is in contact with another rectangular object.
sourcepub fn digital_write_rgb_single(&self, color: u8, val: u8)
pub fn digital_write_rgb_single(&self, color: u8, val: u8)
Set one of the RGB LEDs digitally, to either fully on or fully off.
Parameters
-
diff --git a/docs/doc/arduboy_rust/prelude/struct.Arduboy2.html b/docs/doc/arduboy_rust/prelude/struct.Arduboy2.html
index f21ea2d..2d7272d 100644
--- a/docs/doc/arduboy_rust/prelude/struct.Arduboy2.html
+++ b/docs/doc/arduboy_rust/prelude/struct.Arduboy2.html
@@ -245,7 +245,7 @@ EEPROM is limited in the number of times it can be written to. Sketches should n
Returns true if the specified point is within the specified rectangle.
-This function is intended to detemine if an object, whose boundaries are are defined by the given rectangle, is in contact with the given point.
+This function is intended to detemine if an object, whose boundaries are defined by the given rectangle, is in contact with the given point.
sourcepub fn collide_rect(&self, rect1: Rect, rect2: Rect) -> bool
pub fn collide_rect(&self, rect1: Rect, rect2: Rect) -> bool
Test if a rectangle is intersecting with another rectangle.
Parameters
-
@@ -253,7 +253,7 @@ true if the specified point is within the specified rectangle.
Returns true if the first rectangle is intersecting the second.
-This function is intended to detemine if an object, whose boundaries are are defined by the given rectangle, is in contact with another rectangular object.
+This function is intended to detemine if an object, whose boundaries are defined by the given rectangle, is in contact with another rectangular object.
sourcepub fn digital_write_rgb_single(&self, color: u8, val: u8)
pub fn digital_write_rgb_single(&self, color: u8, val: u8)
Set one of the RGB LEDs digitally, to either fully on or fully off.
Parameters
-
diff --git a/docs/doc/arduboy_rust/struct.Arduboy2.html b/docs/doc/arduboy_rust/struct.Arduboy2.html
index 345a228..bbf042b 100644
--- a/docs/doc/arduboy_rust/struct.Arduboy2.html
+++ b/docs/doc/arduboy_rust/struct.Arduboy2.html
@@ -245,7 +245,7 @@ EEPROM is limited in the number of times it can be written to. Sketches should n
Returns true if the specified point is within the specified rectangle.
-This function is intended to detemine if an object, whose boundaries are are defined by the given rectangle, is in contact with the given point.
+This function is intended to detemine if an object, whose boundaries are defined by the given rectangle, is in contact with the given point.
sourcepub fn collide_rect(&self, rect1: Rect, rect2: Rect) -> bool
pub fn collide_rect(&self, rect1: Rect, rect2: Rect) -> bool
Test if a rectangle is intersecting with another rectangle.
Parameters
-
@@ -253,7 +253,7 @@ true if the specified point is within the specified rectangle.
Returns true if the first rectangle is intersecting the second.
-This function is intended to detemine if an object, whose boundaries are are defined by the given rectangle, is in contact with another rectangular object.
+This function is intended to detemine if an object, whose boundaries are defined by the given rectangle, is in contact with another rectangular object.
sourcepub fn digital_write_rgb_single(&self, color: u8, val: u8)
pub fn digital_write_rgb_single(&self, color: u8, val: u8)
Set one of the RGB LEDs digitally, to either fully on or fully off.
Parameters
#![cfg(target_arch = "avr")]
#![no_std]
#![feature(c_size_t)]
@@ -28,6 +35,13 @@
//! ```
//! use arduboy_rust::prelude::*;
//! ```
+//! Inside the Wrapper-Project folder is a folder named src.
+//! You can disable C++ libraries in the main.h file.
+//! Just comment the unused library definition out.
+//!
+//! To get an idea, the ArduboyTones Library needs 2-3% of the flash memory.
+//!
+//! [Here is the link to the GitHub Repo](https://github.com/zenndev1337/rust-for-arduboy)
extern crate panic_halt;
pub mod hardware;
diff --git a/docs/doc/src/arduboy_rust/library/arduboy2.rs.html b/docs/doc/src/arduboy_rust/library/arduboy2.rs.html
index 2eac0ab..949c158 100644
--- a/docs/doc/src/arduboy_rust/library/arduboy2.rs.html
+++ b/docs/doc/src/arduboy_rust/library/arduboy2.rs.html
@@ -1198,7 +1198,7 @@
///Returns
/// true if the specified point is within the specified rectangle.
///
- ///This function is intended to detemine if an object, whose boundaries are are defined by the given rectangle, is in contact with the given point.
+ ///This function is intended to detemine if an object, whose boundaries are defined by the given rectangle, is in contact with the given point.
pub fn collide_point(&self, point: Point, rect: Rect) -> bool {
point.x >= rect.x
&& point.x < rect.x + rect.width as i16
@@ -1213,7 +1213,7 @@
///Returns
/// true if the first rectangle is intersecting the second.
///
- ///This function is intended to detemine if an object, whose boundaries are are defined by the given rectangle, is in contact with another rectangular object.
+ ///This function is intended to detemine if an object, whose boundaries are defined by the given rectangle, is in contact with another rectangular object.
pub fn collide_rect(&self, rect1: Rect, rect2: Rect) -> bool {
!(rect2.x >= rect1.x + rect1.width as i16
|| rect2.x + rect2.width as i16 <= rect1.x