[][src]Module kernel::hil::gpio

Structs

InterruptValueWrapper

Standard implementation of InterruptWithValue: handles an gpio::Client::fired and passes it up as a gpio::ClientWithValue::fired.

Enums

Configuration

Enum for which state the pin is in. Some MCUs can support Input/Output pins, so this is a valid option. Function means the pin has been configured to a special function. Determining which function it outside the scope of the HIL, and should instead use a chip-specific API.

FloatingState

Enum for configuring any pull-up or pull-down resistors on the GPIO pin.

InterruptEdge

Enum for selecting which edge to trigger interrupts on.

Traits

Client

Interface for users of synchronous GPIO interrupts. In order to receive interrupts, the user must implement this Client interface.

ClientWithValue

Interfaces for users of GPIO interrupts who handle many interrupts with the same function. The value passed in the callback allows the callback to distinguish which interrupt fired.

Configure

Control and configure a GPIO pin.

ConfigureInputOutput

Configuration trait for pins that can be simultaneously input and output. Having this trait allows an implementation to statically verify this is possible.

Input
Interrupt
InterruptPin

The InterruptPin trait allows a pin to be used as either input or output and also to source interrupts.

InterruptValuePin

The InterruptValuePin trait allows a pin to be used as either input or output and also to source interrupts which pass a value.

InterruptWithValue

Interface that wraps an interrupt to pass a value when it triggers. The standard use case for this trait is when several interrupts call the same callback function and it needs to distinguish which one is calling it by giving each one a unique value.

Output
Pin

The Pin trait allows a pin to be used as either input or output and to be configured.