diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-03-09 16:55:27 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-03-09 16:55:27 +0100 |
commit | a008b10d8488ef905a43de00ee5c8efd03b03ed6 (patch) | |
tree | 1d4330f9cbb72f641b197a445863a9012581e405 /pci.c | |
parent | b0596cb0f01f885153abffaecfa248920cb8658b (diff) | |
download | ipecamera-a008b10d8488ef905a43de00ee5c8efd03b03ed6.tar.gz ipecamera-a008b10d8488ef905a43de00ee5c8efd03b03ed6.tar.bz2 ipecamera-a008b10d8488ef905a43de00ee5c8efd03b03ed6.tar.xz ipecamera-a008b10d8488ef905a43de00ee5c8efd03b03ed6.zip |
Support for FPGA registers
Diffstat (limited to 'pci.c')
-rw-r--r-- | pci.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -22,7 +22,7 @@ #include "ipecamera.h" #include "error.h" -#define BIT_MASK(bits) ((1 << (bits)) - 1) +#define BIT_MASK(bits) ((1l << (bits)) - 1) //#define PCILIB_FILE_IO @@ -232,7 +232,7 @@ pcilib_register_bank_t pcilib_find_bank(pcilib_t *ctx, const char *bank) { return -1; } - if (sscanf(bank,"%lx", &addr) == 1) { + if (pcilib_isxnumber(bank)&&(sscanf(bank,"%lx", &addr) == 1)) { res = pcilib_find_bank_by_addr(ctx, addr); if (res != PCILIB_REGISTER_BANK_INVALID) return res; } |