pub trait Chip {
    type Data: PointerWrapper + Sync + Send;

    const USE_VTABLE_ATTR: ();
    const HAS_GET_DIRECTION: bool = false;
    const HAS_DIRECTION_INPUT: bool = false;
    const HAS_DIRECTION_OUTPUT: bool = false;
    const HAS_GET: bool = false;
    const HAS_SET: bool = false;

    fn get_direction(
        _data: <Self::Data as PointerWrapper>::Borrowed<'_>,
        _offset: u32
    ) -> Result<LineDirection> { ... } fn direction_input(
        _data: <Self::Data as PointerWrapper>::Borrowed<'_>,
        _offset: u32
    ) -> Result { ... } fn direction_output(
        _data: <Self::Data as PointerWrapper>::Borrowed<'_>,
        _offset: u32,
        _value: bool
    ) -> Result { ... } fn get(
        _data: <Self::Data as PointerWrapper>::Borrowed<'_>,
        _offset: u32
    ) -> Result<bool> { ... } fn set(
        _data: <Self::Data as PointerWrapper>::Borrowed<'_>,
        _offset: u32,
        _value: bool
    ) { ... } }
Expand description

A gpio chip.

Required Associated Types

Context data associated with the gpio chip.

It determines the type of the context data passed to each of the methods of the trait.

Required Associated Constants

A marker to prevent implementors from forgetting to use #[vtable] attribute when implementing this trait.

Provided Associated Constants

Indicates if the get_direction method is overridden by the implementor.

Indicates if the direction_input method is overridden by the implementor.

Indicates if the direction_output method is overridden by the implementor.

Indicates if the get method is overridden by the implementor.

Indicates if the set method is overridden by the implementor.

Provided Methods

Returns the direction of the given gpio line.

Configures the direction as input of the given gpio line.

Configures the direction as output of the given gpio line.

The value that will be initially output is also specified.

Returns the current value of the given gpio line.

Sets the value of the given gpio line.

Implementors