Ejemplo n.º 1
0
int main(void) {
	uint8_t buf;

	usart_init(9600);

	sei();

	usart_transmit_char_block('\r');
	usart_transmit_char_block('\n');
	usart_transmit_char_block('B');

	usart_transmit((uint8_t *)"\r\nSTRING\r\n", 10);

	buf = 'K';
	usart_transmit(&buf, 1);
	usart_transmit(&buf, 1);
	usart_transmit(&buf, 1);
	usart_transmit_char('I');
	buf = '\r';
	usart_transmit(&buf, 1);
	usart_transmit_char('\n');
	/*usart_transmit_block('I');*/
	/*usart_transmit_block('L');*/
	/*usart_transmit_block('L');*/

	/* And the rest is handled by interrupts. */
	for (;;);
}
void usart_transmit_string(char* str)
{
    while(*str)
    {
        usart_transmit_char(*str);
        ++ str;
    }
}