// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace Iot.Device.Mpr121
{
///
/// Configuration for registers listed on datasheet page 8.
///
public class Mpr121Configuration
{
///
/// Determines the largest magnitude of variation to pass through the baseline filter (rising).
///
public byte MaxHalfDeltaRising { get; set; }
///
/// Determines the incremental change when non-noise drift is detected (rising).
///
public byte NoiseHalfDeltaRising { get; set; }
///
/// Determines the number of samples consecutively greater than the Max Half Delta value (rising).
/// This is necessary to determine that it is not noise.
///
public byte NoiseCountLimitRising { get; set; }
///
/// Determines the operation rate of the filter. A larger count limit means the filter delay is operating more slowly (rising).
///
public byte FilterDelayCountLimitRising { get; set; }
///
/// Determines the largest magnitude of variation to pass through the baseline filter (falling).
///
public byte MaxHalfDeltaFalling { get; set; }
///
/// Determines the incremental change when non-noise drift is detected (falling).
///
public byte NoiseHalfDeltaFalling { get; set; }
///
/// Determines the number of samples consecutively greater than the Max Half Delta value (falling).
/// This is necessary to determine that it is not noise.
///
public byte NoiseCountLimitFalling { get; set; }
///
/// Determines the operation rate of the filter. A larger count limit means the filter delay is operating more slowly (falling).
///
public byte FilterDelayCountLimitFalling { get; set; }
///
/// Electrode touch threshold.
///
///
/// Threshold settings are dependant on the touch/release signal strength, system sensitivity and noise immunity requirements.
/// In a typical touch detection application, threshold is typically in the range 0x04~0x10.
/// The touch threshold is several counts larger than the release threshold. This is to provide hysteresis and to prevent noise and jitter.
///
public byte ElectrodeTouchThreshold { get; set; }
///
/// Electrode release threshold.
///
///
/// Threshold settings are dependant on the touch/release signal strength, system sensitivity and noise immunity requirements.
/// In a typical touch detection application, threshold is typically in the range 0x04~0x10.
/// The touch threshold is several counts larger than the release threshold. This is to provide hysteresis and to prevent noise and jitter.
///
public byte ElectrodeReleaseThreshold { get; set; }
///
/// Filter/Global Charge Discharge Time Configuration (datasheet page 14).
///
public byte ChargeDischargeTimeConfiguration { get; set; }
///
/// Electrode Configuration (datasheet page 15).
///
public byte ElectrodeConfiguration { get; set; }
}
}