mspDisableEndpoint

Stops the flow of data processed through the specified MSPP endpoint.

Prototype

DWORD mspDisableEndpoint ( MSPHD ephd )

Argument

Description

ephd

MSPP endpoint handle.


Return values

Return value

Description

SUCCESS

 

CTAERR_BAD_ARGUMENT

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

CTAERR_INVALID_CTAHD

The handle is invalid.

CTAERR_INVALID_HANDLE

An invalid handle was passed as an argument to this function.

MSPERR_DRIVER_COMMAND_FAILED

An SPI command has failed.

MSPERR_ENDPOINT_BUSY

The MSPP command arrived while servicing a previous command.

MSPERR_ENDPOINT_NOT_ALLOCATED

The MSPP endpoint is defined, but not yet allocated on the board.

MSPERR_INVALID_HANDLE

The specified MSPP endpoint is not valid.


Events

Event

Description

MSPEVN_DISABLE_ENDPOINT_DONE

Generated when the flow of data through an endpoint is halted in response to an mspDisableEndpoint function call.

The event.value field can contain the following:

SUCCESS

MSPRSN_FAILED_TO_STOP

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

The event.objHd indicates the ephd of the disabled endpoint.


Details

When called, mspDisableEndpoint halts the data flow from a specified MSPP endpoint. Only one call to mspDisableEndpoint is needed to interrupt the flow of data to multiple channels that are connected to a single endpoint.

Note: When interrupting the broadcast for a single participant, the application should disable the channel for that specific participant.

See also

mspCreateEndpoint, mspDestroyEndpoint, mspEnableEndpoint

Example

ret = mspDisableEndpoint(hEp);
if (ret != SUCCESS)
    return FAILURE;

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

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