/alps/pcitool

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to pci.h

  • Committer: Suren A. Chilingaryan
  • Date: 2011-03-09 15:55:27 UTC
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: csa@dside.dyndns.org-20110309155527-7ui77xsz2f7ms0b8
Support for FPGA registers

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
#include "driver/pciDriver.h"
10
10
#include "kernel.h"
11
11
 
 
12
 
12
13
#define pcilib_memcpy pcilib_memcpy32
13
14
#define pcilib_datacpy pcilib_datacpy32
14
15
 
41
42
 
42
43
 
43
44
typedef enum {
 
45
    PCILIB_DEFAULT_PROTOCOL,
44
46
    IPECAMERA_REGISTER_PROTOCOL
45
47
} pcilib_register_protocol_t;
46
48
 
49
51
#define PCILIB_ADDRESS_INVALID          ((uintptr_t)-1)
50
52
#define PCILIB_REGISTER_BANK_INVALID    ((pcilib_register_bank_t)-1)
51
53
#define PCILIB_REGISTER_BANK0           0
 
54
#define PCILIB_REGISTER_BANK1           1
 
55
#define PCILIB_REGISTER_BANK2           2
 
56
#define PCILIB_REGISTER_BANK3           3
52
57
 
53
58
typedef struct {
54
59
    pcilib_register_bank_addr_t addr;
102
107
} pcilib_model_description_t;
103
108
 
104
109
#ifdef _PCILIB_PCI_C
 
110
# include "ipecamera.h"
 
111
# include "default.h"
 
112
 
105
113
pcilib_model_description_t pcilib_model[3] = {
106
114
    { NULL, NULL, NULL },
107
115
    { NULL, NULL, NULL },
108
116
    { ipecamera_registers, ipecamera_register_banks, ipecamera_register_ranges }
109
117
};
110
118
 
111
 
pcilib_protocol_description_t pcilib_protocol[2] = {
 
119
pcilib_protocol_description_t pcilib_protocol[3] = {
 
120
    { pcilib_default_read, pcilib_default_write },
112
121
    { ipecamera_read, ipecamera_write },
113
122
    { NULL, NULL }
114
123
};