From 6184e583088e490a100ea80ff59421a171e97e89 Mon Sep 17 00:00:00 2001 From: occheung Date: Fri, 4 Sep 2020 13:30:22 +0800 Subject: [PATCH] eth_server: modify scpi tree --- examples/ethernet.rs | 34 +++++++++++----------------------- 1 file changed, 11 insertions(+), 23 deletions(-) diff --git a/examples/ethernet.rs b/examples/ethernet.rs index 3e3f43b..9a6ee16 100644 --- a/examples/ethernet.rs +++ b/examples/ethernet.rs @@ -76,7 +76,7 @@ use firmware::{ cpld::{ CPLD, }, - scpi::{ HelloWorldCommand, SwitchOnCommand }, + scpi::{ HelloWorldCommand, Channel1SwitchCommand }, Urukul, }; use scpi::prelude::*; @@ -318,25 +318,6 @@ fn main() -> ! { // scpi_crate_version!(), //Test - Node { - name: b"ABORt", - handler: None, - optional: false, - sub: &[], - }, - Node { - name: b"INITiate", - handler: None, - optional: false, - sub: &[ - Node { - name: b"IMMediate", - handler: None, - optional: true, - sub: &[], - } - ], - }, Node { name: b"EXAMple", optional: true, @@ -358,10 +339,17 @@ fn main() -> ! { ], }, Node { - name: b"SWitch", + name: b"CHANNEL1", optional: false, - handler: Some(&SwitchOnCommand {}), - sub: &[], + handler: None, + sub: &[ + Node { + name: b"SWitch", + optional: false, + handler: Some(&Channel1SwitchCommand {}), + sub: &[], + } + ], } ];