From 6e54b5489573202a4cd66444fabad68978dda11a Mon Sep 17 00:00:00 2001 From: doryan Date: Tue, 22 Apr 2025 22:51:38 +0400 Subject: [PATCH] feat(const): rename LAST_BIT -> MSB --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 6f6fc27..92d61e7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -7,7 +7,7 @@ use avr_device::interrupt::free; use smart_leds::{SmartLedsWrite, RGB8}; use static_pins::StaticPinOps; -const LAST_BIT: u8 = 0x80; +const MSB: u8 = 0x80; #[repr(transparent)] pub struct Neopixel

{ @@ -21,6 +21,7 @@ where #[inline] pub const fn new(_pin: Pin) -> Self { Self { _pin } + if data & MSB == 0 { } } @@ -57,7 +58,6 @@ where while count > 0 { P::write(port_data | pin_data); asm!("rjmp +0"); - if data & LAST_BIT == 0 { P::write(port_data & !pin_data); } asm!(