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
//! The command allows the Host to specify the desired `EZSP` version
//! and must be sent before any other command.
//!
//! The response provides information about the firmware running on the NCP.
use core::fmt::Debug;
use crate::ezsp::StackVersion;
crate::frame::parameters::frame!(
0x0000,
{ desired_protocol_version: u8 },
impl {
impl Command {
/// Creates command parameters.
#[must_use]
pub const fn new(desired_protocol_version: u8) -> Self {
Self {
desired_protocol_version,
}
}
}
},
{ protocol_version: u8, stack_type: u8, stack_version: u16 } => Configuration(configuration)::Version,
impl {
impl Response {
/// The EZSP version the NCP is using.
#[must_use]
pub const fn protocol_version(&self) -> u8 {
self.protocol_version
}
/// The type of stack running on the NCP (2).
#[must_use]
pub const fn stack_type(&self) -> u8 {
self.stack_type
}
/// The version number of the stack.
#[must_use]
pub const fn stack_version(&self) -> StackVersion {
StackVersion(self.stack_version)
}
}
}
);