A library for Freescale MCU which contain TSI peripheral, just for Kinetis L version. Because they use "lighter" version of TSI peripheral.

Dependents:   kl25z-tinyshell-demo tsi_slider_light_senso_LED frdm_tsi_slider_led_blend demo_slider ... more

This pull request has been accepted and merged in by Martin Kojtal

Added PTC2 Mapping and Fixed readDistance() function

added mapping for PTC2 to TSI0_CH15 as per datasheet. Fixed readDistance() and getAbsoluteDistance() functions. Error on line 108 of tsi_sensor.cpp prevented distance measurement

Fix for get distance command - prevously uint32_t dist_pos0 = (perc_pos0 * _range) / 100; uint32_t dist_pos1 = (perc_pos0 * _range) / 100; prevented calculation of distance, changed to: uint32_t dist_pos0 = (perc_pos0 * _range) / 100; uint32_t dist_pos1 = (perc_pos1 * _range) / 100; now correctly calculates distance. Tested on KL46z

Fork of Kojto's library with bugfixes: * added PTC2/TSI0_CH15 pinmapping for KL25 and KL46 MCUs * Fixed readDistance() function FRDM, FRDM-KL25Z, FRDM-KL46Z, TSI

1 comment:

15 Jun 2015

Thanks ! It was merged