Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
addi_eeprom.c File Reference

Go to the source code of this file.

Data Structures

struct  str_Functionality
 
struct  str_MainHeader
 
struct  str_DigitalInputHeader
 
struct  str_DigitalOutputHeader
 
struct  str_TimerDetails
 
struct  str_TimerMainHeader
 
struct  str_AnalogOutputHeader
 
struct  str_AnalogInputHeader
 

Macros

#define NVCMD_BEGIN_READ   (0x7 << 5) /* nvRam begin read command */
 
#define NVCMD_LOAD_LOW   (0x4 << 5) /* nvRam load low command */
 
#define NVCMD_LOAD_HIGH   (0x5 << 5) /* nvRam load high command */
 
#define EE76_CMD_LEN   13 /* bits in instructions */
 
#define EE_READ   0x0180 /* 01 1000 0000 read instruction */
 
#define EEPROM_DIGITALINPUT   0
 
#define EEPROM_DIGITALOUTPUT   1
 
#define EEPROM_ANALOGINPUT   2
 
#define EEPROM_ANALOGOUTPUT   3
 
#define EEPROM_TIMER   4
 
#define EEPROM_WATCHDOG   5
 
#define EEPROM_TIMER_WATCHDOG_COUNTER   10
 

Functions

int i_EepromReadMainHeader (unsigned short w_PCIBoardEepromAddress, char *pc_PCIChipInformation, struct comedi_device *dev)
 
int i_EepromReadDigitalInputHeader (unsigned short w_PCIBoardEepromAddress, char *pc_PCIChipInformation, unsigned short w_Address, struct str_DigitalInputHeader *s_Header)
 
int i_EepromReadDigitalOutputHeader (unsigned short w_PCIBoardEepromAddress, char *pc_PCIChipInformation, unsigned short w_Address, struct str_DigitalOutputHeader *s_Header)
 
int i_EepromReadTimerHeader (unsigned short w_PCIBoardEepromAddress, char *pc_PCIChipInformation, unsigned short w_Address, struct str_TimerMainHeader *s_Header)
 
int i_EepromReadAnlogOutputHeader (unsigned short w_PCIBoardEepromAddress, char *pc_PCIChipInformation, unsigned short w_Address, struct str_AnalogOutputHeader *s_Header)
 
int i_EepromReadAnlogInputHeader (unsigned short w_PCIBoardEepromAddress, char *pc_PCIChipInformation, unsigned short w_Address, struct str_AnalogInputHeader *s_Header)
 
unsigned short w_EepromReadWord (unsigned short w_PCIBoardEepromAddress, char *pc_PCIChipInformation, unsigned short w_EepromStartAddress)
 
void v_EepromWaitBusy (unsigned short w_PCIBoardEepromAddress)
 
void v_EepromClock76 (unsigned int dw_Address, unsigned int dw_RegisterValue)
 
void v_EepromSendCommand76 (unsigned int dw_Address, unsigned int dw_EepromCommand, unsigned char b_DataLengthInBits)
 
void v_EepromCs76Read (unsigned int dw_Address, unsigned short w_offset, unsigned short *pw_Value)
 

Macro Definition Documentation

#define EE76_CMD_LEN   13 /* bits in instructions */

Definition at line 51 of file addi_eeprom.c.

#define EE_READ   0x0180 /* 01 1000 0000 read instruction */

Definition at line 52 of file addi_eeprom.c.

#define EEPROM_ANALOGINPUT   2

Definition at line 56 of file addi_eeprom.c.

#define EEPROM_ANALOGOUTPUT   3

Definition at line 57 of file addi_eeprom.c.

#define EEPROM_DIGITALINPUT   0

Definition at line 54 of file addi_eeprom.c.

#define EEPROM_DIGITALOUTPUT   1

Definition at line 55 of file addi_eeprom.c.

#define EEPROM_TIMER   4

Definition at line 58 of file addi_eeprom.c.

#define EEPROM_TIMER_WATCHDOG_COUNTER   10

Definition at line 60 of file addi_eeprom.c.

#define EEPROM_WATCHDOG   5

Definition at line 59 of file addi_eeprom.c.

#define NVCMD_BEGIN_READ   (0x7 << 5) /* nvRam begin read command */
Copyright (C) 2004,2005  ADDI-DATA GmbH for the source code of this module.

    ADDI-DATA GmbH
    Dieselstrasse 3
    D-77833 Ottersweier
    Tel: +19(0)7223/9493-0
    Fax: +49(0)7223/9493-92
    http://www.addi-data.com
    [email protected]

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

You should also find the complete GPL in the COPYING file accompanying this source code.

Definition at line 48 of file addi_eeprom.c.

#define NVCMD_LOAD_HIGH   (0x5 << 5) /* nvRam load high command */

Definition at line 50 of file addi_eeprom.c.

#define NVCMD_LOAD_LOW   (0x4 << 5) /* nvRam load low command */

Definition at line 49 of file addi_eeprom.c.

Function Documentation

int i_EepromReadAnlogInputHeader ( unsigned short  w_PCIBoardEepromAddress,
char pc_PCIChipInformation,
unsigned short  w_Address,
struct str_AnalogInputHeader s_Header 
)

Definition at line 1126 of file addi_eeprom.c.

int i_EepromReadAnlogOutputHeader ( unsigned short  w_PCIBoardEepromAddress,
char pc_PCIChipInformation,
unsigned short  w_Address,
struct str_AnalogOutputHeader s_Header 
)

Definition at line 1088 of file addi_eeprom.c.

int i_EepromReadDigitalInputHeader ( unsigned short  w_PCIBoardEepromAddress,
char pc_PCIChipInformation,
unsigned short  w_Address,
struct str_DigitalInputHeader s_Header 
)

Definition at line 946 of file addi_eeprom.c.

int i_EepromReadDigitalOutputHeader ( unsigned short  w_PCIBoardEepromAddress,
char pc_PCIChipInformation,
unsigned short  w_Address,
struct str_DigitalOutputHeader s_Header 
)

Definition at line 991 of file addi_eeprom.c.

int i_EepromReadMainHeader ( unsigned short  w_PCIBoardEepromAddress,
char pc_PCIChipInformation,
struct comedi_device dev 
)

Definition at line 805 of file addi_eeprom.c.

int i_EepromReadTimerHeader ( unsigned short  w_PCIBoardEepromAddress,
char pc_PCIChipInformation,
unsigned short  w_Address,
struct str_TimerMainHeader s_Header 
)

Definition at line 1022 of file addi_eeprom.c.

void v_EepromClock76 ( unsigned int  dw_Address,
unsigned int  dw_RegisterValue 
)

Definition at line 448 of file addi_eeprom.c.

void v_EepromCs76Read ( unsigned int  dw_Address,
unsigned short  w_offset,
unsigned short pw_Value 
)

Definition at line 654 of file addi_eeprom.c.

void v_EepromSendCommand76 ( unsigned int  dw_Address,
unsigned int  dw_EepromCommand,
unsigned char  b_DataLengthInBits 
)

Definition at line 519 of file addi_eeprom.c.

void v_EepromWaitBusy ( unsigned short  w_PCIBoardEepromAddress)

Definition at line 383 of file addi_eeprom.c.

unsigned short w_EepromReadWord ( unsigned short  w_PCIBoardEepromAddress,
char pc_PCIChipInformation,
unsigned short  w_EepromStartAddress 
)

Definition at line 178 of file addi_eeprom.c.