mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-23 17:17:38 +00:00
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:
committed by
Norman Feske
parent
562ac7d059
commit
ca92984bcc
@ -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()) { }
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user