Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 515 → Rev 601

/shark/trunk/drivers/i2c/include/drivers/shark_i2c26.h
0,0 → 1,28
/*
* Project: S.Ha.R.K.
*
* Coordinators:
* Giorgio Buttazzo <giorgio@sssup.it>
* Paolo Gai <pj@gandalf.sssup.it>
*
* Authors :
* Giacomo Guidi <giacomo@gandalf.sssup.it>
*
*
* ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy)
*
* http://www.sssup.it
* http://retis.sssup.it
* http://shark.sssup.it
*/
 
/* Glue Layer Header Linux PCI 2.6 Driver*/
 
#ifndef __SHARK_I2C26__
#define __SHARK_I2C26__
 
/* Init the I2C 2.6 Driver */
int I2C26_init(void);
 
#endif
 
/shark/trunk/drivers/i2c/makefile
10,7 → 10,7
 
OBJS_PATH = $(BASE)/drivers/i2c
 
OBJS = i2c-dev.o i2c-core.o algos/i2c-algo-bit.o
OBJS = i2c-dev.o i2c-core.o shark_i2c26.o algos/i2c-algo-bit.o
 
OTHERINCL += -I$(BASE)/drivers/linuxc26/include
 
/shark/trunk/drivers/i2c/shark_i2c26.c
0,0 → 1,47
/*
* Project: S.Ha.R.K.
*
* Coordinators:
* Giorgio Buttazzo <giorgio@sssup.it>
* Paolo Gai <pj@gandalf.sssup.it>
*
* Authors :
* Giacomo Guidi <giacomo@gandalf.sssup.it>
*
*
* ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy)
*
* http://www.sssup.it
* http://retis.sssup.it
* http://shark.sssup.it
*/
 
/* Glue Layer for Linux PCI 2.6 Driver */
#include <kernel/kern.h>
 
extern int i2c_dev_init(void);
extern int i2c_init(void);
 
static int i2c_installed = FALSE;
 
/* Init the Linux I2C 2.6 Driver */
int I2C26_installed(void)
{
return i2c_installed;
}
 
int I2C26_init() {
 
if (i2c_installed == TRUE)
return 0;
 
i2c_init();
 
i2c_dev_init();
 
i2c_installed = TRUE;
 
return 0;
 
}