Download Sapera CAB Programmer`s Manual
Transcript
//transparently either on the host or on the Mamba 1
// Retrieve server handles by name
CorManGetServerByName("Viper_Digital_1", &hServer_VD1);
CorManGetServerByName("Mamba_1", &hServer_Mamba1);
// Retrieve CAB_Interface 0 handle on each of the board server
CorCabGetHandle(hServer_VD1, 0, &hCAB_Intf0_VD1);
CorCabGetHandle(hServer_Mamba1, 0, &hCAB_Intf0_Mamba1);
// ********************* Start of Transmitter Setup ***************************
// Critical Parameters
//CORCAB_PRM_TRANSFER_MODE
=
Round Robin (Required)
//CORCAB_PRM_BLOCK_SIZE
=
frame size (required)
//CORCAB_PRM_CHANNEL
=
start and end channels. Channel numbers
//between start and end channel numbers are
//incremented at the end of each transfer.
//
CorCabSetPrm(hCAB_Intf0_VD1, CORCAB_PRM_TRANSFER_MODE,
CORCAB_VAL_TRANSFER_MODE_ROUND_ROBIN);
CorCabSetPrm(hCAB_Intf0_VD1, CORCAB_PRM_BLOCK_SIZE, 640 * 480);
// Start channel
=
8
// End channel
=
11
CorCabSetPrm(hCAB_Intf0_VD1, CORCAB_PRM_CHANNEL,CORCAB_VAL_CHANNEL_8 |
CORCAB_VAL_CHANNEL_11);
// ********************* End of Transmitter Setup ***************************
// ********************* Start of Receiver Setup ***************************
// Critical Parameters
//CORCAB_PRM_TRANSFER_MODE
=
not needed
//CORCAB_PRM_BLOCK_SIZE
=
not needed
//CORCAB_PRM_CHANNEL
=
One or more channels per Rx_Port
//Channel number must correspond to one or more
//channels #s programmed for one or more Tx_Port.
//Select the Rx_port before initializing the Channel number
CorCabSetPrm(hCAB_Intf0_Mamba1, CORCAB_PRM_PORT_INDEX, 0);
CorCabSetPrm(hCAB_Intf0_Mamba1, CORCAB_PRM_CHANNEL, CORCAB_VAL_CHANNEL_8);
CorCabSetPrm(hCAB_Intf0_Mamba1, CORCAB_PRM_PORT_INDEX, 1);
CorCabSetPrm(hCAB_Intf0_Mamba1, CORCAB_PRM_CHANNEL, CORCAB_VAL_CHANNEL_9);
CorCabSetPrm(hCAB_Intf0_Mamba1, CORCAB_PRM_PORT_INDEX, 2);
CorCabSetPrm(hCAB_Intf0_Mamba1, CORCAB_PRM_CHANNEL, CORCAB_VAL_CHANNEL_10);
CorCabSetPrm(hCAB_Intf0_Mamba1, CORCAB_PRM_PORT_INDEX, 3);
CorCabSetPrm(hCAB_Intf0_Mamba1, CORCAB_PRM_CHANNEL, CORCAB_VAL_CHANNEL_11);
// ********************* End of Receiver Setup ***************************
// ******************* Start of Frame buffer allocation ********************
//The following section allocates the frame buffers and stores handles of the
//frame buffer in an array of handles
Sapera CAB Programmer's Manual
Typical CAB Configurations • 41