Struct lpc55_hal::drivers::touch::TouchSensor [−][src]
Implementations
impl<P1, P2, P3> TouchSensor<P1, P2, P3> where
P1: PinId,
P2: PinId,
P3: PinId,
[src]
P1: PinId,
P2: PinId,
P3: PinId,
pub fn new(
threshold: [u32; 3],
confidence: u32,
adc: Adc<Enabled>,
adc_timer: Ctimer1<Enabled>,
sample_timer: Ctimer2<Enabled>,
_charge_pin: Pin<Pio1_16, Special<MATCH_OUTPUT3<Ctimer1<Enabled>>>>,
buttons: ButtonPins<P1, P2, P3>
) -> Self
[src]
threshold: [u32; 3],
confidence: u32,
adc: Adc<Enabled>,
adc_timer: Ctimer1<Enabled>,
sample_timer: Ctimer2<Enabled>,
_charge_pin: Pin<Pio1_16, Special<MATCH_OUTPUT3<Ctimer1<Enabled>>>>,
buttons: ButtonPins<P1, P2, P3>
) -> Self
Threshold is the ADC sample limit where an is considered. Confidence is the number of times the threshold needs to be crossed
impl<P1, P2, P3> TouchSensor<P1, P2, P3> where
P1: PinId,
P2: PinId,
P3: PinId,
[src]
P1: PinId,
P2: PinId,
P3: PinId,
pub fn enabled(
self,
dma: &mut Dma<Enabled>,
_token: ClocksSupportTouchToken
) -> Self
[src]
self,
dma: &mut Dma<Enabled>,
_token: ClocksSupportTouchToken
) -> Self
Starts DMA and internal timers to enable touch detection
impl<P1, P2, P3> TouchSensor<P1, P2, P3> where
P1: PinId,
P2: PinId,
P3: PinId,
[src]
P1: PinId,
P2: PinId,
P3: PinId,
pub fn count(&self, bufsel: u8) -> u32
[src]
Count how many elements from a source are available Used for debugging
pub fn reset_results(&self, channel: TouchSensorChannel, offset: i32)
[src]
Used after an edge is detected to prevent the same edge being detected twice
pub fn get_state(
&self,
channel: TouchSensorChannel,
ctype: Compare
) -> TouchResult
[src]
&self,
channel: TouchSensorChannel,
ctype: Compare
) -> TouchResult
Use threshold and confidence value to see if indicated state has occured in current buffer
pub fn has_edge(&self, channel: TouchSensorChannel, edge_type: Edge) -> bool
[src]
Indicate if an edge has occured in current buffer. Does not reset.
Methods from Deref<Target = Adc<Enabled>>
pub fn arm_normal_channel(&mut self, channel_id: u8)
[src]
pub fn arm_comparator_channel(&mut self, channel_id: u8)
[src]
pub fn set_threshold(&mut self, low: u16, high: u16)
[src]
pub fn cancel_compare(&mut self)
[src]
Trait Implementations
impl<P1, P2, P3> Deref for TouchSensor<P1, P2, P3> where
P1: PinId,
P2: PinId,
P3: PinId,
[src]
P1: PinId,
P2: PinId,
P3: PinId,
type Target = Adc<Enabled>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
impl<P1, P2, P3> DerefMut for TouchSensor<P1, P2, P3> where
P1: PinId,
P2: PinId,
P3: PinId,
[src]
P1: PinId,
P2: PinId,
P3: PinId,
Auto Trait Implementations
impl<P1, P2, P3> Send for TouchSensor<P1, P2, P3> where
P1: Send,
P2: Send,
P3: Send,
P1: Send,
P2: Send,
P3: Send,
impl<P1, P2, P3> !Sync for TouchSensor<P1, P2, P3>
impl<P1, P2, P3> Unpin for TouchSensor<P1, P2, P3> where
P1: Unpin,
P2: Unpin,
P3: Unpin,
P1: Unpin,
P2: Unpin,
P3: 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,
pub 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> Same<T> for T
type Output = T
Should always be Self
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.
pub 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>,