Rev 549 |
Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
/*
* Project: S.Ha.R.K.
*
* Coordinators:
* Giorgio Buttazzo <giorgio@sssup.it>
* Paolo Gai <pj@gandalf.sssup.it>
*
* Authors :
* Mauro Marinoni <mauro.marinoni@unipv.it>
*
*
* ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy)
*
* http://www.sssup.it
* http://retis.sssup.it
* http://shark.sssup.it
*/
#include <kernel/func.h>
/* System */
extern int input_init(void);
extern int input_exit(void);
extern int serio_init(void);
extern int serio_exit(void);
/* Controllers */
extern int i8042_init(void);
extern int i8042_exit(void);
/*extern int serport_init(void);
extern int serport_exit(void);*/
/* Handlers */
extern int evbug_init(void);
extern int evbug_exit(void);
static int input_installed = FALSE;
static int evbug_installed = FALSE;
/* Init the Linux Input Layer */
int INPUT26_installed(void)
{
return input_installed;
}
int INPUT26_init() {
int ret;
if (input_installed == TRUE) return 0;
ret = input_init();
if (ret) {
printk(KERN_ERR "Input_Init return: %d\n", ret);
return -1;
}
ret = serio_init();
if (ret) {
printk(KERN_ERR "Serio_Init return: %d\n", ret);
return -2;
}
ret = i8042_init();
if (ret) {
printk(KERN_ERR "i8042_Init return: %d\n", ret);
return -3;
}
/* TODO
ret = serport_init();
if (ret) {
printk(KERN_ERR "SerPort_Init return: %d\n", ret);
return -1;
} */
input_installed = TRUE;
return ret;
}
int INPUT26_close() {
if (input_installed == TRUE) {
i8042_exit();
serio_exit();
input_exit();
return 0;
} else
return -1;
}
/* Init the Linux Event Debug Driver */
int EVBUG26_installed(void)
{
return evbug_installed;
}
int EVBUG26_init() {
evbug_init();
evbug_installed = TRUE;
return 0;
}
int EVBUG26_close() {
evbug_exit();
evbug_installed = FALSE;
return 0;
}