void usart_printhex(char c)
{
	char lo = c & 0x0F;
	char hi = (c & 0xF0) >> 4;
	usart_putchr(hi + ((hi<10)?'0':'A'-10));
	usart_putchr(lo + ((lo<10)?'0':'A'-10));
}
Exemple #2
0
void usart_send(const char *s){
	RETURN_IF_AVRSIM;
	while (*s){
		if (*s == '\n') usart_putchr('\r');
      	usart_putchr(*s++);
    }
}
Exemple #3
0
void usart_psend(const char *s){
	RETURN_IF_AVRSIM;
    char c;
    for (c = pgm_read_byte(s); c; ++s, c = pgm_read_byte(s)){
        if (c == '\n') usart_putchr('\r');
        usart_putchr(c);
    }
}
void usart_printstr(char *string)
{
	while (*string!='\0')
	{
		usart_putchr(*string);
		string++;
	}
}