EasyManuals Logo

THORLABS DCC1645C User Manual

THORLABS DCC1645C
530 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #289 background imageLoading...
Page #289 background image
© 2013 Thorlabs GmbH
4 Programming (SDK)
287
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 values < 20 us
nRet = is_IO(m_hCam, IS_IO_CMD_FLASH_SET_GPIO_PARAMS, (void*)&flashParams,
sizeof(flashParams));

Table of Contents

Other manuals for THORLABS DCC1645C

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the THORLABS DCC1645C and is the answer not in the manual?

THORLABS DCC1645C Specifications

General IconGeneral
BrandTHORLABS
ModelDCC1645C
CategorySecurity Camera
LanguageEnglish

Related product manuals