update Docs
This commit is contained in:
parent
2edb2f9a5c
commit
87e451b82b
13 changed files with 85 additions and 77 deletions
|
@ -61,7 +61,7 @@ pub struct Point {
|
||||||
/// 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 Arduboy2 C++ library.
|
||||||
pub struct Arduboy2 {}
|
pub struct Arduboy2 {}
|
||||||
impl Arduboy2 {
|
impl Arduboy2 {
|
||||||
/// gives you a new instans of the [Arduboy2]
|
/// gives you a new instance of the [Arduboy2]
|
||||||
/// ## Example
|
/// ## Example
|
||||||
/// ```
|
/// ```
|
||||||
/// const arduboy: Arduboy2 = Arduboy2::new();
|
/// const arduboy: Arduboy2 = Arduboy2::new();
|
||||||
|
@ -485,15 +485,15 @@ impl Arduboy2 {
|
||||||
///The RGB LED is actually individual red, green and blue LEDs placed very close together in a single package. This 3 parameter version of the function will set each LED either on or off, to set the RGB LED to 7 different colors at their highest brightness or turn it off.
|
///The RGB LED is actually individual red, green and blue LEDs placed very close together in a single package. This 3 parameter version of the function will set each LED either on or off, to set the RGB LED to 7 different colors at their highest brightness or turn it off.
|
||||||
///```text
|
///```text
|
||||||
/// The colors are as follows:
|
/// The colors are as follows:
|
||||||
/// RED LED GREEN LED BLUE LED COLOR
|
/// RED LED GREEN LED BLUE LED COLOR
|
||||||
/// RGB_OFF RGB_OFF RGB_OFF OFF
|
/// RGB_OFF RGB_OFF RGB_OFF OFF
|
||||||
/// RGB_OFF RGB_OFF RGB_ON Blue
|
/// RGB_OFF RGB_OFF RGB_ON Blue
|
||||||
/// RGB_OFF RGB_ON RGB_OFF Green
|
/// RGB_OFF RGB_ON RGB_OFF Green
|
||||||
/// RGB_OFF RGB_ON RGB_ON Cyan
|
/// RGB_OFF RGB_ON RGB_ON Cyan
|
||||||
/// RGB_ON RGB_OFF RGB_OFF Red
|
/// RGB_ON RGB_OFF RGB_OFF Red
|
||||||
/// RGB_ON RGB_OFF RGB_ON Magenta
|
/// RGB_ON RGB_OFF RGB_ON Magenta
|
||||||
/// RGB_ON RGB_ON RGB_OFF Yellow
|
/// RGB_ON RGB_ON RGB_OFF Yellow
|
||||||
/// RGB_ON RGB_ON RGB_ON White
|
/// RGB_ON RGB_ON RGB_ON White
|
||||||
/// ```
|
/// ```
|
||||||
pub fn digital_write_rgb(&self, red: u8, green: u8, blue: u8) {
|
pub fn digital_write_rgb(&self, red: u8, green: u8, blue: u8) {
|
||||||
unsafe { digital_write_rgb(red, green, blue) }
|
unsafe { digital_write_rgb(red, green, blue) }
|
||||||
|
@ -501,7 +501,7 @@ impl Arduboy2 {
|
||||||
///Indicate if the specified number of frames has elapsed.
|
///Indicate if the specified number of frames has elapsed.
|
||||||
///
|
///
|
||||||
///Parameters
|
///Parameters
|
||||||
/// frames The desired number of elapsed frames.
|
///- frames The desired number of elapsed frames.
|
||||||
///
|
///
|
||||||
///Returns
|
///Returns
|
||||||
/// true if the specified number of frames has elapsed.
|
/// true if the specified number of frames has elapsed.
|
||||||
|
|
|
@ -14,7 +14,7 @@ extern "C" {
|
||||||
#[link_name = "arduboy_eeprom_put"]
|
#[link_name = "arduboy_eeprom_put"]
|
||||||
fn arduboy_eeprom_put_raw(idx: c_int, object: *const u8, size: usize);
|
fn arduboy_eeprom_put_raw(idx: c_int, object: *const u8, size: usize);
|
||||||
}
|
}
|
||||||
///This struct to store and read structs objects to/from eeprom memory.
|
///This is the struct to store and read structs objects to/from eeprom memory.
|
||||||
/// ## Example
|
/// ## Example
|
||||||
/// ```
|
/// ```
|
||||||
/// static e: EEPROM = EEPROM::new(10);
|
/// static e: EEPROM = EEPROM::new(10);
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -814,7 +814,7 @@
|
||||||
<span class="doccomment">/// This is the struct to interact in a save way with the Arduboy2 C++ library.
|
<span class="doccomment">/// This is the struct to interact in a save way with the Arduboy2 C++ library.
|
||||||
</span><span class="kw">pub struct </span>Arduboy2 {}
|
</span><span class="kw">pub struct </span>Arduboy2 {}
|
||||||
<span class="kw">impl </span>Arduboy2 {
|
<span class="kw">impl </span>Arduboy2 {
|
||||||
<span class="doccomment">/// gives you a new instans of the [Arduboy2]
|
<span class="doccomment">/// gives you a new instance of the [Arduboy2]
|
||||||
/// ## Example
|
/// ## Example
|
||||||
/// ```
|
/// ```
|
||||||
/// const arduboy: Arduboy2 = Arduboy2::new();
|
/// const arduboy: Arduboy2 = Arduboy2::new();
|
||||||
|
@ -1238,15 +1238,15 @@
|
||||||
///The RGB LED is actually individual red, green and blue LEDs placed very close together in a single package. This 3 parameter version of the function will set each LED either on or off, to set the RGB LED to 7 different colors at their highest brightness or turn it off.
|
///The RGB LED is actually individual red, green and blue LEDs placed very close together in a single package. This 3 parameter version of the function will set each LED either on or off, to set the RGB LED to 7 different colors at their highest brightness or turn it off.
|
||||||
///```text
|
///```text
|
||||||
/// The colors are as follows:
|
/// The colors are as follows:
|
||||||
/// RED LED GREEN LED BLUE LED COLOR
|
/// RED LED GREEN LED BLUE LED COLOR
|
||||||
/// RGB_OFF RGB_OFF RGB_OFF OFF
|
/// RGB_OFF RGB_OFF RGB_OFF OFF
|
||||||
/// RGB_OFF RGB_OFF RGB_ON Blue
|
/// RGB_OFF RGB_OFF RGB_ON Blue
|
||||||
/// RGB_OFF RGB_ON RGB_OFF Green
|
/// RGB_OFF RGB_ON RGB_OFF Green
|
||||||
/// RGB_OFF RGB_ON RGB_ON Cyan
|
/// RGB_OFF RGB_ON RGB_ON Cyan
|
||||||
/// RGB_ON RGB_OFF RGB_OFF Red
|
/// RGB_ON RGB_OFF RGB_OFF Red
|
||||||
/// RGB_ON RGB_OFF RGB_ON Magenta
|
/// RGB_ON RGB_OFF RGB_ON Magenta
|
||||||
/// RGB_ON RGB_ON RGB_OFF Yellow
|
/// RGB_ON RGB_ON RGB_OFF Yellow
|
||||||
/// RGB_ON RGB_ON RGB_ON White
|
/// RGB_ON RGB_ON RGB_ON White
|
||||||
/// ```
|
/// ```
|
||||||
</span><span class="kw">pub fn </span>digital_write_rgb(<span class="kw-2">&</span><span class="self">self</span>, red: u8, green: u8, blue: u8) {
|
</span><span class="kw">pub fn </span>digital_write_rgb(<span class="kw-2">&</span><span class="self">self</span>, red: u8, green: u8, blue: u8) {
|
||||||
<span class="kw">unsafe </span>{ digital_write_rgb(red, green, blue) }
|
<span class="kw">unsafe </span>{ digital_write_rgb(red, green, blue) }
|
||||||
|
@ -1254,7 +1254,7 @@
|
||||||
<span class="doccomment">///Indicate if the specified number of frames has elapsed.
|
<span class="doccomment">///Indicate if the specified number of frames has elapsed.
|
||||||
///
|
///
|
||||||
///Parameters
|
///Parameters
|
||||||
/// frames The desired number of elapsed frames.
|
///- frames The desired number of elapsed frames.
|
||||||
///
|
///
|
||||||
///Returns
|
///Returns
|
||||||
/// true if the specified number of frames has elapsed.
|
/// true if the specified number of frames has elapsed.
|
||||||
|
|
|
@ -154,7 +154,7 @@
|
||||||
<span class="attr">#[link_name = <span class="string">"arduboy_eeprom_put"</span>]
|
<span class="attr">#[link_name = <span class="string">"arduboy_eeprom_put"</span>]
|
||||||
</span><span class="kw">fn </span>arduboy_eeprom_put_raw(idx: c_int, object: <span class="kw-2">*const </span>u8, size: usize);
|
</span><span class="kw">fn </span>arduboy_eeprom_put_raw(idx: c_int, object: <span class="kw-2">*const </span>u8, size: usize);
|
||||||
}
|
}
|
||||||
<span class="doccomment">///This struct to store and read structs objects to/from eeprom memory.
|
<span class="doccomment">///This is the struct to store and read structs objects to/from eeprom memory.
|
||||||
/// ## Example
|
/// ## Example
|
||||||
/// ```
|
/// ```
|
||||||
/// static e: EEPROM = EEPROM::new(10);
|
/// static e: EEPROM = EEPROM::new(10);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue