kernel::bsp::device_driver::bcm::bcm2xxx_gpio

Struct GPIO

Source
pub struct GPIO {
    inner: NullLock<GPIOInner>,
}
Expand description

Representation of the GPIO HW.

Fields§

§inner: NullLock<GPIOInner>

Implementations§

Source§

impl GPIO

Source

pub const COMPATIBLE: &'static str = "BCM GPIO"

Source

pub const unsafe fn new(mmio_start_addr: usize) -> Self

Create an instance.

§Safety
  • The user must ensure to provide a correct MMIO start address.
Source

pub fn map_pl011_uart(&self)

Concurrency safe version of GPIOInner.map_pl011_uart()

Trait Implementations§

Source§

impl DeviceDriver for GPIO

Source§

fn compatible(&self) -> &'static str

Return a compatibility string for identifying the driver.
Source§

unsafe fn init(&self) -> Result<(), &'static str>

Called by the kernel to bring up the device. Read more

Auto Trait Implementations§

§

impl !Freeze for GPIO

§

impl !RefUnwindSafe for GPIO

§

impl Send for GPIO

§

impl Sync for GPIO

§

impl Unpin for GPIO

§

impl UnwindSafe for GPIO

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.