From 0acd7a78e24b95c5aca1da9fef7073d7d9f8ee44 Mon Sep 17 00:00:00 2001 From: Stefan `Sec` Zehl Date: Thu, 11 Aug 2011 09:22:58 +0200 Subject: [PATCH] Improve filter support in serial tester app --- firmware/applications/serial/serial.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/firmware/applications/serial/serial.c b/firmware/applications/serial/serial.c index 30ffae2..9e52869 100644 --- a/firmware/applications/serial/serial.c +++ b/firmware/applications/serial/serial.c @@ -415,9 +415,21 @@ static int process(char * input){ puts_plus(" "); puts_plus(IntToStrX( uint8ptouint32(buf+8),8 )); }else if(type=='b'){ - if(filter) + if(filter=='.' || filter=='u') if(uint8ptouint32(buf+8)!=uint8ptouint32(filterdata)) continue; + if(filter=='0' && buf[3] != 0x00) + continue; + if(filter=='5' && buf[3] != 0x55) + continue; + if(filter=='a' && buf[3] != 0xaa) + continue; + if(filter=='A' && buf[3] != 0xaa) + continue; + if(filter=='f' && buf[3] != 0xff) + continue; + if(filter=='F' && buf[3] != 0xff) + continue; puts_plus("R "); puts_plus(IntToStrX( buf[0],2 )); puts_plus(" ");