touch_at_reg_t

structure

touch_at_reg_t

Input / Output

Input to the library

Use

Data structure which holds the Register configuration information for Autonomous QTouch

This structure contains the data fields that correspond to specific fields in different registers. For a more detailed explanation of the register fields, refer to the device datasheet.

For example, DISHIFT field of ATCFG1 is 2 bits wide (bit 28-29 of ATCFG1 register). The user needs to set values from 0 to 3 in the dishift field of this structure. The library will take care of writing this to the appropriate bit position of ATCFG1 register.

Fields

Type

Corresponds to Register

Register Field

div

uint16_t

ATCFG0

DIV

chlen       

uint8_t

ATCFG0

CHLEN

selen       

uint8_t

ATCFG0

SELEN

dishift       

uint8_t

ATCFG1

DISHIFT

sync       

uint8_t

ATCFG1

SYNC

spread       

uint8_t

ATCFG1

SPREAD

dilen       

uint8_t

ATCFG1

DILEN

max       

uint16_t

ATCFG1

MAX

at_param

touch_at_param_t

Autonomous Touch Sensor parameters corresponding to ATCFG2 and ATCFG3.

FILTER, OUTSENS, SENSE, PTHR, PDRIFT, NDRIFT