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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#![no_std]
extern crate atsamd21_hal as hal;
#[cfg(feature = "rt")]
extern crate cortex_m_rt;
#[cfg(feature = "rt")]
pub use cortex_m_rt::entry;
#[cfg(feature = "panic_halt")]
pub extern crate panic_halt;
pub use hal::atsamd21g18a::*;
use hal::prelude::*;
pub use hal::*;
use gpio::{Floating, Input, Port};
define_pins!(
struct Pins,
target_device: atsamd21g18a,
pin d0 = a22,
pin d1 = a23,
pin d2 = a10,
pin d3 = a11,
pin d4 = b10,
pin d5 = b11,
pin d6 = a20,
pin d7 = a21,
pin mosi = a16,
pin sck = a17,
pin miso = a19,
pin sda = a8,
pin scl = a9,
pin rx = b23,
pin tx = b22,
pin a0 = a2,
pin a1 = b2,
pin a2 = b3,
pin a3 = a4,
pin a4 = a5,
pin a5 = a6,
pin a6 = a7,
pin usb_n = a24,
pin usb_p = a25,
pin usb_id = a18,
pin aref = a3,
pin sd_sck = a12,
pin sd_mosi = a13,
pin sd_ss = a14,
pin sd_miso = a15,
pin sd_cd = a27,
pin led_builtin = b8,
pin bottom_pad = a28,
pin adc_battery = b9,
pin xin32 = a0,
pin xout32 = a1,
);