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

  • Committer: Suren A. Chilingaryan
  • Date: 2011-10-21 01:44:27 UTC
  • Revision ID: csa@dside.dyndns.org-20111021014427-5iwco8k0b5ot46eg
Accept short addresses for IPECamera FPGA registers

Show diffs side-by-side

added added

removed removed

Lines of Context:
1537
1537
                    if ((start >= ranges[i].start)&&(start <= ranges[i].end)) break;
1538
1538
                        
1539
1539
                    // register access in plain mode
1540
 
                if (ranges[i].start != ranges[i].end) ++mode;   
 
1540
                if (ranges[i].start != ranges[i].end) {
 
1541
                    pcilib_register_bank_t regbank = pcilib_find_bank_by_addr(handle, ranges[i].bank);
 
1542
                    if (regbank == PCILIB_REGISTER_BANK_INVALID) Error("Configuration error: register bank specified in the address range is not found");
 
1543
                    
 
1544
                    bank = model_info->banks[regbank].name;
 
1545
                    start += ranges[i].addr_shift;
 
1546
                    ++mode;
 
1547
                }
1541
1548
            }
1542
1549
        } else {
1543
1550
            if (pcilib_find_register(handle, bank, addr) == PCILIB_REGISTER_INVALID) {