Stops the flow of data processed through the specified MSPP endpoint.
DWORD mspDisableEndpoint ( MSPHD ephd )
Argument |
Description |
ephd |
MSPP endpoint handle. |
Return value |
Description |
SUCCESS |
|
CTAERR_BAD_ARGUMENT |
Function argument includes an invalid value or a required pointer argument is NULL. |
MSPERR_ENDPOINT_IS_DISABLED |
MSPP endpoint is already disabled. |
CTAERR_INVALID_CTAHD |
Handle is invalid. |
CTAERR_INVALID_HANDLE |
Invalid handle was passed as an argument to this function. |
MSPERR_DRIVER_COMMAND_FAILED |
SPI command has failed. |
MSPERR_ENDPOINT_BUSY |
MSPP command arrived while servicing a previous command. |
MSPERR_ENDPOINT_NOT_ALLOCATED |
MSPP endpoint is defined, but not yet allocated on the board. |
MSPERR_INVALID_HANDLE |
Specified MSPP endpoint is not valid. |
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: CTA_REASON_FINISHED MSPRSN_FAILED_TO_STOP MSPP service is unable to stop the on-board resource. The event.objHd indicates the ephd of the disabled endpoint. |
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: To temporarily disable a DS0 endpoint, disable the connected channels by calling mspDisableChannel. Do not use mspDisableEndpoint to temporarily disable a DS0 endpoint, because data flow is not restored when the endpoint is re-enabled.
mspCreateEndpoint, mspDestroyEndpoint, mspEnableEndpoint
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;