From 2441e9b57675ef0398cc507318e37cb67d6271cf Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Mon, 5 Mar 2012 23:03:24 +0100 Subject: ebus-rackets: cleanups * inserter: unused racket/pretty * inserter: read-ebus-loop7 * layer2: simplified --- ebus-racket/layer2.rkt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'ebus-racket/layer2.rkt') diff --git a/ebus-racket/layer2.rkt b/ebus-racket/layer2.rkt index 9ed2118..3dd881c 100644 --- a/ebus-racket/layer2.rkt +++ b/ebus-racket/layer2.rkt @@ -55,8 +55,6 @@ synSlave <- ebus-const-syn ;; SYN des Senders (return (ebus-body-masterslave crc payloadSlaveLength payloadSlave crcSlave))))) -(define parse-ebus-master-or-slave (token (choice parse-ebus-mastermaster parse-ebus-masterslave))) - (define parse-ebus-paket (token (seq source <- any-byte destination <- any-byte @@ -65,7 +63,8 @@ payloadLength <- any-byte payload <- (repeat ebus-payload payloadLength payloadLength) body <- (cond ((= destination ebus-const-broadcastaddr) parse-ebus-broadcast) - (else parse-ebus-master-or-slave)) + (else (choice parse-ebus-mastermaster + parse-ebus-masterslave))) (return (ebus-paket source destination primaryCommand -- cgit v1.2.1