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
//! # Active Low and Active High Inputs
//! These types encode behaviour about the physical state of an input.
//!
//! For example, considering a two-state button as active when pressed would
//! have to consider if the button is NC or NO, and if the input is normally
//! pulled up or down.
//!
//! Button | Input | Active
//! ------ | ----- | ------
//! NC | PU | **High**
//! NC | PD | **Low**
//! NO | PU | **Low**
//! NO | PD | **High**
//!
//! Use [`Low`] and [`High`] to encode this information, which drives the
//! beginning state of the debouncer.
//!
//! For non-buttons, the activity of the input should be the default-state; the
//! state that does not trigger something to occur. However, there is a lot of
//! domain specific information that should drive your choice, which may go
//! against the information here.
use crateStatus;
/// # Active Low Input
/// Used for templates. An instance of this type is never made.
;
/// # Active High Input
/// Used for templates. An instance of this type is never made.
;
/// # [`Status`] of an Input
/// This trait can only be implemented for [`Low`] and [`High`], and is used to
/// retreive the corresponding runtime value.