os-core/kernel/device/uart/uart_qemu.c

31 lines
604 B
C
Raw Normal View History

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/
*/
2019-12-01 22:57:02 +01:00
#include "uart_qemu.h"
2019-05-29 11:10:01 +02:00
2019-12-01 22:57:02 +01:00
#define UART_BASE 0x09000000;
2019-05-29 11:10:01 +02:00
2019-12-01 22:57:02 +01:00
volatile unsigned int *UART0 = (unsigned int *)UART_BASE;
2019-12-01 22:57:02 +01:00
int
uart_qemu_write(unsigned char c)
2019-05-29 11:10:01 +02:00
{
*UART0 = (unsigned int) c;
2019-12-01 22:57:02 +01:00
return 0;
}
2019-12-01 22:57:02 +01:00