/* Function: ExtCloseSerialConnection ========================================== * Abstract: * Close the connection with the target. */ PRIVATE boolean_T ExtCloseSerialConnection(ExtSerialPort *portDev) { ExtResetSerialConnection(); return(ExtSerialPortDisconnect(portDev)); } /* end ExtCloseSerialConnection */
/* Function: ExtForceDisconnect ================================================ * Abstract: * Called by rt_UploadServerWork() in ext_svr.c when there is an extmode * communication error (e.g. a tcp/ip disconnection between the host and target * caused by a cable problem or extremely high network traffic). In this case, * we want the target to disconnect from the host even if it can't communicate * with the host because we assume that the communication problem caused the * host to disconnect. This function will perform all steps necessary to * shutdown the communication and leave the target in a state ready to be * reconnected. */ void ExtForceDisconnect(ExtUserData *UD) { ExtSerialPortDisconnect(UD->portDev); UD->portDev = NULL; }