Slider/Wheel Parameters

Last modified by Microchip on 2026/03/24 11:55

This page provides a comprehensive overview of the essential scroller macros and typedefs used in the Capacitive Voltage Divider (CVD) technique for touch sensing. Scroller includes both slider and wheel. 

For APIs, refer to the Slider/Wheel Application Programming Interfaces (APIs) page.

Slider Enums and Typedefs

mtouch_slider_type

enum mtouch_slider_type{    MTOUCH_TYPE_SLIDER    = 0u,    MTOUCH_TYPE_WHEEL     = 1u};

Description: This enumerator gives the type of the slider.

 

mtouch_slider_names

enum mtouch_slider_names{      };

Description: This enumerator gives the names of the slider.

In case of Slider 

  Slider0 = 0 will be used

In case of wheel,

  Wheel0 = 0 will be used

mtouch_slider_state

enum mtouch_slider_state{    MTOUCH_SLIDER_STATE_initializing = 0u,    MTOUCH_SLIDER_STATE_notPressed = 1u,    MTOUCH_SLIDER_STATE_pressed = 2u};

Description: This enumerator gives the states of the slider.

 

scr_resolution_t

typedef enum tag_resolution_t{        SCR_RESOL_2_BIT = 2,        SCR_RESOL_3_BIT,        SCR_RESOL_4_BIT,        SCR_RESOL_5_BIT,        SCR_RESOL_6_BIT,        SCR_RESOL_7_BIT,        SCR_RESOL_8_BIT,        SCR_RESOL_9_BIT,        SCR_RESOL_10_BIT,        SCR_RESOL_11_BIT,        SCR_RESOL_12_BIT }scr_resolution_t;

Description: This enumerator gives the slider resolution setting.

 

scr_deadband_t

typedef enum tag_deadband_t{        SCR_DB_NONE,        SCR_DB_1_PERCENT,        SCR_DB_2_PERCENT,        SCR_DB_3_PERCENT,        SCR_DB_4_PERCENT,        SCR_DB_5_PERCENT,        SCR_DB_6_PERCENT,        SCR_DB_7_PERCENT,        SCR_DB_8_PERCENT,        SCR_DB_9_PERCENT,        SCR_DB_10_PERCENT,        SCR_DB_11_PERCENT,        SCR_DB_12_PERCENT,        SCR_DB_13_PERCENT,        SCR_DB_14_PERCENT,        SCR_DB_15_PERCENT}scr_deadband_t;

Description: This enumerator gives the slider deadband percentage setting.

 

mtouch_slider_t

typedef struct{    const enum mtouch_slider_names slider;    const enum mtouch_slider_type type;    const enum mtouch_sensor_names startSegment;    const uint8_t segmentCount;    const uint8_t resolDeadband;    const uint8_t positionHysteresis;    uint16_t contactThreshold;    uint8_t rightHysteresis;    uint8_t leftHysteresis;    uint16_t rawPosition;    uint16_t sliderPosition;    uint16_t contactSize;    uint8_t sliderStatus;} mtouch_slider_t;

Description: This structure gives the slider segment type and initialization.

 

Back to Top