21 lines
345 B
C
21 lines
345 B
C
#include "BA45F5250.h"
|
|
#include "stdint.h"
|
|
#include "build-in.h"
|
|
#include "uart_configuration.h"
|
|
|
|
void uart_init()
|
|
{
|
|
_pbs0 = 0b11001100;
|
|
_simc0 = 0b11100000;
|
|
_ucr1 = 0b10000000;
|
|
_ucr2 = 0b10100000;
|
|
_brg = 0b00000011;
|
|
_sime = 0;
|
|
_simf = 0;
|
|
}
|
|
|
|
void uart_transmit(uint8_t data)
|
|
{
|
|
_txr_rxr = data;
|
|
while (!_tidle);
|
|
} |