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

dc1394error_t dc1394_avt_set_shading_mem_ctrl ( dc1394camera_t camera,
dc1394bool_t  en_write,
dc1394bool_t  en_read,
uint32_t  addroffset 
)

Set write and read access mode of the shading reference frame

Definition at line 377 of file avt.c.

References dc1394_get_adv_control_register(), and dc1394_set_adv_control_register().

{
    dc1394error_t err;
    uint32_t curval;

    /* Retrieve current shading properties */
    err=dc1394_get_adv_control_register(camera,REG_CAMERA_AVT_SHDG_MEM_CTRL, &curval);
    DC1394_ERR_RTN(err,"Could not get AVT shading memory control");

    /* read access enable : Bit 6 */
    curval = (curval & 0xFDFFFFFFUL) | ((en_read ) << 25);

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

    /* Number of images : Bits 8..31 */
    curval = (curval & 0xFF000000UL) | ((addroffset & 0xFFFFFFUL ));

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

    return DC1394_SUCCESS;
}


Generated by  Doxygen 1.6.0   Back to index