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
use super::super::Modulation;
use crate::core::configuration::Configuration;
pub struct NoModulation {
buffer: [u8; 1],
sent: usize,
}
impl NoModulation {
pub fn create(amp: u8) -> Self {
Self {
buffer: [amp; 1],
sent: 0,
}
}
}
impl Modulation for NoModulation {
fn build(&mut self, _config: Configuration) {}
fn buffer(&self) -> &[u8] {
&self.buffer
}
fn sent(&mut self) -> &mut usize {
&mut self.sent
}
}