![]()  | 
  
    MCUXpresso SDK API Reference Manual
    Rev. 0
    
   NXP Semiconductors 
   | 
 
The MCUXpresso SDK provides a peripheral driver for the Touch Screen Controller(TSC) module of MCUXpresso SDK devices.
Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/fsl_tsc
Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/fsl_tsc
Data Structures | |
| struct | tsc_config_t | 
| @ Controller configuration.  More... | |
Macros | |
| #define | FSL_TSC_DRIVER_VERSION (MAKE_VERSION(2, 0, 3)) | 
| TSC driver version.  More... | |
Enumerations | |
| enum | tsc_detection_mode_t {  kTSC_Detection4WireMode = 0U, kTSC_Detection5WireMode = 1U }  | 
| @ Controller detection mode.  More... | |
| enum | tsc_corrdinate_value_selection_t {  kTSC_XCoordinateValueSelection = 0U, kTSC_YCoordinateValueSelection = 1U }  | 
| @ Coordinate value mask.  More... | |
| enum | _tsc_interrupt_signal_mask {  kTSC_IdleSoftwareSignalEnable = TSC_INT_SIG_EN_IDLE_SW_SIG_EN_MASK, kTSC_ValidSignalEnable = TSC_INT_SIG_EN_VALID_SIG_EN_MASK, kTSC_DetectSignalEnable, kTSC_MeasureSignalEnable = TSC_INT_SIG_EN_MEASURE_SIG_EN_MASK }  | 
| @ Interrupt signal enable/disable mask.  More... | |
| enum | _tsc_interrupt_mask {  kTSC_IdleSoftwareInterruptEnable, kTSC_DetectInterruptEnable, kTSC_MeasureInterruptEnable = TSC_INT_EN_MEASURE_INT_EN_MASK }  | 
| @ Interrupt enable/disable mask.  More... | |
| enum | _tsc_interrupt_status_flag_mask {  kTSC_IdleSoftwareFlag, kTSC_ValidSignalFlag, kTSC_DetectSignalFlag = TSC_INT_STATUS_DETECT_MASK, kTSC_MeasureSignalFlag }  | 
| @ Interrupt Status flag mask.  More... | |
| enum | _tsc_adc_status_flag_mask {  kTSC_ADCCOCOSignalFlag, kTSC_ADCConversionValueFlag = TSC_DEBUG_MODE_ADC_CONV_VALUE_MASK }  | 
| @ ADC status flag mask.  More... | |
| enum | _tsc_status_flag_mask {  kTSC_IntermediateStateFlag = TSC_DEBUG_MODE2_INTERMEDIATE_MASK, kTSC_DetectFiveWireFlag = TSC_DEBUG_MODE2_DETECT_FIVE_WIRE_MASK, kTSC_DetectFourWireFlag = TSC_DEBUG_MODE2_DETECT_FOUR_WIRE_MASK, kTSC_GlitchThresholdFlag = TSC_DEBUG_MODE2_DE_GLITCH_MASK, kTSC_StateMachineFlag }  | 
| @ TSC status flag mask.  More... | |
| enum | tsc_state_machine_t {  kTSC_IdleState = 0U << TSC_DEBUG_MODE2_STATE_MACHINE_SHIFT, kTSC_1stPreChargeState = 1U << TSC_DEBUG_MODE2_STATE_MACHINE_SHIFT, kTSC_1stDetectState = 2U << TSC_DEBUG_MODE2_STATE_MACHINE_SHIFT, kTSC_XMeasureState = 3U << TSC_DEBUG_MODE2_STATE_MACHINE_SHIFT, kTSC_YMeasureState = 4U << TSC_DEBUG_MODE2_STATE_MACHINE_SHIFT, kTSC_2ndPreChargeState = 5U << TSC_DEBUG_MODE2_STATE_MACHINE_SHIFT, kTSC_2ndDetectState = 6U << TSC_DEBUG_MODE2_STATE_MACHINE_SHIFT }  | 
| TSC state machine.  More... | |
| enum | tsc_glitch_threshold_t {  kTSC_glitchThresholdALT0 = 0U << TSC_DEBUG_MODE2_DE_GLITCH_SHIFT, kTSC_glitchThresholdALT1 = 1U << TSC_DEBUG_MODE2_DE_GLITCH_SHIFT, kTSC_glitchThresholdALT2 = 2U << TSC_DEBUG_MODE2_DE_GLITCH_SHIFT, kTSC_glitchThresholdALT3 }  | 
| TSC glitch threshold.  More... | |
| enum | tsc_trigger_signal_t {  kTSC_TriggerToChannel0 = 1U << 0U, kTSC_TriggerToChannel1 = 1U << 1U, kTSC_TriggerToChannel2 = 1U << 2U, kTSC_TriggerToChannel3 = 1U << 3U, kTSC_TriggerToChannel4 = 1U << 4U }  | 
| @ Hardware trigger select signal, select which ADC channel to start conversion.  More... | |
| enum | tsc_port_source_t {  kTSC_WiperPortSource = 0U, kTSC_YnlrPortSource = 1U, kTSC_YpllPortSource = 2U, kTSC_XnurPortSource = 3U, kTSC_XpulPortSource = 4U }  | 
| @ TSC controller ports.  More... | |
| enum | tsc_port_mode_t {  kTSC_PortOffMode = 0U, kTSC_Port200k_PullUpMode = 1U << 2U, kTSC_PortPullUpMode = 1U << 1U, kTSC_PortPullDownMode = 1U << 0U }  | 
| @ TSC port mode.  More... | |
Functions | |
| void | TSC_Init (TSC_Type *base, const tsc_config_t *config) | 
| Initialize the TSC module.  More... | |
| void | TSC_Deinit (TSC_Type *base) | 
| De-initializes the TSC module.  More... | |
Variables | |
| bool | tsc_config_t::enableAutoMeasure | 
| Enable the auto-measure.  More... | |
| uint32_t | tsc_config_t::measureDelayTime | 
| Set delay time(0U~0xFFFFFFU) to even potential distribution ready.It is a preparation for measure stage.  More... | |
| uint32_t | tsc_config_t::prechargeTime | 
| Set pre-charge time(1U~0xFFFFFFFFU) to make the upper layer of screen to charge to positive high.  More... | |
| tsc_detection_mode_t | tsc_config_t::detectionMode | 
| Select the detection mode.  More... | |
| struct tsc_config_t | 
Data Fields | |
| bool | enableAutoMeasure | 
| Enable the auto-measure.  More... | |
| uint32_t | measureDelayTime | 
| Set delay time(0U~0xFFFFFFU) to even potential distribution ready.It is a preparation for measure stage.  More... | |
| uint32_t | prechargeTime | 
| Set pre-charge time(1U~0xFFFFFFFFU) to make the upper layer of screen to charge to positive high.  More... | |
| tsc_detection_mode_t | detectionMode | 
| Select the detection mode.  More... | |
| #define FSL_TSC_DRIVER_VERSION (MAKE_VERSION(2, 0, 3)) | 
Version 2.0.3.
| enum tsc_detection_mode_t | 
| enum _tsc_interrupt_mask | 
| enum tsc_state_machine_t | 
These seven states are TSC complete workflow.
| enum tsc_trigger_signal_t | 
| enum tsc_port_source_t | 
| enum tsc_port_mode_t | 
| void TSC_Init | ( | TSC_Type * | base, | 
| const tsc_config_t * | config | ||
| ) | 
| base | TSC peripheral base address. | 
| config | Pointer to "tsc_config_t" structure. | 
| void TSC_Deinit | ( | TSC_Type * | base | ) | 
| base | TSC peripheral base address. | 
| bool tsc_config_t::enableAutoMeasure | 
It indicates after detect touch, whether automatic start measurement
| uint32_t tsc_config_t::measureDelayTime | 
If measure dalay time is too short, maybe it would have an undesired effect on measure value.
| uint32_t tsc_config_t::prechargeTime | 
It is a preparation for detection stage. Pre-charge time must is greater than 0U, otherwise TSC could not work normally. If pre-charge dalay time is too short, maybe it would have an undesired effect on generation of valid signal(kTSC_ValidSignalFlag).
| tsc_detection_mode_t tsc_config_t::detectionMode | 
See "tsc_detection_mode_t".