Skip to content

Commit

Permalink
Add note about timer rebind
Browse files Browse the repository at this point in the history
  • Loading branch information
martinsp committed Mar 17, 2024
1 parent 5a06d24 commit 52a6989
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ fn main() -> ! {

// Infinite colour wheel loop
let mut n: u8 = 128;
let mut timer = timer;
let mut timer = timer; // rebind to force a copy of the timer
loop {
ws.write(brightness(once(wheel(n)), 32)).unwrap();
n = n.wrapping_add(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ fn main() -> ! {
);

let mut n: u8 = 128;
let mut timer = timer;
let mut timer = timer; // rebind to force a copy of the timer
loop {
ws.write(brightness(once(wheel(n)), 32)).unwrap();
n = n.wrapping_add(1);
Expand Down
2 changes: 1 addition & 1 deletion boards/adafruit-kb2040/examples/adafruit_kb2040_rainbow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ fn main() -> ! {
// Infinite colour wheel loop

let mut n: u8 = 128;
let mut timer = timer;
let mut timer = timer; // rebind to force a copy of the timer
loop {
ws.write(brightness(once(wheel(n)), 32)).unwrap();
n = n.wrapping_add(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ fn main() -> ! {
);

let mut n: u8 = 128;
let mut timer = timer;
let mut timer = timer; // rebind to force a copy of the timer
loop {
ws.write(brightness(once(wheel(n)), 32)).unwrap();
n = n.wrapping_add(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ fn main() -> ! {
);

let mut n: u8 = 128;
let mut timer = timer;
let mut timer = timer; // rebind to force a copy of the timer
loop {
ws.write(brightness(once(wheel(n)), 32)).unwrap();
n = n.wrapping_add(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ fn main() -> ! {
// Infinite colour wheel loop

let mut n: u8 = 128;
let mut timer = timer;
let mut timer = timer; // rebind to force a copy of the timer
loop {
ws.write(brightness(once(wheel(n)), 32)).unwrap();
n = n.wrapping_add(1);
Expand Down
2 changes: 1 addition & 1 deletion boards/boardsource-blok/examples/blok_rainbow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ fn main() -> ! {

// Infinite colour wheel loop
let mut n: u8 = 128;
let mut timer = timer;
let mut timer = timer; // rebind to force a copy of the timer
loop {
ws.write(brightness(once(wheel(n)), 32)).unwrap();
n = n.wrapping_add(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ fn main() -> ! {
// Infinite color wheel loop

let mut n: u8 = 128;
let mut timer = timer;
let mut timer = timer; // rebind to force a copy of the timer
let offset = (256u16 / bsp::NUM_LEDS as u16) as u8;
loop {
ws.write(brightness(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ fn main() -> ! {

// Infinite colour wheel loop
let mut n: u8 = 128;
let mut timer = timer;
let mut timer = timer; // rebind to force a copy of the timer
loop {
ws.write(brightness(once(wheel(n)), 32)).unwrap();
n = n.wrapping_add(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ fn main() -> ! {
// Infinite colour wheel loop

let mut n: u8 = 128;
let mut timer = timer;
let mut timer = timer; // rebind to force a copy of the timer
loop {
ws.write(brightness(once(wheel(n)), 32)).unwrap();
n = n.wrapping_add(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ fn main() -> ! {
// Infinite colour wheel loop

let mut n: u8 = 128;
let mut timer = timer;
let mut timer = timer; // rebind to force a copy of the timer
loop {
ws.write(brightness(once(wheel(n)), 32)).unwrap();
n = n.wrapping_add(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ fn main() -> ! {

// Infinite colour wheel loop
let mut n: u8 = 128;
let mut timer = timer;
let mut timer = timer; // rebind to force a copy of the timer
loop {
ws.write(brightness(once(wheel(n)), 32)).unwrap();
n = n.wrapping_add(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ fn main() -> ! {

// Infinite colour wheel loop
let mut n: u8 = 128;
let mut timer = timer;
let mut timer = timer; // rebind to force a copy of the timer
loop {
ws.write(brightness(once(wheel(n)), 32)).unwrap();
n = n.wrapping_add(1);
Expand Down

0 comments on commit 52a6989

Please sign in to comment.