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:
parent
079a1529f7
commit
487f65913b
@ -1,8 +1,14 @@
|
|||||||
SubDir HAIKU_TOP src add-ons kernel bus_managers ps2 ;
|
SubDir HAIKU_TOP src add-ons kernel bus_managers ps2 ;
|
||||||
|
|
||||||
|
UsePrivateHeaders input ;
|
||||||
UsePrivateHeaders kernel ;
|
UsePrivateHeaders kernel ;
|
||||||
|
|
||||||
KernelAddon ps2 : kernel bus_managers :
|
KernelAddon ps2 : kernel bus_managers :
|
||||||
|
packet_buffer.cpp
|
||||||
|
ps2_common.c
|
||||||
|
ps2_dev.c
|
||||||
|
ps2_keyboard.c
|
||||||
ps2_module.c
|
ps2_module.c
|
||||||
|
ps2_mouse.c
|
||||||
|
ps2_service.c
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -12,12 +12,10 @@
|
|||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "common.h"
|
#include "ps2_common.h"
|
||||||
#include "ps2_service.h"
|
#include "ps2_service.h"
|
||||||
#include "ps2_dev.h"
|
#include "ps2_dev.h"
|
||||||
|
|
||||||
int32 api_version = B_CUR_DRIVER_API_VERSION;
|
|
||||||
|
|
||||||
device_hooks sKeyboardDeviceHooks = {
|
device_hooks sKeyboardDeviceHooks = {
|
||||||
keyboard_open,
|
keyboard_open,
|
||||||
keyboard_close,
|
keyboard_close,
|
||||||
@ -237,31 +235,7 @@ ps2_interrupt(void* cookie)
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
init_hardware(void)
|
ps2_init_driver(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)
|
|
||||||
{
|
{
|
||||||
status_t status;
|
status_t status;
|
||||||
|
|
||||||
@ -335,7 +309,7 @@ err_1:
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
uninit_driver(void)
|
ps2_uninit_driver(void)
|
||||||
{
|
{
|
||||||
TRACE(("ps2_hid: uninit_driver\n"));
|
TRACE(("ps2_hid: uninit_driver\n"));
|
||||||
remove_io_interrupt_handler(INT_PS2_MOUSE, &ps2_interrupt, NULL);
|
remove_io_interrupt_handler(INT_PS2_MOUSE, &ps2_interrupt, NULL);
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include <KernelExport.h>
|
#include <KernelExport.h>
|
||||||
#include <OS.h>
|
#include <OS.h>
|
||||||
|
|
||||||
#include "ps2.h"
|
#include "ps2_defs.h"
|
||||||
|
|
||||||
|
|
||||||
// debug defines
|
// debug defines
|
||||||
@ -37,6 +37,9 @@ extern device_hooks sMouseDeviceHooks;
|
|||||||
|
|
||||||
// prototypes from common.c
|
// 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_read();
|
||||||
extern status_t ps2_wait_write();
|
extern status_t ps2_wait_write();
|
||||||
|
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
* Stefano Ceccherini (burton666@libero.it)
|
* Stefano Ceccherini (burton666@libero.it)
|
||||||
* Axel Dörfler, axeld@pinc-software.de
|
* Axel Dörfler, axeld@pinc-software.de
|
||||||
*/
|
*/
|
||||||
#ifndef _PS2_H
|
#ifndef _PS2_DEFS_H
|
||||||
#define _PS2_H
|
#define _PS2_DEFS_H
|
||||||
|
|
||||||
|
|
||||||
/** Interface definitions for the Intel 8042, 8741, or 8742 (PS/2) */
|
/** Interface definitions for the Intel 8042, 8741, or 8742 (PS/2) */
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#ifndef __PS2_DEV_H
|
#ifndef __PS2_DEV_H
|
||||||
#define __PS2_DEV_H
|
#define __PS2_DEV_H
|
||||||
|
|
||||||
#include "common.h"
|
#include "ps2_common.h"
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "common.h"
|
#include "ps2_common.h"
|
||||||
#include "kb_mouse_driver.h"
|
#include "kb_mouse_driver.h"
|
||||||
#include "packet_buffer.h"
|
#include "packet_buffer.h"
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "PS2.h"
|
#include "PS2.h"
|
||||||
|
#include "ps2_common.h"
|
||||||
|
|
||||||
|
|
||||||
static int32 function1()
|
static int32 function1()
|
||||||
@ -28,8 +29,10 @@ std_ops(int32 op, ...)
|
|||||||
{
|
{
|
||||||
switch(op) {
|
switch(op) {
|
||||||
case B_MODULE_INIT:
|
case B_MODULE_INIT:
|
||||||
break;
|
return ps2_init_driver();
|
||||||
|
|
||||||
case B_MODULE_UNINIT:
|
case B_MODULE_UNINIT:
|
||||||
|
ps2_uninit_driver();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "kb_mouse_driver.h"
|
#include "kb_mouse_driver.h"
|
||||||
#include "common.h"
|
#include "ps2_common.h"
|
||||||
#include "packet_buffer.h"
|
#include "packet_buffer.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#ifndef __PS2_SERVICE_H
|
#ifndef __PS2_SERVICE_H
|
||||||
#define __PS2_SERVICE_H
|
#define __PS2_SERVICE_H
|
||||||
|
|
||||||
#include "common.h"
|
#include "ps2_common.h"
|
||||||
#include "ps2_dev.h"
|
#include "ps2_dev.h"
|
||||||
|
|
||||||
status_t ps2_service_init(void);
|
status_t ps2_service_init(void);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user