User guide

164 RealCT Direct API Developer Guide
Chapter 5: MVIP-90
Example 8. RHT_CONFIG_MVIP Sample Code
#include brktddm.h
int main(int argc, char **argv)
{
BRKT_HANDLE BoardHandle; /* DSP board device handle */
BOOLEAN IoctlResult; /* Result of IOCTL call */
BRKT_SIZE_T BytesReturned; /* Bytes returned from IOCTL call*/
struct MVIPconfig_s Config;
/* Open DSP device */
BoardHandle = BrktOpenDevice (BRKT_DEVICE_RDSP_BOARD, 0);
/* Configure Vantage LS lines to MVIP. Synchronous call. */
memset (&Config,0,sizeof (Config));
Config.Resource = RDSP_LINE;
Config.Stream = 8; /* LS lines are connected to
streams 8-15 in the opposite
direction of VP devices */
Config.Timeslot = 0;
IoctlResult = BrktDeviceIoControl (
BoardHandle,
RHT_CONFIG_MVIP,
&Config, /* Buffer to driver */
sizeof(Config),
NULL,
0,
&BytesReturned,
NULL); /* Wait until I/O is complete */
if (!IoctlResult)
printf ("RHT_CONFIG_MVIP failed: BrktGetLastError = %d\n",
BrktGetLastError (BoardHandle));
BrktCloseDevice (BoardHandle);
}