converted ps2_hid driver into ps2 bus manager

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15987 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Marcus Overhagen 2006-01-16 21:07:12 +00:00
parent 079a1529f7
commit 487f65913b
9 changed files with 24 additions and 38 deletions

View File

@ -1,8 +1,14 @@
SubDir HAIKU_TOP src add-ons kernel bus_managers ps2 ;
UsePrivateHeaders input ;
UsePrivateHeaders kernel ;
KernelAddon ps2 : kernel bus_managers :
packet_buffer.cpp
ps2_common.c
ps2_dev.c
ps2_keyboard.c
ps2_module.c
ps2_mouse.c
ps2_service.c
;

View File

@ -12,12 +12,10 @@
#include <string.h>
#include "common.h"
#include "ps2_common.h"
#include "ps2_service.h"
#include "ps2_dev.h"
int32 api_version = B_CUR_DRIVER_API_VERSION;
device_hooks sKeyboardDeviceHooks = {
keyboard_open,
keyboard_close,
@ -237,31 +235,7 @@ ps2_interrupt(void* cookie)
status_t
init_hardware(void)
{
TRACE(("ps2_hid: init_hardware\n"));
return B_OK;
}
const char **
publish_devices(void)
{
TRACE(("ps2_hid: publish_devices\n"));
return NULL;
}
device_hooks *
find_device(const char *name)
{
TRACE(("ps2_hid: find_device\n"));
return NULL;
}
status_t
init_driver(void)
ps2_init_driver(void)
{
status_t status;
@ -335,7 +309,7 @@ err_1:
void
uninit_driver(void)
ps2_uninit_driver(void)
{
TRACE(("ps2_hid: uninit_driver\n"));
remove_io_interrupt_handler(INT_PS2_MOUSE, &ps2_interrupt, NULL);

View File

@ -18,7 +18,7 @@
#include <KernelExport.h>
#include <OS.h>
#include "ps2.h"
#include "ps2_defs.h"
// debug defines
@ -37,6 +37,9 @@ extern device_hooks sMouseDeviceHooks;
// prototypes from common.c
status_t ps2_init_driver(void);
void ps2_uninit_driver(void);
extern status_t ps2_wait_read();
extern status_t ps2_wait_write();

View File

@ -9,8 +9,8 @@
* Stefano Ceccherini (burton666@libero.it)
* Axel Dörfler, axeld@pinc-software.de
*/
#ifndef _PS2_H
#define _PS2_H
#ifndef _PS2_DEFS_H
#define _PS2_DEFS_H
/** Interface definitions for the Intel 8042, 8741, or 8742 (PS/2) */

View File

@ -10,7 +10,7 @@
#ifndef __PS2_DEV_H
#define __PS2_DEV_H
#include "common.h"
#include "ps2_common.h"
typedef struct
{

View File

@ -10,7 +10,7 @@
*/
#include "common.h"
#include "ps2_common.h"
#include "kb_mouse_driver.h"
#include "packet_buffer.h"

View File

@ -9,6 +9,7 @@
*/
#include "PS2.h"
#include "ps2_common.h"
static int32 function1()
@ -28,8 +29,10 @@ std_ops(int32 op, ...)
{
switch(op) {
case B_MODULE_INIT:
break;
return ps2_init_driver();
case B_MODULE_UNINIT:
ps2_uninit_driver();
break;
default:
return B_ERROR;

View File

@ -62,7 +62,7 @@
#include <string.h>
#include "kb_mouse_driver.h"
#include "common.h"
#include "ps2_common.h"
#include "packet_buffer.h"

View File

@ -10,7 +10,7 @@
#ifndef __PS2_SERVICE_H
#define __PS2_SERVICE_H
#include "common.h"
#include "ps2_common.h"
#include "ps2_dev.h"
status_t ps2_service_init(void);