Class header for the AT42QT1010 device.

Dependents:   AT42QT1010_Hello_world

Embed: (wiki syntax)

« Back to documentation index

AT42QT1010 Class Reference

AT42QT1010 Class Reference

Class for the AT42QT1010 Capactitive Touch Sensor. More...

#include <AT42QT1010.h>

Public Member Functions

 AT42QT1010 (PinName)
 Define the device without use of the on-board LED.
 AT42QT1010 (PinName, PinName)
 Define the device using both breakout I/O pins.
void write (int state)
 Writes to the LED, if defined.
int read ()
 Take in the current value being output by the device.
 operator int ()
 Shorthand for read().
void attach_rise (void(*fpr)(void))
 Initiate interrupts for the rising edge of data.
void attach_fall (void(*fpr)(void))
 Initiate interrupts for the falling edge of data.

Detailed Description

Class for the AT42QT1010 Capactitive Touch Sensor.

Definition at line 7 of file AT42QT1010.h.


Constructor & Destructor Documentation

AT42QT1010 ( PinName  data ) [explicit]

Define the device without use of the on-board LED.

Definition at line 36 of file AT42QT1010.h.

AT42QT1010 ( PinName  data,
PinName  led_pin 
) [explicit]

Define the device using both breakout I/O pins.

Requires manual modification to the breakout before use.

Definition at line 40 of file AT42QT1010.h.


Member Function Documentation

void attach_fall ( void(*)(void)  fpr )

Initiate interrupts for the falling edge of data.

Parameters:
fprFunction pointer to interrupt routine.

Definition at line 64 of file AT42QT1010.h.

void attach_rise ( void(*)(void)  fpr )

Initiate interrupts for the rising edge of data.

Parameters:
fprFunction pointer to interrupt routine.

Definition at line 61 of file AT42QT1010.h.

operator int (  )

Shorthand for read().

Definition at line 22 of file AT42QT1010.h.

int read (  )

Take in the current value being output by the device.

Definition at line 57 of file AT42QT1010.h.

void write ( int  state )

Writes to the LED, if defined.

Parameters:
state0 or 1 to power the LED

Definition at line 50 of file AT42QT1010.h.