2019-05-29 11:10:01 +02:00
|
|
|
/******************************************************************************
|
|
|
|
*
|
|
|
|
* Copyright (c) 2017-2019 by Löwenware Ltd
|
|
|
|
* Please, refer LICENSE file for legal information
|
|
|
|
*
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file uart.c
|
|
|
|
* @author Ilja Kartašov <ik@lowenware.com>
|
|
|
|
* @brief
|
|
|
|
*
|
|
|
|
* @see https://lowenware.com/
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "uart.h"
|
|
|
|
|
2019-05-30 08:44:01 +02:00
|
|
|
volatile unsigned int *UART0 = (unsigned int *)UART_BASE;
|
2019-05-29 11:10:01 +02:00
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
uart_init(void)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2019-05-30 08:44:01 +02:00
|
|
|
|
2019-05-29 11:10:01 +02:00
|
|
|
void
|
|
|
|
uart_putc(unsigned char c)
|
|
|
|
{
|
2019-05-30 08:44:01 +02:00
|
|
|
*UART0 = (unsigned int) c;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
uart_puts(const unsigned char *s)
|
|
|
|
{
|
|
|
|
while(*s) {
|
|
|
|
*UART0 = (unsigned int) *(s++);
|
|
|
|
}
|
2019-05-29 11:10:01 +02:00
|
|
|
}
|