embassy-stm32

Crates

git

Versions

stm32u031k4

Flavors

embassy_stm32::tsc::pin_groups

Struct PinGroup

Source
pub struct PinGroup<'d, T, Group> { /* private fields */ }
Expand description

Represents a group of TSC (Touch Sensing Controller) pins.

In the TSC peripheral, pins are organized into groups of four IOs. Each group must have exactly one sampling capacitor pin and can have multiple channel pins or a single shield pin. This structure encapsulates these pin configurations for a single TSC group.

§Pin Roles

  • Sampling Capacitor: One required per group, used for charge transfer.
  • Channel: Sensing pins connected to electrodes for touch detection.
  • Shield: Optional, used for active shielding to improve sensitivity.

§Constraints

  • Each group must have exactly one sampling capacitor pin.
  • A group can have either channel pins or a shield pin, but not both.
  • No more than one shield pin is allowed across all groups.

Implementations§

Source§

impl<'d, T: Instance, G> PinGroup<'d, T, G>

Source

pub fn pin1(&self) -> Option<&Pin<'d, T, G>>

Returns a reference to the first pin in the group, if configured.

Source

pub fn pin2(&self) -> Option<&Pin<'d, T, G>>

Returns a reference to the second pin in the group, if configured.

Source

pub fn pin3(&self) -> Option<&Pin<'d, T, G>>

Returns a reference to the third pin in the group, if configured.

Source

pub fn pin4(&self) -> Option<&Pin<'d, T, G>>

Returns a reference to the fourth pin in the group, if configured.

Trait Implementations§

Source§

impl<'d, T, G> Default for PinGroup<'d, T, G>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'d, T, Group> Freeze for PinGroup<'d, T, Group>

§

impl<'d, T, Group> RefUnwindSafe for PinGroup<'d, T, Group>
where T: RefUnwindSafe, Group: RefUnwindSafe,

§

impl<'d, T, Group> Send for PinGroup<'d, T, Group>
where T: Send, Group: Send,

§

impl<'d, T, Group> Sync for PinGroup<'d, T, Group>
where T: Sync, Group: Sync,

§

impl<'d, T, Group> Unpin for PinGroup<'d, T, Group>
where T: Unpin, Group: Unpin,

§

impl<'d, T, Group> !UnwindSafe for PinGroup<'d, T, Group>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.