mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-31 00:24:51 +00:00
Remove drivers/input/dummy pseudo driver
With the transition from the input-session to the event-session interface, the use case for this component has vanished. Issue #3827
This commit is contained in:
parent
2e22498e5a
commit
db0e86fa41
@ -1 +0,0 @@
|
||||
Dummy input driver for testing purposes, only.
|
@ -1,95 +0,0 @@
|
||||
/**
|
||||
* \brief Input driver front-end
|
||||
* \author Norman Feske
|
||||
* \author Christian Helmuth
|
||||
* \date 2006-08-30
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2006-2017 Genode Labs GmbH
|
||||
*
|
||||
* This file is part of the Genode OS framework, which is distributed
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
*/
|
||||
|
||||
/* Genode */
|
||||
#include <base/env.h>
|
||||
#include <base/signal.h>
|
||||
#include <base/heap.h>
|
||||
#include <base/component.h>
|
||||
#include <base/rpc_server.h>
|
||||
#include <root/component.h>
|
||||
#include <input_session/input_session.h>
|
||||
#include <input/event.h>
|
||||
#include <base/log.h>
|
||||
|
||||
using namespace Genode;
|
||||
|
||||
|
||||
namespace Input {
|
||||
|
||||
class Session_component : public Genode::Rpc_object<Session>
|
||||
{
|
||||
private:
|
||||
|
||||
Dataspace_capability _ev_ds_cap;
|
||||
|
||||
public:
|
||||
|
||||
Session_component(Dataspace_capability ev_ds_cap)
|
||||
: _ev_ds_cap(ev_ds_cap) { }
|
||||
|
||||
Dataspace_capability dataspace() override { return _ev_ds_cap; }
|
||||
|
||||
bool pending() const override { return 0; }
|
||||
|
||||
int flush() override
|
||||
{
|
||||
/* return number of flushed events */
|
||||
return 0;
|
||||
}
|
||||
|
||||
void sigh(Genode::Signal_context_capability) override { }
|
||||
};
|
||||
|
||||
|
||||
class Root : public Root_component<Session_component>
|
||||
{
|
||||
protected:
|
||||
|
||||
Dataspace_capability _ev_ds_cap;
|
||||
|
||||
Session_component *_create_session(const char *) override {
|
||||
return new (md_alloc()) Session_component(_ev_ds_cap); }
|
||||
|
||||
public:
|
||||
|
||||
Root(Genode::Entrypoint &ep, Allocator &md_alloc,
|
||||
Dataspace_capability ev_ds_cap)
|
||||
:
|
||||
Root_component<Session_component>(ep, md_alloc),
|
||||
_ev_ds_cap(ev_ds_cap)
|
||||
{ }
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
struct Main
|
||||
{
|
||||
Genode::Env &env;
|
||||
|
||||
Sliced_heap heap { env.ram(), env.rm() };
|
||||
|
||||
Dataspace_capability ev_ds_cap {
|
||||
env.ram().alloc(1000*sizeof(Input::Event)) };
|
||||
|
||||
Input::Root root { env.ep(), heap, ev_ds_cap };
|
||||
|
||||
Main(Genode::Env &env) : env(env)
|
||||
{
|
||||
env.parent().announce(env.ep().manage(root));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
void Component::construct(Genode::Env &env) { static Main server(env); }
|
@ -1,3 +0,0 @@
|
||||
TARGET = dummy_input_drv
|
||||
SRC_CC = main.cc
|
||||
LIBS = base
|
Loading…
x
Reference in New Issue
Block a user