THORLABS DCU223x Operation Manual And Sdk page 289

Cdd and cmos cameras
Hide thumbs Also See for DCU223x:
Table of Contents

Advertisement

Example 10
INT nRet = IS_SUCCESS;
IO_GPIO_CONFIGURATION gpioConfiguration;
// Read information about GPIO1
gpioConfiguration.u32Gpio = IO_GPIO_1;
nRet = is_IO(hCam, IS_IO_CMD_GPIOS_GET_CONFIGURATION, (void*)&gpioConfiguration,
sizeof(gpioConfiguration) );
if
(nRet == IS_SUCCESS)
{
if
((gpioConfiguration.u32Caps & IS_GPIO_PWM) != 0)
{
// GPIO1 supports PWM
}
if
((gpioConfiguration.u32Caps & IS_GPIO_FLASH) != 0)
{
// GPIO1 supports Flash
}
if
(gpioConfiguration.u32Configuration == IS_GPIO_OUTPUT)
{
// GPIO1 is currently configured as output
if
(gpioConfiguration.u32State == 1)
{
// GPIO1 is currently output HIGH
}
}
}
Example 11
INT nRet = IS_SUCCESS;
IO_GPIO_CONFIGURATION gpioConfiguration;
// Set configuration of GPIO1 (OUTPUT LOW)
gpioConfiguration.u32Gpio = IO_GPIO_1;
gpioConfiguration.u32Configuration = IS_GPIO_OUTPUT;
gpioConfiguration.u32State = 0;
nRet = is_IO(hCam, IS_IO_CMD_GPIOS_SET_CONFIGURATION, (void*)&gpioConfiguration,
sizeof(gpioConfiguration));
Example 12
INT nRet = IS_SUCCESS;
IO_GPIO_CONFIGURATION gpioConfiguration;
// Set configuration of GPIO1 (COM-port TX)
// GPIO1 configured as RX is not supported!
gpioConfiguration.u32Gpio = IO_GPIO_1;
gpioConfiguration.u32Configuration = IS_GPIO_COMPORT_TX;
// GPIO2 will be configured as IS_GPIO_COMPORT_RX automatically!
nRet = is_IO(hCam, IS_IO_CMD_GPIOS_SET_CONFIGURATION, (void*)&gpioConfiguration,
sizeof(gpioConfiguration));
// The following code leads to the same setting
// Set configuration of GPIO2 (COM-port RX)
gpioConfiguration.u32Gpio = IO_GPIO_2;
gpioConfiguration.u32Configuration = IS_GPIO_COMPORT_RX;
// GPIO1 will be configured as IS_GPIO_COMPORT_TX automatically!
nRet = is_IO(hCam, IS_IO_CMD_GPIOS_SET_CONFIGURATION, (void*)&gpioConfiguration,
sizeof(gpioConfiguration));
Example 13
INT nRet = IS_SUCCESS;
IO_FLASH_PARAMS flashParams;
// Get the minimum values for the GPIO flash delay and flash duration
nRet = is_IO(m_hCam, IS_IO_CMD_FLASH_GET_GPIO_PARAMS_MIN, (void*)&flashParams,
sizeof(flashParams));
// Set the minimum values for flash delay and flash duration. Be careful: The normal flash does not work with val
nRet = is_IO(m_hCam, IS_IO_CMD_FLASH_SET_GPIO_PARAMS, (void*)&flashParams,
sizeof(flashParams));
© 2013 Thorlabs GmbH
4 Programming (SDK)
287

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dcu224xDcc1240xDcc1545mDcc1645c

Table of Contents