Kinetis SDK v.1.3 API Reference Manual  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
fsl_tsi_v2_hal_specific.h File Reference
#include <stdint.h>
#include "fsl_device_registers.h"
#include "fsl_tsi_hal.h"

Data Structures

struct  tsi_reference_osc_charge_current_limits_t
 TSI Reference oscillator charge current select limits. More...
 
struct  tsi_external_osc_charge_current_limits_t
 TSI External oscillator charge current select limits. More...
 
struct  tsi_active_mode_prescaler_limits_t
 TSI active mode prescaler limits. More...
 
struct  tsi_parameter_limits_t
 TSI operation mode limits. More...
 

Enumerations

enum  tsi_low_power_interval_t {
  kTsiLowPowerInterval_1ms = 0,
  kTsiLowPowerInterval_5ms = 1,
  kTsiLowPowerInterval_10ms = 2,
  kTsiLowPowerInterval_15ms = 3,
  kTsiLowPowerInterval_20ms = 4,
  kTsiLowPowerInterval_30ms = 5,
  kTsiLowPowerInterval_40ms = 6,
  kTsiLowPowerInterval_50ms = 7,
  kTsiLowPowerInterval_75ms = 8,
  kTsiLowPowerInterval_100ms = 9,
  kTsiLowPowerInterval_125ms = 10,
  kTsiLowPowerInterval_150ms = 11,
  kTsiLowPowerInterval_200ms = 12,
  kTsiLowPowerInterval_300ms = 13,
  kTsiLowPowerInterval_400ms = 14,
  kTsiLowPowerInterval_500ms = 15
}
 TSI low power scan intervals. More...
 
enum  tsi_reference_osc_charge_current_t {
  kTsiRefOscChargeCurrent_2uA = 0,
  kTsiRefOscChargeCurrent_4uA = 1,
  kTsiRefOscChargeCurrent_6uA = 2,
  kTsiRefOscChargeCurrent_8uA = 3,
  kTsiRefOscChargeCurrent_10uA = 4,
  kTsiRefOscChargeCurrent_12uA = 5,
  kTsiRefOscChargeCurrent_14uA = 6,
  kTsiRefOscChargeCurrent_16uA = 7,
  kTsiRefOscChargeCurrent_18uA = 8,
  kTsiRefOscChargeCurrent_20uA = 9,
  kTsiRefOscChargeCurrent_22uA = 10,
  kTsiRefOscChargeCurrent_24uA = 11,
  kTsiRefOscChargeCurrent_26uA = 12,
  kTsiRefOscChargeCurrent_28uA = 13,
  kTsiRefOscChargeCurrent_30uA = 14,
  kTsiRefOscChargeCurrent_32uA = 15,
  kTsiRefOscChargeCurrent_500nA = 0,
  kTsiRefOscChargeCurrent_1uA = 1,
  kTsiRefOscChargeCurrent_2uA = 2,
  kTsiRefOscChargeCurrent_4uA = 3,
  kTsiRefOscChargeCurrent_8uA = 4,
  kTsiRefOscChargeCurrent_16uA = 5,
  kTsiRefOscChargeCurrent_32uA = 6,
  kTsiRefOscChargeCurrent_64uA = 7
}
 TSI Reference oscillator charge current select. More...
 
enum  tsi_external_osc_charge_current_t {
  kTsiExtOscChargeCurrent_2uA = 0,
  kTsiExtOscChargeCurrent_4uA = 1,
  kTsiExtOscChargeCurrent_6uA = 2,
  kTsiExtOscChargeCurrent_8uA = 3,
  kTsiExtOscChargeCurrent_10uA = 4,
  kTsiExtOscChargeCurrent_12uA = 5,
  kTsiExtOscChargeCurrent_14uA = 6,
  kTsiExtOscChargeCurrent_16uA = 7,
  kTsiExtOscChargeCurrent_18uA = 8,
  kTsiExtOscChargeCurrent_20uA = 9,
  kTsiExtOscChargeCurrent_22uA = 10,
  kTsiExtOscChargeCurrent_24uA = 11,
  kTsiExtOscChargeCurrent_26uA = 12,
  kTsiExtOscChargeCurrent_28uA = 13,
  kTsiExtOscChargeCurrent_30uA = 14,
  kTsiExtOscChargeCurrent_32uA = 15,
  kTsiExtOscChargeCurrent_500nA = 0,
  kTsiExtOscChargeCurrent_1uA = 1,
  kTsiExtOscChargeCurrent_2uA = 2,
  kTsiExtOscChargeCurrent_4uA = 3,
  kTsiExtOscChargeCurrent_8uA = 4,
  kTsiExtOscChargeCurrent_16uA = 5,
  kTsiExtOscChargeCurrent_32uA = 6,
  kTsiExtOscChargeCurrent_64uA = 7
}
 TSI External oscillator charge current select. More...
 
enum  tsi_internal_cap_trim_t {
  kTsiIntCapTrim_0_5pF = 0,
  kTsiIntCapTrim_0_6pF = 1,
  kTsiIntCapTrim_0_7pF = 2,
  kTsiIntCapTrim_0_8pF = 3,
  kTsiIntCapTrim_0_9pF = 4,
  kTsiIntCapTrim_1_0pF = 5,
  kTsiIntCapTrim_1_1pF = 6,
  kTsiIntCapTrim_1_2pF = 7
}
 TSI Internal capacitance trim value. More...
 
enum  tsi_osc_delta_voltage_t {
  kTsiOscDeltaVoltage_100mV = 0,
  kTsiOscDeltaVoltage_150mV = 1,
  kTsiOscDeltaVoltage_200mV = 2,
  kTsiOscDeltaVoltage_250mV = 3,
  kTsiOscDeltaVoltage_300mV = 4,
  kTsiOscDeltaVoltage_400mV = 5,
  kTsiOscDeltaVoltage_500mV = 6,
  kTsiOscDeltaVoltage_600mV = 7
}
 TSI Delta voltage applied to analog oscillators. More...
 
enum  tsi_active_mode_clock_divider_t {
  kTsiActiveClkDiv_1div = 0,
  kTsiActiveClkDiv_2048div = 1
}
 TSI Active mode clock divider. More...
 
enum  tsi_active_mode_clock_source_t {
  kTsiActiveClkSource_BusClock = 0,
  kTsiActiveClkSource_MCGIRCLK = 1,
  kTsiActiveClkSource_OSCERCLK = 2
}
 TSI Active mode clock source. More...
 
enum  tsi_active_mode_prescaler_t {
  kTsiActiveModePrescaler_1div = 0,
  kTsiActiveModePrescaler_2div = 1,
  kTsiActiveModePrescaler_4div = 2,
  kTsiActiveModePrescaler_8div = 3,
  kTsiActiveModePrescaler_16div = 4,
  kTsiActiveModePrescaler_32div = 5,
  kTsiActiveModePrescaler_64div = 6,
  kTsiActiveModePrescaler_128div = 7
}
 TSI active mode prescaler. More...
 

Functions

static void TSI_HAL_EnableModule (TSI_Type *base)
 Enable Touch Sensing Input Module. More...
 
static void TSI_HAL_DisableModule (TSI_Type *base)
 Disable Touch Sensing Input Module. More...
 
static void TSI_HAL_EnableStop (TSI_Type *base)
 Enable TSI module in stop mode. More...
 
static void TSI_HAL_DisableStop (TSI_Type *base)
 Disable TSI module in stop mode. More...
 
static void TSI_HAL_EnableOutOfRangeInterrupt (TSI_Type *base)
 Enable out of range interrupt. More...
 
static void TSI_HAL_EnableEndOfScanInterrupt (TSI_Type *base)
 Enable end of scan interrupt. More...
 
static void TSI_HAL_EnablePeriodicalScan (TSI_Type *base)
 Enable periodical (hardware) trigger scan. More...
 
static void TSI_HAL_EnableSoftwareTriggerScan (TSI_Type *base)
 Enable software trigger scan. More...
 
static void TSI_HAL_EnableErrorInterrupt (TSI_Type *base)
 Enable error interrupt. More...
 
static void TSI_HAL_DisableErrorInterrupt (TSI_Type *base)
 Disable error interrupt. More...
 
static void TSI_HAL_ClearOutOfRangeFlag (TSI_Type *base)
 Clear out of range flag. More...
 
static void TSI_HAL_ClearEndOfScanFlag (TSI_Type *base)
 Clear end of scan flag. More...
 
static void TSI_HAL_EnableInterrupt (TSI_Type *base)
 Enable TSI module interrupt. More...
 
static void TSI_HAL_DisableInterrupt (TSI_Type *base)
 Disable TSI interrupt. More...
 
static uint32_t TSI_HAL_IsInterruptEnabled (TSI_Type *base)
 Get interrupt enable flag. More...
 
static void TSI_HAL_StartSoftwareTrigger (TSI_Type *base)
 Start measurement (trigger the new measurement). More...
 
static uint32_t TSI_HAL_IsOverrun (TSI_Type *base)
 Get overrun flag. More...
 
static void TSI_HAL_ClearOverrunFlag (TSI_Type *base)
 Clear over run flag. More...
 
static uint32_t TSI_HAL_GetExternalElectrodeErrorFlag (TSI_Type *base)
 Get external electrode error flag. More...
 
static void TSI_HAL_ClearExternalElectrodeErrorFlag (TSI_Type *base)
 Clear external electrode error flag. More...
 
static void TSI_HAL_SetPrescaler (TSI_Type *base, tsi_electrode_osc_prescaler_t prescaler)
 Set prescaler. More...
 
static void TSI_HAL_SetNumberOfScans (TSI_Type *base, tsi_n_consecutive_scans_t number)
 Set number of scans (NSCN). More...
 
static void TSI_HAL_SetLowPowerScanInterval (TSI_Type *base, tsi_low_power_interval_t interval)
 Set low power scan interval. More...
 
static tsi_low_power_interval_t TSI_HAL_GetLowPowerScanInterval (TSI_Type *base)
 Get low power scan interval. More...
 
static void TSI_HAL_SetLowPowerClock (TSI_Type *base, uint32_t clock)
 Set low power clock. More...
 
static uint32_t TSI_HAL_GetLowPowerClock (TSI_Type *base)
 Get low power clock. More...
 
static void TSI_HAL_SetReferenceChargeCurrent (TSI_Type *base, tsi_reference_osc_charge_current_t current)
 Set the reference oscilator charge current. More...
 
static
tsi_reference_osc_charge_current_t 
TSI_HAL_GetReferenceChargeCurrent (TSI_Type *base)
 Get the reference oscilator charge current. More...
 
static void TSI_HAL_SetElectrodeChargeCurrent (TSI_Type *base, tsi_external_osc_charge_current_t current)
 Set electrode charge current. More...
 
static
tsi_external_osc_charge_current_t 
TSI_HAL_GetElectrodeChargeCurrent (TSI_Type *base)
 Get electrode charge current. More...
 
static void TSI_HAL_SetScanModulo (TSI_Type *base, uint32_t modulo)
 Set scan modulo value. More...
 
static uint32_t TSI_HAL_GetScanModulo (TSI_Type *base)
 Get scan modulo value. More...
 
static void TSI_HAL_SetActiveModeSource (TSI_Type *base, uint32_t source)
 Set active mode source. More...
 
static uint32_t TSI_HAL_GetActiveModeSource (TSI_Type *base)
 Get active mode source. More...
 
static void TSI_HAL_SetActiveModePrescaler (TSI_Type *base, tsi_active_mode_prescaler_t prescaler)
 Set active mode prescaler. More...
 
static uint32_t TSI_HAL_GetActiveModePrescaler (TSI_Type *base)
 Get active mode prescaler. More...
 
static void TSI_HAL_SetLowPowerChannel (TSI_Type *base, uint32_t channel)
 Set low power channel. More...
 
static uint32_t TSI_HAL_GetLowPowerChannel (TSI_Type *base)
 Get low power channel. More...
 
static void TSI_HAL_EnableChannel (TSI_Type *base, uint32_t channel)
 Enable channel. More...
 
static void TSI_HAL_EnableChannels (TSI_Type *base, uint32_t channelsMask)
 Enable channels. More...
 
static void TSI_HAL_DisableChannel (TSI_Type *base, uint32_t channel)
 Disable channel. More...
 
static void TSI_HAL_DisableChannels (TSI_Type *base, uint32_t channelsMask)
 Disable channels. More...
 
static uint32_t TSI_HAL_GetEnabledChannel (TSI_Type *base, uint32_t channel)
 Returns if channel is enabled. More...
 
static uint32_t TSI_HAL_GetEnabledChannels (TSI_Type *base)
 Returns mask of enabled channels. More...
 
static uint16_t TSI_HAL_GetWakeUpChannelCounter (TSI_Type *base)
 Set the Wake up channel counter. More...
 
static uint32_t TSI_HAL_GetCounter (TSI_Type *base, uint32_t channel)
 Get tsi counter on actual channel. More...
 
static void TSI_HAL_SetLowThreshold (TSI_Type *base, uint32_t low_threshold)
 Set low threshold. More...
 
static void TSI_HAL_SetHighThreshold (TSI_Type *base, uint32_t high_threshold)
 Set high threshold. More...