X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=firmware%2Flib%2Fcommand.c;h=8f9501a61841cf2ea0a4c0110f9b92eeb256fd53;hp=282d98adafc47c9d092901a8d266ac88d0320392;hb=b0274fc1ffccf73492660c02600e8df12c0ba5b2;hpb=f110fe63257686b9fcac78824d61ec429c2a5226 diff --git a/firmware/lib/command.c b/firmware/lib/command.c index 282d98a..8f9501a 100644 --- a/firmware/lib/command.c +++ b/firmware/lib/command.c @@ -30,6 +30,27 @@ 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