Skip to content

Commit

Permalink
tests: Follow renaming deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
chrysn committed Aug 25, 2024
1 parent aa708d7 commit 24bd27a
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions tests/led/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ use riot_wrappers::riot_main;
riot_main!(main);

fn main() {
let mut led0 = LED::<0>::new();
let mut led1 = LED::<1>::new();
let mut led2 = LED::<2>::new();
let mut led3 = LED::<3>::new();
let mut led4 = LED::<4>::new();
let mut led5 = LED::<5>::new();
let mut led6 = LED::<6>::new();
let mut led7 = LED::<7>::new();
// Using the `unchecked` methods because the loop rotates the blinking speeds through all LEDs
// anyway -- so every speed will be on every LED, and that's easier to express if the number of
// considered LEDs is constant.
let mut led0 = LED::<0>::new_unchecked();
let mut led1 = LED::<1>::new_unchecked();
let mut led2 = LED::<2>::new_unchecked();
let mut led3 = LED::<3>::new_unchecked();
let mut led4 = LED::<4>::new_unchecked();
let mut led5 = LED::<5>::new_unchecked();
let mut led6 = LED::<6>::new_unchecked();
let mut led7 = LED::<7>::new_unchecked();
let mut leds: [&mut dyn switch_hal::ToggleableOutputSwitch<Error = _>; 8] = [
&mut led0, &mut led1, &mut led2, &mut led3, &mut led4, &mut led5, &mut led6, &mut led7,
];
Expand Down

0 comments on commit 24bd27a

Please sign in to comment.