[−][src]Struct stmpe1600::Stmpe1600
A struct representing the STMPE1600 device driver.
Methods
impl<I2C, E> Stmpe1600<I2C> where
I2C: Read<Error = E> + Write<Error = E>,
E: Debug,
[src]
I2C: Read<Error = E> + Write<Error = E>,
E: Debug,
pub fn get(&self, pin: u8) -> Result<bool, Error<E>>
[src]
Gets the current state of the specified pin.
To get the state of all the pins at once, see get_all
.
pub fn get_all<I>(&self) -> Result<[bool; 16], Error<E>>
[src]
Gets the current state of the all pins.
To get the state a single pin, see get
.
pub fn set(&self, pin: u8, value: bool) -> Result<(), Error<E>>
[src]
Sets the current state of the specified pin.
To set the state of all the pins at once, see set_all
.
pub fn set_all(&self, mask: u16) -> Result<(), Error<E>>
[src]
Sets the current state of the all the pins.
To set the state a single pin, see set
.
pub fn get_interrupts(&self) -> Result<[bool; 16], Error<E>>
[src]
Gets the pending interrupts and returns them in an array.
This function clears any pending bits from the STMPE1600, and in doing so, stops triggering the interrupt output pin.
Trait Implementations
Auto Trait Implementations
impl<I2C> Send for Stmpe1600<I2C> where
I2C: Send,
I2C: Send,
impl<I2C> !Sync for Stmpe1600<I2C>
impl<I2C> Unpin for Stmpe1600<I2C> where
I2C: Unpin,
I2C: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,