uart_P.c
#include <avr/io.h>
#include "uart_P.h"

void uart_init(void)
{
    
    UBRR0H = 0;
    UBRR0L = 103;

    UCSR0B = (1 << RXEN0) | (1 << TXEN0); // povolene RX TX
    UCSR0C = (1 << UCSZ01) | (1 << UCSZ00); // 8-bit data
}

void uart_putc(char c)  //sluzy na vypis spravny/nespravny
{
    while (!(UCSR0A & (1 << UDRE0)));
    UDR0 = c;
}

void uart_puts(const char *s)  //nepouzivam v main
{
    while (*s)
    {
        uart_putc(*s);
        s++;
    }
}
