pub struct LiteXGPIOController<'client, R: LiteXSoCRegisterConfiguration> { /* private fields */ }
Expand description
LiteX Tristate GPIO controller core
Implementations§
Source§impl<'client, R: LiteXSoCRegisterConfiguration> LiteXGPIOController<'client, R>
impl<'client, R: LiteXSoCRegisterConfiguration> LiteXGPIOController<'client, R>
pub fn new( base: StaticRef<LiteXGPIORegisters<R>>, gpio_count: usize, ) -> LiteXGPIOController<'client, R>
Sourcepub fn initialize(&self)
pub fn initialize(&self)
Initialize the LiteXGPIOController
This will set all GPIOs to be inputs.
Sourcepub fn gpio_count(&self) -> usize
pub fn gpio_count(&self) -> usize
Returns the number of GPIOs managed by the
LiteXGPIOController
Sourcepub fn get_gpio_pin<'controller>(
&'controller self,
index: usize,
) -> Option<LiteXGPIOPin<'controller, 'client, R>>
pub fn get_gpio_pin<'controller>( &'controller self, index: usize, ) -> Option<LiteXGPIOPin<'controller, 'client, R>>
Create a LiteXGPIOPin
instance
To avoid duplicate use of a GPIO, this will return None
if
an instance for the requested GPIO already exists. Call
LiteXGPIOPin::destroy
(or drop the LiteXGPIOPin
) to be
able to create a new instance for this GPIO.
pub fn service_interrupt(&self)
Auto Trait Implementations§
impl<'client, R> !Freeze for LiteXGPIOController<'client, R>
impl<'client, R> !RefUnwindSafe for LiteXGPIOController<'client, R>
impl<'client, R> !Send for LiteXGPIOController<'client, R>
impl<'client, R> !Sync for LiteXGPIOController<'client, R>
impl<'client, R> Unpin for LiteXGPIOController<'client, R>
impl<'client, R> !UnwindSafe for LiteXGPIOController<'client, 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