pub struct InterruptValueWrapper<'a, IP: InterruptPin<'a>> { /* private fields */ }
Expand description

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

Implementations

Trait Implementations

Called when an interrupt occurs. The identifier will be the same value that was passed to enable_interrupt() when the interrupt was configured. Read more

Return the current pin configuration.

Make the pin an output, returning the current configuration, which should be either Configuration::Output or Configuration::InputOutput. Read more

Disable the pin as an output, returning the current configuration.

Make the pin an input, returning the current configuration, which should be ither Configuration::Input or Configuration::InputOutput. Read more

Disable the pin as an input, returning the current configuration.

Put a pin into its lowest power state, with no guarantees on if it is enabled or not. Implementations are free to use any state (e.g. input, output, disable, etc.) the hardware pin supports to ensure the pin is as low power as possible. Re-enabling the pin requires reconfiguring it (i.e. the state of its enabled configuration is not stored). Read more

Set the floating state of the pin.

Return the current floating state of the pin.

Return whether the pin is an input (reading from the Input trait will return valid results). Returns true if the pin is in Configuration::Input or Configuration::InputOutput. Read more

Return whether the pin is an output (writing to the Output trait will change the output of the pin). Returns true if the pin is in Configuration::Output or Configuration::InputOutput. Read more

Get the current state of an input GPIO pin. For an output pin, return the output; for an input pin, return the input; for disabled or function pins the value is undefined. Read more

Get the current state of a GPIO pin, for a given activation mode.

Set the value that will be passed to clients on an interrupt. Read more

Return the value that is passed to clients on an interrupt. Read more

Set the client for interrupt events.

Return whether this interrupt is pending

Enable an interrupt on the GPIO pin. This does not configure the pin except to enable an interrupt: it should be separately configured as an input, etc. Returns: Ok(()) - the interrupt was set up properly FAIL - the interrupt was not set up properly; this is due to not having an underlying interrupt source yet, i.e. the struct is not yet fully initialized. Read more

Disable interrupts for the GPIO pin.

Set the GPIO pin high. If the pin is not an output or input/output, this call is ignored. Read more

Set the GPIO pin low. If the pin is not an output or input/output, this call is ignored. Read more

Toggle the GPIO pin. If the pin was high, set it low. If the pin was low, set it high. If the pin is not an output or input/output, this call is ignored. Return the new value of the pin. Read more

Activate or deactivate a GPIO pin, for a given activation mode.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.