Logo Search packages:      
Sourcecode: libdc1394-22 version File versions  Download package

dc1394error_t dc1394_external_trigger_get_supported_sources ( dc1394camera_t camera,
dc1394trigger_sources_t sources 
)

Gets the list of available external trigger source

Definition at line 1137 of file control.c.

References dc1394_get_control_register(), dc1394trigger_sources_t::num, and dc1394trigger_sources_t::sources.

{
    uint32_t value;
    dc1394error_t err;
    uint64_t offset;
    int i;

    FEATURE_TO_INQUIRY_OFFSET(DC1394_FEATURE_TRIGGER, offset);
    err=dc1394_get_control_register(camera, offset, &value);
    DC1394_ERR_RTN(err,"Could not query supported trigger sources");

    sources->num=0;
    for (i = 0; i < DC1394_TRIGGER_SOURCE_NUM; i++) {
        if (value & (0x1 << (23-i-(i>3)*3))){
            sources->sources[sources->num]=i+DC1394_TRIGGER_SOURCE_MIN;
            sources->num++;
        }
    }

    return err;
}


Generated by  Doxygen 1.6.0   Back to index