pub struct Pin<B: Board> { /* private fields */ }
Implementations§
Trait Implementations§
Source§impl<B: Board> GpioPin for Pin<B>
impl<B: Board> GpioPin for Pin<B>
Source§fn set_mode(&self, mode: PinMode) -> Result<()>
fn set_mode(&self, mode: PinMode) -> Result<()>
Sets the mode of the GPIO pin as input, output, or open drain I/O.
Source§fn set_pull_mode(&self, mode: PullMode) -> Result<()>
fn set_pull_mode(&self, mode: PullMode) -> Result<()>
Sets the weak pull resistors of the GPIO pin.
Source§fn get_internal_pin_name(&self) -> Option<&str>
fn get_internal_pin_name(&self) -> Option<&str>
Not meant for API clients, this method returns the pin name as it is known to the
transport (which may have been through one or more alias mappings from the name provided
by the API client.) This method is used by implementations of
GpioMonitoring
.Source§fn analog_read(&self) -> Result<f32>
fn analog_read(&self) -> Result<f32>
Reads the analog value of the GPIO pin in Volts.
AnalogInput
mode disables digital
circuitry for better results, but this method may also work in other modes.Auto Trait Implementations§
impl<B> Freeze for Pin<B>
impl<B> !RefUnwindSafe for Pin<B>
impl<B> !Send for Pin<B>
impl<B> !Sync for Pin<B>
impl<B> Unpin for Pin<B>
impl<B> !UnwindSafe for Pin<B>
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