Fork of Kojto's library with bugfixes: * added PTC2/TSI0_CH15 pinmapping for KL25 and KL46 MCUs * Fixed readDistance() function
Fork of tsi_sensor by
Fork of Kojto's library with bugfixes
- added PTC2/TSI0_CH15 pinmapping for KL25 and KL46 MCUs
- Fixed readDistance() function
Diff: tsi_sensor.cpp
- Revision:
- 3:20ffa9b18488
- Parent:
- 1:8a2098a10330
- Child:
- 4:f64097679f27
--- a/tsi_sensor.cpp Sat Feb 22 15:42:11 2014 +0000 +++ b/tsi_sensor.cpp Sun Feb 23 18:31:58 2014 +0000 @@ -24,11 +24,11 @@ void tsi_irq(void); TSIAnalogSlider *TSIAnalogSlider::_instance; -TSIAnalogSlider::TSIAnalogSlider(TSIElectrode& elec0, TSIElectrode& elec1, +TSIAnalogSlider::TSIAnalogSlider(uint32_t elec0, uint32_t elec1, uint32_t range) : _elec0(elec0), _elec1(elec1), _range(range) { _instance = this; - _current_elec = &elec0; + _current_elec = &_elec0; SIM->SCGC5 |= SIM_SCGC5_TSI_MASK; TSI0->GENCS |= (TSI_GENCS_ESOR_MASK | TSI_GENCS_MODE(0) | TSI_GENCS_REFCHRG(4)