Simplify GPIO session interface (fix #707)

Changes GPIO session interface to a one-GPIO-pin-per-session style. Moreover,
this commit introduces a generic driver interface for GPIO drivers. Thereby
generalizes root- and session component for GPIO.
This commit is contained in:
Stefan Kalkowski
2013-05-06 14:33:30 +02:00
committed by Norman Feske
parent 562ac7d059
commit ca92984bcc
17 changed files with 966 additions and 1411 deletions

View File

@ -1,6 +1,7 @@
/*
* \brief Connection to Gpio session
* \author Ivan Loskutov <ivan.loskutov@ksyslabs.org>
* \author Stefan Kalkowski <stefan.kalkowski@genode-labs.com>
* \date 2012-06-23
*/
@ -22,11 +23,9 @@ namespace Gpio {
struct Connection : Genode::Connection<Session>, Session_client
{
Connection()
:
Genode::Connection<Session>(session("ram_quota=4K")),
Session_client(cap())
{ }
Connection(unsigned long gpio_pin)
: Genode::Connection<Session>(session("ram_quota=8K, gpio=%zd", gpio_pin)),
Session_client(cap()) { }
};
}