void print_P(const char *s) { char c; while (1) { c = pgm_read_byte(s++); if (!c) break; if (c == '\n') usb_debug_putchar('\r'); usb_debug_putchar(c); } }
static int LogToUsbDebugFunc( void *outParm, int ch ) { (void)outParm; usb_debug_putchar( ch ); if ( ch == '\n' ) { usb_debug_flush_output(); } return 1; }
uint8_t getPeople(void){ char c; char buf[MAX_PEEPS]; uint8_t buf_count = 0; while(1){ displayMulti(atoi(buf),'P'); if(c = waitKeyPress()){ usb_debug_putchar(c); if(c == '*'){ memset(buf, 0, MAX_PEEPS); buf_count = 0; } else if(c == '#'){ return atoi(buf); } else { buf[buf_count] = c; buf_count++; if (buf_count == MAX_PEEPS){ return atoi(buf); } } } } }
static int uart_putchar(char c, FILE* stream) { return usb_debug_putchar(c); }
void phex1(unsigned char c) { usb_debug_putchar(c + ((c < 10) ? '0' : 'A' - 10)); }