A library for Freescale MCU which contain TSI peripheral, just for Kinetis L version. Because they use "lighter" version of TSI peripheral.
Fork of tsi_sensor by
TSIAnalogSlider Class Reference
Analog slider which consists of two electrodes. More...
#include <tsi_sensor.h>
Public Member Functions | |
TSIAnalogSlider (PinName elec0, PinName elec1, uint32_t range) | |
Initialize the TSI Touch Sensor with the given PinNames. | |
TSIAnalogSlider (uint32_t elec0, uint32_t elec1, uint32_t range) | |
Initialize the TSI Touch Sensor. | |
float | readPercentage () |
Read Touch Sensor percentage value. | |
uint32_t | readDistance () |
Read Touch Sensor distance. | |
TSIElectrode * | getCurrentElectrode () |
Get current electrode. | |
void | setCurrentElectrode (TSIElectrode *elec) |
Set current electrode which is being measured. | |
TSIElectrode * | getNextElectrode (TSIElectrode *electrode) |
Get next electrode. | |
uint32_t | getAbsoluteDistance () |
Return absolute distance position. | |
uint32_t | getAbsolutePosition () |
Return absolute precentage position. | |
void | setScan (uint32_t scan) |
Set value to the scan in progress flag. | |
Static Public Member Functions | |
static TSIAnalogSlider * | getInstance () |
Return instance to Analog slider. |
Detailed Description
Analog slider which consists of two electrodes.
Definition at line 150 of file tsi_sensor.h.
Constructor & Destructor Documentation
TSIAnalogSlider | ( | PinName | elec0, |
PinName | elec1, | ||
uint32_t | range | ||
) |
Initialize the TSI Touch Sensor with the given PinNames.
Definition at line 27 of file tsi_sensor.cpp.
TSIAnalogSlider | ( | uint32_t | elec0, |
uint32_t | elec1, | ||
uint32_t | range | ||
) |
Initialize the TSI Touch Sensor.
Definition at line 30 of file tsi_sensor.cpp.
Member Function Documentation
uint32_t getAbsoluteDistance | ( | ) |
Return absolute distance position.
Definition at line 194 of file tsi_sensor.h.
uint32_t getAbsolutePosition | ( | ) |
Return absolute precentage position.
Definition at line 199 of file tsi_sensor.h.
TSIElectrode* getCurrentElectrode | ( | ) |
Get current electrode.
Definition at line 175 of file tsi_sensor.h.
static TSIAnalogSlider* getInstance | ( | ) | [static] |
TSIElectrode* getNextElectrode | ( | TSIElectrode * | electrode ) |
Get next electrode.
Definition at line 185 of file tsi_sensor.h.
uint32_t readDistance | ( | ) |
Read Touch Sensor distance.
- Returns:
- distance in mm. The value is between [0 ... _range]
Definition at line 130 of file tsi_sensor.cpp.
float readPercentage | ( | ) |
Read Touch Sensor percentage value.
- Returns:
- percentage value between [0 ... 1]
Definition at line 125 of file tsi_sensor.cpp.
void setCurrentElectrode | ( | TSIElectrode * | elec ) |
Set current electrode which is being measured.
Definition at line 180 of file tsi_sensor.h.
void setScan | ( | uint32_t | scan ) |
Set value to the scan in progress flag.
Definition at line 204 of file tsi_sensor.h.
Generated on Mon Jul 18 2022 23:31:28 by 1.7.2