2012-05-17 06:03:16 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2012 Haiku, Inc. All rights reserved.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* François Revol, revol@free.fr
|
|
|
|
*/
|
|
|
|
#ifndef _KERNEL_ARCH_DEBUG_UART_8250_H
|
|
|
|
#define _KERNEL_ARCH_DEBUG_UART_8250_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
|
2012-05-17 12:31:02 +04:00
|
|
|
#include <SupportDefs.h>
|
|
|
|
|
2012-05-17 06:03:16 +04:00
|
|
|
#include "debug_uart.h"
|
|
|
|
|
|
|
|
|
|
|
|
class DebugUART8250 : public DebugUART {
|
|
|
|
public:
|
|
|
|
DebugUART8250(addr_t base, int64 clock);
|
|
|
|
~DebugUART8250();
|
|
|
|
|
2012-05-17 12:31:02 +04:00
|
|
|
void InitEarly();
|
|
|
|
void Init();
|
|
|
|
void InitPort(uint32 baud);
|
2012-05-17 06:03:16 +04:00
|
|
|
|
2012-05-17 12:31:02 +04:00
|
|
|
int PutChar(char c);
|
|
|
|
int GetChar(bool wait);
|
2012-05-17 06:03:16 +04:00
|
|
|
|
2012-05-17 12:31:02 +04:00
|
|
|
void FlushTx();
|
|
|
|
void FlushRx();
|
2012-05-17 06:03:16 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
extern DebugUART8250 *arch_get_uart_8250(addr_t base, int64 clock);
|
|
|
|
|
2012-05-17 12:31:02 +04:00
|
|
|
|
2012-05-17 06:03:16 +04:00
|
|
|
#endif /* _KERNEL_ARCH_DEBUG_UART_8250_H */
|