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_v4_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_config_t
 TSI configuration structure. More...
 
struct  tsi_parameter_limits_t
 TSI operation mode limits. More...
 

Enumerations

enum  tsi_analog_mode_select_t {
  kTsiAnalogModeSel_Capacitive = 0,
  kTsiAnalogModeSel_NoiseNoFreqLim = 4,
  kTsiAnalogModeSel_NoiseFreqLim = 8,
  kTsiAnalogModeSel_AutoNoise = 12
}
 TSI analog mode select. 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 and discharge current select. More...
 
enum  tsi_oscilator_voltage_rails_t {
  kTsiOscVolRails_Dv_103 = 0,
  kTsiOscVolRails_Dv_073 = 1,
  kTsiOscVolRails_Dv_043 = 2,
  kTsiOscVolRails_Dv_029 = 3
}
 TSI oscilator's voltage rails. 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 and discharge current select. More...
 
enum  tsi_channel_number_t {
  kTsiChannelNumber_0 = 0,
  kTsiChannelNumber_1 = 1,
  kTsiChannelNumber_2 = 2,
  kTsiChannelNumber_3 = 3,
  kTsiChannelNumber_4 = 4,
  kTsiChannelNumber_5 = 5,
  kTsiChannelNumber_6 = 6,
  kTsiChannelNumber_7 = 7,
  kTsiChannelNumber_8 = 8,
  kTsiChannelNumber_9 = 9,
  kTsiChannelNumber_10 = 10,
  kTsiChannelNumber_11 = 11,
  kTsiChannelNumber_12 = 12,
  kTsiChannelNumber_13 = 13,
  kTsiChannelNumber_14 = 14,
  kTsiChannelNumber_15 = 15
}
 TSI channel number. More...
 

Functions

static void TSI_HAL_EnableOutOfRangeInterrupt (TSI_Type *base)
 Enables an out-of-range interrupt. More...
 
static void TSI_HAL_EnableEndOfScanInterrupt (TSI_Type *base)
 Enables the end of the scan interrupt. More...
 
static void TSI_HAL_EnableModule (TSI_Type *base)
 Enables the Touch Sensing Input Module. More...
 
static void TSI_HAL_DisableModule (TSI_Type *base)
 Disables the Touch Sensing Input Module. More...
 
static void TSI_HAL_EnableInterrupt (TSI_Type *base)
 Enables the TSI module interrupt. More...
 
static void TSI_HAL_DisableInterrupt (TSI_Type *base)
 Disables the TSI interrupt. More...
 
static uint32_t TSI_HAL_IsInterruptEnabled (TSI_Type *base)
 Gets the interrupt enable flag. More...
 
static uint32_t TSI_HAL_GetEnableStop (TSI_Type *base)
 Gets the TSI STOP enable. More...
 
static void TSI_HAL_EnableStop (TSI_Type *base)
 Sets the TSI STOP enable. More...
 
static void TSI_HAL_DisableStop (TSI_Type *base)
 Sets the TSI STOP disable. More...
 
static void TSI_HAL_EnableHardwareTriggerScan (TSI_Type *base)
 Enables the periodical (hardware) trigger scan. More...
 
static void TSI_HAL_EnableSoftwareTriggerScan (TSI_Type *base)
 Enables the periodical (hardware) trigger scan. More...
 
static void TSI_HAL_CurrentSourcePairSwapped (TSI_Type *base)
 Swaps the current sources (CURSW) of electrode oscillator and reference oscillator. More...
 
static void TSI_HAL_CurrentSourcePairNotSwapped (TSI_Type *base)
 Does not swap the current sources (CURSW) of electrode oscillator and reference oscillator. More...
 
static uint32_t TSI_HAL_GetCurrentSourcePairSwapped (TSI_Type *base)
 Gets the current source pair swapped status. More...
 
static void TSI_HAL_ClearOutOfRangeFlag (TSI_Type *base)
 Clears an out-of-range flag. More...
 
static void TSI_HAL_ClearEndOfScanFlag (TSI_Type *base)
 Clears the end of scan flag. More...
 
static void TSI_HAL_SetPrescaler (TSI_Type *base, tsi_electrode_osc_prescaler_t prescaler)
 Sets the prescaler. More...
 
static void TSI_HAL_SetNumberOfScans (TSI_Type *base, tsi_n_consecutive_scans_t number)
 Sets the number of scans (NSCN). More...
 
static void TSI_HAL_SetMeasuredChannelNumber (TSI_Type *base, uint32_t channel)
 Sets the the measured channel number. More...
 
static uint32_t TSI_HAL_GetMeasuredChannelNumber (TSI_Type *base)
 Gets the measured channel number. More...
 
static void TSI_HAL_DmaTransferEnable (TSI_Type *base)
 DMA transfer enable. More...
 
static void TSI_HAL_DmaTransferDisable (TSI_Type *base)
 DMA transfer disable - does not generate DMA transfer request. More...
 
static uint32_t TSI_HAL_IsDmaTransferEnable (TSI_Type *base)
 Gets the DMA transfer enable flag. More...
 
static void TSI_HAL_StartSoftwareTrigger (TSI_Type *base)
 Starts measurement (trigger the new measurement). More...
 
static uint32_t TSI_HAL_GetCounter (TSI_Type *base)
 Gets the conversion counter value. More...
 
static void TSI_HAL_SetLowThreshold (TSI_Type *base, uint32_t low_threshold)
 Sets the TSI wake-up channel low threshold. More...
 
static void TSI_HAL_SetHighThreshold (TSI_Type *base, uint32_t high_threshold)
 Sets the TSI wake-up channel high threshold. More...
 
static void TSI_HAL_SetMode (TSI_Type *base, tsi_analog_mode_select_t mode)
 Sets the analog mode of the TSI module. More...
 
static tsi_analog_mode_select_t TSI_HAL_GetMode (TSI_Type *base)
 Gets the analog mode of the TSI module. More...
 
static uint32_t TSI_HAL_GetNoiseResult (TSI_Type *base)
 Gets the analog mode of the TSI module. More...
 
static void TSI_HAL_SetReferenceChargeCurrent (TSI_Type *base, tsi_reference_osc_charge_current_t current)
 Sets the reference oscillator charge current. More...
 
static
tsi_reference_osc_charge_current_t 
TSI_HAL_GetReferenceChargeCurrent (TSI_Type *base)
 Gets the reference oscillator charge current. More...
 
static void TSI_HAL_SetOscilatorVoltageRails (TSI_Type *base, tsi_oscilator_voltage_rails_t dvolt)
 Sets the oscillator's voltage rails. More...
 
static
tsi_oscilator_voltage_rails_t 
TSI_HAL_GetOscilatorVoltageRails (TSI_Type *base)
 Gets the oscillator's voltage rails. More...
 
static void TSI_HAL_SetElectrodeChargeCurrent (TSI_Type *base, tsi_external_osc_charge_current_t current)
 Sets the external electrode charge current. More...
 
static
tsi_external_osc_charge_current_t 
TSI_HAL_GetElectrodeChargeCurrent (TSI_Type *base)
 Gets the electrode charge current. More...
 

Variables

uint32_t tsi_hal_gencs
 

Function Documentation

static void TSI_HAL_EnableOutOfRangeInterrupt ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
None.
static void TSI_HAL_EnableEndOfScanInterrupt ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
None.
static void TSI_HAL_EnableModule ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
None.
static void TSI_HAL_DisableModule ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
None.
static void TSI_HAL_EnableInterrupt ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
None.
static void TSI_HAL_DisableInterrupt ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
None.
static uint32_t TSI_HAL_IsInterruptEnabled ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
State of enable interrupt flag.
static void TSI_HAL_EnableStop ( TSI_Type *  base)
inlinestatic

This enables TSI module function in low power modes.

Parameters
baseTSI module base address.
Returns
None.
static void TSI_HAL_DisableStop ( TSI_Type *  base)
inlinestatic

The TSI is disabled in low power modes.

Parameters
baseTSI module base address.
Returns
None.
static void TSI_HAL_EnableSoftwareTriggerScan ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
None.
static void TSI_HAL_ClearOutOfRangeFlag ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
None.
static void TSI_HAL_ClearEndOfScanFlag ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
None.
static void TSI_HAL_SetPrescaler ( TSI_Type *  base,
tsi_electrode_osc_prescaler_t  prescaler 
)
inlinestatic
Parameters
baseTSI module base address.
prescalerPrescaler value.
Returns
None.
static void TSI_HAL_SetNumberOfScans ( TSI_Type *  base,
tsi_n_consecutive_scans_t  number 
)
inlinestatic
Parameters
baseTSI module base address.
numberNumber of scans.
Returns
None.
static void TSI_HAL_StartSoftwareTrigger ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
None.
static void TSI_HAL_SetLowThreshold ( TSI_Type *  base,
uint32_t  low_threshold 
)
inlinestatic
Parameters
baseTSI module base address.
low_thresholdLow counter threshold.
Returns
None.
static void TSI_HAL_SetHighThreshold ( TSI_Type *  base,
uint32_t  high_threshold 
)
inlinestatic
Parameters
baseTSI module base address.
high_thresholdHigh counter threshold.
Returns
None.
static void TSI_HAL_SetReferenceChargeCurrent ( TSI_Type *  base,
tsi_reference_osc_charge_current_t  current 
)
inlinestatic
Parameters
baseTSI module base address.
currentThe charge current.
Returns
None.
static tsi_reference_osc_charge_current_t TSI_HAL_GetReferenceChargeCurrent ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
tsi_reference_osc_charge_current_t The charge current.
static void TSI_HAL_SetElectrodeChargeCurrent ( TSI_Type *  base,
tsi_external_osc_charge_current_t  current 
)
inlinestatic
Parameters
baseTSI module base address.
currentElectrode current.
Returns
None.
static tsi_external_osc_charge_current_t TSI_HAL_GetElectrodeChargeCurrent ( TSI_Type *  base)
inlinestatic
Parameters
baseTSI module base address.
Returns
Charge current.