/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.c

  • 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:
22
22
#include "ipecamera.h"
23
23
#include "error.h"
24
24
 
25
 
#define BIT_MASK(bits) ((1 << (bits)) - 1)
 
25
#define BIT_MASK(bits) ((1l << (bits)) - 1)
26
26
 
27
27
 
28
28
//#define PCILIB_FILE_IO
232
232
        return -1;
233
233
    }
234
234
    
235
 
    if (sscanf(bank,"%lx", &addr) == 1) {
 
235
    if (pcilib_isxnumber(bank)&&(sscanf(bank,"%lx", &addr) == 1)) {
236
236
        res = pcilib_find_bank_by_addr(ctx, addr);
237
237
        if (res != PCILIB_REGISTER_BANK_INVALID) return res;
238
238
    }