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

dc1394error_t dc1394_avt_set_lut_mem_ctrl ( dc1394camera_t camera,
dc1394bool_t  en_write,
uint32_t  AccessLutNo,
uint32_t  addroffset 
)

Set access mode of a lut

Definition at line 1056 of file avt.c.

References dc1394_get_adv_control_register(), and dc1394_set_adv_control_register().

{
    dc1394error_t err;
    uint32_t curval;

    /* Retrieve current memory luts parameters */
    err=dc1394_get_adv_control_register(camera,REG_CAMERA_AVT_LUT_MEM_CTRL, &curval);
    DC1394_ERR_RTN(err,"Could not get AVT LUT memory control");

    /* write access enable : Bit 5 */
    curval = (curval & 0xFBFFFFFFUL) | ((en_write ) << 26);

    /* AccessLutNo : Bits 8..15 */
    curval = (curval & 0xFF00FFFFUL) | ((AccessLutNo << 16) & 0xFF0000UL );

    /* Number of images : Bits 16..31 */
    curval = (curval & 0xFFFF0000UL) | ((addroffset & 0xFFFFUL ));

    /* Set new parameters */
    err=dc1394_set_adv_control_register(camera,REG_CAMERA_AVT_LUT_MEM_CTRL, curval);
    DC1394_ERR_RTN(err,"Could not set AVT LUT memory control");

    return DC1394_SUCCESS;
}


Generated by  Doxygen 1.6.0   Back to index