added docs and change the lib structure
This commit is contained in:
parent
d033160657
commit
063ed9301f
28 changed files with 155 additions and 63 deletions
|
@ -36,6 +36,7 @@
|
|||
<a href="#36" id="36">36</a>
|
||||
<a href="#37" id="37">37</a>
|
||||
<a href="#38" id="38">38</a>
|
||||
<a href="#39" id="39">39</a>
|
||||
</pre></div><pre class="rust"><code><span class="attr">#![cfg(target_arch = <span class="string">"avr"</span>)]
|
||||
#![no_std]
|
||||
#![feature(c_size_t)]
|
||||
|
@ -72,6 +73,7 @@
|
|||
</span><span class="kw">pub extern crate </span>heapless;
|
||||
<span class="kw">pub use </span><span class="kw">crate</span>::library::arduboy2::{<span class="self">self</span>, Arduboy2, Color, FONT_SIZE, HEIGHT, WIDTH};
|
||||
<span class="kw">pub use </span><span class="kw">crate</span>::library::arduboy_tone::{<span class="self">self</span>, ArduboyTones};
|
||||
<span class="kw">pub use </span><span class="kw">crate</span>::library::ardvoice::{<span class="self">self</span>, ArdVoice};
|
||||
<span class="kw">pub use </span><span class="kw">crate</span>::library::eeprom::{EEPROM, EEPROMBYTE};
|
||||
<span class="kw">pub use </span><span class="kw">crate</span>::library::{arduino, c, sprites};
|
||||
</code></pre></div></section></main></body></html>
|
|
@ -146,7 +146,10 @@
|
|||
<a href="#146" id="146">146</a>
|
||||
<a href="#147" id="147">147</a>
|
||||
<a href="#148" id="148">148</a>
|
||||
<a href="#149" id="149">149</a>
|
||||
<a href="#150" id="150">150</a>
|
||||
</pre></div><pre class="rust"><code><span class="doccomment">//!This is the Module to interact in a save way with the ArduboyTones C++ library.
|
||||
//! You will need to uncomment the ArduboyTones_Library in the import_config.h file.
|
||||
</span><span class="kw">pub use </span><span class="kw">crate</span>::library::arduboy_tone_pitch;
|
||||
<span class="kw">use </span>core::ffi::{c_uchar, c_uint, c_ulong};
|
||||
<span class="kw">extern </span><span class="string">"C" </span>{
|
||||
|
@ -181,6 +184,7 @@
|
|||
|
||||
}
|
||||
<span class="doccomment">///This is the struct to interact in a save way with the ArduboyTones C++ library.
|
||||
/// You will need to uncomment the ArduboyTones_Library in the import_config.h file.
|
||||
</span><span class="kw">pub struct </span>ArduboyTones {}
|
||||
<span class="kw">impl </span>ArduboyTones {
|
||||
<span class="doccomment">///Get a new instance of [ArduboyTones]
|
||||
|
|
|
@ -34,7 +34,14 @@
|
|||
<a href="#34" id="34">34</a>
|
||||
<a href="#35" id="35">35</a>
|
||||
<a href="#36" id="36">36</a>
|
||||
</pre></div><pre class="rust"><code><span class="kw">use </span>core::ffi::{c_float, c_uchar, c_ulong};
|
||||
<a href="#37" id="37">37</a>
|
||||
<a href="#38" id="38">38</a>
|
||||
<a href="#39" id="39">39</a>
|
||||
<a href="#40" id="40">40</a>
|
||||
</pre></div><pre class="rust"><code><span class="doccomment">//! This is the Module to interact in a save way with the ArdVoice C++ library.
|
||||
//! You will need to uncomment the ArdVoice_Library in the import_config.h file.
|
||||
|
||||
</span><span class="kw">use </span>core::ffi::{c_float, c_uchar, c_ulong};
|
||||
|
||||
<span class="kw">extern </span><span class="string">"C" </span>{
|
||||
<span class="attr">#[link_name = <span class="string">"ardvoice_play_voice"</span>]
|
||||
|
@ -51,8 +58,9 @@
|
|||
<span class="attr">#[link_name = <span class="string">"ardvoice_is_voice_playing"</span>]
|
||||
</span><span class="kw">fn </span>ardvoice_is_voice_playing_raw() -> bool;
|
||||
}
|
||||
|
||||
<span class="kw">pub struct </span>ArdVoice {}
|
||||
<span class="doccomment">///This is the struct to interact in a save way with the ArdVoice C++ library.
|
||||
///You will need to uncomment the ArdVoice_Library in the import_config.h file.
|
||||
</span><span class="kw">pub struct </span>ArdVoice {}
|
||||
<span class="kw">impl </span>ArdVoice {
|
||||
<span class="kw">pub const fn </span>new() -> <span class="self">Self </span>{
|
||||
ArdVoice {}
|
||||
|
|
|
@ -235,7 +235,7 @@
|
|||
};
|
||||
}
|
||||
<span class="kw">pub</span>(<span class="kw">super</span>) <span class="kw">use </span>get_ardvoice_tone_addr;
|
||||
<span class="doccomment">///Create a `const` raw pointer to a sprite as u16, without creating an intermediate reference.
|
||||
<span class="doccomment">///Create a `const` raw pointer to a tone sequenze as u16, without creating an intermediate reference.
|
||||
</span><span class="attr">#[macro_export]
|
||||
</span><span class="macro">macro_rules! </span>get_tones_addr {
|
||||
( <span class="macro-nonterminal">$s</span>:expr ) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue