diff options
author | henryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2007-11-18 00:04:42 +0000 |
---|---|---|
committer | henryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2007-11-18 00:04:42 +0000 |
commit | c63871ac816955469c7178eed3467de52d4c05e7 (patch) | |
tree | 8ffa8e44f370baafb1be5af8de107e0b19609a9a /openpicc/application/cmd.c | |
parent | ac0ed9df3ba3fdacf7d3afa1e612f33f86144f35 (diff) |
Add (ring-)buffered print functions to enable debug output from IRQ handlers or similar situations
git-svn-id: https://svn.openpcd.org:2342/trunk@330 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'openpicc/application/cmd.c')
-rw-r--r-- | openpicc/application/cmd.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/openpicc/application/cmd.c b/openpicc/application/cmd.c index 0b5b8da..7390775 100644 --- a/openpicc/application/cmd.c +++ b/openpicc/application/cmd.c @@ -15,6 +15,7 @@ #include "tc_cdiv.h" #include "tc_cdiv_sync.h" #include "pio_irq.h" +#include "usb_print.h" xQueueHandle xCmdQueue; xTaskHandle xCmdTask; @@ -47,17 +48,13 @@ void DumpUIntToUSB(unsigned int data) } while(data); while(i--) - vUSBSendByte(*p++); + usb_print_char(*p++); } /**********************************************************************/ void DumpStringToUSB(char* text) { - unsigned char data; - - if(text) - while((data=*text++)!=0) - vUSBSendByte(data); + usb_print_string(text); } /**********************************************************************/ @@ -71,8 +68,8 @@ void DumpBufferToUSB(char* buffer, int len) int i; for(i=0; i<len; i++) { - vUSBSendByte(HexChar( *buffer >> 4)); - vUSBSendByte(HexChar( *buffer++ & 0xf)); + usb_print_char(HexChar( *buffer >> 4)); + usb_print_char(HexChar( *buffer++ & 0xf)); } } /**********************************************************************/ |