/shark/trunk/drivers/input/input.c |
---|
27,7 → 27,7 |
#include <linux/device.h> |
#include <linux/devfs_fs_kernel.h> |
#define INPUT_DEBUG |
//#define INPUT_DEBUG |
MODULE_AUTHOR("Vojtech Pavlik <vojtech@suse.cz>"); |
MODULE_DESCRIPTION("Input core"); |
/shark/trunk/drivers/input/keyboard/atkbd.c |
---|
703,7 → 703,7 |
input_register_device(&atkbd->dev); |
printk(KERN_INFO "input: %s on %s\n", atkbd->name, serio->phys); |
//printk(KERN_INFO "input: %s on %s\n", atkbd->name, serio->phys); |
} |
/shark/trunk/drivers/input/serio/i8042.c |
---|
695,11 → 695,11 |
serio_register_port(port); |
printk(KERN_INFO "serio: i8042 %s port at %#lx,%#lx irq %d\n", |
/*printk(KERN_INFO "serio: i8042 %s port at %#lx,%#lx irq %d\n", |
values->name, |
(unsigned long) I8042_DATA_REG, |
(unsigned long) I8042_COMMAND_REG, |
values->irq); |
values->irq);*/ |
return 0; |
} |
/shark/trunk/drivers/input/shark/shark_mouse.c |
---|
55,9 → 55,25 |
/* Mouse driver currently installed */ |
static int mouse_installed = FALSE; |
/*static PID mouse_pid = NIL;*/ |
/*static short int mouse_lim_x1 = 0; |
static short int mouse_lim_y1 = 0; |
static short int mouse_lim_x2 = 79; |
static short int mouse_lim_y2 = 24; |
static short int mouse_x = 40; |
static short int mouse_x_mick = 0; |
static short int mouse_y = 12; |
static short int mouse_y_mick = 0; |
static short int mouse_buttons = 0; |
static short int mouse_thresholdlim = 5; |
static MOUSE_HANDLER mouse_handler = NULL; |
static MOUSE_HANDLER user_mouse_handler = NULL; |
static int autocursormode=DISABLE; |
static PID mouse_pid = NIL;*/ |
/* |
* Start mouseProc Task |
*/ |
68,12 → 84,32 |
/* Init the Linux Speaker Driver */ |
/*int MOUSE26_init(MOUSE_PARMS *s)*/ |
int MOUSE26_init(void) |
{ |
/*MOUSE_PARMS mparms=BASE_MOUSE; |
TASK_MODEL *m; |
SOFT_TASK_MODEL base_m;*/ |
int status = 0; |
if (mouse_installed == TRUE) return 0; |
/* if a NULL is passed */ |
/*if (s == NULL) |
s = &mparms; |
if (s->tm == (TASK_MODEL *)MOUSE_DEFAULT) { |
soft_task_default_model(base_m); |
soft_task_def_wcet(base_m,2000); |
soft_task_def_met(base_m,500); |
soft_task_def_period(base_m,8000); |
soft_task_def_system(base_m); |
soft_task_def_nokill(base_m); |
soft_task_def_aperiodic(base_m); |
m = (TASK_MODEL *)&base_m; |
} else |
m = parms->tm;*/ |
if (input_installed == FALSE) { |
status = INPUT26_init(); |
if (status) { |
/shark/trunk/drivers/input/shark/shark_keyb.c |
---|
39,6 → 39,7 |
*/ |
//#define __KEYB_DEBUG__ |
//#define KEYB_TASK |
#include <kernel/kern.h> |
#include <signal.h> |
108,15 → 109,23 |
/* Communication port between the extern process & the user */ |
static PORT pkeyPort, ukeyPort; |
#ifdef KEYB_TASK |
/* keyboard task PID */ |
static PID keybpid; |
#else |
void keyProc(void); |
#endif |
/* |
* Start keyProc Task |
* Start keyProc Task or exec it as function |
*/ |
void shark_kbd_task(void) |
void shark_kbd_exec(void) |
{ |
#ifdef KEYB_TASK |
task_activate(keybpid); |
#else |
keyProc(); |
#endif |
} |
/* |
318,7 → 327,11 |
return (0xff00 | c); |
} |
#ifdef KEYB_TASK |
TASK keyProc(void) |
#else |
void keyProc(void) |
#endif |
{ |
WORD code; |
BYTE found; |
326,7 → 339,9 |
int i, res; |
unsigned int dato; |
#ifdef KEYB_TASK |
while (1) { |
#endif |
res = kbd_get(&dato, NON_BLOCK); |
if (res >= 0) { |
code = scanCode(dato, res); |
358,8 → 373,10 |
port_send(pkeyPort, (BYTE *) (&dt), NON_BLOCK); |
} |
} |
#ifdef KEYB_TASK |
task_endcycle(); |
} |
#endif |
} |
/* default function called on ctrl-c */ |
428,8 → 445,10 |
WORD i; |
int status = 0; |
#ifdef KEYB_TASK |
SOFT_TASK_MODEL base_m; |
TASK_MODEL *m; |
#endif |
if (keyb_installed == TRUE) return 0; |
473,6 → 492,7 |
keyb_hook (emerg, s->ctrlcfunc, TRUE); |
} |
#ifdef KEYB_TASK |
/* keyb task */ |
if (s->tm == (TASK_MODEL *) KEYB_DEFAULT) { |
soft_task_default_model (base_m); |
496,6 → 516,7 |
port_delete (ukeyPort); |
return -1; |
} |
#endif |
if (input_installed == FALSE) |
if (INPUT26_init()) { |
541,8 → 562,10 |
*/ |
int KEYB26_close(void) |
{ |
#ifdef KEYB_TASK |
int free; |
SYS_FLAGS f; |
#endif |
if (!keyb_installed) |
return -1; |
550,6 → 573,7 |
kbd_exit(); |
atkbd_exit(); |
#ifdef KEYB_TASK |
f = kern_fsave(); |
free = (proc_table[keybpid].status == FREE); |
kern_frestore(f); |
558,6 → 582,7 |
#endif |
if (free) |
task_kill (keybpid); |
#endif |
/*port_delete (pkeyPort); |
port_delete (ukeyPort);*/ |
/shark/trunk/drivers/input/shark/shark_spk.c |
---|
35,7 → 35,7 |
* |
*/ |
#define __MOUSE_DEBUG__ 1 |
//#define __MOUSE_DEBUG__ 1 |
#include <kernel/kern.h> |
/shark/trunk/drivers/input/misc/pcspkr.c |
---|
82,7 → 82,7 |
input_register_device(&pcspkr_dev); |
printk(KERN_INFO "input: %s\n", pcspkr_name); |
//printk(KERN_INFO "input: %s\n", pcspkr_name); |
return 0; |
} |
/shark/trunk/drivers/input/handler/keyboard.c |
---|
1,5 → 1,5 |
/* |
* $Id: keyboard.c,v 1.1 2004-03-22 14:48:15 mauro Exp $ |
* $Id: keyboard.c,v 1.2 2004-03-23 15:37:21 mauro Exp $ |
* |
* Copyright (c) 1999-2001 Vojtech Pavlik |
*/ |
41,7 → 41,7 |
MODULE_DESCRIPTION("Input driver event debug module"); |
MODULE_LICENSE("GPL"); |
extern void shark_kbd_task(void); |
extern void shark_kbd_exec(void); |
/* Buffer Ssize */ |
#define KEYB_BUFFERSIZE 256 |
235,7 → 235,7 |
khead = (khead+1) & KEYB_BUFFERMASK; |
} |
shark_kbd_task(); |
shark_kbd_exec(); |
} |
static struct input_handle *kbd_connect(struct input_handler *handler, struct input_dev *dev, struct input_device_id *id) |
/shark/trunk/drivers/cons/cons1.c |
---|
176,13 → 176,14 |
{ |
static unsigned short scan_x,x,y; |
LIN_ADDR v = (LIN_ADDR)(0xB8000 + active_page*(2*PAGE_SIZE)); |
x = bios_x; |
y = bios_y; |
switch (c) { |
case '\t' : x += 8; |
if (x >= cons_columns) { |
if (x == (cons_columns-1)) { |
x = 0; |
if (y == (cons_rows-1)) scroll(); |
if (y >= (cons_rows-1)) scroll(); |
else y++; |
} else { |
scan_x = 0; |
191,7 → 192,7 |
} |
break; |
case '\n' : x = 0; |
if (y == (cons_rows-1)) scroll(); |
if (y >= (cons_rows-1)) scroll(); |
else y++; |
break; |
case '\b' : x--; |
200,13 → 201,14 |
break; |
default : lmempokeb((LIN_ADDR)(v + 2*(x + y*cons_columns)),c); |
x++; |
if (x > cons_columns) { |
if (x == (cons_columns-1)) { |
x = 0; |
if (y == (cons_rows-1)) scroll(); |
if (y >= (cons_rows-1)) scroll(); |
else y++; |
} |
} |
place(x,y); |
} |
void cputs(char *s) |
219,5 → 221,3 |
} |
} |
/shark/trunk/drivers/linuxc26/timer.c |
---|
60,7 → 60,7 |
int mod_timer(struct timer_list *timer, unsigned long expires) |
{ |
shark_timer_delete(timer->event_timer); |
if (timer->event_timer != -1) shark_timer_delete(timer->event_timer); |
timer->expires = expires; |
add_timer(timer); |
return 0; |
/shark/trunk/drivers/linuxc26/shark_glue.c |
---|
179,9 → 179,14 |
{ |
SYS_FLAGS f; |
f = kern_fsave(); |
if (index <= 0 || index >= 64) { |
kern_frestore(f); |
return -1; |
} |
if (timer_table[index] != -1) { |
int_func_table[index] = NULL; |