Config UART with N81 settings; no receive, break character function and interrupt disabled
This commit is contained in:
21
src/uart_configuration.c
Normal file
21
src/uart_configuration.c
Normal file
@@ -0,0 +1,21 @@
|
||||
#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);
|
||||
}
|
||||
Reference in New Issue
Block a user