This is a VERY low-level library for controlling the TSI hardware module in a KL25 microcontroller. The programmer creates the TSI object passing basic parameters, and selects the active channels. Then, a scan on a given channel can be started, and the raw result can be read.
TSI Class Reference
KL25 TSI low-level library with very basic functions. More...
#include <TSIHW.h>
Detailed Description
KL25 TSI low-level library with very basic functions.
#include "mbed.h" #include "TSIHW.h" TSI touch(0,0,0,2,2); Serial pc(USBTX, USBRX); int main() { uint16_t s; pc.printf("BEGIN\r\n"); touch.ActivateChannel(5); // Electrode connected to PTA4 pc.printf("ACTIVATE\r\n"); while(1) { s = 0; touch.Start(5); pc.printf("START\r\n"); while(!s) { s = touch.Read(); } pc.printf("TOUCH: %d\r\n", s); wait(1); } }
Generated on Thu Jul 14 2022 13:17:10 by 1.7.2