pub struct LiteXLed<'a, R>where
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> LiteXLed<'a, R>where
R: LiteXSoCRegisterConfiguration,
impl<'a, R> LiteXLed<'a, R>where
R: LiteXSoCRegisterConfiguration,
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> Drop for LiteXLed<'_, R>where
R: LiteXSoCRegisterConfiguration,
impl<R> Drop for LiteXLed<'_, R>where
R: LiteXSoCRegisterConfiguration,
Source§impl<R> Led for LiteXLed<'_, R>where
R: LiteXSoCRegisterConfiguration,
impl<R> Led for LiteXLed<'_, R>where
R: LiteXSoCRegisterConfiguration,
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