X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=firmware%2Flib%2Fcommand.c;h=8f9501a61841cf2ea0a4c0110f9b92eeb256fd53;hp=d984fca791feb33f357e38223acde6d73d0bd090;hb=757884d51cc6b119a3b1773873c446926b26011d;hpb=f4a6b415e762bcdc560f3ea655851d16f483ea5a diff --git a/firmware/lib/command.c b/firmware/lib/command.c index d984fca..8f9501a 100644 --- a/firmware/lib/command.c +++ b/firmware/lib/command.c @@ -30,13 +30,35 @@ void debugstr(const char *str){ txstring(0xFF,0xFF,str); } +//! brief Debug a hex word string. +void debughex(u16 v) { + debugbytes((void *)&v, 2); +} + +//! brief Debug a hex word string. +void debughex32(u32 v) { + debugbytes((void *)&v, 4); +} + +/*! \brief Transmit debug bytes. + + Transmits bytes for debugging. +*/ +void debugbytes(const char *bytes, unsigned int len){ + u16 i; + txhead(0xFF,0xFE,len); + for(i=0;i