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
use PhantomData;
use crateAsync;
use crate::;
/// A push button wired straight to a controller pin.
///
/// `M` selects the board mode this button belongs to: see [`Mode`]. The pin
/// bounds live on the `impl` blocks rather than on the struct, so that a board
/// type can be named without them.
///
/// Reading the pin in [`Blocking`] mode goes through [`Button::pin`] directly,
/// the way the board has always done it. `Async` mode adds
/// `Button::wait_for_press`, which suspends rather than spins.