mspDisableChannel

Stops the specified MSPP channel from processing data.

Prototype

DWORD mspDisableChannel ( MSPHD chnhd )

Argument

Description

chnhd

MSPP channel handle.

Return values

Return value

Description

SUCCESS

 

CTAERR_BAD_ARGUMENT

Function argument includes an invalid value or a required pointer argument is NULL.

CTAERR_INVALID_CTAHD

Handle is invalid.

CTAERR_INVALID_HANDLE

Invalid handle was passed as an argument to this function.

MSPERR_CHANNEL_NOT_CONNECTED

Specified MSPP channel is not connected to any endpoints.

MSPERR_DRIVER_COMMAND_FAILED

SPI command has failed.

MSPERR_INTERNAL_HANDLE

Specified MSPP channel is not valid.

MSPERR_INVALID_HANDLE

Specified MSPP channel is not valid.

Events

Event

Description

MSPEVN_DISABLE_CHANNEL_DONE

Generated when the flow of data through an MSPP channel is stopped in response to an mspDisableChannel function call.

The event.value field can contain the following:

CTA_REASON_FINISHED

MSPRSN_FAILED_TO_STOP

MSPP service is unable to stop the on-board resource.

The event.objHd specifies the chnhd of the disabled channel.

Details

When called, mspDisableChannel discontinues the flow of all data that is sent through the specified MSPP channel.

See also

mspCreateChannel, mspDestroyChannel, mspEnableChannel

Example

ret = mspDisableChannel(hChan);
if (ret != SUCCESS)
    return FAILURE;

// Wait for event
ctaWaitEvent( hCtaQueHd, &Event, CTA_WAIT_FOREVER );

// Check the reason code
if ( Event.id    != MSPEVN_DISABLE_CHANNEL_DONE ||
     Event.value != CTA_REASON_FINISHED )
    return FAILURE;