ezsp/frame/parameters/configuration/
version.rs1use core::fmt::Debug;
7
8use crate::ezsp::StackVersion;
9
10crate::frame::parameters::frame!(
11 0x0000,
12 { desired_protocol_version: u8 },
13 impl {
14 impl Command {
15 #[must_use]
17 pub const fn new(desired_protocol_version: u8) -> Self {
18 Self {
19 desired_protocol_version,
20 }
21 }
22 }
23 },
24 { protocol_version: u8, stack_type: u8, stack_version: u16 } => Configuration(configuration)::Version,
25 impl {
26 impl Response {
27 #[must_use]
29 pub const fn protocol_version(&self) -> u8 {
30 self.protocol_version
31 }
32
33 #[must_use]
35 pub const fn stack_type(&self) -> u8 {
36 self.stack_type
37 }
38
39 #[must_use]
41 pub const fn stack_version(&self) -> StackVersion {
42 StackVersion(self.stack_version)
43 }
44 }
45 }
46);