How mmmicky/touchlib works
TouchLib is an embedded touch-controller driver library that presents a common API across several chip families. A consumer selects a controller at compile time through a macro in src/TouchLib.h, then uses the selected driver’s initialization, sleep, touch-reading, point, and rotation operations; the shared interface also defines gesture operations. The README documents chip support, while the sampled source confirms the API and compile-time dispatch. Driver internals and their register-map usage were not sampled, so those relationships are left unverified.
Main entry points: TouchLibInterface.hpp Touch API · TouchLib.h Chip Selector · REG Chip Register Maps · ModulesCSTSelf.tpp CST Self
Components 11
Common API
- Chip Selector
src/TouchLib.h - Touch API
src/TouchLibInterface.hpp - Touch Points
src/TouchLibInterface.hpp - Gesture API
src/TouchLibInterface.hpp
Chip Drivers
- CST Self
src/ModulesCSTSelf.tpp - CST Mutual
src/ModulesCSTMutual.tpp - FT3267 / FT5x06
src/ModulesFT3267.tpp - GT911
src/ModulesGT911.tpp - ZTW622
src/ModulesZTW622.tpp
Register Maps
- Chip Register Maps
src/REG
Other components
- Library Consumer
Connections 19
- Library Consumer → Chip Selector: selects macro
src/TouchLib.h - Chip Selector → CST Self: includes when selected
src/TouchLib.h - Chip Selector → CST Mutual: includes when selected
src/TouchLib.h - Chip Selector → FT3267 / FT5x06: includes when selected
src/TouchLib.h - Chip Selector → GT911: includes when selected
src/TouchLib.h - Chip Selector → ZTW622: includes when selected
src/TouchLib.h - Library Consumer → Touch API: uses operations
- Touch API → Touch Points: exposes point data
src/TouchLibInterface.hpp - Touch API → Gesture API: defines gesture contract
src/TouchLibInterface.hpp - CST Self → Touch API: implements contract
- CST Mutual → Touch API: implements contract
- FT3267 / FT5x06 → Touch API: implements contract
- GT911 → Touch API: implements contract
- ZTW622 → Touch API: implements contract
- CST Self → Chip Register Maps: may use definitions
- CST Mutual → Chip Register Maps: may use definitions
- FT3267 / FT5x06 → Chip Register Maps: may use definitions
- GT911 → Chip Register Maps: may use definitions
- ZTW622 → Chip Register Maps: may use definitions