ADLINK Technology RTV Series User Manual page 173

Multi-channel real-time video frame grabber series
Table of Contents

Advertisement

Proprietary properties
Except standard APIs, we also provide a proprietary IO control
which can read and write external general purpose IO pin.
/* configure the direction (in or out) of each
gpio bit prior to reading or writing gpio.
*/
int config_gpio (void)
{
unsigned int value = 0xC3FEFF;
if (-1 == ioctl (fd,
return 0;
}
int read_gpio (void)
{
unsigned int value;
if (-1 == ioctl (fd, BT878_G_GPIO_VALUE,
value &= 0x100;// bit 8 is used to store the
if(value)
else
}
int write_gpio (int value)
{
unsigned int gpio;
if (-1 == ioctl (fd, BT878_G_GPIO_VALUE,
gpio |= 0x40;// bit 6 is used to set the
if(value)
if (-1 == ioctl (fd, BT878_S_GPIO_VALUE,
return 0;
}
Programming Guide
BT878_S_GPIO_OUT_ENABLE, &value))
return -1;
&value))
return -1;
input value
return 1;
return 0;
&gpio))
return -1;
output
gpio -= 0x40;
&gpio))
return -1;
163

Advertisement

Table of Contents
loading

Table of Contents