Serial UART snooper. Connect RX and TX of the UUT to 2 x RX pins on mbed to inspect the traffic in both directions

Dependencies:   MODSERIAL Terminal mbed

Committer:
cbayley
Date:
Wed Aug 01 02:17:00 2012 +0000
Revision:
2:60e6df8211f2
Version 2.5 sped up HEXDUMP style

Who changed what in which revision?

UserRevisionLine numberNew contents of line
cbayley 2:60e6df8211f2 1 #include <stdint.h>
cbayley 2:60e6df8211f2 2 #ifndef STRIPE_H
cbayley 2:60e6df8211f2 3 #define STRIPE_H
cbayley 2:60e6df8211f2 4
cbayley 2:60e6df8211f2 5 struct Row {
cbayley 2:60e6df8211f2 6 char fgc[sizeof("\033[48;5;249m")-1];
cbayley 2:60e6df8211f2 7 char hex[16*3];
cbayley 2:60e6df8211f2 8 char sp[4];
cbayley 2:60e6df8211f2 9 char asc[16];
cbayley 2:60e6df8211f2 10 char eol[2];
cbayley 2:60e6df8211f2 11 };
cbayley 2:60e6df8211f2 12
cbayley 2:60e6df8211f2 13 struct Strip {
cbayley 2:60e6df8211f2 14 char bgc[sizeof("\033[48;5;249m")-1];
cbayley 2:60e6df8211f2 15 struct Row row[2];
cbayley 2:60e6df8211f2 16 };
cbayley 2:60e6df8211f2 17
cbayley 2:60e6df8211f2 18 class Stripe {
cbayley 2:60e6df8211f2 19 private:
cbayley 2:60e6df8211f2 20 //uint8_t bg_color;
cbayley 2:60e6df8211f2 21 //uint8_t out_color;
cbayley 2:60e6df8211f2 22 //uint8_t in_color;
cbayley 2:60e6df8211f2 23 uint8_t wp;
cbayley 2:60e6df8211f2 24 uint8_t rp;
cbayley 2:60e6df8211f2 25 //uint8_t wp;
cbayley 2:60e6df8211f2 26 public:
cbayley 2:60e6df8211f2 27 struct Strip strip;
cbayley 2:60e6df8211f2 28
cbayley 2:60e6df8211f2 29 public:
cbayley 2:60e6df8211f2 30 /* contructor
cbayley 2:60e6df8211f2 31 xterm256 color for background, output, input*/
cbayley 2:60e6df8211f2 32 Stripe( uint8_t bc, uint8_t oc, uint8_t ic );
cbayley 2:60e6df8211f2 33
cbayley 2:60e6df8211f2 34 int inbyte( uint8_t );
cbayley 2:60e6df8211f2 35 int outbyte( uint8_t );
cbayley 2:60e6df8211f2 36 int advance( void );
cbayley 2:60e6df8211f2 37 uint8_t getc(void);
cbayley 2:60e6df8211f2 38
cbayley 2:60e6df8211f2 39
cbayley 2:60e6df8211f2 40
cbayley 2:60e6df8211f2 41 };
cbayley 2:60e6df8211f2 42
cbayley 2:60e6df8211f2 43 #endif