TTP229 16key touch keypad
TTP229 Class Reference
16key touch keypad
Only supported 16key and active low mode
jamper settng : TP1=1(jamper2=open):active low, TP2=0(jamper3=close):16key mode
More...
#include <TTP229.h>
Public Member Functions | |
TTP229 (PinName sdopin, PinName sclpin) | |
void | attach (const FunctionPointer &fp) |
set function that is called at change state of keypad FunctionPointer is a pointer to function(no param and void return) | |
bitset< 16 > | getkeys () |
get keypad status | |
operator bitset< 16 > () | |
same as getkeys() | |
int | onkey () |
get keypad status especially singlekey mode(TP3=1,TP4=1) | |
bool | ison (size_t i) |
Is number i(0~15) keypad touched? | |
bool | operator[] (size_t i) |
same as ison() |
Detailed Description
16key touch keypad
Only supported 16key and active low mode
jamper settng : TP1=1(jamper2=open):active low, TP2=0(jamper3=close):16key mode
Definition at line 10 of file TTP229.h.
Constructor & Destructor Documentation
TTP229 | ( | PinName | sdopin, |
PinName | sclpin | ||
) |
- Parameters:
-
sdopin PinName that support DigitalIn and InterruptIn, connected to TTP229 SDO. sclpin PinName that support DigitalOut, connected to TTP229 SCL.
Definition at line 3 of file TTP229.cpp.
Member Function Documentation
void attach | ( | const FunctionPointer & | fp ) |
set function that is called at change state of keypad
FunctionPointer is a pointer to function(no param and void return)
void func();
ttp229.attach(&func);
or to menber function(no param and void return)
class Foo { public: void func(); }; Foo foo; ttp229.attach(FunctionPointer(&foo, &Foo::func));
int onkey | ( | ) |
Generated on Fri Jul 29 2022 01:21:48 by 1.7.2