/alps/ipecamera

To get this branch, use:
bzr branch http://darksoft.org/webbzr/alps/ipecamera

« back to all changes in this revision

Viewing changes to ipecamera/ipecamera.c

  • Committer: Suren A. Chilingaryan
  • Date: 2011-12-12 14:27:13 UTC
  • Revision ID: csa@dside.dyndns.org-20111212142713-xwpcvv6j5d3zmnvx
Minor fixes and improvements

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
        
96
96
        FIND_REG(status_reg, "fpga", "status");
97
97
        FIND_REG(control_reg, "fpga", "control");
98
 
        FIND_REG(start_reg, "fpga", "start_address");
99
 
        FIND_REG(end_reg, "fpga", "end_address");
 
98
 
 
99
        FIND_REG(status3_reg, "fpga", "status3");
100
100
 
101
101
        FIND_REG(n_lines_reg, "cmosis", "number_lines");
102
102
        FIND_REG(line_reg, "cmosis", "start1");
583
583
        pcilib_error("IPECamera imaging is not initialized");
584
584
        return PCILIB_ERROR_NOTINITIALIZED;
585
585
    }
 
586
    
 
587
    pcilib_sleep_until_deadline(&ctx->next_trigger);
586
588
 
 
589
/*
 
590
    do {
 
591
        usleep(10);
 
592
        GET_REG(status3_reg, value);
 
593
    } while (value&0x20000000);
 
594
*/
 
595
    
587
596
    SET_REG(control_reg, IPECAMERA_FRAME_REQUEST|IPECAMERA_READOUT_FLAG);
588
597
    usleep(IPECAMERA_WAIT_FRAME_RCVD_TIME);
589
598
    CHECK_REG(status_reg, IPECAMERA_EXPECTED_STATUS);
590
599
    SET_REG(control_reg, IPECAMERA_IDLE|IPECAMERA_READOUT_FLAG);
591
600
 
592
601
 
593
 
        // DS: Just measure when next trigger is allowed instead and wait in the beginning
594
 
    usleep(IPECAMERA_NEXT_FRAME_DELAY);  // minimum delay between End Of Readout and next Frame Req
 
602
    pcilib_calc_deadline(&ctx->next_trigger, IPECAMERA_NEXT_FRAME_DELAY);
595
603
 
596
604
    return 0;
597
605
}