X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=test_src%2Fcli.c;h=2bfbae748428687dfa23cc68c171c143ebf0d648;hb=b5a057d2dfa6b43f3850b3858c11a079eb9086f0;hp=68d6cf6fbbbdff3ff8895841da5d44b4e82c7922;hpb=56a151edecefbaeab43dac22c89a3bb9fe4f470e;p=avr-crypto-lib.git diff --git a/test_src/cli.c b/test_src/cli.c index 68d6cf6..2bfbae7 100644 --- a/test_src/cli.c +++ b/test_src/cli.c @@ -169,6 +169,29 @@ void cli_hexdump2(void* data, uint16_t length){ } } +/** + * \brief dumps the contents of a buffer to the console + * Like cli_hexdump but bytes are seperated with a single space + * on the console output. + */ +void cli_hexdump_block(void* data, uint16_t length, uint8_t indent, uint8_t width){ + uint16_t i; + uint8_t j; + if(!cli_tx) + return; + for(i=0; i>4))); + cli_tx(pgm_read_byte(hexdigit_tab_P +((*((uint8_t*)data))&0xf))); + cli_tx(' '); + data = (uint8_t*)data +1; + } +} static void cli_auto_help(uint16_t maxcmdlength, PGM_VOID_P cmdlist){