basic ps/2 bus manager
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15981 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
f08d56e023
commit
c2f9bd7dda
8
src/add-ons/kernel/bus_managers/ps2/Jamfile
Normal file
8
src/add-ons/kernel/bus_managers/ps2/Jamfile
Normal file
@ -0,0 +1,8 @@
|
||||
SubDir HAIKU_TOP src add-ons kernel bus_managers ps2 ;
|
||||
|
||||
UsePrivateHeaders kernel ;
|
||||
|
||||
KernelAddon ps2 : kernel bus_managers :
|
||||
ps2_module.c
|
||||
;
|
||||
|
36
src/add-ons/kernel/bus_managers/ps2/PS2.h
Normal file
36
src/add-ons/kernel/bus_managers/ps2/PS2.h
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright 2005 Marcus Overhagen
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* PS/2 bus manager
|
||||
*
|
||||
* Authors (in chronological order):
|
||||
* Marcus Overhagen (marcus@overhagen.de)
|
||||
*/
|
||||
#ifndef _PS2_H_
|
||||
#define _PS2_H_
|
||||
|
||||
#include <bus_manager.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct {
|
||||
bus_manager_info binfo;
|
||||
|
||||
int32 (*function1)();
|
||||
int32 (*function2)();
|
||||
|
||||
} ps2_module_info;
|
||||
|
||||
#define B_PS2_MODULE_NAME "bus_managers/ps2/v1"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
60
src/add-ons/kernel/bus_managers/ps2/ps2_module.c
Normal file
60
src/add-ons/kernel/bus_managers/ps2/ps2_module.c
Normal file
@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright 2005 Marcus Overhagen
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* PS/2 bus manager
|
||||
*
|
||||
* Authors (in chronological order):
|
||||
* Marcus Overhagen (marcus@overhagen.de)
|
||||
*/
|
||||
|
||||
#include "PS2.h"
|
||||
|
||||
|
||||
static int32 function1()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int32 function2()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static status_t
|
||||
std_ops(int32 op, ...)
|
||||
{
|
||||
switch(op) {
|
||||
case B_MODULE_INIT:
|
||||
break;
|
||||
case B_MODULE_UNINIT:
|
||||
break;
|
||||
default:
|
||||
return B_ERROR;
|
||||
}
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
static ps2_module_info ps2_module =
|
||||
{
|
||||
.binfo = {
|
||||
.minfo = {
|
||||
.name = B_PS2_MODULE_NAME,
|
||||
.flags = B_KEEP_LOADED,
|
||||
.std_ops = std_ops,
|
||||
},
|
||||
.rescan = NULL,
|
||||
},
|
||||
&function1,
|
||||
&function2,
|
||||
};
|
||||
|
||||
|
||||
_EXPORT module_info *modules[] =
|
||||
{
|
||||
(module_info *) &ps2_module,
|
||||
NULL
|
||||
};
|
Loading…
Reference in New Issue
Block a user