sensor_t

structure

sensor_t

Input / Output

Output from the library

Use

Data structure which holds the sensor state variables used by the library.

Fields

Type

Comment

state

uint8_t

internal sensor state

general_counter

uint8_t

general purpose counter: used for calibration, drifting, etc

ndil_counter

uint8_t

drift Integration counter

threshold

uint8_t

sensor detection threshold

type_aks_pos_hyst

uint8_t

Holds information for sensor type, AKS group, positive recalibration flag, and hysteresis value. The mapping between bit positions and information type is given below:

  1. 1.

    B1:B0 - Hysteresis

  2. 2.

    B2 - positive recalibration flag

  3. 3.

    B5:B3 - AKS group

  4. 4.

    B7:B6 - sensor type

from_channel

uint8_t

starting channel number for sensor

to_channel

uint8_t

ending channel number for sensor

Index

uint8_t

index for array of rotor/slider values