source: fact/drsdaq/VME/atlas/include/io_rcc/io_rcc.h@ 9833

Last change on this file since 9833 was 22, checked in by ogrimm, 16 years ago
First commit of drsdaq program
  • Property svn:executable set to *
File size: 3.1 KB
Line 
1/************************************************************************/
2/* */
3/* This is the application header file for the IO_RCC */
4/* library & applications */
5/* */
6/* 6. Jun. 02 MAJO created */
7/* */
8/*******C 2002 - The software with that certain something****************/
9
10#ifndef _IO_RCC_H
11#define _IO_RCC_H
12
13#include "io_rcc_common.h"
14
15//Definitions used in IO_GetHostInfo
16//Board type definitions are in io_rcc_common.h
17
18//Board manufacturers
19#define CCT 1
20
21//Operating system type
22#define LINUX 1
23
24//Operating system version
25#define K249 1
26
27//Error strings
28#define IO_RCC_SUCCESS_STR "No error"
29#define IO_RCC_ERROR_FAIL_STR "Failed to install the error library"
30#define IO_RCC_FILE_STR "Failed to open /dev/io_rcc"
31#define IO_RCC_NOTOPEN_STR "Library has not yet been opened"
32#define IO_RCC_MMAP_STR "Error from call to mmap function"
33#define IO_RCC_MUNMAP_STR "Error from call to munmap function"
34#define IO_RCC_ILLMANUF_STR "Unable to determine board manufacturer"
35#define IO_RCC_IOFAIL_STR "Error from IO_IOPeek or IO_IOPoke"
36#define IO_RCC_NO_CODE_STR "Unknown error"
37#define IO_PCI_TABLEFULL_STR "Internal device table is full"
38#define IO_PCI_NOT_FOUND_STR "PCI Device not found"
39#define IO_PCI_ILL_HANDLE_STR "Illegal handle"
40#define IO_PCI_CONFIGRW_STR "Error from pci_(read/write)_config_dword system call"
41#define IO_PCI_UNKNOWN_BOARD_STR "Board type can not be determined"
42#define IO_RCC_ILL_OFFSET_STR "Illegal offset (alignment)"
43#define IO_PCI_REMAP_STR "Error from remap_page_range system call"
44
45#ifdef __cplusplus
46extern "C" {
47#endif
48IO_ErrorCode_t IO_Open(void);
49IO_ErrorCode_t IO_Close(void);
50IO_ErrorCode_t IO_PCIMemMap(u_int pci_addr, u_int size, u_long *virt_addr);
51IO_ErrorCode_t IO_PCIMemUnmap(u_long virt_addr, u_int size);
52IO_ErrorCode_t IO_IOPeekUInt(u_int address, u_int *data);
53IO_ErrorCode_t IO_IOPokeUInt(u_int address, u_int data);
54IO_ErrorCode_t IO_IOPeekUShort(u_int address, u_short *data);
55IO_ErrorCode_t IO_IOPokeUShort(u_int address, u_short data);
56IO_ErrorCode_t IO_IOPeekUChar(u_int address, u_char *data);
57IO_ErrorCode_t IO_IOPokeUChar(u_int address, u_char data);
58IO_ErrorCode_t IO_PCIDeviceLink(u_int vendor_id, u_int device_id, u_int occurrence, u_int *handle);
59IO_ErrorCode_t IO_PCIDeviceUnlink(u_int handle);
60IO_ErrorCode_t IO_PCIDeviceInfo(u_int handle, pci_info_t *info);
61IO_ErrorCode_t IO_PCIConfigReadUInt(u_int handle, u_int offset, u_int *data);
62IO_ErrorCode_t IO_PCIConfigWriteUInt(u_int handle, u_int offset, u_int data);
63IO_ErrorCode_t IO_PCIConfigReadUShort(u_int handle, u_int offset, u_short *data);
64IO_ErrorCode_t IO_PCIConfigWriteUShort(u_int handle, u_int offset, u_short data);
65IO_ErrorCode_t IO_PCIConfigReadUChar(u_int handle, u_int offset, u_char *data);
66IO_ErrorCode_t IO_PCIConfigWriteUChar(u_int handle, u_int offset, u_char data);
67IO_ErrorCode_t IO_GetHostInfo(HostInfo_t *host_info);
68IO_ErrorCode_t IO_Mark(u_int bus);
69unsigned int IO_RCC_err_get(err_pack err, err_str pid, err_str code);
70#ifdef __cplusplus
71}
72#endif
73
74#endif
Note: See TracBrowser for help on using the repository browser.