The MCUXpresso SDK provides a driver for the Touch Sensing Input (TSI) module of MCUXpresso SDK devices.
|
enum | tsi_n_consecutive_scans_t {
kTSI_ConsecutiveScansNumber_1time = 0U,
kTSI_ConsecutiveScansNumber_2time = 1U,
kTSI_ConsecutiveScansNumber_3time = 2U,
kTSI_ConsecutiveScansNumber_4time = 3U,
kTSI_ConsecutiveScansNumber_5time = 4U,
kTSI_ConsecutiveScansNumber_6time = 5U,
kTSI_ConsecutiveScansNumber_7time = 6U,
kTSI_ConsecutiveScansNumber_8time = 7U,
kTSI_ConsecutiveScansNumber_9time = 8U,
kTSI_ConsecutiveScansNumber_10time = 9U,
kTSI_ConsecutiveScansNumber_11time = 10U,
kTSI_ConsecutiveScansNumber_12time = 11U,
kTSI_ConsecutiveScansNumber_13time = 12U,
kTSI_ConsecutiveScansNumber_14time = 13U,
kTSI_ConsecutiveScansNumber_15time = 14U,
kTSI_ConsecutiveScansNumber_16time = 15U,
kTSI_ConsecutiveScansNumber_17time = 16U,
kTSI_ConsecutiveScansNumber_18time = 17U,
kTSI_ConsecutiveScansNumber_19time = 18U,
kTSI_ConsecutiveScansNumber_20time = 19U,
kTSI_ConsecutiveScansNumber_21time = 20U,
kTSI_ConsecutiveScansNumber_22time = 21U,
kTSI_ConsecutiveScansNumber_23time = 22U,
kTSI_ConsecutiveScansNumber_24time = 23U,
kTSI_ConsecutiveScansNumber_25time = 24U,
kTSI_ConsecutiveScansNumber_26time = 25U,
kTSI_ConsecutiveScansNumber_27time = 26U,
kTSI_ConsecutiveScansNumber_28time = 27U,
kTSI_ConsecutiveScansNumber_29time = 28U,
kTSI_ConsecutiveScansNumber_30time = 29U,
kTSI_ConsecutiveScansNumber_31time = 30U,
kTSI_ConsecutiveScansNumber_32time = 31U
} |
| TSI number of scan intervals for each electrode. More...
|
|
enum | tsi_electrode_osc_prescaler_t {
kTSI_ElecOscPrescaler_1div = 0U,
kTSI_ElecOscPrescaler_2div = 1U,
kTSI_ElecOscPrescaler_4div = 2U,
kTSI_ElecOscPrescaler_8div = 3U,
kTSI_ElecOscPrescaler_16div = 4U,
kTSI_ElecOscPrescaler_32div = 5U,
kTSI_ElecOscPrescaler_64div = 6U,
kTSI_ElecOscPrescaler_128div = 7U
} |
| TSI electrode oscillator prescaler. More...
|
|
enum | tsi_low_power_clock_source_t {
kTSI_LowPowerClockSource_LPOCLK = 0U,
kTSI_LowPowerClockSource_VLPOSCCLK = 1U
} |
| TSI low power mode clock source. More...
|
|
enum | tsi_low_power_scan_interval_t {
kTSI_LowPowerInterval_1ms = 0U,
kTSI_LowPowerInterval_5ms = 1U,
kTSI_LowPowerInterval_10ms = 2U,
kTSI_LowPowerInterval_15ms = 3U,
kTSI_LowPowerInterval_20ms = 4U,
kTSI_LowPowerInterval_30ms = 5U,
kTSI_LowPowerInterval_40ms = 6U,
kTSI_LowPowerInterval_50ms = 7U,
kTSI_LowPowerInterval_75ms = 8U,
kTSI_LowPowerInterval_100ms = 9U,
kTSI_LowPowerInterval_125ms = 10U,
kTSI_LowPowerInterval_150ms = 11U,
kTSI_LowPowerInterval_200ms = 12U,
kTSI_LowPowerInterval_300ms = 13U,
kTSI_LowPowerInterval_400ms = 14U,
kTSI_LowPowerInterval_500ms = 15U
} |
| TSI low power scan intervals. More...
|
|
enum | tsi_reference_osc_charge_current_t {
kTSI_RefOscChargeCurrent_2uA = 0U,
kTSI_RefOscChargeCurrent_4uA = 1U,
kTSI_RefOscChargeCurrent_6uA = 2U,
kTSI_RefOscChargeCurrent_8uA = 3U,
kTSI_RefOscChargeCurrent_10uA = 4U,
kTSI_RefOscChargeCurrent_12uA = 5U,
kTSI_RefOscChargeCurrent_14uA = 6U,
kTSI_RefOscChargeCurrent_16uA = 7U,
kTSI_RefOscChargeCurrent_18uA = 8U,
kTSI_RefOscChargeCurrent_20uA = 9U,
kTSI_RefOscChargeCurrent_22uA = 10U,
kTSI_RefOscChargeCurrent_24uA = 11U,
kTSI_RefOscChargeCurrent_26uA = 12U,
kTSI_RefOscChargeCurrent_28uA = 13U,
kTSI_RefOscChargeCurrent_30uA = 14U,
kTSI_RefOscChargeCurrent_32uA = 15U
} |
| TSI Reference oscillator charge current select. More...
|
|
enum | tsi_external_osc_charge_current_t {
kTSI_ExtOscChargeCurrent_2uA = 0U,
kTSI_ExtOscChargeCurrent_4uA = 1U,
kTSI_ExtOscChargeCurrent_6uA = 2U,
kTSI_ExtOscChargeCurrent_8uA = 3U,
kTSI_ExtOscChargeCurrent_10uA = 4U,
kTSI_ExtOscChargeCurrent_12uA = 5U,
kTSI_ExtOscChargeCurrent_14uA = 6U,
kTSI_ExtOscChargeCurrent_16uA = 7U,
kTSI_ExtOscChargeCurrent_18uA = 8U,
kTSI_ExtOscChargeCurrent_20uA = 9U,
kTSI_ExtOscChargeCurrent_22uA = 10U,
kTSI_ExtOscChargeCurrent_24uA = 11U,
kTSI_ExtOscChargeCurrent_26uA = 12U,
kTSI_ExtOscChargeCurrent_28uA = 13U,
kTSI_ExtOscChargeCurrent_30uA = 14U,
kTSI_ExtOscChargeCurrent_32uA = 15U
} |
| TSI External oscillator charge current select. More...
|
|
enum | tsi_active_mode_clock_source_t {
kTSI_ActiveClkSource_LPOSCCLK = 0U,
kTSI_ActiveClkSource_MCGIRCLK = 1U,
kTSI_ActiveClkSource_OSCERCLK = 2U
} |
| TSI Active mode clock source. More...
|
|
enum | tsi_active_mode_prescaler_t {
kTSI_ActiveModePrescaler_1div = 0U,
kTSI_ActiveModePrescaler_2div = 1U,
kTSI_ActiveModePrescaler_4div = 2U,
kTSI_ActiveModePrescaler_8div = 3U,
kTSI_ActiveModePrescaler_16div = 4U,
kTSI_ActiveModePrescaler_32div = 5U,
kTSI_ActiveModePrescaler_64div = 6U,
kTSI_ActiveModePrescaler_128div = 7U
} |
| TSI active mode prescaler. More...
|
|
enum | tsi_status_flags_t {
kTSI_EndOfScanFlag = TSI_GENCS_EOSF_MASK,
kTSI_OutOfRangeFlag = TSI_GENCS_OUTRGF_MASK,
kTSI_ExternalElectrodeErrorFlag = TSI_GENCS_EXTERF_MASK,
kTSI_OverrunErrorFlag = TSI_GENCS_OVRF_MASK
} |
| TSI status flags. More...
|
|
enum | tsi_interrupt_enable_t {
kTSI_GlobalInterruptEnable = 1U,
kTSI_OutOfRangeInterruptEnable = 2U,
kTSI_EndOfScanInterruptEnable = 4U,
kTSI_ErrorInterrruptEnable = 8U
} |
| TSI feature interrupt source. More...
|
|
|
void | TSI_Init (TSI_Type *base, const tsi_config_t *config) |
| Initializes hardware. More...
|
|
void | TSI_Deinit (TSI_Type *base) |
| De-initializes hardware. More...
|
|
void | TSI_GetNormalModeDefaultConfig (tsi_config_t *userConfig) |
| Gets TSI normal mode user configuration structure. More...
|
|
void | TSI_GetLowPowerModeDefaultConfig (tsi_config_t *userConfig) |
| Gets the TSI low power mode default user configuration structure. More...
|
|
void | TSI_Calibrate (TSI_Type *base, tsi_calibration_data_t *calBuff) |
| Hardware calibration. More...
|
|
void | TSI_EnableInterrupts (TSI_Type *base, uint32_t mask) |
| Enables the TSI interrupt requests. More...
|
|
void | TSI_DisableInterrupts (TSI_Type *base, uint32_t mask) |
| Disables the TSI interrupt requests. More...
|
|
static uint32_t | TSI_GetStatusFlags (TSI_Type *base) |
| Gets the interrupt flags. More...
|
|
void | TSI_ClearStatusFlags (TSI_Type *base, uint32_t mask) |
| Clears the interrupt flags. More...
|
|
static uint32_t | TSI_GetScanTriggerMode (TSI_Type *base) |
| Gets the TSI scan trigger mode. More...
|
|
static bool | TSI_IsScanInProgress (TSI_Type *base) |
| Gets the scan in progress flag. More...
|
|
static void | TSI_SetElectrodeOSCPrescaler (TSI_Type *base, tsi_electrode_osc_prescaler_t prescaler) |
| Sets the electrode oscillator prescaler. More...
|
|
static void | TSI_SetNumberOfScans (TSI_Type *base, tsi_n_consecutive_scans_t number) |
| Sets the number of scans (NSCN). More...
|
|
static void | TSI_EnableModule (TSI_Type *base, bool enable) |
| Enables/disables the TSI module. More...
|
|
static void | TSI_EnableLowPower (TSI_Type *base, bool enable) |
| Enables/disables the TSI module in low power stop mode. More...
|
|
static void | TSI_EnablePeriodicalScan (TSI_Type *base, bool enable) |
| Enables/disables the periodical (hardware) trigger scan. More...
|
|
static void | TSI_StartSoftwareTrigger (TSI_Type *base) |
| Starts a measurement (trigger a new measurement). More...
|
|
static void | TSI_SetLowPowerScanInterval (TSI_Type *base, tsi_low_power_scan_interval_t interval) |
| Sets a low power scan interval. More...
|
|
static void | TSI_SetLowPowerClock (TSI_Type *base, uint32_t clock) |
| Sets a low power clock. More...
|
|
static void | TSI_SetReferenceChargeCurrent (TSI_Type *base, tsi_reference_osc_charge_current_t current) |
| Sets the reference oscillator charge current. More...
|
|
static void | TSI_SetElectrodeChargeCurrent (TSI_Type *base, tsi_external_osc_charge_current_t current) |
| Sets the electrode charge current. More...
|
|
static void | TSI_SetScanModulo (TSI_Type *base, uint32_t modulo) |
| Sets the scan modulo value. More...
|
|
static void | TSI_SetActiveModeSource (TSI_Type *base, uint32_t source) |
| Sets the active mode source. More...
|
|
static void | TSI_SetActiveModePrescaler (TSI_Type *base, tsi_active_mode_prescaler_t prescaler) |
| Sets the active mode prescaler. More...
|
|
static void | TSI_SetLowPowerChannel (TSI_Type *base, uint16_t channel) |
| Sets the low power channel. More...
|
|
static uint32_t | TSI_GetLowPowerChannel (TSI_Type *base) |
| Gets the enabled channel in low power modes. More...
|
|
static void | TSI_EnableChannel (TSI_Type *base, uint16_t channel, bool enable) |
| Enables/disables a channel. More...
|
|
static void | TSI_EnableChannels (TSI_Type *base, uint16_t channelsMask, bool enable) |
| Enables/disables channels. More...
|
|
static bool | TSI_IsChannelEnabled (TSI_Type *base, uint16_t channel) |
| Returns if a channel is enabled. More...
|
|
static uint16_t | TSI_GetEnabledChannels (TSI_Type *base) |
| Returns the mask of enabled channels. More...
|
|
static uint16_t | TSI_GetWakeUpChannelCounter (TSI_Type *base) |
| Gets the wake up channel counter for low-power mode usage. More...
|
|
static uint16_t | TSI_GetNormalModeCounter (TSI_Type *base, uint16_t channel) |
| Gets the TSI conversion counter of a specific channel in normal mode. More...
|
|
static void | TSI_SetLowThreshold (TSI_Type *base, uint16_t low_threshold) |
| Sets a low threshold. More...
|
|
static void | TSI_SetHighThreshold (TSI_Type *base, uint16_t high_threshold) |
| Sets a high threshold. More...
|
|