mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-20 14:13:09 +00:00
85599c072f
Use the new asynchronous IRQ interface in the mostly used drivers, e.g.: * ahci_drv: x86/exynos5 * gpio_drv: imx53/omap4 * input_drv: imx53/dummy * ps2_drv: x86/pl050 * timer_drv Now, the Irq_session is requested from Gpio::Session: From now on we use an asynchronous IRQ interface. To prevent triggering another GPIO IRQ while currently handling the former one, IRQs must now by acknowledged explicitly. While here, we also changed the GPIO session interface regarding IRQ management. The generic GPIO component now wraps the Irq_session managed by the backend instead of using the GPIO backend methods directly. A client using the GPIO session may request the Irq_session_capability by calling 'Gpio::Session::irq_session()' and can use this capability when using a local Irq_session_client. Issue #1456.
40 lines
1.2 KiB
C++
40 lines
1.2 KiB
C++
/*
|
|
* \brief Client-side Gpio session interface
|
|
* \author Ivan Loskutov <ivan.loskutov@ksyslabs.org>
|
|
* \author Stefan Kalkowski <Stefan.kalkowski@genode-labs.com>
|
|
* \date 2012-06-23
|
|
*/
|
|
|
|
/*
|
|
* Copyright (C) 2012 Ksys Labs LLC
|
|
* Copyright (C) 2012-2015 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__GPIO_SESSION_H__CLIENT_H_
|
|
#define _INCLUDE__GPIO_SESSION_H__CLIENT_H_
|
|
|
|
#include <gpio_session/capability.h>
|
|
#include <base/rpc_client.h>
|
|
|
|
namespace Gpio { struct Session_client; }
|
|
|
|
|
|
struct Gpio::Session_client : Genode::Rpc_client<Session>
|
|
{
|
|
explicit Session_client(Session_capability session)
|
|
: Genode::Rpc_client<Session>(session) { }
|
|
|
|
void direction(Direction d) override { call<Rpc_direction>(d); }
|
|
void write(bool level) override { call<Rpc_write>(level); }
|
|
bool read() override { return call<Rpc_read>(); }
|
|
void debouncing(unsigned int us) override { call<Rpc_debouncing>(us); }
|
|
|
|
Genode::Irq_session_capability irq_session(Irq_type type) override {
|
|
return call<Rpc_irq_session>(type); }
|
|
};
|
|
|
|
#endif /* _INCLUDE__GPIO_SESSION_H__CLIENT_H_ */
|