2012-10-29 11:30:29 +00:00
|
|
|
/*
|
|
|
|
* \brief UART session interface
|
|
|
|
* \author Norman Feske
|
|
|
|
* \date 2012-10-29
|
|
|
|
*
|
|
|
|
* The UART session interface is an extended Terminal session interface.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2017-02-20 12:23:52 +00:00
|
|
|
* Copyright (C) 2012-2017 Genode Labs GmbH
|
2012-10-29 11:30:29 +00:00
|
|
|
*
|
|
|
|
* This file is part of the Genode OS framework, which is distributed
|
2017-02-20 12:23:52 +00:00
|
|
|
* under the terms of the GNU Affero General Public License version 3.
|
2012-10-29 11:30:29 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#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;
|
2021-12-02 10:23:38 +00:00
|
|
|
using namespace Genode;
|
2012-10-29 11:30:29 +00:00
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
struct Session;
|
|
|
|
}
|
2012-10-29 11:30:29 +00:00
|
|
|
|
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
struct Uart::Session : Terminal::Session
|
|
|
|
{
|
2017-05-24 12:41:19 +00:00
|
|
|
/**
|
|
|
|
* \noapi
|
|
|
|
*/
|
2015-03-04 20:12:14 +00:00
|
|
|
static const char *service_name() { return "Uart"; }
|
2012-10-29 11:30:29 +00:00
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
/**
|
|
|
|
* Set baud rate
|
|
|
|
*/
|
2021-12-02 10:23:38 +00:00
|
|
|
virtual void baud_rate(size_t bits_per_second) = 0;
|
2012-10-29 11:30:29 +00:00
|
|
|
|
2015-03-04 20:12:14 +00:00
|
|
|
|
|
|
|
/*******************
|
|
|
|
** RPC interface **
|
|
|
|
*******************/
|
|
|
|
|
2021-12-02 10:23:38 +00:00
|
|
|
GENODE_RPC(Rpc_baud_rate, void, baud_rate, size_t);
|
2015-03-04 20:12:14 +00:00
|
|
|
GENODE_RPC_INTERFACE_INHERIT(Terminal::Session, Rpc_baud_rate);
|
|
|
|
};
|
2012-10-29 11:30:29 +00:00
|
|
|
|
|
|
|
#endif /* _INCLUDE__UART_SESSION__UART_SESSION_H_ */
|