48 lines
1.0 KiB
C
48 lines
1.0 KiB
C
/******************************************************************************
|
|
*
|
|
* Copyright (c) 2017-2019 by Löwenware Ltd
|
|
* Please, refer LICENSE file for legal information
|
|
*
|
|
******************************************************************************/
|
|
|
|
/**
|
|
* @file uart.h
|
|
* @author Ilja Kartašov <ik@lowenware.com>
|
|
* @brief
|
|
*
|
|
* @see https://lowenware.com/
|
|
*/
|
|
|
|
#ifndef UART_H_8AFC47F9_2953_42C1_A5C1_1AE5A1F52CD0
|
|
#define UART_H_8AFC47F9_2953_42C1_A5C1_1AE5A1F52CD0
|
|
|
|
#include "uart_mini.h"
|
|
#include "uart_qemu.h"
|
|
|
|
#define UART_MINI 0
|
|
#define UART_QEMU 1
|
|
|
|
#ifndef UART_DEFAULT
|
|
#define UART_DEFAULT UART_QEMU
|
|
#endif
|
|
|
|
#if UART_DEFAULT == UART_MINI
|
|
|
|
#define uart_init(...) uart_mini_init(__VA_ARGS__)
|
|
#define uart_read(...) uart_mini_read(__VA_ARGS__)
|
|
#define uart_write(...) uart_mini_write(__VA_ARGS__)
|
|
|
|
#elif UART_DEFAULT == UART_QEMU
|
|
|
|
#define uart_init(...)
|
|
#define uart_read(...)
|
|
#define uart_write(...) uart_qemu_write(__VA_ARGS__)
|
|
|
|
#else
|
|
|
|
#warning "Unsopported default UART"
|
|
|
|
#endif
|
|
|
|
#endif /* !UART_H */
|