pub const fn urgb_u32(r: u8, g: u8, b: u8) -> u32Examples found in repository?
examples/ws281x.rs (line 47)
43fn pattern_snakes(leds: &mut LedString, len: u32, t: u32) {
44 for i in 0..len {
45 let x = (i + (t >> 1)) % 64;
46 if x < 10 {
47 leds.put_pixel(urgb_u32(0xff, 0, 0));
48 } else if x >= 15 && x < 25 {
49 leds.put_pixel(urgb_u32(0, 0xff, 0));
50 } else if x >= 30 && x < 40 {
51 leds.put_pixel(urgb_u32(0, 0, 0xff));
52 } else {
53 leds.put_pixel(0);
54 }
55 }
56}