VVCRS(4) — UNIX Programmer’s Manual
NAME
vvcrs − NWB-226 VTR Controller Interface
SYNOPSYS
/dev/vvcrs[01]
#include <newsvme/vvcrsreg.h>
DESCRIPTION
vvcrs interface controls the VTR Controller (NWB−226). The special files ‘/dev/vvcrs0’ and ‘/dev/vvcrs1’ are corresponds to the channel A and channel B of the NWB−226.
The VTR connected to the NWB−226 is controlled by the command of "9-pin RS−422 connecter protocol". The basic operation is supported by the basic library vc(3x).
The operation procedures to control this device are;
1. Open the device channel to be used.
2. Download the farmware program and execute it.
3. Control the VTR with the basic library.
4. Close the device.
The constant necessary to use this device is described in the following header file. Please include it.
#include <sys/types.h>
#include <sys/ioctl.h>
#include <newsvme/vvcrsreg.h>
STRUCTURE vcio
struct vcio {
int vc_flags;
int vc_zaddr;
int vc_count;
u_char ∗vc_buf;
};
vc_flags
execution request flag
vc_zaddr
Specify the address that send the parameter.
The addresses that is able to specify are;
0xc2540000 − c25407fdNWS−800/900/1800/1900
0xd2540000 − d25407fdNWS−1700
vc_count
Specify the number of parameter.
vc_buf
Specify the first address of the buffer stored the parameter.
OPEN DEVICE
Use the vtr_open function prepared for the basic library.
int n;
vtr_open(n)
The argument n indicates the VTR channel. The channel A is indicated when n = 0, and the channel B is indicated when n = 1. In this function, the file descripter will be returned when the operation was successed. If the error occured, −1 will be returned.
DOWNLOAD/EXECUTION of FARMWARE PROGRAM
Use the vtr_load function prepared in the basic library.
int fd; /∗ file descripter by vtr_open function ∗/
vtr_load(fd)
CLOSE DEVICE
Use the vtr_close function prepared in the basic library.
int fd; /∗ file descripter by vtr_open function ∗/
vtr_close(fd)
ioctl SYSTEM CALL
VCIOCZRST
Resets the VTR farmware program.
ioctl(fd, VCIOCZRST, 0);
VCIOCZRUN
Cancels the resetting VTR farmware program.
ioctl(fd, VCIOCRUN, 0);
VCIOCPUT
Write down the specified number of parameters to the specified address of the device.
ioctl(fd, VCIOCPUT, &vcio);
VCIOCGET
Read the specified number of parameters from the specified address of the device.
ioctl(fd, VCIOCGET, &vcio);
VCIOCSCMD
Use when it is necessary to use the function of the "9-pin RS−422 connecter protocol" that is not prepared in the basic library.
ioctl(fd, VCIOCSCMD, &vcio);
SEE ALSO
"VTR control interface board NWB−226, Software Manual"
"/usr/sony/demo/NWB−226/README"
vc(3x)
ERROR
If you reboot NEWS while VTR controller is started, NEWS may be hang up. In this case, power off the VME box and NEWS system and boot again.
NEWS-OSRelease 3.3