- UART takes baudrate on init
- UART calculate optimized baud prescaler git-svn-id: http://moon:8086/svn/projects/HendiControl@47 fda53097-d464-4ada-af97-ba876c37ca34
This commit is contained in:
@@ -9,11 +9,15 @@
|
||||
#ifndef UART_H_
|
||||
#define UART_H_
|
||||
|
||||
#include "machine.h"
|
||||
#include "fifo.h"
|
||||
|
||||
void uart_init(Fifo *pFifo, uint16_t BAUD_PRESCALE);
|
||||
#define UART_PRESCALE(baudrate, smpPerBit) ((5+ 10*F_CPU / (baudrate*smpPerBit) - 1)/10)
|
||||
|
||||
void uart_init(Fifo *pFifo, uint32_t baudrate);
|
||||
void uart_putc(char c);
|
||||
int uart_putchar(char c, FILE *stream);
|
||||
void uart_puts(char const *str);
|
||||
|
||||
|
||||
#endif /* UART_H_ */
|
||||
Reference in New Issue
Block a user