genode/os/include/uart_session/uart_session.h
Norman Feske 5b4edeb031 Introduce 'Uart::Session' interface
The new 'Uart::Session' interface is an extension of the
'Terminal::Session' interface that allows for configuring UART-specific
parameters, i.e., the baud rate.
2012-11-07 13:43:09 +01:00

46 lines
1010 B
C++

/*
* \brief UART session interface
* \author Norman Feske
* \date 2012-10-29
*
* The UART session interface is an extended Terminal session interface.
*/
/*
* Copyright (C) 2012 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
#ifndef _INCLUDE__UART_SESSION__UART_SESSION_H_
#define _INCLUDE__UART_SESSION__UART_SESSION_H_
/* Genode includes */
#include <terminal_session/terminal_session.h>
namespace Uart {
using namespace Terminal;
struct Session : Terminal::Session
{
static const char *service_name() { return "Uart"; }
/**
* Set baud rate
*/
virtual void baud_rate(Genode::size_t bits_per_second) = 0;
/*******************
** RPC interface **
*******************/
GENODE_RPC(Rpc_baud_rate, void, baud_rate, Genode::size_t);
GENODE_RPC_INTERFACE_INHERIT(Terminal::Session, Rpc_baud_rate);
};
}
#endif /* _INCLUDE__UART_SESSION__UART_SESSION_H_ */