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_hal.h File Reference
#include <assert.h>
#include <stdint.h>
#include "fsl_device_registers.h"

Data Structures

struct  tsi_n_consecutive_scans_limits_t
 TSI low power scan intervals limits. More...
 

Enumerations

enum  tsi_status_t {
  kStatus_TSI_Success = 0,
  kStatus_TSI_Busy,
  kStatus_TSI_LowPower,
  kStatus_TSI_Recalibration,
  kStatus_TSI_InvalidChannel,
  kStatus_TSI_InvalidMode,
  kStatus_TSI_Initialized,
  kStatus_TSI_Error
}
 Error codes for the TSI driver. More...
 
enum  tsi_n_consecutive_scans_t {
  kTsiConsecutiveScansNumber_1time = 0,
  kTsiConsecutiveScansNumber_2time = 1,
  kTsiConsecutiveScansNumber_3time = 2,
  kTsiConsecutiveScansNumber_4time = 3,
  kTsiConsecutiveScansNumber_5time = 4,
  kTsiConsecutiveScansNumber_6time = 5,
  kTsiConsecutiveScansNumber_7time = 6,
  kTsiConsecutiveScansNumber_8time = 7,
  kTsiConsecutiveScansNumber_9time = 8,
  kTsiConsecutiveScansNumber_10time = 9,
  kTsiConsecutiveScansNumber_11time = 10,
  kTsiConsecutiveScansNumber_12time = 11,
  kTsiConsecutiveScansNumber_13time = 12,
  kTsiConsecutiveScansNumber_14time = 13,
  kTsiConsecutiveScansNumber_15time = 14,
  kTsiConsecutiveScansNumber_16time = 15,
  kTsiConsecutiveScansNumber_17time = 16,
  kTsiConsecutiveScansNumber_18time = 17,
  kTsiConsecutiveScansNumber_19time = 18,
  kTsiConsecutiveScansNumber_20time = 19,
  kTsiConsecutiveScansNumber_21time = 20,
  kTsiConsecutiveScansNumber_22time = 21,
  kTsiConsecutiveScansNumber_23time = 22,
  kTsiConsecutiveScansNumber_24time = 23,
  kTsiConsecutiveScansNumber_25time = 24,
  kTsiConsecutiveScansNumber_26time = 25,
  kTsiConsecutiveScansNumber_27time = 26,
  kTsiConsecutiveScansNumber_28time = 27,
  kTsiConsecutiveScansNumber_29time = 28,
  kTsiConsecutiveScansNumber_30time = 29,
  kTsiConsecutiveScansNumber_31time = 30,
  kTsiConsecutiveScansNumber_32time = 31
}
 TSI number of scan intervals for each electrode. More...
 
enum  tsi_electrode_osc_prescaler_t {
  kTsiElecOscPrescaler_1div = 0,
  kTsiElecOscPrescaler_2div = 1,
  kTsiElecOscPrescaler_4div = 2,
  kTsiElecOscPrescaler_8div = 3,
  kTsiElecOscPrescaler_16div = 4,
  kTsiElecOscPrescaler_32div = 5,
  kTsiElecOscPrescaler_64div = 6,
  kTsiElecOscPrescaler_128div = 7
}
 TSI electrode oscillator prescaler. More...
 

Functions

void TSI_HAL_Init (TSI_Type *base)
 Initialize hardware. More...
 
void TSI_HAL_SetConfiguration (TSI_Type *base, tsi_config_t *config)
 Set configuration of hardware. More...
 
uint32_t TSI_HAL_Recalibrate (TSI_Type *base, tsi_config_t *config, const uint32_t electrodes, const tsi_parameter_limits_t *parLimits)
 Recalibrate TSI hardware. More...
 
void TSI_HAL_EnableLowPower (TSI_Type *base)
 Enable low power for TSI module. More...
 
void TSI_HAL_DisableLowPower (TSI_Type *base)
 Disable low power for TSI module. More...
 
static uint32_t TSI_HAL_IsModuleEnabled (TSI_Type *base)
 Get module flag enable. More...
 
static uint32_t TSI_HAL_GetScanTriggerMode (TSI_Type *base)
 Get TSI scan trigger mode. More...
 
static uint32_t TSI_HAL_IsScanInProgress (TSI_Type *base)
 Get scan in progress flag. More...
 
static uint32_t TSI_HAL_GetEndOfScanFlag (TSI_Type *base)
 Get end of scan flag. More...
 
static uint32_t TSI_HAL_GetOutOfRangeFlag (TSI_Type *base)
 Get out of range flag. More...
 
static
tsi_electrode_osc_prescaler_t 
TSI_HAL_GetPrescaler (TSI_Type *base)
 Get prescaler. More...
 
static tsi_n_consecutive_scans_t TSI_HAL_GetNumberOfScans (TSI_Type *base)
 Get number of scans (NSCN). More...