pub struct LiteXLed<'a, R: LiteXSoCRegisterConfiguration> { /* private fields */ }
Expand description
Single LED of a LiteXLedController
Can be obtained by calling LiteXLedController::get_led
.
Only one LiteXLed
instance may exist per LED. To deregister
this instance, call LiteXLed::destroy
(or drop it).
Implementations§
Source§impl<'a, R: LiteXSoCRegisterConfiguration> LiteXLed<'a, R>
impl<'a, R: LiteXSoCRegisterConfiguration> LiteXLed<'a, R>
Sourcepub fn index(&self) -> usize
pub fn index(&self) -> usize
Index of this LED in the LiteXLedController
LED array
Sourcepub fn controller(&self) -> &'a LiteXLedController<R>
pub fn controller(&self) -> &'a LiteXLedController<R>
Returns a reference to the LiteXLedController
of this LED
Trait Implementations§
Source§impl<R: LiteXSoCRegisterConfiguration> Drop for LiteXLed<'_, R>
impl<R: LiteXSoCRegisterConfiguration> Drop for LiteXLed<'_, R>
Source§impl<R: LiteXSoCRegisterConfiguration> Led for LiteXLed<'_, R>
impl<R: LiteXSoCRegisterConfiguration> Led for LiteXLed<'_, R>
Auto Trait Implementations§
impl<'a, R> Freeze for LiteXLed<'a, R>
impl<'a, R> !RefUnwindSafe for LiteXLed<'a, R>
impl<'a, R> !Send for LiteXLed<'a, R>
impl<'a, R> !Sync for LiteXLed<'a, R>
impl<'a, R> Unpin for LiteXLed<'a, R>
impl<'a, R> !UnwindSafe for LiteXLed<'a, R>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more