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
pub unsafe trait TxPin<UART> {}
pub unsafe trait RxPin<UART> {}
pub unsafe trait CtsPin<UART> {
fn enable(&mut self, _uart: &mut UART);
}
pub unsafe trait DcdPin<UART> {
fn enable(&mut self, _uart: &mut UART);
}
pub unsafe trait DsrPin<UART> {
fn enable(&mut self, _uart: &mut UART);
}
pub unsafe trait DtrPin<UART> {
fn enable(&mut self, _uart: &mut UART);
}
pub unsafe trait RiPin<UART> {
fn enable(&mut self, _uart: &mut UART);
}
pub unsafe trait RtsPin<UART> {
fn enable(&mut self, _uart: &mut UART);
}
unsafe impl<U> TxPin<U> for () {}
unsafe impl<U> RxPin<U> for () {}
unsafe impl<U> CtsPin<U> for () {
fn enable(&mut self, _uart: &mut U) {
}
}
unsafe impl<U> DcdPin<U> for () {
fn enable(&mut self, _uart: &mut U) {
}
}
unsafe impl<U> DsrPin<U> for () {
fn enable(&mut self, _uart: &mut U) {
}
}
unsafe impl<U> DtrPin<U> for () {
fn enable(&mut self, _uart: &mut U) {
}
}
unsafe impl<U> RiPin<U> for () {
fn enable(&mut self, _uart: &mut U) {
}
}
unsafe impl<U> RtsPin<U> for () {
fn enable(&mut self, _uart: &mut U) {
}
}
#[derive(PartialEq, Clone, Copy)]
pub enum NewlineMode {
Binary,
SwapLFtoCRLF,
}