Channel descriptor structure.

Public Attributes#

bool

Set to enable scan channel CHx.

bool

Set to enable CHx pin.

bool

Enable/disable channel interrupts after configuring all the sensor channel parameters.

Configure channel pin mode for the excitation phase of the scan sequence.

Configure channel pin idle setup in LESENSE idle phase.

bool

Set to use alternate excite pin for excitation.

bool

Set to enable result from this channel being shifted into the decoder register.

bool

Set to invert result bit stored in the SCANRES register.

bool

Set to store counter value in the RAM (accessible via RESDATA) and make the comparison result available in the SCANRES register.

Select clock used for the excitation timing.

Select clock used for the sample delay timing.

uint8_t

Configure the excitation time.

uint8_t

Configure the sample delay.

uint16_t

Configure the measure delay.

uint16_t

Configure the ACMP threshold or the DAC data.

Select if the ACMP output, the ADC output or the counter output should be used in comparison.

Configure the interrupt generation mode for the CHx interrupt flag.

uint16_t

Configure the decision threshold for the sensor data comparison.

Select the mode for counter comparison.

Select the sensor evaluation mode.

uint8_t

Offset for IADC/ACMP interaction.

Public Attribute Documentation#

enaScanCh#

bool LESENSE_ChDesc_TypeDef::enaScanCh

Set to enable scan channel CHx.


enaPin#

bool LESENSE_ChDesc_TypeDef::enaPin

Set to enable CHx pin.


enaInt#

bool LESENSE_ChDesc_TypeDef::enaInt

Enable/disable channel interrupts after configuring all the sensor channel parameters.


chPinExMode#

LESENSE_ChPinExMode_TypeDef LESENSE_ChDesc_TypeDef::chPinExMode

Configure channel pin mode for the excitation phase of the scan sequence.

Note: OPAOUT is only available on channels 2, 3, 4, and 5.


chPinIdleMode#

LESENSE_ChPinIdleMode_TypeDef LESENSE_ChDesc_TypeDef::chPinIdleMode

Configure channel pin idle setup in LESENSE idle phase.


useAltEx#

bool LESENSE_ChDesc_TypeDef::useAltEx

Set to use alternate excite pin for excitation.


shiftRes#

bool LESENSE_ChDesc_TypeDef::shiftRes

Set to enable result from this channel being shifted into the decoder register.


invRes#

bool LESENSE_ChDesc_TypeDef::invRes

Set to invert result bit stored in the SCANRES register.


storeCntRes#

bool LESENSE_ChDesc_TypeDef::storeCntRes

Set to store counter value in the RAM (accessible via RESDATA) and make the comparison result available in the SCANRES register.


exClk#

LESENSE_ChClk_TypeDef LESENSE_ChDesc_TypeDef::exClk

Select clock used for the excitation timing.


sampleClk#

LESENSE_ChClk_TypeDef LESENSE_ChDesc_TypeDef::sampleClk

Select clock used for the sample delay timing.


exTime#

uint8_t LESENSE_ChDesc_TypeDef::exTime

Configure the excitation time.

Excitation will last exTime+1 excitation clock cycles. Valid range: 0-63 (6 bits).


sampleDelay#

uint8_t LESENSE_ChDesc_TypeDef::sampleDelay

Configure the sample delay.

Sampling will occur after sampleDelay+1 sample clock cycles. Valid range: 0-127 (7 bits) or 0-255 (8 bits) depending on device.


measDelay#

uint16_t LESENSE_ChDesc_TypeDef::measDelay

Configure the measure delay.

Sensor measuring is delayed for measDelay excitation clock cycles. Valid range: 0-127 (7 bits) or 0-1023 (10 bits) depending on device.


acmpThres#

uint16_t LESENSE_ChDesc_TypeDef::acmpThres

Configure the ACMP threshold or the DAC data.

If perCtrl.dacCh0Data or perCtrl.dacCh1Data is set to lesenseDACIfData, acmpThres defines the 12-bit DAC data in the corresponding data register of DAC interface (DACn_CH0DATA and DACn_CH1DATA). In this case, the valid range is: 0-4095 (12 bits). If perCtrl.dacCh0Data or perCtrl.dacCh1Data is set to lesenseACMPThres, acmpThres defines the 6-bit Vdd scaling factor of ACMP negative input (VDDLEVEL in ACMP_INPUTSEL register). In this case, the valid range is: 0-63 (6 bits).


sampleMode#

LESENSE_ChSampleMode_TypeDef LESENSE_ChDesc_TypeDef::sampleMode

Select if the ACMP output, the ADC output or the counter output should be used in comparison.


intMode#

LESENSE_ChIntMode_TypeDef LESENSE_ChDesc_TypeDef::intMode

Configure the interrupt generation mode for the CHx interrupt flag.


cntThres#

uint16_t LESENSE_ChDesc_TypeDef::cntThres

Configure the decision threshold for the sensor data comparison.

Valid range: 0-65535 (16 bits).


compMode#

LESENSE_ChCompMode_TypeDef LESENSE_ChDesc_TypeDef::compMode

Select the mode for counter comparison.


evalMode#

LESENSE_ChEvalMode_TypeDef LESENSE_ChDesc_TypeDef::evalMode

Select the sensor evaluation mode.


offset#

uint8_t LESENSE_ChDesc_TypeDef::offset

Offset for IADC/ACMP interaction.

ACMP: offset determines which of the port I/O pins on the external override interface to access. IADC: offset determines which of the IADC scanner channels is sampled.