sonde/debug.c
2016-04-29 11:30:56 +02:00

16 lines
296 B
C

#include "debug.h"
void debug (char* ptr) {
while (*ptr) SerialPutChar(*(ptr++));
}
void debughex (char* ptr,uint8_t len) {
while (len--) {
uint8_t c = *(ptr++);
uint8_t ch= c>>4;
c &= 0x0F;
SerialPutChar(ch>9?ch+'A'-10:ch+'0');
SerialPutChar(c>9?c+'A'-10:c+'0');
}
}