genode/base/include/irq_session/irq_session.h

59 lines
1.4 KiB
C
Raw Normal View History

2011-12-22 15:19:25 +00:00
/*
* \brief IRQ session interface
* \author Christian Helmuth
* \date 2007-09-13
*
* An open IRQ session represents a valid IRQ attachment/association.
* Initially, the interrupt is masked and will only occur if enabled. This is
* done by calling wait_for_irq(). When the interrupt is delivered to the
* client, it was acknowledged and masked at the interrupt controller before.
*
* Disassociation from an IRQ is done by closing the session.
*/
/*
2013-01-10 20:44:47 +00:00
* Copyright (C) 2007-2013 Genode Labs GmbH
2011-12-22 15:19:25 +00:00
*
* 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__IRQ_SESSION__IRQ_SESSION_H_
#define _INCLUDE__IRQ_SESSION__IRQ_SESSION_H_
#include <base/capability.h>
#include <session/session.h>
namespace Genode {
struct Irq_session : Session
{
/**
* Interrupt trigger
*/
enum Trigger { TRIGGER_UNCHANGED = 0, TRIGGER_LEVEL, TRIGGER_EDGE };
/**
* Interrupt trigger polarity
*/
enum Polarity { POLARITY_UNCHANGED = 0, POLARITY_HIGH, POLARITY_LOW };
2011-12-22 15:19:25 +00:00
static const char *service_name() { return "IRQ"; }
virtual ~Irq_session() { }
virtual void wait_for_irq() = 0;
/*********************
** RPC declaration **
*********************/
GENODE_RPC(Rpc_wait_for_irq, void, wait_for_irq);
GENODE_RPC_INTERFACE(Rpc_wait_for_irq);
};
}
#endif /* _INCLUDE__IRQ_SESSION__IRQ_SESSION_H_ */