-
-
Notifications
You must be signed in to change notification settings - Fork 114
/
Copy pathMpr121Configuration.cs
83 lines (71 loc) · 3.56 KB
/
Mpr121Configuration.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
namespace Iot.Device.Mpr121
{
/// <summary>
/// Configuration for registers listed on datasheet page 8.
/// </summary>
public class Mpr121Configuration
{
/// <summary>
/// Determines the largest magnitude of variation to pass through the baseline filter (rising).
/// </summary>
public byte MaxHalfDeltaRising { get; set; }
/// <summary>
/// Determines the incremental change when non-noise drift is detected (rising).
/// </summary>
public byte NoiseHalfDeltaRising { get; set; }
/// <summary>
/// Determines the number of samples consecutively greater than the Max Half Delta value (rising).
/// This is necessary to determine that it is not noise.
/// </summary>
public byte NoiseCountLimitRising { get; set; }
/// <summary>
/// Determines the operation rate of the filter. A larger count limit means the filter delay is operating more slowly (rising).
/// </summary>
public byte FilterDelayCountLimitRising { get; set; }
/// <summary>
/// Determines the largest magnitude of variation to pass through the baseline filter (falling).
/// </summary>
public byte MaxHalfDeltaFalling { get; set; }
/// <summary>
/// Determines the incremental change when non-noise drift is detected (falling).
/// </summary>
public byte NoiseHalfDeltaFalling { get; set; }
/// <summary>
/// Determines the number of samples consecutively greater than the Max Half Delta value (falling).
/// This is necessary to determine that it is not noise.
/// </summary>
public byte NoiseCountLimitFalling { get; set; }
/// <summary>
/// Determines the operation rate of the filter. A larger count limit means the filter delay is operating more slowly (falling).
/// </summary>
public byte FilterDelayCountLimitFalling { get; set; }
/// <summary>
/// Electrode touch threshold.
/// </summary>
/// <remark>
/// 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.
/// </remark>
public byte ElectrodeTouchThreshold { get; set; }
/// <summary>
/// Electrode release threshold.
/// </summary>
/// <remark>
/// 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.
/// </remark>
public byte ElectrodeReleaseThreshold { get; set; }
/// <summary>
/// Filter/Global Charge Discharge Time Configuration (datasheet page 14).
/// </summary>
public byte ChargeDischargeTimeConfiguration { get; set; }
/// <summary>
/// Electrode Configuration (datasheet page 15).
/// </summary>
public byte ElectrodeConfiguration { get; set; }
}
}