Blinq - a blinking queue
A queue for toggling a GPIO or blinking an LED, with binary patterns encoded as a u32.
Example
use ;
// Create a blink queue with room for 8 patterns, that is active-low
let mut blinq: = new;
// Insert "HELLO." in morse code
blinq.enqueue; // 8 steps
blinq.enqueue; // 2 steps
blinq.enqueue; // 10 steps
blinq.enqueue; // 10 steps
blinq.enqueue; // 12 steps
blinq.enqueue; // 18 steps
// This is 60 steps
for _ in 0..60
// The queue is now exhausted, and the GPIO will be driven to the
// inactive state
blinq.step;
License
Licensed under either of
-
Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
-
MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.